PREV CLASS NEXT CLASS
Tree SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.portal.services.contentmapping
Interface ResourceLocator
public interface ResourceLocatorThis interface can be used for searching portal resources based on existing content mappings. This interface is thread safe and can be cached. An instance of this interface can be obtained via the ContentMappingInfoHome interface.
- Since:
- 7.0.0.0
- See Also:
- ContentMappingInfoHome
Method Summary IterableListModel<ObjectID> findAllResourcesByObjectType(ObjectType objectType)
Return the ObjectIDs of all portal resources of a given object type contained in the current virtual portal that are mapped to at least one content resource.IterableListModel<ObjectID> findResourcesByContentId(java.lang.String contentId)
Return all portal resources mapped directly to the given content ID.IterableListModel<ObjectID> findResourcesByContentPath(java.lang.String contentPath)
Return all portal resources mapped directly to the given contentPath (no path prefix matching is performed).IterableListModel<ObjectID> findResourcesByLongestPathMatch(java.util.List<java.lang.String> contentPathElementIDs)
This method locates portal resources mapped to a specific content resource.IterableListModel<ObjectID> findResourcesByObjectTypeOrderedByLastModified(ObjectType objectType, int beginIndex, int endIndex)
Return the ObjectIDs for a sub sequence of all portal resources of a given object type contained in the current virtual portal that are mapped to at least one content resource.
Method Detail findResourcesByLongestPathMatch
IterableListModel<ObjectID> findResourcesByLongestPathMatch(java.util.List<java.lang.String> contentPathElementIDs) throws ContentMappingDataBackendException, MalformedContentPathException
- This method locates portal resources mapped to a specific content resource. The content resource is identified by the list of content ID values identifying the content resources contained in the path from the resource's content root resource to the resource.
- Parameters:
- contentPathElementIDs - The ordered list of content ID values identifying the content resources contained in the path from the resource's content root resource to the resource. E.g. for a resource identified by a content path of /a/b/c it would be a list of length 3, containing the content ID values of the resources /a, /a/b and /a/b/c in the given order.
- Returns:
- A list model for all portal resources that have the longest path match with the given content item. Portal resources are represented by their ObjectID values. If no mapped resources exist, an empty list model is returned.
Example: Assume the following resource mappings:
In this case the locator result for /a/b/c would consist of resources 2 and 5 since both have the longest path match (matching 2 path fragements).
- Resource1 maps to /a
- Resource2 maps to /a/b
- Resource3 maps to /a/b/d
- Resource4 maps to /e
- Resource5 maps to /a/b
Remark: resource 1 has a shorter match, while resources 3 and 4 do not match at all.- Throws:
- ContentMappingDataBackendException - In case there is a problem while acessing persitent storage.
- MalformedContentPathException - In case the provided path value is not a valid content path.
findResourcesByContentPath
IterableListModel<ObjectID> findResourcesByContentPath(java.lang.String contentPath) throws ContentMappingDataBackendException
- Returns all portal resources mapped directly to the given contentPath (no path prefix matching is performed). This method never returns null
- Parameters:
- contentPath - The path to the content resource.
- Throws:
- ContentMappingDataBackendException
findResourcesByContentId
IterableListModel<ObjectID> findResourcesByContentId(java.lang.String contentId) throws ContentMappingDataBackendException
- Returns all portal resources mapped directly to the given content ID. This method never returns null
- Parameters:
- contentId - The ID of the content resource.
- Throws:
- ContentMappingDataBackendException
findAllResourcesByObjectType
IterableListModel<ObjectID> findAllResourcesByObjectType(ObjectType objectType) throws ContentMappingDataBackendException, MalformedContentPathException
- Returns the ObjectIDs of all portal resources of a given object type contained in the current virtual portal that are mapped to at least one content resource.
- Parameters:
- objectType - The object type (e.g. ObjectTypeConstants.CONTENT_NODE.getType())
- Returns:
- Throws:
- ContentMappingDataBackendException
- MalformedContentPathException
findResourcesByObjectTypeOrderedByLastModified
IterableListModel<ObjectID> findResourcesByObjectTypeOrderedByLastModified(ObjectType objectType, int beginIndex, int endIndex) throws ContentMappingDataBackendException, MalformedContentPathExceptionPREV CLASS NEXT CLASS
- Returns the ObjectIDs for a sub sequence of all portal resources of a given object type contained in the current virtual portal that are mapped to at least one content resource. The sequence is ordered according to that last modified time stamp in descending order (newest first). The sequence begins at the specified beginIndex and extends to the object at index endIndex - 1. Thus the length of the substring is endIndex-beginIndex
- Parameters:
- objectType - The object type (e.g. ObjectTypeConstants.CONTENT_NODE.getType())
- beginIndex - The index of the first item to return
- endIndex - The index of the first item that is not returned but truncated.
- Returns:
- Throws:
- ContentMappingDataBackendException
- MalformedContentPathException
Tree SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD