com.sas.metadata.remote
Class MdFactoryImpl

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

public class MdFactoryImpl
implements MdFactory

This creates objects and Object Stores to be used by views of the metadata.


Field Summary
protected  boolean _formatDates
          Boolean value used to determine whether date attributes returned by the metadata server should be formatted or unformatted.
protected  boolean _removeDependentObjects
          Boolean value used to determine whether dependent objects should be removed from their object stores when a remove method is called.
protected  MdRepositoryUtil _reposUtil
          MdRepositoryUtil instance
protected  MdSecurityUtil _securityUtil
          MdSecurityUtil instance
protected  MdOMRConnection m_connection
          MdOMRConnection instance
protected  MdOMIUtil m_OMIUtil
          MdOMIUtil instance
protected  int m_ParsingType
          The type of parsing (DOM or SAX) to use.
protected  com.sas.metadata.remote.MdUtil m_Util
          MdUtil instance
protected  javax.swing.event.EventListenerList MdFactoryListenerList
          This is the list of listeners for events from the Factory itself.
 
Fields inherited from interface com.sas.metadata.remote.MdFactory
CMETADATA, DEFAULT_GET_STRING_VALUE, DEFAULT_SET_STRING_VALUE, DEFAULT_STATE_STRING_VALUE, DEFAULT_STRING_VALUE, DESC, ENVIRONMENT, FOLDER, ID, MDFACTORYTYPE_MDFACTORYIMPL, MDFACTORYTYPE_MDOBJECTFACTORY, METADATA_TYPE, METADATACREATED, METADATAUPDATED, NAME, OBJREF, PARSING_TYPE_DOM, PARSING_TYPE_SAX, WAREHOUSE
 
Fields inherited from interface com.sas.metadata.remote.MetadataObjects
ABSTRACTEXTENSION, ABSTRACTJOB, ABSTRACTPROMPT, ABSTRACTPROPERTY, ABSTRACTTRANSFORMATION, ACCESSCONTROL, ACCESSCONTROLENTRY, ACCESSCONTROLTEMPLATE, ACTION, AGGREGATION, ANALYTICCOLUMN, ANALYTICCONTEXT, ANALYTICTABLE, APPLICATIONACTION, ARCHIVEENTRY, ARCHIVEFILE, ASSOCIATIONPROPERTY, ATTRIBUTEPROPERTY, AUTHENTICATIONDOMAIN, CALCULATEDMEASURE, CALCULATEDMEMBER, CHANGE, CLASSIFIER, CLASSIFIERMAP, COLUMN, COLUMNRANGE, COMCONNECTION, CONDITION, CONDITIONACTIONSET, CONDITIONALPRECEDENCE, CONFIGUREDCOMPONENT, CONNECTION, CONTENTLOCATION, CONTENTTYPE, CUBE, CUSTOMASSOCIATION, DATABASECATALOG, DATABASESCHEMA, DATASOURCENAME, DATATABLE, DEPLOYEDCOMPONENT, DEPLOYEDDATAPACKAGE, DEVICE, DEVICETYPE, DIMENSION, DIRECTORY, DOCUMENT, EMAIL, EVENT, EXTENSION, EXTERNALIDENTITY, EXTERNALTABLE, FAVORITESCONTAINER, FEATURE, FEATUREMAP, FILE, FITSTATISTIC, FOREIGNKEY, GLOBALFORMULA, GROUP, GROUPBYCLAUSE, HAVINGCLAUSE, HIERARCHY, HIERARCHYLEVEL, IDENTITY, IDENTITYGROUP, INDEX, INTERNALLOGIN, ITCHANNEL, ITCONTENTSUBSCRIBER, ITEVENTSUBSCRIBER, ITFILTER, ITSUBSCRIBER, JFJOB, JOB, JOIN, JOINTABLE, KEY, KEYASSOCIATION, KEYWORD, LEVEL, LOCALIZEDRESOURCE, LOCALIZEDTYPE, LOCATION, LOGICALCOLUMN, LOGICALSERVER, LOGIN, MACHINE, MEASURE, MEMORY, MININGRESULT, NAMEDSERVICE, NAMEDSET, NUMERICEXTENSION, OLAPPROPERTY, OLAPSCHEMA, OMA_MODEL_DESC, OMA_MODEL_NAME, OMA_MODEL_VERSION, ONCLAUSE, OPENCLIENTCONNECTION, ORDERBYCLAUSE, PERMISSION, PERMISSIONCONDITION, PERSON, PHONE, PHYSICALTABLE, PRIMARYTYPE, PROMPT, PROMPTGROUP, PROPERTY, PROPERTYGROUP, PROPERTYSET, PROPERTYTYPE, PROTOTYPE, PROTOTYPEPROPERTY, PSCOLUMNLAYOUTCOMPONENT, PSLAYOUTCOMPONENT, PSPORTALPAGE, PSPORTALPROFILE, PSPORTLET, QUERYCLAUSE, QUERYTABLE, RELATIONALSCHEMA, RELATIONALTABLE, REPORT, RESPONSIBLEPARTY, ROLE, ROOT, ROWSELECTOR, SASCATALOG, SASCATALOGENTRY, SASCLIENTCONNECTION, SASFILEREF, SASLIBRARY, SASLICENSE, SASPASSWORD, SEARCH, SECONDARYTYPE, SECURITYRULE, SECURITYRULESCHEME, SECURITYTYPECONTAINMENTRULE, SELECT, SERVERCOMPONENT, SERVERCONTEXT, SERVICECOMPONENT, SERVICETYPE, SHAREDDIMENSION, SOFTWARECOMPONENT, STEPPRECEDENCE, STREAM, SXLEMAP, SYNCSTEP, TABLECOLLECTION, TARGET, TCPIPCONNECTION, TESTCAT, TESTFLEA, TESTGRANDKITTEN, TESTKITTEN, TESTLEG, TESTMOUSE, TESTREQATTRS, TESTROOT, TEXT, TEXTSTORE, TIMESTAMP, TRANSFORMATION, TRANSFORMATIONACTIVITY, TRANSFORMATIONSTEP, TREE, TSNAMEOBJECT, TSNAMESPACE, TYPEDEFINITION, UNIQUEKEY, UNITOFTIME, VARIABLE, WHERECLAUSE, WORKTABLE, XPATH
 
Constructor Summary
MdFactoryImpl()
          Creates a new factory.
MdFactoryImpl(boolean remoteEnvironment)
          Creates a new factory.
 
