|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.restlet.resource.UniformResource org.restlet.resource.ServerResource com.hyper9.vangaea.server.rest.BaseResource<T>
T
- The type of bean to this resource returns to the client.public abstract class BaseResource<T extends com.hyper9.common.beans.Bean>
The base resource for all server resources in the Vangaea project.
Field Summary | |
---|---|
protected java.sql.Connection |
conn
The database connection. |
protected java.util.List<com.hyper9.common.Function> |
initCallbacks
A list of registered initialization functions to execute on behalf of sub-classes. |
protected java.util.List<com.hyper9.common.beans.BeanSerializationCallback<com.hyper9.common.beans.Bean>> |
preProcessBeanCallbacks
A list of registered functions that are executed on a bean prior to it being serialized. |
protected java.lang.String |
rootPathPath
|
Constructor Summary | |
---|---|
BaseResource()
|
Method Summary | |
---|---|
protected void |
doCatch(java.lang.Throwable throwable)
|
void |
doInit()
Initializes the resource. |
void |
doRelease()
Clean up the resource. |
protected org.restlet.representation.Representation |
get()
|
protected java.lang.String |
getAuthCookieName()
Gets the configured name of the authentication cookie. |
protected java.lang.String |
getAuthCookieValue()
Gets the authentication cookie value. |
protected java.lang.String |
getBaseUrl()
Gets the base URL for the current request. |
abstract java.util.List<T> |
getBeans()
Get the beans list. |
protected java.lang.String |
getRedirectUri()
Gets and decodes the specified URL/UTF-8 encoded redirect URI. |
protected static java.lang.String |
getSystemProperty(java.lang.String key,
java.lang.String defaultValue)
Gets a system property value. |
boolean |
isAnnotated()
Do not allow this class or sub-classes to use the HTTP VERB annotations as they may break the polymorphic rules in place. |
protected boolean |
isDefaultHttpPort()
Returns a value indicating whether or not the current request is using the default HTTP port. |
protected boolean |
isDefaultHttpsPort()
Returns a value indicating whether or not the current request is using the default HTTPS port. |
protected boolean |
isDefaultHttpsPort(int port)
Returns a value indicating whether the given port is the default HTTPS port. |
Methods inherited from class org.restlet.resource.ServerResource |
---|
delete, delete, describeVariants, doConditionalHandle, doHandle, doHandle, doNegotiatedHandle, get, getInfo, getInfo, getPreferredVariant, getVariants, getVariants, handle, head, head, isConditional, isExisting, isInRole, isNegotiated, options, options, post, post, put, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setChallengeRequests, setConditional, setCookieSettings, setDimensions, setExisting, setLocationRef, setLocationRef, setNegotiated, setServerInfo, setStatus, setStatus, setStatus, setStatus, setVariants, updateAllowedMethods, updateDimensions |
Methods inherited from class org.restlet.resource.UniformResource |
---|
getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getContext, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMethod, getOriginalRef, getProtocol, getQuery, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestEntity, getResponse, getResponseAttributes, getResponseEntity, getRootRef, getServerInfo, getStatus, init, isConfidential, release |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.lang.String rootPathPath
protected java.sql.Connection conn
protected java.util.List<com.hyper9.common.Function> initCallbacks
protected java.util.List<com.hyper9.common.beans.BeanSerializationCallback<com.hyper9.common.beans.Bean>> preProcessBeanCallbacks
Constructor Detail |
---|
public BaseResource()
Method Detail |
---|
public final boolean isAnnotated()
isAnnotated
in class org.restlet.resource.ServerResource
public final void doInit() throws org.restlet.resource.ResourceException
doInit
in class org.restlet.resource.UniformResource
org.restlet.resource.ResourceException
protected org.restlet.representation.Representation get() throws org.restlet.resource.ResourceException
get
in class org.restlet.resource.ServerResource
org.restlet.resource.ResourceException
public abstract java.util.List<T> getBeans() throws java.lang.Exception
java.lang.Exception
- When an error occurs.protected void doCatch(java.lang.Throwable throwable)
doCatch
in class org.restlet.resource.UniformResource
public void doRelease() throws org.restlet.resource.ResourceException
doRelease
in class org.restlet.resource.UniformResource
org.restlet.resource.ResourceException
protected static java.lang.String getSystemProperty(java.lang.String key, java.lang.String defaultValue)
key
- The property's key.defaultValue
- The default value to assign if the property's value
is not present in the backing store.
protected java.lang.String getBaseUrl()
protected boolean isDefaultHttpPort()
protected boolean isDefaultHttpsPort(int port)
port
- The port to check.
protected boolean isDefaultHttpsPort()
protected java.lang.String getAuthCookieValue()
protected java.lang.String getAuthCookieName()
protected java.lang.String getRedirectUri() throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
- When an error occurs URL decoding
the redirect URI.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |