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
-
public class ServerNodeDao extends AbstractDao
Provides a DAO for the ServerNode entity.- See Also:
ServerNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ServerNodeDao.ServerNodeType
The server node type enum
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MAX_FW_QUEUE_LENGTH
The default Max Form Worker Queue length.static int
DEFAULT_MAX_FW_THREADS
The default Max Form Worker Thread.static String
DEFAULT_PORTAL_SERVER_NAME_PREFIX
The name of the pre-defined FC Portal Server Node-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description ServerNodeDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createServerNode()
Create default form server.boolean
ensureServerNodeExists()
Ensure server node exists.List<ServerNode>
getActiveAdminNodes()
Gets the active admin server nodes.List<ServerNode>
getActivePortalNodes(String groupName)
Gets the active portal nodes.List<ServerNode>
getCachedTransactServerNodesForLocalGroup()
Return the list of PortalServerNodes.ServerNode
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
List<ServerNode>
getFormCenterServerNodes()
Return the list of SmartForm Manager server nodes.ServerNode
getRequestServerNode()
Return the request's server node, either the Portal or Admin server based on the LocalHost IP Address and the RequestContext.List<ServerNode>
getServerList(String keyword)
Return list of server nodes matching the given search criteria.ServerNode
getServerNodeByName(String name)
Return the server node with the specified name.ServerNode
getServerNodeForPK(Object id)
Return the FormServer node for the given primary key.String
getServerNodeGroup()
Gets the server node group.List<ServerNode>
getServerNodes()
Return the list of server nodes.List<ServerNode>
getTransactNodes()
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
registerServerNode(ServerNodeDao.ServerNodeType type)
Register server node by type-
Methods 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 Detail
-
DEFAULT_PORTAL_SERVER_NAME_PREFIX
public static final String DEFAULT_PORTAL_SERVER_NAME_PREFIX
The name of the pre-defined FC Portal Server Node- See Also:
- Constant Field Values
-
DEFAULT_MAX_FW_QUEUE_LENGTH
public static final int DEFAULT_MAX_FW_QUEUE_LENGTH
The default Max Form Worker Queue length.- See Also:
- Constant Field Values
-
DEFAULT_MAX_FW_THREADS
public static final int DEFAULT_MAX_FW_THREADS
The default Max Form Worker Thread.- See Also:
- Constant Field Values
-
-
Method Detail
-
ensureServerNodeExists
public boolean ensureServerNodeExists()
Ensure server node exists.- Returns:
- true, if new server nodes are created.
-
getServerNodeForPK
public ServerNode getServerNodeForPK(Object id)
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
public List<ServerNode> getServerList(String keyword)
Return list of server nodes matching the given search criteria.- Parameters:
keyword
- the search keyword- Returns:
- the list of matching servers
-
getCurrentServerNode
public ServerNode 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
public List<ServerNode> getFormCenterServerNodes()
Return the list of SmartForm Manager server nodes.- Returns:
- the list of server nodes hosting the Admin Console or portals
-
getServerNodes
public List<ServerNode> getServerNodes()
Return the list of server nodes.- Returns:
- the list of server nodes
-
getCachedTransactServerNodesForLocalGroup
public List<ServerNode> getCachedTransactServerNodesForLocalGroup()
Return the list of PortalServerNodes.- Returns:
- the list of PortalServerNodes
-
getRequestServerNode
public ServerNode 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
public String getServerNodeGroup()
Gets the server node group.- Returns:
- the server node group
-
createServerNode
public void createServerNode()
Create default form server.
-
registerServerNode
public void registerServerNode(ServerNodeDao.ServerNodeType type)
Register server node by type- Parameters:
type
- server node type
-
getServerNodeByName
public ServerNode getServerNodeByName(String name)
Return the server node with the specified name.- Parameters:
name
- the name- Returns:
- the matching server node
-
getActivePortalNodes
public List<ServerNode> getActivePortalNodes(String groupName)
Gets the active portal nodes.- Parameters:
groupName
- group name- Returns:
- the active portal nodes
-
getTransactNodes
public List<ServerNode> getTransactNodes()
Gets the Transact server nodes.- Returns:
- the transact server nodes
- Since:
- 4.3.4
-
getActiveAdminNodes
public List<ServerNode> getActiveAdminNodes()
Gets the active admin server nodes.- Returns:
- the active admin server nodes
-
prepareServerNodeForDeletion
public void prepareServerNodeForDeletion(Long serverNodeId)
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
-
-