Package com.avoka.fc.core.dao
Class ServerNodeDao
java.lang.Object
com.avoka.core.dao.BaseDao
com.avoka.fc.core.dao.AbstractDao
com.avoka.fc.core.dao.ServerNodeDao
Provides a DAO for the ServerNode entity.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The server node type enum -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The default Max Form Worker Queue length.static final int
The default Max Form Worker Thread.static final String
The name of the pre-defined FC Portal Server NodeFields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Create default form server.boolean
Ensure server node exists.Gets the active admin server nodes.getActivePortalNodes
(String groupName) Gets the active portal nodes.Return the list of PortalServerNodes.Return the server node for the current server (by hostname / IP address) that matches onServerNode.SERVER_TYPE_ADMIN
,ServerNode.SERVER_TYPE_PORTAL
,ServerNode.SERVER_TYPE_RECEIPT
Return the list of SmartForm Manager server nodes.Return the request's server node, either the Portal or Admin server based on the LocalHost IP Address and the RequestContext.getServerList
(String keyword) Return list of server nodes matching the given search criteria.getServerNodeByName
(String name) Return the server node with the specified name.Return the FormServer node for the given primary key.Gets the server node group.Return the list of server nodes.Gets the Transact server nodes.void
prepareServerNodeForDeletion
(Long serverNodeId) Prepares a server node for deletion by removing all relationships using named queries for performance.void
Register server node by typeMethods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
Field Details
-
DEFAULT_PORTAL_SERVER_NAME_PREFIX
The name of the pre-defined FC Portal Server Node- See Also:
-
DEFAULT_MAX_FW_QUEUE_LENGTH
public static final int DEFAULT_MAX_FW_QUEUE_LENGTHThe default Max Form Worker Queue length.- See Also:
-
DEFAULT_MAX_FW_THREADS
public static final int DEFAULT_MAX_FW_THREADSThe default Max Form Worker Thread.- See Also:
-
-
Constructor Details
-
ServerNodeDao
public ServerNodeDao()
-
-
Method Details
-
ensureServerNodeExists
public boolean ensureServerNodeExists()Ensure server node exists.- Returns:
- true, if new server nodes are created.
-
getServerNodeForPK
Return the FormServer node for the given primary key.- Parameters:
id
- the FormServer node primary key.- Returns:
- the FormServer node for the given primary key
-
getServerList
Return list of server nodes matching the given search criteria.- Parameters:
keyword
- the search keyword- Returns:
- the list of matching servers
-
getCurrentServerNode
Return the server node for the current server (by hostname / IP address) that matches onServerNode.SERVER_TYPE_ADMIN
,ServerNode.SERVER_TYPE_PORTAL
,ServerNode.SERVER_TYPE_RECEIPT
- Returns:
- the current server node matching the specified server type, otherwise null
- Since:
- 5.1.0
-
getFormCenterServerNodes
Return the list of SmartForm Manager server nodes.- Returns:
- the list of server nodes hosting the Admin Console or portals
-
getServerNodes
Return the list of server nodes.- Returns:
- the list of server nodes
-
getCachedTransactServerNodesForLocalGroup
Return the list of PortalServerNodes.- Returns:
- the list of PortalServerNodes
-
getRequestServerNode
Return the request's server node, either the Portal or Admin server based on the LocalHost IP Address and the RequestContext. This method will cache the resolved server node value- Returns:
- the request's server node based on the LocalHost IP Address and the RequestContext
-
getServerNodeGroup
Gets the server node group.- Returns:
- the server node group
-
createServerNode
public void createServerNode()Create default form server. -
registerServerNode
Register server node by type- Parameters:
type
- server node type
-
getServerNodeByName
Return the server node with the specified name.- Parameters:
name
- the name- Returns:
- the matching server node
-
getActivePortalNodes
Gets the active portal nodes.- Parameters:
groupName
- group name- Returns:
- the active portal nodes
-
getTransactNodes
Gets the Transact server nodes.- Returns:
- the transact server nodes
- Since:
- 4.3.4
-
getActiveAdminNodes
Gets the active admin server nodes.- Returns:
- the active admin server nodes
-
prepareServerNodeForDeletion
Prepares a server node for deletion by removing all relationships using named queries for performance. Note: This method DOES NOT DELETE the server node itself. This is the caller's responsibility. It also does not perform a database commit.- Parameters:
serverNodeId
- the OID of the server node that will be deleted by the caller- Since:
- 4.2.0
-