net.sf.sevenzipjbinding.impl
Class OutItem

java.lang.Object
  extended by net.sf.sevenzipjbinding.impl.OutItem
All Implemented Interfaces:
IOutItem7z, IOutItemAllFormats, IOutItemBase, IOutItemBZip2, IOutItemGZip, IOutItemTar, IOutItemZip

public final class OutItem
extends java.lang.Object
implements IOutItemAllFormats

Implementation of the all IOutItemXxx interfaces. Contains information about a single archive item required for a create or update operation. Instances should be created by OutItemFactory. See IOutCreateCallback.getItemInformation(int, OutItemFactory) for details.

The purpose of the archive format specific interfaces IOutItemXxx is to hide methods unrelated to the corresponding archive format. For example, GZip format doesn't support the attributes property and so the IOutItemGZip interface doesn't contain corresponding getters and setter. The Zip archive format on the other hand does support the attributes property defining the methods:

Since:
9.20-2.00
Author:
Boris Brodski
See Also:
IOutCreateCallback.getItemInformation(int, OutItemFactory), OutItemFactory, IOutItemBase

Method Summary
 ArchiveFormat getArchiveFormat()
          Return current archive format
 java.lang.Long getDataSize()
          Get property PropID.SIZE.
 int getIndex()
          Return the index of the item being described in the new archive.
 IOutArchive<?> getOutArchive()
          Return corresponding IOutArchive object.
 java.lang.Integer getPropertyAttributes()
          Get property PropID.ATTRIBUTES.
 java.util.Date getPropertyCreationTime()
          Get property PropID.CREATION_TIME.
 java.lang.String getPropertyGroup()
          Get property PropID.GROUP.
 java.lang.Boolean getPropertyIsAnti()
          Get property PropID.IS_ANTI.
 java.lang.Boolean getPropertyIsDir()
          Get property PropID.IS_FOLDER.
 java.util.Date getPropertyLastAccessTime()
          Get property PropID.LAST_ACCESS_TIME.
 java.util.Date getPropertyLastModificationTime()
          Get property PropID.LAST_MODIFICATION_TIME.
 java.lang.String getPropertyPath()
          Get property PropID.PATH.
 java.lang.Integer getPropertyPosixAttributes()
          Get property PropID.POSIX_ATTRIB.
 java.lang.String getPropertyUser()
          Get property PropID.USER.
 java.lang.Boolean getUpdateIsNewData()
          Get whether the archive item data (content) has changed.
 java.lang.Boolean getUpdateIsNewProperties()
          Get whether the archive item properties have changed.
 java.lang.Integer getUpdateOldArchiveItemIndex()
          Get the index of the archive item in the archive being updated (old archive).
 void setDataSize(java.lang.Long size)
          Set property PropID.SIZE.
 void setPropertyAttributes(java.lang.Integer attributes)
          Set property PropID.ATTRIBUTES.
 void setPropertyCreationTime(java.util.Date creationTime)
          Set property PropID.CREATION_TIME.
 void setPropertyGroup(java.lang.String group)
          Set property PropID.GROUP.
 void setPropertyIsAnti(java.lang.Boolean isAnti)
          Set property PropID.IS_ANTI.
 void setPropertyIsDir(java.lang.Boolean dir)
          Set property PropID.IS_FOLDER.
 void setPropertyLastAccessTime(java.util.Date lastAccessTime)
          Set property PropID.LAST_ACCESS_TIME.
 void setPropertyLastModificationTime(java.util.Date modificationTime)
          Set property PropID.LAST_MODIFICATION_TIME.
 void setPropertyPath(java.lang.String path)
          Set property PropID.PATH.
 void setPropertyPosixAttributes(java.lang.Integer posixAttributes)
          Set property PropID.POSIX_ATTRIB.
 void setPropertyUser(java.lang.String user)
          Set property PropID.USER.
 void setUpdateIsNewData(java.lang.Boolean updateIsNewData)
          Set whether the archive item data (content) has changed.
 void setUpdateIsNewProperties(java.lang.Boolean updateIsNewProperties)
          Set whether the archive item properties have changed.
 void setUpdateOldArchiveItemIndex(java.lang.Integer updateOldArchiveItemIndex)
          Set the index of the archive item in the archive being updated (old archive).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getIndex

public int getIndex()
Return the index of the item being described in the new archive.

Specified by:
getIndex in interface IOutItemBase
Returns:
the index of the item in the archive (0-based)

getOutArchive

public IOutArchive<?> getOutArchive()
Description copied from interface: IOutItemBase
Return corresponding IOutArchive object.

Specified by:
getOutArchive in interface IOutItemBase
Returns:
IOutArchive

getArchiveFormat

public ArchiveFormat getArchiveFormat()
Return current archive format

Specified by:
getArchiveFormat in interface IOutItemBase
Returns:
archive format

getDataSize

public java.lang.Long getDataSize()
Get property PropID.SIZE.

Specified by:
getDataSize in interface IOutItemBase
Returns:
size.
See Also:
PropID.SIZE

setDataSize

public void setDataSize(java.lang.Long size)
Set property PropID.SIZE.

Specified by:
setDataSize in interface IOutItemBase
Parameters:
size - see PropID.SIZE
See Also:
PropID.SIZE

getPropertyAttributes

public java.lang.Integer getPropertyAttributes()
Get property PropID.ATTRIBUTES.

Specified by:
getPropertyAttributes in interface IOutItem7z
Specified by:
getPropertyAttributes in interface IOutItemZip
Returns:
attributes
See Also:
PropID.ATTRIBUTES

setPropertyAttributes

public void setPropertyAttributes(java.lang.Integer attributes)
Set property PropID.ATTRIBUTES.

Specified by:
setPropertyAttributes in interface IOutItem7z
Specified by:
setPropertyAttributes in interface IOutItemZip
Parameters:
attributes - see PropID.ATTRIBUTES
See Also:
PropID.ATTRIBUTES

getPropertyPosixAttributes

public java.lang.Integer getPropertyPosixAttributes()
Get property PropID.POSIX_ATTRIB.

Specified by:
getPropertyPosixAttributes in interface IOutItemTar
Returns:
posix attributes
See Also:
PropID.POSIX_ATTRIB

setPropertyPosixAttributes

public void setPropertyPosixAttributes(java.lang.Integer posixAttributes)
Set property PropID.POSIX_ATTRIB.

Specified by:
setPropertyPosixAttributes in interface IOutItemTar
Parameters:
posixAttributes - see PropID.POSIX_ATTRIB
See Also:
PropID.POSIX_ATTRIB

getPropertyPath

public java.lang.String getPropertyPath()
Get property PropID.PATH.

Specified by:
getPropertyPath in interface IOutItem7z
Specified by:
getPropertyPath in interface IOutItemGZip
Specified by:
getPropertyPath in interface IOutItemTar
Specified by:
getPropertyPath in interface IOutItemZip
Returns:
path
See Also:
PropID.PATH

setPropertyPath

public void setPropertyPath(java.lang.String path)
Set property PropID.PATH.

Specified by:
setPropertyPath in interface IOutItem7z
Specified by:
setPropertyPath in interface IOutItemGZip
Specified by:
setPropertyPath in interface IOutItemTar
Specified by:
setPropertyPath in interface IOutItemZip
Parameters:
path - see PropID.PATH
See Also:
PropID.PATH

getPropertyIsDir

public java.lang.Boolean getPropertyIsDir()
Get property PropID.IS_FOLDER.

Specified by:
getPropertyIsDir in interface IOutItem7z
Specified by:
getPropertyIsDir in interface IOutItemTar
Specified by:
getPropertyIsDir in interface IOutItemZip
Returns:
dir
See Also:
PropID.IS_FOLDER

setPropertyIsDir

public void setPropertyIsDir(java.lang.Boolean dir)
Set property PropID.IS_FOLDER.

Specified by:
setPropertyIsDir in interface IOutItem7z
Specified by:
setPropertyIsDir in interface IOutItemTar
Specified by:
setPropertyIsDir in interface IOutItemZip
Parameters:
dir - see PropID.IS_FOLDER
See Also:
PropID.IS_FOLDER

getPropertyLastModificationTime

public java.util.Date getPropertyLastModificationTime()
Get property PropID.LAST_MODIFICATION_TIME.

Specified by:
getPropertyLastModificationTime in interface IOutItem7z
Specified by:
getPropertyLastModificationTime in interface IOutItemGZip
Specified by:
getPropertyLastModificationTime in interface IOutItemTar
Specified by:
getPropertyLastModificationTime in interface IOutItemZip
Returns:
last modification time
See Also:
PropID.LAST_MODIFICATION_TIME

setPropertyLastModificationTime

public void setPropertyLastModificationTime(java.util.Date modificationTime)
Set property PropID.LAST_MODIFICATION_TIME.

Specified by:
setPropertyLastModificationTime in interface IOutItem7z
Specified by:
setPropertyLastModificationTime in interface IOutItemGZip
Specified by:
setPropertyLastModificationTime in interface IOutItemTar
Specified by:
setPropertyLastModificationTime in interface IOutItemZip
Parameters:
modificationTime - see PropID.LAST_MODIFICATION_TIME
See Also:
PropID.LAST_MODIFICATION_TIME

getPropertyLastAccessTime

public java.util.Date getPropertyLastAccessTime()
Get property PropID.LAST_ACCESS_TIME.

Specified by:
getPropertyLastAccessTime in interface IOutItemZip
Returns:
last access time
See Also:
PropID.LAST_ACCESS_TIME

setPropertyLastAccessTime

public void setPropertyLastAccessTime(java.util.Date lastAccessTime)
Set property PropID.LAST_ACCESS_TIME.

