Package overit.geocall.platform
Class Company
java.lang.Object
overit.geocall.platform.Company
- All Implemented Interfaces:
Serializable,Scoped
TODO: documentation
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Lazy<CustomLayer> protected Stringprotected Longprotected Stringstatic final Companyprotected StringFields inherited from interface overit.geocall.platform.Scoped
contextScope -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic CompanyfromId(long companyId) static Companystatic Companyoverit.geocall.config.ConfigReturns thiscompany ID, padded to 3 characters, using the0as padding character, so that acompany IDwith value48becomes048.getId()Returns the company of the identityoverit.geocall.licensing.NextGenLicenseReturns the licensegetLogin()Returns the string used as company field to access the applicationReturns the package for the user currently logged in the applicationReturns the company prefix consisting ofCOMPANY_PREFIXfollowed by the companyID.getSecretsManager(SecretsManagerType secretsManagersType) Deprecated, for removal: This API element is subject to removal in a future version.getUser()booleanhasFunction(String function) Checks if this company has or not a specific privilegeinthashCode()booleanisActive()Returns the boolean value indicating if the company is active or notbooleanisMaster()voidsetActive(boolean active) voidsetDescription(String description) defines the description of the tenantprotected voidtoString()
-
Field Details
-
COMPANY_LOGIN_NOT_FOUND
- See Also:
-
COMPANY_LOGIN_NOT_ACTIVE
- See Also:
-
COMPANY_ID_NOT_FOUND
- See Also:
-
COMPANY_ID_NOT_ACTIVE
- See Also:
-
MASTER
-
pkg
-
id
-
description
-
login
-
active
protected boolean active -
functions
-
customLayer
-
-
Constructor Details
-
Company
-
-
Method Details
-
fromScope
-
fromId
-
fromLogin
-
getCompany
- Specified by:
getCompanyin interfaceScoped
-
isMaster
public boolean isMaster() -
getDescription
- Returns:
- the description of the company
-
setDescription
defines the description of the tenant- Parameters:
description- the descripton of the tenant
-
getId
Returns the company of the identity- Returns:
- The long that represents the id of the factory
-
getLogin
Returns the string used as company field to access the application- Returns:
- The string used in the company field of the login page to autenticate and access the application
-
setLogin
-
isActive
public boolean isActive()Returns the boolean value indicating if the company is active or not- Returns:
- The boolean value indicating if the company is active or not
-
setActive
public void setActive(boolean active) -
getFunctions
- Specified by:
getFunctionsin interfaceScoped
-
hasFunction
Checks if this company has or not a specific privilege- Parameters:
function- The string that represent the specific privilege- Returns:
- true if the company has the privilege (or if the parameter is null or an empty string), false otherwise
-
getCustomLayer
-
getConfig
public overit.geocall.config.Config getConfig() -
getLicense
public overit.geocall.licensing.NextGenLicense getLicense()Returns the license- Returns:
- the
NextGenLicense
-
getPackage
Returns the package for the user currently logged in the application- Returns:
- The package associated to the user
-
getUser
-
getUsername
- Specified by:
getUsernamein interfaceScoped
-
getBranch
-
getBranchDescription
- Specified by:
getBranchDescriptionin interfaceScoped
-
getDBFieldMap
- Specified by:
getDBFieldMapin interfaceScoped
-
getDBClientIdentifier
- Specified by:
getDBClientIdentifierin interfaceScoped
-
getSecretsManager
@Deprecated(since="11.0", forRemoval=true) public SecretsManager getSecretsManager(SecretsManagerType secretsManagersType) Deprecated, for removal: This API element is subject to removal in a future version.UseSecretsManagerProvider.getInstance().get(companyId, secretsManagerType)instead.
Returns theSecretsManagerinstance by passing itsSecretsManagerType. If it doesn't exist it's created.- Parameters:
secretsManagersType- the type of the secrets manager- Returns:
- the secretsManager
-
getPrefix
Returns the company prefix consisting ofCOMPANY_PREFIXfollowed by the companyID.- Returns:
- the company prefix (e.g.,
c123).
-
getFormattedId
Returns thiscompany ID, padded to 3 characters, using the0as padding character, so that acompany IDwith value48becomes048.- Returns:
- this
company ID, padded to 3 characters, using the0as padding character, so that acompany IDwith value48becomes048.
-
hashCode
public int hashCode() -
equals
-
toString
-
SecretsManagerProvider.getInstance().get(companyId, secretsManagerType)instead.