Class ResourcesXMLParser

  • All Implemented Interfaces:
    EntityResolver

    public class ResourcesXMLParser
    extends Object
    implements EntityResolver
    This Class reads the Properties (resources) from the xml file supplied to constructor
    • Constructor Detail

      • ResourcesXMLParser

        public ResourcesXMLParser​(File resourceFile)
                           throws Exception
        Creates new ResourcesXMLParser
        Throws:
        Exception
      • ResourcesXMLParser

        public ResourcesXMLParser​(File resourceFile,
                                  String scope)
                           throws Exception
        Creates new ResourcesXMLParser
        Throws:
        Exception
    • Method Detail

      • persist

        public void persist​(File to)
        Persist the XML file.
        Parameters:
        to - target location
      • updateDocumentNode

        public void updateDocumentNode​(Resource originalResource,
                                       Resource modifiedResource)
      • getResourceFile

        public File getResourceFile()
      • getResources

        public Iterator<Resource> getResources()
        Returns an Iterator of Resourceobjects in the order as defined in the resources XML configuration file. Maintained for backward compat purposes only.
      • getResourcesList

        public List<Resource> getResourcesList()
      • getNonConnectorResourcesList

        public static List getNonConnectorResourcesList​(List<Resource> resources,
                                                        boolean isResourceCreation,
                                                        boolean ignoreDuplicates)
        Returns an List of Resourceobjects that needs to be created prior to module deployment. This includes all non-Connector resources and resource-adapter-config
        Parameters:
        resources - List of resources, from which the non connector resources need to be obtained.
        isResourceCreation - indicates if this determination needs to be done during the PreResCreationPhase. In the PreResCreationPhase, RA config is added to the non connector list, so that the RA config is created prior to the RA deployment. For all other purpose, this flag needs to be set to false.
      • getConnectorResourcesList

        public static List getConnectorResourcesList​(List<Resource> resources,
                                                     boolean isResourceCreation,
                                                     boolean ignoreDuplicates)
        Returns an Iterator of Resource objects that correspond to connector resources that needs to be created post module deployment. They are arranged in the order in which the resources needs to be created
        Parameters:
        resources - List of resources, from which the non connector resources need to be obtained.
        isResourceCreation - indicates if this determination needs to be done during the PreResCreationPhase. In the PreResCreationPhase, RA config is added to the non connector list, so that the RA config is created prior to the RA deployment. For all other purpose, this flag needs to be set to false.