Package de.xima.fc.handler.entity
Class ProjektHandler
- java.lang.Object
-
- de.xima.fc.handler.AMSApiHandler
-
- de.xima.fc.handler.entity.GenericHandler
-
- de.xima.fc.handler.entity.ProjektHandler
-
- All Implemented Interfaces:
IAPIHandler
,IGenericHandler
,IProjektHandler
,Serializable
public class ProjektHandler extends GenericHandler implements IProjektHandler
The Class ProjektHandler.- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.xima.fc.handler.entity.GenericHandler
LOG
-
-
Constructor Summary
Constructors Constructor Description ProjektHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Projekt
addProjektRessource(UserContext uc, long projektId, long ressourceId)
Projekt
copy(UserContext uc, Projekt projekt, long sourceProjectId, 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, String projectScope)
Deprecated.List<Projekt>
getAllByMandant(UserContext uc, Mandant mandant)
Deprecated.PagedResult<Projekt>
getAllByUserPortal(UserContext uc, UserPortal portal, int page, int pageSize)
Returns all projects enabled for the given user portal.List<Projekt>
getAllTemplatesByClient(UserContext uc, Mandant client)
List<Projekt>
getAllTemplatesByClient(UserContext uc, Mandant client, String scope)
Projekt
getByUUID(UserContext uc, Mandant client, String uuid)
Gets a project by its UUID.Projekt
getByUUID(UserContext uc, Mandant client, UUID uuid)
Gets a project by its UUID.Projekt
getByUUID(UserContext uc, UUID clientUuid, UUID uuid)
Gets a project by its UUID.FormVersion
getCurrentFormVersion(UserContext uc, Projekt projekt, FrontendServer fs)
Gets the current form version.Map<String,String>
getCustomAttributes(UserContext uc, Projekt project)
Projekt
getInitializedById(UserContext uc, Long projectId)
Reads the project by the given ID and initializes it.Projekt
importProjekt(UserContext uc, Mandant mandant, byte[] bytes, String name, String beschreibung, String title)
boolean
isActivationAllowed(UserContext uc, Projekt projekt)
Boolean
isEditingAllowed(UserContext uc, Projekt projekt, Benutzer ben)
Deprecated.boolean
isFsAllowed(UserContext uc, Projekt project, FrontendServer fs)
Checks on whether the project can be accessed via the frontend server.Boolean
isZugriffsberechtigt(UserContext uc, Projekt projekt, Benutzer ben)
Deprecated.Boolean
isZugriffsbeschraenkt(UserContext uc, Projekt projekt)
-
Methods inherited from class de.xima.fc.handler.entity.GenericHandler
create, create, delete, delete, deleteBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, serializableList, update, update
-
Methods inherited from class de.xima.fc.handler.AMSApiHandler
getName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.fc.com.interfaces.IAPIHandler
getName
-
Methods inherited from interface de.xima.fc.handler.interfaces.entity.IGenericHandler
create, create, delete, delete, deleteBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, update, update
-
-
-
-
Method Detail
-
getCurrentFormVersion
public FormVersion getCurrentFormVersion(UserContext uc, Projekt projekt, FrontendServer fs)
Description copied from interface:IProjektHandler
Gets the current form version.- Specified by:
getCurrentFormVersion
in interfaceIProjektHandler
- Parameters:
uc
- the ucprojekt
- the projektfs
- theFrontendServer
- Returns:
- the current form version
-
getAccessGroups
public List<BenutzerGruppe> getAccessGroups(UserContext uc, Projekt project)
- Specified by:
getAccessGroups
in interfaceIProjektHandler
-
isEditingAllowed
@Deprecated public Boolean isEditingAllowed(UserContext uc, Projekt projekt, Benutzer ben)
Deprecated.- Specified by:
isEditingAllowed
in interfaceIProjektHandler
- 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)
- Specified by:
isZugriffsbeschraenkt
in interfaceIProjektHandler
-
isZugriffsberechtigt
@Deprecated public Boolean isZugriffsberechtigt(UserContext uc, Projekt projekt, Benutzer ben)
Deprecated.- Specified by:
isZugriffsberechtigt
in interfaceIProjektHandler
-
importProjekt
public Projekt importProjekt(UserContext uc, Mandant mandant, byte[] bytes, String name, String beschreibung, String title) throws Exception
- Specified by:
importProjekt
in interfaceIProjektHandler
- Throws:
Exception
-
addProjektRessource
public Projekt addProjektRessource(UserContext uc, long projektId, long ressourceId)
- Specified by:
addProjektRessource
in interfaceIProjektHandler
-
getInitializedById
public Projekt getInitializedById(UserContext uc, Long projectId)
Description copied from interface:IProjektHandler
Reads the project by the given ID and initializes it.- Specified by:
getInitializedById
in interfaceIProjektHandler
- Parameters:
uc
- UserContext to use for DB transactionprojectId
- ID of the project- Returns:
- the initialized project
-
getAllByClient
public List<Projekt> getAllByClient(UserContext uc, Mandant mandant, boolean includeTemplates)
- Specified by:
getAllByClient
in interfaceIProjektHandler
-
getAllByClient
public List<Projekt> getAllByClient(UserContext uc, Mandant mandant, String scope, boolean includeTemplates)
- Specified by:
getAllByClient
in interfaceIProjektHandler
-
getAllTemplatesByClient
public List<Projekt> getAllTemplatesByClient(UserContext uc, Mandant client)
- Specified by:
getAllTemplatesByClient
in interfaceIProjektHandler
-
getAllTemplatesByClient
public List<Projekt> getAllTemplatesByClient(UserContext uc, Mandant client, String scope)
- Specified by:
getAllTemplatesByClient
in interfaceIProjektHandler
-
getAllByEditorUser
@Deprecated public List<Projekt> getAllByEditorUser(UserContext uc, Benutzer editor, Mandant client, String projectScope)
Deprecated.Description copied from interface:IProjektHandler
Gets all projects where the given user is editor of- Specified by:
getAllByEditorUser
in interfaceIProjektHandler
- Parameters:
uc
-UserContext
editor
- Editor user of the projectsclient
-Mandant
client of the projectsprojectScope
- the scope of the projects to load- Returns:
List
ofProjekt
s
-
copy
public Projekt copy(UserContext uc, Projekt projekt, long sourceProjectId, long formVersionId, long workflowVersionId) throws Exception
- Specified by:
copy
in interfaceIProjektHandler
- Throws:
Exception
-
isActivationAllowed
public boolean isActivationAllowed(UserContext uc, Projekt projekt)
- Specified by:
isActivationAllowed
in interfaceIProjektHandler
-
isFsAllowed
public boolean isFsAllowed(UserContext uc, Projekt project, FrontendServer fs)
Description copied from interface:IProjektHandler
Checks on whether the project can be accessed via the frontend server.- Specified by:
isFsAllowed
in interfaceIProjektHandler
- Parameters:
uc
- theUserContext
to useproject
- the projectfs
- the frontendserver- Returns:
Boolean
of theProjekt
is allowed on thisFrontendServer
-
getByUUID
public Projekt getByUUID(UserContext uc, Mandant client, String uuid)
Description copied from interface:IProjektHandler
Gets a project by its UUID. The project must owned by the given client.- Specified by:
getByUUID
in interfaceIProjektHandler
- 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)
Description copied from interface:IProjektHandler
Gets a project by its UUID. The project must owned by the given client.- Specified by:
getByUUID
in interfaceIProjektHandler
- 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.
-
getByUUID
public Projekt getByUUID(UserContext uc, Mandant client, UUID uuid)
Description copied from interface:IProjektHandler
Gets a project by its UUID. The project must owned by the given client.- Specified by:
getByUUID
in interfaceIProjektHandler
- 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.
-
getCustomAttributes
public Map<String,String> getCustomAttributes(UserContext uc, Projekt project)
- Specified by:
getCustomAttributes
in interfaceIProjektHandler
-
getAllByMandant
@Deprecated public List<Projekt> getAllByMandant(UserContext uc, Mandant mandant)
Deprecated.- Specified by:
getAllByMandant
in interfaceIProjektHandler
- Parameters:
uc
- theUserContext
to usemandant
- the client- Returns:
List
ofProjekt
s
-
getAllByUserPortal
public PagedResult<Projekt> getAllByUserPortal(UserContext uc, UserPortal portal, int page, int pageSize)
Description copied from interface:IProjektHandler
Returns all projects enabled for the given user portal. Sorted by the name of a project.- Specified by:
getAllByUserPortal
in interfaceIProjektHandler
- Parameters:
uc
- user context for database transactions.portal
- to get the projects for.page
- to get.pageSize
- size of the page to get.- Returns:
- all projects enabled for the given user portal.
-
-