RestApiDOCUframeManager class
Hauptklasse für alle REST-API-bezogenen Daten und Funktionen
Diese Klasse verwaltet die Kommunikation mit der REST-API, einschließlich Authentifizierung, Session-Management, HTTP-Anfragen und Antwortverarbeitung.
NEUE MODULARE ARCHITEKTUR: Diese Klasse wurde refaktoriert, um eine modulare Architektur zu verwenden:
config: Zentrale Konfigurationsverwaltung (RestApiConfig)callbacks: Event-System und Callback-Management (RestApiCallbacks)
Hauptfunktionen:
- Benutzeranmeldung und Session-Verwaltung
- HTTP-Anfragen mit automatischer Session-Erneuerung
- Verschlüsselung und Entschlüsselung von Anfragen/Antworten
- Firebase Performance-Monitoring
- Fehlerbehandlung und Exception-Management
Migrationshinweis:
Diese Klasse ist eingefroren (funktional "frozen") und wird schrittweise
durch die neue DOCUframeApi ersetzt. Es werden hier keine neuen
Funktionen mehr hinzugefügt und keine Verhaltensänderungen mehr
vorgenommen - lediglich Charakterisierungstests (siehe test/legacy/)
sichern den aktuellen (Ist-)Zustand ab. Neue Aufrufe sollten stattdessen
DOCUframeApi (mit api.v1/api.v3/api.raw) verwenden.
- Annotations
-
- @Deprecated('RestApiDOCUframeManager ist eingefroren und wird durch DOCUframeApi ersetzt. ' 'Neue Aufrufe verwenden DOCUframeApi (api.v1/api.v3/api.raw). ' 'Entfernung frühestens in einem späteren Major-Release.')
Constructors
- RestApiDOCUframeManager({required RestApiDOCUframeConfig config, RestApiDOCUframeCallbacks? callbacks})
- Erstellt eine neue RestApiDOCUframeManager-Instanz
Properties
- callbacks ↔ RestApiDOCUframeCallbacks
-
Callback-System für Event-Management
getter/setter pair
- config → RestApiDOCUframeConfig
-
Getter für die Konfiguration
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- loggedIn → bool
-
Getter für den Anmeldestatus
no setter
-
pendingResponses
→ Map<
String, RestApiRequest> -
Getter für ausstehende HTTP-Anfragen
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkService(
) → Future< RestApiCheckServiceResponse> - Überprüft den aktuellen Webservice über '/CheckService'
-
checkSession(
) → Future< RestApiResponse> - Überprüft die aktuelle Session über '/_CheckSession'
-
create2FASecret(
String appname) → Future< RestApiResponse> - Erstellt ein neues 2FA-Secret für eine Anwendung
-
createDemoAccount(
String password) → Future< RestApiResponse> - Erstellt ein Demo-Benutzerkonto für Testzwecke
-
customRequest(
HttpMethod method, String uriPath, {Map< String, String> ? requestHeader, Map<String, String> ? params, String? body, bool handleSession = true, bool handleResponse = true}) → Future<Response> - Führt eine benutzerdefinierte HTTP-Anfrage aus
-
delete2FASecret(
String appname, String token) → Future< RestApiResponse> - Löscht ein 2FA-Secret für eine Anwendung
-
deleteFolders(
String path, {bool notEmpty = false}) → Future< RestApiResponse> - Löscht einen Ordner
-
deleteObject(
String objectOid, {String actions = "", bool moveToRecycler = false}) → Future< RestApiResponse> - Löscht ein Objekt aus der Datenbank
-
dispose(
) → void - Räumt alle Ressourcen auf
-
executeWithoutBuffering<
T> (Future< T> action()) → Future<T> - Führt eine Aktion ohne Buffer-Verarbeitung aus
-
executeWithPriority<
T> (Future< T> action(), RequestPriority priority) → Future<T> - Führt eine Action mit einer bestimmten Request-Priorität aus
-
get2FASecret(
String appname, String username) → Future< RestApi2FASecretResponse> - Ruft 2FA-Secret-Informationen für einen Benutzer ab
-
getAppointments(
DateTime from, DateTime to, {String username = "", String? query, int page = 0, int? perPage}) → Future< RestApiResponse> - Ruft Termine aus einem bestimmten Zeitraum ab
-
getCalls(
{String query = "", int page = 0, int? perPage, String serialization = "", String rightsControlKey = ""}) → Future< RestApiResponse> - Ruft Anruflisten und Telefonie-Daten ab
-
getDocumentPaths(
String oid, {bool extended = false}) → Future< RestApiResponse> - Ruft Dokumentpfade für ein Objekt ab
-
getExtModelIndexes(
{String classes = "", String rightsControlKey = ""}) → Future< RestApiResponse> - Ruft Datenbank-Index-Informationen ab
-
getExtModelML(
{List< String> ? headerClasses, List<String> ? bodyClasses, bool skipMembers = false}) → Future<RestApiResponse> - Ruft Machine Learning Modell-Daten ab
-
getExtModelStructure(
{String classes = "", String baseClasses = "", bool skipMembers = false, String rightsControlKey = ""}) → Future< RestApiResponse> - Ruft erweiterte Modell-Strukturinformationen ab
-
getFile(
String oid) → Future< RestApiFileResponse> - Lädt eine Datei anhand ihrer Objekt-ID herunter
-
getFolderByOid(
String oid, {bool reverseOrder = false, int page = 0, int? perPage, String query = ""}) → Future< RestApiResponse> - Ruft Ordner-Inhalte über die Objekt-ID (OID) ab
-
getFolderByPath(
String path, {bool reverseOrder = false, int page = 0, int? perPage, String query = ""}) → Future< RestApiResponse> - Ruft Ordner-Inhalte über den Ordner-Pfad ab
-
getFolderByType(
String folderType, {bool reverseOrder = false, int page = 0, int? perPage, String query = ""}) → Future< RestApiResponse> - Ruft Ordner-Inhalte nach Ordner-Typ ab
-
getIncidentTree(
String oid, {int deepLevel = -1, String serialization = "", String rightsControlKey = ""}) → Future< RestApiResponse> - Ruft die Hierarchie von Aktionen/Vorgängen ab
-
getLockObject(
String id) → Future< RestApiObjectLockResponse> -
getLoginKey(
) → Future< RestApiLoginSecureKeyResponse> - Ruft den öffentlichen Schlüssel für v2-Anmeldung ab
-
getLoginSecureKey(
) → Future< RestApiLoginSecureKeyResponse> - Ruft den öffentlichen Schlüssel für sichere v2-Anmeldung ab
-
getMailAccounts(
) → Future< RestApiResponse> -
getModelDict(
String dict, {String langID = "", String rightsControlKey = ""}) → Future< RestApiResponse> - Ruft Wörterbuch-Daten aus dem Modell ab
-
getModelStructure(
{String classes = "", String baseClasses = "", bool skipMembers = false, String rightsControlKey = ""}) → Future< RestApiResponse> - Ruft die Modell-Struktur der Datenbank ab
-
getObject(
String objectOid, {String className = "", String serialization = ""}) → Future< RestApiResponse> - Ruft Objektdaten anhand der Objekt-ID ab
-
getObjects(
String className, {String query = "", int page = 0, int? perPage, String serialization = "", String actions = "", String rightsControlKey = ""}) → Future< RestApiResponse> - Ruft eine Liste von Objekten einer bestimmten Klasse ab
-
getPersonalMyTasks(
) → Future< RestApiResponse> - Ruft persönliche Aufgaben des aktuellen Benutzers ab
-
getPersonalUnreadDocuments(
) → Future< RestApiResponse> - Ruft ungelesene Dokumente des aktuellen Benutzers ab
-
getPreview(
String objectOid, String parameters, {int page = 0, bool keepRatio = true}) → Future< Uint8List?> - Generiert eine Vorschau-Darstellung eines Objekts
-
getPZEWorkingTimeAccounts(
{String serialization = "", String? employeeOid, DateTime? from, DateTime? to}) → Future< RestApiResponse> - Ruft Arbeitszeitkonten für einen Zeitraum ab
-
getPZEWorkingTimeKeys(
{String serialization = ""}) → Future< RestApiResponse> - Ruft verfügbare Arbeitszeitschlüssel für die PZE ab
-
getSyncClassInfo(
String appName) → Future< RestApiResponse> - Ruft Synchronisations-Klassen-Informationen für eine Anwendung ab
-
getSyncObjectsOfClass(
String appName, String className, {List< RestApiSyncContainer> nextContainers = const [], int? maxRecords}) → Future<RestApiSyncClassResponse> - Ruft Synchronisations-Objekte einer spezifischen Klasse ab
-
getUploadFile(
String uploadID) → Future< RestApiResponse> - Ruft Informationen über eine hochgeladene Datei ab, einschließlich Größe und MD5-Hash
-
getUserEmailSignatures(
) → Future< RestApiResponse> -
getUserSystemSettings(
{String eventMacroName = ""}) → Future< RestApiUserSystemSettingsResponse> - Ruft Benutzer-Systemeinstellungen ab
-
getVersionInfo(
) → Future< RestApiVersionInfoResponse> - Ruft Versionsinformationen des Servers ab
-
login(
String md5Password, {String? twoFactorAuthToken, bool refreshSession = false}) → Future< RestApiLoginResponse> - Meldet den Benutzer in der Datenbank über '/v2/login' oder '/v2/login/secure' an
-
logout(
) → Future< RestApiResponse> - Meldet den Benutzer vom System ab
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patchAppointmentsCreateException(
String id, DateTime exceptionFrom, DateTime from, DateTime to, {String title = "", String place = "", String description = "", String owner = "", ISODuration remindBefore = const ISODuration(year: 0), DateTime? remindAt, bool wholeDay = false, bool group = false, List< String> ? attendeesUserNames, List<String> ? attendeesAddresses, List<String> ? attendeesEmails, String notificationComment = "", bool notifyAllAttendees = false, bool isSerial = false, bool public = false, bool extern = false, int? type, int? occupancy, String rrule = ""}) → Future<RestApiResponse> - This request allows to create Termin series exception
-
patchAppointmentsRemoveFromSeries(
String id, DateTime date) → Future< RestApiResponse> - This request allows to remove date from Termin series
-
patchAppointmentsUpdateAppointment(
String id, DateTime from, DateTime to, {String title = "", String place = "", String description = "", String owner = "", ISODuration? remindBefore, DateTime? remindAt, bool wholeDay = false, bool group = false, List< String> ? attendeesUserNames, List<String> ? attendeesAddresses, List<String> ? attendeesEmails, String notificationComment = "", bool notifyAllAttendees = false, bool isSerial = false, bool public = false, bool extern = false, int? type, int? occupancy, String rrule = ""}) → Future<RestApiResponse> - This request allows to edit an appointment
-
patchFoldersAdd(
RestApiDOCUframeFolderType folderType, String folderId, List< String> documentOids, {String className = ""}) → Future<RestApiResponse> - Fügt Dokumente zu einem Ordner hinzu
-
patchFoldersCopyDocuments(
RestApiDOCUframeFolderType destinationFolderSourceType, String destinationFolderId, List< String> documentOids, {RestApiDOCUframeFolderType? sourceFolderSourceType, String? sourceFolderId, bool cut = true}) → Future<RestApiResponse> - Kopiert oder verschiebt Dokumente zwischen Ordnern
-
patchFoldersRemoveDocuments(
RestApiDOCUframeFolderType folderType, String folderId, List< String> documentOids, {String className = "", bool moveToTrashBin = true, dynamic deep = false}) → Future<RestApiResponse> - Entfernt Dokumente aus einem Ordner
-
patchFoldersRename(
String oid, String newName) → Future< RestApiResponse> - Benennt einen Ordner um
-
patchMail(
{String uuid = "", String oid = "", String from = "-", List< String> ? to, List<String> ? cc, List<String> ? bcc, String name = "-", String description = "-", String subject = "-", String htmlContent = "-", String plainContent = "-", Map<String, dynamic> ? templateData, List<Map< ? attachments, int priorityValue = 3, String priorityText = "normal", bool acknowledgementRequired = false, bool keepCalendar = false, bool convertImageDataSrcToFileSrc = false, DateTime? startTime, String actions = ""}) → Future<String, dynamic> >RestApiResponse> - This request allows to update existing an email, either the uuid or oid are needed
-
patchMessage(
String oid, List< String> toUsers, String text, {String name = "", String description = "", bool addToIncomingFolder = true, String originalOid = "", String uuid = "", String serialization = "", String rightsControlKey = ""}) → Future<RestApiResponse> - Bearbeitet eine Entwurfs-Nachricht
-
patchMessageSend(
String oid, List< String> toUsers, String text, {String name = "", String description = "", bool addToIncomingFolder = true, String originalOid = "", String uuid = "", String serialization = "", String rightsControlKey = ""}) → Future<RestApiResponse> - Bearbeitet und sendet eine Nachricht direkt
-
patchObject(
String objectOid, String body, {int storeMode = 0, int storeSecurityPolice = 0, String serialization = "", String actions = "", String rightsControlKey = ""}) → Future< RestApiResponse> - Bearbeitet ein bestehendes Objekt
-
patchObjects(
String className, {String query = "", String body = "", int storeMode = 0, int storeSecurityPolice = 0, String serialization = "", String actions = "", String rightsControlKey = ""}) → Future< RestApiResponse> - Bearbeitet mehrere Objekte einer Klasse gleichzeitig
-
patchPersonalEmptyRecycleBin(
) → Future< RestApiResponse> - Leert den Papierkorb des aktuellen Benutzers
-
postAction(
String className, {String query = "", int page = 0, int? perPage, String serialization = "", String actions = "", String rightsControlKey = ""}) → Future< RestApiResponse> - Führt eine Aktion auf Objekten einer bestimmten Klasse aus
-
postAppointments(
DateTime from, DateTime to, {String title = "", String place = "", String description = "", String owner = "", ISODuration? remindBefore, DateTime? remindAt, bool wholeDay = false, bool group = false, List< String> ? attendeesUserNames, List<String> ? attendeesAddresses, List<String> ? attendeesEmails, String notificationComment = "", bool notifyAllAttendees = false, bool isSerial = false, bool public = false, bool extern = false, int? type, int? occupancy, String rrule = ""}) → Future<RestApiResponse> - Erstellt einen neuen Termin im Kalender
-
postAppointmentsInvitation(
String id, String action, bool deleteAppointment) → Future< RestApiResponse> - This request allows to reply to appointment invitation
-
postAppointmentsNextFreeDate(
DateTime from, DateTime to, DateTime searchArea, List< String> users) → Future<RestApiResponse> - This request allows to find next free date with given duration
-
postExecuteInterfaceMacro(
String macroName, {Map< String, dynamic> ? body}) → Future<Response> - Führt ein Schnittstellenmakro auf dem Server aus
-
postFolders(
String folderName, String parentFolder, {RestApiDOCUframeFolderType parentFolderSourceType = RestApiDOCUframeFolderType.path}) → Future< RestApiResponse> - Erstellt einen Unterordner
-
postLicenseRelease(
List< String> appnames, String sessionId) → Future<RestApiResponse> - Gibt Lizenzen für Anwendungen frei
-
postMail(
{String uuid = "", String from = "-", List< String> ? to, List<String> ? cc, List<String> ? bcc, String name = "-", String description = "-", String subject = "-", String htmlContent = "-", String plainContent = "-", String template = "", Map<String, dynamic> ? templateData, List<Map< ? attachments, int priorityValue = 3, String priorityText = "normal", bool acknowledgementRequired = false, bool keepCalendar = false, DateTime? startTime, String action = "", String actions = "", String serialization = "", bool assignAddress = false, bool assignProject = false, bool assignProduct = false, bool assignContact = false, bool sendAssignReceiver = false, bool assignAction = false}) → Future<String, dynamic> >RestApiResponse> - Erstellt eine neue E-Mail als Entwurf
-
postMailForward(
String sourceMailOid, {String uuid = "", String oid = "", String from = "-", List< String> ? to, List<String> ? cc, List<String> ? bcc, String name = "-", String description = "-", String subject = "-", String htmlContent = "-", String plainContent = "-", String template = "", Map<String, dynamic> ? templateData, List<Map< ? attachments, int priorityValue = 3, String priorityText = "normal", bool acknowledgementRequired = false, bool keepCalendar = false, DateTime? startTime, String action = "", String actions = "", String serialization = "", bool assignAddress = false, bool assignProject = false, bool assignProduct = false, bool assignContact = false, bool sendAssignReceiver = false, bool assignAction = false}) → Future<String, dynamic> >RestApiResponse> - not implemented in df-restapi
-
postMailReply(
String sourceMailOid, {String uuid = "", String oid = "", String from = "-", String to = "-", String cc = "-", String bcc = "-", String name = "-", String description = "-", String subject = "-", String htmlContent = "-", String plainContent = "-", String template = "", Map< String, dynamic> ? templateData, List<Map< ? attachments, int priorityValue = 3, String priorityText = "normal", bool acknowledgementRequired = false, bool keepCalendar = false, DateTime? startTime, String action = "", String actions = "", String serialization = "", bool assignAddress = false, bool assignProject = false, bool assignProduct = false, bool assignContact = false, bool sendAssignReceiver = false, bool assignAction = false}) → Future<String, dynamic> >RestApiResponse> - not implemented in df-restapi
-
postMailReplyAll(
String sourceMailOid, {String uuid = "", String oid = "", String from = "-", String to = "-", String cc = "-", String bcc = "-", String name = "-", String description = "-", String subject = "-", String htmlContent = "-", String plainContent = "-", String template = "", Map< String, dynamic> ? templateData, List<Map< ? attachments, int priorityValue = 3, String priorityText = "normal", bool acknowledgementRequired = false, bool keepCalendar = false, DateTime? startTime, String action = "", String actions = "", String serialization = "", bool assignAddress = false, bool assignProject = false, bool assignProduct = false, bool assignContact = false, bool sendAssignReceiver = false, bool assignAction = false}) → Future<String, dynamic> >RestApiResponse> - not implemented in df-restapi
-
postMailSend(
{String uuid = "", String oid = "", String from = "-", List< String> ? to, List<String> ? cc, List<String> ? bcc, String name = "-", String description = "-", String subject = "-", String htmlContent = "-", String plainContent = "-", String template = "", Map<String, dynamic> ? templateData, List<Map< ? attachments, int priorityValue = 3, String priorityText = "normal", bool convertImageDataSrcToFileSrc = false, bool acknowledgementRequired = false, bool keepCalendar = false, bool sendAssignReceiver = false, DateTime? startTime, String action = "", String actions = ""}) → Future<String, dynamic> >RestApiResponse> - This request allows to update existing email and send it (when body does not contain any OID a new mail is beeing created)
-
postMessage(
List< String> toUsers, String text, {String name = "", String description = "", bool addToIncomingFolder = true, String originalOid = "", String uuid = "", String serialization = "", String rightsControlKey = "", String actions = ""}) → Future<RestApiResponse> - Erstellt eine Nachricht als Entwurf
-
postMessageSend(
List< String> toUsers, String text, {String name = "", String description = "", bool addToIncomingFolder = true, String originalOid = "", String uuid = "", String serialization = "", String rightsControlKey = "", String actions = ""}) → Future<RestApiResponse> - Erstellt und sendet eine Nachricht direkt
-
postObject(
String className, String body, {int storeMode = 0, String serialization = "", String actions = "", String rightsControlKey = ""}) → Future< RestApiResponse> - Erstellt ein neues Objekt in der Datenbank
-
postPrintMacrosExecute(
String text, {String addressOid = "", String addressNrOid = "", String contactPersonOid = "", String incidentOid = "", String objectOid = ""}) → Future< RestApiResponse> - Führt Druck-Makros aus und ersetzt Platzhalter mit Objektdaten
-
postPZEClockIn(
{String? employeeoid, String? key}) → Future< RestApiResponse> - Startet die Zeiterfassung (Einstempeln) für einen Mitarbeiter
-
postPZEClockOut(
{String? employeeoid}) → Future< RestApiResponse> - Beendet die Zeiterfassung (Ausstempeln) für einen Mitarbeiter
-
postUserSettings(
String key, Map< String, dynamic> data) → Future<RestApiResponse> - Speichert Benutzereinstellungen auf dem Server
-
putDocsHistory(
List< String> ids, {String action = "add", String className = ""}) → Future<RestApiResponse> - Verwaltet die Objekthistorie des Benutzers
-
putDocsNotNew(
List< String> ids) → Future<RestApiResponse> - Markiert Dokumente als nicht mehr neu
-
putDocsRead(
List< String> ids, {bool read = true}) → Future<RestApiResponse> - Markiert Dokumente als gelesen oder ungelesen
-
refresh2FASecret(
String appname, String token) → Future< RestApiResponse> - Erneuert ein bestehendes 2FA-Secret
-
saveMailAttachmentsToDatabase(
String mailOid, {bool saveAll = false, bool extractSingularZipFile = false, List< int> indices = const []}) → Future<RestApiResponse> -
setObjectSecurity(
String oid, Map< String, int> userObjectSecurity, {bool replace = false}) → Future<RestApiResponse> - Setzt die Objekt-Sicherheitseinstellungen für ein Dokument/Objekt
-
setPassword(
String password) → void - Setzt das Passwort für die Authentifizierung
-
toString(
) → String -
A string representation of this object.
inherited
-
uploadFile(
RestApiUploadFile file, {String replaceOID = "", bool patch = true, bool fetchToObject = true}) → Future< RestApiResponse> - Lädt eine Datei auf den Server hoch
-
uploadFileWithController(
RestApiUploadFile file, {String replaceOID = "", bool patch = true, bool fetchToObject = true, dynamic out}) → Future< RestAPIFileUploadController> - Lädt eine Datei mit Upload-Controller hoch
-
validate2FASecret(
String appname, String token) → Future< RestApiResponse> - Validiert ein 2FA-Token für eine Anwendung
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
checkServiceWithUri(
Uri requestUri) → Future< RestApiCheckServiceResponse> - Überprüft den Webservice über '/CheckService' mit einer URI