Class AbstractUidValidationTask

    • Field Detail

      • artifactBuilder

        protected final org.bonitasoft.web.designer.ArtifactBuilder artifactBuilder
        Artifact builder required to check if a UID artifact is valid
      • artifactsSourceDir

        protected final Path artifactsSourceDir
        Directory where UID artifacts should be stored
    • Constructor Detail

      • AbstractUidValidationTask

        public AbstractUidValidationTask()
    • Method Detail

      • getTaskName

        protected abstract String getTaskName()
      • getArtifactStatus

        protected abstract org.bonitasoft.web.designer.model.ArtifactStatusReport getArtifactStatus​(String artifactId)
      • getUidArtifacts

        protected List<String> getUidArtifacts()
      • isUidArtifact

        protected static boolean isUidArtifact​(Path directory)
                                        throws ValidationErrorException
        Check if the given directory represents a UID artifact.

        The directory is a UID artifact if its name does not match the regex UID_DIRECTORY_EXCLUDE_REGEX and if it contains a json file matching exactly the directory name.

        For example the directory fooBar must contain the json file fooBar.json to be identified as a UID artifacts.

        Parameters:
        directory - path of the directory to check
        Returns:
        true if the directory matches criteria described above
        Throws:
        ValidationErrorException - if an error occurred when parsing the given directory