tauZaman
v0.1

tauzaman
Interface TauZamanRemoteService

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
TauZamanRemoteServiceImpl

public interface TauZamanRemoteService
extends java.rmi.Remote

TauZamanRemoteService is a remote interface. It defines Calendar related services of a server tauZaman system to its clients.

See Also:
TauZamanSystem
Status:
design complete, implementation complete

Method Summary
 void dummy()
          Test method for calculating RTT independent of any operation, but depending on Java RMI.
 Granularity getActiveCalendricSystemDefaultGranularity()
          Returns default Granularity of active CalendricSystem.
 java.lang.String getActiveCalendricSystemName()
          Returns name of active CalendricSystem of this service.
 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.
 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.
 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.
 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.
 void setActiveCalendricSystem(java.lang.String calendricSystemName)
          Sets given CalendricSystem name as active CalendricSystem of this service.
 

Method Detail

dummy

public void dummy()
           throws java.rmi.RemoteException
Test method for calculating RTT independent of any operation, but depending on Java RMI.

java.rmi.RemoteException

loadCalendricSystem

public void loadCalendricSystem(java.lang.String calendricSystemName,
                                java.net.URL calendricSystemUrl,
                                java.net.URL defaultPropertyListUrl)
                         throws java.rmi.RemoteException,
                                CalendricSystemFormationException,
                                PropertyFormationException
Loads the CalendricSystem, whose specification file and default Property list URLs are given.

Parameters:
calendricSystemName - String name of loaded CalendricSystem
calendricSystemUrl - URL of loaded CalendricSystem
defaultPropertyListUrl - URL of loaded Property list
Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
CalendricSystemFormationException - if any abnormal condition occurs when loading CalendricSystem
PropertyFormationException - if any abnormal condition occurs when loading Property list

setActiveCalendricSystem

public void setActiveCalendricSystem(java.lang.String calendricSystemName)
                              throws java.rmi.RemoteException,
                                     CalendricSystemServiceException
Sets given CalendricSystem name as active CalendricSystem of this service.

Parameters:
calendricSystemName - String name of CalendricSystem to be activated
Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
CalendricSystemServiceException - if any abnormal condition occurs when setting active CalendricSystem. Specifically it is thrown when provided a CalendricSystem name, which is not already loaded.

getActiveCalendricSystemName

public java.lang.String getActiveCalendricSystemName()
                                              throws java.rmi.RemoteException
Returns name of active CalendricSystem of this service.

Returns:
String name of active CalendricSystem of this service
Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection

getActiveCalendricSystemDefaultGranularity

public Granularity getActiveCalendricSystemDefaultGranularity()
                                                       throws java.rmi.RemoteException
Returns default Granularity of active CalendricSystem.

Returns:
default Granularity
Throws:
java.rmi.RemoteException - if any abnormal condition occurs during remote connection

parseInput

public Granule[] parseInput(java.lang.String inputStr,
                            java.lang.String propertyName)
                     throws java.rmi.RemoteException,
                            IOException
Returns an array of Granule objects formed by using input temporal constant and given Property name.

Parameters:
propertyName - name of the Property to be used when parsing input
Returns:
array of Granule objects
Throws:
java.rmi.RemoteException - if any abnormal condition occurs during remote connection
IOException - if any error occurs while parsing an input temporal constant

parseOutput

public java.lang.String parseOutput(Granule[] granules,
                                    java.lang.String propertyName,
                                    java.lang.String cachedCalendricSystemName)
                             throws java.rmi.RemoteException,
                                    IOException
Converts a timestamp (in terms of Granule(s)) into temporal constant as string. Format of the output string, given Property's format template is used.

Parameters:
granules - Calendar parsed timestamp
propertyName - name of the Property, which is used to format of the output string, temporal constant
cachedCalendricSystemName - String name of the CalendricSystem, which was used during the formation of this timestamp
Returns:
formatted String, which is a temporal constant
Throws:
java.rmi.RemoteException - if any abnormal condition occurs during remote connection
IOException - if any error occurs while converting a timestamp into a temporal constant

isValidCalendricSystemName

public boolean isValidCalendricSystemName(java.lang.String calendricSystemName)
                                   throws java.rmi.RemoteException
Returns true if given CalendricSystem name is actually mapped to a loaded CalendricSystem object. False otherwise.

Parameters:
calendricSystemName - String name of CalendricSystem that validity is checked.
Returns:
true if given CalendricSystem name is actually mapped to a loaded CalendricSystem object. False otherwise.
Throws:
java.rmi.RemoteException - if any abnormal condition occurs during remote connection

propertyActivate