Specified by:
setPropertyLastAccessTime in interface IOutItemZip
Parameters:
lastAccessTime - see PropID.LAST_ACCESS_TIME
See Also:
PropID.LAST_ACCESS_TIME

getPropertyCreationTime

public java.util.Date getPropertyCreationTime()
Get property PropID.CREATION_TIME.

Specified by:
getPropertyCreationTime in interface IOutItemZip
Returns:
creation time
See Also:
PropID.CREATION_TIME

setPropertyCreationTime

public void setPropertyCreationTime(java.util.Date creationTime)
Set property PropID.CREATION_TIME.

Specified by:
setPropertyCreationTime in interface IOutItemZip
Parameters:
creationTime - see PropID.CREATION_TIME
See Also:
PropID.CREATION_TIME

getPropertyUser

public java.lang.String getPropertyUser()
Get property PropID.USER.

Specified by:
getPropertyUser in interface IOutItemTar
Returns:
user
See Also:
PropID.USER

setPropertyUser

public void setPropertyUser(java.lang.String user)
Set property PropID.USER.

Specified by:
setPropertyUser in interface IOutItemTar
Parameters:
user - see PropID.USER
See Also:
PropID.USER

getPropertyGroup

public java.lang.String getPropertyGroup()
Get property PropID.GROUP.

Specified by:
getPropertyGroup in interface IOutItemTar
Returns:
group
See Also:
PropID.GROUP

setPropertyGroup

public void setPropertyGroup(java.lang.String group)
Set property PropID.GROUP.

Specified by:
setPropertyGroup in interface IOutItemTar
Parameters:
group - see PropID.GROUP
See Also:
PropID.GROUP

getPropertyIsAnti

public java.lang.Boolean getPropertyIsAnti()
Get property PropID.IS_ANTI.

Specified by:
getPropertyIsAnti in interface IOutItem7z
Returns:
isAnti flag
See Also:
PropID.IS_ANTI

setPropertyIsAnti

public void setPropertyIsAnti(java.lang.Boolean isAnti)
Set property PropID.IS_ANTI.

Specified by:
setPropertyIsAnti in interface IOutItem7z
Parameters:
isAnti - see PropID.IS_ANTI.
See Also:
PropID.IS_ANTI

getUpdateIsNewData

public java.lang.Boolean getUpdateIsNewData()
Get whether the archive item data (content) has changed. If isNewData is true, isNewProperties must also be true

Note: only relevant for archive update operations!

Specified by:
getUpdateIsNewData in interface IOutItemBase
Returns:
true - the archive item has new data (always true for new archives),
false - the archive item data from the old archive can be reused.

setUpdateIsNewData

public void setUpdateIsNewData(java.lang.Boolean updateIsNewData)
Set whether the archive item data (content) has changed. If isNewData is true, isNewProperties must also be true.

Note: only relevant for archive update operations!

Specified by:
setUpdateIsNewData in interface IOutItemBase
Parameters:
updateIsNewData - true - the archive item has new data (always true for new archives),
false - the archive item data from the old archive can be reused.

getUpdateIsNewProperties

public java.lang.Boolean getUpdateIsNewProperties()
Get whether the archive item properties have changed. If isNewData is true, isNewProperties must also be true

Note: only relevant for archive update operations!

Specified by:
getUpdateIsNewProperties in interface IOutItemBase
Returns:
true - the archive item has new properties (always true for new archives).
false - the archive item properties from the old archive should be reused.

setUpdateIsNewProperties

public void setUpdateIsNewProperties(java.lang.Boolean updateIsNewProperties)
Set whether the archive item properties have changed. If isNewData is true, isNewProperties must also be true

Note: only relevant for archive update operations!

Specified by:
setUpdateIsNewProperties in interface IOutItemBase
Parameters:
updateIsNewProperties - true - the archive item has new properties (always true for new archives).
false - the archive item properties from the old archive should be reused.

getUpdateOldArchiveItemIndex

public java.lang.Integer getUpdateOldArchiveItemIndex()
Get the index of the archive item in the archive being updated (old archive). Mandatory, if isNewData or isNewProperties set.

Note: only relevant for archive update operations!

Specified by:
getUpdateOldArchiveItemIndex in interface IOutItemBase
Returns:
corresponding index of the archive item in alsothe old archive (starting from 0).
-1 if both isNewData and isNewProperties are true.

setUpdateOldArchiveItemIndex

public void setUpdateOldArchiveItemIndex(java.lang.Integer updateOldArchiveItemIndex)
Set the index of the archive item in the archive being updated (old archive).

Note: only relevant for archive update operations!

Specified by:
setUpdateOldArchiveItemIndex in interface IOutItemBase
Parameters:
updateOldArchiveItemIndex - corresponding index of the archive item in the old archive (starting from 0).
-1 if there is no corresponding archive item in the old archive or if doesn't matter (for new archives).