|
tauZaman v0.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--tauzaman.TauZamanLocalService
TauZamanLocalService
class provides local Calendar
related services. It is instantiated via TauZamanSystem
.
// assume americanCalendricSystemUrl and defaultPropertyListUrl are alread declared and initialized TauZamanSystem tzs = new TauZamanSystem(); TauZamanLocalService tzls = tzs.getTauZamanLocalService("american", americanCalendricSystemUrl, defaultPropertyListUrl);
TauZamanSystem
Field Summary | |
private java.lang.String |
activeCalendricSystemName
user given name of active CalendricSystem |
private java.util.Hashtable |
calendricSystemNamespace
A mapping from user given CalendricSystem names to actual
CalendricSystem objects |
private CalendricSystemRepository |
csr
A handle to CalendricSystemRepository of parent TauZamanSystem |
private FVSupportRepository |
fvsr
A handle to FVSupportRepository of parent TauZamanSystem |
private PropertyRepository |
pr
A handle to PropertyRepository of parent TauZamanSystem |
Constructor Summary | |
protected |
TauZamanLocalService(TauZamanSystem parentSystem,
java.lang.String calendricSystemName,
java.net.URL calendricSystemUrl,
java.net.URL defaultPropertyListUrl)
Constructs a TauZamanLocalService object ready to serve. |
Method Summary | |
Granularity |
getActiveCalendricSystemDefaultGranularity()
Returns default Granularity of active CalendricSystem . |
java.lang.String |
getActiveCalendricSystemName()
Returns name of active CalendricSystem of this service. |
protected CalendricSystem |
getCalendricSystem(java.lang.String calendricSystemName)
Returns a handle to CalendricSystem object given its name. |
protected FVSupportRepository |
getFVSupportRepository()
Returns a handle to FVSupportRepository of this service. |
protected PropertyManager |
getPropertyManager(java.lang.String calendricSystemName)
Returns a handle to PropertyManager object given its fellow
CalendricSystem name. |
java.lang.String |
getPropertyStackImage(java.lang.String propertyName)
Gets all the current Property information of a specific
Property name in a String. |
java.lang.String |
getPropertyStackImage(java.lang.String calendricSystemName,
java.lang.String propertyName)
Gets all the current Property information of a specific
Property name in a String. |
private java.lang.String |
getPropertyStackImageInternal(PropertyManager pm,
java.lang.String propertyName)
Internal use... |
boolean |
isValidCalendricSystemName(java.lang.String calendricSystemName)
Returns true if given CalendricSystem name is actually mapped
to a loaded CalendricSystem object. |
void |
loadCalendricSystem(java.lang.String calendricSystemName,
java.net.URL calendricSystemUrl,
java.net.URL defaultPropertyListUrl)
Loads the CalendricSystem , whose specification file and default
Property list URLs are given. |
Granule[] |
parseInput(java.lang.String inputStr,
java.lang.String propertyName)
Returns an array of Granule objects formed by using input temporal constant and
given Property name. |
java.lang.String |
parseOutput(Granule[] granules,
java.lang.String propertyName,
java.lang.String cachedCalendricSystemName)
Converts a timestamp (in terms of Granule (s)) into temporal
constant as string. |
void |
propertyActivate(java.lang.String calendricSystemName,
java.net.URL propertyUrl,
java.lang.String[] focusPropertyNames)
Activates a Property from given URL of Property specification file.
|
void |
propertyActivate(java.net.URL propertyUrl,
java.lang.String[] focusPropertyNames)
Activates a Property from given Property specification file URL.
|
private void |
propertyActivateInternal(PropertyManager pm,
java.net.URL propertyUrl,
java.lang.String[] focusPropertyNames)
Internal use... |
void |
propertyDeactivate(java.lang.String propertyName)
Deactivates a Property whose has the given name.
|
void |
propertyDeactivate(java.lang.String calendricSystemName,
java.lang.String propertyName)
Deactivates and removes any active Properties . |
void |
propertyDeactivateAll()
Deactivates and removes any active Properties . |
void |
propertyDeactivateAll(java.lang.String calendricSystemName)
Deactivates and removes any active Properties . |
private void |
propertyDeactivateAllInternal(PropertyManager pm)
Internal use... |
private void |
propertyDeactivateInternal(PropertyManager pm,
java.lang.String propertyName)
Internal use... |
void |
propertySetDefault(java.lang.String propertyName)
Sets Property (given by its name) to its default value. |
void |
propertySetDefault(java.lang.String calendricSystemName,
java.lang.String propertyName)
Sets Property (given by its name) to its default value. |
void |
propertySetDefaultAll()
Sets all active Properties to their default values.
|
void |
propertySetDefaultAll(java.lang.String calendricSystemName)
Sets all active Properties to their default values.
|
private void |
propertySetDefaultAllInternal(PropertyManager pm)
Internal use... |
private void |
propertySetDefaultInternal(PropertyManager pm,
java.lang.String propertyName)
Internal use... |
void |
setActiveCalendricSystem(java.lang.String calendricSystemName)
Sets given CalendricSystem name as active CalendricSystem of
this service. |
java.lang.String |
toString()
Returns String representation of this TauZamanLocalService . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.lang.String activeCalendricSystemName
CalendricSystem
private java.util.Hashtable calendricSystemNamespace
CalendricSystem
names to actual
CalendricSystem
objects
private CalendricSystemRepository csr
CalendricSystemRepository
of parent TauZamanSystem
private PropertyRepository pr
PropertyRepository
of parent TauZamanSystem
private FVSupportRepository fvsr
FVSupportRepository
of parent TauZamanSystem
Constructor Detail |
protected TauZamanLocalService(TauZamanSystem parentSystem, java.lang.String calendricSystemName, java.net.URL calendricSystemUrl, java.net.URL defaultPropertyListUrl) throws CalendricSystemFormationException, PropertyFormationException
TauZamanLocalService
object ready to serve.
parentSystem
- parent TauZamanSystem
of this TauZamanLocalService
calendricSystemName
- String name of defaultly loaded CalendricSystem
calendricSystemUrl
- URL of defaultly loaded CalendricSystem
defaultPropertyListUrl
- URL of defaultly loaded Property
list
CalendricSystemFormationException
- if any abnormal condition occurs when
loading default CalendricSystem
PropertyFormationException
- if any abnormal condition occurs when
loading default Property
listMethod Detail |
public Granularity getActiveCalendricSystemDefaultGranularity()
Granularity
of active CalendricSystem
.
Granularity
public void loadCalendricSystem(java.lang.String calendricSystemName, java.net.URL calendricSystemUrl, java.net.URL defaultPropertyListUrl) throws CalendricSystemFormationException, PropertyFormationException
CalendricSystem
, whose specification file and default
Property
list URLs are given.
calendricSystemName
- String name of loaded CalendricSystem
calendricSystemUrl
- URL of loaded CalendricSystem
defaultPropertyListUrl
- URL of loaded Property
list
CalendricSystemFormationException
- if any abnormal condition occurs when
loading CalendricSystem
PropertyFormationException
- if any abnormal condition occurs when
loading Property
listpublic void setActiveCalendricSystem(java.lang.String calendricSystemName) throws CalendricSystemServiceException
CalendricSystem
name as active CalendricSystem
of
this service.
calendricSystemName
- String name of CalendricSystem
to be activated
CalendricSystemServiceException
- if any abnormal condition occurs when setting active
CalendricSystem
. Specifically it is thrown when provided a CalendricSystem
name, which is not already loaded.public java.lang.String getActiveCalendricSystemName()
CalendricSystem
of this service.
CalendricSystem
of this serviceprotected CalendricSystem getCalendricSystem(java.lang.String calendricSystemName)
CalendricSystem
object given its name.
calendricSystemName
- String name of requested CalendricSystem
object
CalendricSystem
objectCalendricSystem
protected PropertyManager getPropertyManager(java.lang.String calendricSystemName)
PropertyManager
object given its fellow
CalendricSystem
name.
calendricSystemName
- String name of CalendricSystem
object
PropertyManager
objectPropertyManager
protected FVSupportRepository getFVSupportRepository()
FVSupportRepository
of this service.
FVSupportRepository
public Granule[] parseInput(java.lang.String inputStr, java.lang.String propertyName) throws IOException
Granule
objects formed by using input temporal constant and
given Property
name.
propertyName
- name of the Property
to be used when parsing input
Granule
objects
IOException
- if any error occurs while parsing an input
temporal constantpublic java.lang.String parseOutput(Granule[] granules, java.lang.String propertyName, java.lang.String cachedCalendricSystemName) throws IOException
Granule
(s)) into temporal
constant as string. Format of the output string, given Property
's
format template is used.
granules
- Calendar
parsed timestamppropertyName
- name of the Property
, which is used to
format of the output string, temporal constant
IOException
- if any error occurs
while converting a timestamp into a temporal constantpublic boolean isValidCalendricSystemName(java.lang.String calendricSystemName)
CalendricSystem
name is actually mapped
to a loaded CalendricSystem
object. False otherwise.
calendricSystemName
- String name of CalendricSystem
that validity is checked.
CalendricSystem
name is actually mapped
to a loaded CalendricSystem
object. False otherwise.public void propertyActivate(java.net.URL propertyUrl, java.lang.String[] focusPropertyNames) throws PropertyFormationException
Property
from given Property specification file URL.
This method updates PropertyManager
of active CalendricSystem
.
focusPropertyNames
- names of Properties
that are wanted to be activated
residing in given file. If null, all of the Properties
in the file, pointed by url,
will be activated.
PropertyFormationException
- if any problem occurs when activating the Property
or if maximum number of allowable Property
ies exceeded (not implemented yet).public void propertyDeactivateAll()
Properties
. It will not deactivate
or remove any default Property
, so any attempt will only succeed to
deactivate and remove only non-default active Properties
.
This method updates PropertyManager
of active CalendricSystem
.
public void propertyDeactivate(java.lang.String propertyName) throws PropertyServiceException
Property
whose has the given name.
This method updates PropertyManager
of active CalendricSystem
if calendricSystemName is null. Else it'll try to update CalendricSystem
,
which corresponds to calendricSystemName.
PropertyServiceException
- if the name is an invalid Property
namepublic void propertySetDefaultAll()
Properties
to their default values.
This method updates PropertyManager
of active CalendricSystem
.
public void propertySetDefault(java.lang.String propertyName) throws PropertyServiceException
Property
(given by its name) to its default value. If the
Property
already has its default value active, then keep silent.
This method updates PropertyManager
of active CalendricSystem
.
PropertyServiceException
- if the name is an invalid Property
namepublic java.lang.String getPropertyStackImage(java.lang.String propertyName) throws PropertyServiceException
Property
information of a specific
Property name in a String. Format of the return string is;
{urlOfProperty}%{urOfProperty}%....%{urlOfProperty}
order is same as of Property stack from bottom to top.
PropertyServiceException
- if any abnormal condition occurs when
getting the image of Property
stack given its namepublic void propertyActivate(java.lang.String calendricSystemName, java.net.URL propertyUrl, java.lang.String[] focusPropertyNames) throws PropertyFormationException, CalendricSystemServiceException
Property
from given URL of Property specification file.
This method updates PropertyManager
of CalendricSystem
,
given its name.
calendricSystemName
- String name, which should point to a URL of CalendricSystem
focusPropertyNames
- names of Properties
that are wanted to be activated
residing in given file
PropertyFormationException
- if any problem occurs when activating the Property
or if maximum number of allowable Property
ies exceeded (not implemented yet)
CalendricSystemServiceException
- if given CalendricSystem
calendricSystemName
is invalidpublic void propertyDeactivateAll(java.lang.String calendricSystemName) throws CalendricSystemServiceException
Properties
. It will not deactivate
or remove any default Property
, so any attempt will only succeed to
deactivate and remove only non-default active Properties
.
This method updates PropertyManager
of active CalendricSystem
.
calendricSystemName
- String name, which should point to a URL of CalendricSystem
CalendricSystemServiceException
- if given CalendricSystem
calendricSystemName
is invalidpublic void propertyDeactivate(java.lang.String calendricSystemName, java.lang.String propertyName) throws PropertyServiceException, CalendricSystemServiceException
Properties
. It will not deactivate
or remove any default Property
, so any attempt will only succeed to
deactivate and remove only non-default active Properties
.
This method updates PropertyManager
of CalendricSystem
,
given its name.
calendricSystemName
- String name, which should point to a URL of CalendricSystem
PropertyServiceException
- if given name is not a valid Property
name
CalendricSystemServiceException
- if given CalendricSystem
calendricSystemName
is invalidpublic void propertySetDefaultAll(java.lang.String calendricSystemName) throws CalendricSystemServiceException
Properties
to their default values.
This method updates PropertyManager
of CalendricSystem
,
given its name.
calendricSystemName
- String name, which should point to a URL of CalendricSystem
CalendricSystemServiceException
- if given CalendricSystem
calendricSystemName
is invalidpublic void propertySetDefault(java.lang.String calendricSystemName, java.lang.String propertyName) throws PropertyServiceException, CalendricSystemServiceException
Property
(given by its name) to its default value. If the
Property
already has its default value active, then keep silent.
This method updates PropertyManager
of CalendricSystem
,
given its name.
calendricSystemName
- String name, which should point to a URL of CalendricSystem
PropertyServiceException
- if given name is not a valid Property
name
CalendricSystemServiceException
- if given CalendricSystem
calendricSystemName
is invalidpublic java.lang.String getPropertyStackImage(java.lang.String calendricSystemName, java.lang.String propertyName) throws PropertyServiceException, CalendricSystemServiceException
Property
information of a specific
Property name in a String. Format of the return string is;
{urlOfProperty}%{urOfProperty}%....%{urlOfProperty}
order is same as of Property stack from bottom to top.
calendricSystemName
- String name, which should point to a URL of CalendricSystem
PropertyServiceException
- if given name is not a valid Property
name
CalendricSystemServiceException
- if given CalendricSystem
calendricSystemName
is invalidprivate void propertyActivateInternal(PropertyManager pm, java.net.URL propertyUrl, java.lang.String[] focusPropertyNames) throws PropertyFormationException
PropertyFormationException
private void propertyDeactivateAllInternal(PropertyManager pm)
private void propertyDeactivateInternal(PropertyManager pm, java.lang.String propertyName) throws PropertyServiceException
PropertyServiceException
private void propertySetDefaultAllInternal(PropertyManager pm)
private void propertySetDefaultInternal(PropertyManager pm, java.lang.String propertyName) throws PropertyServiceException
PropertyServiceException
private java.lang.String getPropertyStackImageInternal(PropertyManager pm, java.lang.String propertyName) throws PropertyServiceException
PropertyServiceException
public java.lang.String toString()
TauZamanLocalService
.
toString
in class java.lang.Object
CalendricSystem
of this
TauZamanLocalService
|
tauZaman v0.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |