|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.entityfs.util.EntityCopySpecification
public final class EntityCopySpecification
This class contains settings for a entity copy operation. It is used by the
Entities.copy(org.entityfs.EntityView, org.entityfs.EntityAcceptingEntityView, EntityCopySpecification)
method.
The setter methods of this object returns the object instance, so setter calls can be chained together.
Constructor Summary | |
---|---|
EntityCopySpecification()
|
Method Summary | |
---|---|
String |
getName()
Get the name to give to the entity at the target location. |
OverwriteStrategy |
getOverwriteStrategy()
Get the strategy that is used for deciding whether to overwrite existing entities. |
boolean |
isPreserveAttributes()
If this property is set to true , entity attributes such as the
last modification time is copied to the new entity. |
EntityCopySpecification |
setName(String name)
Set the name to give to the entity at the target location. |
EntityCopySpecification |
setOverwriteStrategy(OverwriteStrategy strat)
Set the strategy to use for deciding whether to overwrite an existing entity. |
EntityCopySpecification |
setPreserveAttributes(boolean preserveAttributes)
If this property is set to true , attributes such as the last
modification time or
NtFileAttributes are copied to the
target entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EntityCopySpecification()
Method Detail |
---|
public String getName()
null
), the source entity's name will be used.
public EntityCopySpecification setName(String name)
null
, the source entity's name will be used.
By default, this is not set.
name
- The name to give to the entity at the target location.public OverwriteStrategy getOverwriteStrategy()
Non-empty directories are never overwritten.
By default, this is set to DontOverwriteAndThrowException
.
public EntityCopySpecification setOverwriteStrategy(OverwriteStrategy strat)
Non-empty directories are never overwritten.
By default, this is set to false
.
strat
- The overwrite strategy.public boolean isPreserveAttributes()
true
, entity attributes such as the
last modification time is copied to the new entity.
By default, this property is set to false
.
true
if attributes should be copied to the target entity.public EntityCopySpecification setPreserveAttributes(boolean preserveAttributes)
true
, attributes such as the last
modification time or
NtFileAttributes
are copied to the
target entity.
By default, this property is set to false
.
preserveAttributes
- Should attributes be copied to the target
entity?
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |