public abstract class PortalURL<R,U extends PortalURL<R,U>> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
ajax
.
|
protected String |
confirm
.
|
protected MimeType |
mimeType
.
|
protected org.gatein.common.util.ParameterMap |
queryParams
.
|
| Constructor and Description |
|---|
PortalURL(URLContext context)
Create a portal URL instance.
|
| Modifier and Type | Method and Description |
|---|---|
Boolean |
getAjax()
Returns the ajax mode.
|
boolean |
getAuthorityUse()
Returns the current authority use.
|
String |
getConfirm()
Returns the confirm message.
|
Locale |
getLocale() |
MimeType |
getMimeType()
Returns the current mime type that this URL will be generated for, or null if none is set (which means there is no
guarantees about the mime type that will be used as target but it's likely to be
MimeType.XHTML ). |
abstract Set<QualifiedName> |
getParameterNames()
Returns the set of parameter names provided this url.
|
abstract String |
getParameterValue(QualifiedName parameterName)
Returns a specified parameter value or null when it is not available.
|
Map<String,String[]> |
getQueryParameters()
Returns the query parameters.
|
String |
getQueryParameterValue(String parameterName)
Returns a query parameter value or null if it does not exist.
|
String[] |
getQueryParameterValues(String parameterName)
Returns a query parameter value or null if it does not exist.
|
abstract R |
getResource()
Returns the current resource associated with this URL.
|
boolean |
getSchemeUse()
Returns the current scheme use.
|
boolean |
isCSRFCheck() |
void |
reset()
Reset the Portal URL state
|
U |
setAjax(Boolean ajax)
Update the ajax mode.
|
void |
setAuthorityUse(boolean authorityUse)
Control the authority generation (the server name appended with the port when its value is different than 80) of the URL.
|
U |
setConfirm(String confirm)
Updates the confirm message.
|
void |
setCSRFCheck(boolean csrfCheck) |
void |
setLocale(Locale locale) |
void |
setMimeType(MimeType mimeType)
Set the mime type on this URL.
|
void |
setQueryParameterValue(String parameterName,
String parameterValue)
Update the parameter value when the parameterValue argument is not null or remove it when the parameterValue argument is
null.
|
void |
setQueryParameterValues(String parameterName,
String[] parameterValues)
Update the parameter value when the parameterValues argument is not null or remove it when the parameterValues argument
is null.
|
abstract U |
setResource(R resource)
Set a new resource on this URL.
|
void |
setSchemeUse(boolean schemeUse)
Control the scheme generation (
http or https according to the request) of the URL. |
String |
toString()
Generates the URL value.
|
protected Boolean ajax
protected String confirm
protected org.gatein.common.util.ParameterMap queryParams
protected MimeType mimeType
public PortalURL(URLContext context) throws NullPointerException
context - the url contextNullPointerException - if the context is nullpublic boolean getSchemeUse()
public void setSchemeUse(boolean schemeUse)
http or https according to the request) of the URL. If the
scheme is enabled, the authority property will be set to true.schemeUse - the scheme use valuepublic boolean getAuthorityUse()
public void setAuthorityUse(boolean authorityUse)
authorityUse - the authority use valuepublic final Boolean getAjax()
public final U setAjax(Boolean ajax)
ajax - the new ajax modepublic final String getConfirm()
public final U setConfirm(String confirm)
confirm - the new confirm messagepublic abstract R getResource()
public abstract U setResource(R resource)
resource - the new resourcepublic abstract Set<QualifiedName> getParameterNames()
public abstract String getParameterValue(QualifiedName parameterName)
parameterName - the parameter namepublic final MimeType getMimeType()
MimeType.XHTML ).public void setMimeType(MimeType mimeType)
mimeType - the new mime typepublic Locale getLocale()
public void setLocale(Locale locale)
public boolean isCSRFCheck()
public void setCSRFCheck(boolean csrfCheck)
public void reset()
public Map<String,String[]> getQueryParameters()
public String getQueryParameterValue(String parameterName) throws NullPointerException
parameterName - the parameter nameNullPointerException - if the parameter name is nullpublic final void setQueryParameterValue(String parameterName, String parameterValue) throws NullPointerException
parameterName - the parameter nameparameterValue - the parameter valueNullPointerException - if the parameter value is nullpublic final String[] getQueryParameterValues(String parameterName) throws NullPointerException
parameterName - the parameter nameNullPointerException - if the parameter name is nullpublic final void setQueryParameterValues(String parameterName, String[] parameterValues) throws NullPointerException
parameterName - the parameter nameparameterValues - the parameter valueNullPointerException - if the parameter value is nullCopyright © 2018 JBoss by Red Hat. All Rights Reserved.