4A Server -
2.0
|
Singleton for storing global variables. More...
Static Public Member Functions | |
static AppBean | getInstance () |
static SessionCleaner | getSessionsCleaner () |
static PersistM | getPersistenceManager () |
static ResponseCreator | getResponseCreator () |
static void | addModule (AnnotServerModule module) |
static synchronized long | getNextSessId () |
static synchronized long | getNextTmpId () |
static ArrayList< EditorSession > | getSessions () |
static LockMaster | getLockMaster () |
static void | refreshUsersInSessions (User user) |
static void | addSession (EditorSession es) |
static void | removeSession (EditorSession es) |
static void | removeSession (long id) |
static EditorSession | getSession (long id) |
static boolean | sessionExists (long id) |
static void | removeExtAuthData (String system, String login) |
static void | setExtAuthData (String system, String login, String data) |
static String | getExtAuthData (String system, String login) |
static SECAPIInterface | getSecApiInterface () |
static boolean | isSecApiInterfaceAvailable () |
static void | setSecApiInterface (SECAPIInterface secApiInterface) |
static synchronized int | getDocumentUsage (Integer documentId) |
static synchronized void | incrementDocumentUsage (Integer documentId) |
static synchronized void | decrementDocumentUsage (Integer documentId) |
static synchronized int | getLastDocModification (int documentId) |
static synchronized Integer | incrementLastDocModification (int documentId) |
static synchronized void | initLastDocModification (int documentId) |
static synchronized void | addDocModificationSet (int documentID, int modificationID, ArrayList< TextModification > modificationSet) |
static synchronized void | removePossibleModificationSets (int documentID) |
static synchronized boolean | lastModificationSetsContains (int documentID, int setID) |
static synchronized boolean | hasModificationSetsConflicts (int documentID, int setID, ArrayList< TextModification > modifications) |
static String | getServerUri () |
static void | setServerUri (String serverUri) |
static String | getBaseUri () |
static String | getBaseAnnotUri () |
static String | getBaseSugUri () |
static String | getBaseTypeUri () |
static String | getBaseDocumentUri () |
static String | getBaseStoredDocumentUri () |
static String | getBaseAuthorUri () |
static String | getBaseUserUri () |
static String | getBaseUserUriV2 () |
static String | getBaseGroupUri () |
static String | getBaseOntoUploadUri () |
static String | getSecApiServerUri () |
static String | getBaseSubscriptionUri () |
static void | resetURIs () |
static void | setSecApiServerUri (String secApiServerUri) |
static String | getKBImagePrefix () |
static Boolean | getLogGetAlternativesFor () |
static void | setKBImagePrefix (String KBImagePrefix) |
static ArrayList < SecApiReqTypeDef > | getReqTypeDefinitions () |
static void | setReqTypeDefinitions (ArrayList< SecApiReqTypeDef > reqTypeDefinitions) |
static ArrayList < SecApiReqTypeDef > | getDesTypeDefinitions () |
static void | setDesTypeDefinitions (ArrayList< SecApiReqTypeDef > desTypeDefinitions) |
static ArrayList < SecApiReqTypeDef > | getUnTypeDefinitions () |
static void | setUnTypeDefinitions (ArrayList< SecApiReqTypeDef > unTypeDefinitions) |
static ArrayList < SecApiReqTypeDef > | getAvTypeDefinitions () |
static void | setAvTypeDefinitions (ArrayList< SecApiReqTypeDef > avTypeDefinitions) |
static ArrayList < SecApiReqTypeDef > | getUnAtDefinitions () |
static void | setUnAtDefinitions (ArrayList< SecApiReqTypeDef > unAtDefinitions) |
static ArrayList < SecApiReqTypeDef > | getDesTypeDefinitionsEA () |
static void | setDesTypeDefinitionsEA (ArrayList< SecApiReqTypeDef > desTypeDefinitionsEA) |
static ArrayList < SecApiReqTypeDef > | getReqTypeDefinitionsEA () |
static void | setReqTypeDefinitionsEA (ArrayList< SecApiReqTypeDef > reqTypeDefinitionsEA) |
static ArrayList < SecApiReqTypeDef > | getUnAtDefinitionsEA () |
static void | setUnAtDefinitionsEA (ArrayList< SecApiReqTypeDef > unAtDefinitionsEA) |
static ArrayList < SecApiReqTypeDef > | getUnTypeDefinitionsEA () |
static void | setUnTypeDefinitionsEA (ArrayList< SecApiReqTypeDef > unTypeDefinitionsEA) |
Static Public Attributes | |
static HashMap< String, ReentrantLock > | documentURILocker = new HashMap<String,ReentrantLock>() |
Private Member Functions | |
AppBean () | |
Static Private Attributes | |
static AppBean | instance = null |
static PersistM | persistenceManager = null |
static ResponseCreator | responseCreator = null |
static long | idGen = 0 |
static long | tmpIdGen = 0 |
static ArrayList< EditorSession > | sessions |
static Map< String, Map < String, String > > | extAuthData |
static SessionCleaner | sessionCleaner = null |
static HashMap< Integer, Integer > | documentUsageMap = new HashMap<Integer,Integer>() |
static HashMap< Integer, Integer > | documentLastModificationIDMap = new HashMap<Integer, Integer>() |
static HashMap< Integer, LastTextModifications > | documentAppliedModificationsMap = new HashMap<Integer, LastTextModifications>() |
static SECAPIInterface | secApiInterface = null |
static LockMaster | lockMaster = null |
static String | serverUri = Constants.SERVER_URI |
static boolean | serverUriLoaded = false |
static String | secApiServerUri = null |
static String | KBImagePrefix = null |
static ArrayList < SecApiReqTypeDef > | reqTypeDefinitions = null |
static ArrayList < SecApiReqTypeDef > | avTypeDefinitions = null |
static ArrayList < SecApiReqTypeDef > | desTypeDefinitions = null |
static ArrayList < SecApiReqTypeDef > | unTypeDefinitions = null |
static ArrayList < SecApiReqTypeDef > | unAtDefinitions = null |
static ArrayList < SecApiReqTypeDef > | reqTypeDefinitionsEA = null |
static ArrayList < SecApiReqTypeDef > | desTypeDefinitionsEA = null |
static ArrayList < SecApiReqTypeDef > | unTypeDefinitionsEA = null |
static ArrayList < SecApiReqTypeDef > | unAtDefinitionsEA = null |
static Boolean | logGetAlternativesFor = null |
Singleton for storing global variables.
Singleton for storing global variables and performing operations at global application level (eg. generating session id's).
Definition at line 47 of file AppBean.java.
|
private |
Constructor - Creates a new instance of AppBean, response creator and persistence manager
Definition at line 113 of file AppBean.java.
|
static |
Adds last applied set of modifications to hashmap
documentID | ID of the document |
modificationID | modification set ID |
modificationSet | modification set |
Definition at line 553 of file AppBean.java.
|
static |
Adds server module to list of active modules in response creator
module | Server module |
Definition at line 207 of file AppBean.java.
|
static |
Adds client session to the list of sessions
es | Session to be added |
Definition at line 291 of file AppBean.java.
|
static |
Decrement number of opened document instances
documentId | ID of document |
Definition at line 492 of file AppBean.java.
|
static |
Gets list of available type definitions for SEC API
Definition at line 917 of file AppBean.java.
|
static |
Gets beginning of URI of annotation
Definition at line 663 of file AppBean.java.
|
static |
Gets beginning of URI of annotation author (person)
Definition at line 708 of file AppBean.java.
|
static |
Gets beginning of URI of annotated copy of document
Definition at line 690 of file AppBean.java.
|
static |
Gets beginning of URI of user group
Definition at line 735 of file AppBean.java.
|
static |
Gets base URI for ontology upload
Definition at line 744 of file AppBean.java.
|
static |
Gets beginning of URI of stored document
Definition at line 699 of file AppBean.java.
|
static |
Gets beginning of URI of subscription
Definition at line 776 of file AppBean.java.
|
static |
Gets beginning of URI of suggestion
Definition at line 672 of file AppBean.java.
|
static |
Gets beginning of URI of annotation type
Definition at line 681 of file AppBean.java.
|
static |
Gets base URI
Definition at line 654 of file AppBean.java.
|
static |
Gets beginning of URI of user (person)
Definition at line 717 of file AppBean.java.
|
static |
Gets beginning of URI of user (person) for protocol version 2
Definition at line 726 of file AppBean.java.
|
static |
Gets list of desired type definitions for SEC API
Definition at line 881 of file AppBean.java.
|
static |
Gets list of desired type definitions for SEC API entity autocomplete
Definition at line 954 of file AppBean.java.
|
static |
Gets number of opened document instances
documentId | ID of document |
Definition at line 465 of file AppBean.java.
|
static |
Gets authentication data for given user
system | System from which user come |
login | Login of the user |
Definition at line 412 of file AppBean.java.
|
static |
Gets instance of AppBean
Definition at line 158 of file AppBean.java.
|
static |
Gets URI prefix for images from controlled vocabulary
Definition at line 803 of file AppBean.java.
|
static |
Gets ID of the last text modification set applied on a document.
documentId | ID of the document |
Definition at line 509 of file AppBean.java.
|
static |
Gets global LockMaster instance
Definition at line 249 of file AppBean.java.
|
static |
Gets whethershould be usage of getAlternativesFor logged
Definition at line 826 of file AppBean.java.
|
static |
|
static |
Generate temporary id for suggested annotation
Definition at line 228 of file AppBean.java.
|
static |
Gets instance of persistence manager
Definition at line 183 of file AppBean.java.
|
static |
Gets list of requested type definitions for SEC API
Definition at line 863 of file AppBean.java.
|
static |
Gets list of requested type definitions for SEC API entity autocomplete
Definition at line 972 of file AppBean.java.
|
static |
Gets instance of response creator
Definition at line 195 of file AppBean.java.
|
static |
Gets instance of SEC API interface
Definition at line 429 of file AppBean.java.
|
static |
Gets address of the SEC API server for annotation suggestions
Definition at line 753 of file AppBean.java.
|
static |
Gets server URI
Definition at line 625 of file AppBean.java.
|
static |
Gets requested session
id | Id of requested session |
Definition at line 338 of file AppBean.java.
|
static |
|
static |
Gets instance of SessionsCleaner
Definition at line 170 of file AppBean.java.
|
static |
Gets list of unnecessary attribute definitions for SEC API
Definition at line 935 of file AppBean.java.
|
static |
Gets list of unnecessary attribute definitions for SEC API entity autocomplete
Definition at line 990 of file AppBean.java.
|
static |
Gets list of unnecessary type definitions for SEC API
Definition at line 899 of file AppBean.java.
|
static |
Gets list of unnecessary type definitions for SEC API entity autocomplete
Definition at line 1008 of file AppBean.java.
|
static |
Checks whetever the modification sets applied after modification identified by the passed setID of the document indetified by documentID contains conflicts with passed modification set.
documentID | Document ID |
setID | ID of the set preceding the checked sets |
modifications | Checked modification set |
Definition at line 608 of file AppBean.java.
|
static |
Increments number of opened document instances
documentId | ID of document |
Definition at line 477 of file AppBean.java.
|
static |
Increments ID of the last text modification set applied on a document.
documentId | ID of the document |
Definition at line 522 of file AppBean.java.
|
static |
Initializes ID of the last text modification set applied on a document.
documentId | ID of the document |
Definition at line 539 of file AppBean.java.
|
static |
Checks whether SEC API interface is available
Definition at line 443 of file AppBean.java.
|
static |
Checks whetever last modification sets of the document indetified by documentID contains passed modification setID.
documentID | Document ID |
setID | Checked modification set ID |
Definition at line 588 of file AppBean.java.
|
static |
Refreshes users in client sessions
user | Optional parameter with updated user |
Definition at line 261 of file AppBean.java.
|
static |
Removes authentication data of given user from the global map
system | System from which user come |
login | Login of the user |
Definition at line 374 of file AppBean.java.
|
static |
Removes all applied sets of modifications from hashmap
documentID | Document ID for modification sets removal |
Definition at line 574 of file AppBean.java.
|
static |
Removes client session from the list of sessions
es | Session to be removed |
Definition at line 306 of file AppBean.java.
|
static |
Removes client session from the list of sessions
id | Id of session to be removed |
Definition at line 321 of file AppBean.java.
|
static |
Ensures reload of some URIs loaded from DB
Definition at line 783 of file AppBean.java.
|
static |
Checks whether session with given id exists
id | Id of checked session |
Definition at line 358 of file AppBean.java.
|
static |
Sets list of available type definitions for SEC API
avTypeDefinitions | List of available type definitions for SEC API |
Definition at line 926 of file AppBean.java.
|
static |
Sets list of desired type definitions for SEC API
desTypeDefinitions | List of desired type definitions for SEC API |
Definition at line 890 of file AppBean.java.
|
static |
Sets list of desired type definitions for SEC API entity autocomplete
desTypeDefinitionsEA | List of desired type definitions for SEC API entity autocomplete |
Definition at line 963 of file AppBean.java.
|
static |
Sets authentication data of given user in the global map
system | System from which user come |
login | Login of the user |
data | String with authentication data for the user |
Definition at line 392 of file AppBean.java.
|
static |
Sets URI prefix for images from controlled vocabulary
KBImagePrefix | URI prefix for images from controlled vocabulary |
Definition at line 854 of file AppBean.java.
|
static |
Sets list of requested type definitions for SEC API
reqTypeDefinitions | List of requested type definitions for SEC API |
Definition at line 872 of file AppBean.java.
|
static |
Sets list of requested type definitions for SEC API entity autocomplete
reqTypeDefinitionsEA | List of requested type definitions for SEC API entity autocomplete |
Definition at line 981 of file AppBean.java.
|
static |
Sets instance of SEC API interface
secApiInterface | Instance of SEC API interface |
Definition at line 455 of file AppBean.java.
|
static |
Sets address of the SEC API server for annotation suggestions
secApiServerUri | Address of the SEC server for annotation suggestions |
Definition at line 794 of file AppBean.java.
|
static |
|
static |
Sets list of unnecessary attribute definitions for SEC API
unAtDefinitions | List of unnecessary attribute definitions for SEC API |
Definition at line 944 of file AppBean.java.
|
static |
Sets list of unnecessary attribute definitions for SEC API entity autocomplete
unAtDefinitionsEA | List of unnecessary attribute definitions for SEC API entity autocomplete |
Definition at line 999 of file AppBean.java.
|
static |
Sets list of unnecessary type definitions for SEC API
unTypeDefinitions | List of unnecessary type definitions for SEC API |
Definition at line 908 of file AppBean.java.
|
static |
Sets list of unnecessary type definitions for SEC API entity autocomplete
unTypeDefinitionsEA | List of unnecessary type definitions for SEC API |
Definition at line 1017 of file AppBean.java.
|
staticprivate |
List of available type definitions for SEC API
Definition at line 91 of file AppBean.java.
|
staticprivate |
List of desired type definitions for SEC API
Definition at line 93 of file AppBean.java.
|
staticprivate |
List of desired type definitions for SEC API entity autocomplete
Definition at line 101 of file AppBean.java.
|
staticprivate |
HashMap for last 3 used text modification on document. <documentID, lastModifications>
Definition at line 72 of file AppBean.java.
|
staticprivate |
HashMap for id of last used text modification on document. <documentID, lastModificationID>
Definition at line 70 of file AppBean.java.
|
static |
Definition at line 78 of file AppBean.java.
|
staticprivate |
Counters of how many instances of document is opened.
Definition at line 68 of file AppBean.java.
|
staticprivate |
Map with user authentication data for external authentication
Definition at line 64 of file AppBean.java.
|
staticprivate |
Next id for session
Definition at line 57 of file AppBean.java.
|
staticprivate |
Instance of AppBean
Definition at line 50 of file AppBean.java.
|
staticprivate |
URI prefix for images from controlled vocabulary
Definition at line 87 of file AppBean.java.
|
staticprivate |
Instance of LockMaster
Definition at line 76 of file AppBean.java.
|
staticprivate |
Should be usage of getAlternativesFor logged (for measurement purposes)?
Definition at line 107 of file AppBean.java.
|
staticprivate |
Persistence manager
Definition at line 53 of file AppBean.java.
|
staticprivate |
List of requested type definitions for SEC API
Definition at line 89 of file AppBean.java.
|
staticprivate |
List of requested type definitions for SEC API entity autocomplete
Definition at line 99 of file AppBean.java.
|
staticprivate |
Response creator (single instance for whole application)
Definition at line 55 of file AppBean.java.
|
staticprivate |
Instance of SEC API Interface
Definition at line 74 of file AppBean.java.
|
staticprivate |
SEC API SERVER URI
Definition at line 85 of file AppBean.java.
|
staticprivate |
Server URI
Definition at line 81 of file AppBean.java.
|
staticprivate |
Was server URI loaded?
Definition at line 83 of file AppBean.java.
|
staticprivate |
Instance of SessionsCleaner
Definition at line 66 of file AppBean.java.
|
staticprivate |
List of active sessions
Definition at line 62 of file AppBean.java.
|
staticprivate |
Next temporary id for suggested annotation
Definition at line 59 of file AppBean.java.
|
staticprivate |
List of unnecessary attribute definitions for SEC API
Definition at line 97 of file AppBean.java.
|
staticprivate |
List of unnecessary attribute definitions for SEC API entity autocomplete
Definition at line 105 of file AppBean.java.
|
staticprivate |
List of unnecessary type definitions for SEC API
Definition at line 95 of file AppBean.java.
|
staticprivate |
List of unnecessary type definitions for SEC API entity autocomplete
Definition at line 103 of file AppBean.java.