Class PortalDao


public class PortalDao extends AbstractDao
Provides a DAO for the Portal entity.
See Also:
  • Constructor Details

    • PortalDao

      public PortalDao()
  • Method Details

    • clearThreadLocalCache

      @Deprecated public static void clearThreadLocalCache()
      Deprecated.
      Clear the thread local user account cache.
      Since:
      4.3.2
    • getObjectForPK

      public Portal getObjectForPK(Object object)
      Return the portal with the specified OID
      Parameters:
      object - the OID
      Returns:
      the matching portal, or null if not found
    • getRequestPortal

      public Portal getRequestPortal(jakarta.servlet.http.HttpServletRequest request)
      Return the SmartForm Manager portal associated with the specified request. The portal is looked up by context path.
      Parameters:
      request - the HTTP servlet request
      Returns:
      the portal associated from the request, null if no portal matches the request context
      Since:
      5.1.0
    • getPortalList

      public List<Portal> getPortalList(String keyword, String clientId, Boolean formSpace)
      Return the list of portals matching the specified search criteria
      Parameters:
      keyword - a search keyword (optional)
      clientId - the client OID (optional). If set, only portals assigned to the client will be returned.
      formSpace - specify whether a form space or not
      Returns:
      the list of matching portals
    • getPortalList

      public List<Portal> getPortalList(String keyword, String clientId, Boolean formSpace, Status status)
      Return the list of portals matching the specified search criteria
      Parameters:
      keyword - a search keyword (optional). It can be on name, LastModifiedDate, CreatedAt and Version. Date format should be "dd MMM yyyy" like how It shows in UI.
      clientId - the client OID (optional). If set, only portals assigned to the client will be returned.
      formSpace - specify whether a form space or not
      status - specify the status of space
      Returns:
      the list of matching portals
      Since:
      24.4.0
    • getPortalList

      public List<Portal> getPortalList()
      Return the full list of portals, excluding the "Receipts" type portal, ordered by name.
      Returns:
      the list of portals
    • getPortalsWithPermissions

      public List<Portal> getPortalsWithPermissions()
      Return the list of portals which have associated permissions.
      Returns:
      the list of portals which have associated permissions.
      Since:
      4.2.0
    • getPortalsByType

      public List<Portal> getPortalsByType(String portalType)
      Return the list of portals of a specific type, ordered by name
      Parameters:
      portalType - the portal type (one of Portal.PORTAL_TYPE_VALUES
      Returns:
      the list of portals
    • getFormPortalList

      public List<Portal> getFormPortalList()
      The list of portals that can be used to host forms
      Returns:
      the list of portals with _Portal.FORMS_FLAG_PROPERTY set
    • getPortalByName

      public Portal getPortalByName(String name)
      Return the portal with the specified name
      Parameters:
      name - the non-null name
      Returns:
      the matching portal
    • getPortalsForClient

      public List<Portal> getPortalsForClient(String clientId)
      Return the list of portals that the given client has access to
      Parameters:
      clientId - the OID of an existing client
      Returns:
      the list of forms portals that this client has access to
    • getAdminConsolePortal

      public Portal getAdminConsolePortal()
      Return the Administration Console portal
      Returns:
      the portal with the name defined in Portal.PORTAL_ADMIN_CONSOLE
    • getInsightsPortal

      public Portal getInsightsPortal()
      Return the Transact Insights portal
      Returns:
      the portal with the name defined in Portal.PORTAL_TRANSACT_INSIGHTS
      Since:
      5.0
    • getMaestroPortal

      public Portal getMaestroPortal()
      Return the Transact Maestro portal
      Returns:
      the portal with the name defined in Portal.PORTAL_TRANSACT_MAESTRO
      Since:
      5.0
    • getOperationsPortal

      public Portal getOperationsPortal()
      Return the Transact Operations portal
      Returns:
      the portal with the name defined in Portal.PORTAL_TRANSACT_OPERATIONS
      Since:
      22.10.0
    • getExchangePortal

      public Portal getExchangePortal()
      Return the Avoka Exchange portal
      Returns:
      the portal with the name defined in Portal.PORTAL_AVOKA_EXCHANGE
      Since:
      17.10.0
    • getTransactReceiptsPortal

      public Portal getTransactReceiptsPortal()
      Return the Transact Receipts portal
      Returns:
      the portal with the name defined in Portal.PORTAL_TRANSACT_RECEIPTS
      Since:
      5.1.0
    • getPortalByContextPath

      public Portal getPortalByContextPath(String contextPath)
      Return the portal matching the given context path
      Parameters:
      contextPath - the context path (leading protocol indicators such as "http://" will be ignored)
      Returns:
      the portal with a context path matching the specified context path
    • getPortalForLocalhost

      public Portal getPortalForLocalhost(String contextPath)
      Return the portal matching the given context path to localhost
      Parameters:
      contextPath - the context path containing localhost or 127.0.0.1
      Returns:
      the portal whose context path contains the relative context path (e.g. "forms" for "http://localhost:9080/forms/index.htm")
    • getDefaultPortal

      public Portal getDefaultPortal()
      Return the default portal
      Returns:
      the portal for which _Portal.DEFAULT_FLAG_PROPERTY is set
    • setDefaultPortal

      public void setDefaultPortal(Portal newDefaultPortal)
      Set the default portal to a specific portal. On successful completion, only one portal is marked as the default portal. This method executes a database commit.
      Parameters:
      newDefaultPortal - the new default portal.
    • unsetDefaultPortal

      public void unsetDefaultPortal(Portal oldDefaultPortal)
      Unsets the default flag for a portal. Another portal is set as the default portal. This method executes a database commit.
      Parameters:
      oldDefaultPortal - the current default portal
    • getPortalsForUser

      public List<Portal> getPortalsForUser(UserAccount userAccount)
      Return the set of portals associated with a user account
      Parameters:
      userAccount - the non-null user account
      Returns:
      the set of portals, sorted by name
    • loadAdminConsolePortal

      public void loadAdminConsolePortal()
      Initialize the portal record for the administration console, if a portal named Portal.PORTAL_ADMIN_CONSOLE does not already exist
    • getPortalsWithoutSecurityManager

      public List<Portal> getPortalsWithoutSecurityManager()
      Return all portals not explicitly associated with a security manager. TM uses the default security manager for these portals. Note: This does NOT return all portals using the default security manager. Notably, if a portal is explicitly associated with the default security manager, it is not included.
      Returns:
      the set of portals for which no security manager is set
      Since:
      4.3.0