Method Summary
 void addMdFactoryListener(MdFactoryListener l)
          Registers a factory listener.
 void addMdFactoryListener(MdFactoryListener listener, java.lang.String[] objectTypes)
          Registers a factory listener.
 void addMdObjectFactoryListener(MdObjectFactoryListener l)
          Deprecated. Use addMdFactoryListener(MdFactoryListener)
 void addMdObjectListener(MdObjectListener l)
          Used to add an object to the list of listeners for changes in the Metadata Map
 void changeHashKey(java.lang.String strOldId, java.lang.String strNewId)
          Change the hash key associated with an object, and notify listeners
 void changeImplementationExtension(java.lang.String newExtension)
          This sets the extension for files in the implementation.
 void changeImplementationPackage(java.lang.String newPackage)
          This changes the java package implementation files are loaded from.
 void closeConnection()
          Deprecated. this method has been renamed to closeOMRConnection()
 void closeOMRConnection()
          Close connection to OMR
 CMetadata createComplexMetadataObject(MdObjectStore oStore, CMetadata oSimple)
          Creates a complex/detailed metadata object in a given object store.
 CMetadata createComplexMetadataObject(MdObjectStore inStore, MdStore parentStore, CMetadata oSimple)
          Create a complex/detailed metadata object given the name,type, and ID of that object.
 CMetadata createComplexMetadataObject(MdObjectStore inStore, MdStore parentStore, java.lang.String strName, java.lang.String strType, java.lang.String strFQID)
          Create a complex/detailed metadata object given the name,type, and ID of that object.
 CMetadata createComplexMetadataObject(MdObjectStore inStore, MdStore parentStore, java.lang.String strName, java.lang.String strType, java.lang.String strFQID, java.lang.String strNewObjectExternalIdentityRealRepos)
          Create a complex/detailed metadata object given the name,type, and ID of that object.
 CMetadata createComplexMetadataObject(MdObjectStore oStore, java.lang.String strName, java.lang.String strType, java.lang.String strFQID)
          Creates a complex/detailed metadata object in a given object store.
 CMetadata createComplexMetadataObject(MdStore inStore, MdStore parentStore, java.lang.String strName, java.lang.String strType, java.lang.String strFQID, java.lang.String strNewObjectExternalIdentityRealRepos)
          Deprecated. Objects should only be created in an ObjectStore. Deprecated as of 9.2. Use createComplexMetadataObject(MdObjectStore, MdStore, String, String, String, String) instead.
 MdObjectStore createObjectStore()
          Returns a MdObjectStore for use in storing objects, and creating objects.
 MdObjectStore createObjectStore(MdStore parentStore)
          Returns a MdObjectStore for use in storing objects, and creating objects.
 MdObjectStore createObjectStore(MdStore parentStore, java.lang.String storeName)
          Returns a MdObjectStore for use in storing objects, and creating objects.
 CMetadata createSimpleMetadataObject(CMetadata inObject)
          Creates an object to be used as a place holder for a more complex object.
 CMetadata createSimpleMetadataObject(CMetadata inObject, java.lang.String lockedBy)
          Creates an object to be used as a place holder for a more complex object.
 CMetadata createSimpleMetadataObject(java.lang.String strName, java.lang.String strType, java.lang.String strFQID)
          Creates an object to be used as a place holder for a more complex object.
 CMetadata createSimpleMetadataObject(java.lang.String strName, java.lang.String strType, java.lang.String strFQID, java.lang.String lockedBy)
          Creates an object to be used as a place holder for a more complex object.
 void deleteDetailMetadataObject(java.lang.String strFQID)
          Deletes an object from the detail Map and fires the MetadataRemoved event.
 void deleteMetadataObject(CMetadata delobject)
          Removes the object from the client and from the server if the object exists on the server.
 void deleteMetadataObjects(CMetadata deleteObject, java.lang.String template)
          Removes the object from the detail Map and from the server!
 void deleteMetadataObjects(java.util.List<? extends CMetadata> objectList)
          Removes the object from the detail Map and from the server!
 void deleteMetadataObjects(java.lang.String objectName, java.lang.String objectType, java.lang.String objectFQID, java.lang.String template)
          Removes the object from the detail Map and from the server!
 void deleteObjectsFromStores(java.util.List<java.lang.String> objectList)
          Deprecated. use deleteObjectsFromStores(Map)
 void deleteObjectsFromStores(java.util.Map<java.lang.String,java.lang.String> objectMap)
          Removes a list of objects from all object stores.
 void deletePublicObject(CMetadata publicObject)
          Deletes a public object from the server.
 void deletePublicObject(CMetadata publicObject, java.lang.String template)
          Deletes a public object from the server.
 void dispose()
          Removes all objects and references so this object can be garbage collected.
 void dumpDetailHashMap()
          Prints out the contents of the Detail object Map.
 void fireMdObjectsCreated(MdEvent e, java.util.List<java.lang.String> id)
          Deprecated. Use fireMdObjectsCreated(MdFactoryEvent)
 void fireMdObjectsCreated(MdFactoryEvent e)
          Used to notify all the Factory listeners of new objects created on the server.
 void fireMdObjectsDeleted(MdFactoryEvent e)
          Used to notify all the Factory listeners of objects deleted from the server.
 void fireMdObjectsModified(MdFactoryEvent e)
          Used to notify all the Factory listeners of objects modified on the server.
 MetadataResource getBundle()
          Return resource bundle used to access localized resources
 boolean getChangeManagementEnabled()
          Gets the status of change management enable/disabled.
 MdOMRConnection getConnection()
          Returns the connection object.
 boolean getDebug()
          Gets whether debug information is on for this instance of SAS Java Metadata Interface.
 java.util.Map<java.lang.String,CMetadata> getDetailObjectMap()
          Deprecated. As of 9.2, complex objects should no longer be stored in the ServerStore
 MdFactory getInstance()
          Get's the instance of the factory.
 boolean getLoggingEnabled()
          Gets whether XML transaction logging information is on for this instance of SAS Java Metadata Interface.
 int getMdFactoryType()
          This can return MDFACTORYTYPE_MDOBJECTFACTORY or MDFACTORYTYPE_MDFACTORYIMPL
 CMetadata getObject(java.lang.String strFQID)
          Deprecated. As of 9.2, complex objects are no longer stored in the ServerStore. Objects should be created in an ObjectStore.
 MdOMIUtil getOMIUtil()
          Get's the OMI Utility class
 int getParsingType()
          Get the type of parser currently being used, SAX or DOM
 boolean getPerf()
          Tells whether or not to output performance messages
 boolean getRemoveDependentObjects()
          Returns whether or not dependent objects should be removed when an object is removed from its object store.
 MdRepositoryUtil getRepositoryUtil()
          Returns the MdRepositoryUtil interface used for utility methods for metadata repositories.
 MdSecurityUtil getSecurityUtil()
          Returns the MdSecurityUtil instance used for security related operations.
