|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vfny.geoserver.global.UserContainer
Represents a User for GeoServer.
Used as a typesafe Session container. This is an alternative to using calls to request.getAttributes( key ) and casting.
The User object is saved in session scope by ConfigAction:
HttpSession session = request.getSession();
User user = request.getAttributes( UserContainer.WEB_CONTAINER_KEY );
if( user == null ){
user = new UserContainer( request.getLocal() );
session.setAttributes( UserContainer.WEB_CONTAINER_KEY, user );
}
This class is based on the UserContainer class outlined in the book "Programming Jakarta Struts" by Chuck Cavaness.
Field Summary | |
DataStoreConfig |
newDataStore
New DataStore info before it is added to DataConfig. |
static java.lang.String |
SESSION_KEY
|
java.lang.String |
username
User name for this user |
Constructor Summary | |
UserContainer()
Create User Container for the current locale |
|
UserContainer(java.util.Locale local)
Create User Container for the provided locale |
Method Summary | |
org.geotools.feature.AttributeType |
getAttributeType()
Access attributeType property. |
AttributeTypeInfoConfig |
getAttributeTypeConfig()
Access attributeTypeConfig property. |
org.geotools.data.DataStore |
getDataStore()
Access dataStore property. |
DataStoreConfig |
getDataStoreConfig()
Access dataStoreConfig property. |
java.lang.String |
getDataStoreID()
Access dataStoreID property. |
org.geotools.feature.FeatureType |
getFeatureType()
Access featureType property. |
FeatureTypeConfig |
getFeatureTypeConfig()
Access featureTypeConfig property. |
java.util.Locale |
getLocale()
User's Locale. |
DataStoreConfig |
getNewDataStore()
Access newDataStore property. |
java.lang.String |
getUsername()
Access username property. |
void |
setAttributeType(org.geotools.feature.AttributeType attributeType)
Set attributeType to attributeType. |
void |
setAttributeTypeConfig(AttributeTypeInfoConfig attributeTypeConfig)
Set attributeTypeConfig to attributeTypeConfig. |
void |
setDataStore(org.geotools.data.DataStore dataStore)
Set dataStore to dataStore. |
void |
setDataStoreConfig(DataStoreConfig dataStoreConfig)
Set dataStoreConfig to dataStoreConfig. |
void |
setDataStoreID(java.lang.String dataStoreID)
Set dataStoreID to dataStoreID. |
void |
setFeatureType(org.geotools.feature.FeatureType featureType)
Set featureType to featureType. |
void |
setFeatureTypeConfig(FeatureTypeConfig featureTypeConfig)
Set featureTypeConfig to featureTypeConfig. |
void |
setLocale(java.util.Locale locale)
Set the user's Locale. |
void |
setNewDataStore(DataStoreConfig newDataStore)
Set newDataStore to newDataStore. |
void |
setUsername(java.lang.String username)
Set username to username. |
void |
valueBound(javax.servlet.http.HttpSessionBindingEvent arg0)
Session callback. |
void |
valueUnbound(javax.servlet.http.HttpSessionBindingEvent arg0)
Clean up user resources when unbound from session. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String SESSION_KEY
public java.lang.String username
public DataStoreConfig newDataStore
Unlike the DataStores in DataConfig this one does not yet have to work.
Constructor Detail |
public UserContainer()
public UserContainer(java.util.Locale local)
local
- DOCUMENT ME!Method Detail |
public java.util.Locale getLocale()
Used to format messages. Should be used in conjunction with internatalization support.
public void setLocale(java.util.Locale locale)
locale
- User's locale.public void valueBound(javax.servlet.http.HttpSessionBindingEvent arg0)
valueBound
in interface javax.servlet.http.HttpSessionBindingListener
arg0
- HttpSessionBindingListener.valueBound(javax.servlet.http.HttpSessionBindingEvent)
public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent arg0)
valueUnbound
in interface javax.servlet.http.HttpSessionBindingListener
arg0
- HttpSessionBindingListener.valueUnbound(javax.servlet.http.HttpSessionBindingEvent)
public org.geotools.feature.AttributeType getAttributeType()
public void setAttributeType(org.geotools.feature.AttributeType attributeType)
attributeType
- The attributeType to set.public AttributeTypeInfoConfig getAttributeTypeConfig()
public void setAttributeTypeConfig(AttributeTypeInfoConfig attributeTypeConfig)
attributeTypeConfig
- The attributeTypeConfig to set.public org.geotools.data.DataStore getDataStore()
public void setDataStore(org.geotools.data.DataStore dataStore)
dataStore
- The dataStore to set.public DataStoreConfig getDataStoreConfig()
public void setDataStoreConfig(DataStoreConfig dataStoreConfig)
dataStoreConfig
- The dataStoreConfig to set.public java.lang.String getDataStoreID()
public org.geotools.feature.FeatureType getFeatureType()
public FeatureTypeConfig getFeatureTypeConfig()
public DataStoreConfig getNewDataStore()
public void setNewDataStore(DataStoreConfig newDataStore)
newDataStore
- The newDataStore to set.public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- The username to set.public void setDataStoreID(java.lang.String dataStoreID)
dataStoreID
- The dataStoreID to set.public void setFeatureType(org.geotools.feature.FeatureType featureType)
featureType
- The featureType to set.public void setFeatureTypeConfig(FeatureTypeConfig featureTypeConfig)
featureTypeConfig
- The featureTypeConfig to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |