| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FriendlySelectionService
Service that helps to work with friendly selection. The service allows to encode and decode friendly selection prefixes to and from portal pages. In addition it is possible to generate URLs in a special friendly URL format.
Note that this interface extends Disposable, it needs to be disposed explicitly before leaving scope by calls to Disposable.dispose()
Method Summary | |
---|---|
SearchableTreeModel<NavigationNode> | getSearchableTreeModel()
Returns the SearchableTreeModel used to encode and decode friendly selections. |
FriendlyURLFactory | getURLFactory()
Returns access to the URL generation functionality for friendly URLs. |
boolean | pathEquals(java.lang.String friendlyPath,
Identifiable node)
Checks if the friendly path that is passed in as a parameter matches the friendly path that corresponds to the node. |
boolean | resolve(SelectionResult res,
java.lang.String path)
Convenience method that converts the complete path string into a SelectionResult. |
boolean | resolve(SelectionResult res,
java.lang.String path,
int off,
int len)
Converts from a path to a list of ObjectID of selections |
boolean | java.io.Writer, com.ibm.portal.navigation.NavigationNode)">write(java.io.Writer out,
NavigationNode node)
Encodes the friendly selection string from a node. |
Methods inherited from interface com.ibm.portal.Disposable |
---|
dispose |
Method Detail |
---|
SearchableTreeModel<NavigationNode> getSearchableTreeModel()
Returns the SearchableTreeModel used to encode and decode friendly selections. The model will typically be based on the navigation model for the current user but might differ from it if nodes in the navigation model are hidden from the friendly name hierarchy.
null
FriendlyURLFactory getURLFactory()
null
boolean resolve(SelectionResult res, java.lang.String path) throws ModelException
The friendly path corresponds to the string generated by the java.io.Writer, com.ibm.portal.navigation.NavigationNode)">write(Writer, NavigationNode) method, i.e. it must contain a correctly escaped URL prefix.
boolean resolve(SelectionResult res, java.lang.String path, int off, int len) throws ModelException
Converts from a path to a list of ObjectID of selections
.The friendly path corresponds to the string generated by the java.io.Writer, com.ibm.portal.navigation.NavigationNode)">write(Writer, NavigationNode) method, i.e. it must contain a correctly escaped URL prefix.
true
, if the complete path could be matched, else
false
boolean write(java.io.Writer out, NavigationNode node) throws java.io.IOException, ModelException
Encodes the friendly selection string from a node. The node must be part
of the TreeModel returned by
getSearchableTreeModel(). In case the friendly name cannot be
generated the method returns false
and no output is
written to the writer.
The generated friendly path will be URL escaped, i.e. characters that are not valid for the URL are replaced by their UTF8 based % escapes.
null
boolean pathEquals(java.lang.String friendlyPath, Identifiable node) throws java.io.IOException, ModelException
Checks if the friendly path that is passed in as a parameter matches the
friendly path that corresponds to the node. If the friendlyPath is
null
or the empty string and the node is not represented
by a friendly path, then this method returns true
.
The friendly path corresponds to the string generated by the java.io.Writer, com.ibm.portal.navigation.NavigationNode)">write(Writer, NavigationNode) method, i.e. it must contain a correctly escaped URL prefix.
null
null
true
if the path matches, else false
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |