public class ProjektAPI extends AEntityAPI<Projekt>
Projekt
entities.entityClass
Constructor and Description |
---|
ProjektAPI() |
Modifier and Type | Method and Description |
---|---|
Projekt |
addProjektRessource(UserContext uc,
Projekt projekt,
ProjektRessource ressource) |
Projekt |
copy(UserContext uc,
Projekt projekt,
long id,
long fvId) |
List<Projekt> |
getAllByEditorUser(UserContext uc,
Benutzer editor,
Mandant client)
Gets all projects where the given user is editor of
|
List<Projekt> |
getAllByMandant(UserContext uc,
Mandant mandant)
Method for determining all project of a client.
|
List<Projekt> |
getAllByMandantAndStatus(UserContext uc,
Mandant mandant,
Boolean isOnline)
Method for determining all projects of a client and its online status.
|
Projekt |
getByName(UserContext uc,
long mandantId,
String name)
Method for determining a
Projekt by name. |
FormVersion |
getCurrentFormVersion(UserContext uc,
Projekt projekt,
FrontendServer fs)
Method for determining the current version of a project.
|
List<BenutzerGruppe> |
getEditorGruppen(UserContext uc,
long projektId)
Method for determining the
BenutzerGruppe who are authorized to edit the project. |
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) |
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)
Method for determining if a user is allowed to access a project.
|
boolean |
isZugriffsbeschraenkt(UserContext uc,
Projekt projekt)
Method for determining if a
Projekt 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.
|
create, create, delete, delete, deleteAllBy, deleteById, deleteById, getAll, getAllBy, getBy, getById, getById, resultTotalCount
getHandlerProvider
public Projekt getByName(UserContext uc, long mandantId, String name)
Projekt
by name.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 searched Projekt
s.Projekt
which was found.public List<BenutzerGruppe> getEditorGruppen(UserContext uc, long projektId)
BenutzerGruppe
who are authorized to edit the project.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.Projekt
which was found.public FormVersion getCurrentFormVersion(UserContext uc, Projekt projekt, FrontendServer fs)
uc
- UserContext
the user context in which the action is to be performed.projekt
- Projekt
whose FormVersion
is to be determined.fs
- FrontendServer
the frontend server that wants to get the data.FormVersion
of the Projekt
s.public Boolean isZugriffsberechtigt(UserContext uc, Projekt projekt, Benutzer benutzer)
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.true
if Benutzer
to the Projekt
allowed to access.public Boolean isEditingAllowed(UserContext uc, Projekt projekt, Benutzer ben)
uc
- Current user context.projekt
- Project for which to check if the user may edit it.ben
- User to check.public boolean isZugriffsbeschraenkt(UserContext uc, Projekt projekt)
Projekt
is access limited.uc
- UserContext
the user context in which the action is to be performed.projekt
- which should be tested.true
if a Projekt
is access limitedpublic List<Projekt> getAllByMandant(UserContext uc, Mandant mandant)
uc
- UserContext
the user context in which the action is to be performed.mandant
- whose Projekt
e is to be determined.List
with Projekt
spublic List<Projekt> getAllByMandantAndStatus(UserContext uc, Mandant mandant, Boolean isOnline)
uc
- UserContext
the user context in which the action is to be performed.mandant
- whose Projekt
is to be determined.isOnline
- true
if only released projects should be displayed.List
with Projekt
spublic List<Projekt> getAllByEditorUser(UserContext uc, Benutzer editor, Mandant client)
uc
- UserContext
editor
- Benutzer
eidtor of the projectsclient
- Mandant
client of the projectsList
of Projekt
spublic Projekt addProjektRessource(UserContext uc, Projekt projekt, ProjektRessource ressource)
public Projekt importProjekt(UserContext uc, Mandant mandant, byte[] bytes, String name, String description, String title) throws Exception
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 (otherwise null
).description
- Project description, if different from the description given in the archive (otherwise
null
).title
- Project title, if different from the title in the archive (otherwise null
).Projekt
or null if the import was not successful.Exception
- If a error occurs when creating.public boolean isActivationAllowed(UserContext uc, Projekt projekt)
public boolean isFsAllowed(UserContext uc, Projekt project, FrontendServer fs)
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.Boolean
true
if the project is allowed to load on the FrontendServer
,
otherwise false.public Projekt update(UserContext uc, Projekt entity)
AEntityAPI
update
in class AEntityAPI<Projekt>
uc
- UserContext
the user context in which the action is to be performed.entity
- the entity to be update.public Projekt[] update(UserContext uc, Projekt[] entities)
AEntityAPI
update
in class AEntityAPI<Projekt>
uc
- UserContext
the user context in which the action is to be performed.entities
- a Array
of the entities to be updated.Array
with the updated entities.public Projekt copy(UserContext uc, Projekt projekt, long id, long fvId) throws Exception
Exception
Copyright © 2019 XIMA MEDIA GmbH. All rights reserved.