public class URLBuilder
extends de.innovationgate.utils.URLBuilder
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
URLPARAM_VARS
Name of the URL parameter carrying data about var parameters
|
Constructor and Description |
---|
URLBuilder(TMLContext context,
java.net.URL url)
Constructor using a URL with a TMLContext as context parameter
|
URLBuilder(WGA wga,
java.net.URL url)
Constructor using a URL
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
buildLikeGiven()
Returns an absolute URL if an absolute URL was given to to the URLBuild object on construction and a relative URL (complete path without host, protocol and port) if not
|
URLBuilder |
clearVarParameters()
Removes all var parameters
|
URLBuilder |
clone() |
URLBuilder |
enforceDatabaseSettings(Database database)
Enforces all settings about URLs from the given database, regarding allowed/enforced protocols, hosts and ports
|
static VarParamsMap |
extractVarParameters(java.lang.String varParam,
WGACore core)
Reades var parameters from an encrypted var parameter value
|
java.lang.Object |
getVarParameter(java.lang.String name)
Reads the value of the var parameter of the given name
|
java.util.Set<java.lang.String> |
getVarParameterNames()
Returns the names of all existing var parameters
|
boolean |
hasVarParameter(java.lang.String name)
Tests if a var parameter of the given name exists
|
boolean |
isAbsoluteUrlGiven()
Returns if the URLBuilder object was constructed from an absolute URL
|
boolean |
isSessionBoundParams()
Returns if the var parameters are bound to the user session for which they were created
|
URLBuilder |
removeVarParameter(java.lang.String name)
Removes the var parameter of the given name
|
void |
setAbsoluteUrlGiven(boolean fullUrlGiven)
Sets if the URLBuilder object was constructed from an absolute URL
|
URLBuilder |
setProtocol(java.lang.String protocol) |
URLBuilder |
setSessionBoundParams(boolean sessionBoundParams)
Sets if the var parameters are bound to the user session for which they were created
|
URLBuilder |
setVarParameter(java.lang.String name,
java.lang.Object value)
Sets a var parameter
|
addQueryString, appendPath, build, build, clearParameters, clearPathParameters, getDefaultPortForProtocol, getEncoding, getFragment, getHost, getParameter, getParameterEncoding, getParameterNames, getPath, getPort, getProtocol, getQuery, hasParameter, isDefaultPortForProtocol, rebuild, rebuild, removeParameter, setEncoding, setFragment, setHost, setParameter, setParameterEncoding, setPath, setPort, setQuery, toString
public static final java.lang.String URLPARAM_VARS
public URLBuilder(WGA wga, java.net.URL url) throws de.innovationgate.webgate.api.WGException, java.security.GeneralSecurityException, java.io.IOException
wga
- The WGA context objecturl
- The url that this builder should loadde.innovationgate.webgate.api.WGException
java.security.GeneralSecurityException
java.io.IOException
public URLBuilder(TMLContext context, java.net.URL url) throws de.innovationgate.webgate.api.WGException, java.security.GeneralSecurityException, java.io.IOException
context
- WebTML contexturl
- The url that this builder should loadde.innovationgate.webgate.api.WGException
java.security.GeneralSecurityException
java.io.IOException
public static VarParamsMap extractVarParameters(java.lang.String varParam, WGACore core) throws java.security.GeneralSecurityException, java.io.IOException
varParam
- The var parameter valuecore
- WGACore objectjava.security.GeneralSecurityException
java.io.IOException
public java.lang.Object getVarParameter(java.lang.String name)
name
- Var parameter namepublic URLBuilder removeVarParameter(java.lang.String name)
name
- Var parameter namepublic boolean hasVarParameter(java.lang.String name)
name
- Var parameter namepublic URLBuilder setVarParameter(java.lang.String name, java.lang.Object value)
name
- Var parameter namevalue
- Var parameter valuepublic URLBuilder clearVarParameters()
public URLBuilder setProtocol(java.lang.String protocol)
setProtocol
in class de.innovationgate.utils.URLBuilder
public boolean isSessionBoundParams()
public URLBuilder setSessionBoundParams(boolean sessionBoundParams)
sessionBoundParams
- public java.util.Set<java.lang.String> getVarParameterNames()
public boolean isAbsoluteUrlGiven()
public void setAbsoluteUrlGiven(boolean fullUrlGiven)
public java.lang.String buildLikeGiven()
public URLBuilder clone() throws java.lang.CloneNotSupportedException
clone
in class de.innovationgate.utils.URLBuilder
java.lang.CloneNotSupportedException
public URLBuilder enforceDatabaseSettings(Database database) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException