|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UniqueNameStrategy
A UniqueNameStrategy
encapsulates algorithms for how unique
names on nodes will be set within a controller.
This interface provides some default implementations that can be used. For all other cases an own implementation has to be provided.
A typical own implementation might for example choose to add a prefix or a
suffix to the copied nodes, e. g. when a node with uniquename
foo
is copied the new node should get the unique name
new_foo
. Method getTargetUniqueName(String)
could
then be implemented as follows:
public class MyUniqueNameStrategy implements UniqueNameStrategy { ... private static final String PREFIX = "new_"; ... public String getTargetUniqueName(final String uniquename) { final StringBuilder sb = new StringBuilder(uniquename.length() + 4); sb.append(PREFIX); sb.append(uniquename); return sb.toString(); } ... };
ContentNodeCopyCreationContext
This interface is designed to be implemented by clients. |
Field Summary | |
---|---|
static UniqueNameStrategy |
IDENTITY
Unique name strategy that returns the source node's unique name as the target's node unique node. |
static UniqueNameStrategy |
NULL
Unique name strategy that does not return a target unique name. |
Method Summary | |
---|---|
java.lang.String |
getTargetUniqueName(java.lang.String uniquename)
Retrieve the target unique name depending |
Field Detail |
---|
static final UniqueNameStrategy IDENTITY
static final UniqueNameStrategy NULL
Method Detail |
---|
java.lang.String getTargetUniqueName(java.lang.String uniquename)
uniquename
- the input unique name of the template node which is to
be copied, may be null
in case when the
template node did not have a unique name.
null
if
the new node should not have a unique name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |