Holger's
Java API

com.antelmann.timeregister
Class TimeUser

java.lang.Object
  extended by com.antelmann.mgmt.EntityImpl
      extended by com.antelmann.mgmt.UserImpl
          extended by com.antelmann.timeregister.TimeUser
All Implemented Interfaces:
Entity, Resource, User, Serializable, Comparable<User>

public class TimeUser
extends UserImpl

This class implements a special User that adds a WorkUnitValidator as a member.

Author:
Holger Antelmann
See Also:
The password is only saved as a hash code., Serialized Form

Field Summary
protected  WorkUnitValidator schedule
          represents the hashed version of the password
 
Fields inherited from class com.antelmann.mgmt.UserImpl
accessList, active, description, name, passwordHash
 
Fields inherited from class com.antelmann.mgmt.EntityImpl
propertyChangeSupport, props
 
Constructor Summary
TimeUser(Object id, String name)
           
TimeUser(Object id, String name, String passwordHash, boolean enabled, String description)
           
TimeUser(Object id, String name, String passwordHash, boolean enabled, String description, WorkUnitValidator schedule)
          Deprecated. 
TimeUser(Object id, User user, WorkUnitValidator schedule)
           
TimeUser(String name)
           
 
Method Summary
 boolean canRead()
          based on the access action String read
 boolean canReadAll()
          based on the access action String readAll
protected  void checkPropertyChange(String key, Object value)
          determines whether a property can be changed as given.
 String getBarcode()
          based on the property barcode
 WorkUnitValidator getWorkUnitValidator()
           
 boolean isAdmin()
          based on the access action String admin
 void setBarcode(String barcode)
           
 void setWorkUnitValidator(WorkUnitValidator schedule)
           
 
Methods inherited from class com.antelmann.mgmt.UserImpl
accessibleObjects, canAccess, checkPassword, compareTo, equals, getDescription, getName, getPasswordHash, hashPassword, isEnabled, resetPassword, setAccess, setDescription, setEnabled, setName, setPassword, setPasswordHash, toString
 
Methods inherited from class com.antelmann.mgmt.EntityImpl
addPropertyChangeListener, containsPropertyText, enableChangeListenerSupport, equalWithProperties, getID, getProperties, getProperty, getPropertyChangeListeners, hashCode, isChangeListenerSupportEnabled, removeProperty, removePropertyChangeListener, setAll, setProperty, verifyProperties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.antelmann.mgmt.Entity
getProperties, getProperty, removeProperty, setProperty
 
Methods inherited from interface com.antelmann.mgmt.Resource
getID
 

Field Detail

schedule

protected WorkUnitValidator schedule
represents the hashed version of the password

Constructor Detail

TimeUser

public TimeUser(String name)

TimeUser

public TimeUser(Object id,
                String name)

TimeUser

public TimeUser(Object id,
                String name,
                String passwordHash,
                boolean enabled,
                String description)

TimeUser

@Deprecated
public TimeUser(Object id,
                           String name,
                           String passwordHash,
                           boolean enabled,
                           String description,
                           WorkUnitValidator schedule)
Deprecated. 


TimeUser

public TimeUser(Object id,
                User user,
                WorkUnitValidator schedule)
Method Detail

checkPropertyChange

protected void checkPropertyChange(String key,
                                   Object value)
                            throws IllegalArgumentException
Description copied from class: EntityImpl
determines whether a property can be changed as given. This method is checked on the attempt to change any property; If this method throws an IllegalArgumentException, it is propagated to the caller of setProperty() or removeProperty(). If this is called on the attempt to remove a property, the value is null. This method may be overridden to guarantee a specific consistency of all properties. The message within the IllegalArgumentException allows for specific information on why a property change would not be allowed. This implementation is plain empty, i.e. any change is allowed.

Overrides:
checkPropertyChange in class EntityImpl
Throws:
IllegalArgumentException - if the change of the value is not to be allowed
See Also:
EntityImpl.setProperty(String, Object), EntityImpl.removeProperty(String)

getBarcode

public String getBarcode()
based on the property barcode


setBarcode

public void setBarcode(String barcode)

setWorkUnitValidator

public void setWorkUnitValidator(WorkUnitValidator schedule)

getWorkUnitValidator

public WorkUnitValidator getWorkUnitValidator()

canRead

public boolean canRead()
based on the access action String read


canReadAll

public boolean canReadAll()
based on the access action String readAll


isAdmin

public boolean isAdmin()
based on the access action String admin



(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads