
public abstract class Operation extends Object implements Serializable, Comparable<Operation>
| Modifier and Type | Field and Description |
|---|---|
protected Message |
message |
protected Relation |
relation |
| Modifier | Constructor and Description |
|---|---|
protected |
Operation(Message message,
Relation relation) |
| Modifier and Type | Method and Description |
|---|---|
static Operation |
castOperation(Operation operation)
Factory method that casts an Operation to the right subclass, e.g. to a GetOperation.
|
int |
compareTo(Operation other) |
boolean |
equals(Object object) |
static Operation |
fromMessageAndRelation(Message message,
Relation relation)
Factory method that creates an XDI operation bound to a given relation.
|
Message |
getMessage()
Returns the XDI message to which this XDI operation belongs.
|
MessageCollection |
getMessageCollection()
Returns the XDI message collection to which this XDI operation belongs.
|
MessageEnvelope |
getMessageEnvelope()
Returns the XDI message envelope to which this XDI operation belongs.
|
XDIAddress |
getOperationXDIAddress()
Returns the operation XRI of the XDI operation (e.g.
|
Object |
getParameter(XDIAddress parameterAddress)
Returns a parameter value of this operation.
|
Boolean |
getParameterBoolean(XDIAddress parameterAddress)
Returns a parameter value boolean of this operation.
|
Number |
getParameterNumber(XDIAddress parameterAddress)
Returns a parameter value number of this operation.
|
String |
getParameterString(XDIAddress parameterAddress)
Returns a parameter value string of this operation.
|
Relation |
getRelation()
Returns the underlying relation to which this XDI operation is bound.
|
ContextNode |
getSender()
Returns the sender of the operation's message collection.
|
XDIAddress |
getSenderXDIAddress()
Returns the sender address of the operation's message collection.
|
XdiInnerRoot |
getTargetInnerRoot()
Returns the target inner root of the operation.
|
XDIAddress |
getTargetXDIAddress()
Returns the target address of the operation.
|
Iterator<XDIStatement> |
getTargetXDIStatements()
Returns the target statements of the operation.
|
int |
hashCode() |
boolean |
isReadOnlyOperation()
Is this a read-only operation?
|
static boolean |
isValid(Relation relation)
Checks if an relation is a valid XDI operation.
|
void |
setParameter(XDIAddress parameterAddress,
Object parameterValue)
Sets a parameter value of this operation.
|
String |
toString() |
public static boolean isValid(Relation relation)
relation - The relation to check.public static Operation fromMessageAndRelation(Message message, Relation relation)
message - The XDI message to which this XDI operation belongs.relation - The relation that is an XDI operation.public static Operation castOperation(Operation operation)
operation - The Operation to be cast.public Message getMessage()
public MessageCollection getMessageCollection()
public MessageEnvelope getMessageEnvelope()
public Relation getRelation()
public XDIAddress getOperationXDIAddress()
public XdiInnerRoot getTargetInnerRoot()
public XDIAddress getTargetXDIAddress()
public Iterator<XDIStatement> getTargetXDIStatements()
public ContextNode getSender()
public XDIAddress getSenderXDIAddress()
public boolean isReadOnlyOperation()
public void setParameter(XDIAddress parameterAddress, Object parameterValue)
parameterAddress - The parameter XRI.parameterValue - The parameter value.public Object getParameter(XDIAddress parameterAddress)
parameterAddress - The parameter XRI.public String getParameterString(XDIAddress parameterAddress)
parameterAddress - The parameter XRI.public Number getParameterNumber(XDIAddress parameterAddress)
parameterAddress - The parameter XRI.public Boolean getParameterBoolean(XDIAddress parameterAddress)
parameterAddress - The parameter XRI.public int compareTo(Operation other)
compareTo in interface Comparable<Operation>Copyright © 2015. All Rights Reserved.