|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.at4j.tar.builder.TarEntrySettings
public class TarEntrySettings
This object contains settings for a Tar entry that is to be added to a tar
archive by a TarBuilder
.
The properties and methods of this object works as is described in the
ArchiveEntrySettings
documentation.
In addition to the regular properties of this object, it also has a Map<String, String>
for storing named properties in. Those properties are
currently not used for anything, but they may be used by clients to pass data
to, for instance, custom PaxVariableProvider
implementations. When
this settings object is combined with another settings object, the properties
of this object is copied to the new object, and then the properties of the
other object is copied to the new object. If both this and the other object
contains properties with the same names, the properties of the other object
takes precedence.
Constructor Summary | |
---|---|
TarEntrySettings()
|
Method Summary | |
---|---|
TarEntrySettings |
addProperty(String name,
String value)
Add a custom, named property. |
TarEntrySettings |
clone()
Clone this settings object. |
TarEntrySettings |
combineWith(TarEntrySettings settings)
Create a new settings object that contains this object's settings combined with the settings from the supplied object. |
UnixEntityMode |
getEntityMode()
Get the Unix entity permissions mode. |
Integer |
getOwnerGid()
Get the owner group id. |
String |
getOwnerGroupName()
Get the owner group name. |
Integer |
getOwnerUid()
Get the owner user id. |
String |
getOwnerUserName()
Get the owner user name. |
Map<String,String> |
getProperties()
Get the properties for this settings object. |
String |
removeProperty(String name)
Remove a named property. |
TarEntrySettings |
setEntityMode(UnixEntityMode mode)
Set the entry's Unix entity permission mode. |
TarEntrySettings |
setOwnerGid(Integer gid)
Set the owner group id. |
TarEntrySettings |
setOwnerGroupName(String n)
Set the owner group name. |
TarEntrySettings |
setOwnerUid(Integer uid)
Set the owner user id. |
TarEntrySettings |
setOwnerUserName(String n)
Set the owner user name. |
TarEntrySettings |
setReadOnly()
Set this settings object to be read only to prevent accidental modification. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TarEntrySettings()
Method Detail |
---|
public TarEntrySettings setReadOnly()
ArchiveEntrySettings
After calling this method, a call to any of the object's setter methods
will result in an IllegalStateException
.
This method can safely be called several times.
setReadOnly
in interface ArchiveEntrySettings<TarEntrySettings>
this
.public TarEntrySettings setEntityMode(UnixEntityMode mode) throws IllegalStateException
mode
- The permission mode, or null
if this property should
not be set.
this
IllegalStateException
- If this object has been set read only.public UnixEntityMode getEntityMode()
null
if this
property is not set.setEntityMode(UnixEntityMode)
public TarEntrySettings setOwnerUid(Integer uid) throws IllegalArgumentException, IllegalStateException
uid
- The owner user id. This must be a value between 0
and
2097151
(inclusive), or null
if this property should not
be set.
this
IllegalArgumentException
- If the UID is not in the permitted
range.
IllegalStateException
- If this object has been set read only.public Integer getOwnerUid()
null
if this property is not set.setOwnerUid(Integer)
public TarEntrySettings setOwnerGid(Integer gid) throws IllegalArgumentException, IllegalStateException
gid
- The owner group id. This must be a value between 0
and
2097151
(inclusive), or null
if this property should not
be set.
this
IllegalArgumentException
- If the GID is not in the permitted
range.
IllegalStateException
- If this object has been set read only.public Integer getOwnerGid()
null
if this property is not set.setOwnerGid(Integer)
public TarEntrySettings setOwnerUserName(String n) throws IllegalStateException
n
- The owner user name, or null
if this property should not
be set.
this
IllegalStateException
- If this object has been set read only.public String getOwnerUserName()
null
if this property is not set.setOwnerUserName(String)
public TarEntrySettings setOwnerGroupName(String n) throws IllegalStateException
n
- The owner group name, or null
if this property should
not be set.
this
IllegalStateException
- If this object has been set read only.public String getOwnerGroupName()
null
if this property is not
set.setOwnerGroupName(String)
public TarEntrySettings addProperty(String name, String value) throws IllegalStateException
name
- The name of the property.value
- The property value.
this
IllegalStateException
- If this object has been set read only.public String removeProperty(String name) throws IllegalStateException
name
- The name of the property to remove.
null
if there was no property
with the supplied name (or if it had the value null
).
IllegalStateException
- If this object has been set read only.public Map<String,String> getProperties()
public TarEntrySettings combineWith(TarEntrySettings settings)
ArchiveEntrySettings
The returned object is created by first cloning this object, and then by replacing all the property values for properties that are set in the supplied object with the values from that object. In other words, properties from the supplied object take precedence over properties from this object.
combineWith
in interface ArchiveEntrySettings<TarEntrySettings>
settings
- The other settings object.
public TarEntrySettings clone()
ArchiveEntrySettings
clone
in interface ArchiveEntrySettings<TarEntrySettings>
clone
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |