|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A service to store IRelation s between two objects.
A IRelation is relationship between two IRelationOperand
s, called source and target operand.
IRelation s belong to their IRelationType , which
in turn defines the type of the IRelationOperandType s for the
source and target.
For example: the RelationType object with name attached-to
would store the relationships between documents, thus the
RelationOperandTypes for source and target operands are
IRelation s. A specific relationship like '
/documents/public/specification.doc is attached-to
/documents/public/infos/project.doc ' is then a IRelation
object.
| Field Summary | |
static java.lang.String |
NAMESPACE
|
| Method Summary | |
IRelationTypeAttributes |
checkRelationTypeAttributes(IRelationTypeAttributes attributes,
IRelationOperandType sourceType,
IRelationOperandType targetType)
Get a checked set of attributes which are compatible with the given source and target operand types and can be use to created a IRelationType
. |
IRelationType |
createRelationType(IResourceContext context,
java.lang.String namespace,
java.lang.String name,
Descriptions descriptions,
IRelationOperandType sourceType,
IRelationOperandType targetType)
Create a new relation type for a given namespace and name if it does not already exist. |
IRelationType |
createRelationType(IResourceContext context,
java.lang.String namespace,
java.lang.String name,
Descriptions descriptions,
IRelationOperandType sourceType,
IRelationOperandType targetType,
IRelationTypeAttributes attributes)
Create a new relation type for a given namespace, name and set of attributes if it does not already exist. |
IRelationType |
createResourceRelationType(IResourceContext context,
java.lang.String namespace,
java.lang.String name,
Descriptions descriptions,
IRelationTypeAttributes attributes)
Convenience method to create a relation type for resources as source and target. |
IRelationType |
createStringRelationType(IResourceContext context,
java.lang.String namespace,
java.lang.String name,
Descriptions descriptions,
IRelationTypeAttributes attributes)
Convenience method to create a relation type for resources as source and strings as target. |
IRelationQueryBuilder |
getQueryBuilder()
Get a query builder to build search query expressions and order expressions for retrieving relations. |
IRelationList |
getRelationList()
Get an empty list for relations. |
IOrderedRelationPositioningList |
getRelationPositioningList()
Get an empty list for reordering. |
IRelationList |
getRelations(IResourceContext context,
IRelationOperand source,
IRelationOperand target)
Get all relations of any type for the given source and target. |
IRelationList |
getRelations(IResourceContext context,
IRelationQuery query)
Get the relations which match a given query expression. |
IRelationList |
getRelations(IResourceContext context,
IRelationQuery query,
IRelationQueryOrder order)
Get the relations which match a given query expression, ordered by a given order expression. |
IRelationList |
getRelationsBySource(IResourceContext context,
IRelationOperand source)
Get all relations of any type for the given source. |
IRelationList |
getRelationsByTarget(IResourceContext context,
IRelationOperand target)
Get all relations of any type for the given target. |
IRelationType |
getRelationType(IResourceContext context,
java.lang.String namespace,
java.lang.String name)
Get a specific relation type for a given namespace and name. |
IRelationTypeAttributes |
getRelationTypeAttributes(IRelationTypeHandler typeHandler,
IPropertyNameList requiredProperties,
boolean oneToOne,
boolean ordered,
boolean sourceDeleteTracking,
boolean targetDeleteTracking,
boolean sourceChangeTracking,
boolean targetChangeTracking)
Same as getRelationTypeAttributes(IRelationTypeHandler,
IPropertyNameList, boolean, boolean, boolean, boolean, boolean, boolean,
boolean, boolean) with sourceCopyTracking and
targetCopyTracking set to false |
IRelationTypeAttributes |
getRelationTypeAttributes(IRelationTypeHandler typeHandler,
IPropertyNameList requiredProperties,
boolean oneToOne,
boolean ordered,
boolean sourceDeleteTracking,
boolean targetDeleteTracking,
boolean sourceChangeTracking,
boolean targetChangeTracking,
boolean sourceCopyTracking,
boolean targetCopyTracking)
Get a set of unchecked attributes which can be use to created a
IRelationType . |
IRelationTypeHandler |
getRelationTypeHandler(java.lang.String id)
Get a type handler for a relation type (which defines 'workarea' for a relation type, like caches and tablespaces). |
IRelationTypeList |
getRelationTypeList()
Get an empty list for relation types. |
IRelationTypeList |
getRelationTypes(IResourceContext context)
Get a list of all relation types which are available within the given context. |
IRelationTypeList |
getRelationTypes(IResourceContext context,
java.lang.String namespace)
Get a list of all relation types of the given namespace which are available within the given context. |
| Methods inherited from interface com.sapportals.wcm.service.IService |
getDescription, getDescription, getID |
| Field Detail |
public static final java.lang.String NAMESPACE
| Method Detail |
public IRelationQueryBuilder getQueryBuilder()
throws ResourceException
IQueryBuilder which builds query and order
expressions which can be used with the getRelations(IResourceContext, IRelationQuery) and the
getRelations(IResourceContext, IRelationQuery, IRelationQueryOrder) methods.ResourceException - if there was an internal error
while retrieving the query builder.
public IRelationTypeHandler getRelationTypeHandler(java.lang.String id)
throws ResourceException
id - a String with the id of the type handler to retrieve
or null to get the default type handler.IRelationTypeHandler for the given id, or
null if no such handler exists.ResourceException - Exception raised in failure situationResourceException - if there was an internal error
while retrieving the handler.getRelationTypeAttributes(IRelationTypeHandler, IPropertyNameList, boolean, boolean, boolean, boolean, boolean, boolean)
public IRelationTypeAttributes getRelationTypeAttributes(IRelationTypeHandler typeHandler,
IPropertyNameList requiredProperties,
boolean oneToOne,
boolean ordered,
boolean sourceDeleteTracking,
boolean targetDeleteTracking,
boolean sourceChangeTracking,
boolean targetChangeTracking)
throws InvalidArgumentException,
ResourceException
getRelationTypeAttributes(IRelationTypeHandler,
IPropertyNameList, boolean, boolean, boolean, boolean, boolean, boolean,
boolean, boolean) with sourceCopyTracking and
targetCopyTracking set to falsetypeHandler - TBD: Description of the incoming method parameterrequiredProperties - TBD: Description of the incoming method parameteroneToOne - TBD: Description of the incoming method parameterordered - TBD: Description of the incoming method parametersourceDeleteTracking - TBD: Description of the incoming method
parametertargetDeleteTracking - TBD: Description of the incoming method
parametersourceChangeTracking - TBD: Description of the incoming method
parametertargetChangeTracking - TBD: Description of the incoming method
parameterInvalidArgumentException - Exception raised in failure situationResourceException - Exception raised in failure situation
public IRelationTypeAttributes getRelationTypeAttributes(IRelationTypeHandler typeHandler,
IPropertyNameList requiredProperties,
boolean oneToOne,
boolean ordered,
boolean sourceDeleteTracking,
boolean targetDeleteTracking,
boolean sourceChangeTracking,
boolean targetChangeTracking,
boolean sourceCopyTracking,
boolean targetCopyTracking)
throws InvalidArgumentException,
ResourceException
IRelationType .
IRelationOperandType s of a IRelationType , see
checkRelationTypeAttributes(IRelationTypeAttributes, IRelationOperandType, IRelationOperandType).typeHandler - a IRelationTypeHandler which defines the
workarea for this relation type (see getRelationTypeHandler(String))requiredProperties - a IPropertyNameList with the names
of the required properties.oneToOne - a boolean true if only one
relation per source operand id is allowed (1:1 relations).ordered - a boolean true if the relations
have an intrinsic order per type and source operand. Note that it
doesn't make much sense together with the oneToOne flag!sourceDeleteTracking - a boolean true if
relations should be deleted when their source operand is deleted.targetDeleteTracking - a boolean true if
relations should be deleted when their target operand is deleted.sourceChangeTracking - a boolean true if the
relations source operand should be changed when the object it
references is moved.targetChangeTracking - a boolean true if the
relations target operand should be changed when the object it
references is moved.sourceCopyTracking - a boolean true if the
another relation should be created between source-copy and target,
when an exisiting relations source is copied.targetCopyTracking - TBD: Description of the incoming method parameterIRelationTypeAttributes for the given
parameters.InvalidArgumentException - Exception raised in failure situationResourceException - Exception raised in failure situationInvalidArgumentException - if the given typeHandler is
not usable with this service.ResourceException - if there was an internal error
getting the relation type attributes.createRelationType(IResourceContext, String, String, Descriptions,
IRelationOperandType, IRelationOperandType, IRelationTypeAttributes)
public IRelationTypeAttributes checkRelationTypeAttributes(IRelationTypeAttributes attributes,
IRelationOperandType sourceType,
IRelationOperandType targetType)
throws InvalidArgumentException,
ResourceException
IRelationType
.
sourceDeleteTracking -parameter is true , but the
specified sourceType does not support delete tracking, this
method will reset the sourceDeleteTracking -parameter to
false in the attributes it returns.attributes - the IRelationTypeAttributes to check against
the given operand types.sourceType - the IRelationOperandType of the source
operands.targetType - the IRelationOperandType of the target
operands.IRelationTypeAttributes .InvalidArgumentException - if the given source- or
targetType is null , or if the given attribute's
typeHandler is not usable with this service.ResourceException - if there was an internal error
checking the relation type attributes.createRelationType(IResourceContext, String, String, Descriptions,
IRelationOperandType, IRelationOperandType, IRelationTypeAttributes)
public IRelationType createResourceRelationType(IResourceContext context,
java.lang.String namespace,
java.lang.String name,
Descriptions descriptions,
IRelationTypeAttributes attributes)
throws NameAlreadyExistsException,
InvalidArgumentException,
AccessDeniedException,
ResourceException
createRelationType(IResourceContext, String, String, Descriptions,
IRelationOperandType, IRelationOperandType, IRelationTypeAttributes) with
both IRelationOperandType s set to
ResourceOperandType .context - the IResourceContext to use for creating the
relation type.namespace - a String with the namespace of the relation
type.name - a String with the name of the relation type.descriptions - the set of Descriptions for this relation
type. if null , a default description is build from
namespace and name.attributes - a set of IRelationTypeAttributes to be used
for this relation type, may be unchecked. if null , the
default attributes are used.IRelationType with the given parameters, for
resource-type sources and resource-type targets.NameAlreadyExistsException - if the given namespace and
name are already assigned to a relation type.InvalidArgumentException - if the given namespace or
name are not valid (exceed the maximum length of 255 chars when
encoded) or the given context is null .AccessDeniedException - if the relation type could not
be created within the given context.ResourceException - if there was an internal error
creating the relation type.
public IRelationType createStringRelationType(IResourceContext context,
java.lang.String namespace,
java.lang.String name,
Descriptions descriptions,
IRelationTypeAttributes attributes)
throws NameAlreadyExistsException,
InvalidArgumentException,
AccessDeniedException,
ResourceException
createRelationType(IResourceContext, String, String, Descriptions,
IRelationOperandType, IRelationOperandType, IRelationTypeAttributes) with
sourceType set to
ResourceOperandType and
targetType set to StringOperandType .context - the IResourceContext to use for creating the
relation type.namespace - a String with the namespace of the relation
type.name - a String with the name of the relation type.descriptions - the set of Descriptions for this relation
type. if null , a default description is build from
namespace and name.attributes - a set of IRelationTypeAttributes to be used
for this relation type, may be unchecked. if null , the
default attributes are used.IRelationType with the given parameters, for
resource-type sources and string-type targets.NameAlreadyExistsException - if the given namespace and
name are already assigned to a relation type.InvalidArgumentException - if the given namespace or
name are not valid (exceed the maximum length of 255 chars when
encoded) or the given context is null .AccessDeniedException - if the relation type could not
be created within the given context.ResourceException - if there was an internal error
creating the relation type.
public IRelationType createRelationType(IResourceContext context,
java.lang.String namespace,
java.lang.String name,
Descriptions descriptions,
IRelationOperandType sourceType,
IRelationOperandType targetType)
throws NameAlreadyExistsException,
InvalidArgumentException,
AccessDeniedException,
ResourceException
createRelationType(IResourceContext, String,
String, Descriptions, IRelationOperandType, IRelationOperandType,
IRelationTypeAttributes) with attributes set to null
.context - the IResourceContext to use for creating the
relation type.namespace - a String with the namespace of the relation
type.name - a String with the name of the relation type.descriptions - the set of Descriptions for this relation
type. if null , a default description is build from
namespace and name.sourceType - the IRelationOperandType for the source
operands, e.g. ResourceOperandtargetType - the IRelationOperandType for the target
operands, e.g. StringOperandIRelationType for the given namespace and name.NameAlreadyExistsException - Exception raised in failure situationInvalidArgumentException - Exception raised in failure situationAccessDeniedException - Exception raised in failure situationResourceException - Exception raised in failure situationInvalidArgumentException - if the given namespace or
name are not valid (exceed the maximum length of 255 chars when
encoded) or the given context is null .AccessDeniedException - if the relation type could not
be created within the given context.ResourceException - if there was an internal error
creating the relation type.
public IRelationType createRelationType(IResourceContext context,
java.lang.String namespace,
java.lang.String name,
Descriptions descriptions,
IRelationOperandType sourceType,
IRelationOperandType targetType,
IRelationTypeAttributes attributes)
throws NameAlreadyExistsException,
InvalidArgumentException,
AccessDeniedException,
ResourceException
context - the IResourceContext to use for creating the
relation type.namespace - a String with the namespace of the relation
type, e.g. http://sap.com/xmlns/cm/service/relations .name - a String with the name of the relation type, e.g.
attached-to .descriptions - the set of Descriptions for this relation
type in several languages. if null , a default
description is build from namespace and name).sourceType - the IRelationOperandType for the source
operands.targetType - the IRelationOperandType for the target
operands.attributes - TBD: Description of the incoming method parameterIRelationType with the relation type for the given
namespace and name.NameAlreadyExistsException - if the given namespace and
name are already assigned to a relation type.InvalidArgumentException - if the given namespace or
name are not valid (exceed the maximum length of 255 chars when
encoded) or the given context is null .AccessDeniedException - if the relation type could not
be created within the given context.ResourceException - if there was an internal error
creating the relation type.
public IRelationTypeList getRelationTypeList()
throws ResourceException
IRelationTypeList .ResourceException - if there was an internal error
retrieving the list.
public IRelationTypeList getRelationTypes(IResourceContext context)
throws InvalidArgumentException,
ResourceException
context - the IResourceContext to use for retrieving the
relation types.IRelationTypeList with the list of relation types.InvalidArgumentException - if the given context is
null .ResourceException - if there was an internal error
retrieving the relations.
public IRelationTypeList getRelationTypes(IResourceContext context,
java.lang.String namespace)
throws InvalidArgumentException,
ResourceException
context - the IResourceContext to use for retrieving the
relation types.namespace - a String with the namespace of the relation
types to search for.IRelationTypeList with the list of relation types.InvalidArgumentException - Exception raised in failure situationResourceException - Exception raised in failure situationInvalidArgumentException - if the given namespace is
not valid (exceed the maximum length of 255 chars when encoded) or the
given context is null .ResourceException - if there was an internal error in
the relation manager.
public IRelationType getRelationType(IResourceContext context,
java.lang.String namespace,
java.lang.String name)
throws InvalidArgumentException,
AccessDeniedException,
ResourceException
context - the IResourceContext to use for retrieving the
relation type.namespace - a String with the namespace of the relation
type to look for.name - a String with the name of the relation type to
look for.IRelationType with the relation type for the given
namespace and name, or null if no such relation type
exists.InvalidArgumentException - if the given namespace or
name are not valid (exceed the maximum length of 255 chars when
encoded) or if the given context is null .AccessDeniedException - if the relation type could not
be accessed within the given context.ResourceException - if there was an internal error in
the relation manager.
public IRelationList getRelationList()
throws ResourceException
IRelationList .ResourceException - if there was an internal error
retrieving the list.
public IRelationList getRelations(IResourceContext context,
IRelationQuery query)
throws InvalidArgumentException,
RelationQueryException,
ResourceException
IRelationQueryBuilder
returned from getQueryBuilder().context - the IResourceContext to use for retrieving the
relations.query - the IRelationQuery the searched relations must
match. if null , all relations will be returned.IRelationList with all the relations that match the
given query. the list might be empty if no matching relations are
found. the list might become very large, if the query is not properly
specified.InvalidArgumentException - if the given query is not
understood or the given context is null .RelationQueryException - if the relation query was not
understood.ResourceException - if there was an internal error
executing the query or retrieving the relations.
public IRelationList getRelations(IResourceContext context,
IRelationQuery query,
IRelationQueryOrder order)
throws InvalidArgumentException,
AccessDeniedException,
RelationQueryException,
ResourceException
IRelationQueryBuilder returned from getQueryBuilder().context - the IResourceContext to use for retrieving the
relations.query - the IRelationQuery the searched relations must
match. if null , all relations will be returned.order - the IRelationQueryOrder the searched relation
list will be sorted with. if null , the list is not
ordered (same as getRelations(IResourceContext, IRelationQuery
)IRelationList with all the relations that match the
given query. the list might be empty if no matching relations are
found. the list might become very large, if the query is not properly
specified.AccessDeniedException - Exception raised in failure situationInvalidArgumentException - if the given query is not
understood or the given context is null .RelationQueryException - if the relation query was not
understood.ResourceException - if there was an internal error
executing the query or retrieving the relations.
public IRelationList getRelationsBySource(IResourceContext context,
IRelationOperand source)
throws InvalidArgumentException,
ResourceException
context - the IResourceContext to use for retrieving the
relations.source - the IRelationOperand which belongs to the
searched relations as source operand.IRelationList with all the relations for the given
source operand. the list might be empty if no matching relations are
found.InvalidArgumentException - if the given source operand
is null .ResourceException - if there was an internal error
while retrieving the relations.
public IRelationList getRelationsByTarget(IResourceContext context,
IRelationOperand target)
throws InvalidArgumentException,
ResourceException
context - the IResourceContext to use for retrieving the
relations.target - the IRelationOperand which belongs to the
searched relations as target operand.IRelationList with all the relations for the given
target operand. the list might be empty if no matching relations are
found.InvalidArgumentException - if the given target operand
is null .ResourceException - if there was an internal error
while retrieving the relations.
public IRelationList getRelations(IResourceContext context,
IRelationOperand source,
IRelationOperand target)
throws InvalidArgumentException,
ResourceException
context - the IResourceContext to use for retrieving the
relations.source - the IRelationOperand which belongs to the
searched relations as source operand.target - the IRelationOperand which belongs to the
searched relations as target operand.IRelationList with all the relations for the given
source and target operand. the list might be empty if no matching
relations are found.InvalidArgumentException - if the given source or
target operand is null .ResourceException - if there was an internal error
while retrieving the relations.
public IOrderedRelationPositioningList getRelationPositioningList()
throws ResourceException
IOrderedRelationPositioningList .ResourceException - if the list could not be created.
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||