|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.biocomfort.TO.UserSettingTO
public class UserSettingTO
The UserSettingTO is a data class to store user setting
information, such as available users and the currently activated user of a
medical device. The manipulation of this data object can result in
inconsistency. Therefore the object's state is set to 'unvalidated' after
each data manipulation. Call the method validate() to
revalidate a UserSettingTO object.
This data class is part of the class MedicalDeviceTO but
initially not instantiated. To store user setting information for a
medical device create a new instance of this class and assign it to the
MedicalDeviceTO object.
MedicalDeviceTO.setUserSetting(UserSettingTO),
MedicalDeviceTO.getUserSetting(),
validate(),
Serialized Form| Constructor Summary | |
|---|---|
UserSettingTO()
Constructs a UserSettingTO object with initializing it so
that all users are deactivated, the current active user is set to
user 1 and the validation state is set to 'no user set'. |
|
UserSettingTO(int currentActiveUser,
boolean activateUser1,
boolean activateUser2,
boolean activateUser3,
boolean activateUser4,
boolean activateUser5,
boolean activateUser6,
boolean activateUser7,
boolean activateUser8)
Constructs a UserSettingTO object with specifying the
current active user by the given argument currentActiveUser
and with specifying which users are active and available (for the
medical device to whose MedicalDeviceTO object this user
setting data object is assign to) by the arguments
activateUser1 till activateUser8. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Returns a deep clone of this UserSettingTO object. |
int |
getActiveUserCount()
Returns the number of all currently activated users of the medical device to whose MedicalDeviceTO object this user setting data
object is assign to. |
int[] |
getActiveUsers()
Returns an integer array with the user numbers of all currently activated users of the medical device to whose MedicalDeviceTO object this user setting data object is
assign to. |
int |
getCurrentActiveUser()
Returns the current active user of the medical device to whose MedicalDeviceTO object this user setting data object is
assign to. |
boolean[] |
getUserActive()
This function is only used for serialization issues. |
boolean |
isNoUserSet()
Returns true if the current object's validation state
is 'no user set'. |
boolean |
isUnvalidated()
Returns true if the current object's validation state
is 'unvalidated'. |
boolean |
isUserActive(int userNumber)
Returns true if the user specified by the parameter
userNumber is activated. |
boolean |
isValid()
Returns true if the current object's validation state
is 'valid'. |
void |
reset()
Resets this UserSettingTO object so that all users are
deactivated, the current active user is set to user 1 and the
validation state is set to 'no user set'. |
void |
setCurrentActiveUser(int userNumber)
Sets the current active user of the medical device to whose MedicalDeviceTO object this user setting data object is
assign to. |
void |
setUserActive(boolean[] userActive)
This function is only used for serialization issues. |
void |
setUserActive(int userNumber,
boolean active)
Activates or deactivates the user specified by the parameter userNumber. |
java.lang.String |
toString()
Converts this UserSettingTO object to a String
of the form:
UserSettingTO (currentActiveUser:c,userActive:[a,a,a,a,a,a,a,a],state:s). |
void |
validate()
Validates this UserSettingTO object if it is unvalidated. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UserSettingTO()
UserSettingTO object with initializing it so
that all users are deactivated, the current active user is set to
user 1 and the validation state is set to 'no user set'.
public UserSettingTO(int currentActiveUser,
boolean activateUser1,
boolean activateUser2,
boolean activateUser3,
boolean activateUser4,
boolean activateUser5,
boolean activateUser6,
boolean activateUser7,
boolean activateUser8)
UserSettingTO object with specifying the
current active user by the given argument currentActiveUser
and with specifying which users are active and available (for the
medical device to whose MedicalDeviceTO object this user
setting data object is assign to) by the arguments
activateUser1 till activateUser8.
currentActiveUser - the current active useractivateUser1 - true if the user 1 is activated,
false otherwiseactivateUser2 - true if the user 2 is activated,
false otherwiseactivateUser3 - true if the user 3 is activated,
false otherwiseactivateUser4 - true if the user 4 is activated,
false otherwiseactivateUser5 - true if the user 5 is activated,
false otherwiseactivateUser6 - true if the user 6 is activated,
false otherwiseactivateUser7 - true if the user 7 is activated,
false otherwiseactivateUser8 - true if the user 8 is activated,
false otherwise| Method Detail |
|---|
public void reset()
UserSettingTO object so that all users are
deactivated, the current active user is set to user 1 and the
validation state is set to 'no user set'.
public void validate()
UserSettingTO object if it is unvalidated.
If the current active user is not activated it will be set to the
first activated user that is found. The current data object's
validation state is set to 'no user activated' in case that no users
are activated otherwise it is set to 'valid'.
isUnvalidated(),
isValid(),
isNoUserSet()public boolean isNoUserSet()
true if the current object's validation state
is 'no user set'. This will only be the case after calling the
validate() method of an UserSettingTO
object thats users are all deactivate.
true if the current data object's state is 'no
user set'validate()public boolean isUnvalidated()
true if the current object's validation state
is 'unvalidated'. The object's validation state will be set
automatically to 'unvalidated' after an object's manipulation method
was called. The method validate() will revalidate a
UserSettingTO object.
true if the current data object's state is
'unvalidated'.validate()public boolean isValid()
true if the current object's validation state
is 'valid'. The object's validation state will be set to 'valid'
within the method validate() in case that any user is
activated.
true if the current data object's state is 'valid'validate()public boolean isUserActive(int userNumber)
true if the user specified by the parameter
userNumber is activated. This parameter must be a number
between 1-8.
userNumber - the medical device's user number between 1-8
true if the medical device's user is activated
public void setUserActive(int userNumber,
boolean active)
userNumber. This parameter must be a number between 1
and 8.UserSettingTO object will be
set to 'unvalidated'. Call the method validate() to
revalidate this object.
userNumber - the medical device's user number between 1-8active - true activates the medical device's user,
false deactivates itvalidate()public int getCurrentActiveUser()
MedicalDeviceTO object this user setting data object is
assign to.
public void setCurrentActiveUser(int userNumber)
MedicalDeviceTO object this user setting data object is
assign to.UserSettingTO object will
be set to 'unvalidated'. Call the method validate() to
revalidate this object.
userNumber - the medival device's active user number between
1-8validate()public int getActiveUserCount()
MedicalDeviceTO object this user setting data
object is assign to.
public int[] getActiveUsers()
MedicalDeviceTO object this user setting data object is
assign to. Each element of the returned array represents a medical
device's user number of an activated user. These numbers are between
1-8.
public java.lang.String toString()
UserSettingTO object to a String
of the form:
where:UserSettingTO (currentActiveUser:c,userActive:[a,a,a,a,a,a,a,a],state:s).
UserSettingTO object's
state. Possible values are: 'VALID', 'UNVALIDATED' or 'NO_USER_SET'.
toString in class java.lang.Object
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
UserSettingTO object.
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic boolean[] getUserActive()
isUserActive(int) or
getActiveUsers() can be used instead.
isUserActive(int),
getActiveUsers()public void setUserActive(boolean[] userActive)
userActive - a boolean array that describes which medical
device's users are activatedsetUserActive(int, boolean)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||