Package de.xima.fc.api.entity
Class ProjektAPI
API class for manipulation of
Projekt
entities.- Author:
- XIMA MEDIA GmbH
-
Field Summary
Fields inherited from class de.xima.fc.api.entity.AEntityAPI
entityClass
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddProjektRessource
(UserContext uc, Projekt projekt, ProjektRessource ressource) copy
(UserContext uc, Projekt projekt, long id, long formVersionId, long workflowVersionId) getAccessGroups
(UserContext uc, Projekt project) getAllByClient
(UserContext uc, Mandant mandant, boolean includeTemplates) getAllByClient
(UserContext uc, Mandant mandant, String scope, boolean includeTemplates) getAllByEditorUser
(UserContext uc, Benutzer editor, Mandant client) Deprecated.getAllByEditorUser
(UserContext uc, Benutzer editor, Mandant client, String projectScope) Deprecated.getAllByMandant
(UserContext uc, Mandant mandant) Deprecated.getAllByMandantAndStatus
(UserContext uc, Mandant mandant, Boolean isOnline) Method for determining all projects of a client and its online status.getAllTemplatesByClient
(UserContext uc, Mandant mandant) getAllTemplatesByClient
(UserContext uc, Mandant mandant, String scope) getByName
(UserContext uc, long mandantId, String name) Method for determining aProjekt
by name.getByUUID
(UserContext uc, Mandant client, String uuid) getByUUID
(UserContext uc, Mandant client, UUID uuid) getCurrentFormVersion
(UserContext uc, Projekt projekt, FrontendServer fs) Method for determining the current version of a project.getCustomAttributes
(UserContext uc, Projekt project) getEditorGruppen
(UserContext uc, long projektId) Method for determining theBenutzerGruppe
who are authorized to edit the project.getInitializedById
(UserContext uc, Long projectId) importProjekt
(UserContext uc, Mandant mandant, byte[] bytes, String name, String description, String title) Method for importing a project for a client.boolean
isActivationAllowed
(UserContext uc, Projekt projekt) isEditingAllowed
(UserContext uc, Projekt projekt, Benutzer ben) Deprecated.boolean
isFsAllowed
(UserContext uc, Projekt project, FrontendServer fs) Method for testing whether the project may be called via the frontend server.isZugriffsberechtigt
(UserContext uc, Projekt projekt, Benutzer benutzer) Deprecated.boolean
isZugriffsbeschraenkt
(UserContext uc, Projekt projekt) Method for determining if aProjekt
is access limited.update
(UserContext uc, Projekt entity) Method for updating a entity.Projekt[]
update
(UserContext uc, Projekt[] entities) Method for updating multiple entities.Methods inherited from class de.xima.fc.api.entity.AEntityAPI
create, create, delete, delete, deleteAllBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, resultTotalCount
Methods inherited from class de.xima.fc.api.ASubAPI
getHandlerProvider
-
Constructor Details
-
ProjektAPI
public ProjektAPI()
-
-
Method Details
-
getByName
Method for determining aProjekt
by name.- Parameters:
uc
-UserContext
the user context in which the action is to be performed.mandantId
- ID of the client for which the project is to be determined.name
-String
the name of the searchedProjekt
s.- Returns:
Projekt
which was found.- Since:
- 2.4.3
-
getEditorGruppen
Method for determining theBenutzerGruppe
who are authorized to edit the project.- Parameters:
uc
-UserContext
the user context in which the action is to be performed.projektId
- ID of the project for which the project is to be determined.- Returns:
Projekt
which was found.- Since:
- 2.4.3
-
getAccessGroups
-
getCurrentFormVersion
Method for determining the current version of a project.- Parameters:
uc
-UserContext
the user context in which the action is to be performed.projekt
-Projekt
whoseFormVersion
is to be determined.fs
-FrontendServer
the frontend server that wants to get the data.- Returns:
- the currend activated
FormVersion
of theProjekt
s. - Since:
- 2.4.3
-
isZugriffsberechtigt
Deprecated.Method for determining if a user is allowed to access a project.- Parameters:
uc
-UserContext
the user context in which the action is to be performed.projekt
-Projekt
against which the access authorization is checked.benutzer
-Benutzer
whose access authorization is being checked.- Returns:
true
ifBenutzer
to theProjekt
allowed to access.- Since:
- 2.4.3
-
isEditingAllowed
Deprecated.- Parameters:
uc
- Current user context.projekt
- Project for which to check if the user may edit it.ben
- User to check.- Returns:
- Whether the user groups of the user allow editing the given form (project). Note that there may be other restrictions from the user's role etc that apply.
-
isZugriffsbeschraenkt
Method for determining if aProjekt
is access limited.- Parameters:
uc
-UserContext
the user context in which the action is to be performed.projekt
- which should be tested.- Returns:
true
if aProjekt
is access limited- Since:
- 2.4.3
-
getInitializedById
-
getAllByClient
-
getAllByClient
public List<Projekt> getAllByClient(UserContext uc, Mandant mandant, String scope, boolean includeTemplates) -
getAllTemplatesByClient
-
getAllTemplatesByClient
-
getAllByMandantAndStatus
Method for determining all projects of a client and its online status.- Parameters:
uc
-UserContext
the user context in which the action is to be performed.mandant
- whoseProjekt
is to be determined.isOnline
-true
if only released projects should be displayed.- Returns:
List
withProjekt
s- Since:
- 2.4.3
-
addProjektRessource
-
importProjekt
public Projekt importProjekt(UserContext uc, Mandant mandant, byte[] bytes, String name, String description, String title) throws Exception Method for importing a project for a client.- Parameters:
uc
-UserContext
the user context in which the action is to be performed.mandant
-Mandant
which the project is associated.bytes
- of the project archive.name
- Project name, if different from the name specified in the archive (otherwisenull
).description
- Project description, if different from the description given in the archive (otherwisenull
).title
- Project title, if different from the title in the archive (otherwisenull
).- Returns:
- the imported
Projekt
or null if the import was not successful. - Throws:
Exception
- If a error occurs when creating.- Since:
- 2.4.3
-
isActivationAllowed
-
isFsAllowed
Method for testing whether the project may be called via the frontend server.- Parameters:
uc
-UserContext
the user context in which the action is to be performed.project
-Projekt
whose is to be checked.fs
-FrontendServer
which is to test.- Returns:
Boolean
true
if the project is allowed to load on theFrontendServer
, otherwise false.
-
update
Description copied from class:AEntityAPI
Method for updating a entity.- Overrides:
update
in classAEntityAPI<Projekt>
- Parameters:
uc
-UserContext
the user context in which the action is to be performed.entity
- the entity to be update.- Returns:
- The updated entity.
-
update
Description copied from class:AEntityAPI
Method for updating multiple entities.- Overrides:
update
in classAEntityAPI<Projekt>
- Parameters:
uc
-UserContext
the user context in which the action is to be performed.entities
- aArray
of the entities to be updated.- Returns:
Array
with the updated entities.
-
copy
public Projekt copy(UserContext uc, Projekt projekt, long id, long formVersionId, long workflowVersionId) throws Exception - Throws:
Exception
-
getByUUID
-
getByUUID
-
getCustomAttributes
-
getAllByMandant
Deprecated.Method for determining all project of a client.- Parameters:
uc
-UserContext
the user context in which the action is to be performed.mandant
- whoseProjekt
e is to be determined.- Returns:
List
withProjekt
s
-
getAllByEditorUser
@Deprecated public List<Projekt> getAllByEditorUser(UserContext uc, Benutzer editor, Mandant client) Deprecated.Gets all projects where the given user is editor of- Parameters:
uc
-UserContext
editor
-Benutzer
eidtor of the projectsclient
-Mandant
client of the projects- Returns:
List
ofProjekt
s- Since:
- 6.0.0
-
getAllByEditorUser
@Deprecated public List<Projekt> getAllByEditorUser(UserContext uc, Benutzer editor, Mandant client, String projectScope) Deprecated.
-
getAllByClient(UserContext, Mandant, boolean)