|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.inline.feature.common.AbstractResourceListener | +--com.inline.feature.common.AbstractFeature | +--com.inline.feature.example.JavaFieldFeature
Field Summary | |
static java.lang.String |
ACCESS_TYPE
|
protected JavaMemberAccessType |
accessType
|
protected com.inline.vide.inflect.ClassDescriptor |
classDescriptor
|
protected ResourceAdapter |
classDescriptorAdapter
|
protected boolean |
editable
|
static java.lang.String |
FIELD_NAME
Property names |
static java.lang.String |
FIELD_TYPE
|
protected com.inline.vide.inflect.FieldDescriptor |
fieldDescriptor
|
protected java.lang.String |
fieldName
|
protected java.lang.String |
fieldType
|
protected boolean |
signatureChanged
|
static java.lang.String |
STATIC
|
protected boolean |
staticFlag
|
static java.lang.String |
TYPE
|
Fields inherited from class com.inline.feature.common.AbstractResourceListener |
active,
featureModel,
parent,
resourceAdapters,
resourceSetAdapters,
revalidate |
Constructor Summary | |
JavaFieldFeature(Feature parent,
java.lang.String signature)
|
Method Summary | |
protected void |
applyChanges()
Override to apply changes made to the feature's properties permanent. |
boolean |
canChange(java.lang.String property)
By default this method returns true. |
boolean |
canDelete()
Returns true if the feature can be removed. |
static java.lang.String |
constructSignature(Feature parent,
java.lang.String fieldName)
|
protected void |
delete()
Override to remove feature from persistent resources. |
JavaMemberAccessType |
getAccessType()
|
java.lang.String |
getFieldName()
|
java.lang.String |
getFieldType()
|
java.lang.String |
getType()
Returns the feature type. |
protected void |
insert()
Override to make the feature persistent. |
boolean |
isStatic()
|
void |
parseSignature(java.lang.String signature)
Override this to extract some of the feature properties from the signature. |
protected void |
propertyChanged(java.lang.String property,
java.lang.Object oldValue,
java.lang.Object newValue)
Override this method if you want to be notified when a property of this feature changes (that means actually changes its value). |
protected void |
refreshProperties()
Override to parse resources. |
protected void |
refreshProperty(java.lang.String property)
The overloaded implementation of this method should refresh the value of the specified managed property. |
protected void |
registerDependencies()
Override to register all resource adapters this feature set depends upon. |
void |
setAccessType(JavaMemberAccessType type)
|
protected void |
setEditable(boolean flag)
|
void |
setFieldName(java.lang.String fieldName)
|
void |
setFieldType(java.lang.String type)
|
void |
setStatic(boolean flag)
|
protected boolean |
validateChanges(com.sun.java.util.collections.List list)
Override to produce validations for the feature. |
Methods inherited from class com.inline.feature.common.AbstractFeature |
activate,
addManagedProperty,
addMessages,
addPropertyChangeListener,
commit,
firePropertyChange,
firePropertyChange,
getActions,
getChildren,
getChildSetActions,
getDisplayProperties,
getDisplayType,
getMessages,
getPrimitiveActions,
getSignature,
getURL,
invalidate,
isMarkedForDeletion,
isModified,
isModified,
isNew,
markForDeletion,
refresh,
refresh,
release,
removePropertyChangeListener,
toString,
toStringVerbose,
validateChanges |
Methods inherited from class com.inline.feature.common.AbstractResourceListener |
getFeatureModel,
getParent,
passivate,
propertyChange,
registerResourceAdapter,
registerResourceAdapter,
registerResourceSetAdapter,
registerResourceSetAdapter,
resourceAdded,
resourceChanged,
resourceRemoved,
unregisterResourceAdapter,
unregisterResourceSetAdapter |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String TYPE
public static final java.lang.String FIELD_NAME
public static final java.lang.String FIELD_TYPE
public static final java.lang.String ACCESS_TYPE
public static final java.lang.String STATIC
protected ResourceAdapter classDescriptorAdapter
protected com.inline.vide.inflect.ClassDescriptor classDescriptor
protected com.inline.vide.inflect.FieldDescriptor fieldDescriptor
protected java.lang.String fieldName
protected boolean signatureChanged
protected boolean editable
protected java.lang.String fieldType
protected JavaMemberAccessType accessType
protected boolean staticFlag
Constructor Detail |
public JavaFieldFeature(Feature parent, java.lang.String signature)
Method Detail |
protected void registerDependencies()
public java.lang.String getType()
The recommended type declaration syntax is:
class MyFeature ... { public static final String TYPE = "foo-bar-myfeature"; public String getType() { return TYPE; } ... }
public static java.lang.String constructSignature(Feature parent, java.lang.String fieldName)
public void parseSignature(java.lang.String signature)
public java.lang.String getFieldName()
public void setFieldName(java.lang.String fieldName)
public java.lang.String getFieldType()
public void setFieldType(java.lang.String type)
public JavaMemberAccessType getAccessType()
public void setAccessType(JavaMemberAccessType type)
public boolean isStatic()
public void setStatic(boolean flag)
protected void setEditable(boolean flag)
public boolean canChange(java.lang.String property)
public boolean canDelete()
protected void refreshProperties()
refresh()
.
The registerDependencies
method is called prior to
refreshProperties
, therefore the registered resource adapters and
resource set adapters can be used by this method.
parseSignature()
is also called before refreshProperties
.
The implementation of refreshProperties
should call setBar()
methods to set the feature properties. This way observers of the feature will be informed
whenever conseqent executions of refresh
produce different
property values.
The method should re-acquire resources from resource adapters. Note that
a resource adapter may return a different instance of resource when invoked from
consequent refreshProperties()
calls.
protected void refreshProperty(java.lang.String property)
refreshProperties()
will be called anyway prior to any refreshProperty(property)
calls.protected void insert()
registerDependencies
was called before this method is invoked,
therefore it can use registered resource adapters and resource set adapters.protected void delete()
refresh
from this method if needed. The only assumption
that can be made by this method is that the feature has a signature and
that the feature's properties have not been modified since the last refresh()
(if any).protected void applyChanges()
refresh
.
You can assume that refresh
was in fact called before
applyChanges()
and all cached references to resources are
safe to use.protected void propertyChanged(java.lang.String property, java.lang.Object oldValue, java.lang.Object newValue)
protected boolean validateChanges(com.sun.java.util.collections.List list)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |