org.infoglue.cms.controllers.kernel.impl.simple
Class RegistryController

java.lang.Object
  |
  +--org.infoglue.cms.controllers.kernel.impl.simple.BaseController
        |
        +--org.infoglue.cms.controllers.kernel.impl.simple.RegistryController

public class RegistryController
extends BaseController

The RegistryController manages the registry-parts of InfoGlue. The Registry is metadata for how things are related - especially to handle bindings and inline links etc when looking them up in the model is to slow.

Author:
Mattias Bogeblad

Method Summary
 void clearRegistryForReferencedEntity(java.lang.String entityName, java.lang.String entityId)
          Clears all references to a entity
 java.util.List clearRegistryVOList(java.lang.String referencingEntityName, java.lang.String referencingEntityId, org.exolab.castor.jdo.Database db)
          Gets matching references
 RegistryVO create(RegistryVO valueObject, org.exolab.castor.jdo.Database db)
          This method creates a registry entity in the db.
 void delete(java.lang.Integer registryId)
          This method deletes a registry entry
 void getComponentBindings(SiteNodeVersion siteNodeVersion, java.lang.String versionValue, org.exolab.castor.jdo.Database db)
          This method fetches all components and adds entries to the registry.
 void getComponents(SiteNodeVersion siteNodeVersion, java.lang.String versionValue, org.exolab.castor.jdo.Database db)
          This method fetches all components and adds entries to the registry.
static RegistryController getController()
           
 void getInlineContents(ContentVersion contentVersion, java.lang.String versionValue, org.exolab.castor.jdo.Database db)
          This method fetches all inline links from any text.
 void getInlineSiteNodes(ContentVersion contentVersion, java.lang.String versionValue, org.exolab.castor.jdo.Database db)
          This method fetches all inline links from any text.
 java.util.List getMatchingRegistryVOList(java.lang.String entityName, java.lang.String entityId, org.exolab.castor.jdo.Database db)
          Gets matching references
 java.util.List getMatchingRegistryVOListForReferencingEntity(java.lang.String referencingEntityName, java.lang.String referencingEntityId, org.exolab.castor.jdo.Database db)
          Gets matching references
 BaseEntityVO getNewVO()
          Implemented for BaseController
 java.util.List getReferencingObjectsForContent(java.lang.Integer contentId)
          This method gets all referencing content versions
 java.util.List getReferencingObjectsForSiteNode(java.lang.Integer siteNodeId)
          This method gets all referencing sitenode versions
 void getRelationContents(ContentVersion contentVersion, java.lang.String versionValue, org.exolab.castor.jdo.Database db)
          This method fetches all inline links from any text.
 void getRelationSiteNodes(ContentVersion contentVersion, java.lang.String versionValue, org.exolab.castor.jdo.Database db)
          This method fetches all inline links from any text.
 java.util.List getSiteNodeVersionsWhichUsesContentVersionAsMetaInfo(ContentVersion contentVersion, org.exolab.castor.jdo.Database db)
          Gets siteNodeVersions which uses the metainfo
 RegistryVO update(RegistryVO valueObject, org.exolab.castor.jdo.Database db)
          This method updates a registry entry
 void updateContentVersion(ContentVersion contentVersion, org.exolab.castor.jdo.Database db)
          this method goes through all inline stuff and all relations if ordinary content and all components and bindings if a metainfo.
 void updateContentVersion(ContentVersionVO contentVersionVO)
          this method goes through all inline stuff and all relations if ordinary content and all components and bindings if a metainfo.
 void updateSiteNodeVersion(SiteNodeVersion siteNodeVersion, org.exolab.castor.jdo.Database db)
          this method goes through all page bindings and makes registry entries for them
 void updateSiteNodeVersion(SiteNodeVersionVO siteNodeVersionVO)
          this method goes through all page bindings and makes registry entries for them
 
Methods inherited from class org.infoglue.cms.controllers.kernel.impl.simple.BaseController
deleteEntity, deleteEntity, deleteEntity, getAllVOObjects, getAllVOObjects, getAllVOObjects, getAllVOObjects, getVOWithId, getVOWithId, getVOWithId, toModifiableVOList, toVOList, updateEntity, updateEntity, updateEntity, validateEntity
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getController

public static RegistryController getController()

create

public RegistryVO create(RegistryVO valueObject,
                         org.exolab.castor.jdo.Database db)
                  throws ConstraintException,
                         SystemException,
                         java.lang.Exception
This method creates a registry entity in the db.

Parameters:
valueObject -
Returns:
Throws:
ConstraintException
SystemException
java.lang.Exception

update

public RegistryVO update(RegistryVO valueObject,
                         org.exolab.castor.jdo.Database db)
                  throws ConstraintException,
                         SystemException
This method updates a registry entry

Returns:
Throws:
ConstraintException
SystemException

delete

public void delete(java.lang.Integer registryId)
            throws ConstraintException,
                   SystemException
This method deletes a registry entry

Returns:
registryId
Throws:
ConstraintException
SystemException

updateContentVersion

public void updateContentVersion(ContentVersionVO contentVersionVO)
                          throws ConstraintException,
                                 SystemException
this method goes through all inline stuff and all relations if ordinary content and all components and bindings if a metainfo.

Parameters:
contentVersionVO -
Throws:
SystemException
java.lang.Exception
ConstraintException

updateContentVersion

public void updateContentVersion(ContentVersion contentVersion,
                                 org.exolab.castor.jdo.Database db)
                          throws ConstraintException,
                                 SystemException,
                                 java.lang.Exception
this method goes through all inline stuff and all relations if ordinary content and all components and bindings if a metainfo.

Throws:
SystemException
java.lang.Exception
ConstraintException

updateSiteNodeVersion

public void updateSiteNodeVersion(SiteNodeVersionVO siteNodeVersionVO)
                           throws ConstraintException,
                                  SystemException
this method goes through all page bindings and makes registry entries for them

Throws:
SystemException
java.lang.Exception
ConstraintException

updateSiteNodeVersion

public void updateSiteNodeVersion(SiteNodeVersion siteNodeVersion,
                                  org.exolab.castor.jdo.Database db)
                           throws ConstraintException,
                                  SystemException,
                                  java.lang.Exception
this method goes through all page bindings and makes registry entries for them

Parameters:
siteNodeVersion -
Throws:
SystemException
java.lang.Exception
ConstraintException

getInlineSiteNodes

public void getInlineSiteNodes(ContentVersion contentVersion,
                               java.lang.String versionValue,
                               org.exolab.castor.jdo.Database db)
                        throws ConstraintException,
                               SystemException,
                               java.lang.Exception
This method fetches all inline links from any text.

ConstraintException
SystemException
java.lang.Exception

getInlineContents

public void getInlineContents(ContentVersion contentVersion,
                              java.lang.String versionValue,
                              org.exolab.castor.jdo.Database db)
                       throws ConstraintException,
                              SystemException,
                              java.lang.Exception
This method fetches all inline links from any text.

ConstraintException
SystemException
java.lang.Exception

getRelationSiteNodes

public void getRelationSiteNodes(ContentVersion contentVersion,
                                 java.lang.String versionValue,
                                 org.exolab.castor.jdo.Database db)
                          throws ConstraintException,
                                 SystemException,
                                 java.lang.Exception
This method fetches all inline links from any text.

ConstraintException
SystemException
java.lang.Exception

getRelationContents

public void getRelationContents(ContentVersion contentVersion,
                                java.lang.String versionValue,
                                org.exolab.castor.jdo.Database db)
                         throws ConstraintException,
                                SystemException,
                                java.lang.Exception
This method fetches all inline links from any text.

ConstraintException
SystemException
java.lang.Exception

getComponents

public void getComponents(SiteNodeVersion siteNodeVersion,
                          java.lang.String versionValue,
                          org.exolab.castor.jdo.Database db)
                   throws ConstraintException,
                          SystemException,
                          java.lang.Exception
This method fetches all components and adds entries to the registry.

ConstraintException
SystemException
java.lang.Exception

getComponentBindings

public void getComponentBindings(SiteNodeVersion siteNodeVersion,
                                 java.lang.String versionValue,
                                 org.exolab.castor.jdo.Database db)
                          throws ConstraintException,
                                 SystemException,
                                 java.lang.Exception
This method fetches all components and adds entries to the registry.

ConstraintException
SystemException
java.lang.Exception

getNewVO

public BaseEntityVO getNewVO()
Implemented for BaseController

Specified by:
getNewVO in class BaseController

getReferencingObjectsForContent

public java.util.List getReferencingObjectsForContent(java.lang.Integer contentId)
                                               throws SystemException
This method gets all referencing content versions

Parameters:
contentId -
Returns:
SystemException

getReferencingObjectsForSiteNode

public java.util.List getReferencingObjectsForSiteNode(java.lang.Integer siteNodeId)
                                                throws SystemException,
                                                       java.lang.Exception
This method gets all referencing sitenode versions

Parameters:
siteNodeId -
Returns:
SystemException
java.lang.Exception

getMatchingRegistryVOList

public java.util.List getMatchingRegistryVOList(java.lang.String entityName,
                                                java.lang.String entityId,
                                                org.exolab.castor.jdo.Database db)
                                         throws SystemException,
                                                java.lang.Exception
Gets matching references

SystemException
java.lang.Exception

getMatchingRegistryVOListForReferencingEntity

public java.util.List getMatchingRegistryVOListForReferencingEntity(java.lang.String referencingEntityName,
                                                                    java.lang.String referencingEntityId,
                                                                    org.exolab.castor.jdo.Database db)
                                                             throws SystemException,
                                                                    java.lang.Exception
Gets matching references

SystemException
java.lang.Exception

clearRegistryVOList

public java.util.List clearRegistryVOList(java.lang.String referencingEntityName,
                                          java.lang.String referencingEntityId,
                                          org.exolab.castor.jdo.Database db)
                                   throws SystemException,
                                          java.lang.Exception
Gets matching references

SystemException
java.lang.Exception

clearRegistryForReferencedEntity

public void clearRegistryForReferencedEntity(java.lang.String entityName,
                                             java.lang.String entityId)
                                      throws SystemException,
                                             java.lang.Exception
Clears all references to a entity

SystemException
java.lang.Exception

getSiteNodeVersionsWhichUsesContentVersionAsMetaInfo

public java.util.List getSiteNodeVersionsWhichUsesContentVersionAsMetaInfo(ContentVersion contentVersion,
                                                                           org.exolab.castor.jdo.Database db)
                                                                    throws SystemException,
                                                                           java.lang.Exception
Gets siteNodeVersions which uses the metainfo

SystemException
java.lang.Exception