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

Package com.sas.services.information.metadata

# Interface DirectoryInterface

All Superinterfaces:
  com.sas.services.information.metadata.DeployedDataPackageInterface, `MetadataInterface`, `PublicObjectInterface`, `Remote`

All Known Subinterfaces:
  `PublishDirectoryInterface`

@SASScope("ALL") @BinaryCompatibilityOnly public interface DirectoryInterface extends DeployedDataPackageInterface
This interface represents a repository neutral accessor class for a Directory object in a metadata repository.

Since:
  1.0

- ## Field Summary

  ### Fields inherited from interface com.sas.services.information.metadata.MetadataInterface

  `METADATA_STATE_DELETED, METADATA_STATE_DESTROYED, METADATA_STATE_NEW, METADATA_STATE_NORMAL, PERMISSION_READMETADATA, PERMISSION_WRITEMETADATA`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addFile(MetadataInterface file)`
  Add a file to this directory.
  `void`
  `addServer(MetadataInterface server)`
  Add a server to the list that has access to this directory.
  `String`
  `getAbsolutePath()`
  Get the full path for this directory.
  `String`
  `getDirectoryRole()`
  Get the DirectoryRole attribute.
  `String`
  `getFilePath()`
  Return the path string for this directory.
  `List`
  `getFiles()`
  Get a list of files in this directory.
  `DirectoryInterface`
  `getParentDirectory()`
  Get the parent DirectoryInterface object for this directory.
  `List`
  `getServers()`
  Get a list of servers that are associated with this directory.
  `List`
  `getSubdirectories()`
  Get the subdirectories for this directory.
  `boolean`
  `isBasePath()`
  Get flag indicating if this Directory is an HTTP server base path
  `boolean`
  `isDavEnabled()`
  Get flag indicating if this Directory is DAV enabled.
  `boolean`
  `isRelative()`
  Return a flag indicating if this Directory object represents a relative path.
  `void`
  `removeFile(MetadataInterface file)`
  Remove a file from this directory.
  `void`
  `removeServer(MetadataInterface server)`
  Remove a server from the list that has access to this Directory.
  `void`
  `setDirectoryRole(String role)`
  Set the DirectoryRole attribute.
  `void`
  `setIsBasePath(boolean value)`
  Set the flag indicating if this Directory is a valid base for an HTTP server.
  `void`
  `setIsDavEnabled(boolean value)`
  Set the flag indicating if this directory is DAV enabled.
  `void`
  `setIsRelative(boolean flag)`
  Set the flag indicating this directory is relative to another directory object.
  `void`
  `setParentDirectory(DirectoryInterface parent)`
  Set the parent directory of this directory.
  `void`
  `setPath(String path)`
  Set the path string for the directory.

  ### Methods inherited from interface com.sas.services.information.metadata.DeployedDataPackageInterface

  `addServer, addUsedByPackage, addUsingPackage, getAliasFor, getTableCollections, getUsedByPackages, getUsingPackages, removeServer, removeUsedByPackage, removeUsingPackage, setAliasFor`

  ### Methods inherited from interface com.sas.services.information.metadata.MetadataInterface

  `add, addAccessControl, addAttribute, addAttributes, addDocument, addExtension, addGroup, addImplementor, addKeyword, addNoteTextStore, addNoteTextStore, addObjectProperty, addObjectProperty, addPermissions, addPrompt, addPropertySet, addRemark, addResponsibleParty, addTransactionListener, addUsedByPrototype, checkin, checkout, commit, copyTo, countAssociatedObjects, delete, deleteAttribute, deleteAttributes, destroy, getAccessControls, getAttribute, getAttributes, getAuthorizationUtil, getCreateDate, getCreatedBy, getDescription, getDocuments, getEntityKey, getEntityURL, getExtensions, getGroups, getGUID, getIdentities, getImplementors, getKeywords, getLockedBy, getModifiedBy, getModifyDate, getNoteTextStore, getNoteTextStores, getNoteTextStoresByRole, getObjectProperties, getParent, getParentPath, getParents, getPath, getPaths, getPermission, getPermissions, getPermissions, getPreviousVersionNames, getPrimaryPropertyGroup, getPrompt, getPrompts, getPropertyBag, getPropertySets, getRemarksList, getReposId, getRepository, getRepositoryEntity, getRepositoryName, getReposKey, getResponsibleParties, getState, getTrackingId, getType, getUsageVersion, getUsedByPrototypes, getUsingPrototype, getVersion, isAuthorized, isCompatible, isDeleted, isDestroyed, isObjectAlive, isReadCompatible, mapNameToFilesystem, mapUrlToFilesystem, moveTo, newServiceObject, refresh, removeAccessControl, removeDocument, removeExtension, removeGroup, removeImplementor, removeKeyword, removeNoteTextStore, removeObjectProperty, removePermissions, removePrompt, removePropertySet, removeResponsibleParty, removeResponsiblePartyByIdentity, removeUsedByPrototype, rollback, setAttribute, setAttributes, setDeleted, setDescription, setDocuments, setExtensions, setGroups, setGUID, setKeywords, setName, setNoteTextStores, setObjectProperties, setPermission, setPrimaryPropertyGroup, setPrompt, setPrompts, setRemarksList, setRepository, setUsingPrototype, startTransaction, toByteArray, transactionEvent, uncheckout, update, updateFromBag, version`

  ### Methods inherited from interface com.sas.services.information.publicobject.PublicObjectInterface

  `addProcessorInterface, getContainer, getIdentifier, getName, getObjectURI, getPathUrl, getProcessorInterface, getTypeDescriptor`

- ## Method Details

  - ### getFilePath

    String getFilePath() throws ServiceException, RemoteException
    Return the path string for this directory.

    Returns:
      The path.
    Throws:
      `ServiceException` - if a repository error occurs
      `RemoteException` - in the event of remote object failure.

  - ### setPath

    void setPath(String path) throws ServiceException, RemoteException
    Set the path string for the directory.

    Parameters:
      `path` - The new path string.
    Throws:
      `ServiceException` - if a repository error occurs.
      `RemoteException` - in the event of remote object failure.

  - ### isRelative

    boolean isRelative() throws ServiceException, RemoteException
    Return a flag indicating if this Directory object represents a relative path.
    Returns:
      True if this directory is relative to another directory object, false otherwise.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### setIsRelative

    void setIsRelative(boolean flag) throws ServiceException, RemoteException
    Set the flag indicating this directory is relative to another directory object.
    Parameters:
      `flag` - True if this directory represents a relative path, false otherwise.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### setParentDirectory

    void setParentDirectory(DirectoryInterface parent) throws ServiceException, RemoteException
    Set the parent directory of this directory. If the parent is non-null, the relative flag is set to true. If the parent is null, the relative flag is set to false.
    Parameters:
      `parent` - The DirectoryInterface object that represents the parent path.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### getParentDirectory

    DirectoryInterface getParentDirectory() throws ServiceException, RemoteException
    Get the parent DirectoryInterface object for this directory.
    Returns:
      The DirectoryInterface object representing the parent path of this directory.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### getSubdirectories

    List getSubdirectories() throws ServiceException, RemoteException
    Get the subdirectories for this directory.
    Returns:
      The List of subdirectories. If there are none, an empty list is returned.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### getFiles

    List getFiles() throws ServiceException, RemoteException
    Get a list of files in this directory. Of course, this is a list of files that appear in the metadata repository, not necessarily what's on the file system.

    Returns:
      A List of MetadataInterface objects representing the files that are in the directory. Some may be Archives, but others may not be.
    Throws:
      `ServiceException` - if a repository error occurs.
      `RemoteException` - in the event of remote object failure.

  - ### addFile

    void addFile(MetadataInterface file) throws ServiceException, RemoteException
    Add a file to this directory.

    Parameters:
      `file` - a new file to add to this directory.
    Throws:
      `ServiceException` - if a repository error occurs.
      `RemoteException` - in the event of remote object failure.

  - ### removeFile

    void removeFile(MetadataInterface file) throws ServiceException, RemoteException
    Remove a file from this directory.

    Parameters:
      `file` - A file to remove.
    Throws:
      `ServiceException` - if a repository error occurs.
      `RemoteException` - in the event of a remote object failure.

  - ### getServers

    List getServers() throws ServiceException, RemoteException
    Get a list of servers that are associated with this directory. Hopefully, this association means that the server are able to access the contents of the directory.

    Specified by:
      `getServers` in interface `DeployedDataPackageInterface`
    Returns:
      A List of Server objects that are defined to have access to the contents of this directory.
    Throws:
      `ServiceException` - if a repository error occurs.
      `RemoteException` - in the event of remote object failure.

  - ### addServer

    void addServer(MetadataInterface server) throws ServiceException, RemoteException
    Add a server to the list that has access to this directory.

    Parameters:
      `server` - A new server to add to the list for this directory.
    Throws:
      `ServiceException` - if a repository error occurs.
      `RemoteException` - in the event of remote object failure.

  - ### removeServer

    void removeServer(MetadataInterface server) throws ServiceException, RemoteException
    Remove a server from the list that has access to this Directory.

    Parameters:
      `server` - A server to remove from the list that can access this directory.
    Throws:
      `ServiceException` - if a repository error occurs.
      `RemoteException` - in the event of remote object failure.

  - ### isBasePath

    boolean isBasePath() throws ServiceException, RemoteException
    Get flag indicating if this Directory is an HTTP server base path
    Returns:
      true if this is a valid base path for an HTTP server.
    Throws:
      `ServiceException` - If a service level error occurs.
      `RemoteException` - in the event of remote object failure.

  - ### setIsBasePath

    void setIsBasePath(boolean value) throws ServiceException, RemoteException
    Set the flag indicating if this Directory is a valid base for an HTTP server.
    Parameters:
      `value` - true if this Directory can be used by an HTTP server as a base.
    Throws:
      `ServiceException` - If a service level error occurs.
      `RemoteException` - in the event of remote object failure.

  - ### isDavEnabled

    boolean isDavEnabled() throws ServiceException, RemoteException
    Get flag indicating if this Directory is DAV enabled.
    Returns:
      true if this Directory supports DAV access.
    Throws:
      `ServiceException` - If a service level error occurs.
      `RemoteException` - in the event of remote object failure.

  - ### setIsDavEnabled

    void setIsDavEnabled(boolean value) throws ServiceException, RemoteException
    Set the flag indicating if this directory is DAV enabled.
    Parameters:
      `value` - true if this directory can be accessed via the DAV protocol.
    Throws:
      `ServiceException` - If a service level error occurs.
      `RemoteException` - in the event of remote object failure.

  - ### getDirectoryRole

    String getDirectoryRole() throws ServiceException, RemoteException
    Get the DirectoryRole attribute.
    Returns:
      The DirectoryRole attribute value.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### setDirectoryRole

    void setDirectoryRole(String role) throws ServiceException, RemoteException
    Set the DirectoryRole attribute.
    Parameters:
      `role` - The new value for the DirectoryRole.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### getAbsolutePath

    String getAbsolutePath() throws ServiceException, RemoteException
    Get the full path for this directory. If this is a relative path, the parent path will be retrieved recursively until the top level path is found, and they will be joined to produce a single absolute path.
    Returns:
      The full path for this directory object. This can be zero length if the path isn't set.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.