Package org.openbravo.client.kernel
Class Template
- java.lang.Object
-
- org.openbravo.base.structure.BaseOBObject
-
- org.openbravo.client.kernel.Template
-
- All Implemented Interfaces:
Serializable
,BaseOBObjectDef
,OBNotSingleton
,OBProvidable
,ActiveEnabled
,ClientEnabled
,DynamicEnabled
,Identifiable
,OrganizationEnabled
,Traceable
public class Template extends BaseOBObject implements Traceable, ClientEnabled, OrganizationEnabled, ActiveEnabled
Entity class for entity OBCLKER_Template (stored in table OBCLKER_Template).
Help: A template is used for generating Openbravo user interface widgets which are displayed on the client. Typically a template is called when a request for a user interface component is received. A user interface component can be the complete page, a menu or a drop down for example. The template is called and uses information from the database (for example the available menu items) to generate the user interface component (often javascript).
NOTE: This class should not be instantiated directly. To instantiate this class theOBProvider
should be used.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ENTITY_NAME
static String
PROPERTY_ACTIVE
Property active stored in column Isactive in table OBCLKER_Templatestatic String
PROPERTY_CLIENT
Property client stored in column AD_Client_ID in table OBCLKER_Templatestatic String
PROPERTY_COMPONENTTYPE
Property componentType stored in column Component_Type in table OBCLKER_Template
Help: A type of component for which the template operates.static String
PROPERTY_CREATEDBY
Property createdBy stored in column Createdby in table OBCLKER_Templatestatic String
PROPERTY_CREATIONDATE
Property creationDate stored in column Created in table OBCLKER_Templatestatic String
PROPERTY_DESCRIPTION
Property description stored in column Description in table OBCLKER_Template
Help: A description is limited to 255 characters.static String
PROPERTY_ID
Property id stored in column Obclker_Template_ID in table OBCLKER_Template
Help: Defines the template which is used to generate the (javascript) code to render the component.static String
PROPERTY_MODULE
Property module stored in column AD_Module_ID in table OBCLKER_Template
Help: Indicates the module the element forms part of.static String
PROPERTY_NAME
Property name stored in column Name in table OBCLKER_Templatestatic String
PROPERTY_OBCLKERTEMPLATEDEPENDENCYLIST
Property oBCLKERTemplateDependencyList stored in table OBCLKER_Templatestatic String
PROPERTY_ORGANIZATION
Property organization stored in column AD_Org_ID in table OBCLKER_Templatestatic String
PROPERTY_OVERRIDESTEMPLATE
Property overridesTemplate stored in column Overrides_Template_ID in table OBCLKER_Template
Help: Defines that this template overrides the template which is defined in this field. When processing a user interface component request from the browser, the system searches for the template to handle the request. The 'overrides template' field plays an important role in this process. When a template is selected then the system checks if the template is overridden, if this is the case then the overriding template is used. This search step are done multi-level (so if the overriding template is again overridden then the deepest/last overriding template is used).static String
PROPERTY_TEMPLATE
Property template stored in column Template in table OBCLKER_Template
Help: The source code of the template. This code gets executed when the template is processed. The language of the source code (freemarker or another) is defined by the template language field. Note that instead of this field it is also possible to use the template class path location field to point to a file containing the source codstatic String
PROPERTY_TEMPLATECLASSPATHLOCATION
Property templateClasspathLocation stored in column TemplateClasspathLocation in table OBCLKER_Template
Help: Defines the location in the classpath of the template file. The template is loaded using the classloader. The path must be an absolute path (so start with a /).static String
PROPERTY_TEMPLATELANGUAGE
Property templateLanguage stored in column Template_Language in table OBCLKER_Template
Help: Defines the template language used to process this template.static String
PROPERTY_UPDATED
Property updated stored in column Updated in table OBCLKER_Templatestatic String
PROPERTY_UPDATEDBY
Property updatedBy stored in column Updatedby in table OBCLKER_Templatestatic String
TABLE_NAME
-
Fields inherited from class org.openbravo.base.structure.BaseOBObject
ID
-
-
Constructor Summary
Constructors Constructor Description Template()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Client
getClient()
Client fieldString
getComponentType()
User
getCreatedBy()
Created by audit userDate
getCreationDate()
Creation date of auditString
getDescription()
String
getEntityName()
String
getId()
Module
getModule()
String
getName()
List<TemplateDependency>
getOBCLKERTemplateDependencyList()
Help: Defines a dependency relation between this template and another template. When processing, templates on which this template depends are loaded first into the template processor.Organization
getOrganization()
Gets organization fieldTemplate
getOverridesTemplate()
String
getTemplate()
String
getTemplateClasspathLocation()
String
getTemplateLanguage()
Date
getUpdated()
Update date of auditUser
getUpdatedBy()
Update by audit userBoolean
isActive()
Gets active fieldvoid
setActive(Boolean active)
Sets active fieldvoid
setClient(Client client)
Client fieldvoid
setComponentType(String componentType)
void
setCreatedBy(User createdBy)
Created by audit uservoid
setCreationDate(Date creationDate)
Creation date of auditvoid
setDescription(String description)
void
setId(String id)
void
setModule(Module module)
void
setName(String name)
void
setOBCLKERTemplateDependencyList(List<TemplateDependency> oBCLKERTemplateDependencyList)
Help: Defines a dependency relation between this template and another template. When processing, templates on which this template depends are loaded first into the template processor.void
setOrganization(Organization organization)
Sets organization fieldvoid
setOverridesTemplate(Template overridesTemplate)
void
setTemplate(String template)
void
setTemplateClasspathLocation(String templateClasspathLocation)
void
setTemplateLanguage(String templateLanguage)
void
setUpdated(Date updated)
Update date of auditvoid
setUpdatedBy(User updatedBy)
Update by audit user-
Methods inherited from class org.openbravo.base.structure.BaseOBObject
checkDerivedReadable, get, get, get, getEntity, getIdentifier, getValue, isAllowRead, isNewOBObject, isOrgClientAccessCheckEnabled, isWriteAccessCheckEnabled, set, setAccessChecks, setAllowRead, setDefaultValue, setId, setNewOBObject, setValue, toString, validate
-
-
-
-
Field Detail
-
TABLE_NAME
public static final String TABLE_NAME
- See Also:
- Constant Field Values
-
ENTITY_NAME
public static final String ENTITY_NAME
- See Also:
- Constant Field Values
-
PROPERTY_ID
public static final String PROPERTY_ID
Property id stored in column Obclker_Template_ID in table OBCLKER_Template
Help: Defines the template which is used to generate the (javascript) code to render the component.- See Also:
- Constant Field Values
-
PROPERTY_CLIENT
public static final String PROPERTY_CLIENT
Property client stored in column AD_Client_ID in table OBCLKER_Template- See Also:
ClientEnabled
, Constant Field Values
-
PROPERTY_ORGANIZATION
public static final String PROPERTY_ORGANIZATION
Property organization stored in column AD_Org_ID in table OBCLKER_Template- See Also:
OrganizationEnabled
, Constant Field Values
-
PROPERTY_MODULE
public static final String PROPERTY_MODULE
Property module stored in column AD_Module_ID in table OBCLKER_Template
Help: Indicates the module the element forms part of.- See Also:
- Constant Field Values
-
PROPERTY_NAME
public static final String PROPERTY_NAME
Property name stored in column Name in table OBCLKER_Template- See Also:
- Constant Field Values
-
PROPERTY_DESCRIPTION
public static final String PROPERTY_DESCRIPTION
Property description stored in column Description in table OBCLKER_Template
Help: A description is limited to 255 characters.- See Also:
- Constant Field Values
-
PROPERTY_OVERRIDESTEMPLATE
public static final String PROPERTY_OVERRIDESTEMPLATE
Property overridesTemplate stored in column Overrides_Template_ID in table OBCLKER_Template
Help: Defines that this template overrides the template which is defined in this field. When processing a user interface component request from the browser, the system searches for the template to handle the request. The 'overrides template' field plays an important role in this process. When a template is selected then the system checks if the template is overridden, if this is the case then the overriding template is used. This search step are done multi-level (so if the overriding template is again overridden then the deepest/last overriding template is used).- See Also:
- Constant Field Values
-
PROPERTY_TEMPLATE
public static final String PROPERTY_TEMPLATE
Property template stored in column Template in table OBCLKER_Template
Help: The source code of the template. This code gets executed when the template is processed. The language of the source code (freemarker or another) is defined by the template language field. Note that instead of this field it is also possible to use the template class path location field to point to a file containing the source cod- See Also:
- Constant Field Values
-
PROPERTY_TEMPLATECLASSPATHLOCATION
public static final String PROPERTY_TEMPLATECLASSPATHLOCATION
Property templateClasspathLocation stored in column TemplateClasspathLocation in table OBCLKER_Template
Help: Defines the location in the classpath of the template file. The template is loaded using the classloader. The path must be an absolute path (so start with a /).- See Also:
- Constant Field Values
-
PROPERTY_TEMPLATELANGUAGE
public static final String PROPERTY_TEMPLATELANGUAGE
Property templateLanguage stored in column Template_Language in table OBCLKER_Template
Help: Defines the template language used to process this template.- See Also:
- Constant Field Values
-
PROPERTY_COMPONENTTYPE
public static final String PROPERTY_COMPONENTTYPE
Property componentType stored in column Component_Type in table OBCLKER_Template
Help: A type of component for which the template operates.- See Also:
- Constant Field Values
-
PROPERTY_ACTIVE
public static final String PROPERTY_ACTIVE
Property active stored in column Isactive in table OBCLKER_Template- See Also:
ActiveEnabled
, Constant Field Values
-
PROPERTY_CREATIONDATE
public static final String PROPERTY_CREATIONDATE
Property creationDate stored in column Created in table OBCLKER_Template- See Also:
Traceable
, Constant Field Values
-
PROPERTY_CREATEDBY
public static final String PROPERTY_CREATEDBY
Property createdBy stored in column Createdby in table OBCLKER_Template- See Also:
Traceable
, Constant Field Values
-
PROPERTY_UPDATED
public static final String PROPERTY_UPDATED
Property updated stored in column Updated in table OBCLKER_Template- See Also:
Traceable
, Constant Field Values
-
PROPERTY_UPDATEDBY
public static final String PROPERTY_UPDATEDBY
Property updatedBy stored in column Updatedby in table OBCLKER_Template- See Also:
Traceable
, Constant Field Values
-
PROPERTY_OBCLKERTEMPLATEDEPENDENCYLIST
public static final String PROPERTY_OBCLKERTEMPLATEDEPENDENCYLIST
Property oBCLKERTemplateDependencyList stored in table OBCLKER_Template- See Also:
- Constant Field Values
-
-
Method Detail
-
getEntityName
public String getEntityName()
- Specified by:
getEntityName
in interfaceIdentifiable
- Specified by:
getEntityName
in classBaseOBObject
-
getId
public String getId()
- Specified by:
getId
in interfaceBaseOBObjectDef
- Specified by:
getId
in interfaceIdentifiable
- Overrides:
getId
in classBaseOBObject
- See Also:
PROPERTY_ID
-
setId
public void setId(String id)
- See Also:
PROPERTY_ID
-
getClient
public Client getClient()
Description copied from interface:ClientEnabled
Client field- Specified by:
getClient
in interfaceClientEnabled
- Returns:
- client
- See Also:
PROPERTY_CLIENT
-
setClient
public void setClient(Client client)
Description copied from interface:ClientEnabled
Client field- Specified by:
setClient
in interfaceClientEnabled
- See Also:
PROPERTY_CLIENT
-
getOrganization
public Organization getOrganization()
Description copied from interface:OrganizationEnabled
Gets organization field- Specified by:
getOrganization
in interfaceOrganizationEnabled
- Returns:
- organization
- See Also:
PROPERTY_ORGANIZATION
-
setOrganization
public void setOrganization(Organization organization)
Description copied from interface:OrganizationEnabled
Sets organization field- Specified by:
setOrganization
in interfaceOrganizationEnabled
- See Also:
PROPERTY_ORGANIZATION
-
getModule
public Module getModule()
- See Also:
PROPERTY_MODULE
-
setModule
public void setModule(Module module)
- See Also:
PROPERTY_MODULE
-
getName
public String getName()
- See Also:
PROPERTY_NAME
-
setName
public void setName(String name)
- See Also:
PROPERTY_NAME
-
getDescription
public String getDescription()
- See Also:
PROPERTY_DESCRIPTION
-
setDescription
public void setDescription(String description)
- See Also:
PROPERTY_DESCRIPTION
-
getOverridesTemplate
public Template getOverridesTemplate()
- See Also:
PROPERTY_OVERRIDESTEMPLATE
-
setOverridesTemplate
public void setOverridesTemplate(Template overridesTemplate)
- See Also:
PROPERTY_OVERRIDESTEMPLATE
-
getTemplate
public String getTemplate()
- See Also:
PROPERTY_TEMPLATE
-
setTemplate
public void setTemplate(String template)
- See Also:
PROPERTY_TEMPLATE
-
getTemplateClasspathLocation
public String getTemplateClasspathLocation()
- See Also:
PROPERTY_TEMPLATECLASSPATHLOCATION
-
setTemplateClasspathLocation
public void setTemplateClasspathLocation(String templateClasspathLocation)
- See Also:
PROPERTY_TEMPLATECLASSPATHLOCATION
-
getTemplateLanguage
public String getTemplateLanguage()
- See Also:
PROPERTY_TEMPLATELANGUAGE
-
setTemplateLanguage
public void setTemplateLanguage(String templateLanguage)
- See Also:
PROPERTY_TEMPLATELANGUAGE
-
getComponentType
public String getComponentType()
- See Also:
PROPERTY_COMPONENTTYPE
-
setComponentType
public void setComponentType(String componentType)
- See Also:
PROPERTY_COMPONENTTYPE
-
isActive
public Boolean isActive()
Description copied from interface:ActiveEnabled
Gets active field- Specified by:
isActive
in interfaceActiveEnabled
- Returns:
- active
- See Also:
PROPERTY_ACTIVE
-
setActive
public void setActive(Boolean active)
Description copied from interface:ActiveEnabled
Sets active field- Specified by:
setActive
in interfaceActiveEnabled
- See Also:
PROPERTY_ACTIVE
-
getCreationDate
public Date getCreationDate()
Description copied from interface:Traceable
Creation date of audit- Specified by:
getCreationDate
in interfaceTraceable
- Returns:
- Date of creation
- See Also:
PROPERTY_CREATIONDATE
-
setCreationDate
public void setCreationDate(Date creationDate)
Description copied from interface:Traceable
Creation date of audit- Specified by:
setCreationDate
in interfaceTraceable
- See Also:
PROPERTY_CREATIONDATE
-
getCreatedBy
public User getCreatedBy()
Description copied from interface:Traceable
Created by audit user- Specified by:
getCreatedBy
in interfaceTraceable
- Returns:
- User
- See Also:
PROPERTY_CREATEDBY
-
setCreatedBy
public void setCreatedBy(User createdBy)
Description copied from interface:Traceable
Created by audit user- Specified by:
setCreatedBy
in interfaceTraceable
- See Also:
PROPERTY_CREATEDBY
-
getUpdated
public Date getUpdated()
Description copied from interface:Traceable
Update date of audit- Specified by:
getUpdated
in interfaceTraceable
- Returns:
- Date of update
- See Also:
PROPERTY_UPDATED
-
setUpdated
public void setUpdated(Date updated)
Description copied from interface:Traceable
Update date of audit- Specified by:
setUpdated
in interfaceTraceable
- See Also:
PROPERTY_UPDATED
-
getUpdatedBy
public User getUpdatedBy()
Description copied from interface:Traceable
Update by audit user- Specified by:
getUpdatedBy
in interfaceTraceable
- Returns:
- User who updated
- See Also:
PROPERTY_UPDATEDBY
-
setUpdatedBy
public void setUpdatedBy(User updatedBy)
Description copied from interface:Traceable
Update by audit user- Specified by:
setUpdatedBy
in interfaceTraceable
- See Also:
PROPERTY_UPDATEDBY
-
getOBCLKERTemplateDependencyList
public List<TemplateDependency> getOBCLKERTemplateDependencyList()
Help: Defines a dependency relation between this template and another template. When processing, templates on which this template depends are loaded first into the template processor.- See Also:
TemplateDependency
-
setOBCLKERTemplateDependencyList
public void setOBCLKERTemplateDependencyList(List<TemplateDependency> oBCLKERTemplateDependencyList)
Help: Defines a dependency relation between this template and another template. When processing, templates on which this template depends are loaded first into the template processor.- See Also:
TemplateDependency
-
-