|
Oracle Fusion Middleware Java API Reference for Oracle Service Bus 11g Release 1 (11.1.1.6.3) E15033-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.bea.wli.config.Ref
public final class Ref
A Ref uniquely represents a resource, project or folder that is managed by the Configuration Framework. 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 java.lang.String |
DOMAIN_REF |
static java.lang.String |
FOLDER_DATA_LOCAL_NAME Local name for folderdata |
static java.lang.String |
FOLDER_REF |
static java.lang.String |
LOCATION_DATA_TYPE Type Id for location metadata |
static int |
MAX_FOLDER_OR_PROJECT_PART_LENGTH |
static java.lang.String |
PROJECT_DATA_LOCAL_NAME Local name for project data |
static java.lang.String |
PROJECT_REF |
static char |
SEPARATOR_CHAR Character that separates hierarchical names |
static java.lang.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_JNDI_PROVIDER_FOLDER Deprecated. in 2.6. Please use Refs.SYSTEM_JNDI_PROVIDER_FOLDER . Deprecated API is removed in the subsequent major release. |
static Ref |
SYSTEM_PROJECT_REF Deprecated. in 2.6. Please use Refs.SYSTEM_PROJECT_REF . Deprecated API is removed in the subsequent major release. |
static Ref |
SYSTEM_SMTP_FOLDER Deprecated. in 2.6. Please use Refs.SYSTEM_SMTP_FOLDER . Deprecated API is removed in the subsequent major release. |
static Ref |
SYSTEM_UDDI_FOLDER Deprecated. in 2.6. Please use Refs.SYSTEM_UDDI_FOLDER . Deprecated API is removed in the subsequent major release. |
Constructor Summary | |
---|---|
Ref(java.lang.String typeId, Ref parent, java.lang.String name) Constructor for creating a reference to an object under a particular parent |
|
Ref(java.lang.String typeId, java.lang.String[] names) Constructor for creating an arbitrary reference. |
Method Summary | |
---|---|
static void |
_assertValidLocalNamePart(java.lang.String name) |
static void |
_assertValidProjectOrFolderPart(java.lang.String name) |
int |
compareTo(java.lang.Object o) |
boolean |
equals(java.lang.Object o) |
static Ref |
getDomainRef() Returns the (only) reference to the config fwk domain |
java.lang.String |
getFullName() Returns the full name of the object. |
java.lang.String |
getGlobalName() |
java.lang.String |
getLocalName() Returns the local name (last name) for the given ref |
static java.lang.String |
getLocalNamePart(java.lang.String fullName) Returns the local name part of the full name. |
java.lang.String[] |
getNames() Returns the hierarchical name for the object referenced. |
static java.lang.String[] |
getNames(java.lang.String fullName) converts a fullname into its components by splitting it at the separator character SEPARATOR_CHAR |
static java.lang.String |
getParentNamePart(java.lang.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. |
java.lang.String |
getProjectName() Returns the project name If this is a resource reference, project reference of a folder reference. |
java.lang.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 |
isLocationDataRef() Returns true if this is a reference to the locationData resource |
boolean |
isProjectRef() Returns true if this is a project reference |
boolean |
isResourceRef() REturns true if this is a resource reference |
static Ref |
makeAlertRuleRef(Ref parentRef, java.lang.String ruleId) make an AlertRuleRef using the serviceRef and the ruleId. |
static Ref |
makeFolderRef(Ref parent, java.lang.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(java.lang.String location) Deprecated. since 2.6 |
static Ref |
makeProjectRef(java.lang.String projectName) Constructs a reference to project |
static Ref |
makeRef(java.lang.String typeId, Ref parent, java.lang.String localname) Constructs a reference to an arbitrary object other than the domain and that is hierarchical. |
static Ref |
makeRef(java.lang.String typeId, java.lang.String[] names) Constructs a reference to an arbitrary object other than the domain. |
static Ref |
makeResourceRef(java.lang.String resourceType, Ref projectOrFolderRef, java.lang.String resourceName) Convenience constructor for creating an arbitrary resource reference |
static Ref |
makeSimpleTypeRef(java.lang.String typeId, java.lang.String name) |
Ref |
map(Ref sourceLocation, Ref targetLocation) Maps a reference to another reference so that a portion of its prefix location is mapped to a target location. |
static java.util.Set<Ref> |
narrowRefs(java.util.Set<Ref> initialSet, java.util.Set<Ref> filter) Narrows the initial set so that only those that are specified in the filter remain. |
static Ref |
parseGlobalName(java.lang.String globalName) |
static Ref |
parseGlobalNameOld(java.lang.String globalName) |
java.lang.Object |
readResolve() |
static void |
removeMoreSpecific(java.util.Set<Ref> set) Remove a ref R1 from set if there exists another ref R2 in the set such that R1 is under R2. |
static void |
sort(java.util.List<Ref> refList) This method returns sorted Ref list |
java.lang.String |
toString() |
static boolean |
validateProjectOrFolderPart(java.lang.StringBuilder resultMsg, java.lang.String name, java.util.Locale locale) Utility method for validating a folder or project name. |
static boolean |
validateResourceLocalNamePart(java.lang.StringBuilder resultMsg, java.lang.String name, java.util.Locale locale) Utility method for validating the local name of a resource. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
public static final java.lang.String DOMAIN_REF
public static final java.lang.String PROJECT_REF
public static final java.lang.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 java.lang.String PROJECT_DATA_LOCAL_NAME
public static final java.lang.String FOLDER_DATA_LOCAL_NAME
public static final char SEPARATOR_CHAR
public static final java.lang.String SEPARATOR_CHAR_PATTERN
public static final java.lang.String LOCATION_DATA_TYPE
public static final Ref SYSTEM_PROJECT_REF
Refs.SYSTEM_PROJECT_REF
. Deprecated API is removed in the subsequent major release.public static final Ref SYSTEM_UDDI_FOLDER
Refs.SYSTEM_UDDI_FOLDER
. Deprecated API is removed in the subsequent major release.public static final Ref SYSTEM_SMTP_FOLDER
Refs.SYSTEM_SMTP_FOLDER
. Deprecated API is removed in the subsequent major release.public static final Ref SYSTEM_JNDI_PROVIDER_FOLDER
Refs.SYSTEM_JNDI_PROVIDER_FOLDER
. Deprecated API is removed in the subsequent major release.Constructor Detail |
---|
public Ref(java.lang.String typeId, Ref parent, java.lang.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(java.lang.String typeId, java.lang.String[] names)
typeId
- - expected to be canonicalnames
-Method Detail |
---|
public java.lang.String getTypeId()
public boolean isDomainRef()
public boolean isProjectRef()
public boolean isFolderRef()
public boolean isResourceRef()
public boolean isLocationDataRef()
public java.lang.String[] getNames()
public java.lang.String getFullName()
public java.lang.String getLocalName()
public Ref getProject() throws java.lang.IllegalStateException
IllegalStateException
java.lang.IllegalStateException
- if this is not a project, folder or resource referencepublic java.lang.String getProjectName() throws java.lang.IllegalStateException
IllegalStateException
java.lang.IllegalStateException
- if this is not a project, folder or resource referencepublic Ref getParentRef()
public boolean isDescendantOf(Ref ancestor)
ancestor
-public java.lang.String getGlobalName()
public static Ref parseGlobalNameOld(java.lang.String globalName)
public static Ref parseGlobalName(java.lang.String globalName)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.lang.Object readResolve()
public Ref map(Ref sourceLocation, Ref targetLocation) throws java.lang.IllegalArgumentException
sourceLocation
- the prefix location to be changed.targetLocation
- the new value for the prefix location.java.lang.IllegalArgumentException
- if this reference is not under the source location.public static Ref makeLocationRef(java.lang.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 computedpublic static Ref makeProjectRef(java.lang.String projectName)
projectName
- name of the projectpublic static Ref makeFolderRef(Ref parent, java.lang.String folderName)
parent
- the parent. This can be a folder or a project.folderName
- name of the folderpublic static Ref makeRef(java.lang.String typeId, Ref parent, java.lang.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(java.lang.String typeId, java.lang.String[] names)
typeId
- Type of the reference to constructnames
- array of names that describe the path to the object being referenced.public static Ref makeSimpleTypeRef(java.lang.String typeId, java.lang.String name)
public static Ref makeResourceRef(java.lang.String resourceType, Ref projectOrFolderRef, java.lang.String resourceName)
resourceType
- type of the resourceprojectOrFolderRef
- parent folder or projectresourceName
- name of the resourcepublic static Ref getDomainRef()
public static Ref makeAlertRuleRef(Ref parentRef, java.lang.String ruleId)
parentRef
-ruleId
-public static java.lang.String[] getNames(java.lang.String fullName)
SEPARATOR_CHAR
fullName
- the full (hierarchical) name to the instancepublic static boolean validateProjectOrFolderPart(java.lang.StringBuilder resultMsg, java.lang.String name, java.util.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 folderApublic static boolean validateResourceLocalNamePart(java.lang.StringBuilder resultMsg, java.lang.String name, java.util.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, myWSDLpublic static void _assertValidProjectOrFolderPart(java.lang.String name) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static void _assertValidLocalNamePart(java.lang.String name) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static java.lang.String getLocalNamePart(java.lang.String fullName)
fullName
-public static java.lang.String getParentNamePart(java.lang.String fullName)
fullName
-public static void sort(java.util.List<Ref> refList)
This method returns sorted Ref list
refList
- List<Ref>public static java.util.Set<Ref> narrowRefs(java.util.Set<Ref> initialSet, java.util.Set<Ref> filter)
Set.retainAll(java.util.Collection>
)
, and is not equal to initialSet.retainAll(filter). A reference in the initial set is retained if it exists in the filter set, or if any of its parent locations (folders, and project that it belongs to) exists in the filter.initialSet
-filter
-public static void removeMoreSpecific(java.util.Set<Ref> set)
set
-
|
Oracle Fusion Middleware Java API Reference for Oracle Service Bus 11g Release 1 (11.1.1.6.3) E15033-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |