public class SessionStructure extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DATA_DRIVEN_NODE_POSTFIX |
static String |
DATA_DRIVEN_NODE_PREFIX |
static String |
DATA_DRIVEN_NODE_REGEX |
static String |
ROOT |
Constructor and Description |
---|
SessionStructure() |
Modifier and Type | Method and Description |
---|---|
static StructuralNode |
addPath(Model model,
HistoryReference ref,
HttpMessage msg)
Adds the message to the Sites tree
|
static StructuralNode |
addPath(Model model,
HistoryReference ref,
HttpMessage msg,
boolean newOnly)
Adds the message to the Sites tree
|
static StructuralNode |
addPath(Session session,
HistoryReference ref,
HttpMessage msg)
Deprecated.
|
static StructuralNode |
addPath(Session session,
HistoryReference ref,
HttpMessage msg,
boolean newOnly)
Deprecated.
|
static StructuralNode |
find(long sessionId,
org.apache.commons.httpclient.URI uri,
String method,
String postData)
Deprecated.
|
static StructuralNode |
find(Model model,
HttpMessage msg) |
static StructuralNode |
find(Model model,
org.apache.commons.httpclient.URI uri,
String method,
String postData)
Finds the node in the Site tree for the given request data
|
static String |
getCleanRelativeName(StructuralNode sn,
boolean incParams)
Returns the name of the node ignoring the parent and children, i.e.
|
static String |
getHostName(HttpMessage msg) |
static String |
getHostName(org.apache.commons.httpclient.URI uri) |
static String |
getLeafName(Model model,
String nodeName,
HttpMessage msg) |
static String |
getLeafName(Model model,
String nodeName,
org.apache.commons.httpclient.URI uri,
String method,
String postData)
Gets the name of the node to be used for the given parameters in the Site Map.
|
static String |
getLeafName(String nodeName,
HttpMessage message,
List<NameValuePair> params) |
static String |
getNodeName(HttpMessage msg)
Deprecated.
|
static String |
getNodeName(Model model,
HttpMessage msg)
Returns the node name for the given message
|
static String |
getRegexName(StructuralNode sn,
boolean incParams)
Returns a regex pattern that will match the specified StructuralNode, ignoring the parent and
children.
|
static String |
getRegexPattern(StructuralNode sn) |
static String |
getRegexPattern(StructuralNode sn,
boolean incChildren) |
static StructuralNode |
getRootNode()
Deprecated.
|
static StructuralNode |
getRootNode(Model model)
Returns the root node
|
static List<String> |
getTreePath(Model model,
HttpMessage msg) |
static List<String> |
getTreePath(Model model,
org.apache.commons.httpclient.URI uri) |
static String |
regexEscape(String str) |
public static final String ROOT
public static final String DATA_DRIVEN_NODE_PREFIX
public static final String DATA_DRIVEN_NODE_POSTFIX
public static final String DATA_DRIVEN_NODE_REGEX
@Deprecated public static StructuralNode addPath(Session session, HistoryReference ref, HttpMessage msg)
session
- the sessionref
- the history referencemsg
- the messagepublic static StructuralNode addPath(Model model, HistoryReference ref, HttpMessage msg)
model
- the modelref
- the history referencemsg
- the message@Deprecated public static StructuralNode addPath(Session session, HistoryReference ref, HttpMessage msg, boolean newOnly)
session
- the sessionref
- the history referencemsg
- the messagenewOnly
- Only return a SiteNode if one was newly createdpublic static StructuralNode addPath(Model model, HistoryReference ref, HttpMessage msg, boolean newOnly)
model
- the modelref
- the history referencemsg
- the messagenewOnly
- Only return a SiteNode if one was newly createdpublic static List<String> getTreePath(Model model, org.apache.commons.httpclient.URI uri) throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIException
public static List<String> getTreePath(Model model, HttpMessage msg) throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIException
public static StructuralNode find(Model model, HttpMessage msg) throws DatabaseException, org.apache.commons.httpclient.URIException
model
- msg
- DatabaseException
org.apache.commons.httpclient.URIException
@Deprecated public static StructuralNode find(long sessionId, org.apache.commons.httpclient.URI uri, String method, String postData) throws DatabaseException, org.apache.commons.httpclient.URIException
sessionId
- the session iduri
- the URImethod
- the methodpostData
- the POST dataDatabaseException
org.apache.commons.httpclient.URIException
public static StructuralNode find(Model model, org.apache.commons.httpclient.URI uri, String method, String postData) throws DatabaseException, org.apache.commons.httpclient.URIException
model
- the modeluri
- the URImethod
- the methodpostData
- the POST dataDatabaseException
org.apache.commons.httpclient.URIException
@Deprecated public static String getNodeName(HttpMessage msg) throws org.apache.commons.httpclient.URIException
msg
- the messageorg.apache.commons.httpclient.URIException
public static String getNodeName(Model model, HttpMessage msg) throws org.apache.commons.httpclient.URIException
model
- the modelmsg
- the messageorg.apache.commons.httpclient.URIException
public static String getLeafName(Model model, String nodeName, HttpMessage msg)
public static String getLeafName(Model model, String nodeName, org.apache.commons.httpclient.URI uri, String method, String postData) throws HttpMalformedHeaderException
model
- the modelnodeName
- the last element of the pathuri
- the full uri of the node, must not be null
.method
- the method for the node, must not be null
.postData
- the data of the request body.HttpMalformedHeaderException
- if the uri is not correct.NullPointerException
- if the uri or the method are null
.public static String getLeafName(String nodeName, HttpMessage message, List<NameValuePair> params)
public static String getRegexName(StructuralNode sn, boolean incParams)
sn
- a StructuralNodeincParams
- if true then include URL params in the regex, otherwise exclude thempublic static String getCleanRelativeName(StructuralNode sn, boolean incParams)
sn
- a StructuralNodeincParams
- if true then include URL params in the regex, otherwise exclude thempublic static String getRegexPattern(StructuralNode sn) throws DatabaseException
DatabaseException
public static String getRegexPattern(StructuralNode sn, boolean incChildren) throws DatabaseException
DatabaseException
public static String getHostName(HttpMessage msg) throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIException
public static String getHostName(org.apache.commons.httpclient.URI uri) throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIException
@Deprecated public static StructuralNode getRootNode()
public static StructuralNode getRootNode(Model model)
model
- the model