Class ProjectConstraint

java.lang.Object
de.espirit.firstspirit.base.store.templatestore.gom.ProjectConstraint
All Implemented Interfaces:
Serializable

public class ProjectConstraint extends Object implements Serializable
Constraint representation for a project
Since:
5.0
See Also:
  • Method Details

    • with

      public static ProjectConstraint with(@NotNull @NotNull ProjectConstraint.Type type, @NotNull @NotNull String name, @Nullable @Nullable String uploadFolder)
      Creates a new instance with the given parameters
      Parameters:
      type - type of the constraint
      name - symbolic name of the project
      uploadFolder - name of the folder to be used for uploads
      Returns:
      a new constraint instance
      Since:
      5.0
    • with

      public static ProjectConstraint with(@NotNull @NotNull ProjectConstraint.Type type, @NotNull @NotNull String name, @Nullable @Nullable String uploadFolder, @NotNull @NotNull Map<String,List<String>> sources)
      Creates a new instance with the given parameters
      Parameters:
      type - type of the constraint
      name - symbolic name of the project
      uploadFolder - name of the folder to be used for uploads
      sources - allowed sources
      Returns:
      a new constraint instance
      Since:
      5.0
    • with

      public static ProjectConstraint with(@NotNull @NotNull ProjectConstraint.Type type, @NotNull @NotNull String name, @Nullable @Nullable String uploadFolder, boolean autoReleaseAfterUpload, @NotNull @NotNull Map<String,List<String>> sources)
      Creates a new instance with the given parameters
      Parameters:
      type - type of the constraint
      name - symbolic name of the project
      uploadFolder - name of the folder to be used for uploads
      autoReleaseAfterUpload - if the project performs an automatic release after upload
      sources - allowed sources
      Returns:
      a new constraint instance
      Since:
      5.0
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isLocal

      public boolean isLocal()
      Indicates if the constraint refers to a local project
      Returns:
      true if this constraint refers to a local project, false otherwise
      Since:
      5.0
    • getName

      @NotNull public @NotNull String getName()
      Symbolic name of the project
      Returns:
      the symbolic name of the project, never null
      Since:
      5.0
    • getUploadFolder

      @Nullable public @Nullable String getUploadFolder()
      Name of the folder to be used for uploads
      Returns:
      the name of the upload folder, may be null
      Since:
      5.0
    • isCategory

      public boolean isCategory()
      Indicates if the constraint refers to a category
      Returns:
      true if this constraint refers to a category, false otherwise
      Since:
      5.0
    • autoReleaseAfterUpload

      public boolean autoReleaseAfterUpload()
      Indicates if the project performs an automatic release after upload
      Returns:
      true if the project performs an automatic release after upload, false otherwise
      Since:
      5.0
    • getSources

      @NotNull public @NotNull Map<String,List<String>> getSources()
       <SOURCES>
              <FOLDER name="root" store="pagestore"/>
              <FOLDER name="test" store="mediastore"/>
              <FOLDER name="root" store="sitestore"/>
       </SOURCES>
       
      Returns:
      the allowed sources listing. May be empty but never null.
      Since:
      5.0
      See Also: