|
SAP NetWeaver 7.31 Enterprise Portal (SP01) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IContentTaggingService
The interface that enables you to tag portal objects according to your own tagging method.
Provides methods to add and remove tags and to search portal objects by specific tags.
It is possible to define attributes to PCD objects directly and use them to perform a PCD search.
This interface provides a shortcut to the PCD APIs.
To use content tagging, define attributes that hold the tagging data.
These attributes are referred here as domain attributes.
To tag your portal objects, use the addDomainValue()
method to add a domain attribute with a value.
| Field Summary | |
|---|---|
static String |
BUSINESSOBJECT_OBJECT_CLASS
A constant that represents the name of the business object object class. |
static String |
IVIEW_OBJECT_CLASS
A constant that represents the name of the iView object class. |
static String |
KEY
The service key |
static String |
PAGE_OBJECT_CLASS
A constant that represents the name of the page object class. |
static String |
ROLE_OBJECT_CLASS
A constant that represents the name of the role object class. |
static String |
WORKCENTER_OBJECT_CLASS
A constant that represents the name of the work center object class. |
static String |
WORKSET_OBJECT_CLASS
A constant that represents the name of the workset object class. |
| Method Summary | |
|---|---|
void |
addBinaryDomainValue(com.sap.security.api.IPrincipal user,
String objectId,
String domain,
InputStream value)
Adds a binary stream value to a domain attribute of a portal object. |
void |
addDomainValue(com.sap.security.api.IPrincipal user,
String objectId,
String domain,
String value)
Adds a value to a domain attribute of a portal object. |
Set |
getContent(com.sap.security.api.IPrincipal user,
String[] contentType)
Returns the PCD address (URL) of content of the specified type in all roles of a given user. |
Map |
getContent(com.sap.security.api.IPrincipal user,
String domain,
String expression,
String[] contentType,
ResultsFormat resultsFormat)
Returns content of the specified types (portal objects) in all user-assigned roles if the value of the domain attribute matches the search criteria. |
Map |
getCorrespondingAncestors(com.sap.security.api.IPrincipal user,
Set urls,
String contentType,
boolean directParentOnly)
Returns the corresponding ancestors of portal objects. |
List |
getDirContextes(List pcdNodes,
com.sap.security.api.IPrincipal user)
Gets the set of DirContext objects that correspond to the specified PCD addresses. |
NamingEnumeration |
getDomainValues(com.sap.security.api.IPrincipal user,
String objectId,
String domain)
Returns the values of the specified domain attribute of a portal object. |
Map |
getNodeContent(DirContext node,
String domain,
String expression,
String[] contentType,
ResultsFormat resultsFormat)
Returns content of the specified types (portal objects) in a given node of the PCD. |
List<DirContext> |
getUserRoles(com.sap.security.api.IPrincipal user)
Returns all of the user-assigned roles. |
List<String> |
getUserRolesURLs(com.sap.security.api.IPrincipal user)
Returns the URLs of the user-assigned roles. |
void |
removeAllDomainValues(com.sap.security.api.IPrincipal user,
String objectId,
String domain)
Removes a domain attribute and all its values from a given portal object. |
void |
removeDomainValue(com.sap.security.api.IPrincipal user,
String objectId,
String domain,
String value)
Removes a value from a domain attribute for a given portal object. |
| Methods inherited from interface com.sapportals.portal.prt.service.IService |
|---|
afterInit, configure, destroy, getContext, getKey, init, release |
| Field Detail |
|---|
static final String KEY
static final String IVIEW_OBJECT_CLASS
static final String PAGE_OBJECT_CLASS
static final String WORKSET_OBJECT_CLASS
static final String BUSINESSOBJECT_OBJECT_CLASS
static final String WORKCENTER_OBJECT_CLASS
static final String ROLE_OBJECT_CLASS
| Method Detail |
|---|
Map getContent(com.sap.security.api.IPrincipal user,
String domain,
String expression,
String[] contentType,
ResultsFormat resultsFormat)
throws ContentTaggingException
user - the user whose roles are searchedcontentType - type of the content to be searched (for example iView, page or workset).
Each item of the array represents a full object class name of one portal object.IVIEW_OBJECT_CLASS.null.domain - the name of the portal object's attribute, which is used for tagging purposes.expression - the search criteria that is checked against the value of the domain attribute.regular expression pattern.
For example, "category*" searches for the objects with domain value that begins with "category".null, the result contains all the content with the specified domain.resultsFormat - the preferred format of the results, and can be either grouped by content
or grouped by domain value.
ResultsFormat.
ContentTaggingException - if an exception occurs
Map getNodeContent(DirContext node,
String domain,
String expression,
String[] contentType,
ResultsFormat resultsFormat)
throws ContentTaggingException
node - a DirContext node (such as role or workset) to be searched.
The DirContext can be either local or remote (remote contexts originate in a remote portal in a federated portal network).contentType - type of the content to be searched (for example iView, page or workset).
Each item of the array represents a full object class name of one portal object.IVIEW_OBJECT_CLASS.null.domain - the name of the portal object's attribute, which is used for tagging purposesexpression - the search criteria that is checked against the value of the domain attribute.regular expression pattern.
For example, "category*" searches for the objects with domain value that begins with "category".null, the result contains all the content with the specified domain.resultsFormat - the preferred format of the results, and can be either grouped by content
or grouped by domain value.
ResultsFormat.
ContentTaggingException - if an exception occurs
Set getContent(com.sap.security.api.IPrincipal user,
String[] contentType)
throws ContentTaggingException
user - the user whose roles are searchedcontentType - type of the content to be searched (for example iView, page or workset).
Each item of the array represents a full object class name of one portal object.IVIEW_OBJECT_CLASS.null.
ContentTaggingException - if an exception occurs
Map getCorrespondingAncestors(com.sap.security.api.IPrincipal user,
Set urls,
String contentType,
boolean directParentOnly)
throws ContentTaggingException
user - the user whose roles are searchedurls - a set of PCD addresses (URL), each representing a portal object for which we want to find the corresponding ancestorscontentType - the content type of the ancestors to be searched (for example iView, page or workset).
For example, to search for iViews, use the constant IVIEW_OBJECT_CLASS.null.directParentOnly - if true, the search stops at the first ancestor of the specified content type;
if false, the search stops at the unit level, and the tree is searched for
the object ancestors with the specified content type. The search does not stop
at the found ancestor and continues to search all it's ancestors as well.
The default is true.
null.
ContentTaggingException - if an exception occurs
NamingEnumeration getDomainValues(com.sap.security.api.IPrincipal user,
String objectId,
String domain)
throws ContentTaggingException
user - the user for retrieving the domain valuesobjectId - the PCD address (URL) of a portal object whose domain attribute is checkeddomain - the name of the domain attribute
null if the domain attribute does not exist for the specified object.
ContentTaggingException - if an exception occurs
void addDomainValue(com.sap.security.api.IPrincipal user,
String objectId,
String domain,
String value)
throws ContentTaggingException
user - the user for modifying the domain values (usually an administrator)objectId - the PCD address (URL) of a portal object whose domain attribute is modifieddomain - the name of the domain attributevalue - the value to be added to the domain attribute
ContentTaggingException - if an exception occurs
void addBinaryDomainValue(com.sap.security.api.IPrincipal user,
String objectId,
String domain,
InputStream value)
throws ContentTaggingException
getContent or the getNodeContent methods, all
values of the domain attribute will be returned in case the domain attribute is binary, regardless
of the specified expression. If filtering by expression is required, please use string domain
attributes.
user - the user for modifying the domain values (usually an administrator)objectId - the PCD address (URL) of a portal object whose domain attribute is modifieddomain - the name of the domain attributevalue - the value to be added to the domain attribute
ContentTaggingException - if an exception occurs
void removeDomainValue(com.sap.security.api.IPrincipal user,
String objectId,
String domain,
String value)
throws ContentTaggingException
user - the user for removing the domain values (usually an administrator)objectId - the PCD address (URL) of a portal object whose domain attribute is modifieddomain - the name of the domain attributevalue - the value to be removed from the domain attribute
ContentTaggingException - if an exception occurs
void removeAllDomainValues(com.sap.security.api.IPrincipal user,
String objectId,
String domain)
throws ContentTaggingException
user - the user for removing the domain values (usually an administrator)objectId - the PCD address (URL) of a portal object whose domain attribute is removeddomain - the name of the domain attribute
ContentTaggingException - if an exception occurs
List<DirContext> getUserRoles(com.sap.security.api.IPrincipal user)
throws ContentTaggingException
user - the user whose roles are returned
DirContext objects, each a role of the user
ContentTaggingException - if an exception occurs
List<String> getUserRolesURLs(com.sap.security.api.IPrincipal user)
throws ContentTaggingException
user - the user whose roles are returned
ContentTaggingException - if an exception occurs
List getDirContextes(List pcdNodes,
com.sap.security.api.IPrincipal user)
throws ContentTaggingException
DirContext objects that correspond to the specified PCD addresses.
pcdNodes - a List of strings, each representing the PCD address of a portal object in the PCD.
Provide the PCD address without the "pcd:" prefix.user - the user for accessing the PCD
DirContext objects, each representing one of the specified portal objects
ContentTaggingException - if an exception occurs| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] EP-RUNTIME
|
[sap.com] tc/ep/navigation/api
|
api
|
EP-PIN
|
|
SAP NetWeaver 7.31 Enterprise Portal (SP01) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||