nl.gx.webmanager.wcb.elementtype.impl
Class ElementComponentDefinitionImpl

java.lang.Object
  extended by nl.gx.webmanager.wcb.foundation.ComponentDefinitionImpl
      extended by nl.gx.webmanager.wcb.foundation.MenuItemComponentDefinitionImpl
          extended by nl.gx.webmanager.wcb.elementtype.impl.ElementComponentDefinitionImpl
All Implemented Interfaces:
ComponentDefinition, ElementComponentDefinition, MenuItemComponentDefinition

public class ElementComponentDefinitionImpl
extends MenuItemComponentDefinitionImpl
implements ElementComponentDefinition

This class implements additional properties for panels to the default componentdefinition.

Author:
bramk

Field Summary
 
Fields inherited from class nl.gx.webmanager.wcb.foundation.ComponentDefinitionImpl
LOG
 
Constructor Summary
ElementComponentDefinitionImpl(boolean isLicensed)
          Constructor.
ElementComponentDefinitionImpl(boolean isLicensed, java.lang.Class elementClass)
          Creates a new ElementComponentDefinitionImpl instance.
 
Method Summary
 char getAccessKey()
          Returns the shortcut key for in the WebManager element menu that can be used to add an element to an element holder like a page.
 java.util.HashMap<java.lang.Class<? extends Element>,Permission[]> getCreatePermissions()
          Returns the permissions that grant the user the authorization to create an instance of the element contained by this element component.
 java.util.HashMap<java.lang.Class<? extends Element>,Permission[]> getDeletePermissions()
          Returns the permissions that grant the user the authorization to delete an instance of the element contained by this element component.
 java.lang.String getLargeIcon()
          Returns the location of the icon for in the WebManager toolbar that can be used to add an element to an element holder like a page.
 Permission[] getMenuItemPermissions()
          Returns the permission that grant the right for showing the menu item
 java.lang.String getPresentationScope()
          Returns the presentation scope for the element, is directly mapped on the scope of a presentation object.
 java.lang.String getSmallIcon()
          Returns the icon for in the WebManager element menu that depicts the type of element.
 java.lang.String getStaticBackendDir()
           
 java.lang.String getTargetMenu()
          Returns the identifying value of the WebManager menu to which the panel should be added.
 void setAccessKey(char acceskey)
           
 void setCreatePermissions(java.lang.Class<? extends Element> elementClass, Permission[] permissions)
          Sets the permissions that grant the user the authorization to create an instance of the element contained by this element component.
 void setDeletePermissions(java.lang.Class<? extends Element> elementClass, Permission[] permissions)
          Sets the permissions that grant the user the authorization to delete an instance of the element contained by this element component.
 void setLargeIcon(java.lang.String largeIcon)
           
 void setPresentationScope(java.lang.String presentationScope)
           
 void setSmallIcon(java.lang.String smallIcon)
           
 void setTargetMenu(java.lang.String targetMenu)
          basic setter
 
Methods inherited from class nl.gx.webmanager.wcb.foundation.MenuItemComponentDefinitionImpl
getMenuTextMessageKey, getTargetMenuLocationAfter, getTargetMenuLocationBefore, setMenuTextMessageKey, setTargetMenuLocationAfter, setTargetMenuLocationBefore
 
Methods inherited from class nl.gx.webmanager.wcb.foundation.ComponentDefinitionImpl
getComponentBundleDefinition, getControllerClassName, getDependencies, getDescription, getDisplayLanguage, getEntityClassNames, getEntityFactoryClassName, getExtensions, getId, getImplementationClassName, getInstanceClassName, getInterfaceClassNames, getLanguageResourceMessage, getLanguageResourceMessages, getLanguageResources, getName, getNameSpace, getNodeType, getPermissionCategory, getPermissionsForPermissionGroups, getPersistenceManagerClassName, getProperties, getTypeId, getWrapperClassNames, isLicensed, setComponentBundleDefinition, setControllerClassName, setDependencies, setDescription, setEntityClassNames, setEntityFactoryClassName, setExtensions, setId, setImplementationClassName, setInstanceClassName, setInterfaceClassNames, setLanguageResources, setName, setNameSpace, setNodeType, setPermissionCategory, setPermissionsForPermissionGroup, setPersistenceManagerClassName, setProperties, setTypeId, setWrapperClassNames
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nl.gx.webmanager.wcb.elementtype.ElementComponentDefinition
getDescription, getName
 
Methods inherited from interface nl.gx.webmanager.wcb.MenuItemComponentDefinition
getMenuTextMessageKey, getTargetMenuLocationAfter, getTargetMenuLocationBefore
 
Methods inherited from interface nl.gx.webmanager.wcb.ComponentDefinition
getComponentBundleDefinition, getControllerClassName, getDependencies, getDisplayLanguage, getEntityClassNames, getEntityFactoryClassName, getExtensions, getId, getImplementationClassName, getInstanceClassName, getInterfaceClassNames, getLanguageResourceMessage, getLanguageResourceMessages, getLanguageResources, getNameSpace, getNodeType, getPermissionCategory, getPermissionsForPermissionGroups, getPersistenceManagerClassName, getProperties, getTypeId, getWrapperClassNames, isLicensed, setComponentBundleDefinition, setExtensions
 

Constructor Detail

ElementComponentDefinitionImpl

public ElementComponentDefinitionImpl(boolean isLicensed)
Constructor.

Parameters:
isLicensed -

ElementComponentDefinitionImpl

public ElementComponentDefinitionImpl(boolean isLicensed,
                                      java.lang.Class elementClass)
Creates a new ElementComponentDefinitionImpl instance.

Parameters:
isLicensed - Indicates whether the ElementComponent requires a license.
Method Detail

getAccessKey

public char getAccessKey()
Description copied from interface: ElementComponentDefinition
Returns the shortcut key for in the WebManager element menu that can be used to add an element to an element holder like a page.

Specified by:
getAccessKey in interface ElementComponentDefinition
Returns:
The shortcut key

setAccessKey

public void setAccessKey(char acceskey)
Parameters:
acceskey -

getLargeIcon

public java.lang.String getLargeIcon()
Description copied from interface: ElementComponentDefinition
Returns the location of the icon for in the WebManager toolbar that can be used to add an element to an element holder like a page. The icon should consist of a gif image in the format 100 x 25 px.

Specified by:
getLargeIcon in interface ElementComponentDefinition
Returns:
The location of the icon for in the WebManager toolbar

setLargeIcon

public void setLargeIcon(java.lang.String largeIcon)
Parameters:
largeIcon -

getTargetMenu

public java.lang.String getTargetMenu()
Description copied from interface: MenuItemComponentDefinition
Returns the identifying value of the WebManager menu to which the panel should be added.

Specified by:
getTargetMenu in interface MenuItemComponentDefinition
Overrides:
getTargetMenu in class MenuItemComponentDefinitionImpl
Returns:
the identifying value of the WebManager menu to which the panel should be added

setTargetMenu

public void setTargetMenu(java.lang.String targetMenu)
basic setter

Overrides:
setTargetMenu in class MenuItemComponentDefinitionImpl
Parameters:
targetMenu -

getPresentationScope

public java.lang.String getPresentationScope()
Description copied from interface: ElementComponentDefinition
Returns the presentation scope for the element, is directly mapped on the scope of a presentation object.

Specified by:
getPresentationScope in interface ElementComponentDefinition
Returns:
The presentation scope for the element

setPresentationScope

public void setPresentationScope(java.lang.String presentationScope)
Parameters:
scope -

getStaticBackendDir

public java.lang.String getStaticBackendDir()

getSmallIcon

public java.lang.String getSmallIcon()
Description copied from interface: ElementComponentDefinition
Returns the icon for in the WebManager element menu that depicts the type of element.

Specified by:
getSmallIcon in interface ElementComponentDefinition
Returns:
The icon for in the WebManager element menu that depicts the type of element

setSmallIcon

public void setSmallIcon(java.lang.String smallIcon)
Parameters:
smallIcon -

getMenuItemPermissions

public Permission[] getMenuItemPermissions()
Returns the permission that grant the right for showing the menu item

Specified by:
getMenuItemPermissions in interface MenuItemComponentDefinition
Returns:
Array of permissions, each of one granting the right to show the menu item for inserting a new element.

getCreatePermissions

public java.util.HashMap<java.lang.Class<? extends Element>,Permission[]> getCreatePermissions()
Returns the permissions that grant the user the authorization to create an instance of the element contained by this element component. The user has to be assigned to one of the permissions only to be granted that authorization.

Specified by:
getCreatePermissions in interface ElementComponentDefinition
Returns:
All permissions that grant the user the authorization to create an instance of any of the element classes for which permissions were registered

setCreatePermissions

public void setCreatePermissions(java.lang.Class<? extends Element> elementClass,
                                 Permission[] permissions)
Sets the permissions that grant the user the authorization to create an instance of the element contained by this element component. The user has to be assigned to one of the permissions only to be granted that authorization. If input argument is null, create permission is granted to all users

Specified by:
setCreatePermissions in interface ElementComponentDefinition
Parameters:
elementClass - Element class to set the permissions for. The permissions will be applicable for any instances of the given class.
permissions - All permissions that grant the user the authorization to create an instance of the element contained by this element component

getDeletePermissions

public java.util.HashMap<java.lang.Class<? extends Element>,Permission[]> getDeletePermissions()
Returns the permissions that grant the user the authorization to delete an instance of the element contained by this element component. The user has to be assigned to one of the permissions only to be granted that authorization.

Specified by:
getDeletePermissions in interface ElementComponentDefinition
Returns:
All permissions that grant the user the authorization to delete an instance of any of the element classes for which permissions were registered

setDeletePermissions

public void setDeletePermissions(java.lang.Class<? extends Element> elementClass,
                                 Permission[] permissions)
Sets the permissions that grant the user the authorization to delete an instance of the element contained by this element component. The user has to be assigned to one of the permissions only to be granted that authorization. If input argument is null, delete permission is granted to all users

Specified by:
setDeletePermissions in interface ElementComponentDefinition
Parameters:
elementClass - Element class to set the permissions for. The permissions will be applicable for any instances of the given class.
permissions - All permissions that grant the user the authorization to delete an instance of the element contained by this element component


Copyright © 2007-2011 GX Software BV. All Rights Reserved.