|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fulmine.AbstractLifeCycle fulmine.model.component.AbstractComponent fulmine.model.field.AbstractField
public abstract class AbstractField
The base-class for all IField
implementations. All implementations
will include a setter and getter for the field's value. A field is added as a
member of an IContainer
.
If a field is set with a different value, the field will raise an event with its container. If the field is set with the same value, no event is raised.
Field implementations are not guaranteed to be thread-safe.
Constructor Summary | |
---|---|
AbstractField(String identity,
IType type,
byte application,
short permission)
Standard constructor. |
Method Summary | |
---|---|
void |
addedToContainer(IContainer container)
Signals the field that it has been added to a container. |
protected void |
doComponentDestroy()
The destroy method that is invoked on a non-cloned version of this. |
boolean |
equals(Object obj)
|
byte |
getApplication()
Get the application code for the field. |
IContainer |
getContainer()
Get the container this field has been added to |
short |
getPermission()
Get the permission code for the field. |
int |
hashCode()
|
protected void |
notifyEvent(IEvent event)
Notify the container with an event |
void |
removedFromContainer(IContainer container)
Signals the field that it has been removed from a container. |
void |
setApplication(byte application)
|
void |
setContainer(IContainer container)
|
void |
setPermission(short permission)
|
boolean |
setValueFromString(String value)
Set the field value from the string. |
String |
toDetailedString()
Provides a formatted string describing this object in detail. |
String |
toIdentityString()
Get a string that provides the identification for this object. |
String |
toString()
|
Methods inherited from class fulmine.model.component.AbstractComponent |
---|
addEvent, addListener, checkClone, clone, createIdentityString, doDestroy, doPostAddListener, doPostRemoveListener, doReadState, doStart, doWriteState, getAddress, getAddressable, getDomain, getDrivingFrame, getEventSourceGroupId, getFrame, getIdentity, getIdentityString, getListeners, getLog, getSource, getTriggerEvent, getType, isClone, readState, removeListener, removeListeners, setDrivingFrame, setFrame, setTriggerEvent, writeState |
Methods inherited from class fulmine.AbstractLifeCycle |
---|
checkActive, destroy, finalize, isActive, start |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface fulmine.model.field.IField |
---|
clone, getValue, getValueAsString |
Methods inherited from interface fulmine.protocol.wire.IWireState |
---|
readState, writeState |
Methods inherited from interface fulmine.event.IEventSource |
---|
addEvent, addListener, getEventSourceGroupId, getListeners, removeListener, removeListeners |
Methods inherited from interface fulmine.ILifeCycle |
---|
isActive, start |
Methods inherited from interface fulmine.IDestroyable |
---|
destroy |
Methods inherited from interface fulmine.IAddressable |
---|
getAddress, getDomain, getIdentity, getType |
Methods inherited from interface fulmine.event.IEvent |
---|
getDrivingFrame, getFrame, getSource, getTriggerEvent, setTriggerEvent |
Methods inherited from interface fulmine.IAddressable |
---|
getAddress, getDomain, getIdentity, getType |
Constructor Detail |
---|
public AbstractField(String identity, IType type, byte application, short permission)
identity
- the identity of the fieldtype
- the type of the fieldapplication
- the application that created the fieldpermission
- the permission assigned for the field by the applicationMethod Detail |
---|
public final IContainer getContainer()
IField
getContainer
in interface IField
IContainer
this belongs topublic byte getApplication()
IField
getApplication
in interface IField
IPermissionProfile
public short getPermission()
IField
getPermission
in interface IField
IPermissionProfile
public final void addedToContainer(IContainer container)
IField
addedToContainer
in interface IField
container
- the container that now has a reference to thispublic final void removedFromContainer(IContainer container)
IField
removedFromContainer
in interface IField
container
- the container that removed a reference to thisprotected void doComponentDestroy()
AbstractComponent
doComponentDestroy
in class AbstractComponent
protected final void notifyEvent(IEvent event)
event
- the event to notify the container withpublic final void setContainer(IContainer container)
public void setApplication(byte application)
public void setPermission(short permission)
public String toIdentityString()
IDescriptor
Object.toString()
method.
toIdentityString
in interface IDescriptor
toIdentityString
in class AbstractComponent
public String toString()
toString
in class AbstractComponent
public String toDetailedString()
IDescriptor
Object.toString()
method.
toDetailedString
in interface IDescriptor
toDetailedString
in class AbstractComponent
public int hashCode()
hashCode
in class AbstractComponent
public boolean equals(Object obj)
equals
in class AbstractComponent
public boolean setValueFromString(String value)
IField
false
or throws a
RuntimeException
.
setValueFromString
in interface IField
value
- the value to set
true
if the value changed, false
if it
did not or there was a problem converting the string to the
field's data format
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |