|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.wli.config.Ref
public class Ref
A Ref uniquely represents a resource, project or folder that is managed by the Configuration system. A Ref object has two components: A typeId that indicates whether it is a project, folder, or a resource, and an array of names of non-zero length. For a resource the array of names start with the project name, followed by folder names, and end with the resource name. For a project, the Ref object simply contains one name component, that is, the project name. A Ref object for a folder contains the project name followed by the names of the folders which it is nested under.
A special Ref DOMAIN
refers to the whole domain.
Note: this class has a natural ordering that is inconsistent with equals.
Field Summary | |
---|---|
static Ref |
DEFAULT_PROJECT_REF
Default project reference |
static Ref |
DOMAIN
Reference to the domain |
static String |
DOMAIN_REF
|
static String |
FOLDER_DATA_LOCAL_NAME
Local name for folderdata |
static String |
FOLDER_REF
|
static int |
MAX_FOLDER_OR_PROJECT_PART_LENGTH
|
static String |
PROJECT_DATA_LOCAL_NAME
Local name for project data |
static String |
PROJECT_REF
|
static char |
SEPARATOR_CHAR
Character that separates hierarchical names |
static String |
SEPARATOR_CHAR_PATTERN
REgular expression representation of the separateor char for pattern matching purposes. |
static long |
serialVersionUID
|
static Ref |
STATIC_PROJECT_REF
Internal project that always exists |
static Ref |
SYSTEM_PROJECT_REF
|
static Ref |
SYSTEM_UDDI_FOLDER
|
Constructor Summary | |
---|---|
Ref(String typeId,
Ref parent,
String name)
Constructor for creating a reference to an object under a particular parent |
|
Ref(String typeId,
String[] names)
Constructor for creating an arbitrary reference. |
Method Summary | |
---|---|
static void |
_assertValidLocalNamePart(String name)
|
static void |
_assertValidProjectOrFolderPart(String name)
|
int |
compareTo(Object o)
|
boolean |
equals(Object o)
|
static Ref |
getDomainRef()
Returns the (only) reference to the service bus domain |
String |
getFullName()
Returns the full name of the object. |
String |
getGlobalName()
|
String |
getLocalName()
Returns the local name (last name) for the given ref |
static String |
getLocalNamePart(String fullName)
Returns the local name part of the full name. |
String[] |
getNames()
Returns the hierarchical name for the object referenced. |
static String[] |
getNames(String fullName)
converts a fullname into its components by splitting it at the separator character SEPARATOR_CHAR |
static String |
getParentNamePart(String fullName)
Returns the parent name part of the full name. |
Ref |
getParentRef()
Returns a reference to the parent. |
Ref |
getProject()
Returns the project If this is a resource reference, project reference of a folder reference. |
String |
getProjectName()
Returns the project name If this is a resource reference, project reference of a folder reference. |
String |
getTypeId()
Returns the type of the reference |
int |
hashCode()
|
boolean |
isDescendantOf(Ref ancestor)
Returns true if this reference is a descendent (child, grandchild etc...) of the given reference |
boolean |
isDomainRef()
Returns true if this is the domain reference |
boolean |
isFolderRef()
Returns true if this is a folder reference |
boolean |
isProjectRef()
Returns true if this is a project reference |
boolean |
isResourceRef()
REturns true if this is a resource reference |
static Ref |
makeBusinessSvcRef(Ref parent,
String serviceName)
Constructs a reference to a business service component |
static Ref |
makeBusinessSvcRef(String businessSvcName)
Deprecated. |
static Ref |
makeFolderRef(Ref parent,
String folderName)
Constructs a reference to a folder |
static Ref |
makeLocationDataRef(Ref location)
Creates a reference to the metadata that is kept for the given location (folder or project). |
static Ref |
makeLocationRef(String location)
Factory method to create parent ref for the given location. |
static Ref |
makeMflRef(Ref parent,
String mflId)
Constructs a reference to an MFL component |
static Ref |
makeParentRef(String fullName)
Convenience method to create the parent ref for a given full name. |
static Ref |
makeProjectRef(String projectName)
Constructs a reference to project |
static Ref |
makeProxyRef(Ref parent,
String proxyName)
Constructs a reference to a proxy service |
static Ref |
makeProxyRef(String proxyName)
Deprecated. |
static Ref |
makeRef(String typeId,
Ref parent,
String localname)
Constructs a reference to an arbitrary object other than the domain and that is hierarchical. |
static Ref |
makeRef(String typeId,
String[] names)
Constructs a reference to an arbitrary object other than the domain. |
static Ref |
makeResourceRef(String resourceType,
Ref projectOrFolderRef,
String resourceName)
Convenience constructor for creating an arbitrary resource reference |
static Ref |
makeSecurityPolicyRef(Ref parent,
String policyName)
Constructs a reference to a security policy component |
static Ref |
makeServiceAccountRef(Ref parent,
String accountName)
Constructs a reference to a service account component |
static Ref |
makeServiceProviderRef(Ref parent,
String providerName)
Constructs a reference to a service provider component |
static Ref |
makeStatisticDomainRef(Ref parent,
String domainName)
Constructs a reference to a statistic domain component |
static Ref |
makeStatisticRef(Ref parent,
String resourceID)
Constructs a reference to a Statistic component |
static Ref |
makeTaskRef(Ref parent,
String taskName)
Constructs a reference to a Task component |
static Ref |
makeWsdlRef(Ref parent,
String wsdlId)
Constructs a reference to a WSDL component |
static Ref |
makeXmlSchemaRef(Ref parent,
String schemaId)
Constructs a reference to an xml schema component |
static Ref |
makeXqueryRef(Ref parent,
String xqueryId)
Constructs a reference to an Xquery component |
static Ref |
makeXsltRef(Ref parent,
String xsltId)
Constructs a reference to an XSLT component |
static Ref |
parseGlobalName(String globalName)
|
Object |
readResolve()
|
static void |
sort(List<Ref> refList)
This method returns sorted Ref list |
String |
toString()
|
static boolean |
validateProjectOrFolderPart(StringBuilder resultMsg,
String name,
Locale locale)
Utility method for validating a folder or project name. |
static boolean |
validateResourceLocalNamePart(StringBuilder resultMsg,
String name,
Locale locale)
Utility method for validating the local name of a resource. |
static Ref |
valueOf(String str)
Parses a references that was stringified via toString() |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
public static final String DOMAIN_REF
public static final String PROJECT_REF
public static final String FOLDER_REF
public static final int MAX_FOLDER_OR_PROJECT_PART_LENGTH
public static final Ref DOMAIN
public static final Ref DEFAULT_PROJECT_REF
public static final Ref STATIC_PROJECT_REF
public static final Ref SYSTEM_PROJECT_REF
public static final Ref SYSTEM_UDDI_FOLDER
public static final String PROJECT_DATA_LOCAL_NAME
public static final String FOLDER_DATA_LOCAL_NAME
public static final char SEPARATOR_CHAR
public static final String SEPARATOR_CHAR_PATTERN
Constructor Detail |
---|
public Ref(String typeId, Ref parent, String name)
typeId
- The type of the reference that will be created - expected to be canonicalparent
- the parent. If the typeId is project the parent must be the domain reference. If the typeId is folder
the parent must be a project or another folder. If the typeId indicates a resource the parent must be a project or
a folder.name
- non-qualified name of the object that will be created. The full name of the created object will be computed
by appending this name to the full name of the parent.public Ref(String typeId, String[] names)
typeId
- - expected to be canonicalnames
- Method Detail |
---|
public String getTypeId()
public boolean isDomainRef()
public boolean isProjectRef()
public boolean isFolderRef()
public boolean isResourceRef()
public String[] getNames()
public String getFullName()
public String getLocalName()
public Ref getProject() throws IllegalStateException
IllegalStateException
IllegalStateException
- if this is not a project, folder or resource referencepublic String getProjectName() throws IllegalStateException
IllegalStateException
IllegalStateException
- if this is not a project, folder or resource referencepublic Ref getParentRef()
public boolean isDescendantOf(Ref ancestor)
ancestor
-
public String getGlobalName()
public static Ref parseGlobalName(String globalName)
public String toString()
toString
in class Object
public static Ref valueOf(String str)
toString()
str
-
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(Object o)
compareTo
in interface Comparable
public Object readResolve()
public static Ref makeProxyRef(String proxyName)
proxyName
- public static Ref makeBusinessSvcRef(String businessSvcName)
businessSvcName
- public static Ref makeLocationRef(String location)
Factory method to create parent ref for the given location. For Eg: if location is project1/folder1/folder2 it creates Ref object for folder2.
location
-
public static Ref makeLocationDataRef(Ref location)
location
- the folder/project for which the location data reference will be computed
public static Ref makeParentRef(String fullName)
fullName
-
public static Ref makeProxyRef(Ref parent, String proxyName)
parent
- the parent. This can be a folder or a project.proxyName
- name of the proxy service
public static Ref makeBusinessSvcRef(Ref parent, String serviceName)
parent
- the parent. This can be a folder or a project.serviceName
- name of the service
public static Ref makeServiceProviderRef(Ref parent, String providerName)
parent
- the parent. This can be a folder or a project.providerName
- name of the service provider
public static Ref makeServiceAccountRef(Ref parent, String accountName)
parent
- the parent. This can be a folder or a project.accountName
- name of the service account
public static Ref makeSecurityPolicyRef(Ref parent, String policyName)
parent
- the parent. This can be a folder or a project.policyName
- name of the security policy
public static Ref makeXqueryRef(Ref parent, String xqueryId)
parent
- the parent. This can be a folder or a project.xqueryId
- id of the Xquery
public static Ref makeMflRef(Ref parent, String mflId)
parent
- the parent. This can be a folder or a project.mflId
- id of the MFL
public static Ref makeXsltRef(Ref parent, String xsltId)
parent
- the parent. This can be a folder or a project.xsltId
- id of the XSLT
public static Ref makeXmlSchemaRef(Ref parent, String schemaId)
parent
- the parent. This can be a folder or a project.schemaId
- id of the xml schema
public static Ref makeWsdlRef(Ref parent, String wsdlId)
parent
- the parent. This can be a folder or a project.wsdlId
- the id of the WSDL
public static Ref makeTaskRef(Ref parent, String taskName)
taskName
- name of the task
public static Ref makeStatisticRef(Ref parent, String resourceID)
parent
- the parent. This can be a folder or a project.resourceID
- name of the OperationalResource
public static Ref makeStatisticDomainRef(Ref parent, String domainName)
parent
- the parent. This can be a folder or a project.domainName
- name of the domain
public static Ref makeProjectRef(String projectName)
projectName
- name of the project
public static Ref makeFolderRef(Ref parent, String folderName)
parent
- the parent. This can be a folder or a project.folderName
- name of the folder
public static Ref makeRef(String typeId, Ref parent, String localname)
typeId
- Type of the reference to constructparent
- the parent. This can be a folder or a project.localname
- local name for the referencepublic static Ref makeRef(String typeId, String[] names)
typeId
- Type of the reference to constructnames
- array of names that describe the path to the object being referenced.public static Ref makeResourceRef(String resourceType, Ref projectOrFolderRef, String resourceName)
resourceType
- type of the resourceprojectOrFolderRef
- parent folder or projectresourceName
- name of the resource
public static Ref getDomainRef()
public static String[] getNames(String fullName)
SEPARATOR_CHAR
fullName
- the full (hierarchical) name to the instancepublic static boolean validateProjectOrFolderPart(StringBuilder resultMsg, String name, Locale locale)
resultMsg
- Error message is appended to this builder if the name is invalid.name
- the local name of the project or folder (relative to the project), e.g., myProject,
or folderA
public static boolean validateResourceLocalNamePart(StringBuilder resultMsg, String name, Locale locale)
resultMsg
- Error message is appended to this builder if the name is invalid.name
- the local name of the resource (relative to its location), e.g., myResource, myWSDL
public static void _assertValidProjectOrFolderPart(String name) throws IllegalArgumentException
IllegalArgumentException
public static void _assertValidLocalNamePart(String name) throws IllegalArgumentException
IllegalArgumentException
public static String getLocalNamePart(String fullName)
fullName
-
public static String getParentNamePart(String fullName)
fullName
-
public static void sort(List<Ref> refList)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |