Class ProcessApplicationScanningUtil


  • public class ProcessApplicationScanningUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static boolean checkDiagram​(java.lang.String fileName, java.lang.String modelFileName, java.lang.String[] diagramSuffixes, java.lang.String[] modelSuffixes)
      Checks, whether a filename is a diagram for the given modelFileName.
      static java.util.Map<java.lang.String,​byte[]> findResources​(java.lang.ClassLoader classLoader, java.lang.String paResourceRootPath, java.net.URL metaFileUrl)  
      static java.util.Map<java.lang.String,​byte[]> findResources​(java.lang.ClassLoader classLoader, java.lang.String paResourceRootPath, java.net.URL metaFileUrl, java.lang.String[] additionalResourceSuffixes)  
      static boolean hasSuffix​(java.lang.String filename, java.lang.String[] suffixes)  
      static boolean isDeployable​(java.lang.String filename)  
      static boolean isDeployable​(java.lang.String filename, java.lang.String[] additionalResourceSuffixes)  
      static boolean isDiagram​(java.lang.String fileName, java.lang.String modelFileName)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProcessApplicationScanningUtil

        public ProcessApplicationScanningUtil()
    • Method Detail

      • findResources

        public static java.util.Map<java.lang.String,​byte[]> findResources​(java.lang.ClassLoader classLoader,
                                                                                 java.lang.String paResourceRootPath,
                                                                                 java.net.URL metaFileUrl)
        Parameters:
        classLoader - the classloader to scan
        paResourceRootPath - see ProcessArchiveXml.PROP_RESOURCE_ROOT_PATH
        metaFileUrl - the URL to the META-INF/processes.xml file
        Returns:
        a Map of process definitions
      • findResources

        public static java.util.Map<java.lang.String,​byte[]> findResources​(java.lang.ClassLoader classLoader,
                                                                                 java.lang.String paResourceRootPath,
                                                                                 java.net.URL metaFileUrl,
                                                                                 java.lang.String[] additionalResourceSuffixes)
        Parameters:
        classLoader - the classloader to scan
        paResourceRootPath - see ProcessArchiveXml.PROP_RESOURCE_ROOT_PATH
        metaFileUrl - the URL to the META-INF/processes.xml file
        additionalResourceSuffixes - a list of additional suffixes for resources
        Returns:
        a Map of process definitions
      • isDeployable

        public static boolean isDeployable​(java.lang.String filename)
      • isDeployable

        public static boolean isDeployable​(java.lang.String filename,
                                           java.lang.String[] additionalResourceSuffixes)
      • hasSuffix

        public static boolean hasSuffix​(java.lang.String filename,
                                        java.lang.String[] suffixes)
      • isDiagram

        public static boolean isDiagram​(java.lang.String fileName,
                                        java.lang.String modelFileName)
      • checkDiagram

        protected static boolean checkDiagram​(java.lang.String fileName,
                                              java.lang.String modelFileName,
                                              java.lang.String[] diagramSuffixes,
                                              java.lang.String[] modelSuffixes)
        Checks, whether a filename is a diagram for the given modelFileName.
        Parameters:
        fileName - filename to check.
        modelFileName - model file name.
        diagramSuffixes - suffixes of the diagram files.
        modelSuffixes - suffixes of model files.
        Returns:
        true, if a file is a diagram for the model.