|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ucsb.nceas.metacat.shared.BaseService
edu.ucsb.nceas.metacat.properties.SimpleProperties
public class SimpleProperties
A suite of utility classes for the metadata configuration utility
| Field Summary |
|---|
| Fields inherited from class edu.ucsb.nceas.metacat.shared.BaseService |
|---|
_serviceName |
| Fields inherited from interface edu.ucsb.nceas.metacat.properties.PropertiesInterface |
|---|
BYPASSED, CONFIGURED, UNCONFIGURED |
| Constructor Summary | |
|---|---|
protected |
SimpleProperties()
private constructor since this is a singleton |
| Method Summary | |
|---|---|
boolean |
arePropertiesConfigured()
|
void |
bypassConfiguration()
|
void |
checkAndSetProperty(javax.servlet.http.HttpServletRequest request,
java.lang.String propertyName)
Take input from the user in an HTTP request about an property to be changed and update the metacat property file with that new value if it has changed from the value that was originally set. |
boolean |
doBypass()
|
void |
doRefresh()
|
edu.ucsb.nceas.utilities.SortedProperties |
getAuthBackupProperties()
|
edu.ucsb.nceas.utilities.PropertiesMetaData |
getAuthMetaData()
|
edu.ucsb.nceas.utilities.SortedProperties |
getMainBackupProperties()
|
edu.ucsb.nceas.utilities.PropertiesMetaData |
getMainMetaData()
|
java.util.Map<java.lang.String,java.lang.String> |
getPropertiesByGroup(java.lang.String groupName)
Get a Map of all properties that start with the groupName prefix. |
java.lang.String |
getProperty(java.lang.String propertyName)
Utility method to get a property value from the properties file |
java.util.Vector<java.lang.String> |
getPropertyNames()
Get a set of all property names. |
java.util.Vector<java.lang.String> |
getPropertyNamesByGroup(java.lang.String groupName)
Get a Set of all property names that start with the groupName prefix. |
void |
persistAuthBackupProperties(javax.servlet.ServletContext servletContext)
|
void |
persistMainBackupProperties()
|
void |
persistProperties()
Save the properties to a properties file. |
boolean |
refreshable()
|
void |
setProperty(java.lang.String propertyName,
java.lang.String newValue)
Utility method to set a property value both in memory and to the properties file |
void |
setPropertyNoPersist(java.lang.String propertyName,
java.lang.String newValue)
Utility method to set a property value in memory. |
void |
stop()
|
| Methods inherited from class edu.ucsb.nceas.metacat.shared.BaseService |
|---|
refresh |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SimpleProperties()
throws ServiceException
servletContext - the context we will use to get relative paths
ServiceException| Method Detail |
|---|
public boolean refreshable()
refreshable in class BaseService
public void doRefresh()
throws ServiceException
doRefresh in class BaseServiceServiceException
public void stop()
throws ServiceException
stop in class BaseServiceServiceException
public java.lang.String getProperty(java.lang.String propertyName)
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
getProperty in interface PropertiesInterfacepropertyName - the name of the property requested
edu.ucsb.nceas.utilities.PropertyNotFoundExceptionpublic java.util.Vector<java.lang.String> getPropertyNames()
getPropertyNames in interface PropertiesInterfacepublic java.util.Vector<java.lang.String> getPropertyNamesByGroup(java.lang.String groupName)
getPropertyNamesByGroup in interface PropertiesInterfacegroupName - the prefix of the keys to search for.
public java.util.Map<java.lang.String,java.lang.String> getPropertiesByGroup(java.lang.String groupName)
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
getPropertiesByGroup in interface PropertiesInterfacegroupName - the prefix of the keys to search for.
edu.ucsb.nceas.utilities.PropertyNotFoundException
public void setProperty(java.lang.String propertyName,
java.lang.String newValue)
throws edu.ucsb.nceas.utilities.GeneralPropertyException
setProperty in interface PropertiesInterfacepropertyName - the name of the property requestednewValue - the new value for the property
edu.ucsb.nceas.utilities.GeneralPropertyException
public void setPropertyNoPersist(java.lang.String propertyName,
java.lang.String newValue)
throws edu.ucsb.nceas.utilities.GeneralPropertyException
setPropertyNoPersist in interface PropertiesInterfacepropertyName - the name of the property requestednewValue - the new value for the property
edu.ucsb.nceas.utilities.GeneralPropertyException
public void persistProperties()
throws edu.ucsb.nceas.utilities.GeneralPropertyException
persistProperties in interface PropertiesInterfaceedu.ucsb.nceas.utilities.GeneralPropertyException
public void checkAndSetProperty(javax.servlet.http.HttpServletRequest request,
java.lang.String propertyName)
throws edu.ucsb.nceas.utilities.GeneralPropertyException
checkAndSetProperty in interface PropertiesInterfacerequest - that was generated by the userresponse - to send output back to the userpropertyName - the name of the property to be checked and set
edu.ucsb.nceas.utilities.GeneralPropertyExceptionpublic edu.ucsb.nceas.utilities.SortedProperties getMainBackupProperties()
getMainBackupProperties in interface PropertiesInterface
public edu.ucsb.nceas.utilities.SortedProperties getAuthBackupProperties()
throws edu.ucsb.nceas.utilities.GeneralPropertyException
getAuthBackupProperties in interface PropertiesInterfaceedu.ucsb.nceas.utilities.GeneralPropertyException
public edu.ucsb.nceas.utilities.PropertiesMetaData getMainMetaData()
throws edu.ucsb.nceas.utilities.GeneralPropertyException
getMainMetaData in interface PropertiesInterfaceedu.ucsb.nceas.utilities.GeneralPropertyException
public edu.ucsb.nceas.utilities.PropertiesMetaData getAuthMetaData()
throws edu.ucsb.nceas.utilities.GeneralPropertyException
getAuthMetaData in interface PropertiesInterfaceedu.ucsb.nceas.utilities.GeneralPropertyException
public void persistMainBackupProperties()
throws edu.ucsb.nceas.utilities.GeneralPropertyException
persistMainBackupProperties in interface PropertiesInterfaceedu.ucsb.nceas.utilities.GeneralPropertyException
public void persistAuthBackupProperties(javax.servlet.ServletContext servletContext)
throws edu.ucsb.nceas.utilities.GeneralPropertyException
persistAuthBackupProperties in interface PropertiesInterfaceedu.ucsb.nceas.utilities.GeneralPropertyException
public boolean arePropertiesConfigured()
throws edu.ucsb.nceas.utilities.GeneralPropertyException
arePropertiesConfigured in interface PropertiesInterfaceedu.ucsb.nceas.utilities.GeneralPropertyException
public boolean doBypass()
throws edu.ucsb.nceas.utilities.GeneralPropertyException
doBypass in interface PropertiesInterfaceedu.ucsb.nceas.utilities.GeneralPropertyException
public void bypassConfiguration()
throws edu.ucsb.nceas.utilities.GeneralPropertyException
bypassConfiguration in interface PropertiesInterfaceedu.ucsb.nceas.utilities.GeneralPropertyException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||