Class MdFactoryImpl

java.lang.Object
com.sas.metadata.remote.MdFactoryImpl
All Implemented Interfaces:
MdFactory, MetadataObjects, Remote

@SASScope("ALL") public class MdFactoryImpl extends Object implements MdFactory
This creates objects and Object Stores to be used by views of the metadata.
  • Field Details

    • MdFactoryListenerList

      protected EventListenerList MdFactoryListenerList
      This is the list of listeners for events from the Factory itself. This includes objects being created, modified, and deleted.
    • m_connection

      protected MdOMRConnection m_connection
      MdOMRConnection instance
    • m_connectionListener

      protected MdConnectionListener m_connectionListener
    • m_OMIUtil

      protected MdOMIUtil m_OMIUtil
      MdOMIUtil instance
    • m_Util

      protected MdUtil m_Util
      MdUtil instance
    • _reposUtil

      protected MdRepositoryUtil _reposUtil
      MdRepositoryUtil instance
    • _securityUtil

      protected MdSecurityUtil _securityUtil
      MdSecurityUtil instance
    • m_ParsingType

      protected int m_ParsingType
      The type of parsing (DOM or SAX) to use.
    • _removeDependentObjects

      protected boolean _removeDependentObjects
      Boolean value used to determine whether dependent objects should be removed from their object stores when a remove method is called.
    • _formatDates

      protected boolean _formatDates
      Boolean value used to determine whether date attributes returned by the metadata server should be formatted or unformatted.
  • Constructor Details

    • MdFactoryImpl

      public MdFactoryImpl() throws RemoteException, MdException
      Creates a new factory. All objects created by this factory will be remoteable. For running in a "local" envrironment, see MdFactoryImpl(boolean).
      Throws:
      RemoteException
      MdException
    • MdFactoryImpl

      public MdFactoryImpl(boolean remoteEnvironment) throws RemoteException, MdException
      Creates a new factory. By default, all objects created by this factory will be remotable.
      Parameters:
      remoteEnvironment - true if running in a remote environment. The default value is set to true, so in order to run joma in a "local" environment, false must be specified.
      Throws:
      RemoteException
      MdException
  • Method Details

    • isRemoteEnvironment

      public boolean isRemoteEnvironment() throws RemoteException
      Indicates whether or not the client is running in a true remote environment.
      Specified by:
      isRemoteEnvironment in interface MdFactory
      Returns:
      true if in a remote environment, false otherwise
      Throws:
      RemoteException
    • makeConnection

      public void makeConnection(String protocol, String host, String port, String username, String password) throws MdException
      Deprecated.
      This method is no longer supported. Use makeOMRConnection(String, String, String, String) instead.
      This makes a connection to OMR using makeOMRConnection in MdOMRConnection
      Specified by:
      makeConnection in interface MdFactory
      Parameters:
      protocol - IGNORED
      host - Host name to connect to
      port - Port on host to connect to
      username - user's name on host
      password - password for username
      Throws:
      MdException
    • makeConnection2

      public void makeConnection2(String host, String port, String username, String password) throws MdException
      Deprecated.
      This makes a connection to OMR using makeOMRConnection in MdOMRConnection
      Specified by:
      makeConnection2 in interface MdFactory
      Parameters:
      host - Host name to connect to
      port - Port on host to connect to
      username - user's name on host
      password - password for username
      Throws:
      MdException
    • closeConnection

      public void closeConnection() throws RemoteException
      Deprecated.
      this method has been renamed to closeOMRConnection()
      Close connection to OMI
      Specified by:
      closeConnection in interface MdFactory
      Throws:
      RemoteException
      See Also:
    • makeOMRConnection

      public void makeOMRConnection(String host, String port, String username, String password) throws MdException
      This makes a connection to OMR using makeOMRConnection in MdOMRConnection
      Specified by:
      makeOMRConnection in interface MdFactory
      Parameters:
      host - Host name to connect to
      port - Port on host to connect to
      username - user's name on host
      password - password for username
      Throws:
      MdException
    • closeOMRConnection

      public void closeOMRConnection() throws RemoteException
      Close connection to OMR
      Specified by:
      closeOMRConnection in interface MdFactory
      Throws:
      RemoteException
      See Also:
    • getMdFactoryType

      public int getMdFactoryType()
      This can return MDFACTORYTYPE_MDOBJECTFACTORY or MDFACTORYTYPE_MDFACTORYIMPL
      Specified by:
      getMdFactoryType in interface MdFactory
      Returns:
      the type of factory this is.
    • getDebug

      public boolean getDebug() throws RemoteException
      Gets whether debug information is on for this instance of SAS Java Metadata Interface.
      Specified by:
      getDebug in interface MdFactory
      Throws:
      RemoteException
    • setDebug

      public void setDebug(boolean instate) throws RemoteException
      Sets whether debug information is on for this instance of SAS Java Metadata Interface.
      Specified by:
      setDebug in interface MdFactory
      Throws:
      RemoteException
    • getLoggingEnabled

      public boolean getLoggingEnabled() throws RemoteException
      Gets whether XML transaction logging information is on for this instance of SAS Java Metadata Interface.
      Specified by:
      getLoggingEnabled in interface MdFactory
      Throws:
      RemoteException
    • setLoggingEnabled

      public void setLoggingEnabled(boolean instate) throws RemoteException
      Sets whether XML transaction logging information is on for this instance of SAS Java Metadata Interface.
      Specified by:
      setLoggingEnabled in interface MdFactory
      Throws:
      RemoteException
    • getPerf

      public boolean getPerf() throws RemoteException
      Tells whether or not to output performance messages
      Specified by:
      getPerf in interface MdFactory
      Throws:
      RemoteException
    • setPerf

      public void setPerf(boolean instate) throws RemoteException
      Tells whether or not to output performance messages
      Specified by:
      setPerf in interface MdFactory
      Throws:
      RemoteException
    • getUtil

      public MdUtil getUtil()
      Returns the MdUtil class used for output.
      Specified by:
      getUtil in interface MdFactory
      Returns:
      MdUtil class.
    • getRepositoryUtil

      public MdRepositoryUtil getRepositoryUtil() throws RemoteException
      Returns the MdRepositoryUtil interface used for utility methods for metadata repositories.
      Specified by:
      getRepositoryUtil in interface MdFactory
      Returns:
      the MdRepositoryUtil interface
      Throws:
      RemoteException
    • getSecurityUtil

      public MdSecurityUtil getSecurityUtil() throws RemoteException
      Returns the MdSecurityUtil instance used for security related operations.
      Specified by:
      getSecurityUtil in interface MdFactory
      Returns:
      the MdSecurityUtil instance
      Throws:
      RemoteException
    • getInstance

      public MdFactory getInstance()
      Get's the instance of the factory.(this)
      Specified by:
      getInstance in interface MdFactory
      Returns:
      MdObjectFactory this instance.
    • getParsingType

      public int getParsingType() throws RemoteException
      Get the type of parser currently being used, SAX or DOM
      Specified by:
      getParsingType in interface MdFactory
      Returns:
      the parsing type
      Throws:
      RemoteException
    • setParsingType

      public void setParsingType(int parsing) throws RemoteException
      Sets the type of xml parser to use. Valid options are MdFactory.PARSING_TYPE_SAX or MdFactory.PARSING_TYPE_DOM
      Specified by:
      setParsingType in interface MdFactory
      Parameters:
      parsing -
      Throws:
      RemoteException
    • getOMIUtil

      public MdOMIUtil getOMIUtil()
      Get's the OMI Utility class
      Specified by:
      getOMIUtil in interface MdFactory
      Returns:
      MdOMIUtil class
    • getConnection

      public MdOMRConnection getConnection()
      Returns the connection object.
      Specified by:
      getConnection in interface MdFactory
      Returns:
      MdOMRConnection the interface of the connection object
    • getChangeManagementEnabled

      public boolean getChangeManagementEnabled()
      Gets the status of change management enable/disabled.
      Specified by:
      getChangeManagementEnabled in interface MdFactory
    • setChangeManagementEnabled

      public void setChangeManagementEnabled(boolean enabled) throws RemoteException
      Sets the status of change management
      Specified by:
      setChangeManagementEnabled in interface MdFactory
      Throws:
      RemoteException
    • setRemoveDependentObjects

      public void setRemoveDependentObjects(boolean remove) throws RemoteException
      Sets whether or not dependent objects should be removed when an object is removed from its object store.
      Specified by:
      setRemoveDependentObjects in interface MdFactory
      Parameters:
      remove - true if removing dependent objects
      Throws:
      RemoteException
    • getRemoveDependentObjects

      public boolean getRemoveDependentObjects() throws RemoteException
      Returns whether or not dependent objects should be removed when an object is removed from its object store. Default value is false.
      Specified by:
      getRemoveDependentObjects in interface MdFactory
      Returns:
      true if removing dependent objects
      Throws:
      RemoteException
    • setUseServerFormattedDates

      public void setUseServerFormattedDates(boolean format) throws RemoteException
      Sets whether the date attributes (MetadataCreated and MetadataUpdated) on an object should be formatted by the server or not. The default is set to true.
      Specified by:
      setUseServerFormattedDates in interface MdFactory
      Parameters:
      format - true if dates should be formatted
      Throws:
      RemoteException
    • getUseServerFormattedDates

      public boolean getUseServerFormattedDates() throws RemoteException
      Returns whether the date attributes (MetadataCreated and MetadataUpdated) on an object should be formatted by the server or not. The default value is true meaning the server will apply its own formatting to the dates.
      Specified by:
      getUseServerFormattedDates in interface MdFactory
      Returns:
      true if dates are being formatted
      Throws:
      RemoteException
    • getSimpleObjectMap

      public Map<String,CMetadata> getSimpleObjectMap() throws RemoteException
      Returns the Simple Object Map
      Specified by:
      getSimpleObjectMap in interface MdFactory
      Returns:
      The association Map
      Throws:
      RemoteException
    • getDetailObjectMap

      public Map<String,CMetadata> getDetailObjectMap() throws RemoteException
      Deprecated.
      As of 9.2, complex objects should no longer be stored in the ServerStore
      Returns the Detail Object Map
      Specified by:
      getDetailObjectMap in interface MdFactory
      Returns:
      The association Map
      Throws:
      RemoteException
    • getStore

      public MdServerStore getStore()
      Deprecated.
      As of 9.2, the ServerStore should no longer be used. All objects should be created in an ObjectStore instead.
      Returns the Server store this factory uses to create objects
      Specified by:
      getStore in interface MdFactory
      Returns:
      MdServerStore
    • getServerStore

      protected MdServerStore getServerStore()
      Returns the ServerStore used by this factory.
      Returns:
      MdServerStore
    • createObjectStore

      public MdObjectStore createObjectStore() throws RemoteException
      Returns a MdObjectStore for use in storing objects, and creating objects.
      Specified by:
      createObjectStore in interface MdFactory
      Returns:
      a new MdObjectStore object.
      Throws:
      RemoteException
    • createObjectStore

      public MdObjectStore createObjectStore(MdStore parentStore) throws RemoteException
      Returns a MdObjectStore for use in storing objects, and creating objects.
      Specified by:
      createObjectStore in interface MdFactory
      Parameters:
      parentStore - MdStore the store that owns this one, i.e. its parent.
      Returns:
      a new MdObjectStore object,
      Throws:
      RemoteException
    • createObjectStore

      public MdObjectStore createObjectStore(MdStore parentStore, String storeName) throws RemoteException
      Returns a MdObjectStore for use in storing objects, and creating objects.
      Specified by:
      createObjectStore in interface MdFactory
      Parameters:
      parentStore - MdStore the store that owns this one, i.e. its parent.
      storeName - the name of the object store
      Returns:
      a new MdObjectStore object,
      Throws:
      RemoteException
    • createSimpleMetadataObject

      public CMetadata createSimpleMetadataObject(CMetadata inObject) throws RemoteException
      Creates an object to be used as a place holder for a more complex object. These objects usually only have name,type, and ID populated. A simple object does not have any associations.
      Specified by:
      createSimpleMetadataObject in interface MdFactory
      Parameters:
      inObject - CMetadata object
      strName - String
      strType - String
      strFQID - String (NOTE: If the ID is repository only, a new object is created)
      Returns:
      CMetadata object with passed in attributes populated.
      Throws:
      RemoteException
    • createSimpleMetadataObject

      public CMetadata createSimpleMetadataObject(CMetadata inObject, String lockedBy) throws RemoteException
      Creates an object to be used as a place holder for a more complex object. These objects usually only have name,type, and ID populated. A simple object does not have any associations.
      Specified by:
      createSimpleMetadataObject in interface MdFactory
      Parameters:
      inObject - CMetadata Object to get name, type, and ID from.
      lockedBy - String Which object has this one locked.
      Returns:
      CMetadata object with passed in attributes populated.
      Throws:
      RemoteException
    • createSimpleMetadataObject

      public CMetadata createSimpleMetadataObject(String strName, String strType, String strFQID, String lockedBy) throws RemoteException
      Creates an object to be used as a place holder for a more complex object. These objects usually only have name,type, and ID populated. A simple object does not have any associations.
      Specified by:
      createSimpleMetadataObject in interface MdFactory
      Parameters:
      strName - String
      strType - String
      strFQID - String (NOTE: If the ID is repository only, a new object is created)
      lockedBy - String The object that has this one locked in change management.
      Returns:
      CMetadata object with passed in attributes populated.
      Throws:
      RemoteException
    • createSimpleMetadataObject

      public CMetadata createSimpleMetadataObject(String strName, String strType, String strFQID) throws RemoteException
      Creates an object to be used as a place holder for a more complex object. These objects usually only have name,type, and ID populated. A simple object does not have any associations.
      Specified by:
      createSimpleMetadataObject in interface MdFactory
      Parameters:
      strName - String
      strType - String
      strFQID - String (NOTE: If the ID is repository only, a new object is created)
      Returns:
      CMetadata object with passed in attributes populated.
      Throws:
      RemoteException
    • createComplexMetadataObject

      public CMetadata createComplexMetadataObject(MdObjectStore oStore, CMetadata oSimple) throws RemoteException
      Creates a complex/detailed metadata object in a given object store.
      Specified by:
      createComplexMetadataObject in interface MdFactory
      Parameters:
      oStore - MdObjectStore
      oSimple - CMetadata
      Returns:
      the CMetadata object or a null can be returned if the object has an invalid metadata type and couldn't be created
      Throws:
      RemoteException
    • createComplexMetadataObject

      public CMetadata createComplexMetadataObject(MdObjectStore oStore, String strName, String strType, String strFQID) throws RemoteException
      Creates a complex/detailed metadata object in a given object store.
      Specified by:
      createComplexMetadataObject in interface MdFactory
      Parameters:
      oStore - MdObjectStore
      strName - the object name
      strType - the metadata object type
      strFQID - the metadata object id. A new id will be assigned to the object if strFQID passed in is the 8 character repository id (ie. "A57BBBVO").
      Returns:
      the CMetadata object or a null can be returned if the object has an invalid metadata type and couldn't be created
      Throws:
      RemoteException
    • createComplexMetadataObject

      public CMetadata createComplexMetadataObject(MdObjectStore inStore, MdStore parentStore, CMetadata oSimple) throws RemoteException
      Create a complex/detailed metadata object given the name,type, and ID of that object.
      Specified by:
      createComplexMetadataObject in interface MdFactory
      Parameters:
      inStore - MdObjectStore Store to copy object into upon creation.
      parentStore - MdStore Store that owns any newly created store.
      oSimple - CMetadata object to use to create the new object
      Returns:
      the CMetadata object or a null can be returned if the object has an invalid metadata type and couldn't be created
      Throws:
      RemoteException
    • createComplexMetadataObject

      public CMetadata createComplexMetadataObject(MdObjectStore inStore, MdStore parentStore, String strName, String strType, String strFQID) throws RemoteException
      Create a complex/detailed metadata object given the name,type, and ID of that object. Creates the object in inStore and sets the owningstore for the new store if inStore is null and a new store is created for the object.
      Specified by:
      createComplexMetadataObject in interface MdFactory
      Parameters:
      inStore - Store to copy object into upon creation.
      parentStore - Store that owns any newly created store.
      strName - the object name
      strType - the metadata object type
      strFQID - the metadata object id. A new id will be assigned to the object if strFQID passed in is the 8 character repository id (ie. "A57BBBVO").
      Returns:
      the CMetadata object or a null can be returned if the object has an invalid metadata type and couldn't be created
      Throws:
      RemoteException
    • createComplexMetadataObject

      public CMetadata createComplexMetadataObject(MdStore inStore, MdStore parentStore, String strName, String strType, String strFQID, String strNewObjectExternalIdentityRealRepos) throws RemoteException
      Deprecated.
      Objects should only be created in an ObjectStore. Deprecated as of 9.2. Use createComplexMetadataObject(MdObjectStore, MdStore, String, String, String, String) instead.
      Create a complex/detailed metadata object given the name,type, and ID of that object. Creates the object in inStore and sets the owningstore for the new store if inStore is null and a new store is created for the object.
      Specified by:
      createComplexMetadataObject in interface MdFactory
      Parameters:
      inStore - Store to copy object into upon creation.
      parentStore - MdStore Store that owns any newly created store.
      strName - the object name
      strType - the metadata object type
      strFQID - the metadata object id. A new id will be assigned to the object if strFQID passed in is the 8 character repository id (ie. "A57BBBVO").
      strNewObjectExternalIdentityRealRepos - String The Repos the object will reside in if under change management.
      Returns:
      the CMetadata object or a null can be returned if the object has an invalid metadata type and couldn't be created
      Throws:
      RemoteException
    • createComplexMetadataObject

      public CMetadata createComplexMetadataObject(MdObjectStore inStore, MdStore parentStore, String strName, String strType, String strFQID, String strNewObjectExternalIdentityRealRepos) throws RemoteException
      Description copied from interface: MdFactory
      Create a complex/detailed metadata object given the name,type, and ID of that object. Creates the object in inStore and sets the owningstore for the new store if inStore is null and a new store is created for the object.
      Specified by:
      createComplexMetadataObject in interface MdFactory
      Parameters:
      inStore - Store to copy object into upon creation.
      parentStore - Store that owns any newly created store.
      strName - the object name
      strType - the metadata object type
      strFQID - the metadata object id. A new id will be assigned to the object if strFQID passed in is the 8 character repository id (ie. "A57BBBVO").
      strNewObjectExternalIdentityRealRepos - The Repos the object will reside in if under change management.
      Returns:
      the CMetadata object or a null can be returned if the object has an invalid metadata type and couldn't be created
      Throws:
      RemoteException
    • deleteDetailMetadataObject

      public void deleteDetailMetadataObject(String strFQID) throws RemoteException
      Deletes an object from the detail Map and fires the MetadataRemoved event.
      Specified by:
      deleteDetailMetadataObject in interface MdFactory
      Parameters:
      strFQID - String
      Throws:
      RemoteException
    • deleteObjectsFromStores

      public void deleteObjectsFromStores(List<String> objectList) throws RemoteException
      Removes a list of objects from all object stores. This method assumes that these objects have already been removed from th server.
      Specified by:
      deleteObjectsFromStores in interface MdFactory
      Parameters:
      objectList - list of object ids to delete from the client
      Throws:
      RemoteException
    • deleteObjectsFromStores

      public void deleteObjectsFromStores(Map<String,String> objectMap) throws RemoteException
      Removes a list of objects from all object stores. This method assumes that these objects have already been removed from th server.
      Specified by:
      deleteObjectsFromStores in interface MdFactory
      Parameters:
      objectMap - a map of all object ids and types to delete from the client.
      Throws:
      RemoteException
    • deletePublicObject

      public void deletePublicObject(CMetadata publicObject) throws MdException, RemoteException
      Deletes a public object from the server. As long as the object specified has the PublicType attribute populated, the metadata server will handle deleting the entire public object using the template stored in the TypeDictionary.
      Specified by:
      deletePublicObject in interface MdFactory
      Parameters:
      publicObject - the public object to delete
      Throws:
      MdException
      RemoteException
    • deletePublicObject

      public void deletePublicObject(CMetadata publicObject, String template) throws MdException, RemoteException
      Deletes a public object from the server. This method can be used to override any delete template stored in the TypeDictionary.
      Specified by:
      deletePublicObject in interface MdFactory
      Parameters:
      publicObject - the public object to delete
      template - the delete template. The template must be in the following format:
       <Template TemplateName="PUBLIC_TYPE">
          <METADATA_TYPE>
             <!-- additional associations and objects belong here -->
          </METADATA_TYPE>
       </Template>
       
      Where METADATA_TYPE is the metadata type of the publicObject and PUBLIC_TYPE is the type name as defined in the TypeDictionary
      Throws:
      MdException
      RemoteException
    • deleteMetadataObject

      public void deleteMetadataObject(CMetadata delobject) throws MdException, RemoteException
      Removes the object from the client and from the server if the object exists on the server. This should be used to remove an object completely from the server and client.
      Specified by:
      deleteMetadataObject in interface MdFactory
      Parameters:
      delobject - the CMetadata object to delete
      Throws:
      MdException
      RemoteException
    • deleteMetadataObjects

      public void deleteMetadataObjects(List<? extends CMetadata> objectList) throws MdException, RemoteException
      Removes the object from the detail Map and from the server! Remember the delete will fail if the object and its dependent objects are both in this list. For example if a Table and a Column are in this list and the table owns the column then the column should not be in the list, because it will automatically be deleted from the server when the table is deleted, because of its "table" association cardinality 1 to 1.
      Specified by:
      deleteMetadataObjects in interface MdFactory
      Parameters:
      objectList - a list of CMetadata objects to delete from the server.
      Throws:
      MdException
      RemoteException
    • deleteMetadataObjects

      public void deleteMetadataObjects(CMetadata deleteObject, String template) throws MdException, RemoteException
      Removes the object from the detail Map and from the server!
      Specified by:
      deleteMetadataObjects in interface MdFactory
      Parameters:
      deleteObject - CMetadata
      template - String
      delobject - CMetadata
      Throws:
      MdException
      RemoteException
    • deleteMetadataObjects

      public void deleteMetadataObjects(String objectName, String objectType, String objectFQID, String template) throws MdException, RemoteException
      Removes the object from the detail Map and from the server! Using the template provided.
      Specified by:
      deleteMetadataObjects in interface MdFactory
      Parameters:
      objectName - String
      objectType - String
      objectFQID - String
      template - String
      Throws:
      MdException
      RemoteException
    • makeID

      public String makeID(String shortID) throws RemoteException
      Creates an ID for a new or temporary object.
      Specified by:
      makeID in interface MdFactory
      Parameters:
      shortID - String
      Throws:
      RemoteException
    • dumpDetailHashMap

      public void dumpDetailHashMap() throws RemoteException
      Prints out the contents of the Detail object Map.
      Specified by:
      dumpDetailHashMap in interface MdFactory
      Throws:
      RemoteException
    • dispose

      public void dispose() throws RemoteException
      Removes all objects and references so this object can be garbage collected.
      Specified by:
      dispose in interface MdFactory
      Throws:
      RemoteException
    • getBundle

      public MetadataResource getBundle() throws RemoteException
      Return resource bundle used to access localized resources
      Specified by:
      getBundle in interface MdFactory
      Throws:
      RemoteException
    • getObject

      public CMetadata getObject(String strFQID) throws RemoteException
      Deprecated.
      As of 9.2, complex objects are no longer stored in the ServerStore. Objects should be created in an ObjectStore.
      Return object associated with ID
      Specified by:
      getObject in interface MdFactory
      Parameters:
      strFQID -
      Returns:
      CMetadata Object with that id, or null if object not in Detail Map.
      Throws:
      RemoteException
    • changeHashKey

      public void changeHashKey(String strOldId, String strNewId) throws RemoteException
      Change the hash key associated with an object, and notify listeners
      Specified by:
      changeHashKey in interface MdFactory
      Parameters:
      strOldId - String
      strNewId - String
      Throws:
      RemoteException
    • changeImplementationPackage

      public void changeImplementationPackage(String newPackage) throws RemoteException
      This changes the java package implementation files are loaded from.
      Specified by:
      changeImplementationPackage in interface MdFactory
      Parameters:
      newPackage - String The name of the java package to load implementation files from.
      Throws:
      RemoteException
    • changeImplementationExtension

      public void changeImplementationExtension(String newExtension) throws RemoteException
      This sets the extension for files in the implementation.
      Specified by:
      changeImplementationExtension in interface MdFactory
      Parameters:
      newExtension - String The name to append to name of model files.
      newExtenstion - String The name to append to name of model files.
      Throws:
      RemoteException
    • removeStore

      public void removeStore(MdStore childStore) throws RemoteException
      Remove an object store from the factory for use. Also removes any objects that are not being used by any other ObjectStore.
      Specified by:
      removeStore in interface MdFactory
      Parameters:
      childStore - MdStore The store to remove.
      Throws:
      RemoteException
    • addMdObjectListener

      public void addMdObjectListener(MdObjectListener l) throws RemoteException
      Used to add an object to the list of listeners for changes in the Metadata Map
      Specified by:
      addMdObjectListener in interface MdFactory
      Parameters:
      l - MetadataListener
      Throws:
      RemoteException
    • removeMdObjectListener

      public void removeMdObjectListener(MdObjectListener l) throws RemoteException
      Used to remove an object from the list of listeners for changes in the Metadata Map
      Specified by:
      removeMdObjectListener in interface MdFactory
      Parameters:
      l - MetadataListener
      Throws:
      RemoteException
    • addMdObjectFactoryListener

      public void addMdObjectFactoryListener(MdObjectFactoryListener l) throws RemoteException
      Used to add an object to the list of listeners for changes in the Metadata Map
      Specified by:
      addMdObjectFactoryListener in interface MdFactory
      Parameters:
      l - MetadataListener
      Throws:
      RemoteException
    • removeMdObjectFactoryListener

      public void removeMdObjectFactoryListener(MdObjectFactoryListener l) throws RemoteException
      Used to remove an object from the list of listeners for changes in the Metadata Map
      Specified by:
      removeMdObjectFactoryListener in interface MdFactory
      Parameters:
      l - MetadataListener
      Throws:
      RemoteException
    • addMdFactoryListener

      public void addMdFactoryListener(MdFactoryListener l) throws RemoteException
      Registers a factory listener.
      Specified by:
      addMdFactoryListener in interface MdFactory
      Parameters:
      l - MdFactoryListener
      Throws:
      RemoteException
    • addMdFactoryListener

      public void addMdFactoryListener(MdFactoryListener listener, String[] objectTypes) throws RemoteException
      Registers a factory listener. This method allows clients to filter the set events that are fired by the factory. Events will only be fired when the object map, see MdFactoryEvent.getObjectMap(), contains objects of the specified type(s).

      For instance, if a client chooses to only be notified when modifications are made to either PhysicalTables or Libraries, they can specify this via the objectTypes parameter. The following code can be used:

       MdFactory factory;
       MdFactoryListener listener;
       String interestedTypes[] = new String[] {MetadataObjects.PHYSICALTABLE, MetadataObjects.SASLIBRARY};
       factory.addMdFactoryListener(listener, interestedTypes);
       
      Any time a created, deleted, or modified event is fired, the objects contained in the event's map will only be of the specified types. All other types will be filtered out of the map.

      Note: If the event's object map does not contain any tables or libraries, the listener will never be notified.

      Specified by:
      addMdFactoryListener in interface MdFactory
      Parameters:
      listener - the listener to register
      objectTypes - an array of metadata types used to filter when events are fired. Events will only be fired by the factory if the object(s) contained in the event are of the specified type.
      Throws:
      RemoteException
    • removeMdFactoryListener

      public void removeMdFactoryListener(MdFactoryListener l) throws RemoteException
      Removes a listener from the list
      Specified by:
      removeMdFactoryListener in interface MdFactory
      Parameters:
      l - MdFactoryListener
      Throws:
      RemoteException
    • fireMdObjectsCreated

      public void fireMdObjectsCreated(MdEvent e, List<String> id) throws RemoteException
      Used to notify all the Factory listeners of newly created objects.
      Specified by:
      fireMdObjectsCreated in interface MdFactory
      Parameters:
      e - ChangeEvent Created like: new ChangeEvent(Object generator)
      id - FQID of newly created object
      Throws:
      RemoteException
    • fireMdObjectsCreated

      public void fireMdObjectsCreated(MdFactoryEvent e) throws RemoteException
      Used to notify all the Factory listeners of new objects created on the server.
      Specified by:
      fireMdObjectsCreated in interface MdFactory
      Parameters:
      e - MdFactoryEvent
      Throws:
      RemoteException
    • fireMdObjectsModified

      public void fireMdObjectsModified(MdFactoryEvent e) throws RemoteException
      Used to notify all the Factory listeners of objects modified on the server.
      Specified by:
      fireMdObjectsModified in interface MdFactory
      Parameters:
      e - MdFactoryEvent
      Throws:
      RemoteException
    • fireMdObjectsDeleted

      public void fireMdObjectsDeleted(MdFactoryEvent e) throws RemoteException
      Used to notify all the Factory listeners of objects deleted from the server.
      Specified by:
      fireMdObjectsDeleted in interface MdFactory
      Parameters:
      e - MdFactoryEvent
      Throws:
      RemoteException
    • setMdConnectionListener

      public void setMdConnectionListener(MdConnectionListener listener) throws RemoteException
      Description copied from interface: MdFactory
      Registers a connection listener.
      Specified by:
      setMdConnectionListener in interface MdFactory
      Parameters:
      listener -
      Throws:
      RemoteException
    • getMdConnectionListener

      public MdConnectionListener getMdConnectionListener() throws RemoteException
      Description copied from interface: MdFactory
      Returns the registered connection listener, or null if one has not been set.
      Specified by:
      getMdConnectionListener in interface MdFactory
      Returns:
      connection listener
      Throws:
      RemoteException