|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICloneObjectExtension
Clone object extensions can be used by 3rd party modules to contribute their own data to any
ICloneObject
. Once added, such extensions will be persisted and synchronised by CPC automatically.
Any implementation needs to implement ICloneObjectExtensionInterfaces
.
Implementing only ICloneObjectExtension
is not enough!
This interface lists all methods which are available to all CPC plugins and 3rd party contributions.
Additional methods are defined by more specific sub-interfaces which
belong to individual CPC plugins and are to be considered private.
Any CPC plugin other than the one designated in the sub-interface API must not access
such methods.
General Considerations valid for all ICloneObjectExtension
implementations:
ICloneFactoryProvider
's corresponding extension point.ICloneObjectExtension
implementation is only valid for one ICloneObject
type. The type
needs to be specified during registration with the ICloneFactoryProvider
. The same class may not be
registered multiple times.
ICloneObjectExtensionInterfaces
,
ICloneFactoryProvider
,
ICloneObject
,
ICloneDataElement
,
Cloneable
,
Serializable
Method Summary | |
---|---|
java.lang.Object |
clone()
All implementations must be cloneable. |
java.lang.Class<? extends ICloneObjectExtension> |
getExtensionInterfaceClass()
Returns the ICloneObjectExtension sub-interface which this class is implementing. |
boolean |
isPartial()
Checks whether this ICloneObjectExtension object was fully restored from persistent storage. |
void |
setParentUuid(java.lang.String parentUuid)
This method will automatically be called, whenever an ICloneObjectExtension is
added to an ICloneObject via ICloneObject.addExtension(ICloneObjectExtension) . |
java.lang.String |
toString()
All implementations should provide a meaningful toString() method for debugging purposes. |
Methods inherited from interface org.electrocodeogram.cpc.core.api.data.ICloneDataElement |
---|
isSealed, seal |
Method Detail |
---|
java.lang.Class<? extends ICloneObjectExtension> getExtensionInterfaceClass()
ICloneObjectExtension
sub-interface which this class is implementing.
ICloneFactoryProvider
.
I.e. if CloneModificationHistoryExtensionImpl implements ICloneModificationHistoryExtension
,
it would return ICloneModificationHistoryExtension.class here.
This information could be obtained via reflection. However, as the interface class is potentially used
as a Map
key internally, the value needs to match exactly. Using reflection under these conditions
would be error prone.
void setParentUuid(java.lang.String parentUuid)
ICloneObjectExtension
is
added to an ICloneObject
via ICloneObject.addExtension(ICloneObjectExtension)
.
ICloneObjectExtension
may only belong to one ICloneObject
instance at a time and may not
be reused.
IllegalArgumentException
is thrown.
IMPORTANT: this method may only be called by the ICloneObject
implementation.
parentUuid
- the UUID of the parent ICloneObject
of this extension object, never null.
java.lang.IllegalArgumentException
- if a client ties to change the parentUuid of this object.boolean isPartial()
ICloneObjectExtension
object was fully restored from persistent storage.
For all extensions which do not implement ICloneObjectExtensionLazyMultiStatefulObject
this method
always returns false.
A newly created extensions (which are thus not yet persisted) which implement
ICloneObjectExtensionLazyMultiStatefulObject
should return true until
ICloneObjectExtensionLazyMultiStatefulObject.setPartial(boolean)
is used to
set a new value.
ICloneObjectExtensionLazyMultiStatefulObject.setPartial(boolean)
java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |