net.sf.csutils.core.registry.impl
Class MetaModelAccessor

java.lang.Object
  extended by net.sf.csutils.core.registry.impl.MetaModelAccessor
Direct Known Subclasses:
CentraSiteMetaModelAccessor, JaxMasMetaModelAccessor

public abstract class MetaModelAccessor
extends java.lang.Object

The meta model accessor is used to read, or modify the registry meta model.


Nested Class Summary
static class MetaModelAccessor.MetaModel
          Opaque implementation of a meta model.
 
Constructor Summary
MetaModelAccessor()
           
 
Method Summary
protected abstract  ROType add(MetaModelAccessor.MetaModel pModel, ROType pType)
          Creates the given registry object type in the registry.
 void clear(MetaModelAccessor.MetaModel pModel)
          Clears the cached object types.
 ROType create(MetaModelAccessor.MetaModel pModel, ROType pType)
          Adds a new object type to the registry.
abstract  ROType getROType(MetaModelAccessor.MetaModel pModel, QName pQName)
          Returns the registry object type with the given name.
 java.util.Map<QName,ROType> getROTypes(MetaModelAccessor.MetaModel pModel)
          Returns the map of all types.
abstract  MetaModelAccessor.MetaModel newMetaModel(RegistryFacade pFacade)
          Creates a meta model instance.
 void remove(MetaModelAccessor.MetaModel pModel, QName pQName)
          Removes the given object type from the registry.
protected abstract  void remove(MetaModelAccessor.MetaModel pModel, ROType pType)
          Removes the given registry object type from the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaModelAccessor

public MetaModelAccessor()
Method Detail

newMetaModel

public abstract MetaModelAccessor.MetaModel newMetaModel(RegistryFacade pFacade)
Creates a meta model instance.

Parameters:
pFacade - The facade to use.
Returns:
The created meta model instance.

getROType

public abstract ROType getROType(MetaModelAccessor.MetaModel pModel,
                                 QName pQName)
                          throws javax.xml.registry.JAXRException
Returns the registry object type with the given name.

Parameters:
pModel - The meta model to modify.
pQName - Qualified name of the registry object type to return.
Returns:
The registry object type with the given name, if any, or null.
Throws:
javax.xml.registry.JAXRException - The operation failed.

remove

protected abstract void remove(MetaModelAccessor.MetaModel pModel,
                               ROType pType)
                        throws javax.xml.registry.JAXRException
Removes the given registry object type from the registry.

Parameters:
pModel - The inner meta model to modify.
pType - The registry object type to remove.
Throws:
javax.xml.registry.JAXRException - The operation failed.

add

protected abstract ROType add(MetaModelAccessor.MetaModel pModel,
                              ROType pType)
                       throws javax.xml.registry.JAXRException
Creates the given registry object type in the registry.

Parameters:
pModel - The inner meta model to modify.
pType - Description of the registry object type to create.
Returns:
The created registry object type.
Throws:
javax.xml.registry.JAXRException - The operation failed.

getROTypes

public java.util.Map<QName,ROType> getROTypes(MetaModelAccessor.MetaModel pModel)
                                       throws javax.xml.registry.JAXRException
Returns the map of all types.

Parameters:
pModel - The inner meta model to use.
Returns:
The map of all registry object types contained in the given meta model.
Throws:
javax.xml.registry.JAXRException - The operation failed.

clear

public void clear(MetaModelAccessor.MetaModel pModel)
           throws javax.xml.registry.JAXRException
Clears the cached object types.

Parameters:
pModel - The inner meta model to modify.
Throws:
javax.xml.registry.JAXRException - Clearing the cache didn't work.

remove

public void remove(MetaModelAccessor.MetaModel pModel,
                   QName pQName)
            throws javax.xml.registry.JAXRException
Removes the given object type from the registry.

Parameters:
pModel - The inner meta model to modify.
pQName - The qualified name of the registry object type to remove.
Throws:
javax.xml.registry.JAXRException - The operation failed.

create

public ROType create(MetaModelAccessor.MetaModel pModel,
                     ROType pType)
              throws javax.xml.registry.JAXRException
Adds a new object type to the registry.

Parameters:
pModel - The inner meta model to modify.
pType - Description of the registry object type to create.
Returns:
The created registry object type.
Throws:
javax.xml.registry.JAXRException - The operation failed.


Copyright © 2009-2010. All Rights Reserved.