Package com.logicaldoc.core.folder

# Class Folder

java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.core.metadata.ExtensibleObject
com.logicaldoc.core.filler.Fillable
com.logicaldoc.core.folder.Folder

All Implemented Interfaces:
  `Extensible`, `Secure<FolderAccessControlEntry>`, `Serializable`, `Comparable<Folder>`

@Entity public class Folder extends Fillable implements Secure<FolderAccessControlEntry>, Comparable<Folder>
This class represents the key concept of security of documents. The Folder is used as an element to build hierarchies. With the AccessControlList you can associate groups to a given folder and grant some permissions. Also setting the recurityRef you can specify another reference folder that contains the security policies.

Folders have a type: 0 for standard folders, 1 for workspaces.

Version:
  6.0
Author:
  Marco Meschieri - LogicalDOC
See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final long`
`DEFAULTWORKSPACEID`
`static final String`
`DEFAULTWORKSPACENAME`
`static final long`
`ROOTID`
`static final int`
`TYPE_ALIAS`
`static final int`
`TYPE_DEFAULT`
`static final int`
`TYPE_WORKSPACE`

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

`DELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id`

## Constructor Summary

Constructors
Constructor
Description
`Folder()`
`Folder(Folder source)`
`Folder(String name)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addAccessControlEntry(FolderAccessControlEntry ace)`
Adds a new entry, replacing a previous one with the same groupId.
`void`
`addQuotaAlertRecipient(String recipient)`
`void`
`addTag(String word)`
`void`
`clearTags()`
`int`
`compareTo(Folder other)`
`boolean`
`equals(Object obj)`
`Set<FolderAccessControlEntry>`
`getAccessControlEntries(Set<Long> groupIds)`
Retrieves the set of entries related to whatever group within the specified set.
`FolderAccessControlEntry`
`getAccessControlEntry(long groupId)`
`Set<FolderAccessControlEntry>`
`getAccessControlList()`
`Map<String,Attribute>`
`getAttributes()`
`Long`
`getBarcodeTemplateId()`
`String`
`getColor()`
`String`
`getCreator()`
`Long`
`getCreatorId()`
`String`
`getDeleteUser()`
`Long`
`getDeleteUserId()`
`String`
`getDescription()`
`Long`
`getFoldRef()`
`String`
`getGrid()`
`Integer`
`getMaxVersions()`
`String`
`getName()`
`Long`
`getOcrTemplateId()`
`long`
`getParentId()`
`String`
`getPath()`
`String`
`getPathExtended()`
`int`
`getPosition()`
`String`
`getQuotaAlertRecipients()`
`List<String>`
`getQuotaAlertRecipientsAsList()`
`Long`
`getQuotaDocs()`
`Long`
`getQuotaSize()`
`Integer`
`getQuotaThreshold()`
`Long`
`getSecurityRef()`
`Integer`
`getStore()`
Gets the default store to use from this folder in the current node
`Map<String,Integer>`
`getStores()`
`Set<Tag>`
`getTags()`
`Set<String>`
`getTagsAsWords()`
`String`
`getTagsString()`
`Template`
`getTemplate()`
`Long`
`getTemplateId()`
`String`
`getTemplateName()`
`String`
`getTgs()`
`String`
`getTile()`
`int`
`getType()`
`int`
`hashCode()`
`boolean`
`isAlias()`
`boolean`
`isHidden()`
`boolean`
`isTemplateLocked()`
`boolean`
`isWorkspace()`
`void`
`removeAccessControlEntries(long groupId)`
Removes all the ACEs related to the given group.
`void`
`setAccessControlList(Set<FolderAccessControlEntry> accessControlList)`
`void`
`setAttributes(Map<String,Attribute> attributes)`
`void`
`setBarcodeTemplateId(Long barcodeTemplateId)`
`void`
`setColor(String color)`
`void`
`setCreator(String creator)`
`void`
`setCreatorId(Long creatorId)`
`void`
`setDeleteUser(String deleteUser)`
`void`
`setDeleteUserId(Long deleteUserId)`
`void`
`setDescription(String description)`
`void`
`setFoldRef(Long foldRef)`
`void`
`setGrid(String grid)`
`void`
`setHidden(boolean hidden)`
`void`
`setMaxVersions(Integer maxVersions)`
`void`
`setName(String name)`
`void`
`setOcrTemplateId(Long ocrTemplateId)`
`void`
`setParentId(long parentId)`
`void`
`setPath(String path)`
`void`
`setPathExtended(String pathExtended)`
`void`
`setPosition(int position)`
`void`
`setQuotaAlertRecipients(String quotaAlertRecipients)`
`void`
`setQuotaDocs(Long quotaDocs)`
`void`
`setQuotaSize(Long quotaSize)`
`void`
`setQuotaThreshold(Integer quotaThreshold)`
`void`
`setSecurityRef(Long securityRef)`
`void`
`setStore(Integer store)`
Gets the default store to use from this folder in the current node
`void`
`setStores(Map<String,Integer> stores)`
`void`
`setTags(Set<Tag> tags)`
`void`
`setTagsFromWords(Set<String> tgs)`
`void`
`setTemplate(Template template)`
`void`
`setTemplateId(Long templateId)`
`void`
`setTemplateLocked(boolean templateLocked)`
`void`
`setTemplateName(String templateName)`
`void`
`setTgs(String tgs)`
So not invoke this method directly, it is thought to be used by the ORM inside the DAO.
`void`
`setTile(String tile)`
`void`
`setType(int type)`
`String`
`toString()`

### Methods inherited from class com.logicaldoc.core.filler.Fillable

`getFillerId, setFillerId`

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

`getAttribute, getAttributeAtPosition, getAttributeNames, getAttributeNames, getValue, getValueAttributes, getValues, removeAttribute, setAttribute, setValue, setValues`

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

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

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

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

## Field Details

### ROOTID

public static final long ROOTID

See Also:
  - Constant Field Values

### DEFAULTWORKSPACEID

public static final long DEFAULTWORKSPACEID

See Also:
  - Constant Field Values

### DEFAULTWORKSPACENAME

public static final String DEFAULTWORKSPACENAME

See Also:
  - Constant Field Values

### TYPE_DEFAULT

public static final int TYPE_DEFAULT

See Also:
  - Constant Field Values

### TYPE_WORKSPACE

public static final int TYPE_WORKSPACE

See Also:
  - Constant Field Values

### TYPE_ALIAS

public static final int TYPE_ALIAS

See Also:
  - Constant Field Values

## Constructor Details

### Folder

public Folder()

### Folder

public Folder(Folder source)

### Folder

public Folder(String name)

## Method Details

### getAccessControlList

public Set<FolderAccessControlEntry> getAccessControlList()

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

### setAccessControlList

public void setAccessControlList(Set<FolderAccessControlEntry> accessControlList)

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

### 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<FolderAccessControlEntry>`
Parameters:
  `groupId` - Identifier of the group

### isWorkspace

public boolean isWorkspace()

### isAlias

public boolean isAlias()

### getParentId

public long getParentId()

### setParentId

public void setParentId(long parentId)

### getName

public String getName()

### setName

public void setName(String name)

### getSecurityRef

public Long getSecurityRef()

### setSecurityRef

public void setSecurityRef(Long securityRef)

### getDescription

public String getDescription()

### setDescription

public void setDescription(String description)

### getType

public int getType()

### setType

public void setType(int type)

### getCreator

public String getCreator()

### setCreator

public void setCreator(String creator)

### getCreatorId

public Long getCreatorId()

### setCreatorId

public void setCreatorId(Long creatorId)

### getDeleteUserId

public Long getDeleteUserId()

### setDeleteUserId

public void setDeleteUserId(Long deleteUserId)

### getPosition

public int getPosition()

### setPosition

public void setPosition(int position)

### isTemplateLocked

public boolean isTemplateLocked()

### setTemplateLocked

public void setTemplateLocked(boolean templateLocked)

### isHidden

public boolean isHidden()

### setHidden

public void setHidden(boolean hidden)

### getQuotaDocs

public Long getQuotaDocs()

### setQuotaDocs

public void setQuotaDocs(Long quotaDocs)

### getQuotaSize

public Long getQuotaSize()

### setQuotaSize

public void setQuotaSize(Long quotaSize)

### getFoldRef

public Long getFoldRef()

### setFoldRef

public void setFoldRef(Long foldRef)

### getStore

public Integer getStore()
Gets the default store to use from this folder in the current node

Returns:
  identifier of the default store

### setStore

public void setStore(Integer store)
Gets the default store to use from this folder in the current node

Parameters:
  `store` - identifier of the default store

### getMaxVersions

public Integer getMaxVersions()

### setMaxVersions

public void setMaxVersions(Integer maxVersions)

### getColor

public String getColor()

### setColor

public void setColor(String color)

### getTags

public Set<Tag> getTags()

### setTags

public void setTags(Set<Tag> tags)

### getTgs

public String getTgs()

### setTgs

public void setTgs(String tgs)
So not invoke this method directly, it is thought to be used by the ORM inside the DAO.

Parameters:
  `tgs` - comma-separated string of tags

### addTag

public void addTag(String word)

### clearTags

public void clearTags()

### setTagsFromWords

public void setTagsFromWords(Set<String> tgs)

### getTagsAsWords

public Set<String> getTagsAsWords()

### getGrid

public String getGrid()

### setGrid

public void setGrid(String grid)

### getTagsString

public String getTagsString()

### getQuotaThreshold

public Integer getQuotaThreshold()

### setQuotaThreshold

public void setQuotaThreshold(Integer quotaThreshold)

### getQuotaAlertRecipients

public String getQuotaAlertRecipients()

### setQuotaAlertRecipients

public void setQuotaAlertRecipients(String quotaAlertRecipients)

### getQuotaAlertRecipientsAsList

public List<String> getQuotaAlertRecipientsAsList()

### addQuotaAlertRecipient

public void addQuotaAlertRecipient(String recipient)

### setPath

public void setPath(String path)

### getPath

public String getPath()

### getDeleteUser

public String getDeleteUser()

### setDeleteUser

public void setDeleteUser(String deleteUser)

### getPathExtended

public String getPathExtended()

### setPathExtended

public void setPathExtended(String pathExtended)

### getOcrTemplateId

public Long getOcrTemplateId()

### setOcrTemplateId

public void setOcrTemplateId(Long ocrTemplateId)

### getBarcodeTemplateId

public Long getBarcodeTemplateId()

### setBarcodeTemplateId

public void setBarcodeTemplateId(Long barcodeTemplateId)

### toString

public String toString()

Overrides:
  `toString` in class `PersistentObject`

### getStores

public Map<String,Integer> getStores()

### setStores

public void setStores(Map<String,Integer> stores)

### getTile

public String getTile()

### setTile

public void setTile(String tile)

### getAttributes

public Map<String,Attribute> getAttributes()

Specified by:
  `getAttributes` in interface `Extensible`

### setAttributes

public void setAttributes(Map<String,Attribute> attributes)

Specified by:
  `setAttributes` in interface `Extensible`

### getTemplateId

public Long getTemplateId()

Specified by:
  `getTemplateId` in interface `Extensible`

### setTemplateId

public void setTemplateId(Long templateId)

Specified by:
  `setTemplateId` in interface `Extensible`

### getTemplateName

public String getTemplateName()

Specified by:
  `getTemplateName` in interface `Extensible`

### setTemplateName

public void setTemplateName(String templateName)

Specified by:
  `setTemplateName` in interface `Extensible`

### getTemplate

public Template getTemplate()

Specified by:
  `getTemplate` in interface `Extensible`

### setTemplate

public void setTemplate(Template template)

Specified by:
  `setTemplate` in interface `Extensible`

### getAccessControlEntry

public FolderAccessControlEntry getAccessControlEntry(long groupId)

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

### getAccessControlEntries

public Set<FolderAccessControlEntry> 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<FolderAccessControlEntry>`
Parameters:
  `groupIds` - identifiers of groups
Returns:
  The set of matching entries

### addAccessControlEntry

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

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

### compareTo

public int compareTo(Folder other)

Specified by:
  `compareTo` in interface `Comparable<Folder>`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Fillable`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Fillable`