Class TcapOperation
- java.lang.Object
-
- com.opencloud.util.ImmutableDataObject
-
- TcapOperation
-
- All Implemented Interfaces:
DataObject
,Immutable
,Serializable
public final class TcapOperation extends ImmutableDataObject
Describes a single TCAP operation. This corresponds to the OPERATION information object class defined in the ITU X.880 ASN.1 module Remote-Operations-Information-Objects {joint-iso-itu-t remote-operations(4) informationObjects(5) version1(0)}.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TcapOperation.OperationClass
Enum for TCAP Class of Operation, as defined in ITU Q.773.
-
Constructor Summary
Constructors Constructor Description TcapOperation(TcapOperation parent, String fieldName, String protocolName, String moduleName, String valuerefName, String apiName, Code code, TcapOperation.OperationClass classOfOperation, String argTypeName, boolean argOptional, String resultTypeName, boolean resultOptional, TcapError[] errors, TcapOperation[] linkedOperations, EventTypeID invokeEventTypeID, String invokeEventClassName, EventTypeID resultEventTypeID, String resultEventClassName)
Constructs a new TcapOperation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getAPIName()
Get the name used in this API for this operation.Class<?>
getArgumentType(ClassLoader loader)
Get the Java Class used to carry the argument of this operation.String
getArgumentTypeName()
Get the name of the Java class used to carry the argument of this operation.String
getASN1Module()
Get the name of the ASN.1 module containing the definition of this operationString
getASN1Name()
Get the ASN.1 value reference name defining this operationTcapOperation
getBaseOperation()
Get the base operation of this operation.TcapError[]
getErrors()
Get the set of allowable User Errors returned by this operation.String
getFieldName()
Get the field name of this operation.Class<?>
getInvokeEventClass(ClassLoader loader)
Get the event class to use for this operation's invoke eventsString
getInvokeEventClassName()
Get the name of the event class to use for this operation's invoke eventsEventTypeID
getInvokeEventTypeID()
Get the event type to use for this operation's invoke eventsTcapOperation[]
getLinkedOperations()
Get the set of allowable linked operations associated with this operation.TcapOperation.OperationClass
getOperationClass()
Get the TCAP class of operation of this operation.Code
getOperationCode()
Get the operation code of this operation.TcapOperation
getParentOperation()
Get the parent operation of this operation.String
getProtocolName()
Get the name of the operation's protocol.Class<?>
getResultEventClass(ClassLoader loader)
Get the event class to use for this operation's result eventsString
getResultEventClassName()
Get the event class name to use for this operation's result eventsEventTypeID
getResultEventTypeID()
Get the event type to use for this operation's result eventsClass<?>
getResultType(ClassLoader loader)
Get the Java Class used to carry the result of this operation.String
getResultTypeName()
Get the name of the Java class used to carry the result of this operation.int
hashCode()
boolean
isA(TcapOperation other)
Test if this is a suboperation of another operationboolean
isArgumentOptional()
Check if the argument to this operation is optional.boolean
isResultOptional()
Check if the result data for this operation is optional.String
toString()
-
Methods inherited from class com.opencloud.util.ImmutableDataObject
clone, isReadOnly, setReadOnly
-
-
-
-
Constructor Detail
-
TcapOperation
public TcapOperation(TcapOperation parent, String fieldName, String protocolName, String moduleName, String valuerefName, String apiName, Code code, TcapOperation.OperationClass classOfOperation, String argTypeName, boolean argOptional, String resultTypeName, boolean resultOptional, TcapError[] errors, TcapOperation[] linkedOperations, EventTypeID invokeEventTypeID, String invokeEventClassName, EventTypeID resultEventTypeID, String resultEventClassName)
Constructs a new TcapOperation.- Parameters:
parent
- the parent operation to extend, ornull
if this operation does not extend a parent operation.fieldName
- the full field name defining this operationprotocolName
- the name of this operation's protocolmoduleName
- the name of the ASN.1 module defining this operationvaluerefName
- the valueref name within the ASN.1 module for this operation definitionapiName
- the short name used within the API for this operationcode
- the operation code of the operationclassOfOperation
- the class of operationargTypeName
- the name of the Java class used to carry the argument of this operation, ornull
if the operation has no argumentargOptional
- true iff the operation argument is optionalresultTypeName
- the name of the Java class used to carry the result of this operation, ornull
if the operation has no resultresultOptional
- true iff the operation result is optionalerrors
- an array of possible user errors returned by this operation, ornull
if the operation allows no user errorslinkedOperations
- an array of possible linked operations for this operation, ornull
if the operation allows no linked operationsinvokeEventTypeID
- an EventTypeID instance indicating the type of event this operation's invokes will be fired as.invokeEventClassName
- the name of the Java class this operation's invokes will be fired as.resultEventTypeID
- an EventTypeID instance indicating the type of event this operation's results will be fired as, ornull
if this operation does not fire result eventsresultEventClassName
- the name of the Java class this operation's results will be fired as.- Throws:
NullPointerException
- if a required parameter isnull
IllegalArgumentException
- if the provided class of operation is inconsistent with the argument/result/error description provided
-
-
Method Detail
-
getFieldName
public String getFieldName()
Get the field name of this operation.- Returns:
- the field name
-
getProtocolName
public String getProtocolName()
Get the name of the operation's protocol.- Returns:
- the protocol name
-
getASN1Name
public String getASN1Name()
Get the ASN.1 value reference name defining this operation- Returns:
- the unqualified value reference name
-
getASN1Module
public String getASN1Module()
Get the name of the ASN.1 module containing the definition of this operation- Returns:
- the ASN.1 module name
-
getAPIName
public String getAPIName()
Get the name used in this API for this operation. This is used to construct names of event classes, helper methods, etc. and usually (but not always) it is the same as the ASN.1 value reference name.- Returns:
- the API name
-
getOperationCode
public Code getOperationCode()
Get the operation code of this operation.- Returns:
- the operation code
-
getOperationClass
public TcapOperation.OperationClass getOperationClass()
Get the TCAP class of operation of this operation.- Returns:
- the class of operation
-
getArgumentType
public Class<?> getArgumentType(ClassLoader loader)
Get the Java Class used to carry the argument of this operation.- Parameters:
loader
- the classloader to use to load the class- Returns:
- the argument type class, or
null
if the operation has no argument type defined - Throws:
TypeNotPresentException
- if the class cannot be loaded
-
getArgumentTypeName
public String getArgumentTypeName()
Get the name of the Java class used to carry the argument of this operation.- Returns:
- the argument type class name, or
null
if the operation has no argument type defined
-
isArgumentOptional
public boolean isArgumentOptional()
Check if the argument to this operation is optional.- Returns:
- true iff the operation argument is optional
-
getResultType
public Class<?> getResultType(ClassLoader loader)
Get the Java Class used to carry the result of this operation.- Parameters:
loader
- the classloader to use to load the class- Returns:
- the result type class, or
null
if the operation has no result type defined or the operation does not returns success - Throws:
TypeNotPresentException
- if the class cannot be loaded
-
getResultTypeName
public String getResultTypeName()
Get the name of the Java class used to carry the result of this operation.- Returns:
- the result type class name, or
null
if the operation has no result type defined or the operation does not returns success
-
isResultOptional
public boolean isResultOptional()
Check if the result data for this operation is optional.- Returns:
- true iff the result data is optional
-
getErrors
public TcapError[] getErrors()
Get the set of allowable User Errors returned by this operation. If there are no allowable errors, or the operation does not return on failure, then a zero-sized array will be returned.- Returns:
- a non-null set of TcapError instances
-
getLinkedOperations
public TcapOperation[] getLinkedOperations()
Get the set of allowable linked operations associated with this operation. If there are no allowable linked operations, then a zero-sized array will be returned.- Returns:
- a non-null set of TcapOperation instances
-
getInvokeEventTypeID
public EventTypeID getInvokeEventTypeID()
Get the event type to use for this operation's invoke events- Returns:
- the event type
-
getInvokeEventClass
public Class<?> getInvokeEventClass(ClassLoader loader)
Get the event class to use for this operation's invoke events- Parameters:
loader
- the classloader to use to load the class- Returns:
- the event class
- Throws:
TypeNotPresentException
- if the class cannot be loaded
-
getInvokeEventClassName
public String getInvokeEventClassName()
Get the name of the event class to use for this operation's invoke events- Returns:
- the event class name
-
getResultEventTypeID
public EventTypeID getResultEventTypeID()
Get the event type to use for this operation's result events- Returns:
- the event type
-
getResultEventClass
public Class<?> getResultEventClass(ClassLoader loader)
Get the event class to use for this operation's result events- Parameters:
loader
- the classloader to use to load the class- Returns:
- the event class
- Throws:
TypeNotPresentException
- if the class cannot be loaded
-
getResultEventClassName
public String getResultEventClassName()
Get the event class name to use for this operation's result events- Returns:
- the event class name
-
getParentOperation
public TcapOperation getParentOperation()
Get the parent operation of this operation.- Returns:
- the parent operation of this operation, or
null
if this operation has no parent.
-
getBaseOperation
public TcapOperation getBaseOperation()
Get the base operation of this operation. This is the "topmost" parent operation in the operation hierarchy, which has no declared parent itself.- Returns:
- the base operation of this operation, or
this
if this operation has no parent.
-
isA
public boolean isA(TcapOperation other)
Test if this is a suboperation of another operation- Parameters:
other
- the other operation to test against- Returns:
- true if
other
is a transitive parent of this operation
-
-