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

Package com.sas.services.information.metadata

# Class VirtualFolderManager

java.lang.Object
com.sas.services.information.metadata.VirtualFolderManager

@SASScope("ALL") @BinaryCompatibilityOnly public class VirtualFolderManager extends Object
Manages and creates virtual folders within a repository's System folder.

Since:
  9.3

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `containsVirtualFolder(String id)`
  Returns true if a virtual folder exists with the specified id.
  `void`
  `destroy()`
  Destoys this factory instance
  `static String`
  `getDefaultPath(String publicType)`
  Returns the default path location for the virtual folder containing objects of the given type.
  `static String`
  `getDefaultPath(String publicType, OMIRepositoryInterface repos)`
  Returns the default path location for the virtual folder containing objects of the given type.
  `static VirtualFolderManager`
  `getInstance(ServerInterface server)`
  Returns the factory instance for a given server.
  `VirtualFolderInterface`
  `getOwningVirtualFolder(Metadata metadata)`
  Returns the virtual folder containing the object.
  `ServerInterface`
  `getServer()`
  Returns the server instance associated with this factory.
  `List<VirtualFolderInterface>`
  `getSystemVirtualFolders(FolderInterface systemFolder)`
  Gets the list of virtual folders that are directly associated to the System folder.
  `VirtualFolderInterface`
  `getVirtualFolder(String id)`
  Returns an existing virtual folder by its id
  `boolean`
  `hasDuplicateSubfolder(String name, FolderInterface systemFolder)`
  Returns true if the System folder contains a virtual folder with the given name.
  `static boolean`
  `instanceCreated(ServerInterface server)`
  Returns true if a factory instance has already been created for the given server.
  `static boolean`
  `isContainedByVirtualFolder(String publicType)`
  Deprecated.
  use `isContainedByVirtualFolder(String, OMIRepositoryInterface)`
  `static boolean`
  `isContainedByVirtualFolder(String publicType, OMIRepositoryInterface repos)`
  Returns true if objects with the specified public type value are contained within a virtual folder in the given repository.
  `static boolean`
  `isVirtualFolderId(String id)`
  Returns true if the specified object id is an id that corresponds to a virtual folder.
  `static boolean`
  `isVirtualFolderPath(PathUrl url, ServerInterface server)`
  `void`
  `reset()`

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

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

- ## Method Details

  - ### instanceCreated

    public static boolean instanceCreated(ServerInterface server) throws ServiceException, RemoteException
    Returns true if a factory instance has already been created for the given server.
    Parameters:
      `server` - the server instance
    Returns:
      true if the factory has been created, false otherwise
    Throws:
      `ServiceException`
      `RemoteException`

  - ### getInstance

    public static VirtualFolderManager getInstance(ServerInterface server) throws ServiceException, RemoteException
    Returns the factory instance for a given server.
    Parameters:
      `server` - the server instance
    Returns:
      virtual folder manager instance
    Throws:
      `ServiceException`
      `RemoteException`

  - ### isVirtualFolderPath

    public static boolean isVirtualFolderPath(PathUrl url, ServerInterface server) throws ServiceException, RemoteException
    Throws:
      `ServiceException`
      `RemoteException`

  - ### isContainedByVirtualFolder

    public static boolean isContainedByVirtualFolder(String publicType) throws ServiceException, RemoteException
    Deprecated.
    use `isContainedByVirtualFolder(String, OMIRepositoryInterface)`
    Returns true if objects with the specified public type value are contained within a virtual folder.
    Parameters:
      `publicType` - an object's public type value
    Returns:
      true if contained by a virtual folder, false otherwise
    Throws:
      `ServiceException`
      `RemoteException`

  - ### isContainedByVirtualFolder

    public static boolean isContainedByVirtualFolder(String publicType, OMIRepositoryInterface repos) throws ServiceException, RemoteException
    Returns true if objects with the specified public type value are contained within a virtual folder in the given repository. This method should be used when needing to determine if a virtual folder is supported within a custom repository.
    Parameters:
      `publicType` - an object's public type value
      `repos` - repository
    Returns:
      if contained by a virtual folder, false otherwise
    Throws:
      `ServiceException`
      `RemoteException`

  - ### getDefaultPath

    public static String getDefaultPath(String publicType) throws ServiceException, RemoteException
    Returns the default path location for the virtual folder containing objects of the given type. An empty string will be returned if the object is not contained within a virtual folder.
    Parameters:
      `publicType` - an object's public type value
    Returns:
      default path location
    Throws:
      `ServiceException`
      `RemoteException`

  - ### getDefaultPath

    public static String getDefaultPath(String publicType, OMIRepositoryInterface repos) throws ServiceException, RemoteException
    Returns the default path location for the virtual folder containing objects of the given type. An empty string will be returned if the object is not contained within a virtual folder.
    Parameters:
      `publicType` - an object's public type value
      `repos` - repository
    Returns:
      default path location
    Throws:
      `ServiceException`
      `RemoteException`

  - ### isVirtualFolderId

    public static boolean isVirtualFolderId(String id) throws ServiceException, RemoteException
    Returns true if the specified object id is an id that corresponds to a virtual folder.
    Parameters:
      `id` - the object's id
    Returns:
      true if the id corresponds to a virtual folder, false otherwise
    Throws:
      `ServiceException`
      `RemoteException`

  - ### getServer

    public ServerInterface getServer()
    Returns the server instance associated with this factory.
    Returns:
      server instance

  - ### destroy

    public void destroy() throws ServiceException, RemoteException
    Destoys this factory instance
    Throws:
      `ServiceException`
      `RemoteException`

  - ### reset

    public void reset() throws ServiceException, RemoteException
    Throws:
      `ServiceException`
      `RemoteException`

  - ### containsVirtualFolder

    public boolean containsVirtualFolder(String id) throws ServiceException, RemoteException
    Returns true if a virtual folder exists with the specified id.
    Parameters:
      `id` - the folder's id
    Returns:
      true if a virtual exists with the id, false otherwise
    Throws:
      `ServiceException`
      `RemoteException`

  - ### getVirtualFolder

    public VirtualFolderInterface getVirtualFolder(String id) throws ServiceException, RemoteException
    Returns an existing virtual folder by its id
    Parameters:
      `id` - the folder's id
    Returns:
      the virtual folder if it exists with this id, or null otherwise
    Throws:
      `ServiceException`
      `RemoteException`

  - ### getOwningVirtualFolder

    public VirtualFolderInterface getOwningVirtualFolder(Metadata metadata) throws ServiceException, RemoteException
    Returns the virtual folder containing the object. A null value will be returned if the object isn't contained by a virtual folder.
    Parameters:
      `metadata` - the metadata object
    Returns:
      the owning virtual folder
    Throws:
      `ServiceException`
      `RemoteException`

  - ### getSystemVirtualFolders

    public List<VirtualFolderInterface> getSystemVirtualFolders(FolderInterface systemFolder) throws ServiceException, RemoteException
    Gets the list of virtual folders that are directly associated to the System folder.
    Parameters:
      `systemFolder` - the parent System folder
    Returns:
      list of virtual folders
    Throws:
      `ServiceException`
      `RemoteException`

  - ### hasDuplicateSubfolder

    public boolean hasDuplicateSubfolder(String name, FolderInterface systemFolder) throws ServiceException, RemoteException
    Returns true if the System folder contains a virtual folder with the given name.
    Parameters:
      `name` - the folder name
      `systemFolder` - the parent System folder
    Returns:
      true if a duplicate exists
    Throws:
      `ServiceException`
      `RemoteException`