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

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

public class LanguageController
extends BaseController

This class handles all interaction with Languages and persistence of them.

Author:
mattias

Constructor Summary
LanguageController()
           
 
Method Summary
 LanguageVO create(org.exolab.castor.jdo.Database db, LanguageVO languageVO)
           
 LanguageVO create(LanguageVO languageVO)
           
 void delete(org.exolab.castor.jdo.Database db, LanguageVO languageVO)
          This method removes a Language from the system and also cleans out all depending repositoryLanguages.
 void delete(LanguageVO languageVO)
          This method removes a Language from the system and also cleans out all depending repositoryLanguages.
 void deleteLanguage(java.lang.Integer languageId, org.exolab.castor.jdo.Database db)
          This method deletes the Repository sent in from the system.
static LanguageController getController()
          Factory method
 java.util.List getLanguageList(java.lang.Integer repositoryId, org.exolab.castor.jdo.Database db)
           
 Language getLanguageWithCode(java.lang.String code, org.exolab.castor.jdo.Database db)
          Returns the Language with the given languageCode fetched within a given transaction.
 Language getLanguageWithId(java.lang.Integer languageId)
           
 Language getLanguageWithId(java.lang.Integer languageId, org.exolab.castor.jdo.Database db)
           
 Language getLanguageWithName(java.lang.String name, org.exolab.castor.jdo.Database db)
          Returns the Language with the given name fetched within a given transaction.
 Language getLanguageWithRepositoryLanguageId(java.lang.Integer repositoryLanguageId, org.exolab.castor.jdo.Database db)
           
 java.util.List getLanguageVOList()
           
 java.util.List getLanguageVOList(java.lang.Integer repositoryId)
           
 LanguageVO getLanguageVOWithCode(java.lang.String code)
          Returns the LanguageVO with the given languageCode.
 LanguageVO getLanguageVOWithId(java.lang.Integer languageId)
          This method returns a specific LanguageVO object
 LanguageVO getLanguageVOWithName(java.lang.String name)
          Returns the LanguageVO with the given name.
 LanguageVO getLanguageVOWithRepositoryLanguageId(java.lang.Integer repositoryLanguageId)
           
 java.util.Locale getLocaleWithId(java.lang.Integer languageId)
          This method returns language with the languageCode sent in.
 Language getMasterLanguage(org.exolab.castor.jdo.Database db, java.lang.Integer repositoryId)
          This method returns the master language within an transaction.
 LanguageVO getMasterLanguage(java.lang.Integer repositoryId)
          This method returns the master language.
 BaseEntityVO getNewVO()
          This is a method that gives the user back an newly initialized ValueObject for this entity that the controller is handling.
 LanguageVO update(LanguageVO languageVO)
           
 
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
 

Constructor Detail

LanguageController

public LanguageController()
Method Detail

getController

public static LanguageController getController()
Factory method


getLanguageVOWithId

public LanguageVO getLanguageVOWithId(java.lang.Integer languageId)
                               throws SystemException,
                                      Bug
This method returns a specific LanguageVO object

SystemException
Bug

getLocaleWithId

public java.util.Locale getLocaleWithId(java.lang.Integer languageId)
This method returns language with the languageCode sent in.


getLanguageVOWithName

public LanguageVO getLanguageVOWithName(java.lang.String name)
                                 throws SystemException,
                                        Bug
Returns the LanguageVO with the given name.

Parameters:
name -
Returns:
Throws:
SystemException
Bug

getLanguageWithName

public Language getLanguageWithName(java.lang.String name,
                                    org.exolab.castor.jdo.Database db)
                             throws SystemException,
                                    Bug
Returns the Language with the given name fetched within a given transaction.

Parameters:
name -
db -
Returns:
Throws:
SystemException
Bug

getLanguageVOWithCode

public LanguageVO getLanguageVOWithCode(java.lang.String code)
                                 throws SystemException,
                                        Bug
