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

Package com.sas.services.publish

# Class DirectoryHierarchy

java.lang.Object
com.sas.services.publish.DirectoryHierarchy

@SASScope("ALL") @BinaryCompatibilityOnly public class DirectoryHierarchy extends Object
The publishing framework directory hierarchy.

- Publishing
  - Channels
  - Subscribers
    - Content Subscribers

For a SAS Metadata Repository the preceding directory hierarchy is parented as shown below:

- SoftwareComponent Name="BIP Service"
  - Tree Name="System"
    - Tree Name="Publishing"

This class only supports an OMIRepository.

Since:
  1.1

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `FOLDER_NAME_CHANNELS`
  The name of the folder serving as the node that parents publishing framework channels.
  `static final String`
  `FOLDER_NAME_EVENTSUBSCRIBERS`
  Deprecated.
  `static final String`
  `FOLDER_NAME_PACKAGESUBSCRIBERS`
  The name of the folder serving as the node that parents package subscribers and groups of package subscribers.
  `static final String`
  `FOLDER_NAME_PUBLISHING`
  The name of the folder serving as the node that parents nodes representing the content subscribers and channels.
  `static final String`
  `FOLDER_NAME_SUBSCRIBERS`
  The name of the folder serving as the subscriber's node.
  `static final String`
  `FOLDER_NAME_SYSTEM`
  The name of the folder for an OMR Tree for System.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DirectoryHierarchy(RepositoryInterface repository, boolean isCreateDirectoriesAsNeeded)`
  Constructs an instance of a publishing framework directory hierarchy for the specified information repository.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final FolderInterface`
  `getFolderChannels()`
  Gets the folder representing the channels folder for the publish/subscribe framework.
  `final FolderInterface`
  `getFolderEventSubscribers()`
  Deprecated.
  `final FolderInterface`
  `getFolderPackageSubscribers()`
  Gets the folder representing the package subscribers folder for the publish-subscribe framework.
  `final FolderInterface`
  `getFolderPublishing()`
  Gets the folder representing the publish-subscribe framework.
  `final FolderInterface`
  `getFolderSubscribers()`
  Gets the folder representing the subscribers folder for the publish/subscribe framework.
  `static final String`
  `getLocalizedFolderName(String folderName)`
  Gets the localized name for the specified folder.
  `static final FolderInterface`
  `getSystemFolder(RepositoryInterface repository)`
  Queries the repository for the folder which is capable of parenting the publishing directory hierarchy.
  `final boolean`
  `isValidDirectoryHierarchy()`
  Verifies that a valid publishing framework directory hieararchy exists within the repository specified at construction time.
  `static final boolean`
  `isValidDirectoryHierarchy(RepositoryInterface repository, boolean isCreateDirectoriesAsNeeded)`
  Verifies that a valid publishing framework directory hieararchy exists within the specified repository, optionally creating one if possible.
  `static final boolean`
  `isValidDirectoryHierarchy(RepositoryInterface repository, boolean isCreateDirectoriesAsNeeded, Map directoryMap)`
  Verifies that a valid publishing framework directory hierarchy exists within the specified repository, optionally creating one if possible.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### FOLDER_NAME_PUBLISHING

    public static final String FOLDER_NAME_PUBLISHING
    The name of the folder serving as the node that parents nodes representing the content subscribers and channels.
    See Also:
      - Constant Field Values

  - ### FOLDER_NAME_CHANNELS

    public static final String FOLDER_NAME_CHANNELS
    The name of the folder serving as the node that parents publishing framework channels.
    See Also:
      - Constant Field Values

  - ### FOLDER_NAME_PACKAGESUBSCRIBERS

    public static final String FOLDER_NAME_PACKAGESUBSCRIBERS
    The name of the folder serving as the node that parents package subscribers and groups of package subscribers.
    See Also:
      - Constant Field Values

  - ### FOLDER_NAME_EVENTSUBSCRIBERS

    public static final String FOLDER_NAME_EVENTSUBSCRIBERS
    Deprecated.
    The name of the folder serving as the node that parents event subscribers and groups of event subscribers.
    See Also:
      - Constant Field Values

  - ### FOLDER_NAME_SUBSCRIBERS

    public static final String FOLDER_NAME_SUBSCRIBERS
    The name of the folder serving as the subscriber's node.
    See Also:
      - Constant Field Values

  - ### FOLDER_NAME_SYSTEM

    public static final String FOLDER_NAME_SYSTEM
    The name of the folder for an OMR Tree for System.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### DirectoryHierarchy

    public DirectoryHierarchy(RepositoryInterface repository, boolean isCreateDirectoriesAsNeeded) throws InitializationException
    Constructs an instance of a publishing framework directory hierarchy for the specified information repository.
    Parameters:
      `repository` - Information repository to be verified
      `isCreateDirectoriesAsNeeded` - `true` will cause any missing directories to be created if possible. `false` will not create any directories or modify the repository in any way.
    Throws:
      `InitializationException` - if an invalid information repository is specified.

- ## Method Details

  - ### isValidDirectoryHierarchy

    public final boolean isValidDirectoryHierarchy()
    Verifies that a valid publishing framework directory hieararchy exists within the repository specified at construction time.

  - ### getLocalizedFolderName

    public static final String getLocalizedFolderName(String folderName)
    Gets the localized name for the specified folder.
    Parameters:
      `folderName` - Name of a structure folder that is to be localized. Must be one of:
      - `FOLDER_NAME_SYSTEM`
      - `FOLDER_NAME_PUBLISHING`
      - `FOLDER_NAME_CHANNELS`
      - `FOLDER_NAME_SUBSCRIBERS`
      - `FOLDER_NAME_PACKAGESUBSCRIBERS`
    Returns:
      Localized folder name or the original folder name if a localized resource is not defined.

  - ### isValidDirectoryHierarchy

    public static final boolean isValidDirectoryHierarchy(RepositoryInterface repository, boolean isCreateDirectoriesAsNeeded)
    Verifies that a valid publishing framework directory hieararchy exists within the specified repository, optionally creating one if possible.
    Parameters:
      `repository` - Information repository to be verified
      `isCreateDirectoriesAsNeeded` - `true` will cause any missing directories to be created if possible. `false` will create any directories or modify the repository in any way.
    Returns:
      `true` if the repository contains a valid publish-subscribe directory hierarchy.

  - ### isValidDirectoryHierarchy

    public static final boolean isValidDirectoryHierarchy(RepositoryInterface repository, boolean isCreateDirectoriesAsNeeded, Map directoryMap)
    Verifies that a valid publishing framework directory hierarchy exists within the specified repository, optionally creating one if possible.
    Parameters:
      `repository` - Information repository to be verified
      `isCreateDirectoriesAsNeeded` - `true` will cause any missing directories to be created if possible. `false` will create any directories or modify the repository in any way.
      `directoryMap` - Map to be populated with FolderInterface objects keyed by folder name.
    Returns:
      `true` if the repository contains a valid publish-subscribe directory hierarchy.

  - ### getSystemFolder

    public static final FolderInterface getSystemFolder(RepositoryInterface repository)
    Queries the repository for the folder which is capable of parenting the publishing directory hierarchy.
    Parameters:
      `repository` - Information repository to be verified
    Returns:
      Folder capable of parenting a the Publishing directory hierarchy or `null` if one could not be found.

  - ### getFolderPublishing

    public final FolderInterface getFolderPublishing()
    Gets the folder representing the publish-subscribe framework.
    Returns:
      Publishing folder or `null` if the folder was not accessible.

  - ### getFolderSubscribers

    public final FolderInterface getFolderSubscribers()
    Gets the folder representing the subscribers folder for the publish/subscribe framework.
    Returns:
      Publish/Subscribe subscribers folder or `null` if the folder was not accessible.

  - ### getFolderPackageSubscribers

    public final FolderInterface getFolderPackageSubscribers()
    Gets the folder representing the package subscribers folder for the publish-subscribe framework.
    Returns:
      Publish-subscribe package subscribers folder or `null` if the folder was not accessible.

  - ### getFolderEventSubscribers

    public final FolderInterface getFolderEventSubscribers()
    Deprecated.
    Gets the folder representing the event subscribers folder for the publish/subscribe framework.
    Returns:
      Publish/Subscribe event subscribers folder or `null` if the folder was not accessible.

  - ### getFolderChannels

    public final FolderInterface getFolderChannels()
    Gets the folder representing the channels folder for the publish/subscribe framework.
    Returns:
      Publish/Subscribe channels folder or `null` if the folder was not accessible.