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 ofProjekt
entities.- 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 Projekt
addProjektRessource(UserContext uc, Projekt projekt, ProjektRessource ressource)
Projekt
copy(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.List<Projekt>
getAllTemplatesByClient(UserContext uc, Mandant mandant)
List<Projekt>
getAllTemplatesByClient(UserContext uc, Mandant mandant, String scope)
Projekt
getByName(UserContext uc, long mandantId, String name)
Method for determining aProjekt
by name.Projekt
getByUUID(UserContext uc, Mandant client, String uuid)
Projekt
getByUUID(UserContext uc, Mandant client, UUID uuid)
FormVersion
getCurrentFormVersion(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 theBenutzerGruppe
who are authorized to edit the project.Projekt
getInitializedById(UserContext uc, Long projectId)
Projekt
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)
Boolean
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.Boolean
isZugriffsberechtigt(UserContext uc, Projekt projekt, Benutzer benutzer)
Deprecated.boolean
isZugriffsbeschraenkt(UserContext uc, Projekt projekt)
Method for determining if aProjekt
is access limited.Projekt
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
-
-
-
-
Method Detail
-
getByName
public Projekt getByName(UserContext uc, long mandantId, String name)
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
public List<BenutzerGruppe> getEditorGruppen(UserContext uc, long projektId)
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
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
-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 public Boolean isZugriffsberechtigt(UserContext uc, Projekt projekt, Benutzer benutzer)
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 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 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
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
-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
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
-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
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
-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
public Projekt update(UserContext uc, Projekt entity)
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
public Projekt[] update(UserContext uc, Projekt[] entities)
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
public Projekt getByUUID(UserContext uc, Mandant client, String uuid)
-
getByUUID
public Projekt getByUUID(UserContext uc, Mandant client, UUID uuid)
-
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
-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.
-
-