© 2003 BEA Systems, Inc.

com.bea.netuix.application.manager.persistence.jdbc
Class LookAndFeelDefinitionManagerImpl

java.lang.Object
  |
  +--com.bea.netuix.application.manager.persistence.jdbc.LookAndFeelDefinitionManagerImpl
All Implemented Interfaces:
EnterpriseBean, ILookAndFeelDefinitionManager, IThemeDefinitionManager, Serializable, SessionBean

public class LookAndFeelDefinitionManagerImpl
extends Object
implements SessionBean, ILookAndFeelDefinitionManager, IThemeDefinitionManager

See Also:
Serialized Form

Field Summary
protected static Debug debug
           
 
Constructor Summary
LookAndFeelDefinitionManagerImpl()
           
 
Method Summary
 LookAndFeelDefinition createLookAndFeelDefinition(CustomizationContext customizationContext, LookAndFeelDefinition lookAndFeelDefinition)
          Creates a new LookAndFeelView Definition.
 ThemeDefinition createThemeDefinition(CustomizationContext customizationContext, ThemeDefinition themeDefinition)
          Creates a new ThemeView Definition with its placeholders.
 void deleteLookAndFeelDefinition(CustomizationContext customizationContext, LookAndFeelDefinitionId lookAndFeelDefinitionId)
          Delete a lookAndFeel definition.
 void deleteLookAndFeelDefinitionWithReplacement(CustomizationContext customizationContext, LookAndFeelDefinitionId deleteLookAndFeelDefinitionId, LookAndFeelDefinitionId replacementLookAndFeelDefinitionId)
          Delete a lookAndFeel definition (and its skins, skeletons and themes) and replace any uses of that lookAndFeel with a replacement lookAndFeel.
 void deleteThemeDefinition(CustomizationContext customizationContext, ThemeDefinitionId themeDefinitionId)
          Delete a theme definition that is not in use.
 void deleteThemeDefinitionWithCascade(CustomizationContext customizationContext, ThemeDefinitionId themeDefinitionId)
          Delete a theme definition and remove anrefernces to it from book, pages or portlets This method is useful for deleting a theme that is in use by book, pages or portlets.
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 LookAndFeelDefinition getLookAndFeelDefinition(CustomizationContext customizationContext, LookAndFeelDefinitionId lookAndFeelDefinitionId)
          Getter for returning a single LookAndFeelDefinition object given a supplied lookAndFeel definition identifier.
 LookAndFeelDefinition getLookAndFeelDefinitionFromFile(CustomizationContext customizationContext, String lookAndFeelFile, String webAppName)
          Getter for returning a single LookAndFeelDefinition object given a supplied lookAndFeel file name.
 LookAndFeelDefinitionId getLookAndFeelDefinitionId(CustomizationContext customizationContext, String markupName, String webAppName)
          Getter for returning a single LookAndFeelDefinitionId object given a supplied lookAndFeel markup name and webapp.
 LookAndFeelDefinition[] getLookAndFeelDefinitions(CustomizationContext customizationContext, String webapp)
          Getter for returning a list of all LookAndFeelDefinitions scoped to the supplied webapp.
 LookAndFeelView getLookAndFeelView(CustomizationContext customizationContext, LookAndFeelDefinitionId lookAndFeelDefinitionId)
          Getter for returning an immutable deep copy of a LookAndFeelView.
 ThemeDefinition getThemeDefinition(CustomizationContext customizationContext, ThemeDefinitionId themeDefinitionId)
          Getter for returning a single ThemeDefinition object given a supplied theme definition identifier.
 ThemeDefinition getThemeDefinitionFromFile(CustomizationContext customizationContext, String themeFile, String webAppName)
          Getter for returning a single ThemeDefinition object given a supplied theme file name.
 ThemeDefinitionId getThemeDefinitionId(CustomizationContext customizationContext, String markupName, String webAppName)
          Getter for returning a single ThemeDefinitionId object given a supplied theme markup name and webapp.
 ThemeDefinition[] getThemeDefinitions(CustomizationContext customizationContext, String webapp)
          Getter for returning a list of all ThemeDefinitions scoped to the supplied webapp.
 ThemeView getThemeView(CustomizationContext customizationContext, ThemeDefinitionId themeDefinitionId)
          Getter for returning an immutable deep copy of a ThemeView.
 void setSessionContext(SessionContext sessionContext)
           
 void updateLookAndFeelDefinition(CustomizationContext customizationContext, LookAndFeelDefinition lookAndFeelDefinition)
          Update the lookAndFeel definition with the new data.
 void updateThemeDefinition(CustomizationContext customizationContext, ThemeDefinition themeDefinition)
          Update the theme 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

