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
The Class ProjektHandler.
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
Fields inherited from class GenericHandler
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddProjektRessource(UserContext uc, long projektId, long ressourceId) copy(UserContext uc, Projekt projekt, long sourceProjectId, long formVersionId, long workflowVersionId) getAccessGroups(UserContext uc, Projekt project) getActiveByUserPortalAndFrontendServer(UserContext uc, UUID userPortalUuid, UUID formUuid, Long frontendServerId) getActiveByUUIDAndFrontendServer(UserContext uc, UUID clientUuid, UUID formUuid, Long frontendServerId) getAllByClient(UserContext uc, Mandant mandant, boolean includeTemplates) getAllByClient(UserContext uc, Mandant mandant, String scope, boolean includeTemplates) getAllByEditorUser(UserContext uc, Benutzer editor, Mandant client, String projectScope) Deprecated.getAllByMandant(UserContext uc, Mandant mandant) Deprecated.getAllByUserPortal(UserContext uc, UserPortal portal, int page, int pageSize) getAllTemplatesByClient(UserContext uc, Mandant client) getAllTemplatesByClient(UserContext uc, Mandant client, String scope) getByUUID(UserContext uc, Mandant client, String uuid) Gets a project by its UUID.getByUUID(UserContext uc, Mandant client, UUID uuid) Gets a project by its UUID.getByUUID(UserContext uc, UUID clientUuid, UUID uuid) Gets a project by its UUID.getCurrentFormVersion(UserContext uc, Projekt projekt, FrontendServer fs) Gets the current form version.getCustomAttributes(UserContext uc, Projekt project) getInitializedById(UserContext uc, Long projectId) Reads the project by the given ID and initializes it.intgetProjectsCount(UserContext uc, ProjectsPageQuery filter) Returns the number of projects for the given page request and filter.getProjectsPage(UserContext uc, PageQuery page, ProjectsPageQuery filter, boolean skipCount) Returns all projects enabled for the given user portal.getUserPortalProjectFile(UserContext uc, UUID portalUuid, UUID clientUuid, UUID projectUuid, UUID fileUuid) Returns the project file with the given file UUID in the context of the user portal with the given UUID.importProjekt(UserContext uc, Mandant mandant, byte[] bytes, String name, String beschreibung, String title) booleanisActivationAllowed(UserContext uc, Projekt projekt) isEditingAllowed(UserContext uc, Projekt projekt, Benutzer ben) Deprecated.booleanisFsAllowed(UserContext uc, Projekt project, FrontendServer fs) Checks on whether the project can be accessed via the frontend server.isZugriffsberechtigt(UserContext uc, Projekt projekt, Benutzer ben) Deprecated.isZugriffsbeschraenkt(UserContext uc, Projekt projekt) Methods inherited from class GenericHandler
create, create, delete, delete, deleteBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, serializableList, update, updateMethods inherited from class AMSApiHandler
getNameMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAPIHandler
getNameMethods inherited from interface IGenericHandler
create, create, delete, delete, deleteBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, update, update
-
Constructor Details
-
ProjektHandler
public ProjektHandler()
-
-
Method Details
-
getCurrentFormVersion
Description copied from interface:IProjektHandlerGets the current form version.- Specified by:
getCurrentFormVersionin interfaceIProjektHandler- Parameters:
uc- the ucprojekt- the projektfs- theFrontendServer- Returns:
- the current form version
-
getAccessGroups
- Specified by:
getAccessGroupsin interfaceIProjektHandler
-
getProjectsPage
public PagedResult<Projekt> getProjectsPage(UserContext uc, PageQuery page, ProjectsPageQuery filter, boolean skipCount) Description copied from interface:IProjektHandlerReturns all projects enabled for the given user portal. Sorted by their display name.- Specified by:
getProjectsPagein interfaceIProjektHandler- Parameters:
uc- user context for database transactions.page- page request defining the page and page size.filter- project page request defining the user portal, filters.skipCount- The number of rows to skip.- Returns:
- all projects enabled for the given user portal.
-
getProjectsCount
Description copied from interface:IProjektHandlerReturns the number of projects for the given page request and filter.- Specified by:
getProjectsCountin interfaceIProjektHandler- Parameters:
uc- user context for database transactions.filter- page request defining the user portal, filters.- Returns:
- the number of projects enabled for the given user portal.
-
getActiveByUserPortalAndFrontendServer
public Projekt getActiveByUserPortalAndFrontendServer(UserContext uc, UUID userPortalUuid, UUID formUuid, Long frontendServerId) - Specified by:
getActiveByUserPortalAndFrontendServerin interfaceIProjektHandler
-
getActiveByUUIDAndFrontendServer
public Projekt getActiveByUUIDAndFrontendServer(UserContext uc, UUID clientUuid, UUID formUuid, Long frontendServerId) - Specified by:
getActiveByUUIDAndFrontendServerin interfaceIProjektHandler
-
isEditingAllowed
Deprecated.- Specified by:
isEditingAllowedin 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
- Specified by:
isZugriffsbeschraenktin interfaceIProjektHandler
-
isZugriffsberechtigt
Deprecated.- Specified by:
isZugriffsberechtigtin interfaceIProjektHandler
-
importProjekt
public Projekt importProjekt(UserContext uc, Mandant mandant, byte[] bytes, String name, String beschreibung, String title) throws Exception - Specified by:
importProjektin interfaceIProjektHandler- Throws:
Exception
-
addProjektRessource
- Specified by:
addProjektRessourcein interfaceIProjektHandler
-
getInitializedById
Description copied from interface:IProjektHandlerReads the project by the given ID and initializes it.- Specified by:
getInitializedByIdin interfaceIProjektHandler- Parameters:
uc- UserContext to use for DB transactionprojectId- ID of the project- Returns:
- the initialized project
-
getUserPortalProjectFile
public ProjectFile getUserPortalProjectFile(UserContext uc, UUID portalUuid, UUID clientUuid, UUID projectUuid, UUID fileUuid) Description copied from interface:IProjektHandlerReturns the project file with the given file UUID in the context of the user portal with the given UUID.- Specified by:
getUserPortalProjectFilein interfaceIProjektHandler- Parameters:
uc- User context for accessing the database.portalUuid- UUID of the user portal (context).clientUuid- UUID of the client (context).projectUuid- UUID of the project.fileUuid- UUID of the project file.- Returns:
- The project file with the given UUID, or
nullif no such project file exists.
-
getAllByClient
- Specified by:
getAllByClientin interfaceIProjektHandler
-
getAllByClient
public List<Projekt> getAllByClient(UserContext uc, Mandant mandant, String scope, boolean includeTemplates) - Specified by:
getAllByClientin interfaceIProjektHandler
-
getAllTemplatesByClient
- Specified by:
getAllTemplatesByClientin interfaceIProjektHandler
-
getAllTemplatesByClient
- Specified by:
getAllTemplatesByClientin interfaceIProjektHandler
-
getAllByEditorUser
@Deprecated public List<Projekt> getAllByEditorUser(UserContext uc, Benutzer editor, Mandant client, String projectScope) Deprecated.Description copied from interface:IProjektHandlerGets all projects where the given user is editor of- Specified by:
getAllByEditorUserin interfaceIProjektHandler- Parameters:
uc-UserContexteditor- Editor user of the projectsclient-Mandantclient of the projectsprojectScope- the scope of the projects to load- Returns:
ListofProjekts
-
copy
public Projekt copy(UserContext uc, Projekt projekt, long sourceProjectId, long formVersionId, long workflowVersionId) throws Exception - Specified by:
copyin interfaceIProjektHandler- Throws:
Exception
-
isActivationAllowed
- Specified by:
isActivationAllowedin interfaceIProjektHandler
-
isFsAllowed
Description copied from interface:IProjektHandlerChecks on whether the project can be accessed via the frontend server.- Specified by:
isFsAllowedin interfaceIProjektHandler- Parameters:
uc- theUserContextto useproject- the projectfs- the frontendserver- Returns:
Booleanof theProjektis allowed on thisFrontendServer
-
getByUUID
Description copied from interface:IProjektHandlerGets a project by its UUID. The project must owned by the given client.- Specified by:
getByUUIDin 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
Description copied from interface:IProjektHandlerGets a project by its UUID. The project must owned by the given client.- Specified by:
getByUUIDin 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
Description copied from interface:IProjektHandlerGets a project by its UUID. The project must owned by the given client.- Specified by:
getByUUIDin 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
- Specified by:
getCustomAttributesin interfaceIProjektHandler
-
getAllByMandant
Deprecated.- Specified by:
getAllByMandantin interfaceIProjektHandler- Parameters:
uc- theUserContextto usemandant- the client- Returns:
ListofProjekts
-
getAllByUserPortal
@Deprecated public PagedResult<Projekt> getAllByUserPortal(UserContext uc, UserPortal portal, int page, int pageSize) Description copied from interface:IProjektHandlerReturns all projects enabled for the given user portal. Sorted by the name of a project.- Specified by:
getAllByUserPortalin 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.
-
getAllByClient(UserContext, Mandant, boolean)