Class ProjektAPI


  • public class ProjektAPI
    extends AEntityAPI<Projekt>
    API class for manipulation of Projekt entities.
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • ProjektAPI

        public ProjektAPI()
    • Method Detail

      • getByName

        public Projekt getByName​(UserContext uc,
                                 long mandantId,
                                 String name)
        Method for determining a Projekt 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 searched Projekts.
        Returns:
        Projekt which was found.
        Since:
        2.4.3
      • getEditorGruppen

        public List<BenutzerGruppe> getEditorGruppen​(UserContext uc,
                                                     long projektId)
        Method for determining the BenutzerGruppe 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
      • 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 if Benutzer to the Projekt allowed to access.
        Since:
        2.4.3
      • isEditingAllowed

        public Boolean isEditingAllowed​(UserContext uc,
                                        Projekt projekt,
                                        Benutzer ben)
        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 a Projekt 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 a Projekt is access limited
        Since:
        2.4.3
      • 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 - whose Projekt is to be determined.
        isOnline - true if only released projects should be displayed.
        Returns:
        List with Projekts
        Since:
        2.4.3
      • 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 (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).
        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 the FrontendServer, otherwise false.