|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ashridgetech.jamda.uml.PropertyTransformer
A Transformer
object for transforming Property
objects.
The client subclasses PropertyTransformer
,
and provides a setupProperty()
method that calls the various setXXX
methods
to set the characteristics of the new
Property
. The base class sets the transformed Property
as the base property
, calls setupProperty()
then finally calls PropertyBuilder.getProperty()
to create the new Property
.
The transformer may be reused for multiple transformations, but only one at a time.
Note: this class is not thread-safe.
Constructor Summary | |
protected |
PropertyTransformer()
Construct a PropertyTransformer . |
Method Summary | |
Property |
getBaseProperty()
Get the base Property on which the new one is based. |
void |
setAggregation(StructuredType.Aggregation aggregation)
Set the aggregation level of this property. |
void |
setComment(java.lang.String comment)
Set the Type of this Property |
void |
setMultiple(boolean multiple)
Set whether this Property can have multiple values. |
void |
setName(java.lang.String name)
Set the name of the new Property . |
void |
setOid(boolean oid)
Set whether this property is an object identifier (OID) |
void |
setReadable(boolean readable)
Set whether this Property is readable. |
void |
setReaders(java.util.Set readers)
Set the Actor s who can read this Property |
void |
setType(Type type)
Set the Type of the new Property . |
void |
setUnderlying(Association.End associationEnd)
Set the underlying element of the new property to be an Association.End . |
void |
setUnderlying(Attribute attribute)
Set the underlying element of the new property to be an Attribute . |
void |
setUnderlying(Operation getter,
Operation setter,
Attribute attribute)
Set the underlying element of the new property to be some combination of getter , setter and attribute . |
void |
setUnderlying(Parameter parameter)
Set the underlying element of the new property to be an Parameter . |
abstract void |
setupProperty()
Setup the characteristics of the new Property resulting
from the transformation. |
void |
setWritable(boolean writable)
Set whether this Property is writable. |
void |
setWriters(java.util.Set writers)
Set the Actor s who can write this Property |
java.lang.Object |
transform(java.lang.Object input)
Implements the Transformer interface. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected PropertyTransformer()
PropertyTransformer
.
Method Detail |
public java.lang.Object transform(java.lang.Object input)
Transformer
interface. Calls the subclass's setupProperty()
method.
transform
in interface org.apache.commons.collections.Transformer
input
- - must be a Property
Property
objectpublic abstract void setupProperty()
Property
resulting
from the transformation.
public Property getBaseProperty()
Property
on which the new one is based.
Property
public void setName(java.lang.String name)
Property
.
name
- the new namepublic void setType(Type type)
Type
of the new Property
.
type
- the new Type
public void setComment(java.lang.String comment)
Type
of this Property
public void setMultiple(boolean multiple)
Property
can have multiple values.
multiple
- true if the Property
has multiple valuespublic void setReadable(boolean readable)
Property
is readable.
readable
- true if the Property
is readablepublic void setReaders(java.util.Set readers)
Actor
s who can read this Property
readers
- the set of Actor
s. See Property.getReaders()
for the
values allowed.public void setWritable(boolean writable)
Property
is writable.
writable
- true if the Property
is writablepublic void setWriters(java.util.Set writers)
Actor
s who can write this Property
writers
- the set of Actor
s. See Property.getWriters()
for the
values allowed.public void setAggregation(StructuredType.Aggregation aggregation)
aggregation
- the new Aggregation
instancepublic void setOid(boolean oid)
oid
- true if this Property
is an oidpublic void setUnderlying(Attribute attribute)
Attribute
.
The getter
, setter
and association end
are all set to null.
attribute
- the new underlying element - may not be nullpublic void setUnderlying(Association.End associationEnd)
Association.End
.
The getter
, setter
and attribute
are all set to null.
associationEnd
- the new underlying element - may not be nullpublic void setUnderlying(Operation getter, Operation setter, Attribute attribute)
getter
, setter
and attribute
.
The association end
is set to null.
getter
- the getter Operation
associated with this Property
- may be null if setter
is not nullsetter
- the setter Operation
associated with this Property
- may be null if getter
is not nullpublic void setUnderlying(Parameter parameter)
Parameter
.
The getter
, setter
,
attribute
and association end
are all set to null.
parameter
- the new underlying element - may not be null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |