Class ServerNodeDao


public class ServerNodeDao extends AbstractDao
Provides a DAO for the ServerNode entity.
See Also:
  • Field Details

    • 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:
    • DEFAULT_MAX_FW_QUEUE_LENGTH

      public static final int DEFAULT_MAX_FW_QUEUE_LENGTH
      The default Max Form Worker Queue length.
      See Also:
    • DEFAULT_MAX_FW_THREADS

      public static final int DEFAULT_MAX_FW_THREADS
      The 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

      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 on ServerNode.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