LookAndFeelDefinitionManagerImpl

public LookAndFeelDefinitionManagerImpl()
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

getLookAndFeelView

public LookAndFeelView getLookAndFeelView(CustomizationContext customizationContext,
                                          LookAndFeelDefinitionId lookAndFeelDefinitionId)
Description copied from interface: ILookAndFeelDefinitionManager

Getter for returning an immutable deep copy of a LookAndFeelView. The LookAndFeelView object, unlike the LookAndFeelDefinition or the LookAndFeelInstance objects contains a full set of references to all child pages, lookAndFeels and so on. The LookAndFeelView object however is immutable.

Specified by:
getLookAndFeelView in interface ILookAndFeelDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and desktopInstanceId returned.
lookAndFeelDefinitionId - the unique lookAndFeelDefinitionId.
Returns:
an immutable deep copy LookAndFeelView object if one exist, otherwise null.

getLookAndFeelDefinitions

public LookAndFeelDefinition[] getLookAndFeelDefinitions(CustomizationContext customizationContext,
                                                         String webapp)
                                                  throws RemoteException
Description copied from interface: ILookAndFeelDefinitionManager

Getter for returning a list of all LookAndFeelDefinitions scoped to the supplied webapp.

Specified by:
getLookAndFeelDefinitions in interface ILookAndFeelDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and desktopInstanceId returned.
webapp - the web application these lookAndFeel definitions are scoped to.
Returns:
an array of LookAndFeelDefinition objects if they exist, otherwise, an empty array.
RemoteException
See Also:
LookAndFeelDefinition

getLookAndFeelDefinition

public LookAndFeelDefinition getLookAndFeelDefinition(CustomizationContext customizationContext,
                                                      LookAndFeelDefinitionId lookAndFeelDefinitionId)
                                               throws RemoteException
Description copied from interface: ILookAndFeelDefinitionManager

Getter for returning a single LookAndFeelDefinition object given a supplied lookAndFeel definition identifier.

Specified by:
getLookAndFeelDefinition in interface ILookAndFeelDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and desktopInstanceId returned.
lookAndFeelDefinitionId - the unique lookAndFeel definition identifier.
Returns:
a LookAndFeelDefinition object fully populated and internationalized, otherwise, null>/code> if the object does not exist.
RemoteException
See Also:
LookAndFeelDefinition

getLookAndFeelDefinitionFromFile

public LookAndFeelDefinition getLookAndFeelDefinitionFromFile(CustomizationContext customizationContext,
                                                              String lookAndFeelFile,
                                                              String webAppName)
                                                       throws RemoteException
Description copied from interface: ILookAndFeelDefinitionManager

Getter for returning a single LookAndFeelDefinition object given a supplied lookAndFeel file name.

Specified by:
getLookAndFeelDefinitionFromFile in interface ILookAndFeelDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and desktopInstanceId returned.
lookAndFeelFile - the unique lookAndFeel definition identifier.
Returns:
a LookAndFeelDefinition object fully populated and internationalized, otherwise, null>/code> if the object does not exist.
RemoteException
See Also:
LookAndFeelDefinition

createLookAndFeelDefinition

public LookAndFeelDefinition createLookAndFeelDefinition(CustomizationContext customizationContext,
                                                         LookAndFeelDefinition lookAndFeelDefinition)
                                                  throws RemoteException,
                                                         MissingDataException,
                                                         NotEntitledException
Description copied from interface: ILookAndFeelDefinitionManager

Creates a new LookAndFeelView Definition. While look and feels can be created by this method they should be created via a .laf file. The .laf file may be located anywhere in the webap pdirectory and immediately gets picked up by the system.

Specified by:
createLookAndFeelDefinition in interface ILookAndFeelDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and http request.
lookAndFeelDefinition - the lookAndFeel data and associated placeholders
Returns:
a fully populated LookAndFeelDefinition
Throws:
NotEntitledException - the caller is not entitled to create a new lookAndFeel.
MissingDataException - the lookAndFeelDefiniiton supplied as an argument is missing some vital data.
RemoteException

updateLookAndFeelDefinition

public void updateLookAndFeelDefinition(CustomizationContext customizationContext,
                                        LookAndFeelDefinition lookAndFeelDefinition)
                                 throws RemoteException,
                                        ObjectNotFoundException,
                                        NotEntitledException,
                                        MissingDataException
Description copied from interface: ILookAndFeelDefinitionManager

Update the lookAndFeel definition with the new data.

Specified by:
updateLookAndFeelDefinition in interface ILookAndFeelDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and desktopInstanceId returned.
lookAndFeelDefinition - the lookAndFeeldefinition containing the new data
Throws:
MissingDataException - if the LookAndFeelDefinition or any of the ThemeDefinitions are missing non nullable data.
ObjectNotFoundException - if the LocalizationIntersectionId in the LocalizationDefnition is bogus.
RemoteException
NotEntitledException

deleteLookAndFeelDefinition

public void deleteLookAndFeelDefinition(CustomizationContext customizationContext,
                                        LookAndFeelDefinitionId lookAndFeelDefinitionId)
                                 throws RemoteException,
                                        ObjectNotFoundException,
                                        ObjectInUseException,
                                        NotEntitledException
Description copied from interface: ILookAndFeelDefinitionManager

Delete a lookAndFeel definition. Note if the .laf file still exist the look and feel will get recreated. This method is for deleting a look and feel after the .laf file has been deleted.

Specified by:
deleteLookAndFeelDefinition in interface ILookAndFeelDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and desktopInstanceId returned.
lookAndFeelDefinitionId - the id of the lookAndFeel definition to delete.
Throws:
ObjectInUseException - if page instances are currently using this lookAndFeel
NotEntitledException - the caller is not entitled to perform this operation.
ObjectNotFoundException - if the lookAndFeelDefinitionId is bogus
RemoteException
See Also:
ILookAndFeelDefinitionManager.deleteLookAndFeelDefinitionWithReplacement(com.bea.netuix.application.manager.CustomizationContext, com.bea.netuix.application.identifier.LookAndFeelDefinitionId, com.bea.netuix.application.identifier.LookAndFeelDefinitionId)

deleteLookAndFeelDefinitionWithReplacement

public void deleteLookAndFeelDefinitionWithReplacement(CustomizationContext customizationContext,
                                                       LookAndFeelDefinitionId deleteLookAndFeelDefinitionId,
                                                       LookAndFeelDefinitionId replacementLookAndFeelDefinitionId)
                                                throws RemoteException,
                                                       ObjectNotFoundException,
                                                       NotEntitledException
Description copied from interface: ILookAndFeelDefinitionManager

Delete a lookAndFeel definition (and its skins, skeletons and themes) and replace any uses of that lookAndFeel with a replacement lookAndFeel. This method is useful for deleting a lookAndFeel that is in use by desktop instances and not having to delete those dektopinstances instances. Note if the .laf file still exist the look and feel will get recreated. This method is for deleting a look and feel after the .laf file has been deleted.