public void propertyActivate(java.net.URL propertyUrl,
                             java.lang.String[] focusPropertyNames)
                      throws java.rmi.RemoteException,
                             PropertyFormationException
Activates a Property from given Property specification file URL. This method updates PropertyManager of active CalendricSystem.

Parameters:
focusPropertyNames - names of Properties that are wanted to be activated residing in given file
Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
PropertyFormationException - if any problem occurs when activating the Property or if maximum number of allowable Propertyies exceeded (not implemented yet).

propertyDeactivateAll

public void propertyDeactivateAll()
                           throws java.rmi.RemoteException
Deactivates and removes any active 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.

Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection

propertyDeactivate

public void propertyDeactivate(java.lang.String propertyName)
                        throws java.rmi.RemoteException,
                               PropertyServiceException
Deactivates a 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.

Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
PropertyServiceException - if the name is an invalid Property name

propertySetDefaultAll

public void propertySetDefaultAll()
                           throws java.rmi.RemoteException
Sets all active Properties to their default values. This method updates PropertyManager of active CalendricSystem.

Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection

propertySetDefault

public void propertySetDefault(java.lang.String propertyName)
                        throws java.rmi.RemoteException,
                               PropertyServiceException
Sets 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.

Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
PropertyServiceException - if the name is an invalid Property name

getPropertyStackImage

public java.lang.String getPropertyStackImage(java.lang.String propertyName)
                                       throws java.rmi.RemoteException,
                                              PropertyServiceException
Gets all the current 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.

Returns:
a String containing current Properties activated for a specific Property name
Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
PropertyServiceException - if any abnormal condition occurs when getting the image of Property stack given its name

propertyActivate

public void propertyActivate(java.lang.String calendricSystemName,
                             java.net.URL propertyUrl,
                             java.lang.String[] focusPropertyNames)
                      throws java.rmi.RemoteException,
                             PropertyFormationException,
                             CalendricSystemServiceException
Activates a Property from given URL of Property specification file. This method updates PropertyManager of CalendricSystem, given its name.

Parameters:
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
Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
PropertyFormationException - if any problem occurs when activating the Property or if maximum number of allowable Propertyies exceeded (not implemented yet)
CalendricSystemServiceException - if given CalendricSystem calendricSystemName is invalid

propertyDeactivateAll

public void propertyDeactivateAll(java.lang.String calendricSystemName)
                           throws java.rmi.RemoteException,
                                  CalendricSystemServiceException
Deactivates and removes any active 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.

Parameters:
calendricSystemName - String name, which should point to a URL of CalendricSystem
Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
CalendricSystemServiceException - if given CalendricSystem calendricSystemName is invalid

propertyDeactivate

public void propertyDeactivate(java.lang.String calendricSystemName,
                               java.lang.String propertyName)
                        throws java.rmi.RemoteException,
                               PropertyServiceException,
                               CalendricSystemServiceException
Deactivates and removes any active 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.

Parameters:
calendricSystemName - String name, which should point to a URL of CalendricSystem
Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
PropertyServiceException - if given name is not a valid Property name
CalendricSystemServiceException - if given CalendricSystem calendricSystemName is invalid

propertySetDefaultAll

public void propertySetDefaultAll(java.lang.String calendricSystemName)
                           throws java.rmi.RemoteException,
                                  CalendricSystemServiceException
Sets all active Properties to their default values. This method updates PropertyManager of CalendricSystem, given its name.

Parameters:
calendricSystemName - String name, which should point to a URL of CalendricSystem
Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
CalendricSystemServiceException - if given CalendricSystem calendricSystemName is invalid

propertySetDefault

public void propertySetDefault(java.lang.String calendricSystemName,
                               java.lang.String propertyName)
                        throws java.rmi.RemoteException,
                               PropertyServiceException,
                               CalendricSystemServiceException
Sets 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.

Parameters:
calendricSystemName - String name, which should point to a URL of CalendricSystem
Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
PropertyServiceException - if given name is not a valid Property name
CalendricSystemServiceException - if given CalendricSystem calendricSystemName is invalid

getPropertyStackImage

public java.lang.String getPropertyStackImage(java.lang.String calendricSystemName,
                                              java.lang.String propertyName)
                                       throws java.rmi.RemoteException,
                                              PropertyServiceException,
                                              CalendricSystemServiceException
Gets all the current 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.

Parameters:
calendricSystemName - String name, which should point to a URL of CalendricSystem
Returns:
a String containing current Properties activated for a specific Property name
Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
PropertyServiceException - if given name is not a valid Property name
CalendricSystemServiceException - if given CalendricSystem calendricSystemName is invalid

tauZaman
v0.1

Submit a bug or feature

tauZaman is an open-source, publicly avaliable project