SAP NetWeaver '04

com.sapportals.wcm.service.relation
Interface IRelation

[contained in: com.sap.netweaver.bc.rf.service.par - bc.rf.global.service.relation_api.jar]
All Known Subinterfaces:
IOrderedRelation

public interface IRelation

A relation.


Method Summary
 void delete()
          Delete a given relation.
 void deleteProperties(IPropertyNameList propertyNameList)
          Delete several specified properties (if they exist).
 void deleteProperty(IPropertyName propertyName)
          Delete a specific property.
 java.lang.String getID()
          Get the relation's unique id. the id is only unique with respect to the relation's type.
 IOrderedRelationPosition getPosition()
          Get the relation's positioning. (only supported for IOrderedRelation s).
 IPropertyMap getProperties()
          Get all properties of the relation.
 IPropertyMap getProperties(IPropertyNameList propertyNameList)
          Get several specified properties.
 IProperty getProperty(IPropertyName propertyName)
          Get a specific property.
 IRelationOperand getSource()
          Get the relation's source operand.
 java.lang.Object getSourceOperand()
          Get the relation's source operand's value.
 IRelationOperand getTarget()
          Get the relation's target operand.
 java.lang.Object getTargetOperand()
          Get the relation's target operand's value.
 IRelationType getType()
          Get the relation's type.
 void setPosition(IOrderedRelationPosition position)
          Change the relation's position (only supported for IOrderedRelation s).
 void setProperties(IPropertyMap properties)
          Set several specified properties.
 void setProperty(IProperty property)
          Set a specific property.
 IRelation setSource(IRelationOperand source)
          Set the relation's source operand.
 IRelation setSourceOperand(java.lang.Object source)
          Set the relation's source operand by value.
 IRelation setTarget(IRelationOperand target)
          Set the relation's target operand.
 IRelation setTargetOperand(java.lang.Object target)
          Set the relation's target operand value.
 

Method Detail

getID

public java.lang.String getID()
Get the relation's unique id. the id is only unique with respect to the relation's type.
Returns:
a String with the unique id of the relation.

getType

public IRelationType getType()
Get the relation's type.
Returns:
the IRelationType of the relation.

getSource

public IRelationOperand getSource()
                           throws AccessDeniedException,
                                  ResourceException
Get the relation's source operand.
Returns:
the IRelationOperand with the wrapped source operand of the relation or null if the source isn't retrievable any more.
Throws:
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
AccessDeniedException - if the operand is not gettable within the context of the relation type.
ResourceException - if there was an error while retrieving the source operand.

getSourceOperand

public java.lang.Object getSourceOperand()
                                  throws AccessDeniedException,
                                         ResourceException
Get the relation's source operand's value.
Returns:
the Object with the unwrapped source operand of the relation.
Throws:
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
AccessDeniedException - if the operand is not gettable within the context of the relation type.
ResourceException - if there was an error while retrieving the source operand.

setSource

public IRelation setSource(IRelationOperand source)
                    throws InvalidArgumentException,
                           AccessDeniedException,
                           ResourceException
Set the relation's source operand.
Parameters:
source - the IRelationOperand with the wrapped operand to set as source operand for the relation.
Returns:
the changed IRelation with the new target operand.
Throws:
InvalidArgumentException - Exception raised in failure situation
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
InvalidArgumentException - if the source is null .
AccessDeniedException - if the source is not settable within the context of the relation type.
ResourceException - if there was an error while setting the source operand.

setSourceOperand

public IRelation setSourceOperand(java.lang.Object source)
                           throws InvalidArgumentException,
                                  AccessDeniedException,
                                  ResourceException
Set the relation's source operand by value.
Parameters:
source - an Object with the operand value to set as source operand for the relation.
Returns:
the changed IRelation with the new target operand.
Throws:
InvalidArgumentException - Exception raised in failure situation
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
InvalidArgumentException - if the source value is null .
AccessDeniedException - if the source is not settable within the context of the relation type.
ResourceException - if there was an error while setting the source operand.

getTarget

public IRelationOperand getTarget()
                           throws AccessDeniedException,
                                  ResourceException
Get the relation's target operand.
Returns:
the IRelationOperand with the wrapped target operand of the relation or null if the target isn't retrievable any more.
Throws:
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
AccessDeniedException - if the operand is not gettable within the context of the relation type.
ResourceException - if there was an error while retrieving the target operand.

getTargetOperand

public java.lang.Object getTargetOperand()
                                  throws AccessDeniedException,
                                         ResourceException
Get the relation's target operand's value.
Returns:
the Object with the unwrapped target operand value of the relation.
Throws:
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
AccessDeniedException - if the operand is not gettable within the context of the relation type.
ResourceException - if there was an error while retrieving the target operand.

setTarget

public IRelation setTarget(IRelationOperand target)
                    throws InvalidArgumentException,
                           AccessDeniedException,
                           ResourceException
Set the relation's target operand.
Parameters:
target - the IRelationOperand with the wrapped operand to set as target operand for the relation.
Returns:
the changed IRelation with the new target operand.
Throws:
InvalidArgumentException - Exception raised in failure situation
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
InvalidArgumentException - if the target is null .
AccessDeniedException - if the target is not settable within the context of the relation type.
ResourceException - if there was an error while setting the target operand.

