Package de.xima.fc.api.entity
Class ProjektAPI
- java.lang.Object
-
- de.xima.fc.api.ASubAPI
-
- de.xima.fc.api.entity.AEntityAPI<Projekt>
-
- de.xima.fc.api.entity.ProjektAPI
-
public class ProjektAPI extends AEntityAPI<Projekt>
API class for manipulation ofProjektentities.- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
-
Fields inherited from class de.xima.fc.api.entity.AEntityAPI
entityClass
-
-
Constructor Summary
Constructors Constructor Description ProjektAPI()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ProjektaddProjektRessource(UserContext uc, Projekt projekt, ProjektRessource ressource)Projektcopy(UserContext uc, Projekt projekt, long id, long formVersionId, long workflowVersionId)List<BenutzerGruppe>getAccessGroups(UserContext uc, Projekt project)List<Projekt>getAllByClient(UserContext uc, Mandant mandant, boolean includeTemplates)List<Projekt>getAllByClient(UserContext uc, Mandant mandant, String scope, boolean includeTemplates)List<Projekt>getAllByEditorUser(UserContext uc, Benutzer editor, Mandant client)Deprecated.List<Projekt>getAllByEditorUser(UserContext uc, Benutzer editor, Mandant client, String projectScope)Deprecated.List<Projekt>getAllByMandant(UserContext uc, Mandant mandant)Deprecated.List<Projekt>getAllByMandantAndStatus(UserContext uc, Mandant mandant, Boolean isOnline)Method for determining all projects of a client and its online status.PagedResult<Projekt>getAllByUserPortal(UserContext uc, UserPortal portal, int page, int pageSize)List<Projekt>getAllTemplatesByClient(UserContext uc, Mandant mandant)List<Projekt>getAllTemplatesByClient(UserContext uc, Mandant mandant, String scope)ProjektgetByName(UserContext uc, long mandantId, String name)Method for determining aProjektby name.ProjektgetByUUID(UserContext uc, Mandant client, String uuid)Gets a project by its UUID.ProjektgetByUUID(UserContext uc, Mandant client, UUID uuid)Gets a project by its UUID.ProjektgetByUUID(UserContext uc, UUID clientUuid, UUID uuid)Gets a project by its UUID.FormVersiongetCurrentFormVersion(UserContext uc, Projekt projekt, FrontendServer fs)Method for determining the current version of a project.Map<String,String>getCustomAttributes(UserContext uc, Projekt project)List<BenutzerGruppe>getEditorGruppen(UserContext uc, long projektId)Method for determining theBenutzerGruppewho are authorized to edit the project.ProjektgetInitializedById(UserContext uc, Long projectId)ProjektimportProjekt(UserContext uc, Mandant mandant, byte[] bytes, String name, String description, String title)Method for importing a project for a client.booleanisActivationAllowed(UserContext uc, Projekt projekt)BooleanisEditingAllowed(UserContext uc, Projekt projekt, Benutzer ben)Deprecated.booleanisFsAllowed(UserContext uc, Projekt project, FrontendServer fs)Method for testing whether the project may be called via the frontend server.BooleanisZugriffsberechtigt(UserContext uc, Projekt projekt, Benutzer benutzer)Deprecated.booleanisZugriffsbeschraenkt(UserContext uc, Projekt projekt)Method for determining if aProjektis access limited.Projektupdate(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, getPagedResult, getSingleAttributes, getSingleAttributes, resultTotalCount, resultTotalCount
-
Methods inherited from class de.xima.fc.api.ASubAPI
getHandlerProvider
-
-
-
-
Method Detail
-
getByName
public Projekt getByName(UserContext uc, long mandantId, String name)
Method for determining aProjektby name.- Parameters:
uc-UserContextthe user context in which the action is to be performed.mandantId- ID of the client for which the project is to be determined.name-Stringthe name of the searchedProjekts.- Returns:
Projektwhich was found.- Since:
- 2.4.3
-
getEditorGruppen
public List<BenutzerGruppe> getEditorGruppen(UserContext uc, long projektId)
Method for determining theBenutzerGruppewho are authorized to edit the project.- Parameters:
uc-UserContextthe user context in which the action is to be performed.projektId- ID of the project for which the project is to be determined.- Returns:
Projektwhich was found.- Since:
- 2.4.3
-
getAccessGroups
public List<BenutzerGruppe> getAccessGroups(UserContext uc, Projekt project)
-
getCurrentFormVersion
public FormVersion getCurrentFormVersion(UserContext uc, Projekt projekt, FrontendServer fs)
Method for determining the current version of a project.- Parameters:
uc-UserContextthe user context in which the action is to be performed.projekt-ProjektwhoseFormVersionis to be determined.fs-FrontendServerthe frontend server that wants to get the data.- Returns:
- the currend activated
FormVersionof theProjekts. - Since:
- 2.4.3
-
isZugriffsberechtigt
@Deprecated public Boolean isZugriffsberechtigt(UserContext uc, Projekt projekt, Benutzer benutzer)
Deprecated.Method for determining if a user is allowed to access a project.- Parameters:
uc-UserContextthe user context in which the action is to be performed.projekt-Projektagainst which the access authorization is checked.benutzer-Benutzerwhose access authorization is being checked.- Returns:
trueifBenutzerto theProjektallowed to access.- Since:
- 2.4.3
-
isEditingAllowed
@Deprecated public Boolean isEditingAllowed(UserContext uc, Projekt projekt, Benutzer ben)
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
public boolean isZugriffsbeschraenkt(UserContext uc, Projekt projekt)
Method for determining if aProjektis access limited.- Parameters:
uc-UserContextthe user context in which the action is to be performed.projekt- which should be tested.- Returns:
trueif aProjektis access limited- Since:
- 2.4.3
-
getInitializedById
public Projekt getInitializedById(UserContext uc, Long projectId)
-
getAllByClient
public List<Projekt> getAllByClient(UserContext uc, Mandant mandant, boolean includeTemplates)
-
getAllByClient
public List<Projekt> getAllByClient(UserContext uc, Mandant mandant, String scope, boolean includeTemplates)
-
getAllTemplatesByClient
public List<Projekt> getAllTemplatesByClient(UserContext uc, Mandant mandant)
-
getAllTemplatesByClient
public List<Projekt> getAllTemplatesByClient(UserContext uc, Mandant mandant, String scope)
-
getAllByMandantAndStatus
public List<Projekt> getAllByMandantAndStatus(UserContext uc, Mandant mandant, Boolean isOnline)
Method for determining all projects of a client and its online status.- Parameters:
uc-UserContextthe user context in which the action is to be performed.mandant- whoseProjektis to be determined.isOnline-trueif only released projects should be displayed.- Returns:
ListwithProjekts- Since:
- 2.4.3
-
getAllByUserPortal
public PagedResult<Projekt> getAllByUserPortal(UserContext uc, UserPortal portal, int page, int pageSize)
- Since:
- 8.2.0
- See Also:
IProjektHandler.getAllByUserPortal(UserContext, UserPortal, int, int)
-
addProjektRessource
public Projekt addProjektRessource(UserContext uc, Projekt projekt, ProjektRessource ressource)
-
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-UserContextthe user context in which the action is to be performed.mandant-Mandantwhich 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
Projektor null if the import was not successful. - Throws:
Exception- If a error occurs when creating.- Since:
- 2.4.3
-
isActivationAllowed
public boolean isActivationAllowed(UserContext uc, Projekt projekt)
-
isFsAllowed
public boolean isFsAllowed(UserContext uc, Projekt project, FrontendServer fs)
Method for testing whether the project may be called via the frontend server.- Parameters:
uc-UserContextthe user context in which the action is to be performed.project-Projektwhose is to be checked.fs-FrontendServerwhich is to test.- Returns:
Booleantrueif the project is allowed to load on theFrontendServer, otherwise false.
-
update
public Projekt update(UserContext uc, Projekt entity)
Description copied from class:AEntityAPIMethod for updating a entity.- Overrides:
updatein classAEntityAPI<Projekt>- Parameters:
uc-UserContextthe user context in which the action is to be performed.entity- the entity to be update.- Returns:
- The updated entity.
-
update
public Projekt[] update(UserContext uc, Projekt[] entities)
Description copied from class:AEntityAPIMethod for updating multiple entities.- Overrides:
updatein classAEntityAPI<Projekt>- Parameters:
uc-UserContextthe user context in which the action is to be performed.entities- aArrayof the entities to be updated.- Returns:
Arraywith the updated entities.
-
copy
public Projekt copy(UserContext uc, Projekt projekt, long id, long formVersionId, long workflowVersionId) throws Exception
- Throws:
Exception
-
getByUUID
public Projekt getByUUID(UserContext uc, Mandant client, String uuid)
Gets a project by its UUID. The project must owned by the given client.- Parameters:
uc- User context of the user who wishes to get the project.client- The client who owns the project.uuid- UUID of the project.- Returns:
- The project or null if it does not exist.
-
getByUUID
public Projekt getByUUID(UserContext uc, Mandant client, UUID uuid)
Gets a project by its UUID. The project must owned by the given client.- Parameters:
uc- User context of the user who wishes to get the project.client- The client who owns the project.uuid- UUID of the project.- Returns:
- The project or null if it does not exist.
-
getByUUID
public Projekt getByUUID(UserContext uc, UUID clientUuid, UUID uuid)
Gets a project by its UUID. The project must owned by the given client.- Parameters:
uc- User context of the user who wishes to get the project.clientUuid- UUID of the client.uuid- UUID of the project.- Returns:
- The project or null if it does not exist.
- Since:
- 8.3.0
-
getCustomAttributes
public Map<String,String> getCustomAttributes(UserContext uc, Projekt project)
-
getAllByMandant
@Deprecated public List<Projekt> getAllByMandant(UserContext uc, Mandant mandant)
Deprecated.Method for determining all project of a client.- Parameters:
uc-UserContextthe user context in which the action is to be performed.mandant- whoseProjekte is to be determined.- Returns:
ListwithProjekts
-
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-UserContexteditor-Benutzereidtor of the projectsclient-Mandantclient of the projects- Returns:
ListofProjekts- Since:
- 6.0.0
-
getAllByEditorUser
@Deprecated public List<Projekt> getAllByEditorUser(UserContext uc, Benutzer editor, Mandant client, String projectScope)
Deprecated.
-
-