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 String
JAVA_APP_SCOPE_PREFIX
static String
JAVA_COMP_SCOPE_PREFIX
static String
JAVA_GLOBAL_SCOPE_PREFIX
static String
JAVA_MODULE_SCOPE_PREFIX
static List<String>
namingScopes
List 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 List
getConnectorResourcesList(List<Resource> resources, boolean isResourceCreation, boolean ignoreDuplicates)
Returns an Iterator ofResource
objects that correspond to connector resources that needs to be created post module deployment.static List
getNonConnectorResourcesList(List<Resource> resources, boolean isResourceCreation, boolean ignoreDuplicates)
Returns an List ofResource
objects that needs to be created prior to module deployment.File
getResourceFile()
Iterator<Resource>
getResources()
Returns an Iterator ofResource
objects in the order as defined in the resources XML configuration file.List<Resource>
getResourcesList()
void
persist(File to)
Persist the XML file.InputSource
resolveEntity(String publicId, String systemId)
void
updateDocumentNode(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 ofResource
objects 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 ofResource
objects 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 ofResource
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 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:
resolveEntity
in interfaceEntityResolver
- Throws:
SAXException
-
-