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

Package com.sas.services.information.metadata

# Interface SASLibraryInterface

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

@SASScope("ALL") @BinaryCompatibilityOnly public interface SASLibraryInterface extends RelationalSchemaInterface

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ENGINE_KEY`
  Key used to obtain the engine name from a library assignment Map created by genAssignLibrefMap
  `static final String`
  `NAME_KEY`
  Key used to obtain the libref name from a library assignment Map created by genAssignLibrefMap
  `static final String`
  `OPTIONS_KEY`
  Key used to obtain the options parameter of a library assignment Map created by genAssignLibrefMap
  `static final String`
  `PATH_KEY`
  Key used to obtain the library path name from a library assignment Map created by genAssignLibrefMap

  ### 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
  `String`
  `generateLibref()`
  Generate a SAS Libref statement for this library.
  `String`
  `generateLibref(String prompt, boolean encodePasswords, boolean genFilenameForXMLLibs, boolean ignorePreassigned)`
  Generate a SAS Libref statement for this library.
  `Map`
  `generateLibrefMap(String prompt, boolean encodePasswords, boolean genFilenameForXMLLibs, boolean ignorePreassigned, String overrideLibname)`
  Generate a library assignment java.util.Map for a SASLibrary stored in metadata.
  `SASLibraryInterface`
  `getDataProviderLibrary()`
  Get the data provider library.
  `String`
  `getEngine()`
  Get the SAS engine name.
  `String`
  `getLibref()`
  Get the SAS libref string.
  `List`
  `getPhysicalTables()`
  Return just the `PhysicalTableInterface` objects that are associated to this library.
  `SASLibraryInterface.PreAssignmentType`
  `getPreAssignmentType()`
  Gets the PreAssignment type of the library
  `List`
  `getWorkspaceServers()`
  Returns a List of Logical workspace servers that can access this SASLibrary.
  `boolean`
  `isDBMSLibname()`
  Does this SASLibrary represent a DBMS libname.
  `boolean`
  `isPreassigned()`
  Is this SASLibrary preassigned.
  `void`
  `setDataProviderLibrary(SASLibraryInterface dataProviderLibrary)`
  Set the data provider library.
  `void`
  `setEngine(String engine)`
  Set the engine string for the SASLibrary.
  `void`
  `setIsDBMSLibname(boolean value)`
  Set the value of the isDMBSLibname attribute.
  `void`
  `setIsPreassigned(boolean flag)`
  Set the flag indicating if the SASLibrary is preassigned or not.
  `void`
  `setLibref(String libref)`
  Set the libref string for the library.
  `void`
  `setPreAssignmentType(SASLibraryInterface.PreAssignmentType type)`
  Sets the PreAssignment type of the Library

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

  `addServer, addUsedByPackage, addUsingPackage, getAliasFor, getServers, 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`

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

  `addTable, getDatabaseCatalog, getTables, removeTable, setDatabaseCatalog`

- ## Field Details

  - ### NAME_KEY

    static final String NAME_KEY
    Key used to obtain the libref name from a library assignment Map created by genAssignLibrefMap
    See Also:
      - Constant Field Values

  - ### ENGINE_KEY

    static final String ENGINE_KEY
    Key used to obtain the engine name from a library assignment Map created by genAssignLibrefMap
    See Also:
      - Constant Field Values

  - ### PATH_KEY

    static final String PATH_KEY
    Key used to obtain the library path name from a library assignment Map created by genAssignLibrefMap
    See Also:
      - Constant Field Values

  - ### OPTIONS_KEY

    static final String OPTIONS_KEY
    Key used to obtain the options parameter of a library assignment Map created by genAssignLibrefMap
    See Also:
      - Constant Field Values

- ## Method Details

  - ### isDBMSLibname

    boolean isDBMSLibname() throws ServiceException, RemoteException
    Does this SASLibrary represent a DBMS libname.
    Returns:
      True if it is a DBMS libname, false otherwise.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### setIsDBMSLibname

    void setIsDBMSLibname(boolean value) throws ServiceException, RemoteException
    Set the value of the isDMBSLibname attribute.
    Parameters:
      `value` - The new value of isDMBSLibname.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### getEngine

    String getEngine() throws ServiceException, RemoteException
    Get the SAS engine name.
    Returns:
      The SAS engine name.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### setEngine

    void setEngine(String engine) throws ServiceException, RemoteException
    Set the engine string for the SASLibrary.
    Parameters:
      `engine` - The String representing the engine.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### getDataProviderLibrary

    SASLibraryInterface getDataProviderLibrary() throws ServiceException, RemoteException
    Get the data provider library.
    Returns:
      The data provider library.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### setDataProviderLibrary

    void setDataProviderLibrary(SASLibraryInterface dataProviderLibrary) throws ServiceException, RemoteException
    Set the data provider library.
    Parameters:
      `dataProviderLibrary` - The data provider library.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### getLibref

    String getLibref() throws ServiceException, RemoteException
    Get the SAS libref string.
    Returns:
      The SAS libref string.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### setLibref

    void setLibref(String libref) throws ServiceException, RemoteException
    Set the libref string for the library.
    Parameters:
      `libref` - The new libref string.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### isPreassigned

    boolean isPreassigned() throws ServiceException, RemoteException
    Is this SASLibrary preassigned.
    Returns:
      True if this is a preassigned library, false otherwise.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### setIsPreassigned

    void setIsPreassigned(boolean flag) throws ServiceException, RemoteException
    Set the flag indicating if the SASLibrary is preassigned or not.
    Parameters:
      `flag` - true if the library should be preassigned. False otherwise.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### generateLibref

    String generateLibref() throws ServiceException, RemoteException
    Generate a SAS Libref statement for this library.
    Returns:
      A String containing a SAS Libref statement.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### generateLibref

    String generateLibref(String prompt, boolean encodePasswords, boolean genFilenameForXMLLibs, boolean ignorePreassigned) throws ServiceException, RemoteException
    Generate a SAS Libref statement for this library. Use the parameters provided to configure the output.
    Parameters:
      `prompt` - A prompt string to use if a challenge callback is set up and credentials are required from the user.
      `encodePasswords` - True to encode any passwords in the libref.
      `genFilenameForXMLLibs` - True to generate file names for XML libraries.
      `ignorePreassigned` - True to ignore preassigned libname information.
    Returns:
      The libref String.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### generateLibrefMap

    Map generateLibrefMap(String prompt, boolean encodePasswords, boolean genFilenameForXMLLibs, boolean ignorePreassigned, String overrideLibname) throws ServiceException, RemoteException
    Generate a library assignment java.util.Map for a SASLibrary stored in metadata. The key-value pairs in the generated Map represent the parameters needed to assign a libref using the com.sas.iom.SAS.IDataService.AssignLibref method
    Parameters:
      `prompt` - A prompt string to use if a challenge callback is set up and credentials are required from the user.
      `encodePasswords` - True to encode any passwords in the libref.
      `genFilenameForXMLLibs` - True to generate file names for XML libraries.
      `ignorePreassigned` - True to ignore preassigned libname information.
      `overrideLibname` - override for the default libref name associated with this library or null
    Returns:
      a Map with the keys defined in this interface
    Throws:
      `ServiceException` - If a service level error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### getPhysicalTables

    List getPhysicalTables() throws ServiceException, RemoteException
    Return just the `PhysicalTableInterface` objects that are associated to this library.
    Returns:
      A List of the PhysicalTable objects in this library.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### getWorkspaceServers

    List getWorkspaceServers() throws ServiceException, RemoteException
    Returns a List of Logical workspace servers that can access this SASLibrary. It traverses the DeployedComponents association, which should find ServerContext objects. It then gets those objects' Logical Servers, and checks for a class id that indentifies them as workspace servers.
    Returns:
      A List of Workspace servers that can access this library.
    Throws:
      `ServiceException` - If a repository error occurs.
      `RemoteException` - In the event of remote object failure.

  - ### setPreAssignmentType

    void setPreAssignmentType(SASLibraryInterface.PreAssignmentType type) throws ServiceException, RemoteException
    Sets the PreAssignment type of the Library
    Parameters:
      `type` -
    Throws:
      `ServiceException` - - If a repository error occurs.
      `RemoteException` - - In the event of remote object failure.

  - ### getPreAssignmentType

    SASLibraryInterface.PreAssignmentType getPreAssignmentType() throws ServiceException, RemoteException
    Gets the PreAssignment type of the library
    Returns:
    Throws:
      `ServiceException` - - If a repository error occurs.
      `RemoteException` - - In the event of remote object failure.