### *** This interface provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.information.metadata.dav

# Interface DAVItemInterface

All Superinterfaces:
  `AttributesInterface`, `DAVEntityInterface`

All Known Implementing Classes:
  `DAVApplitem`, `DAVBinarypackage`, `DAVEvent`, `DAVItem`, `DAVPackageevent`, `DAVStoredprocessalert`

@SASScope("ALL") @BinaryCompatibilityOnly public interface DAVItemInterface extends DAVEntityInterface

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `checkin()`
  Check in the item
  `void`
  `checkout()`
  Check out the item
  `int`
  `getContentLength()`
  Get the length of the content
  `InputStream`
  `getContents()`
  Get the contents of the item as an input stream.
  `byte[]`
  `getContentsAsBytes()`
  Get the contents of the item as a byte array
  `int`
  `getContentsStatus()`
  Get the content status field.
  `String`
  `getContentType()`
  Get the content type for the item.
  `boolean`
  `hasContentsUpdates()`
  Does this item have any new content that should be updated/persisted ?
  `void`
  `setContents(byte[] contents)`
  Set the contents of the item using a byte array
  `void`
  `setContents(InputStream contents)`
  Set the contents of the item from an input stream.
  `void`
  `setContentsfromStore(DAVResourceInterface resource)`
  Set the contents of the item from store
  `void`
  `setContentsStatus(int contentsStatus)`
  Set the content status field.
  `void`
  `setContentType(String contentType)`
  Set the content type for the item.
  `void`
  `uncheckout()`
  Uncheckout the item

  ### Methods inherited from interface com.sas.services.information.metadata.dav.AttributesInterface

  `addAttribute, addAttributes, deleteAttribute, deleteAttributes, getAttribute, getAttributes, setAttribute, setAttributes`

  ### Methods inherited from interface com.sas.services.information.metadata.dav.DAVEntityInterface

  `addAccessControlEntry, copy, delete, getAccessControlList, getACL, getCreateDate, getDAVResource, getDescription, getFolder, getGUID, getModifyDate, getName, getProperties, getRemarksKeys, getRemoveUpdates, getReposId, getRepository, getSetUpdates, getType, getUpdateableACL, getUrl, getURL, isCollection, isDeleted, isUpdatePending, move, refresh, refresh, removeAccessControlEntry, setACL, setContentClass, setDeleted, setDescription, setGUID, setName, setRemarksKeys, setReposId, update`

- ## Method Details

  - ### setContentType

    void setContentType(String contentType)
    Set the content type for the item. Needs to be set when the content type is different from what the DAV server will use as default for this type of resource.
    Parameters:
      `contentType` - The contentType of the resource (eg. text/plain, image/gif)

  - ### getContentType

    String getContentType()
    Get the content type for the item.
    Returns:
      The contentType for the resource

  - ### getContents

    InputStream getContents() throws RemoteException
    Get the contents of the item as an input stream.
    Returns:
      The input stream that represents the content of the resource
    Throws:
      `RemoteException` - in the case of network failure

  - ### setContents

    void setContents(byte[] contents)
    Set the contents of the item using a byte array
    Parameters:
      `contents` - The actual contents for the resource as a byte array

  - ### setContents

    void setContents(InputStream contents)
    Set the contents of the item from an input stream. For remote deployment the InputStream should be wrapped in an `InputStreamAdapter`
    Parameters:
      `contents` - The content input stream

  - ### getContentLength

    int getContentLength()
    Get the length of the content
    Returns:
      int contentLength

  - ### getContentsAsBytes

    byte[] getContentsAsBytes()
    Get the contents of the item as a byte array
    Returns:
      A byte array with the contents of the resource

  - ### hasContentsUpdates

    boolean hasContentsUpdates()
    Does this item have any new content that should be updated/persisted ?
    Returns:
      boolean Whether content has changed since the last update

  - ### setContentsfromStore

    void setContentsfromStore(DAVResourceInterface resource)
    Set the contents of the item from store
    Parameters:
      `resource` - A DAV Resource from which the contents of the item will be set

  - ### setContentsStatus

    void setContentsStatus(int contentsStatus)
    Set the content status field.
    Parameters:
      `contentsStatus` - The content status to be set

  - ### getContentsStatus

    int getContentsStatus()
    Get the content status field.
    Returns:
      int The content status

  - ### checkout

    void checkout() throws RemoteException
    Check out the item
    Throws:
      `RemoteException`

  - ### checkin

    void checkin() throws RemoteException
    Check in the item
    Throws:
      `RemoteException`

  - ### uncheckout

    void uncheckout() throws RemoteException
    Uncheckout the item
    Throws:
      `RemoteException`