Enum Class JBStrapParamType

java.lang.Object
java.lang.Enum<JBStrapParamType>
com.jbstrap.core.JBStrapParamType
All Implemented Interfaces:
Serializable, Comparable<JBStrapParamType>, Constable

public enum JBStrapParamType extends Enum<JBStrapParamType>
JBStrap Framework parameters
Since:
4.0
Author:
JBStrap
  • Enum Constant Details

    • LICENSE_FILE

      public static final JBStrapParamType LICENSE_FILE

      The license file's location on the server

      The parameter must be given a String type value. The default is: [user home directory]/JBStrap.license

    • DEFAULT_LANGUAGE

      public static final JBStrapParamType DEFAULT_LANGUAGE

      Sets the framework's default language. When specifying, a language code must be used..

      The parameter must be given a String type value. The default is: "EN"

    • PERSISTENCE_UNIT_NAME

      public static final JBStrapParamType PERSISTENCE_UNIT_NAME

      The name of the persistence layer used by the application. The parameter only needs to be specified, if the application uses a database, and the data is accessed through JPA(If not set, the DAO API is unusable)

      The parameter must be given a String type value, and it has no default value

    • DATADESCRIPTOR_DIR

      public static final JBStrapParamType DATADESCRIPTOR_DIR

      The location of the directory containing the DataDescriptor XML files. The XML files found here will be loaded automatically on the application startup, and the DataDescriptor will be ready to use within the framework.

      The parameter must be given a String type value. The default is: "/WEB-INF/ds"

    • FILE_STORE_BASE

      public static final JBStrapParamType FILE_STORE_BASE

      The filestore base directory. The individual filestore folders will be in this directory

      The parameter must be given a String type value. The default is: "file:////filestore"

    • DEFAULT_BOOLEAN_CONVERTER

      public static final JBStrapParamType DEFAULT_BOOLEAN_CONVERTER

      The default boolean converter. The converter is used when the logic values on the java side are saved to the database Logical values are converted to a datatype that can be stored in a database, since many database management systems can't manage boolean values The converter isn't needed, if the database being used can store boolean(logical) values in its tables

      The parameter must be given a Converter interface implementation class. Such classes are implemented in the BooleanConverters enum, and the applicable one can be picked from there. If an applicable one isn't found, a custom class can be specified, which implements the Converter interface, thus we can implement a custom converter. The parameter's default value is: BooleanConverters.YES_NO

    • PAGE_SIZE

      public static final JBStrapParamType PAGE_SIZE

      The lazy fetch pagination. The specified number of records will be read by the components that support lazy fetching from the database.

      The parameter must be given an Integer type value. The default is: 50

    • DATE_FORMAT

      public static final JBStrapParamType DATE_FORMAT

      The default date format

      The parameter must be given a String type value. The default is: "yyyy-MM-dd"

    • DATETIME_FORMAT

      public static final JBStrapParamType DATETIME_FORMAT

      The default DateTime format

      The parameter must be given a String type value. The default is: "yyyy-MM-dd HH:mm:ss"

    • TIME_FORMAT

      public static final JBStrapParamType TIME_FORMAT

      The default Time format

      The parameter must be given a String type value. The default is:"HH:mm:ss"

    • THOUSANDS_SEPARATOR

      public static final JBStrapParamType THOUSANDS_SEPARATOR

      The default Thousands Separator character

      The parameter must be given a Character type value. The default is:','

    • DECIMAL_SEPARATOR

      public static final JBStrapParamType DECIMAL_SEPARATOR

      The default Decimal Separator character

      The parameter must be given a Character type value. The default is: '.'

    • ENTRY_POINT

      public static final JBStrapParamType ENTRY_POINT

      The application's entry point. A page ID must be specified. The specified page will be the first page that will be opened when the users start the application. This page will also be the one, where the users will be navigated after they log out.

      The parameter must be given a String type value, and it has no default value

    • LOGIN_PAGE

      public static final JBStrapParamType LOGIN_PAGE

      The page id of the login page. The specified page id can be the same as the entry point's page id. If the user has to log in to the application (ie: opens a link that requires them to be logged in, but they aren't logged in) they will be redirected to this page.

      The parameter must be given a String type value. The default is: "loginPage"

    • DEFAULT_STRING_SORT_COLLATOR

      public static final JBStrapParamType DEFAULT_STRING_SORT_COLLATOR

      The default String sorting Collator.

      This parameter requires a Collator implementation. The default value is: Collator.getInstance(Locale.US);

    • DEFAULT_PROCESS_INDICATOR_IMAGE

      public static final JBStrapParamType DEFAULT_PROCESS_INDICATOR_IMAGE

      The default process indicator image. Can be specified as a URL, that is relative to the application's URL (baseURL)

      The parameter must be given a String type value. The default is: "img/loading.gif"

    • JAVA_SCRIPT_ERROR_HANDLER

      public static final JBStrapParamType JAVA_SCRIPT_ERROR_HANDLER

      The default JavaScript error handler

      This parameter requires a JavaScriptErrorHandlerinterface implementation. If the parameter isn't set, the JavaScript errors will be written to the server log.

      The parameter has no default value

    • MAX_EXPORTED_ROW_COUNT

      public static final JBStrapParamType MAX_EXPORTED_ROW_COUNT

      Sets the maximum amount of lines that can be exported from the ListGrid component in one data transfer

      The parameter must be given an Integer type value. The default is: 100,000 lines

    • EXPORT_FETCH_SIZE

      public static final JBStrapParamType EXPORT_FETCH_SIZE

      The maximum number of records in the query in case of the export process. During the export process, queries are implemented as lazy fetch.

      The parameter must be an integer. Default value: 10,000

    • FILE_HANDLER

      public static final JBStrapParamType FILE_HANDLER

      The file handler implementation

      For more information, see the FileHandler class description.

      The parameter requires a class that is a descendant of the FileHandler class, and handles files. The default value of the parameter is the DefaultFileHandler, for more information, see the class description.

    • PAGE_ANIMATION

      public static final JBStrapParamType PAGE_ANIMATION

      The animation that plays when a page is opened

      The parameter must be a value from the Animation enum. The default value is Animation.NONE, meaning there won't be an opening animation.

    • APPLICATION_TITLE

      public static final JBStrapParamType APPLICATION_TITLE

      The application's title, that appears in the browser header.

      The parameter must be given a String type value. The default is:"JBStrap application"

    • APPLICATION_ICON

      public static final JBStrapParamType APPLICATION_ICON

      The application icon(favicon).

      The parameter must be given a String, which is a path to the icon's URL relative to the application's URL. The default value is: "img/favicon.png", the JBStrap icon

    • AUTOFETCH_TIMEOUT

      public static final JBStrapParamType AUTOFETCH_TIMEOUT

      Sets the timeout of the automatic data fetch. If the data handling component automatically fetches data, then the timeout can be set here, meaning how long the fetched data will be valid. If the component wants to fetch data before the timeout, Then the previously fetched data will be given. This timeout must be specified in milliseconds. The component will request a new fetch before the timeout if the component's data was deleted, or the component's fetch criteria were modified, or the operation was requested through code.

      The parameter must be given an Integer value. The default is: 300,000 ms (5 minutes).

    • ENABLE_PAGE_URL_REWRITE

      public static final JBStrapParamType ENABLE_PAGE_URL_REWRITE

      Enables the page ID to be shown in the application's URL. If enabled, when a page is opened, the page ID will be put in the application's URL, creating a SoftLink to the page. The user can save this link as a bookmark, and can get back to the specific page in the application.

      WARNING: The SoftLink specifies the page's position within the application. The parameters that were assigned to the page dynamically aren't included in the link, the handling of these must be done by the page. The page's default assigned parameters are handled by the application during the use of a SoftLink

      The parameter must be given a Boolean value. The default is: true, the function is enabled.

    • AUTHENTICATION

      public static final JBStrapParamType AUTHENTICATION
      The instance of the class that implements the user login process. The specified class must implement the AuthenticationInterface interface, that has two methods. One of the methods is for creating the user password check and the POJO class that represents the user, the other one is used to implement the logout. The implementation of the logout is not mandatory.
      See Also:
    • CLIENT_CONNECTED_EVENT_HANDLER

      public static final JBStrapParamType CLIENT_CONNECTED_EVENT_HANDLER
      The instance of the class, that contains the client connected event handler. The specified class must implement the ClientConnectedHandler interface, which contains the method that is to be called when the client connects. By default, the value of this parameter is null, no custom code is executed when the client connects.
    • CLIENT_DISCONNECT_EVENT_HANDLER

      public static final JBStrapParamType CLIENT_DISCONNECT_EVENT_HANDLER
      The client disconnect event handler implementation can be specified in this parameter. The specified event handler must implement the ClientDisconnectedHandler interface, which contains the method, that is called when a client disconnects from the server. By default, the value of this parameter is null, meaning no handler is specified.
    • FORM_EDIT_POLICY

      public static final JBStrapParamType FORM_EDIT_POLICY
      Set whether to check the record by default when editing a record on a form. If so, the record is checked by the form validator before the record is edited. If there is incorrect data in the record, the corresponding edit field is set to ERROR, indicating to the user that the value is incorrect. By default, this feature is turned on, which means that the record is checked before editing.
    • DEFAULT_PAGE_CONTAINER_TYPE

      public static final JBStrapParamType DEFAULT_PAGE_CONTAINER_TYPE
      Default page container. The default container setting for every page is ContainerType.FLUID.
      See Also:
    • UPLOAD_CHUNK_SIZE

      public static final JBStrapParamType UPLOAD_CHUNK_SIZE
      Chunk size for file upload. The file upload is executed using the specified chunk size.
    • DOWNLOAD_CHUNK_SIZE

      public static final JBStrapParamType DOWNLOAD_CHUNK_SIZE
      Chunk size for file download. The file download is executed using the specified chunk size.
    • DEFAULT_THEME

      public static final JBStrapParamType DEFAULT_THEME
      The default theme for the application. According to the theme specified here, the interface will appear on the client when the application is loaded. If not specified, the interface will appear according to the Default theme.
    • IS_FIND_IGNORECASE

      public static final JBStrapParamType IS_FIND_IGNORECASE
      The parameter defines whether lowercase and uppercase characters should be distinguished in search values specified in the Criteria.
      The parameter is applicable for all operators handling text values. (EQUALS, NOT_EQUALS, LIKE, NOT_LIKE, STARTS_WITH, NOT_STARTS_WITH, ENDS_WITH, NOT_ENDS_WITH, IN_SET, NOT_IN_SET)
      Example:
      If IS_FIND_IGNORECASE = false: where column1 = 'criteriaValue'
      If IS_FIND_IGNORECASE = true: where upper(column1) = upper('criteriaValue')
  • Method Details

    • values

      public static JBStrapParamType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JBStrapParamType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getDataClass

      public Class<?> getDataClass()
      Gets the parameter value's data class
      Returns:
      The parameter value's data class
    • getDefaultValue

      public Object getDefaultValue()
      Gets the parameter's default value
      Returns:
      The parameter's default value or null, if it has no default value