Interface MdObjectStore

All Superinterfaces:
EventListener, MdObjectListener, MdStore, MdStoreListener, MetadataObjects, Remote

@SASScope("ALL") public interface MdObjectStore extends MdStore, MetadataObjects, MdObjectListener, MdStoreListener, Remote
This a store of objects for a view's interaction. This is the views object cache, and allows for the modification of objects without effects on other views. The changes in objects are persisted to the store that owns this one upon a write to the server.
  • Method Details

    • getFactory

      MdFactory getFactory() throws RemoteException
      Returns the factory used to create objects.
      Specified by:
      getFactory in interface MdStore
      Returns:
      MdFactory
      Throws:
      RemoteException
    • getStoreType

      int getStoreType() throws RemoteException
      Gets the type of store this is, either a MdStore.MDSTORETYPE_SERVERSTORE or a MdStore.MDSTORETYPE_OBJECTSTORE
      Specified by:
      getStoreType in interface MdStore
      Returns:
      store type as an int.
      Throws:
      RemoteException
    • getStoreName

      String getStoreName() throws RemoteException
      Returns the name of the object store. A null value is returned if a name wasn't provided.
      Returns:
      store name
      Throws:
      RemoteException
    • getIdentifier

      String getIdentifier() throws RemoteException
      Returns an identifier for this object store. This can be used to uniquely identify a particular object store within its owning factory. The identifier will be of the format "Store_NUM", where "NUM" is an integer.
      Returns:
      identifier
      Throws:
      RemoteException
    • isDeepCopyObjects

      boolean isDeepCopyObjects() throws RemoteException
      If deep copy has been turned on/off. Default value is true.
      Returns:
      whether objects are being deep copied.
      Throws:
      RemoteException
    • setDeepCopyObjects

      void setDeepCopyObjects(boolean copy) throws RemoteException
      Sets if objects should be deep copied into this store. The default value is true.

      If set to false, only objects directly associated to the object being copied will be included. For instance, if an object named "X" is copied, only "X" and its associated objects will be copied. Any object indirectly associated to "X" will not be copied.

      Parameters:
      copy - false if deep copy should be turned off
      Throws:
      RemoteException
    • getIsGoToServerForMetadata

      boolean getIsGoToServerForMetadata() throws RemoteException
      Deprecated.
      isGoToServerForMetadata() should be used instead
      Tells whether or not to go to server for the metadata.
      Specified by:
      getIsGoToServerForMetadata in interface MdStore
      Returns:
      boolean true if allowed to go to the server.
      Throws:
      RemoteException
    • isGoToServerForMetadata

      boolean isGoToServerForMetadata() throws RemoteException
      Tells whether or not to go to server for the metadata.
      Specified by:
      isGoToServerForMetadata in interface MdStore
      Returns:
      boolean true if allowed to go to the server.
      Throws:
      RemoteException
    • setIsGotToServerForMetadata

      void setIsGotToServerForMetadata(boolean goToServer) throws RemoteException
      Deprecated.
      setGoToServerForMetadata(boolean) should be used instead
      Tells whether or not to go to server for the metadata.
      Specified by:
      setIsGotToServerForMetadata in interface MdStore
      Parameters:
      goToServer - go for metadata
      Throws:
      RemoteException
    • setGoToServerForMetadata

      void setGoToServerForMetadata(boolean goToServer) throws RemoteException
      Tells whether or not to go to server for the metadata.
      Specified by:
      setGoToServerForMetadata in interface MdStore
      Parameters:
      goToServer - go for metadata
      Throws:
      RemoteException
    • getIsObjectCopiedFromParentOnCreation

      boolean getIsObjectCopiedFromParentOnCreation() throws RemoteException
      Gets whether new objects in this store are copied fromt their parent on creation if the object exists in their parent store.
      Returns:
      boolean
      Throws:
      RemoteException
    • setIsObjectCopiedFromParentOnCreation

      void setIsObjectCopiedFromParentOnCreation(boolean inValue) throws RemoteException
      Sets whether new objects in this store are copied from thier parent on creation if the object exists in there parent store.
      Parameters:
      inValue -
      Throws:
      RemoteException
    • updatedMetadataAll

      void updatedMetadataAll() throws MdException, RemoteException
      Updates objects in store to Metadata server.
      Specified by:
      updatedMetadataAll in interface MdStore
      Throws:
      MdException - if there is an error in the updateMetadataAll call.
      RemoteException
    • getProjectRepositoryID

      String getProjectRepositoryID() throws RemoteException
      Deprecated.
      As of 9.2 this method is no longer supported
      Returns the project Repository ID used for change management
      Returns:
      String the Repository id
      Throws:
      RemoteException
    • setProjectRepositoryID

      void setProjectRepositoryID(String projReposID) throws RemoteException
      Deprecated.
      As of 9.2 this method is no longer supported
      Sets the project repos id
      Parameters:
      projReposID - String
      Throws:
      RemoteException
    • getNewObjectRepositoryID

      String getNewObjectRepositoryID() throws RemoteException
      Deprecated.
      As of 9.2 this method is no longer supported
      Sets the repos used for new objects created
      Returns:
      String repos id.
      Throws:
      RemoteException
    • setNewObjectRepositoryID

      void setNewObjectRepositoryID(String newObjReposID) throws RemoteException
      Deprecated.
      As of 9.2 this method is no longer supported
      Sets the repos id used for new object.
      Parameters:
      newObjReposID - String
      Throws:
      RemoteException
    • setOwningStore

      void setOwningStore(MdStore parent) throws RemoteException
      Sets the parent store to this one.
      Specified by:
      setOwningStore in interface MdStore
      Parameters:
      parent - MdStore
      Throws:
      RemoteException
    • getOwningStore

      MdStore getOwningStore() throws RemoteException
      Gets the parent store to this one
      Specified by:
      getOwningStore in interface MdStore
      Returns:
      MdStore This store's parent.
      Throws:
      RemoteException
    • getDeletedObjects

      Map<String,CMetadata> getDeletedObjects() throws RemoteException
      Return a Map of the objects being deleted.
      Returns:
      Map objects that are not visible in this store.
      Throws:
      RemoteException
    • isDeletedObject

      boolean isDeletedObject(String id) throws RemoteException
      Returns true if the object is included in the store's deleted objects list
      Parameters:
      id - the object id
      Returns:
      true if being deleted
      Throws:
      RemoteException
    • getSimpleObjectMap

      Map<String,CMetadata> getSimpleObjectMap() throws RemoteException
      Returns the Simple Object Map
      Returns:
      The association Map
      Throws:
      RemoteException
    • getDetailObjectMap

      Map<String,CMetadata> getDetailObjectMap() throws RemoteException
      Returns the Detail Object Map
      Specified by:
      getDetailObjectMap in interface MdStore
      Returns:
      The association Map
      Throws:
      RemoteException
    • createRefreshXMLforStore

      String createRefreshXMLforStore(boolean includeLocallyChangedItems, boolean getFullObjectUpdate) throws RemoteException
      Creates XML for all objects in store.
      Specified by:
      createRefreshXMLforStore in interface MdStore
      Returns:
      XML string for objects in store
      Throws:
      RemoteException
    • createXMLforStore

      String createXMLforStore() throws RemoteException
      Creates XML for all objects in store.
      Returns:
      XML string for objects in store
      Throws:
      RemoteException
    • retrieveFullObject

      CMetadata retrieveFullObject(String objectType, String objectID) throws MdException, RemoteException
      Retrieves all metadata for an existing public object. A public object is defined as an object that has its PublicType attribute set with a matching entry in the type dictionary.

      This method is mainly a convenience method for retrieving the full metadata representation of a public object, without requiring you to know which associations need to be passed in via a template. All information for the public object, including all of its attributes as well as all of its subordinate objects will be retrieved. The method does not require any flags or templates to be passed in as they (MdOMIUtil.OMI_FULL_OBJECT, MdOMIUtil.OMI_ALL_SIMPLE, and MdOMIUtil.OMI_SUCCINCT) are automatically passed to the server for you.

      Note: if the object exists within this store prior to calling this method, all of its attributes and associations will be overwritten.

      Parameters:
      objectType - the metadata type of the object
      objectID - the object id
      Returns:
      the metadata object
      Throws:
      MdException
      RemoteException
    • refreshStoreFromServer

      void refreshStoreFromServer(boolean includeLocallyChangedItems, boolean getFullObjectUpdate) throws MdException, RemoteException
      Refreshes objects in this store from the server
      Parameters:
      includeLocallyChangedItems - Includes the objects that have been changed locally
      getFullObjectUpdate - Get all attributes and associations on all objects.
      Throws:
      MdException - If error going to the server
      RemoteException - if I/O error
    • refreshObjectFromServer

      void refreshObjectFromServer(CMetadata inObject, boolean includeLocallyChangedItems, boolean getFullObjectUpdate) throws MdException, RemoteException
      Refreshes object from the server
      Parameters:
      includeLocallyChangedItems - Includes the objects that have been changed locally
      getFullObjectUpdate - Get all attributes and associations on all objects.
      Throws:
      MdException - If error going to the server
      RemoteException - if I/O error
    • refreshObjectFromServer

      void refreshObjectFromServer(CMetadata inObject, boolean includeLocallyChangedItems, boolean getFullObjectUpdate, boolean refreshAssocsSetByServerOnly) throws MdException, RemoteException
      Refreshes object from the server
      Parameters:
      includeLocallyChangedItems - Includes the objects that have been changed locally
      getFullObjectUpdate - Get all attributes and associations on all objects.
      refreshAssocsSetByServerOnly - If true, refreshes only the associations that have previously been set by the server.
      Throws:
      MdException - If error going to the server
      RemoteException - if I/O error
    • createExternalIdentityObject

      void createExternalIdentityObject(CMetadata owningObject) throws RemoteException
      Deprecated.
      As of 9.2 this method is no longer supported
      This creates an ExternalIdentity object connection to owningObject for change management. This new object contains the real repos id for the new object.
      Specified by:
      createExternalIdentityObject in interface MdStore
      Parameters:
      owningObject - CMetadata Object to which to attach ExternalIdentity.
      Throws:
      RemoteException
    • deleteDetailMetadataObject

      void deleteDetailMetadataObject(String strFQID) throws RemoteException
      Deletes an object from the detail Map and fires the MetadataRemoved event.
      Parameters:
      strFQID - String
      Throws:
      RemoteException
    • makeID

      String makeID(String shortID) throws RemoteException
      Creates a new id for an object.
      Specified by:
      makeID in interface MdStore
      Parameters:
      shortID - String
      Returns:
      String new id
      Throws:
      RemoteException
    • dumpDetailHashMap

      void dumpDetailHashMap() throws RemoteException
      Prints out the contents of this MdObjectStore.
      Specified by:
      dumpDetailHashMap in interface MdStore
      Throws:
      RemoteException
    • dispose

      void dispose() throws RemoteException
      Cleans up this objectStore and it's objects from it's parent.
      Specified by:
      dispose in interface MdStore
      Throws:
      RemoteException
    • flushUpdates

      void flushUpdates(List<CMetadata> updatedItems) throws RemoteException
      Flush updated objects to parent store. This cascades all the way to server store.
      Specified by:
      flushUpdates in interface MdStore
      Parameters:
      updatedItems - List The objects which have been updated to the server.
      Throws:
      RemoteException
    • removeStore

      void removeStore(MdStore childStore) throws RemoteException
      Removes a child store.
      Parameters:
      childStore -
      Throws:
      RemoteException
    • getObject

      CMetadata getObject(String strFQID, boolean hashonly) throws RemoteException
      Return object associated with ID
      Parameters:
      strFQID - String The ID of the object to get from the Map
      hashonly - boolean get the object from this stores hash only.
      Returns:
      CMetadata The object, or null if object not in Map.
      Throws:
      RemoteException
    • getObject

      CMetadata getObject(String strFQID) throws RemoteException
      Return object associated with ID
      Specified by:
      getObject in interface MdStore
      Parameters:
      strFQID - String The ID of the object to get from the Map
      Returns:
      CMetadata The object, or null if object not in Map.
      Throws:
      RemoteException
    • changeHashKey

      void changeHashKey(String strOldId, String strNewId) throws RemoteException
      Change the hash key associated with an object, and send events for the removal of the old object and addition of the new object to Map.
      Specified by:
      changeHashKey in interface MdStore
      Parameters:
      strOldId - String
      strNewId - String
      Throws:
      RemoteException
    • removeElementFromStore

      void removeElementFromStore(CMetadata removeObject) throws RemoteException
      Removes an element from the changelist and removes all of its associations, then removes the object from the store all children stores and parent stores... It should remove this object everywhere except for the ServerStore. This should only be used on newly created objects in this store, to remove them totally from the client.

      By default, all dependent objects of removeObjects (a Column and its Table, for instance), will be removed. If you do not wish to remove these dependent objects, see removeElementFromStore(CMetadata, boolean)

      Parameters:
      removeObject - CMetadata
      Throws:
      RemoteException
    • removeElementFromStore

      void removeElementFromStore(CMetadata removeObject, boolean removeDependents) throws RemoteException
      Removes an element from the changelist and removes all of its associations, then removes the object from the store all children stores and parent stores... It should remove this object everywhere except for the ServerStore. This should only be used on newly created objects in this store, to remove them totally from the client.

      Any dependent objects of removeObject will be removed if removeDependents is set to True.

      Parameters:
      removeObject - CMetadata
      Throws:
      RemoteException
    • updateChangeListObjectIDs

      void updateChangeListObjectIDs(String OldReposID, String NewReposID) throws RemoteException
      Changes a new objects repos id for all the objects in the change list of this object store, to a specified repos id. This should be only the short ID. "AAAAAAAA" to "A5KE2N5K"
      Specified by:
      updateChangeListObjectIDs in interface MdStore
      Parameters:
      OldReposID - String The repos of objects when they were created.
      NewReposID - String The project repos id if under change management, the target if not.
      Throws:
      RemoteException
    • updateChangeListObjectIDs

      void updateChangeListObjectIDs(String OldReposID, String NewReposID, String targetReposID) throws RemoteException
      Changes a new objects repos id for all the objects in the change list of this object store, to a specified repos id. This should be only the short ID. "AAAAAAAA" to "A5KE2N5K"
      Specified by:
      updateChangeListObjectIDs in interface MdStore
      Parameters:
      OldReposID - String The repos of objects when they were created.
      NewReposID - String The project repos id if under change management, the target if not.
      targetReposID - String In change management is the real repos the objects will be checked into
      Throws:
      RemoteException
    • refreshObjects

      void refreshObjects(List<String> items) throws RemoteException
      Refreshes the following items from parent Map and tells children of update, fireMdObjectsModified()
      Parameters:
      items - List
      Throws:
      RemoteException
    • resetStates

      void resetStates(List<CMetadata> items) throws RemoteException
      Resets all the objects in items to to set from server state or unSET.
      Specified by:
      resetStates in interface MdStore
      Parameters:
      items - List (NOTE: CMetadata objects in items)
      Throws:
      RemoteException
    • setObjectsToStale

      void setObjectsToStale() throws RemoteException
      Sets the state of all objects in the store to be "stale". The next time one of these objects is accessed through getObject(), it will be refreshed from the server.
      Throws:
      RemoteException
    • deleteObjectFromStore

      void deleteObjectFromStore(String strFQID) throws RemoteException
      Delete the object from this store and all object stores.
      Parameters:
      strFQID - String object to be deleted from client
      Throws:
      RemoteException
    • MdObjectsModified

      void MdObjectsModified(MdEvent e, List items) throws RemoteException
      We pass this event on to our listener. If they say to refresh then they will tell us to. We us a Vetoable change event to let a visual veto this change if we have any visuals to veto the change.
      Specified by:
      MdObjectsModified in interface MdStoreListener
      Parameters:
      e - MdEvent The metadata event source
      items - List ID's of changed items.
      Throws:
      RemoteException
    • MdObjectsRemoved

      void MdObjectsRemoved(MdEvent e, List ids) throws RemoteException
      NOT IMPLEMENTED
      Specified by:
      MdObjectsRemoved in interface MdStoreListener
      Parameters:
      e - MdEvent
      ids - List
      Throws:
      RemoteException
    • MdObjectsAdded

      void MdObjectsAdded(MdEvent e, List ids) throws RemoteException
      NOT IMPLEMENTED
      Specified by:
      MdObjectsAdded in interface MdStoreListener
      Parameters:
      e - MdEvent
      ids - List
      Throws:
      RemoteException
    • addVetoableChangeListener

      void addVetoableChangeListener(VetoableChangeListener l) throws RemoteException
      Adds a listener to the list
      Specified by:
      addVetoableChangeListener in interface MdStore
      Parameters:
      l - VetoableChangeListener
      Throws:
      RemoteException
    • removeVetoableChangeListener

      void removeVetoableChangeListener(VetoableChangeListener l) throws RemoteException
      Removes a listener from the list of vetoable listners
      Specified by:
      removeVetoableChangeListener in interface MdStore
      Parameters:
      l - VetoableChangeListener
      Throws:
      RemoteException
    • addMdStoreListener

      void addMdStoreListener(MdStoreListener l) throws RemoteException
      Used to add an object to the list of listeners for changes in the Metadata Map
      Specified by:
      addMdStoreListener in interface MdStore
      Parameters:
      l - MetadataListener
      Throws:
      RemoteException
    • removeMdStoreListener

      void removeMdStoreListener(MdStoreListener l) throws RemoteException
      Used to remove an object from the list of listeners for changes in the Metadata Map
      Specified by:
      removeMdStoreListener in interface MdStore
      Parameters:
      l - MetadataListener
      Throws:
      RemoteException
    • addMdObjectListener

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

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

      void addMdStoreIDChangeListener(MdStoreIDChangeListener l) throws RemoteException
      Used to add an object to the list of listeners for changes in the Metadata Map
      Parameters:
      l - MetadataListener
      Throws:
      RemoteException
    • removeMdStoreIDChangeListener

      void removeMdStoreIDChangeListener(MdStoreIDChangeListener l) throws RemoteException
      Used to remove an object from the list of listeners for changes in the Metadata Map
      Parameters:
      l - MetadataListener
      Throws:
      RemoteException
    • deleteObject

      boolean deleteObject(CMetadata inObject) throws RemoteException
      Makes an object unavailable in the object store. Use restore to make the object available after a delete
      Specified by:
      deleteObject in interface MdStore
      Parameters:
      inObject - CMetadata
      Returns:
      boolean if object was put in state deleted
      Throws:
      RemoteException
    • restoreObject

      CMetadata restoreObject(String objectID) throws RemoteException
      Restores an object to the Store so that it is available from the store.
      Specified by:
      restoreObject in interface MdStore
      Parameters:
      objectID - String
      Returns:
      CMetadata the object that was restored
      Throws:
      RemoteException
    • getChangedObjects

      List<CMetadata> getChangedObjects() throws RemoteException
      Gets a List of changed objects.
      Specified by:
      getChangedObjects in interface MdStore
      Returns:
      List , The Item that have changed.
      Throws:
      RemoteException
    • getNewObjects

      List<CMetadata> getNewObjects() throws RemoteException
      Gets a List of changed objects.
      Returns:
      List , The Item that have changed.
      Throws:
      RemoteException
    • addElementToChangeList

      void addElementToChangeList(CMetadata object) throws RemoteException
      Adds the specified metadata object to this object's change list; only adds the object if it is not already in the list
      Parameters:
      object - The metadata object to add to the list
      Throws:
      RemoteException
    • removeElementFromChangeList

      void removeElementFromChangeList(CMetadata object) throws RemoteException
      Remove the specified element from the change list
      Parameters:
      object - Metadata object to remove. If the object does not exist in the list, this method just returns
      Throws:
      RemoteException
    • clearChangeList

      void clearChangeList() throws RemoteException
      Remove all elements from the change list, and set it to empty
      Throws:
      RemoteException
    • getChangeList

      Vector<CMetadata> getChangeList() throws RemoteException
      Return the current change list
      Returns:
      Vector representing the list of elements on this object's change list
      Throws:
      RemoteException
    • getAuthorizationTransContextList

      Vector<CMetadata> getAuthorizationTransContextList() throws RemoteException
      Returns:
      Vector representing the list of elements on this object's Authorization Transaction Context List
      Throws:
      RemoteException
    • addObjToAuthorizationTransContextList

      void addObjToAuthorizationTransContextList(CMetadata obj) throws RemoteException
      Add an object to the Authorization Transaction Context List for this Store
      Throws:
      RemoteException
    • removeObjFromAuthorizationTransContextList

      void removeObjFromAuthorizationTransContextList(CMetadata obj) throws RemoteException
      Remove an object from the Authorization Transaction Context List for this Store
      Throws:
      RemoteException
    • clearAuthorizationTransContextList

      void clearAuthorizationTransContextList() throws RemoteException
      Clear the Authorization Transaction Context List for this Store
      Throws:
      RemoteException
    • removeObjectsFromStore

      void removeObjectsFromStore(List<? extends CMetadata> deletedObjects) throws MdException, RemoteException
      Removes a set of objects from the store, and from server once store is persisted to server.
      Parameters:
      deletedObjects - list of CMetadata objects
      Throws:
      MdException
      RemoteException
    • removeObjectFromStore

      void removeObjectFromStore(CMetadata deleteObject, String deleteTemplate) throws MdException, RemoteException
      Removes an object from the store, marks it to delete, and uses a template to delete associated objects.

      If a template is supplied, then this method will only remove the objects specified in the template. Dependent objects will only be removed if a template is not passed in (if the deleteTemplate is null or empty).

      Parameters:
      deleteObject - the object to delete
      deleteTemplate - the template, null will n
      Throws:
      MdException
      RemoteException
    • clearWriteBuffer

      void clearWriteBuffer() throws RemoteException
      Clear write append buffer out
      Throws:
      RemoteException
    • getWriteBuffer

      String getWriteBuffer() throws RemoteException
      Get the string to be attached to the update write for this store.
      Returns:
      String containing the write XML
      Throws:
      RemoteException
    • appendWriteBuffer

      void appendWriteBuffer(String appendText) throws RemoteException
      Append the text to the write buffer for this store.
      Parameters:
      appendText - the text to append to the write buffer.
      Throws:
      RemoteException
    • getCreatedItemsList

      List<String> getCreatedItemsList() throws RemoteException
      Returns the list of items created in current write.
      Returns:
      List
      Throws:
      RemoteException
    • updateCreatedItemsList

      void updateCreatedItemsList(List<String> items) throws RemoteException
      remove the items that have been updated from the createdItems list.
      Specified by:
      updateCreatedItemsList in interface MdStore
      Parameters:
      items -
      Throws:
      RemoteException
    • clearObjectsFromStore

      void clearObjectsFromStore() throws RemoteException
      Remove all non-deleted objects from the store and usage... **Note: doesn't handle deleted objects.
      Throws:
      RemoteException
    • is_write_lock

      boolean is_write_lock() throws RemoteException
      Returns:
      lock write enabled.
      Throws:
      RemoteException
    • set_write_lock

      void set_write_lock(boolean b) throws RemoteException
      set write lock enabled.
      Parameters:
      b -
      Throws:
      RemoteException