Returns the LanguageVO with the given languageCode.

Parameters:
code -
Returns:
Throws:
SystemException
Bug

getLanguageWithCode

public Language getLanguageWithCode(java.lang.String code,
                                    org.exolab.castor.jdo.Database db)
                             throws SystemException,
                                    Bug
Returns the Language with the given languageCode fetched within a given transaction.

Parameters:
code -
db -
Returns:
Throws:
SystemException
Bug

create

public LanguageVO create(LanguageVO languageVO)
                  throws ConstraintException,
                         SystemException
ConstraintException
SystemException

create

public LanguageVO create(org.exolab.castor.jdo.Database db,
                         LanguageVO languageVO)
                  throws ConstraintException,
                         SystemException,
                         java.lang.Exception
ConstraintException
SystemException
java.lang.Exception

delete

public void delete(LanguageVO languageVO)
            throws ConstraintException,
                   SystemException
This method removes a Language from the system and also cleans out all depending repositoryLanguages.

ConstraintException
SystemException

delete

public void delete(org.exolab.castor.jdo.Database db,
                   LanguageVO languageVO)
            throws ConstraintException,
                   SystemException
This method removes a Language from the system and also cleans out all depending repositoryLanguages.

ConstraintException
SystemException

getLanguageWithId

public Language getLanguageWithId(java.lang.Integer languageId,
                                  org.exolab.castor.jdo.Database db)
                           throws SystemException,
                                  Bug
SystemException
Bug

getLanguageWithId

public Language getLanguageWithId(java.lang.Integer languageId)
                           throws ConstraintException,
                                  SystemException,
                                  Bug
ConstraintException
SystemException
Bug

getLanguageVOWithRepositoryLanguageId

public LanguageVO getLanguageVOWithRepositoryLanguageId(java.lang.Integer repositoryLanguageId)
                                                 throws ConstraintException,
                                                        SystemException,
                                                        Bug
ConstraintException
SystemException
Bug

getLanguageWithRepositoryLanguageId

public Language getLanguageWithRepositoryLanguageId(java.lang.Integer repositoryLanguageId,
                                                    org.exolab.castor.jdo.Database db)
                                             throws ConstraintException,
                                                    SystemException,
                                                    Bug
ConstraintException
SystemException
Bug

getLanguageVOList

public java.util.List getLanguageVOList(java.lang.Integer repositoryId)
                                 throws ConstraintException,
                                        SystemException
ConstraintException
SystemException

getLanguageList

public java.util.List getLanguageList(java.lang.Integer repositoryId,
                                      org.exolab.castor.jdo.Database db)
                               throws ConstraintException,
                                      SystemException
ConstraintException
SystemException

getLanguageVOList

public java.util.List getLanguageVOList()
                                 throws SystemException,
                                        Bug
SystemException
Bug

getMasterLanguage

public LanguageVO getMasterLanguage(java.lang.Integer repositoryId)
                             throws SystemException,
                                    java.lang.Exception
This method returns the master language. todo - add attribute on repositoryLanguage to be able to sort them... and then fetch the first

SystemException
java.lang.Exception

getMasterLanguage

public Language getMasterLanguage(org.exolab.castor.jdo.Database db,
                                  java.lang.Integer repositoryId)
                           throws SystemException,
                                  java.lang.Exception
This method returns the master language within an transaction.

SystemException
java.lang.Exception

deleteLanguage

public void deleteLanguage(java.lang.Integer languageId,
                           org.exolab.castor.jdo.Database db)
                    throws SystemException,
                           Bug
This method deletes the Repository sent in from the system.

SystemException
Bug

update

public LanguageVO update(LanguageVO languageVO)
                  throws ConstraintException,
                         SystemException
ConstraintException
SystemException

getNewVO

public BaseEntityVO getNewVO()
This is a method that gives the user back an newly initialized ValueObject for this entity that the controller is handling.

Specified by:
getNewVO in class BaseController