public interface Path
Path
provides informations about the Site
to which the current HttpServletRequest
belongs
to. Therefore, the servlet-path returned by HttpServletRequest.getServletPath()
is split into path-elements
using /
as a separator.Modifier and Type | Field and Description |
---|---|
static String |
SEPARATOR
The separator for a path
|
Modifier and Type | Method and Description |
---|---|
void |
checkPathLength(int minLength)
Checks whether this
Path has the given minimum number of elements and throws an IOException
otherwise |
String |
getActionName()
Returns the name of the currently selected action, if present
|
String |
getActionValue()
Returns the value of the currently selected action, if present
|
int |
getApplicationIndex()
Return the index of the element representing the
Application name |
String |
getApplicationName()
Returns the name of the
Application which is being addressed by this Path |
List<String> |
getApplicationUrlParameters()
|
List<String> |
getBlobDirectories()
|
String |
getCurrentPath()
Returns the current path to the application, e.g.
|
List<String> |
getDocumentDirectories()
Returns a
List of all document directories, which contain the JSP-files |
String |
getDomain()
Returns the domain of the currently selected
Site , if present |
String |
getElementAt(int idx)
Returns the element at index
idx , if present |
int |
getElementCount()
Returns the number of elements of this
Path |
String |
getExtension()
Returns the file-extension for JSP-files
|
String |
getGuiPath()
Returns the path to the appNG webapplication.
|
String |
getHost()
Returns the host of the currently selected
Site , if present |
List<String> |
getJspUrlParameters()
Returns a
List containing the values of the JSP-Paramters of a JSP-call. |
String |
getLastElement()
Returns the last element of this
Path . |
String |
getOutputFormat()
Returns the ID of
OutputFormat .An OutputFormat may be defined by adding _<format> after the gui-path, e.g. |
String |
getOutputPrefix()
Returns the path prefix that contains the
OutputFormat and OutputType , if those are set. |
String |
getOutputType()
Returns the ID of
OutputType .An OutputType may be defined by adding _<type> after the output-format, e.g. |
String |
getPage()
Returns the name of the currently selected page, if present
|
String |
getPlatformUrl()
Returns the complete absolute URL this
Path represents, which is the Site s domain plus the
servlet-path |
String |
getRootPath()
Returns the root-path of this
Path , which is the first element, or / if there is no first element |
String |
getService()
Return the name of the service addressed by this
Path |
String |
getServicePath()
Returns the path element that addresses a service
|
String |
getServletPath()
Returns the complete servlet-path this
Path was built from |
String |
getSiteName()
Returns the name of the
Site which is being addressed by this Path |
boolean |
hasAction()
Checks whether this
Path has an action selected |
boolean |
hasApplication()
Checks whether this
Path contains an element determining the current Application |
boolean |
hasElementAt(int idx)
Returns
true if this Path has an elements at index idx . |
boolean |
hasOutputFormat()
Checks whether this
Path has an OutputFormat set. |
boolean |
hasOutputType()
Checks whether this
Path has an OutputType set. |
boolean |
hasSite()
Checks whether this
Path contains an element determining the current Site |
boolean |
isDocument()
Checks whether this
Path represents a document from a document-folder. |
boolean |
isGui()
Checks whether this
Path represents a call to the appNG webapplication GUI |
boolean |
isJsp()
Checks whether this
Path represents the call of a JSP file. |
boolean |
isPathSelected(String servletPath)
Checks whether the given
servletPath is being addressed by this Path , which basically means the
servlet-path represented by this Path must start with the given servletPath . |
boolean |
isRepository()
Checks whether this
Path represents the repository-folder of appNG |
boolean |
isRoot()
Checks whether this
Path represents the root-path |
boolean |
isService()
Checks whether this
Path represents a call to a service (Webservice /AttachmentWebservice ,
SoapService or an XML/JSON call of an ActionProvider or DataProvider . |
boolean |
isStaticContent()
Checks whether this
Path represents a static resource from a blob-directory |
static final String SEPARATOR
boolean hasElementAt(int idx)
true
if this Path
has an elements at index idx
.idx
- the zero-based index to checktrue
if there is such a path element,false
otherwiseString getLastElement()
Path
.String getElementAt(int idx)
idx
, if presentidx
- the zero-based indexnull
if no such element existsvoid checkPathLength(int minLength) throws IOException
Path
has the given minimum number of elements and throws an IOException
otherwiseminLength
- the minimum length to checkIOException
- if this Path
does not have the required minimum lengthboolean isStaticContent()
Path
represents a static resource from a blob-directorytrue
if this Path
represents a static resource, false
otherwisegetBlobDirectories()
boolean isDocument()
Path
represents a document from a document-folder.true
if this Path
represents a JSP file from a document-folder, false
otherwisegetDocumentDirectories()
boolean isGui()
Path
represents a call to the appNG webapplication GUItrue
if this Path
represents a call to the appNG webapplication GUI, false
otherwisegetGuiPath()
boolean isService()
Path
represents a call to a service (Webservice
/AttachmentWebservice
,
SoapService
or an XML/JSON call of an ActionProvider
or DataProvider
.true
if this Path
represents a call to a service, false
otherwiseboolean isJsp()
Path
represents the call of a JSP file.true
if this Path
represents the call of a JSP file, false
otherwisegetExtension()
,
isDocument()
String getSiteName()
Site
which is being addressed by this Path
hasSite()
boolean hasSite()
Path
contains an element determining the current Site
true
if this Path
contains an element determining the current Site
, false
otherwiseString getApplicationName()
Application
which is being addressed by this Path
hasApplication()
boolean hasApplication()
Path
contains an element determining the current Application
true
if this Path
contains an element determining the current Application
,
false
otherwiseString getPage()
null
if no page is selectedisGui()
String getActionName()
null
if no action is selectedisGui()
,
getActionValue()
String getActionValue()
null
if no action is selectedisGui()
,
getActionName()
boolean hasAction()
Path
has an action selectedtrue
if this Path
, false
otherwisegetActionName()
,
getActionValue()
List<String> getApplicationUrlParameters()
List
of parameter valuesisGui()
,
isService()
List<String> getJspUrlParameters()
List
containing the values of the JSP-Paramters of a JSP-call. Every parameter after the JSPs
name is a JSP-Parameter. For example, if the current servletpath is /en/index/foo/bar
, with en
being a document folder and index
the JSP name, the list will contain "foo"
and "bar"
.String getRootPath()
Path
, which is the first element, or /
if there is no first elementString getHost()
Site
, if presentSite
hasSite()
,
Site.getHost()
String getDomain()
Site
, if presentSite
hasSite()
,
Site.getDomain()
String getServletPath()
Path
was built fromString getCurrentPath()
/manager/mysite/myapp
boolean isRoot()
Path
represents the root-pathtrue
if this Path
represents the root-path, false
otherwisegetRootPath()
boolean isRepository()
Path
represents the repository-folder of appNGtrue
if this Path
represents the repository-folder of appNG, false
otherwiseString getGuiPath()
isGui()
List<String> getDocumentDirectories()
List
of all document directories, which contain the JSP-filesList
of all document directoriesisDocument()
,
isJsp()
String getPlatformUrl()
Path
represents, which is the Site
s domain plus the
servlet-pathgetDomain()
,
getServletPath()
String getOutputFormat()
OutputFormat
.OutputFormat
may be defined by adding _<format>
after the gui-path, e.g.
/ws/_html/site/application/page
.OutputFormat
, if presentisGui()
String getOutputType()
OutputType
.OutputType
may be defined by adding _<type>
after the output-format, e.g.
/ws/_html/_minimal/site/application/page
.OutputType
, if presentisGui()
,
getOutputFormat()
boolean hasOutputFormat()
Path
has an OutputFormat
set.true
if this Path
has an OutputFormat
set, false
otherwisegetOutputFormat()
boolean hasOutputType()
Path
has an OutputType
set.true
if this Path
has an OutputType
set, false
otherwisegetOutputType()
String getService()
Path
isService()
,
getServicePath()
String getServicePath()
isService()
,
getService()
boolean isPathSelected(String servletPath)
servletPath
is being addressed by this Path
, which basically means the
servlet-path represented by this Path
must start with the given servletPath
.servletPath
- the servlet-path to checktrue
if this Path
, false
otherwisegetServletPath()
String getOutputPrefix()
OutputFormat
and OutputType
, if those are set.getOutputFormat()
,
getOutputType()
String getExtension()
isJsp()
int getApplicationIndex()
Application
nameApplication
namegetApplicationName()
,
hasApplication()
,
getElementAt(int)
int getElementCount()
Path
Copyright © 2011–2019 aiticon GmbH. All rights reserved.