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

Class FolderUtil

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

@SASScope("ALL") @BinaryCompatibilityOnly public class FolderUtil extends Object
  • Constructor Details

    • FolderUtil

      public FolderUtil()
  • Method Details

    • getSharedDataFolder

      public static FolderInterface getSharedDataFolder(MetadataInterface object) throws ServiceException, RemoteException
      Returns the Shared Data folder in the repository for a specified object.
      Parameters:
      object -
      Returns:
      the Shared Data folder
      Throws:
      ServiceException
      RemoteException
    • getSystemFolder

      public static FolderInterface getSystemFolder(MetadataInterface object) throws ServiceException, RemoteException
      Returns the System folder in the repository for a specified object.
      Parameters:
      object -
      Returns:
      the System folder
      Throws:
      ServiceException
      RemoteException
    • makeSharedDataFolder

      public static FolderInterface makeSharedDataFolder(MetadataInterface object) throws ServiceException, RemoteException
      Returns the Shared Data folder in the repository for a specified object. The folder will be created if it does not already exist.
      Parameters:
      object -
      Returns:
      the Shared Data folder
      Throws:
      ServiceException
      RemoteException
    • makeDocumentsFolder

      public static FolderInterface makeDocumentsFolder(MetadataInterface object) throws ServiceException, RemoteException
      Returns the Documents folder in the repository for a specified object. The folder will be created if it does not already exist.
      Parameters:
      object -
      Returns:
      the Documents folder
      Throws:
      ServiceException
      RemoteException
    • makeNotesFolder

      public static FolderInterface makeNotesFolder(MetadataInterface object) throws ServiceException, RemoteException
      Returns the Notes folder in the repository for a specified object. The folder will be created if it does not already exist.
      Parameters:
      object -
      Returns:
      the Notes folder
      Throws:
      ServiceException
      RemoteException
    • makeSystemFolder

      public static FolderInterface makeSystemFolder(MetadataInterface object) throws ServiceException, RemoteException
      Returns the System folder in the repository for a specified object. The folder will be created if it does not already exist.
      Parameters:
      object -
      Returns:
      the System folder
      Throws:
      ServiceException
      RemoteException
    • getTopLevelFolder

      public static FolderInterface getTopLevelFolder(String name, MetadataInterface object) throws ServiceException, RemoteException
      Returns the Shared Data folder in the repository for a specified object.
      Parameters:
      object -
      Returns:
      the Shared Data folder
      Throws:
      ServiceException
      RemoteException
    • makeTopLevelFolder

      public static FolderInterface makeTopLevelFolder(String name, MetadataInterface object, boolean systemFolder) throws ServiceException, RemoteException
      Returns a top level folder of the specified name for a specified object. The specified object determines which repository contains the top level folder. The folder will be created if it does not already exist.
      Parameters:
      name - top level folder name
      object -
      systemFolder - if true a newly created top level folder will be flagged as a system folder
      Returns:
      the top level folder
      Throws:
      ServiceException
      RemoteException
    • makeValidObjectName

      public static String makeValidObjectName(FolderInterface folder, MetadataInterface object) throws ServiceException, RemoteException
      Makes a valid object name for an object given a target folder. The object will be given a new name with a (nnn) suffix if necessary to make the name unique in the folder. The object may already be a member of the folder.
      Parameters:
      folder - - target folder
      object - - object to be named
      Returns:
      unique object name in the target folder
      Throws:
      ServiceException
      RemoteException
    • makeValidObjectName

      public static String makeValidObjectName(FolderInterface folder, MetadataInterface object, MetadataNameConstraint constraint) throws ServiceException, RemoteException
      Makes a valid object name for an object given a target folder. The object will be given a new name with a (nnn) suffix if necessary to make the name unique in the folder. The object may already be a member of the folder.
      Parameters:
      folder - - target folder
      object - - object to be named
      constraint - - additional naming constraint
      Returns:
      unique object name in the target folder
      Throws:
      ServiceException
      RemoteException
    • makeValidFolderName

      public static String makeValidFolderName(FolderInterface folder, MetadataNameConstraint constraint) throws ServiceException, RemoteException
      Makes a valid folder name. The folder object will be given a new name with a (nnn) suffix if necessary to make the name unique.
      Parameters:
      folder - - folder object to be name validated and possibly renamed
      constraint - - additional naming constraint
      Returns:
      unique folder name
      Throws:
      ServiceException
      RemoteException
    • makeValidFolderName

      public static String makeValidFolderName(String folderName, FolderInterface parentFolder, MetadataNameConstraint constraint) throws ServiceException, RemoteException
      Makes a valid folder name. The folder object will be given a new name with a (nnn) suffix if necessary to make the name unique. This method does not require an existing FolderInterface object to be passed in. Instead, this can be used prior to creating the appropriate folder.
      Parameters:
      folderName - the original name of the folder
      parentFolder - the parent folder to belong to
      constraint - additional naming constraint
      Returns:
      unique folder name
      Throws:
      ServiceException
      RemoteException
    • isFolderNameUnique

      public static boolean isFolderNameUnique(FolderInterface parentFolder, String folderName) throws ServiceException, RemoteException
      Validate that the name of the folder is unique within the parent folder.
      Parameters:
      parentFolder - FolderInterface object representing the parent folder.
      folderName - The name of the folder to check as a unique name within the parent folder.
      Returns:
      True if the folder's name is unique ( we only find 1), false otherwise.
      Throws:
      ServiceException - If a repository error occurs.
      RemoteException - In the event of remote object failure. FUTURE: We may want this method in the FolderInterface at some point but too late for that in 9.2
    • isSystemFolder

      public static boolean isSystemFolder(FolderInterface folder) throws ServiceException, RemoteException
      Returns true if the specified folder is the System folder within a repository. Each repository (foundation and custom), can contain only one System folder.
      Parameters:
      folder -
      Returns:
      true if the folder is the System folder
      Throws:
      ServiceException
      RemoteException
    • isDIStudioUngroupedFolder

      public static boolean isDIStudioUngroupedFolder(FolderInterface folder) throws ServiceException, RemoteException
      Returns true if specified folder is the DI Studio Ungrouped folder. False if the folder is in project repository.
      Parameters:
      folder -
      Returns:
      true if specified folder is the DI Studio Ungrouped folder.
      Throws:
      ServiceException
      RemoteException
    • isFolder

      public static boolean isFolder(PublicObjectInterface object) throws ServiceException, RemoteException
      Returns true if the public object is a folder, including whether or not it is a folder subtype. To be a folder, the object's public type value must be equal to "Folder or start with "Folder."
      Parameters:
      object - the public object
      Returns:
      true if a folder, false otherwise
      Throws:
      ServiceException
      RemoteException
    • isFolder

      public static boolean isFolder(String publicType)
      Returns true if the public type is used for a folder, including whether or not it is a folder subtype. To be a folder, the object's public type value must be equal to "Folder or start with "Folder."
      Parameters:
      publicType - the object's public type value
      Returns:
      true if a folder, false otherwise
    • isInProjectRepository

      public static boolean isInProjectRepository(MetadataInterface mi, FolderInterface folder) throws ServiceException, RemoteException
      Is the given object or its folder in a project repository. This is determined from the state and repository type of the object(s) given. If the object is in a OMIRepositoryInterface and the repository type is a project, then we return true.
      Parameters:
      mi -
      Returns:
      true if object(s) in a project repository, false otherwise.
      Throws:
      ServiceException
      RemoteException
    • makeOrphanedCubesFolder

      public static FolderInterface makeOrphanedCubesFolder(MetadataInterface object) throws ServiceException, RemoteException
      Returns the Orphaned Cubes folder in the repository for a specified object. The folder will be created if it does not already exist.
      Parameters:
      object -
      Returns:
      the Orphaned Cubes folder
      Throws:
      ServiceException
      RemoteException
    • makeOrphanedTablesFolder

      public static FolderInterface makeOrphanedTablesFolder(MetadataInterface object) throws ServiceException, RemoteException
      Returns the Orphaned Tables folder in the repository for a specified object. The folder will be created if it does not already exist.
      Parameters:
      object -
      Returns:
      the Orphaned Tables folder
      Throws:
      ServiceException
      RemoteException