SAP NetWeaver '04

com.sapportals.wcm.service.relation.operands
Class ResourceOperand

[contained in: com.sap.netweaver.bc.rf.service.par - bc.rf.global.service.relation_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.service.relation.operands.AbstractRelationOperand
        |
        +--com.sapportals.wcm.service.relation.operands.ResourceOperand
All Implemented Interfaces:
IRelationOperand

public class ResourceOperand
extends AbstractRelationOperand

IRelationOperand implementation for IResource s.


Field Summary
protected  IResource resource
           
protected  RID rid
           
 
Constructor Summary
ResourceOperand(IResource resource)
          Create a RelationOperand out of a IResource .
ResourceOperand(RID rid)
          Create a RelationOperand out of a IResource .
 
Method Summary
 IResource asResource()
          Get the relation operand as resource, if this operand is managed by a repository manager.
 boolean equals(java.lang.Object object)
           
 java.lang.String getID()
          Get the relation operand's unique id.
 IResource getLinkValue()
          If the wrapped resource is an internal link, return the target of the link (following several links). if it's not a internal link just return the resource.
 java.lang.Object getObject()
          Get the relation operand's unwrapped object.
 IRelationOperandType getType()
          Get the relation operand's type.
 IResource getValue()
          Get the wrapped resource.
 
Methods inherited from class com.sapportals.wcm.service.relation.operands.AbstractRelationOperand
getRelationBySource, getRelationByTarget, getRelationsBySource, getRelationsBySource, getRelationsBySource, getRelationsByTarget, getRelationsByTarget, getRelationsByTarget
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resource

protected IResource resource

rid

protected RID rid
Constructor Detail

ResourceOperand

public ResourceOperand(IResource resource)
                throws InvalidArgumentException
Create a RelationOperand out of a IResource .
Parameters:
resource - the IResource to wrap.
Throws:
InvalidArgumentException - if the given resource is null .

ResourceOperand

public ResourceOperand(RID rid)
                throws InvalidArgumentException
Create a RelationOperand out of a IResource .
Parameters:
rid - TBD: Description of the incoming method parameter
Throws:
InvalidArgumentException - if the given resource is null .
Method Detail

getValue

public IResource getValue()
Get the wrapped resource.
Returns:
the IResource for this operand.

getLinkValue

public IResource getLinkValue()
                       throws ResourceException
If the wrapped resource is an internal link, return the target of the link (following several links). if it's not a internal link just return the resource.
Returns:
the IResource for this operand if it's not an internal link, otherwise the target of this operand.
Throws:
ResourceException - Exception raised in failure situation

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

getType

public IRelationOperandType getType()
                             throws ResourceException
Description copied from interface: IRelationOperand
Get the relation operand's type.
Overrides:
getType in class AbstractRelationOperand
Following copied from interface: com.sapportals.wcm.service.relation.IRelationOperand
Returns:
a IRelationOperandType with the type of this operand.
Throws:
ResourceException - an error occured while retrieving the operand's type.

getID

public java.lang.String getID()
                       throws ResourceException
Description copied from interface: IRelationOperand
Get the relation operand's unique id.
Overrides:
getID in class AbstractRelationOperand
Following copied from interface: com.sapportals.wcm.service.relation.IRelationOperand
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

public java.lang.Object getObject()
Description copied from interface: IRelationOperand
Get the relation operand's unwrapped object.
Overrides:
getObject in class AbstractRelationOperand
Following copied from interface: com.sapportals.wcm.service.relation.IRelationOperand
Returns:
an Object with the unwrapped operand, referenced by this IRelationOperand .

asResource

public IResource asResource()
                     throws ResourceException
Description copied from interface: IRelationOperand
Get the relation operand as resource, if this operand is managed by a repository manager.
Overrides:
asResource in class AbstractRelationOperand
Following copied from interface: com.sapportals.wcm.service.relation.IRelationOperand
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.

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.