setTargetOperand

public IRelation setTargetOperand(java.lang.Object target)
                           throws InvalidArgumentException,
                                  AccessDeniedException,
                                  ResourceException
Set the relation's target operand value.
Parameters:
target - the Object with the operand value to set as target operand for the relation.
Returns:
the changed IRelation with the new target operand.
Throws:
InvalidArgumentException - Exception raised in failure situation
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
InvalidArgumentException - if the target is null .
AccessDeniedException - if the target is not settable within the context of the relation type.
ResourceException - if there was an error while setting the target operand.

getProperties

public IPropertyMap getProperties()
                           throws AccessDeniedException,
                                  ResourceException
Get all properties of the relation.
Returns:
a IPropertyMap with the references to all properties of the relation.
Throws:
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
AccessDeniedException - if the properties are not gettable within the context of the relation type.
ResourceException - if there was an error in the relation manager.

getProperties

public IPropertyMap getProperties(IPropertyNameList propertyNameList)
                           throws AccessDeniedException,
                                  ResourceException
Get several specified properties.
Parameters:
propertyNameList - a IPropertyNameList as a list with the names of the requested properties.
Returns:
a IPropertyMap with the references to the requested and exisiting properties. The list might be empty if no properties with the given names where found. if the given list of names was null all properties are selected.
Throws:
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
AccessDeniedException - if the properties are not gettable within the context of the relation type.
ResourceException - if there was an error in the relation manager.

setProperties

public void setProperties(IPropertyMap properties)
                   throws AccessDeniedException,
                          ResourceException
Set several specified properties. Properties which already exist will change their values, those which do not will be added. Nothing happens, if the given properties are null .
Parameters:
properties - a IPropertyMap as a list of properties to add or change.
Throws:
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
AccessDeniedException - if the properties are not gettable within the context of the relation type.
ResourceException - if there was an error in the relation manager.

deleteProperties

public void deleteProperties(IPropertyNameList propertyNameList)
                      throws AccessDeniedException,
                             ResourceException
Delete several specified properties (if they exist). Nothing happens if the given list is null .
Parameters:
propertyNameList - a IPropertyNameList as a list with the names of the properties to delete.
Throws:
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
AccessDeniedException - if the properties are not deleteable within the context of the relation type.
ResourceException - if there was an error in the relation manager.

getProperty

public IProperty getProperty(IPropertyName propertyName)
                      throws AccessDeniedException,
                             ResourceException
Get a specific property.
Parameters:
propertyName - a IPropertyName with the name of the property to read.
Returns:
a IProperty with a reference to the property or null if the property was not found or the given property name was null .
Throws:
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
AccessDeniedException - if the property is not gettable within the context of the relation type.
ResourceException - if there was an error in the relation manager.

setProperty

public void setProperty(IProperty property)
                 throws AccessDeniedException,
                        ResourceException
Set a specific property. If the property does not exist it will be added, otherwise it's value is changed. If the given property is null , nothing happens.
Parameters:
property - the IProperty to set.
Throws:
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
AccessDeniedException - if the property is not settable within the context of the relation type.
ResourceException - if there was an error in the relation manager.

deleteProperty

public void deleteProperty(IPropertyName propertyName)
                    throws AccessDeniedException,
                           ResourceException
Delete a specific property. If the property does not exist or is null , the method will return without doing anything.
Parameters:
propertyName - TBD: Description of the incoming method parameter
Throws:
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
AccessDeniedException - if the property is not deleteable within the context of the relation type.
ResourceException - if there was an error in the relation manager.

delete

public void delete()
            throws AccessDeniedException,
                   ResourceException
Delete a given relation.
Throws:
AccessDeniedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
AccessDeniedException - if the given context (as passed when retrieving the relation type) has no permissions to delete the relation.
ResourceException - if there was an internal error in the relation manager.

getPosition

public IOrderedRelationPosition getPosition()
                                     throws NotSupportedException,
                                            ResourceException
Get the relation's positioning. (only supported for IOrderedRelation s).
Returns:
the IOrderedRelationPosition of the relation. is OrderedRelationType.LAST , if it's the last relation with respect to the relations type and source, otherwise the type is OrderType.AFTER and the relative is the predecessors id.
Throws:
NotSupportedException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
NotSupportedException - if this relation does not belong to a ordered relation type.
ResourceException - if there was an internal error in the relation manager.

setPosition

public void setPosition(IOrderedRelationPosition position)
                 throws NotSupportedException,
                        InvalidArgumentException,
                        ResourceException
Change the relation's position (only supported for IOrderedRelation s).
Parameters:
position - the new IOrderedRelationPosition for this relation. if null, the relation's position remains unchanged.
Throws:
NotSupportedException - Exception raised in failure situation
InvalidArgumentException - Exception raised in failure situation
ResourceException - Exception raised in failure situation
NotSupportedException - if this relation does not belong to a ordered relation type.
InvalidArgumentException - if the given position can not be used for this relation.
ResourceException - if there was an internal error in the relation manager.

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.