pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.accesscontrol.attributes
Class BundleAttribute

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.util.entity.Node
          extended by org.torweg.pulse.accesscontrol.attributes.AbstractAttribute<Bundle>
              extended by org.torweg.pulse.accesscontrol.attributes.BundleAttribute
All Implemented Interfaces:
java.io.Serializable, JDOMable, INamed

@Entity
public final class BundleAttribute
extends AbstractAttribute<Bundle>
implements INamed

represents a Bundle in the AttributeRegistry.

Version:
$Revision: 1378 $
Author:
Daniel Dietz, Thomas Weber
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.torweg.pulse.accesscontrol.attributes.AbstractAttribute
LOGGER
 
Constructor Summary
BundleAttribute()
          creates a new non-system BundleAttribute.
BundleAttribute(boolean isSystem)
          creates a new BundleAttribute.
 
Method Summary
 AbstractAttribute<Bundle> getAttributeInstance(java.lang.String name, boolean isSystem)
          creates a new BundleAttribute, but ignores the given name.
 Bundle getBundle()
          returns the bundle associated with the attribute.
 AbstractTypedCheck<Bundle> getCheck()
          returns the check associated with the attribute.
 java.lang.String getName()
          returns the name of the BundleAttribute, which is the name of the associated Bundle.
 void setBundle(Bundle b)
          sets the bundle.
 void setCheck(AbstractTypedCheck<Bundle> c)
          is not implemented and will throw a PulseException.
 AbstractAttribute<Bundle> updateSettingsFromCommand(Command command, org.hibernate.Session session)
          does nothing since BundleAttributes do not have any settings.
 AbstractValue<Bundle> valueFromCommand(Command c)
          returns null, since BundleAttributes do not have values.
 
Methods inherited from class org.torweg.pulse.accesscontrol.attributes.AbstractAttribute
addAdminEditRole, addAdminViewRole, addSelfEditRole, addSelfViewRole, addTriggeredRole, deserializeToJDOM, deserializeToJDOM, getAdminEditRoles, getAdminViewRoles, getSelfEditRoles, getSelfViewRoles, getTriggeredRoles, getTypedChecks, getValue, isRequired, isSystemAttribute, isValid, removeAdminEditRole, removeAdminViewRole, removeSelfEditRole, removeSelfViewRole, removeTriggeredRole, setAdminEditRoles, setAdminViewRoles, setRequired, setSelfEditRoles, setSelfViewRoles, setTriggeredRoles, setValue, toJSON
 
Methods inherited from class org.torweg.pulse.util.entity.Node
addChild, addChild, getChild, getChildIndex, getChildren, getParent, hasChildren, removeChild, setChildren
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleAttribute

public BundleAttribute()
creates a new non-system BundleAttribute.


BundleAttribute

public BundleAttribute(boolean isSystem)
creates a new BundleAttribute.

Parameters:
isSystem - flag, indicating whether the attribute is a system attribute
Method Detail

getBundle

public Bundle getBundle()
returns the bundle associated with the attribute.

Returns:
the bundle

setBundle

public void setBundle(Bundle b)
sets the bundle.

Parameters:
b - the bundle to set

getAttributeInstance

public AbstractAttribute<Bundle> getAttributeInstance(java.lang.String name,
                                                      boolean isSystem)
creates a new BundleAttribute, but ignores the given name.

The attribute does not have a bundle set yet.

Specified by:
getAttributeInstance in class AbstractAttribute<Bundle>
Parameters:
name - is ignored
isSystem - flag, indicating whether the attribute is a system attribute
Returns:
a new BundleAttribute

getCheck

public AbstractTypedCheck<Bundle> getCheck()
returns the check associated with the attribute.

Specified by:
getCheck in class AbstractAttribute<Bundle>
Returns:
null, always.

setCheck

public void setCheck(AbstractTypedCheck<Bundle> c)
is not implemented and will throw a PulseException.

Specified by:
setCheck in class AbstractAttribute<Bundle>
Parameters:
c - the check which will be ignored
Throws:
java.lang.UnsupportedOperationException

getName

public java.lang.String getName()
returns the name of the BundleAttribute, which is the name of the associated Bundle.

Specified by:
getName in interface INamed
Specified by:
getName in class AbstractAttribute<Bundle>
Returns:
the name

valueFromCommand

public AbstractValue<Bundle> valueFromCommand(Command c)
returns null, since BundleAttributes do not have values.

Specified by:
valueFromCommand in class AbstractAttribute<Bundle>
Parameters:
c - the current Command
Returns:
null

updateSettingsFromCommand

public AbstractAttribute<Bundle> updateSettingsFromCommand(Command command,
                                                           org.hibernate.Session session)
does nothing since BundleAttributes do not have any settings.

Specified by:
updateSettingsFromCommand in class AbstractAttribute<Bundle>
Parameters:
command - is ignored
session - is not used
Returns:
the current instance
See Also:
AbstractAttribute.updateSettingsFromCommand(Command, Session)