public interface ProfileLocator
Profile Locators are used to locate profiled portal resources such as pages, documents, and fragments. A locator contains properties describing the actually resource to be located. Since the locator is based on properties that are usually related to a user or other subject's profile, it is referred to as a profile locator.
Profiles can be created from a normalized Profile Locator Path The format of the path is name/value pairs of all property, separated by a path separator. An example locator path:
page:default.psml:artist:al-stewart:song:on-the-border
path:/sports/football/nfl/chiefs:language:en
Modifier and Type | Field and Description |
---|---|
static String |
PAGE_LOCATOR |
static String |
PATH_SEPARATOR |
static String |
SECURITY_LOCATOR |
Modifier and Type | Method and Description |
---|---|
void |
add(RuleCriterion criterion,
boolean isControl,
boolean isNavigation,
String value)
Add a property based on a @link org.apache.jetspeed.profiler.rules.RuleCriterion
and a value.
|
void |
add(String name,
boolean isControl,
boolean isNavigation,
String value)
Add a property based on a Simple name and value.
|
void |
add(String name,
String value)
Add a property based on a Simple name and value assumed
to be control property.
|
void |
createFromLocatorPath(String path)
Profiles can be created from a normalized Profile Locator Path
The format of the path is name:value pairs of all property, separated by a path separator.
|
String |
getLocatorPath()
Profiles can be converted to a normalized Profile Locator Path
The format of the path is name/value pairs of all property, separated by a path separator.
|
String |
getLocatorPath(ProfileLocatorProperty[] properties)
Normalize profile properties obtained from profile locator iterators
into a Profile Locator Path.
|
String |
getRequestPath()
Locators are intended to be sufficient to locate managed pages, so the request
path must be generally available in the event it is not otherwise captured in a
rule criterion.
|
String |
getRequestServerName()
Retain the request server name to support additional page location mapping
not part of the profiler rule criterion.
|
String |
getValue(String name)
For a given property name, get a property of type @link ProfileLocatorProperty
|
void |
init(Profiler profiler,
String requestPath)
Initialize this page context.
|
void |
init(Profiler profiler,
String requestPath,
String requestServerName)
Initialize this page context.
|
boolean |
isControl(String name)
For a given property name, return control status of property.
|
boolean |
isNavigation(String name)
For a given property name, return navigation status of property.
|
Iterator<ProfileLocatorProperty[]> |
iterator()
Get an iterator over the locator's properties.
|
String |
toString()
Returns a normalized path.
|
static final String PAGE_LOCATOR
static final String SECURITY_LOCATOR
static final String PATH_SEPARATOR
void init(Profiler profiler, String requestPath)
profiler
- The profiler initializing this locator.requestPath
- The request path used to create this locator.void init(Profiler profiler, String requestPath, String requestServerName)
profiler
- The profiler initializing this locator.requestPath
- The request path used to create this locator.requestServerName
- The request server name used to create this locator.Iterator<ProfileLocatorProperty[]> iterator()
void add(RuleCriterion criterion, boolean isControl, boolean isNavigation, String value)
criterion
- The rule criterion on which this property is based.isControl
- The control classification for property.isNavigation
- The navigation classification for property.value
- The value to set on the property.void add(String name, boolean isControl, boolean isNavigation, String value)
name
- The name of the property.isControl
- The control classification for property.isNavigation
- The control classification for property.value
- The value to set on the property.void add(String name, String value)
name
- The name of the property.value
- The value to set on the property.String getValue(String name)
name
- The name of the propertyboolean isControl(String name)
name
- The name of the propertyboolean isNavigation(String name)
name
- The name of the propertyvoid createFromLocatorPath(String path)
Profiles can be created from a normalized Profile Locator Path The format of the path is name:value pairs of all property, separated by a path separator. Note: all locator property elements are assumed to be control properties. An example locator path:
:page:default.psml:artist:air:song:all-i-need
path
- The normalized path as shown above from which the locator is created.String getLocatorPath()
:page:default.psml:artist:joni-mitchell:song:cary
String getLocatorPath(ProfileLocatorProperty[] properties)
properties
- The array of profile properties.String toString()
String getRequestPath()
String getRequestServerName()
Copyright © 1999–2016 The Apache Software Foundation. All rights reserved.