Class ResourcesXMLParser
- java.lang.Object
-
- org.glassfish.resources.admin.cli.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
-
-
Field Summary
Fields Modifier and Type Field Description static StringJAVA_APP_SCOPE_PREFIXstatic StringJAVA_COMP_SCOPE_PREFIXstatic StringJAVA_GLOBAL_SCOPE_PREFIXstatic StringJAVA_MODULE_SCOPE_PREFIXstatic List<String>namingScopesList of naming scopes
-
Constructor Summary
Constructors Constructor Description ResourcesXMLParser(File resourceFile)Creates new ResourcesXMLParserResourcesXMLParser(File resourceFile, String scope)Creates new ResourcesXMLParser
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ListgetConnectorResourcesList(List<Resource> resources, boolean isResourceCreation, boolean ignoreDuplicates)Returns an Iterator ofResourceobjects that correspond to connector resources that needs to be created post module deployment.static ListgetNonConnectorResourcesList(List<Resource> resources, boolean isResourceCreation, boolean ignoreDuplicates)Returns an List ofResourceobjects that needs to be created prior to module deployment.FilegetResourceFile()Iterator<Resource>getResources()Returns an Iterator ofResourceobjects in the order as defined in the resources XML configuration file.List<Resource>getResourcesList()voidpersist(File to)Persist the XML file.InputSourceresolveEntity(String publicId, String systemId)voidupdateDocumentNode(Resource originalResource, Resource modifiedResource)
-
-
-
Field Detail
-
JAVA_APP_SCOPE_PREFIX
public static final String JAVA_APP_SCOPE_PREFIX
- See Also:
- Constant Field Values
-
JAVA_COMP_SCOPE_PREFIX
public static final String JAVA_COMP_SCOPE_PREFIX
- See Also:
- Constant Field Values
-
JAVA_MODULE_SCOPE_PREFIX
public static final String JAVA_MODULE_SCOPE_PREFIX
- See Also:
- Constant Field Values
-
JAVA_GLOBAL_SCOPE_PREFIX
public static final String JAVA_GLOBAL_SCOPE_PREFIX
- See Also:
- Constant Field Values
-
-
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 ofResourceobjects in the order as defined in the resources XML configuration file. Maintained for backward compat purposes only.
-
getNonConnectorResourcesList
public static List getNonConnectorResourcesList(List<Resource> resources, boolean isResourceCreation, boolean ignoreDuplicates)
Returns an List ofResourceobjects 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 thePreResCreationPhase. In thePreResCreationPhase, 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 ofResourceobjects 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 thePreResCreationPhase. In thePreResCreationPhase, 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.
-
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws SAXException
- Specified by:
resolveEntityin interfaceEntityResolver- Throws:
SAXException
-
-