|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.portal.resolver.helper.DefaultDataSource com.ibm.portal.resolver.helper.EarlyBindingDataSource
public class EarlyBindingDataSource
Implementation of a DataSource
designed to be used in conjunction
with the PocURLFactory.newURL(DataSource)
method. Per default - after
initialization or after calling clear()
- the data source assumes
that it is privately cacheable and that the content depends on all relevant
vary headers.
This DataSource
can also be used to return a header-only data source
for the lookup usecase of the
DataSourceFactoryEx.newSource(URI, String, Map, Context)
. If
Constants.VALUE_LOOKUP
is passed as a parameter, the caller is only
interested in the meta information (headers) for the data source, not the
actual data. The EarlyBindingDataSource
can be used to represent
these metadata in an efficient way.
This interface is designed to be implemented by clients. |
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.ibm.portal.resolver.data.CacheControlDataSource |
---|
CacheControlDataSource.CACHE_POLICY, CacheControlDataSource.CACHE_SCOPE |
Field Summary |
---|
Fields inherited from interface com.ibm.portal.resolver.data.UserContextDataSource |
---|
USER_CONTEXT_UNKNOWN |
Fields inherited from interface com.ibm.portal.resolver.data.CacheControlDataSource |
---|
CACHE_CONTROL_EXTENSIONS_UNDEFINED |
Fields inherited from interface com.ibm.portal.resolver.data.VaryDataSource |
---|
NO_VARY_HEADERS, VARY_HEADERS_UNKNOWN |
Fields inherited from interface com.ibm.portal.resolver.data.ProjectContextDataSource |
---|
PROJECT_CONTEXT_UNKNOWN |
Fields inherited from interface com.ibm.portal.resolver.data.VirtualPortalContextDataSource |
---|
VIRTUAL_PORTAL_CONTEXT_UNKNOWN |
Fields inherited from interface com.ibm.portal.resolver.data.DataSource |
---|
CONTENT_TYPE_UNKNOWN, CREATION_UNKNOWN, EXPIRATION_UNKNOWN, LAST_MODIFICATION_UNKNOWN, MAX_AGE_INFINITE, MAX_AGE_NONE, ROOT_DATE |
Fields inherited from interface com.ibm.portal.resolver.data.Addressable |
---|
EMPTY_PARAMETERS |
Constructor Summary | |
---|---|
EarlyBindingDataSource()
Initializes the object |
Method Summary | |
---|---|
void |
clear()
Reset the object |
void |
dispose()
Indicate that the object will no longer be accessed |
java.util.Map<java.lang.String,java.lang.String> |
getCacheControlExtensions()
Returns a map of cache control extensions that get added to the cache control header, as defined in ://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.6 |
CacheControlDataSource.CACHE_POLICY |
getCachePolicy()
Returns the caching policy for the data |
CacheControlDataSource.CACHE_SCOPE |
getCacheScope()
Returns the cache scope for the data |
java.util.Map<java.lang.String,java.lang.String[]> |
getParameters()
Returns an potentially unmodifiable version of the parameters used to address the object, never null , but potentially the empty
map. |
java.lang.String[] |
getVaryHeaders()
Returns a list of HTTP request headers that the content of the data source depends on. |
java.lang.Boolean |
isPrivate()
Indicates if the data source depends on the user context (if any). |
java.lang.Boolean |
isProjectDependent()
Indicates if the data source depends on the project context (if any). |
java.lang.Boolean |
isVirtualPortalDependent()
Indicates if the data source depends on the virtual portal context (if any). |
void |
setCacheControlExtensions(java.util.Map<java.lang.String,java.lang.String> cacheControlExtensions)
Assigns a new map of cache control extensions. |
void |
setCachePolicy(CacheControlDataSource.CACHE_POLICY cachePolicy)
Assigns a new cache policy |
void |
setCacheScope(CacheControlDataSource.CACHE_SCOPE aScope)
Overrides the cache scope |
void |
setCreated(java.util.Date created)
|
void |
setExpires(java.util.Date expires)
|
protected void |
setLastMod(java.util.Date lastMod)
Deprecated. use setLastModified(Date) instead |
void |
setLastModified(java.util.Date lastMod)
Sets the last modified timestamp |
protected void |
setParameters(java.util.Map<java.lang.String,java.lang.String[]> aParams)
|
void |
setPrivate(java.lang.Boolean aFlag)
Sets if this DataSource represents private data |
void |
setProjectDependent(java.lang.Boolean aFlag)
Sets if this DataSource depends on a project |
void |
setUri(java.net.URI uri)
Deprecated. |
void |
setURI(java.net.URI uri)
|
void |
setVaryHeaders(java.lang.String[] aHeaders)
Assigns the vary headers that the data source depends on. |
void |
setVirtualPortalDependent(java.lang.Boolean aFlag)
Sets if this DataSource depends on the virtual portal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.portal.resolver.data.CacheControlDataSource |
---|
getExpiration |
Methods inherited from interface com.ibm.portal.resolver.data.DataSource |
---|
getContentType, getCreated, getLastModified |
Methods inherited from interface com.ibm.portal.resolver.data.Addressable |
---|
getURI |
Constructor Detail |
---|
public EarlyBindingDataSource()
Method Detail |
---|
public void clear()
clear
in class DefaultDataSource
public void dispose()
Disposable
dispose
in interface Disposable
dispose
in class DefaultDataSource
public java.util.Map<java.lang.String,java.lang.String> getCacheControlExtensions()
DefaultDataSource
://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.6
getCacheControlExtensions
in interface CacheControlDataSource
getCacheControlExtensions
in class DefaultDataSource
null
public CacheControlDataSource.CACHE_POLICY getCachePolicy()
DefaultDataSource
getCachePolicy
in interface CacheControlDataSource
getCachePolicy
in class DefaultDataSource
null
public CacheControlDataSource.CACHE_SCOPE getCacheScope()
DefaultDataSource
getCacheScope
in interface CacheControlDataSource
getCacheScope
in class DefaultDataSource
null
public java.util.Map<java.lang.String,java.lang.String[]> getParameters()
Addressable
Returns an potentially unmodifiable version of the parameters used to
address the object, never null
, but potentially the empty
map.
The key is of type String
, the values of type
String[]
getParameters
in interface Addressable
getParameters
in class DefaultDataSource
public java.lang.String[] getVaryHeaders()
DefaultDataSource
null
return value indicates that
the data source does not know its vary headers and relies on the
framework to assign any.
getVaryHeaders
in interface VaryDataSource
getVaryHeaders
in class DefaultDataSource
null
public java.lang.Boolean isPrivate()
DefaultDataSource
isPrivate
in interface UserContextDataSource
isPrivate
in class DefaultDataSource
Boolean.TRUE
if the data source depends on the user
context, Boolean.FALSE
if the data source does not depend
on the user context of #USER_CONTEXT_UNKNOWN
to leave the
decision to the framework.public java.lang.Boolean isProjectDependent()
ProjectContextDataSource
isProjectDependent
in interface ProjectContextDataSource
isProjectDependent
in class DefaultDataSource
Boolean.TRUE
if the data source depends on the project
context, Boolean.FALSE
if the data source does not depend
on the project context of ProjectContextDataSource.PROJECT_CONTEXT_UNKNOWN
to
leave the decision to the framework.ProjectContextDataSource.isProjectDependent()
public java.lang.Boolean isVirtualPortalDependent()
VirtualPortalContextDataSource
isVirtualPortalDependent
in interface VirtualPortalContextDataSource
isVirtualPortalDependent
in class DefaultDataSource
Boolean.TRUE
if the data source depends on the virtual
portal context, Boolean.FALSE
if the data source does not
depend on the virtual portal context of
VirtualPortalContextDataSource.VIRTUAL_PORTAL_CONTEXT_UNKNOWN
to leave the decision to
the framework.VirtualPortalContextDataSource.isVirtualPortalDependent()
public void setCacheControlExtensions(java.util.Map<java.lang.String,java.lang.String> cacheControlExtensions)
cacheControlExtensions
- The cacheControlExtensions to set.public void setCachePolicy(CacheControlDataSource.CACHE_POLICY cachePolicy)
cachePolicy
- The cachePolicy to set.public void setCacheScope(CacheControlDataSource.CACHE_SCOPE aScope)
aScope
- the new scopepublic void setCreated(java.util.Date created)
setCreated
in class DefaultDataSource
created
- the created to setpublic void setExpires(java.util.Date expires)
setExpires
in class DefaultDataSource
expires
- the expires to set@Deprecated protected void setLastMod(java.util.Date lastMod)
setLastModified(Date)
instead
setLastMod
in class DefaultDataSource
lastMod
- the lastMod to setpublic void setLastModified(java.util.Date lastMod)
lastMod
- the new timeprotected void setParameters(java.util.Map<java.lang.String,java.lang.String[]> aParams)
setParameters
in class DefaultDataSource
aParams
- the parameters to setpublic void setPrivate(java.lang.Boolean aFlag)
DataSource
represents private data
aFlag
- true
if the data source is private, else
false
public void setProjectDependent(java.lang.Boolean aFlag)
DataSource
depends on a project
aFlag
- true
if the data source depends on a project,
else false
@Deprecated public void setUri(java.net.URI uri)
setUri
in class DefaultDataSource
uri
- the uri to setpublic void setURI(java.net.URI uri)
setURI
in class DefaultDataSource
uri
- the uri to setpublic void setVaryHeaders(java.lang.String[] aHeaders)
aHeaders
- the headerspublic void setVirtualPortalDependent(java.lang.Boolean aFlag)
DataSource
depends on the virtual portal
aFlag
- true
if the data source depends on the virtual
portal, else false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |