Class AdminObjectConfigParserImpl
- java.lang.Object
-
- com.sun.enterprise.connectors.util.AdminObjectConfigParserImpl
-
- All Implemented Interfaces:
AdminObjectConfigParser
,ConnectorConfigParser
public class AdminObjectConfigParserImpl extends Object implements AdminObjectConfigParser
This is AdminObject configuration parser. It parses the ra.xml file for the admin object specific configurations like AdminObject javabeans properties .- Author:
- Srikanth P
-
-
Field Summary
-
Fields inherited from interface com.sun.enterprise.connectors.util.ConnectorConfigParser
AOR, configParserUtil, ddTransformUtil, MCF, MSL, RA
-
-
Constructor Summary
Constructors Constructor Description AdminObjectConfigParserImpl()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getAdminObjectClassNames(ConnectorDescriptor desc, String intfName)
gets the adminObjectClassNames pertaining to a rar & a specific adminObjectInterfaceNameString[]
getAdminObjectInterfaceNames(ConnectorDescriptor desc)
gets the adminObjectInterfaceNames pertaining to a rar.List<String>
getConfidentialProperties(ConnectorDescriptor desc, String rarName, String... keyFields)
GiProperties
getJavaBeanProps(ConnectorDescriptor desc, String adminObjectInterface, String rarName)
Parses the ra.xml for the admin object javabean properties.Properties
getJavaBeanProps(ConnectorDescriptor desc, String adminObjectInterface, String adminObjectClass, String rarName)
Parses the ra.xml for the admin object javabean properties.boolean
hasAdminObject(ConnectorDescriptor desc, String intfName, String className)
Checks whether the provided interfacename and classname combination is present in any of the admin objects for the resource-adapter
-
-
-
Method Detail
-
getJavaBeanProps
public Properties getJavaBeanProps(ConnectorDescriptor desc, String adminObjectInterface, String rarName) throws ConnectorRuntimeException
Parses the ra.xml for the admin object javabean properties. The admin object to be parsed is identified by the moduleDir where ra.xml is present and the adminObject interface. Admin object interface will be unique in a given ra.xml. It throws ConnectorRuntimeException if either or both the parameters are null, if corresponding rar is not deployed, if no adminObjectInterce is found in ra.xml. If rar is deployed and admin Object interface is present but no properties are present for the corresponding adminobjectInterface, null is returned.- Specified by:
getJavaBeanProps
in interfaceConnectorConfigParser
- Parameters:
desc
- ConnectorDescriptor pertaining to rar.adminObjectInterface
- AdminObject interface- Returns:
- Javabean properties with the propety names and values of propeties. The property values will be the values mentioned in ra.xml if present. Otherwise it will be the default values obtained by introspecting the javabean. In both the case if no value is present, empty String is returned as the value.
- Throws:
ConnectorRuntimeException
- if either of the parameters are null. If corresponding rar is not deployed i.e moduleDir is invalid. If no admin object intercface is found in ra.xml
-
getJavaBeanProps
public Properties getJavaBeanProps(ConnectorDescriptor desc, String adminObjectInterface, String adminObjectClass, String rarName) throws ConnectorRuntimeException
Parses the ra.xml for the admin object javabean properties. The admin object to be parsed is identified by the moduleDir where ra.xml is present and the adminObject interface. Admin object interface will be unique in a given ra.xml. It throws ConnectorRuntimeException if either or both the parameters are null, if corresponding rar is not deployed, if no adminObjectInterce is found in ra.xml. If rar is deployed and admin Object interface is present but no properties are present for the corresponding adminobjectInterface, null is returned.- Specified by:
getJavaBeanProps
in interfaceAdminObjectConfigParser
- Parameters:
desc
- ConnectorDescriptor pertaining to rar.adminObjectInterface
- AdminObject interfaceadminObjectClass
- AdminObject classrarName
- resource-adapter-name- Returns:
- Javabean properties with the propety names and values of propeties. The property values will be the values mentioned in ra.xml if present. Otherwise it will be the default values obtained by introspecting the javabean. In both the case if no value is present, empty String is returned as the value.
- Throws:
ConnectorRuntimeException
- if either of the parameters are null. If corresponding rar is not deployed i.e moduleDir is invalid. If no admin object intercface is found in ra.xml
-
getAdminObjectInterfaceNames
public String[] getAdminObjectInterfaceNames(ConnectorDescriptor desc) throws ConnectorRuntimeException
gets the adminObjectInterfaceNames pertaining to a rar.- Specified by:
getAdminObjectInterfaceNames
in interfaceAdminObjectConfigParser
- Parameters:
desc
- ConnectorDescriptor pertaining to rar.- Returns:
- Array of AdminObjectInterface names as Strings
- Throws:
ConnectorRuntimeException
- if parsing fails
-
getAdminObjectClassNames
public String[] getAdminObjectClassNames(ConnectorDescriptor desc, String intfName) throws ConnectorRuntimeException
gets the adminObjectClassNames pertaining to a rar & a specific adminObjectInterfaceName- Specified by:
getAdminObjectClassNames
in interfaceAdminObjectConfigParser
- Parameters:
desc
- ConnectorDescriptor pertaining to rar.intfName
- admin-object-interface name- Returns:
- Array of AdminObjectInterface names as Strings
- Throws:
ConnectorRuntimeException
- if parsing fails
-
hasAdminObject
public boolean hasAdminObject(ConnectorDescriptor desc, String intfName, String className) throws ConnectorRuntimeException
Checks whether the provided interfacename and classname combination is present in any of the admin objects for the resource-adapter- Specified by:
hasAdminObject
in interfaceAdminObjectConfigParser
- Parameters:
desc
- ConnectorDescriptor pertaining to rar.intfName
- interface-nameclassName
- class-name- Returns:
- boolean indicating the presence of adminobject
- Throws:
ConnectorRuntimeException
- If rar is not exploded or incorrect ra.xml
-
getConfidentialProperties
public List<String> getConfidentialProperties(ConnectorDescriptor desc, String rarName, String... keyFields) throws ConnectorRuntimeException
Description copied from interface:ConnectorConfigParser
Gi- Specified by:
getConfidentialProperties
in interfaceConnectorConfigParser
- Returns:
- Throws:
ConnectorRuntimeException
-
-