|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.util.entity.AbstractBasicEntity
org.torweg.pulse.util.entity.Node
org.torweg.pulse.accesscontrol.attributes.AbstractAttribute<Selection>
org.torweg.pulse.accesscontrol.attributes.SelectionAttribute
@Entity public class SelectionAttribute
TODO: requires major refactoring to really be multi-select-able.
| Field Summary |
|---|
| Fields inherited from class org.torweg.pulse.accesscontrol.attributes.AbstractAttribute |
|---|
LOGGER |
| Constructor Summary | |
|---|---|
SelectionAttribute()
creates a new SelectionAttribute ( multiselect = false),
which is not a system attribute. |
|
SelectionAttribute(boolean isSystem)
creates a new SelectionAttribute ( multiselect = false). |
|
SelectionAttribute(java.lang.String n)
creates a new SelectionAttribute ( multiselect,
systemAttribute = false) with the given name. |
|
SelectionAttribute(java.lang.String n,
boolean isSystem)
creates a new SelectionAttribute ( multiselect = false)
with the given name. |
|
SelectionAttribute(java.lang.String n,
boolean isSystem,
boolean ms)
creates a new SelectionAttribute with the given name and
selection type. |
|
| Method Summary | |
|---|---|
org.jdom.Element |
deserializeToJDOM()
returns a JDOM representation of the attribute. |
org.jdom.Element |
deserializeToJDOM(java.util.Map<java.lang.Long,AbstractValue<?>> valueMap)
returns a JDOM representation of the attribute. |
AbstractAttribute<Selection> |
getAttributeInstance(java.lang.String n,
boolean s)
returns a new SelectionAttribute with the given name. |
AbstractTypedCheck<Selection> |
getCheck()
returns the check of the attribute. |
java.lang.String |
getName()
returns the attributes name. |
java.util.Set<Option> |
getOptions()
returns the options. |
protected java.lang.String |
getParameterName()
returns the parameter name. |
boolean |
isMultiselect()
returns the multi-select property. |
void |
setCheck(AbstractTypedCheck<Selection> c)
sets the check for the attribute. |
void |
setMultiselect(boolean ms)
sets the multi-select property. |
void |
setName(java.lang.String n)
sets the name of the attribute. |
void |
setOptions(java.util.Set<Option> o)
sets the options and updates the reverse mapping. |
AbstractAttribute<Selection> |
updateSettingsFromCommand(Command command,
org.hibernate.Session session)
updates the attribute's multi-select setting and its options. |
AbstractValue<Selection> |
valueFromCommand(Command c)
initialises a value of this attribute from the given command. |
| Methods inherited from class org.torweg.pulse.accesscontrol.attributes.AbstractAttribute |
|---|
addAdminEditRole, addAdminViewRole, addSelfEditRole, addSelfViewRole, addTriggeredRole, 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 |
|---|
public SelectionAttribute()
SelectionAttribute ( multiselect = false),
which is not a system attribute.
public SelectionAttribute(boolean isSystem)
SelectionAttribute ( multiselect = false).
isSystem - flag, indicating whether the attribute is a system attributepublic SelectionAttribute(java.lang.String n)
SelectionAttribute ( multiselect,
systemAttribute = false) with the given name.
n - the name
public SelectionAttribute(java.lang.String n,
boolean isSystem)
SelectionAttribute ( multiselect = false)
with the given name.
n - the nameisSystem - flag, indicating whether the attribute is a system attribute
public SelectionAttribute(java.lang.String n,
boolean isSystem,
boolean ms)
SelectionAttribute with the given name and
selection type.
n - the nameisSystem - flag, indicating whether the attribute is a system attributems - flag, indicating whether the selection is a multi-select
selection or not| Method Detail |
|---|
public final void setName(java.lang.String n)
setName in interface INameablen - the name to setINameable.setName(String)public final java.lang.String getName()
getName in interface INamedgetName in class AbstractAttribute<Selection>public final java.util.Set<Option> getOptions()
public final void setOptions(java.util.Set<Option> o)
o - the options to setpublic final boolean isMultiselect()
public final void setMultiselect(boolean ms)
ms - the multi-select flag to setpublic final AbstractTypedCheck<Selection> getCheck()
getCheck in class AbstractAttribute<Selection>AbstractAttribute.getCheck()public final void setCheck(AbstractTypedCheck<Selection> c)
setCheck in class AbstractAttribute<Selection>c - the check to setAbstractAttribute.setCheck(org.torweg.pulse.accesscontrol.attributes.AbstractTypedCheck)protected final java.lang.String getParameterName()
public final AbstractValue<Selection> valueFromCommand(Command c)
AbstractAttribute
valueFromCommand in class AbstractAttribute<Selection>c - the current command
AbstractValue<Selection>AbstractAttribute.valueFromCommand(org.torweg.pulse.service.request.Command)
public final AbstractAttribute<Selection> updateSettingsFromCommand(Command command,
org.hibernate.Session session)
updateSettingsFromCommand in class AbstractAttribute<Selection>command - reporting the changes to makesession - to persist the changes
AbstractAttribute.updateSettingsFromCommand(Command,
Session)
public final AbstractAttribute<Selection> getAttributeInstance(java.lang.String n,
boolean s)
SelectionAttribute with the given name.
getAttributeInstance in class AbstractAttribute<Selection>n - the names - flag, indicating whether the attribute will be a system
attribute
SelectionAttributeAbstractAttribute.getAttributeInstance(java.lang.String,
boolean)public org.jdom.Element deserializeToJDOM()
deserializeToJDOM in interface JDOMabledeserializeToJDOM in class AbstractAttribute<Selection>AbstractAttribute.deserializeToJDOM()public final org.jdom.Element deserializeToJDOM(java.util.Map<java.lang.Long,AbstractValue<?>> valueMap)
used during deserialization of a User
deserializeToJDOM in class AbstractAttribute<Selection>valueMap - maps attribute-ids a Users attribute-values
AbstractAttribute.deserializeToJDOM()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||