© 2003 BEA Systems, Inc.

com.bea.netuix.application.localization.manager.persistence.jdbc
Class LocalizationManagerImpl

java.lang.Object
  |
  +--com.bea.netuix.application.localization.manager.persistence.jdbc.LocalizationManagerImpl
All Implemented Interfaces:
EnterpriseBean, ILocalizationManager, Serializable, SessionBean

public class LocalizationManagerImpl
extends Object
implements SessionBean, ILocalizationManager

See Also:
Serialized Form

Field Summary
protected static Debug debug
           
 
Constructor Summary
LocalizationManagerImpl()
           
 
Method Summary
 LocalizationResource addLocalizationResource(LocalizationResource localizationResource, LocalizationIntersectionId localizationIntersectionId)
          Add a new localization resource (l10n label) to the definition.
 LocalizationLocale createLocalizationLocale(LocalizationLocale localizationLocale)
           
 LocalizationResource createLocalizationResource(LocalizationResource localizationResource)
          Create a new localization resource (l10n label) from the supplied resource.
 void deleteLocalizationLocale(LocalizationLocaleId localizationLocaleId)
          Delete a LocalizationLocale record and all LocalizationResources associated to this locale.
 void deleteLocalizationResource(LocalizationLocaleId localizationLocaleId, LocalizationIntersectionId localizationIntersectionId)
          Delete a single localization definition record (table effected L10N_RESOURCE).
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 LocalizationLocale getLocalizationLocale(Locale locale)
           
 LocalizationLocale getLocalizationLocale(LocalizationLocaleId localizationLocaleId)
           
 LocalizationLocale[] getLocalizationLocales()
          Return an array of all the available locales in the system.
 LocalizationResource getLocalizationResource(CustomizationContext customizationContext, LocalizationIntersectionId localizationIntersectionId)
          A single localization resource given the specified localization intersection id and the customization context.
 LocalizationResource[] getLocalizationResources()
          Retrurn a list of all the localization resources in the system
 LocalizationResource[] getLocalizationResources(LocalizationIntersectionId localizationIntersectionId)
          Retrieve an array of LocalizationResourceView definitions for the specified abstract LocalizationIntersectionId.
 LocalizationResourceView getLocalizationResourceView(CustomizationContext customizationContext, LocalizationIntersectionId localizationIntersectionId)
          Retrieve an array of LocalizationResourceView for the supplied LocalizationIntersectionId.
 Locale[] getMatchingSupportedLocales(Locale[] locales)
          Used to get a minimal set of Locales based on the input array of Locales that matches supported Locales.
 void setSessionContext(SessionContext sessionContext)
           
 void updateLocalizationLocale(LocalizationLocale localizationLocale)
           
 void updateLocalizationResource(LocalizationResource localizationResource)
          Update the localization definition with the new data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected static Debug debug
Constructor Detail

LocalizationManagerImpl

public LocalizationManagerImpl()
Method Detail

ejbCreate

public void ejbCreate()
               throws CreateException,
                      RemoteException
CreateException
RemoteException

ejbActivate

public void ejbActivate()
                 throws EJBException,
                        RemoteException
Specified by:
ejbActivate in interface SessionBean
EJBException
RemoteException

ejbPassivate

public void ejbPassivate()
                  throws EJBException,
                         RemoteException
Specified by:
ejbPassivate in interface SessionBean
EJBException
RemoteException

ejbRemove

public void ejbRemove()
               throws EJBException,
                      RemoteException
Specified by:
ejbRemove in interface SessionBean
EJBException
RemoteException

setSessionContext

public void setSessionContext(SessionContext sessionContext)
                       throws EJBException,
                              RemoteException
Specified by:
setSessionContext in interface SessionBean
EJBException
RemoteException

getLocalizationResourceView

public LocalizationResourceView getLocalizationResourceView(CustomizationContext customizationContext,
                                                            LocalizationIntersectionId localizationIntersectionId)
                                                     throws RemoteException
Description copied from interface: ILocalizationManager
Retrieve an array of LocalizationResourceView for the supplied LocalizationIntersectionId.

Specified by:
getLocalizationResourceView in interface ILocalizationManager
Parameters:
customizationContext - contains an in order list of predered locales.
localizationIntersectionId - a unique identifier for any definition object. Example: PortletDefinitionId, ShellDefinitionId, ...
Returns:
an immutabel LocalizationResourceView object internationalized to the supplied locale. If the prefered locale does not exist we will default to the default, if no localization exist we will return null.
RemoteException

getLocalizationResources

public LocalizationResource[] getLocalizationResources(LocalizationIntersectionId localizationIntersectionId)
                                                throws RemoteException
Description copied from interface: ILocalizationManager
Retrieve an array of LocalizationResourceView definitions for the specified abstract LocalizationIntersectionId.

Specified by:
getLocalizationResources in interface ILocalizationManager
Parameters:
localizationIntersectionId - a unique identifier for any definition object. Example: PortletDefinitionId, ShellDefinitionId, ...
Returns:
an Array of all the different localization definitions (one for each different locale) set for the specified definition id.
RemoteException

getLocalizationResources

public LocalizationResource[] getLocalizationResources()
                                                throws RemoteException
Description copied from interface: ILocalizationManager
Retrurn a list of all the localization resources in the system

Specified by:
getLocalizationResources in interface ILocalizationManager
Throws:
RemoteException

getLocalizationResource

public LocalizationResource getLocalizationResource(CustomizationContext customizationContext,
                                                    LocalizationIntersectionId localizationIntersectionId)
                                             throws RemoteException