protected  MdServerStore getServerStore()
          Returns the ServerStore used by this factory.
 java.util.Map<java.lang.String,CMetadata> getSimpleObjectMap()
          Returns the Simple Object Map
 MdServerStore getStore()
          Deprecated. As of 9.2, the ServerStore should no longer be used. All objects should be created in an ObjectStore instead.
 boolean getUseServerFormattedDates()
          Returns whether the date attributes (MetadataCreated and MetadataUpdated) on an object should be formatted by the server or not.
 com.sas.metadata.remote.MdUtil getUtil()
          Returns the MdUtil class used for output.
 boolean isRemoteEnvironment()
          Indicates whether or not the client is running in a true remote environment.
 void makeConnection(java.lang.String protocol, java.lang.String host, java.lang.String port, java.lang.String username, java.lang.String password)
          Deprecated. This method is no longer supported. Use makeOMRConnection(String, String, String, String) instead.
 void makeConnection2(java.lang.String host, java.lang.String port, java.lang.String username, java.lang.String password)
          Deprecated. this method has been renamed to makeOMRConnection(String, String, String, String)
 java.lang.String makeID(java.lang.String shortID)
          Creates an ID for a new or temporary object.
 void makeOMRConnection(java.lang.String host, java.lang.String port, java.lang.String username, java.lang.String password)
          This makes a connection to OMR using makeOMRConnection in MdOMRConnection
 void removeMdFactoryListener(MdFactoryListener l)
          Removes a listener from the list
 void removeMdObjectFactoryListener(MdObjectFactoryListener l)
          Deprecated. Use removeMdFactoryListener(MdFactoryListener)
 void removeMdObjectListener(MdObjectListener l)
          Used to remove an object from the list of listeners for changes in the Metadata Map
 void removeStore(MdStore childStore)
          Remove an object store from the factory for use.
 void setChangeManagementEnabled(boolean enabled)
          Sets the status of change management
 void setDebug(boolean instate)
          Sets whether debug information is on for this instance of SAS Java Metadata Interface.
 void setLoggingEnabled(boolean instate)
          Sets whether XML transaction logging information is on for this instance of SAS Java Metadata Interface.
 void setParsingType(int parsing)
          Sets the type of xml parser to use.
 void setPerf(boolean instate)
          Tells whether or not to output performance messages
 void setRemoveDependentObjects(boolean remove)
          Sets whether or not dependent objects should be removed when an object is removed from its object store.
 void setUseServerFormattedDates(boolean format)
          Sets whether the date attributes (MetadataCreated and MetadataUpdated) on an object should be formatted by the server or not.
 

Field Detail

MdFactoryListenerList

protected javax.swing.event.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_OMIUtil

protected MdOMIUtil m_OMIUtil
MdOMIUtil instance


m_Util

protected com.sas.metadata.remote.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 Detail

MdFactoryImpl

public MdFactoryImpl()
              throws java.rmi.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:
java.rmi.RemoteException
MdException

MdFactoryImpl

public MdFactoryImpl(boolean remoteEnvironment)
              throws java.rmi.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:
java.rmi.RemoteException
MdException
Method Detail

isRemoteEnvironment

public boolean isRemoteEnvironment()
                            throws java.rmi.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:
java.rmi.RemoteException

makeConnection

public void makeConnection(java.lang.String protocol,
                           java.lang.String host,
                           java.lang.String port,
                           java.lang.String username,
                           java.lang.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(java.lang.String host,
                            java.lang.String port,
                            java.lang.String username,
                            java.lang.String password)
                     throws MdException
Deprecated. this method has been renamed to makeOMRConnection(String, String, String, String)

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 java.rmi.RemoteException
Deprecated. this method has been renamed to closeOMRConnection()

Close connection to OMI

Specified by:
closeConnection in interface MdFactory
Throws:
java.rmi.RemoteException
See Also:
MdFactory.closeConnection()

makeOMRConnection

public void makeOMRConnection(java.lang.String host,
                              java.lang.String port,
                              java.lang.String username,
                              java.lang.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 java.rmi.RemoteException
Close connection to OMR

Specified by:
closeOMRConnection in interface MdFactory
Throws:
java.rmi.RemoteException
See Also:
MdFactory.closeConnection()

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 java.rmi.RemoteException
Gets whether debug information is on for this instance of SAS Java Metadata Interface.

Specified by:
getDebug in interface MdFactory
Throws:
java.rmi.RemoteException

setDebug

public void setDebug(boolean instate)
              throws java.rmi.RemoteException
Sets whether debug information is on for this instance of SAS Java Metadata Interface.

Specified by:
setDebug in interface MdFactory
Throws:
java.rmi.RemoteException

getLoggingEnabled

public boolean getLoggingEnabled()
                          throws java.rmi.RemoteException
Gets whether XML transaction logging information is on for this instance of SAS Java Metadata Interface.

Specified by:
getLoggingEnabled in interface MdFactory
Throws:
java.rmi.RemoteException

setLoggingEnabled

public void setLoggingEnabled(boolean instate)
                       throws java.rmi.RemoteException
Sets whether XML transaction logging information is on for this instance of SAS Java Metadata Interface.

Specified by:
setLoggingEnabled in interface MdFactory
Throws:
java.rmi.RemoteException

getPerf

public boolean getPerf()
                throws java.rmi.RemoteException
Tells whether or not to output performance messages

Specified by:
getPerf in interface MdFactory
Throws:
java.rmi.RemoteException

setPerf

public void setPerf(boolean instate)
             throws java.rmi.RemoteException
Tells whether or not to output performance messages

Specified by:
setPerf in interface MdFactory
Throws:
java.rmi.RemoteException

getUtil

public com.sas.metadata.remote.MdUtil getUtil()
Returns the MdUtil class used for output.

Specified by:
getUtil in interface MdFactory
Returns:
MdUtil class.

getRepositoryUtil

public MdRepositoryUtil getRepositoryUtil()
                                   throws java.rmi.RemoteException
Returns the MdRepositoryUtil interface used for utility methods for metadata repositories.

Specified by:
getRepositoryUtil in interface MdFactory
Returns:
the MdRepositoryUtil interface
Throws:
java.rmi.RemoteException

getSecurityUtil

public MdSecurityUtil getSecurityUtil()
                               throws java.rmi.RemoteException
Returns the MdSecurityUtil instance used for security related operations.

Specified by:
getSecurityUtil in interface MdFactory
Returns:
the MdSecurityUtil instance
Throws:
java.rmi.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 java.rmi.RemoteException
Get the type of parser currently being used, SAX or DOM

Specified by:
getParsingType in interface MdFactory
Returns:
the parsing type
Throws:
java.rmi.RemoteException

setParsingType

public void setParsingType(int parsing)
                    throws java.rmi.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:
java.rmi.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 java.rmi.RemoteException
Sets the status of change management

Specified by:
setChangeManagementEnabled in interface MdFactory
Throws:
java.rmi.RemoteException

setRemoveDependentObjects

public void setRemoveDependentObjects(boolean remove)
                               throws java.rmi.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:
java.rmi.RemoteException

getRemoveDependentObjects

public boolean getRemoveDependentObjects()
                                  throws java.rmi.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:
java.rmi.RemoteException

setUseServerFormattedDates

public void setUseServerFormattedDates(boolean format)
                                throws java.rmi.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:
java.rmi.RemoteException

getUseServerFormattedDates

public boolean getUseServerFormattedDates()
                                   throws java.rmi.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:
java.rmi.RemoteException

getSimpleObjectMap

public java.util.Map<java.lang.String,CMetadata> getSimpleObjectMap()
                                                             throws java.rmi.RemoteException
Returns the Simple Object Map

Specified by:
getSimpleObjectMap in interface MdFactory
Returns:
The association Map
Throws:
java.rmi.RemoteException

getDetailObjectMap

public java.util.Map<java.lang.String,CMetadata> getDetailObjectMap()
                                                             throws java.rmi.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:
java.rmi.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 java.rmi.RemoteException
Returns a MdObjectStore for use in storing objects, and creating objects.

Specified by:
createObjectStore in interface MdFactory
Returns:
a new MdObjectStore object.
Throws:
java.rmi.RemoteException

createObjectStore

public MdObjectStore createObjectStore(MdStore parentStore)
                                throws java.rmi.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:
java.rmi.RemoteException

createObjectStore

public MdObjectStore createObjectStore(MdStore parentStore,
                                       java.lang.String storeName)
                                throws java.rmi.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:
java.rmi.RemoteException

createSimpleMetadataObject

public CMetadata createSimpleMetadataObject(CMetadata inObject)
                                     throws java.rmi.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:
java.rmi.RemoteException

createSimpleMetadataObject

public CMetadata createSimpleMetadataObject(CMetadata inObject,
                                            java.lang.String lockedBy)
                                     throws java.rmi.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:
java.rmi.RemoteException

createSimpleMetadataObject

public CMetadata createSimpleMetadataObject(java.lang.String strName,
                                            java.lang.String strType,
                                            java.lang.String strFQID,
                                            java.lang.String lockedBy)
                                     throws java.rmi.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:
java.rmi.RemoteException

createSimpleMetadataObject

public CMetadata createSimpleMetadataObject(java.lang.String strName,
                                            java.lang.String strType,
                                            java.lang.String strFQID)
                                     throws java.rmi.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:
java.rmi.RemoteException

createComplexMetadataObject

public CMetadata createComplexMetadataObject(MdObjectStore oStore,
                                             CMetadata oSimple)
                                      throws java.rmi.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:
java.rmi.RemoteException

createComplexMetadataObject

public CMetadata createComplexMetadataObject(MdObjectStore oStore,
                                             java.lang.String strName,
                                             java.lang.String strType,
                                             java.lang.String strFQID)
                                      throws java.rmi.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:
java.rmi.RemoteException

createComplexMetadataObject

public CMetadata createComplexMetadataObject(MdObjectStore inStore,
                                             MdStore parentStore,
                                             CMetadata oSimple)
                                      throws java.rmi.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:
java.rmi.RemoteException

createComplexMetadataObject

public CMetadata createComplexMetadataObject(MdObjectStore inStore,
                                             MdStore parentStore,
                                             java.lang.String strName,
                                             java.lang.String strType,
                                             java.lang.String strFQID)
                                      throws java.rmi.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:
java.rmi.RemoteException

createComplexMetadataObject

public CMetadata createComplexMetadataObject(MdStore inStore,
                                             MdStore parentStore,
                                             java.lang.String strName,
                                             java.lang.String strType,
                                             java.lang.String strFQID,
                                             java.lang.String strNewObjectExternalIdentityRealRepos)
                                      throws java.rmi.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:
java.rmi.RemoteException

createComplexMetadataObject

public CMetadata createComplexMetadataObject(MdObjectStore inStore,
                                             MdStore parentStore,
                                             java.lang.String strName,
                                             java.lang.String strType,
                                             java.lang.String strFQID,
                                             java.lang.String strNewObjectExternalIdentityRealRepos)
                                      throws java.rmi.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 - 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:
java.rmi.RemoteException

deleteDetailMetadataObject

public void deleteDetailMetadataObject(java.lang.String strFQID)
                                throws java.rmi.RemoteException
Deletes an object from the detail Map and fires the MetadataRemoved event.

Specified by:
deleteDetailMetadataObject in interface MdFactory
Parameters:
strFQID - String
Throws:
java.rmi.RemoteException

deleteObjectsFromStores

public void deleteObjectsFromStores(java.util.List<java.lang.String> objectList)
                             throws java.rmi.RemoteException
Deprecated. use deleteObjectsFromStores(Map)

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:
java.rmi.RemoteException

deleteObjectsFromStores

public void deleteObjectsFromStores(java.util.Map<java.lang.String,java.lang.String> objectMap)
                             throws java.rmi.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:
java.rmi.RemoteException

deletePublicObject

public void deletePublicObject(CMetadata publicObject)
                        throws MdException,
                               java.rmi.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
java.rmi.RemoteException

deletePublicObject

public void deletePublicObject(CMetadata publicObject,
                               java.lang.String template)
                        throws MdException,
                               java.rmi.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
java.rmi.RemoteException

deleteMetadataObject

public void deleteMetadataObject(CMetadata delobject)
                          throws MdException,
                                 java.rmi.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
java.rmi.RemoteException

deleteMetadataObjects

public void deleteMetadataObjects(java.util.List<? extends CMetadata> objectList)
                           throws MdException,
                                  java.rmi.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
java.rmi.RemoteException

deleteMetadataObjects

public void deleteMetadataObjects(CMetadata deleteObject,
                                  java.lang.String template)
                           throws MdException,
                                  java.rmi.RemoteException
Removes the object from the detail Map and from the server!

Specified by:
deleteMetadataObjects in interface MdFactory
Parameters:
delobject - CMetadata
template - String
Throws:
MdException
java.rmi.RemoteException

deleteMetadataObjects

public void deleteMetadataObjects(java.lang.String objectName,
                                  java.lang.String objectType,
                                  java.lang.String objectFQID,
                                  java.lang.String template)
                           throws MdException,
                                  java.rmi.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
java.rmi.RemoteException

makeID

public java.lang.String makeID(java.lang.String shortID)
                        throws java.rmi.RemoteException
Creates an ID for a new or temporary object.

Specified by:
makeID in interface MdFactory
Parameters:
shortID - String
Throws:
java.rmi.RemoteException

dumpDetailHashMap

public void dumpDetailHashMap()
                       throws java.rmi.RemoteException
Prints out the contents of the Detail object Map.

Specified by:
dumpDetailHashMap in interface MdFactory
Throws:
java.rmi.RemoteException

dispose

public void dispose()
             throws java.rmi.RemoteException
Removes all objects and references so this object can be garbage collected.

Specified by:
dispose in interface MdFactory
Throws:
java.rmi.RemoteException

getBundle

public MetadataResource getBundle()
                           throws java.rmi.RemoteException
Return resource bundle used to access localized resources

Specified by:
getBundle in interface MdFactory
Throws:
java.rmi.RemoteException

getObject

public CMetadata getObject(java.lang.String strFQID)
                    throws java.rmi.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:
java.rmi.RemoteException

changeHashKey

public void changeHashKey(java.lang.String strOldId,
                          java.lang.String strNewId)
                   throws java.rmi.RemoteException
Change the hash key associated with an object, and notify listeners

Specified by:
changeHashKey in interface MdFactory
Parameters:
strOldId - String
strNewId - String
Throws:
java.rmi.RemoteException

changeImplementationPackage

public void changeImplementationPackage(java.lang.String newPackage)
                                 throws java.rmi.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:
java.rmi.RemoteException

changeImplementationExtension

public void changeImplementationExtension(java.lang.String newExtension)
                                   throws java.rmi.RemoteException
This sets the extension for files in the implementation.

Specified by:
changeImplementationExtension in interface MdFactory
Parameters:
newExtenstion - String The name to append to name of model files.
Throws:
java.rmi.RemoteException

removeStore

public void removeStore(MdStore childStore)
                 throws java.rmi.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:
java.rmi.RemoteException

addMdObjectListener

public void addMdObjectListener(MdObjectListener l)
                         throws java.rmi.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:
java.rmi.RemoteException

removeMdObjectListener

public void removeMdObjectListener(MdObjectListener l)
                            throws java.rmi.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:
java.rmi.RemoteException

addMdObjectFactoryListener

public void addMdObjectFactoryListener(MdObjectFactoryListener l)
                                throws java.rmi.RemoteException
Deprecated. Use addMdFactoryListener(MdFactoryListener)

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:
java.rmi.RemoteException

removeMdObjectFactoryListener

public void removeMdObjectFactoryListener(MdObjectFactoryListener l)
                                   throws java.rmi.RemoteException
Deprecated. Use removeMdFactoryListener(MdFactoryListener)

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:
java.rmi.RemoteException

addMdFactoryListener

public void addMdFactoryListener(MdFactoryListener l)
                          throws java.rmi.RemoteException
Registers a factory listener.

Specified by:
addMdFactoryListener in interface MdFactory
Parameters:
l - MdFactoryListener
Throws:
java.rmi.RemoteException

addMdFactoryListener

public void addMdFactoryListener(MdFactoryListener listener,
                                 java.lang.String[] objectTypes)
                          throws java.rmi.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:
java.rmi.RemoteException

removeMdFactoryListener

public void removeMdFactoryListener(MdFactoryListener l)
                             throws java.rmi.RemoteException
Removes a listener from the list

Specified by:
removeMdFactoryListener in interface MdFactory
Parameters:
l - MdFactoryListener
Throws:
java.rmi.RemoteException

fireMdObjectsCreated

public void fireMdObjectsCreated(MdEvent e,
                                 java.util.List<java.lang.String> id)
                          throws java.rmi.RemoteException
Deprecated. Use fireMdObjectsCreated(MdFactoryEvent)

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:
java.rmi.RemoteException

fireMdObjectsCreated

public void fireMdObjectsCreated(MdFactoryEvent e)
                          throws java.rmi.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:
java.rmi.RemoteException

fireMdObjectsModified

public void fireMdObjectsModified(MdFactoryEvent e)
                           throws java.rmi.RemoteException
Used to notify all the Factory listeners of objects modified on the server.

Specified by:
fireMdObjectsModified in interface MdFactory
Parameters:
e - MdFactoryEvent
Throws:
java.rmi.RemoteException

fireMdObjectsDeleted

public void fireMdObjectsDeleted(MdFactoryEvent e)
                          throws java.rmi.RemoteException
Used to notify all the Factory listeners of objects deleted from the server.

Specified by:
fireMdObjectsDeleted in interface MdFactory
Parameters:
e - MdFactoryEvent
Throws:
java.rmi.RemoteException



Copyright © 2009 SAS Institute Inc. All Rights Reserved.