com.ibm.xcap
Class DocumentSelector
java.lang.Object
com.ibm.xcap.DocumentSelector
- All Implemented Interfaces:
- XcapConstants, java.io.Serializable
public class DocumentSelector
- extends java.lang.Object
- implements XcapConstants, java.io.Serializable
The DocumentSelector is a class which represents the document selector
portion of the XCAP URI.
- See Also:
- Serialized Form
Fields inherited from interface com.ibm.xcap.XcapConstants |
ANONYMOUS_USER, APPEND_CONTENT_TYPE_CHARSET_UTF8, AUID_OMA_SEARCH, AUID_PRES_RULES, AUID_PRES_RULES_ACLS, AUID_RESOURCE_LISTS, AUID_RESOURCE_LISTS_ACLS, AUID_RLS_SERVICES, AUID_RLS_SERVICES_ACLS, AUID_XCAP_CAPS, AUID_XCAP_DIRECTORY, CHARSET_UTF8, CLIENT_RESOURCE_BUNDLE, CLOSE_BRACKET, CONTENT_TYPE_APPLICATION_ERROR_XML, CONTENT_TYPE_AUTH_POLICY, CONTENT_TYPE_NAMESPACE_BINDING, CONTENT_TYPE_OMA_DIRECTORY, CONTENT_TYPE_OMA_SEARCH, CONTENT_TYPE_PRES_RULES, CONTENT_TYPE_RESOURCE_LISTS, CONTENT_TYPE_RLS_SERVICES, CONTENT_TYPE_XCAP_CAPS, CONTENT_TYPE_XCAP_DIFF, CONTENT_TYPE_XCAP_ERROR, CONTENT_TYPE_XML_ATTRIBUTE, CONTENT_TYPE_XML_ELEMENT, DOC_GLOBAL_DIRECTORY, DOC_GLOBAL_INDEX, DOC_USER_DIRECTORY, DOC_XCAP_CAPS, DOUBLE_FORWARD_SLASH, EMPTY, ENCODED_SINGLE_QUOTE, ENCODED_SLASH_CLOSE_BRACKET, ENCODED_SLASH_OPEN_BRACKET, EXTENSION_LOCAL_CONSTRAINT_FAILURE, FORWARD_SLASH, GLOBAL, GLOBAL_DOC_DIRECTORY_PREFIX, GLOBAL_DOC_DIRECTORY_SUFFIX, HEADER_ACCEPT, HEADER_ALLOW, HEADER_CONTENT_TYPE, HEADER_ETAG, HEADER_IF_MATCH, HEADER_IF_NONE_MATCH, HEADER_LAST_MODIFIED, HEADER_X_3GPP_ASSERTED_IDENTITY, HEADER_X_3GPP_INTENDED_IDENTITY, HEADER_X_XCAP_ASSERTED_IDENTITY, HTTP_METHOD_DELETE, HTTP_METHOD_GET, HTTP_METHOD_POST, HTTP_METHOD_PUT, NS_COMMON_POLICY, NS_OMA_APPUSAGE, NS_OMA_COMMON_POLICY, NS_OMA_URIUSAGE, NS_OMA_XCAP_ERROR, NS_PRES_RULES, NS_RESOURCE_LISTS, NS_RLS_SERVICES, NS_XCAP_CAPS, NS_XCAP_DIRECTORY, NS_XCAP_ERROR, OPEN_BRACKET, PATH_SEARCH, RC_100_CONTINUE, RC_101_SWITCHING_PROTOCOLS, RC_200_OK, RC_201_CREATED, RC_202_ACCEPTED, RC_203_NON_AUTHORITATIVE_INFO, RC_204_NO_CONTENT, RC_205_RESET_CONTENT, RC_206_PARTIAL_CONTENT, RC_300_MULTIPLE_CHOICES, RC_301_MOVED_PERMANANTLY, RC_302_FOUND, RC_303_SEE_OTHER, RC_304_NOT_MODIFIED, RC_305_USE_PROXY, RC_307_TEMPORARY_REDIRECT, RC_400_BAD_REQUEST, RC_401_UNAUTHORIZED, RC_402_PAYMENT_REQUIRED, RC_403_FORBIDDEN, RC_404_NOT_FOUND, RC_405_METHOD_NOT_ALLOWED, RC_406_NOT_ACCEPTABLE, RC_407_PROXY_AUTHENTICATION_REQUIRED, RC_408_REQUEST_TIMEOUT, RC_409_CONFLICT, RC_410_GONE, RC_411_LENGTH_REQUIRED, RC_412_PRECONDITION_FAILED, RC_413_REQUEST_ENTITY_TOO_LARGE, RC_414_REQUEST_URI_TOO_LONG, RC_415_UNSUPPORTED_MEDIA_TYPE, RC_416_REQUESTED_RANGE_NOT_SATISFIABLE, RC_417_EXPECTATION_FAILED, RC_500_INTERNAL_SERVER_ERROR, RC_501_NOT_IMPLEMENTED, RC_502_BAD_GATEWAY, RC_503_SERVICES_UNAVAILABLE, RC_504_GATEWAY_TIMEOUT, RC_505_HTTP_VERSION_NOT_SUPPORTED, SINGLE_QUOTE, SINGLE_SPACE, SLASH_CLOSE_BRACKET, SLASH_OPEN_BRACKET, USERS, UTF_8, UTF8_BYTE_ORDER_MARKER, XML_DECLARATION, XPATH_SEPARATOR |
Constructor Summary |
DocumentSelector(java.lang.String xcapURI)
Finds and constructs the document selector based on the original XCAP URI |
DocumentSelector(java.lang.String xcapURI,
java.lang.String defaultNamespace)
Finds and constructs the document selector based on the original XCAP URI |
DocumentSelector(java.lang.String auid,
java.lang.String xui,
java.lang.String documentName)
Constructs the document selector from parameters |
Method Summary |
static java.lang.String |
extractAuid(java.lang.String xcapURI)
Extracts the AUID from an XCAP URI |
java.lang.String |
getAuid()
Returns the AUID |
java.lang.String |
getDocumentName()
Returns the document name. |
NodeSelector |
getNodeSelector()
Returns the NodeSelector if constructed with the XCAP URI. |
java.lang.String |
getXcapRoot()
Returns the XcapRoot if constructed with the XCAP URI. |
java.lang.String |
getXui()
Returns the XUI of the document selector. |
boolean |
isGlobalDocument()
Returns whether the document selector references a global document |
DocumentSelector |
substituteAuid(java.lang.String auid)
Returns a DocumentSelector with the AUID substituted with the specified
parameter. |
DocumentSelector |
substituteDocumentName(java.lang.String documentName)
Returns a DocumentSelector with the document name substituted with the
specified parameter. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DocumentSelector
public DocumentSelector(java.lang.String auid,
java.lang.String xui,
java.lang.String documentName)
- Constructs the document selector from parameters
- Parameters:
auid
- The AUID.xui
- The XUI if under the users tree.documentName
- The document name.
DocumentSelector
public DocumentSelector(java.lang.String xcapURI)
throws java.net.MalformedURLException
- Finds and constructs the document selector based on the original XCAP URI
- Parameters:
xcapURI
-
- Throws:
java.net.MalformedURLException
DocumentSelector
public DocumentSelector(java.lang.String xcapURI,
java.lang.String defaultNamespace)
throws java.net.MalformedURLException
- Finds and constructs the document selector based on the original XCAP URI
- Parameters:
xcapURI
- defaultNamespace
-
- Throws:
java.net.MalformedURLException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getAuid
public java.lang.String getAuid()
- Returns the AUID
- Returns:
- Returns the AUID
getDocumentName
public java.lang.String getDocumentName()
- Returns the document name.
- Returns:
- Returns the document name.
getNodeSelector
public NodeSelector getNodeSelector()
- Returns the NodeSelector if constructed with the XCAP URI.
- Returns:
- Returns the NodeSelector if constructed with the XCAP URI.
getXcapRoot
public java.lang.String getXcapRoot()
- Returns the XcapRoot if constructed with the XCAP URI.
- Returns:
- Returns the XcapRoot if constructed with the XCAP URI.
getXui
public java.lang.String getXui()
- Returns the XUI of the document selector.
- Returns:
- Returns the XUI of the document selector.
isGlobalDocument
public boolean isGlobalDocument()
- Returns whether the document selector references a global document
- Returns:
- Returns true if global and false if users document
substituteAuid
public DocumentSelector substituteAuid(java.lang.String auid)
- Returns a DocumentSelector with the AUID substituted with the specified
parameter.
- Parameters:
auid
- The AUID used for substitution.
- Returns:
- Returns a DocumentSelector with the AUID substituted with the
specified parameter.
substituteDocumentName
public DocumentSelector substituteDocumentName(java.lang.String documentName)
- Returns a DocumentSelector with the document name substituted with the
specified parameter.
- Parameters:
documentName
- The document name used for substitution.
- Returns:
- Returns a DocumentSelector with the document name substituted
with the specified parameter.
extractAuid
public static java.lang.String extractAuid(java.lang.String xcapURI)
throws java.net.MalformedURLException
- Extracts the AUID from an XCAP URI
- Parameters:
xcapURI
- XCAP URI
- Returns:
- The AUID in this XCAP URI
- Throws:
java.net.MalformedURLException
- If the AUID was not found