Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.portal.resolver.operations
Class OperationURIjava.lang.Objectcom.ibm.portal.resolver.uri.BaseURI
com.ibm.portal.resolver.operations.OperationURI
- All Implemented Interfaces:
- Constants
public class OperationURI- extends BaseURI
- implements Constants
URI which can be used to address operations. The URI has the following format: op:
( ) Examples:
- op:ibm.portal.operations.changePortletMode({"resourceURI": "pm:oid:123@oid:123", "portletMode": "edit_defaults"})
- op:ibm.portal.operations.logoutUser()
- op:sample.anyAction({"a": "b", "c": "d"})
The operation identifier denotes the operation that should be addressed. The operation arguments need to be formatted as a JSON object. A special (optional) property named "resourceURI" identifies the model resource the operation should be applied to. In addition to that property, the JSON arguments object may contain other operation-specific properties.
Use the static newInstance method to create operation URIs.
- Since:
- 8.0
Field Summary
Fields inherited from class com.ibm.portal.resolver.uri.BaseURI NULL_FACTORY
Fields inherited from interface com.ibm.portal.resolver.operations.Constants KEY_ERROR_URI, KEY_REDIRECT_URL, OPERATION_URI_SCHEME, RESOURCE_URI
Fields inherited from interface com.ibm.portal.resolver.uri.Constants ESCAPE_CHAR, ESCAPE_STRG
Constructor Summary OperationURI(java.lang.String aOperationID, java.net.URI aResourceURI, java.util.Map<java.lang.String,java.lang.String[]> aOperationArgs, PocURIFactory aURIFactory, JSONHandlerFactory aJsonFactory)
Create a new OperationURI bean based on the given data.OperationURI(java.net.URI aURI, PocURIFactory aURIFactory, JSONHandlerFactory aJsonFactory)
Parses the given operation URI.
Method Summary java.util.Map<java.lang.String,java.lang.String[]> getArguments()
Return the optional map of operation arguments.java.lang.String getIdentifier()
Return the operation identifier.java.net.URI getResourceURI()
Return the URI identifying the resource the operation should be applied to.java.net.URI getURI()
Return the URI representation of the entire operation URI.static java.net.URI newInstance(java.lang.String aOperationID, java.net.URI aResourceURI, java.util.Map<java.lang.String,java.lang.String[]> aOperationArgs, JSONHandlerFactory aJsonFactory, PocURIFactory aURIFactory)
Creates a new URI that represents an OperationsURIjava.lang.String toString()
Methods inherited from class com.ibm.portal.resolver.uri.BaseURI createURI, createURI, createURI, createURI, decode, decode, decode, decode, encode, encode, normalizeRawSchemeSpecificPart, normalizeRawSchemeSpecificPart
Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail OperationURI
public OperationURI(java.lang.String aOperationID, java.net.URI aResourceURI, java.util.Map<java.lang.String,java.lang.String[]> aOperationArgs, PocURIFactory aURIFactory, JSONHandlerFactory aJsonFactory) throws java.net.URISyntaxException, java.io.IOException
- Create a new OperationURI bean based on the given data.
- Parameters:
- aOperationID - The operation identifier. Must not be null.
- aResourceURI - The resource URI. May be null.
- aOperationArgs - Map of operation arguments. May be null.
- Throws:
- java.io.IOException
- java.net.URISyntaxException
OperationURI
public OperationURI(java.net.URI aURI, PocURIFactory aURIFactory, JSONHandlerFactory aJsonFactory) throws java.net.URISyntaxException, java.io.IOException
- Parses the given operation URI.
- Parameters:
- aURI - Operation URI to parse. Must not be null.
- aURIFactory - Factory to create URIs. Must not be null.
- Throws:
- java.net.URISyntaxException - If the syntax of the operation URI is invalid.
- java.io.IOException - If the parsing fails.
Method Detail getIdentifier
public java.lang.String getIdentifier()
- Returns the operation identifier.
getResourceURI
public java.net.URI getResourceURI()
- Returns the URI identifying the resource the operation should be applied to. May be null.
getURI
public java.net.URI getURI()
- Returns the URI representation of the entire operation URI. May be null
getArguments
public java.util.Map<java.lang.String,java.lang.String[]> getArguments()
- Returns the optional map of operation arguments. May be null .
newInstance
public static final java.net.URI newInstance(java.lang.String aOperationID, java.net.URI aResourceURI, java.util.Map<java.lang.String,java.lang.String[]> aOperationArgs, JSONHandlerFactory aJsonFactory, PocURIFactory aURIFactory) throws java.net.URISyntaxException, java.io.IOException
- Creates a new URI that represents an OperationsURI
- Parameters:
- aOperationID - Operation ID. Must not be null.
- aResourceURI - URI of the resource the operation should be applied to. May be null.
- aOperationArgs - Optional argument list. May be null.
- aURIFactory - Factory to create URIs. Must not be null.
- Throws:
- java.net.URISyntaxException
- java.io.IOException
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD