Package com.logicaldoc.core.security

# Class Tenant

java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.core.security.Tenant

All Implemented Interfaces:
  `Serializable`

@Entity public class Tenant extends PersistentObject implements Serializable
This class represents a Tenant, that is a branch of the organization or an organizational unit or whatever other class of organization.

Version:
  6.9
Author:
  Marco Meschieri
See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final long`
`DEFAULT_ID`
`static final String`
`DEFAULT_NAME`
`static final int`
`DEFAULT_TYPE`
`static final long`
`SYSTEM_ID`
`static final String`
`SYSTEM_NAME`

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

`DELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id`

## Constructor Summary

Constructors
Constructor
Description
`Tenant()`
`Tenant(Tenant source)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addQuotaAlertRecipient(String recipient)`
`boolean`
`equals(Object obj)`
`String`
`getCity()`
`String`
`getCountry()`
`String`
`getDisplayName()`
`String`
`getEmail()`
`Date`
`getExpire()`
`Long`
`getMaxApiCalls()`
`Long`
`getMaxDocuments()`
`Long`
`getMaxEmailAccounts()`
`Long`
`getMaxForms()`
`Integer`
`getMaxGuests()`
`Long`
`getMaxImportFolders()`
`Long`
`getMaxReports()`
`Long`
`getMaxRepoSize()`
`Integer`
`getMaxSessions()`
`Long`
`getMaxStamps()`
`Long`
`getMaxTickets()`
`Integer`
`getMaxUsers()`
`Long`
`getMaxWorkflows()`
`String`
`getName()`
`String`
`getPostalCode()`
`String`
`getQuotaAlertRecipients()`
`List<String>`
`getQuotaAlertRecipientsAsList()`
`Integer`
`getQuotaThreshold()`
`String`
`getState()`
`String`
`getStreet()`
`String`
`getTelephone()`
`int`
`getType()`
`int`
`hashCode()`
`boolean`
`isAvailable()`
Check if the tenant is enabled and not expired
`boolean`
`isDefault()`
`boolean`
`isEnabled()`
`boolean`
`isSystem()`
`void`
`setCity(String city)`
`void`
`setCountry(String country)`
`void`
`setDisplayName(String displayName)`
`void`
`setEmail(String email)`
`void`
`setEnabled(boolean enabled)`
`void`
`setExpire(Date expire)`
`void`
`setMaxApiCalls(Long maxApiCalls)`
`void`
`setMaxDocuments(Long maxDocuments)`
`void`
`setMaxEmailAccounts(Long maxEmailAccounts)`
`void`
`setMaxForms(Long maxForms)`
`void`
`setMaxGuests(Integer maxGuests)`
`void`
`setMaxImportFolders(Long maxImportFolders)`
`void`
`setMaxReports(Long maxReports)`
`void`
`setMaxRepoSize(Long maxRepoSize)`
`void`
`setMaxSessions(Integer maxSessions)`
`void`
`setMaxStamps(Long maxStamps)`
`void`
`setMaxTickets(Long maxTickets)`
`void`
`setMaxUsers(Integer maxUsers)`
`void`
`setMaxWorkflows(Long maxWorkflows)`
`void`
`setName(String name)`
`void`
`setPostalCode(String postalCode)`
`void`
`setQuotaAlertRecipients(String quotaAlertRecipients)`
`void`
`setQuotaThreshold(Integer quotaThreshold)`
`void`
`setState(String state)`
`void`
`setStreet(String street)`
`void`
`setTelephone(String telephone)`
`void`
`setType(int type)`
`String`
`toString()`

### 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

### SYSTEM_ID

public static final long SYSTEM_ID

See Also:
  - Constant Field Values

### SYSTEM_NAME

public static final String SYSTEM_NAME

See Also:
  - Constant Field Values

### DEFAULT_ID

public static final long DEFAULT_ID

See Also:
  - Constant Field Values

### DEFAULT_NAME

public static final String DEFAULT_NAME

See Also:
  - Constant Field Values

### DEFAULT_TYPE

public static final int DEFAULT_TYPE

See Also:
  - Constant Field Values

## Constructor Details

### Tenant

public Tenant()

### Tenant

public Tenant(Tenant source)

## Method Details

### isDefault

public boolean isDefault()

### isSystem

public boolean isSystem()

### getName

public String getName()

### setName

public void setName(String name)

### getDisplayName

public String getDisplayName()

### setDisplayName

public void setDisplayName(String displayName)

### getStreet

public String getStreet()

### setStreet

public void setStreet(String street)

### getCity

public String getCity()

### setCity

public void setCity(String city)

### getState

public String getState()

### setState

public void setState(String state)

### getCountry

public String getCountry()

### setCountry

public void setCountry(String country)

### getEmail

public String getEmail()

### setEmail

public void setEmail(String email)

### getTelephone

public String getTelephone()

### setTelephone

public void setTelephone(String telephone)

### getType

public int getType()

### setType

public void setType(int type)

### getPostalCode

public String getPostalCode()

### setPostalCode

public void setPostalCode(String postalCode)

### toString

public String toString()

Overrides:
  `toString` in class `PersistentObject`

### getMaxUsers

public Integer getMaxUsers()

### setMaxUsers

public void setMaxUsers(Integer maxUsers)

### getMaxSessions

public Integer getMaxSessions()

### setMaxSessions

public void setMaxSessions(Integer maxSessions)

### getMaxDocuments

public Long getMaxDocuments()

### setMaxDocuments

public void setMaxDocuments(Long maxDocuments)

### getMaxRepoSize

public Long getMaxRepoSize()

### setMaxRepoSize

public void setMaxRepoSize(Long maxRepoSize)

### getMaxApiCalls

public Long getMaxApiCalls()

### setMaxApiCalls

public void setMaxApiCalls(Long maxApiCalls)

### getMaxTickets

public Long getMaxTickets()

### setMaxTickets

public void setMaxTickets(Long maxTickets)

### getMaxWorkflows

public Long getMaxWorkflows()

### setMaxWorkflows

public void setMaxWorkflows(Long maxWorkflows)

### getMaxForms

public Long getMaxForms()

### setMaxForms

public void setMaxForms(Long maxForms)

### getMaxReports

public Long getMaxReports()

### setMaxReports

public void setMaxReports(Long maxReports)

### getMaxStamps

public Long getMaxStamps()

### setMaxStamps

public void setMaxStamps(Long maxStamps)

### getMaxImportFolders

public Long getMaxImportFolders()

### setMaxImportFolders

public void setMaxImportFolders(Long maxImportFolders)

### getMaxEmailAccounts

public Long getMaxEmailAccounts()

### setMaxEmailAccounts

public void setMaxEmailAccounts(Long maxEmailAccounts)

### isEnabled

public boolean isEnabled()

### setEnabled

public void setEnabled(boolean enabled)

### isAvailable

public boolean isAvailable()
Check if the tenant is enabled and not expired

Returns:
  if it is available

### getExpire

public Date getExpire()

### setExpire

public void setExpire(Date expire)

### 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)

### getMaxGuests

public Integer getMaxGuests()

### setMaxGuests

public void setMaxGuests(Integer maxGuests)

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `PersistentObject`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `PersistentObject`