com.sapportals.wcm.service.relation

Interface IRelationOperand

All Known Subinterfaces:
IRelationOperandExtended
All Known Implementing Classes:
AbstractRelationOperand, ResourceOperand, StringOperand

public interface IRelationOperand

A IRelation s operand - the so called source or target of a relation.
IRelationOperand s belong to a IRelationOperandType . The wrap the objects they reference to enable type checking within the relation service.
Each IRelationOperand implementation should also implement the method getValue() to retrieve the operands wrapped object without a type cast.


Method Summary
 IResource asResource()
          Get the relation operand as resource, if this operand is managed by a repository manager.
 String getID()
          Get the relation operand's unique id.
 Object getObject()
          Get the relation operand's unwrapped object.
 IRelation getRelationBySource(IRelationType type, IRelationOperand target)
          same as type.getRelation(this, target);
 IRelation getRelationByTarget(IRelationType type, IRelationOperand source)
          same as type.getRelation(source, this);
 IRelationList getRelationsBySource(IRelationType type)
          same as type.getRelationBySource(this);
 IRelationList getRelationsBySource(IResourceContext context)
          same as IRelationService.getRelationsBySource(context, this);
 IRelationList getRelationsBySource(IResourceContext context, IRelationOperand target)
          same as IRelationService.getRelations(context, this, target);
 IRelationList getRelationsByTarget(IRelationType type)
          same as type.getRelationByTarget(this);
 IRelationList getRelationsByTarget(IResourceContext context)
          same as IRelationService.getRelationsByTarget(context, this);
 IRelationList getRelationsByTarget(IResourceContext context, IRelationOperand source)
          same as IRelationService.getRelations(source, this);
 IRelationOperandType getType()
          Get the relation operand's type.
 

Method Detail

getType

IRelationOperandType getType()
                             throws ResourceException
Get the relation operand's type.

Returns:
a IRelationOperandType with the type of this operand.
Throws:
ResourceException - an error occured while retrieving the operand's type.

getID

String getID()
             throws ResourceException
Get the relation operand's unique id.

Returns:
a String with the unique id of this operand. the id is only unique within the operand's type.
Throws:
ResourceException - an error occured while retrieving the operand's id.

getObject

Object getObject()
Get the relation operand's unwrapped object.

Returns:
an Object with the unwrapped operand, referenced by this IRelationOperand .

asResource

IResource asResource()
                     throws ResourceException
Get the relation operand as resource, if this operand is managed by a repository manager.

Returns:
a IResource with the resource represented by this operand. returns null , if this operand can not be converted to a resource.
Throws:
ResourceException - an error occured while retrieving the operand's resource.

getRelationsBySource

IRelationList getRelationsBySource(IResourceContext context)
                                   throws InvalidArgumentException,
                                          AccessDeniedException,
                                          ResourceException
same as IRelationService.getRelationsBySource(context, this);

Parameters:
context - TBD: Description of the incoming method parameter
Returns:
relationsBySource
Throws:
InvalidArgumentException - Exception raised in failure situation
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation

getRelationsBySource

IRelationList getRelationsBySource(IRelationType type)
                                   throws InvalidArgumentException,
                                          AccessDeniedException,
                                          ResourceException
same as type.getRelationBySource(this);

Parameters:
type - TBD: Description of the incoming method parameter
Returns:
relationsBySource
Throws:
InvalidArgumentException - Exception raised in failure situation
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation

getRelationsBySource

IRelationList getRelationsBySource(IResourceContext context,
                                   IRelationOperand target)
                                   throws InvalidArgumentException,
                                          AccessDeniedException,
                                          ResourceException
same as IRelationService.getRelations(context, this, target);

Parameters:
context - TBD: Description of the incoming method parameter
target - TBD: Description of the incoming method parameter
Returns:
relationsBySource
Throws:
InvalidArgumentException - Exception raised in failure situation
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation

getRelationBySource

IRelation getRelationBySource(IRelationType type,
                              IRelationOperand target)
                              throws InvalidArgumentException,
                                     AccessDeniedException,
                                     ResourceException
same as type.getRelation(this, target);

Parameters:
type - TBD: Description of the incoming method parameter
target - TBD: Description of the incoming method parameter
Returns:
relationBySource
Throws:
InvalidArgumentException - Exception raised in failure situation
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation

getRelationsByTarget

IRelationList getRelationsByTarget(IResourceContext context)
                                   throws InvalidArgumentException,
                                          AccessDeniedException,
                                          ResourceException
same as IRelationService.getRelationsByTarget(context, this);

Parameters:
context - TBD: Description of the incoming method parameter
Returns:
relationsByTarget
Throws:
InvalidArgumentException - Exception raised in failure situation
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation

getRelationsByTarget

IRelationList getRelationsByTarget(IRelationType type)
                                   throws InvalidArgumentException,
                                          AccessDeniedException,
                                          ResourceException
same as type.getRelationByTarget(this);

Parameters:
type - TBD: Description of the incoming method parameter
Returns:
relationsByTarget
Throws:
InvalidArgumentException - Exception raised in failure situation
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation

getRelationsByTarget

IRelationList getRelationsByTarget(IResourceContext context,
                                   IRelationOperand source)
                                   throws InvalidArgumentException,
                                          AccessDeniedException,
                                          ResourceException
same as IRelationService.getRelations(source, this);

Parameters:
context - TBD: Description of the incoming method parameter
source - TBD: Description of the incoming method parameter
Returns:
relationsByTarget
Throws:
InvalidArgumentException - Exception raised in failure situation
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation

getRelationByTarget

IRelation getRelationByTarget(IRelationType type,
                              IRelationOperand source)
                              throws InvalidArgumentException,
                                     AccessDeniedException,
                                     ResourceException
same as type.getRelation(source, this);

Parameters:
type - TBD: Description of the incoming method parameter
source - TBD: Description of the incoming method parameter
Returns:
relationByTarget
Throws:
InvalidArgumentException - Exception raised in failure situation
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice