Package overit.geocall.config.company
Class PropertiesResource
java.lang.Object
overit.geocall.config.company.PropertiesResource
class containing the configurations related to the resources.
note: all the configuration refers to the company whose the identity belongs to.
note: all the configuration refers to the company whose the identity belongs to.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringStatic constant to identify the resources saved into the Azure Blob Storage servicestatic final StringStatic constant to identify the resources saved into a container's folderstatic final StringStatic constant to identify the resources saved into the databasestatic final StringStatic constant to identify the resources saved into the file systemstatic final StringStatic constant to identify the resources saved into the AWS S3 service -
Method Summary
Modifier and TypeMethodDescriptionstatic StringallowTypes(Company company) Gets the file formats allowed for upload.static Stringthe directory path the resources are saved in.static overit.geocall.servlet.WebResourceFactoryHelper method to get the instance of theWebResourceFactory.static StringGet the persistence method of the web resources.
-
Field Details
-
TYPE_CONTAINER
Static constant to identify the resources saved into a container's folder- See Also:
-
TYPE_FS
Static constant to identify the resources saved into the file system- See Also:
-
TYPE_DB
Static constant to identify the resources saved into the database- See Also:
-
TYPE_S3
Static constant to identify the resources saved into the AWS S3 service- See Also:
-
TYPE_BLOB_STORAGE
Static constant to identify the resources saved into the Azure Blob Storage service- See Also:
-
-
Method Details
-
getFactory
public static overit.geocall.servlet.WebResourceFactory getFactory()Helper method to get the instance of theWebResourceFactory. The effective implementation is based on thetype(Company)configuration- Returns:
- the instance of the
WebResourceFactorytht can be used to get the reference of aWebResource.
-
type
Get the persistence method of the web resources. Supported values are:fs: to save the resources in file systemdb: to save them into DB tables3: to save them into a AWS S3 bucketclass: a class path to implement a custom persistence logic
- Parameters:
company- the company from which extract the configuration- Returns:
- the persistence method of the web resources. If there's no type configured, this method will return an empty string.
-
base
the directory path the resources are saved in. Works only if thecompany.resources.typeconfiguration has been set up toFS- Parameters:
company- the company from which extract the configuration- Returns:
- the directory path the resources are saved in. If there's no base configured, this method will a null value web directory.
-
allowTypes
Gets the file formats allowed for upload.
This property it's used to define a list of allowed file type/extensions that can be selected for upload into the system.
It's possible to restrict the accepted file using the following rules:- file_extension: A file extension starting with the dot character, e.g: .gif, .jpg, .png, .doc
- audio/*: All sound files are accepted
- video/*: All video files are accepted
- image/*: All image files are accepted
- media_type: A valid media type, with no parameters. Look at IANA Media Types for a complete list of standard media types
- *: All files are accepted
- Parameters:
company- the company from which extract the configuration- Returns:
- the file formats allowed for upload.
-