Package com.logicaldoc.core.metadata

# Class Template

java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.core.metadata.ExtensibleObject
com.logicaldoc.core.metadata.AbstractAttributeSet
com.logicaldoc.core.metadata.Template

All Implemented Interfaces:
  `Extensible`, `Secure<AccessControlEntry>`, `Serializable`

@Entity public class Template extends AbstractAttributeSet implements Secure<AccessControlEntry>
A template collects a set of attributesets ant is itself an extensible object.

Since:
  4.0
Author:
  Marco Meschieri - LogicalDOC
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class com.logicaldoc.core.metadata.AbstractAttributeSet

`TYPE_DEFAULT`

### Fields inherited from class com.logicaldoc.core.PersistentObject

`DELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id`

## Constructor Summary

Constructors
Constructor
Description
`Template()`

## Method Summary

Modifier and Type
Method
Description
`void`
`addAccessControlEntry(AccessControlEntry ace)`
Adds a new entry, replacing a previous one with the same groupId.
`boolean`
`equals(Object obj)`
`Set<AccessControlEntry>`
`getAccessControlEntries(Set<Long> groupIds)`
Retrieves the set of entries related to whatever group within the specified set.
`AccessControlEntry`
`getAccessControlEntry(long groupId)`
`Set<AccessControlEntry>`
`getAccessControlList()`
`String`
`getInitialization()`
`Map<String,Attribute>`
`getTemplateAttributes()`
`String`
`getValidation()`
`int`
`hashCode()`
`void`
`removeAccessControlEntries(long groupId)`
Removes all the ACEs related to the given group.
`void`
`setAccessControlList(Set<AccessControlEntry> accessControlList)`
`void`
`setInitialization(String initialization)`
`void`
`setTemplateAttributes(Map<String,Attribute> templateAttributes)`
`void`
`setValidation(String validation)`

### Methods inherited from class com.logicaldoc.core.metadata.AbstractAttributeSet

`getAttribute, getAttributeAtPosition, getAttributeNames, getAttributeNames, getAttributes, getDescription, getLabel, getName, getTemplate, getTemplateAttribute, getTemplateId, getTemplateName, getType, getValue, getValueAttributes, getValues, isReadonly, removeAttribute, setAttribute, setAttributes, setDescription, setLabel, setName, setReadonly, setTemplate, setTemplateId, setTemplateName, setType, setValue, setValues`

### Methods inherited from class com.logicaldoc.core.PersistentObject

`getCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId, toString`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### Template

public Template()

## Method Details

### getTemplateAttributes

public Map<String,Attribute> getTemplateAttributes()

Specified by:
  `getTemplateAttributes` in class `AbstractAttributeSet`

### setTemplateAttributes

public void setTemplateAttributes(Map<String,Attribute> templateAttributes)

Specified by:
  `setTemplateAttributes` in class `AbstractAttributeSet`

### getValidation

public String getValidation()

### setValidation

public void setValidation(String validation)

### getInitialization

public String getInitialization()

### setInitialization

public void setInitialization(String initialization)

### getAccessControlList

public Set<AccessControlEntry> getAccessControlList()

Specified by:
  `getAccessControlList` in interface `Secure<AccessControlEntry>`

### setAccessControlList

public void setAccessControlList(Set<AccessControlEntry> accessControlList)

Specified by:
  `setAccessControlList` in interface `Secure<AccessControlEntry>`

### getAccessControlEntry

public AccessControlEntry getAccessControlEntry(long groupId)

Specified by:
  `getAccessControlEntry` in interface `Secure<AccessControlEntry>`

### getAccessControlEntries

public Set<AccessControlEntry> getAccessControlEntries(Set<Long> groupIds)
Description copied from interface: `Secure`
Retrieves the set of entries related to whatever group within the specified set.

Specified by:
  `getAccessControlEntries` in interface `Secure<AccessControlEntry>`
Parameters:
  `groupIds` - identifiers of groups
Returns:
  The set of matching entries

### addAccessControlEntry

public void addAccessControlEntry(AccessControlEntry ace)
Description copied from interface: `Secure`
Adds a new entry, replacing a previous one with the same groupId.

Specified by:
  `addAccessControlEntry` in interface `Secure<AccessControlEntry>`
Parameters:
  `ace` - the access control entry to add

### removeAccessControlEntries

public void removeAccessControlEntries(long groupId)
Description copied from interface: `Secure`
Removes all the ACEs related to the given group.

Specified by:
  `removeAccessControlEntries` in interface `Secure<AccessControlEntry>`
Parameters:
  `groupId` - Identifier of the group

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `AbstractAttributeSet`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `AbstractAttributeSet`