Package com.sas.metadata.remote
Class MdFactoryImpl
java.lang.Object
com.sas.metadata.remote.MdFactoryImpl
- All Implemented Interfaces:
MdFactory,MetadataObjects,Remote
This creates objects and Object Stores to be used by views of the metadata.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanBoolean value used to determine whether date attributes returned by the metadata server should be formatted or unformatted.protected booleanBoolean value used to determine whether dependent objects should be removed from their object stores when a remove method is called.protected MdRepositoryUtilMdRepositoryUtil instanceprotected MdSecurityUtilMdSecurityUtil instanceprotected MdOMRConnectionMdOMRConnection instanceprotected MdConnectionListenerprotected MdOMIUtilMdOMIUtil instanceprotected intThe type of parsing (DOM or SAX) to use.protected MdUtilMdUtil instanceprotected EventListenerListThis 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, WAREHOUSEFields 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, COLUMNHIERARCHY, 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, SECUREDLIBRARY, SECUREDTABLE, 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
ConstructorsConstructorDescriptionCreates a new factory.MdFactoryImpl(boolean remoteEnvironment) Creates a new factory. -
Method Summary
Modifier and TypeMethodDescriptionvoidRegisters a factory listener.voidaddMdFactoryListener(MdFactoryListener listener, String[] objectTypes) Registers a factory listener.voidDeprecated.voidUsed to add an object to the list of listeners for changes in the Metadata MapvoidchangeHashKey(String strOldId, String strNewId) Change the hash key associated with an object, and notify listenersvoidchangeImplementationExtension(String newExtension) This sets the extension for files in the implementation.voidchangeImplementationPackage(String newPackage) This changes the java package implementation files are loaded from.voidDeprecated.this method has been renamed tocloseOMRConnection()voidClose connection to OMRcreateComplexMetadataObject(MdObjectStore oStore, CMetadata oSimple) Creates a complex/detailed metadata object in a given object store.createComplexMetadataObject(MdObjectStore inStore, MdStore parentStore, CMetadata oSimple) Create a complex/detailed metadata object given the name,type, and ID of that object.createComplexMetadataObject(MdObjectStore inStore, MdStore parentStore, String strName, String strType, String strFQID) Create a complex/detailed metadata object given the name,type, and ID of that object.createComplexMetadataObject(MdObjectStore inStore, MdStore parentStore, String strName, String strType, String strFQID, String strNewObjectExternalIdentityRealRepos) Create a complex/detailed metadata object given the name,type, and ID of that object.createComplexMetadataObject(MdObjectStore oStore, String strName, String strType, String strFQID) Creates a complex/detailed metadata object in a given object store.createComplexMetadataObject(MdStore inStore, MdStore parentStore, String strName, String strType, String strFQID, String strNewObjectExternalIdentityRealRepos) Deprecated.Objects should only be created in an ObjectStore.Returns a MdObjectStore for use in storing objects, and creating objects.createObjectStore(MdStore parentStore) Returns a MdObjectStore for use in storing objects, and creating objects.createObjectStore(MdStore parentStore, String storeName) Returns a MdObjectStore for use in storing objects, and creating objects.createSimpleMetadataObject(CMetadata inObject) Creates an object to be used as a place holder for a more complex object.createSimpleMetadataObject(CMetadata inObject, String lockedBy) Creates an object to be used as a place holder for a more complex object.createSimpleMetadataObject(String strName, String strType, String strFQID) Creates an object to be used as a place holder for a more complex object.createSimpleMetadataObject(String strName, String strType, String strFQID, String lockedBy) Creates an object to be used as a place holder for a more complex object.voiddeleteDetailMetadataObject(String strFQID) Deletes an object from the detail Map and fires the MetadataRemoved event.voiddeleteMetadataObject(CMetadata delobject) Removes the object from the client and from the server if the object exists on the server.voiddeleteMetadataObjects(CMetadata deleteObject, String template) Removes the object from the detail Map and from the server!voiddeleteMetadataObjects(String objectName, String objectType, String objectFQID, String template) Removes the object from the detail Map and from the server!voiddeleteMetadataObjects(List<? extends CMetadata> objectList) Removes the object from the detail Map and from the server!voiddeleteObjectsFromStores(List<String> objectList) Deprecated.voiddeleteObjectsFromStores(Map<String, String> objectMap) Removes a list of objects from all object stores.voiddeletePublicObject(CMetadata publicObject) Deletes a public object from the server.voiddeletePublicObject(CMetadata publicObject, String template) Deletes a public object from the server.voiddispose()Removes all objects and references so this object can be garbage collected.voidPrints out the contents of the Detail object Map.voidfireMdObjectsCreated(MdEvent e, List<String> id) Deprecated.voidUsed to notify all the Factory listeners of new objects created on the server.voidUsed to notify all the Factory listeners of objects deleted from the server.voidUsed to notify all the Factory listeners of objects modified on the server.Return resource bundle used to access localized resourcesbooleanGets the status of change management enable/disabled.Returns the connection object.booleangetDebug()Gets whether debug information is on for this instance of SAS Java Metadata Interface.Map<String, CMetadata> Deprecated.As of 9.2, complex objects should no longer be stored in the ServerStoreGet's the instance of the factory.booleanGets whether XML transaction logging information is on for this instance of SAS Java Metadata Interface.Returns the registered connection listener, or null if one has not been set.intThis can return MDFACTORYTYPE_MDOBJECTFACTORY or MDFACTORYTYPE_MDFACTORYIMPLgetObject(String strFQID) Deprecated.As of 9.2, complex objects are no longer stored in the ServerStore.Get's the OMI Utility classintGet the type of parser currently being used, SAX or DOMbooleangetPerf()Tells whether or not to output performance messagesbooleanReturns whether or not dependent objects should be removed when an object is removed from its object store.Returns the MdRepositoryUtil interface used for utility methods for metadata repositories.Returns the MdSecurityUtil instance used for security related operations.protected MdServerStoreReturns the ServerStore used by this factory.Map<String, CMetadata> Returns the Simple Object MapgetStore()Deprecated.As of 9.2, the ServerStore should no longer be used.booleanReturns whether the date attributes (MetadataCreated and MetadataUpdated) on an object should be formatted by the server or not.MdUtilgetUtil()Returns the MdUtil class used for output.booleanIndicates whether or not the client is running in a true remote environment.voidmakeConnection(String protocol, String host, String port, String username, String password) Deprecated.This method is no longer supported.voidmakeConnection2(String host, String port, String username, String password) Deprecated.this method has been renamed tomakeOMRConnection(String, String, String, String)StringmakeID(String shortID) Creates an ID for a new or temporary object.voidmakeOMRConnection(String host, String port, String username, String password) This makes a connection to OMR using makeOMRConnection in MdOMRConnectionvoidRemoves a listener from the listvoidDeprecated.voidUsed to remove an object from the list of listeners for changes in the Metadata MapvoidremoveStore(MdStore childStore) Remove an object store from the factory for use.voidsetChangeManagementEnabled(boolean enabled) Sets the status of change managementvoidsetDebug(boolean instate) Sets whether debug information is on for this instance of SAS Java Metadata Interface.voidsetLoggingEnabled(boolean instate) Sets whether XML transaction logging information is on for this instance of SAS Java Metadata Interface.voidsetMdConnectionListener(MdConnectionListener listener) Registers a connection listener.voidsetParsingType(int parsing) Sets the type of xml parser to use.voidsetPerf(boolean instate) Tells whether or not to output performance messagesvoidsetRemoveDependentObjects(boolean remove) Sets whether or not dependent objects should be removed when an object is removed from its object store.voidsetUseServerFormattedDates(boolean format) Sets whether the date attributes (MetadataCreated and MetadataUpdated) on an object should be formatted by the server or not.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
MdFactoryListenerList
protected EventListenerList MdFactoryListenerListThis is the list of listeners for events from the Factory itself. This includes objects being created, modified, and deleted. -
m_connection
MdOMRConnection instance -
m_connectionListener
-
m_OMIUtil
MdOMIUtil instance -
m_Util
protected MdUtil m_UtilMdUtil instance -
_reposUtil
MdRepositoryUtil instance -
_securityUtil
MdSecurityUtil instance -
m_ParsingType
protected int m_ParsingTypeThe type of parsing (DOM or SAX) to use. -
_removeDependentObjects
protected boolean _removeDependentObjectsBoolean value used to determine whether dependent objects should be removed from their object stores when a remove method is called. -
_formatDates
protected boolean _formatDatesBoolean value used to determine whether date attributes returned by the metadata server should be formatted or unformatted.
-
-
Constructor Details
-
MdFactoryImpl
Creates a new factory. All objects created by this factory will be remoteable. For running in a "local" envrironment, seeMdFactoryImpl(boolean).- Throws:
RemoteExceptionMdException
-
MdFactoryImpl
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 totrue, so in order to run joma in a "local" environment,falsemust be specified.- Throws:
RemoteExceptionMdException
-
-
Method Details
-
isRemoteEnvironment
public boolean isRemoteEnvironment() throws RemoteExceptionIndicates whether or not the client is running in a true remote environment.- Specified by:
isRemoteEnvironmentin interfaceMdFactory- 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. UsemakeOMRConnection(String, String, String, String)instead.This makes a connection to OMR using makeOMRConnection in MdOMRConnection- Specified by:
makeConnectionin interfaceMdFactory- Parameters:
protocol- IGNOREDhost- Host name to connect toport- Port on host to connect tousername- user's name on hostpassword- password for username- Throws:
MdException
-
makeConnection2
public void makeConnection2(String host, String port, String username, String password) throws MdException Deprecated.this method has been renamed tomakeOMRConnection(String, String, String, String)This makes a connection to OMR using makeOMRConnection in MdOMRConnection- Specified by:
makeConnection2in interfaceMdFactory- Parameters:
host- Host name to connect toport- Port on host to connect tousername- user's name on hostpassword- password for username- Throws:
MdException
-
closeConnection
public void closeConnection() throws RemoteExceptionDeprecated.this method has been renamed tocloseOMRConnection()Close connection to OMI- Specified by:
closeConnectionin interfaceMdFactory- 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:
makeOMRConnectionin interfaceMdFactory- Parameters:
host- Host name to connect toport- Port on host to connect tousername- user's name on hostpassword- password for username- Throws:
MdException
-
closeOMRConnection
public void closeOMRConnection() throws RemoteExceptionClose connection to OMR- Specified by:
closeOMRConnectionin interfaceMdFactory- Throws:
RemoteException- See Also:
-
getMdFactoryType
public int getMdFactoryType()This can return MDFACTORYTYPE_MDOBJECTFACTORY or MDFACTORYTYPE_MDFACTORYIMPL- Specified by:
getMdFactoryTypein interfaceMdFactory- Returns:
- the type of factory this is.
-
getDebug
public boolean getDebug() throws RemoteExceptionGets whether debug information is on for this instance of SAS Java Metadata Interface. -
setDebug
public void setDebug(boolean instate) throws RemoteException Sets whether debug information is on for this instance of SAS Java Metadata Interface. -
getLoggingEnabled
public boolean getLoggingEnabled() throws RemoteExceptionGets whether XML transaction logging information is on for this instance of SAS Java Metadata Interface.- Specified by:
getLoggingEnabledin interfaceMdFactory- 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:
setLoggingEnabledin interfaceMdFactory- Throws:
RemoteException
-
getPerf
public boolean getPerf() throws RemoteExceptionTells whether or not to output performance messages -
setPerf
public void setPerf(boolean instate) throws RemoteException Tells whether or not to output performance messages -
getUtil
public MdUtil getUtil()Returns the MdUtil class used for output. -
getRepositoryUtil
Returns the MdRepositoryUtil interface used for utility methods for metadata repositories.- Specified by:
getRepositoryUtilin interfaceMdFactory- Returns:
- the MdRepositoryUtil interface
- Throws:
RemoteException
-
getSecurityUtil
Returns the MdSecurityUtil instance used for security related operations.- Specified by:
getSecurityUtilin interfaceMdFactory- Returns:
- the MdSecurityUtil instance
- Throws:
RemoteException
-
getInstance
Get's the instance of the factory.(this)- Specified by:
getInstancein interfaceMdFactory- Returns:
- MdObjectFactory this instance.
-
getParsingType
public int getParsingType() throws RemoteExceptionGet the type of parser currently being used, SAX or DOM- Specified by:
getParsingTypein interfaceMdFactory- Returns:
- the parsing type
- Throws:
RemoteException
-
setParsingType
public void setParsingType(int parsing) throws RemoteException Sets the type of xml parser to use. Valid options areMdFactory.PARSING_TYPE_SAXorMdFactory.PARSING_TYPE_DOM- Specified by:
setParsingTypein interfaceMdFactory- Parameters:
parsing-- Throws:
RemoteException
-
getOMIUtil
Get's the OMI Utility class- Specified by:
getOMIUtilin interfaceMdFactory- Returns:
- MdOMIUtil class
-
getConnection
Returns the connection object.- Specified by:
getConnectionin interfaceMdFactory- Returns:
- MdOMRConnection the interface of the connection object
-
getChangeManagementEnabled
public boolean getChangeManagementEnabled()Gets the status of change management enable/disabled.- Specified by:
getChangeManagementEnabledin interfaceMdFactory
-
setChangeManagementEnabled
public void setChangeManagementEnabled(boolean enabled) throws RemoteException Sets the status of change management- Specified by:
setChangeManagementEnabledin interfaceMdFactory- 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:
setRemoveDependentObjectsin interfaceMdFactory- Parameters:
remove- true if removing dependent objects- Throws:
RemoteException
-
getRemoveDependentObjects
public boolean getRemoveDependentObjects() throws RemoteExceptionReturns whether or not dependent objects should be removed when an object is removed from its object store. Default value is false.- Specified by:
getRemoveDependentObjectsin interfaceMdFactory- 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 totrue.- Specified by:
setUseServerFormattedDatesin interfaceMdFactory- Parameters:
format- true if dates should be formatted- Throws:
RemoteException
-
getUseServerFormattedDates
public boolean getUseServerFormattedDates() throws RemoteExceptionReturns whether the date attributes (MetadataCreated and MetadataUpdated) on an object should be formatted by the server or not. The default value istruemeaning the server will apply its own formatting to the dates.- Specified by:
getUseServerFormattedDatesin interfaceMdFactory- Returns:
- true if dates are being formatted
- Throws:
RemoteException
-
getSimpleObjectMap
Returns the Simple Object Map- Specified by:
getSimpleObjectMapin interfaceMdFactory- Returns:
- The association Map
- Throws:
RemoteException
-
getDetailObjectMap
Deprecated.As of 9.2, complex objects should no longer be stored in the ServerStoreReturns the Detail Object Map- Specified by:
getDetailObjectMapin interfaceMdFactory- Returns:
- The association Map
- Throws:
RemoteException
-
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 -
getServerStore
Returns the ServerStore used by this factory.- Returns:
- MdServerStore
-
createObjectStore
Returns a MdObjectStore for use in storing objects, and creating objects.- Specified by:
createObjectStorein interfaceMdFactory- Returns:
- a new MdObjectStore object.
- Throws:
RemoteException
-
createObjectStore
Returns a MdObjectStore for use in storing objects, and creating objects.- Specified by:
createObjectStorein interfaceMdFactory- 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:
createObjectStorein interfaceMdFactory- 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
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:
createSimpleMetadataObjectin interfaceMdFactory- Parameters:
inObject- CMetadata objectstrName- StringstrType- StringstrFQID- 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:
createSimpleMetadataObjectin interfaceMdFactory- 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:
createSimpleMetadataObjectin interfaceMdFactory- Parameters:
strName- StringstrType- StringstrFQID- 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:
createSimpleMetadataObjectin interfaceMdFactory- Parameters:
strName- StringstrType- StringstrFQID- 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:
createComplexMetadataObjectin interfaceMdFactory- Parameters:
oStore- MdObjectStoreoSimple- 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:
createComplexMetadataObjectin interfaceMdFactory- Parameters:
oStore- MdObjectStorestrName- the object namestrType- the metadata object typestrFQID- 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:
createComplexMetadataObjectin interfaceMdFactory- 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 ininStoreand sets the owningstore for the new store ifinStoreis null and a new store is created for the object.- Specified by:
createComplexMetadataObjectin interfaceMdFactory- Parameters:
inStore- Store to copy object into upon creation.parentStore- Store that owns any newly created store.strName- the object namestrType- the metadata object typestrFQID- 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. UsecreateComplexMetadataObject(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 ininStoreand sets the owningstore for the new store ifinStoreis null and a new store is created for the object.- Specified by:
createComplexMetadataObjectin interfaceMdFactory- Parameters:
inStore- Store to copy object into upon creation.parentStore- MdStore Store that owns any newly created store.strName- the object namestrType- the metadata object typestrFQID- 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:MdFactoryCreate a complex/detailed metadata object given the name,type, and ID of that object. Creates the object ininStoreand sets the owningstore for the new store ifinStoreis null and a new store is created for the object.- Specified by:
createComplexMetadataObjectin interfaceMdFactory- Parameters:
inStore- Store to copy object into upon creation.parentStore- Store that owns any newly created store.strName- the object namestrType- the metadata object typestrFQID- 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:
deleteDetailMetadataObjectin interfaceMdFactory- Parameters:
strFQID- String- Throws:
RemoteException
-
deleteObjectsFromStores
public void deleteObjectsFromStores(List<String> objectList) throws RemoteException Deprecated.Removes a list of objects from all object stores. This method assumes that these objects have already been removed from th server.- Specified by:
deleteObjectsFromStoresin interfaceMdFactory- Parameters:
objectList- list of object ids to delete from the client- Throws:
RemoteException
-
deleteObjectsFromStores
public void deleteObjectsFromStores(Map<String, String> objectMap) throws RemoteExceptionRemoves a list of objects from all object stores. This method assumes that these objects have already been removed from th server.- Specified by:
deleteObjectsFromStoresin interfaceMdFactory- Parameters:
objectMap- a map of all object ids and types to delete from the client.- Throws:
RemoteException
-
deletePublicObject
Deletes a public object from the server. As long as the object specified has thePublicTypeattribute populated, the metadata server will handle deleting the entire public object using the template stored in the TypeDictionary.- Specified by:
deletePublicObjectin interfaceMdFactory- Parameters:
publicObject- the public object to delete- Throws:
MdExceptionRemoteException
-
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:
deletePublicObjectin interfaceMdFactory- Parameters:
publicObject- the public object to deletetemplate- 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 thepublicObjectand PUBLIC_TYPE is the type name as defined in the TypeDictionary- Throws:
MdExceptionRemoteException
-
deleteMetadataObject
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:
deleteMetadataObjectin interfaceMdFactory- Parameters:
delobject- the CMetadata object to delete- Throws:
MdExceptionRemoteException
-
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:
deleteMetadataObjectsin interfaceMdFactory- Parameters:
objectList- a list of CMetadata objects to delete from the server.- Throws:
MdExceptionRemoteException
-
deleteMetadataObjects
public void deleteMetadataObjects(CMetadata deleteObject, String template) throws MdException, RemoteException Removes the object from the detail Map and from the server!- Specified by:
deleteMetadataObjectsin interfaceMdFactory- Parameters:
deleteObject- CMetadatatemplate- Stringdelobject- CMetadata- Throws:
MdExceptionRemoteException
-
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:
deleteMetadataObjectsin interfaceMdFactory- Parameters:
objectName- StringobjectType- StringobjectFQID- Stringtemplate- String- Throws:
MdExceptionRemoteException
-
makeID
public String makeID(String shortID) throws RemoteException Creates an ID for a new or temporary object. -
dumpDetailHashMap
public void dumpDetailHashMap() throws RemoteExceptionPrints out the contents of the Detail object Map.- Specified by:
dumpDetailHashMapin interfaceMdFactory- Throws:
RemoteException
-
dispose
public void dispose() throws RemoteExceptionRemoves all objects and references so this object can be garbage collected. -
getBundle
Return resource bundle used to access localized resources -
getObject
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 -
changeHashKey
public void changeHashKey(String strOldId, String strNewId) throws RemoteException Change the hash key associated with an object, and notify listeners- Specified by:
changeHashKeyin interfaceMdFactory- Parameters:
strOldId- StringstrNewId- String- Throws:
RemoteException
-
changeImplementationPackage
public void changeImplementationPackage(String newPackage) throws RemoteException This changes the java package implementation files are loaded from.- Specified by:
changeImplementationPackagein interfaceMdFactory- 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:
changeImplementationExtensionin interfaceMdFactory- 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
Remove an object store from the factory for use. Also removes any objects that are not being used by any other ObjectStore.- Specified by:
removeStorein interfaceMdFactory- Parameters:
childStore- MdStore The store to remove.- Throws:
RemoteException
-
addMdObjectListener
Used to add an object to the list of listeners for changes in the Metadata Map- Specified by:
addMdObjectListenerin interfaceMdFactory- Parameters:
l- MetadataListener- Throws:
RemoteException
-
removeMdObjectListener
Used to remove an object from the list of listeners for changes in the Metadata Map- Specified by:
removeMdObjectListenerin interfaceMdFactory- Parameters:
l- MetadataListener- Throws:
RemoteException
-
addMdObjectFactoryListener
Deprecated.Used to add an object to the list of listeners for changes in the Metadata Map- Specified by:
addMdObjectFactoryListenerin interfaceMdFactory- Parameters:
l- MetadataListener- Throws:
RemoteException
-
removeMdObjectFactoryListener
Deprecated.Used to remove an object from the list of listeners for changes in the Metadata Map- Specified by:
removeMdObjectFactoryListenerin interfaceMdFactory- Parameters:
l- MetadataListener- Throws:
RemoteException
-
addMdFactoryListener
Registers a factory listener.- Specified by:
addMdFactoryListenerin interfaceMdFactory- 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, seeMdFactoryEvent.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
objectTypesparameter. 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:
addMdFactoryListenerin interfaceMdFactory- Parameters:
listener- the listener to registerobjectTypes- 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
Removes a listener from the list- Specified by:
removeMdFactoryListenerin interfaceMdFactory- Parameters:
l- MdFactoryListener- Throws:
RemoteException
-
fireMdObjectsCreated
Deprecated.Used to notify all the Factory listeners of newly created objects.- Specified by:
fireMdObjectsCreatedin interfaceMdFactory- Parameters:
e- ChangeEvent Created like:new ChangeEvent(Object generator)id- FQID of newly created object- Throws:
RemoteException
-
fireMdObjectsCreated
Used to notify all the Factory listeners of new objects created on the server.- Specified by:
fireMdObjectsCreatedin interfaceMdFactory- Parameters:
e- MdFactoryEvent- Throws:
RemoteException
-
fireMdObjectsModified
Used to notify all the Factory listeners of objects modified on the server.- Specified by:
fireMdObjectsModifiedin interfaceMdFactory- Parameters:
e- MdFactoryEvent- Throws:
RemoteException
-
fireMdObjectsDeleted
Used to notify all the Factory listeners of objects deleted from the server.- Specified by:
fireMdObjectsDeletedin interfaceMdFactory- Parameters:
e- MdFactoryEvent- Throws:
RemoteException
-
setMdConnectionListener
Description copied from interface:MdFactoryRegisters a connection listener.- Specified by:
setMdConnectionListenerin interfaceMdFactory- Parameters:
listener-- Throws:
RemoteException
-
getMdConnectionListener
Description copied from interface:MdFactoryReturns the registered connection listener, or null if one has not been set.- Specified by:
getMdConnectionListenerin interfaceMdFactory- Returns:
- connection listener
- Throws:
RemoteException
-
addMdFactoryListener(MdFactoryListener)