Description copied from interface: ILocalizationManager

A single localization resource given the specified localization intersection id and the customization context.

Specified by:
getLocalizationResource in interface ILocalizationManager
Parameters:
customizationContext - contains the prefered locale.
localizationIntersectionId - the unique id of the definition object.
Returns:
a fully populated LocalizationResource object.
RemoteException

createLocalizationResource

public LocalizationResource createLocalizationResource(LocalizationResource localizationResource)
                                                throws RemoteException,
                                                       ObjectNotFoundException,
                                                       MissingDataException
Description copied from interface: ILocalizationManager

Create a new localization resource (l10n label) from the supplied resource.

Specified by:
createLocalizationResource in interface ILocalizationManager
Parameters:
localizationResource - the object containing all the new data for the new localization.
Returns:
a fully populated (with LocalizationIntersectionId and LocalizationLocaleId) LocalizationResource.
Throws:
ObjectNotFoundException - if the localizationIntersectionId is bogus.
MissingDataException - if the supplied localizationResource is missing required fields.
RemoteException

addLocalizationResource

public LocalizationResource addLocalizationResource(LocalizationResource localizationResource,
                                                    LocalizationIntersectionId localizationIntersectionId)
                                             throws RemoteException,
                                                    ObjectNotFoundException,
                                                    MissingDataException
Description copied from interface: ILocalizationManager

Add a new localization resource (l10n label) to the definition.

Specified by:
addLocalizationResource in interface ILocalizationManager
Parameters:
localizationResource - the object containing all the new data for the new localization.
localizationIntersectionId - intersection id from the Defintiion object.
Returns:
a fully populated (with LocalizationIntersectionId and LocalizationLocaleId) LocalizationResource.
Throws:
MissingDataException - if the supplied localizationResource is missing required fields.
ObjectNotFoundException - if the localizationIntersectionId is bogus.
RemoteException

updateLocalizationResource

public void updateLocalizationResource(LocalizationResource localizationResource)
                                throws RemoteException,
                                       ObjectNotFoundException
Description copied from interface: ILocalizationManager

Update the localization definition with the new data.

Specified by:
updateLocalizationResource in interface ILocalizationManager
Parameters:
localizationResource - the localizationdefinition containing the new data
Throws:
ObjectNotFoundException - if the LocalizationIntersectionId in the LocalizationDefnition is bogus.
RemoteException

deleteLocalizationResource

public void deleteLocalizationResource(LocalizationLocaleId localizationLocaleId,
                                       LocalizationIntersectionId localizationIntersectionId)
                                throws RemoteException,
                                       ObjectNotFoundException
Description copied from interface: ILocalizationManager

Delete a single localization definition record (table effected L10N_RESOURCE). Note, this method does not delete any records in the L10N_INTERSECTION table, as this would cause the definition record to be deleted as well.

Specified by:
deleteLocalizationResource in interface ILocalizationManager
Parameters:
localizationLocaleId - the first part of the primary key
localizationIntersectionId - the second part of the primary key of the localization resord to delete.
Throws:
ObjectNotFoundException - if the LocalizationIntersectionId in the LocalizationDefnition is bogus.
RemoteException

getLocalizationLocales

public LocalizationLocale[] getLocalizationLocales()
                                            throws RemoteException
Description copied from interface: ILocalizationManager
Return an array of all the available locales in the system.

Specified by:
getLocalizationLocales in interface ILocalizationManager
Returns:
an array of distinct LocaleDefintoin objects.
RemoteException

getMatchingSupportedLocales

public Locale[] getMatchingSupportedLocales(Locale[] locales)
                                     throws RemoteException
Description copied from interface: ILocalizationManager
Used to get a minimal set of Locales based on the input array of Locales that matches supported Locales.

Specified by:
getMatchingSupportedLocales in interface ILocalizationManager
Parameters:
locales -
Returns:
minimal set of supported Locales based on input Locales
Throws:
RemoteException

getLocalizationLocale

public LocalizationLocale getLocalizationLocale(Locale locale)
                                         throws RemoteException
Specified by:
getLocalizationLocale in interface ILocalizationManager
RemoteException

getLocalizationLocale

public LocalizationLocale getLocalizationLocale(LocalizationLocaleId localizationLocaleId)
                                         throws RemoteException
Specified by:
getLocalizationLocale in interface ILocalizationManager
RemoteException

deleteLocalizationLocale

public void deleteLocalizationLocale(LocalizationLocaleId localizationLocaleId)
                              throws RemoteException,
                                     ObjectNotFoundException
Description copied from interface: ILocalizationManager
Delete a LocalizationLocale record and all LocalizationResources associated to this locale. Table effected (L10N_LOCALE, L10N_RESOURCE)

Specified by:
deleteLocalizationLocale in interface ILocalizationManager
Parameters:
localizationLocaleId -
Throws:
ObjectNotFoundException
RemoteException

updateLocalizationLocale

public void updateLocalizationLocale(LocalizationLocale localizationLocale)
                              throws RemoteException,
                                     ObjectNotFoundException
Specified by:
updateLocalizationLocale in interface ILocalizationManager
RemoteException
ObjectNotFoundException

createLocalizationLocale

public LocalizationLocale createLocalizationLocale(LocalizationLocale localizationLocale)
                                            throws RemoteException,
                                                   MissingDataException
Specified by:
createLocalizationLocale in interface ILocalizationManager
RemoteException
MissingDataException

© 2003 BEA Systems, Inc.

Copyright © 2003 BEA Systems, Inc. All Rights Reserved