Specified by:
deleteLookAndFeelDefinitionWithReplacement in interface ILookAndFeelDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and request.
deleteLookAndFeelDefinitionId - the id of the lookAndFeel definition to delete.
replacementLookAndFeelDefinitionId - the id of the replacement lookAndFeel
Throws:
NotEntitledException - the caller is not entitled to perform this operation.
ObjectNotFoundException - if either of the lookAndFeelDefinitionIds are bogus
RemoteException
See Also:
ILookAndFeelDefinitionManager.deleteLookAndFeelDefinition(com.bea.netuix.application.manager.CustomizationContext, com.bea.netuix.application.identifier.LookAndFeelDefinitionId)

getLookAndFeelDefinitionId

public LookAndFeelDefinitionId getLookAndFeelDefinitionId(CustomizationContext customizationContext,
                                                          String markupName,
                                                          String webAppName)
                                                   throws RemoteException
Description copied from interface: ILookAndFeelDefinitionManager

Getter for returning a single LookAndFeelDefinitionId object given a supplied lookAndFeel markup name and webapp.

Specified by:
getLookAndFeelDefinitionId in interface ILookAndFeelDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and desktopInstanceId returned.
markupName - the markup name attribute supplied on the tag in the .laf file
webAppName - as defined in the config.xml
Returns:
LookAndFeelDefinitionId the unique lookAndFeel definition identifier or null is non existent.
RemoteException

getThemeView

public ThemeView getThemeView(CustomizationContext customizationContext,
                              ThemeDefinitionId themeDefinitionId)
                       throws RemoteException
Description copied from interface: IThemeDefinitionManager

Getter for returning an immutable deep copy of a ThemeView. The ThemeView object, unlike the ThemeDefinition or the ThemeInstance objects contains a full set of references to all child pages, themes and so on. The ThemeView object however is immutable.

Specified by:
getThemeView in interface IThemeDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and desktopInstanceId returned.
themeDefinitionId - the unique themeDefinitionId.
Returns:
an immutable deep copy ThemeView object if one exist, otherwise null.
RemoteException

getThemeDefinitions

public ThemeDefinition[] getThemeDefinitions(CustomizationContext customizationContext,
                                             String webapp)
                                      throws RemoteException
Description copied from interface: IThemeDefinitionManager

Getter for returning a list of all ThemeDefinitions scoped to the supplied webapp.

Specified by:
getThemeDefinitions in interface IThemeDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and http request.
webapp - the web application these theme definitions are scoped to.
Returns:
an array of ThemeDefinition objects if they exist, otherwise, an empty array.
RemoteException
See Also:
ThemeDefinition

getThemeDefinition

public ThemeDefinition getThemeDefinition(CustomizationContext customizationContext,
                                          ThemeDefinitionId themeDefinitionId)
                                   throws RemoteException
Description copied from interface: IThemeDefinitionManager

Getter for returning a single ThemeDefinition object given a supplied theme definition identifier.

Specified by:
getThemeDefinition in interface IThemeDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and http request.
themeDefinitionId - the unique theme definition identifier.
Returns:
a ThemeDefinition object fully populated and internationalized, otherwise, null>/code> if the object does not exist.
RemoteException
See Also:
ThemeDefinition

getThemeDefinitionFromFile

public ThemeDefinition getThemeDefinitionFromFile(CustomizationContext customizationContext,
                                                  String themeFile,
                                                  String webAppName)
                                           throws RemoteException
Description copied from interface: IThemeDefinitionManager

Getter for returning a single ThemeDefinition object given a supplied theme file name.

Specified by:
getThemeDefinitionFromFile in interface IThemeDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and http request.
themeFile - the unique theme definition identifier.
Returns:
a ThemeDefinition object fully populated and internationalized, otherwise, null>/code> if the object does not exist.
RemoteException
See Also:
ThemeDefinition

createThemeDefinition

public ThemeDefinition createThemeDefinition(CustomizationContext customizationContext,
                                             ThemeDefinition themeDefinition)
                                      throws RemoteException,
                                             MissingDataException,
                                             NotEntitledException
Description copied from interface: IThemeDefinitionManager

Creates a new ThemeView Definition with its placeholders. Note, while themes can be created via this method they should be created via a .theme file located anywhere in the webapp directory. Once the file is created it will be immediately be picked up by the system.

Specified by:
createThemeDefinition in interface IThemeDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and http request.
themeDefinition - the theme data and associated placeholders
Returns:
a fully populated ThemeDefinition
Throws:
NotEntitledException - the caller is not entitled to create a new theme.
MissingDataException - the themeDefiniiton supplied as an argument is missing some vital data.
RemoteException

updateThemeDefinition

public void updateThemeDefinition(CustomizationContext customizationContext,
                                  ThemeDefinition themeDefinition)
                           throws RemoteException,
                                  ObjectNotFoundException,
                                  NotEntitledException
Description copied from interface: IThemeDefinitionManager

Update the theme definition with the new data.

Specified by:
updateThemeDefinition in interface IThemeDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and http request.
themeDefinition - the themedefinition containing the new data
Throws:
ObjectNotFoundException - if the LocalizationIntersectionId in the LocalizationDefnition is bogus.
RemoteException
NotEntitledException

deleteThemeDefinition

public void deleteThemeDefinition(CustomizationContext customizationContext,
                                  ThemeDefinitionId themeDefinitionId)
                           throws RemoteException,
                                  ObjectNotFoundException,
                                  ObjectInUseException,
                                  NotEntitledException
Description copied from interface: IThemeDefinitionManager

Delete a theme definition that is not in use.

Specified by:
deleteThemeDefinition in interface IThemeDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and http request
themeDefinitionId - the id of the theme definition to delete.
Throws:
ObjectNotFoundException - if the themeDefinitionId is bogus
ObjectInUseException - if pages,book or portlet instances are currently using this theme.
NotEntitledException - the caller is not entitled to perform this operation.
RemoteException
See Also:
IThemeDefinitionManager.deleteThemeDefinitionWithCascade(com.bea.netuix.application.manager.CustomizationContext, com.bea.netuix.application.identifier.ThemeDefinitionId)

deleteThemeDefinitionWithCascade

public void deleteThemeDefinitionWithCascade(CustomizationContext customizationContext,
                                             ThemeDefinitionId themeDefinitionId)
                                      throws RemoteException,
                                             ObjectNotFoundException,
                                             NotEntitledException
Description copied from interface: IThemeDefinitionManager

Delete a theme definition and remove anrefernces to it from book, pages or portlets This method is useful for deleting a theme that is in use by book, pages or portlets.

Specified by:
deleteThemeDefinitionWithCascade in interface IThemeDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and http request.
themeDefinitionId - the id of the theme definition to delete.
Throws:
NotEntitledException - the caller is not entitled to perform this operation.
ObjectNotFoundException - if either of the themeDefinitionIds are bogus
RemoteException
See Also:
IThemeDefinitionManager.deleteThemeDefinition(com.bea.netuix.application.manager.CustomizationContext, com.bea.netuix.application.identifier.ThemeDefinitionId)

getThemeDefinitionId

public ThemeDefinitionId getThemeDefinitionId(CustomizationContext customizationContext,
                                              String markupName,
                                              String webAppName)
                                       throws RemoteException
Description copied from interface: IThemeDefinitionManager

Getter for returning a single ThemeDefinitionId object given a supplied theme markup name and webapp.

Specified by:
getThemeDefinitionId in interface IThemeDefinitionManager
Parameters:
customizationContext - customization information such as prefered locales and http request.
markupName - the markup name attribute supplied on the tag in the .laf file
webAppName - as defined in the config.xml
Returns:
ThemeDefinitionId the unique theme definition identifier or null is non existent.
RemoteException

© 2003 BEA Systems, Inc.

Copyright © 2003 BEA Systems, Inc. All Rights Reserved