Package com.avoka.fc.core.dao
Class PortalDao
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.PortalDao
-
public class PortalDao extends AbstractDao
Provides a DAO for the Portal entity.- See Also:
Portal
-
-
Field Summary
-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description PortalDao()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
clearThreadLocalCache()
Deprecated.Portal
getAdminConsolePortal()
Return the Administration Console portalPortal
getDefaultPortal()
Return the default portalPortal
getExchangePortal()
Return the Avoka Exchange portalList<Portal>
getFormPortalList()
The list of portals that can be used to host formsPortal
getInsightsPortal()
Return the Transact Insights portalPortal
getMaestroPortal()
Return the Transact Maestro portalPortal
getObjectForPK(Object object)
Return the portal with the specified OIDPortal
getPortalByContextPath(String contextPath)
Return the portal matching the given context pathPortal
getPortalByName(String name)
Return the portal with the specified namePortal
getPortalForLocalhost(String contextPath)
Return the portal matching the given context path to localhostList<Portal>
getPortalList()
Return the full list of portals, excluding the "Receipts" type portal, ordered by name.List<Portal>
getPortalList(String keyword, String clientId, Boolean formSpace)
Return the list of portals matching the specified search criteriaList<Portal>
getPortalsByType(String portalType)
Return the list of portals of a specific type, ordered by nameList<Portal>
getPortalsForClient(String clientId)
Return the list of portals that the given client has access toList<Portal>
getPortalsForUser(UserAccount userAccount)
Return the set of portals associated with a user accountList<Portal>
getPortalsWithoutSecurityManager()
Return all portals not explicitly associated with a security manager.List<Portal>
getPortalsWithPermissions()
Return the list of portals which have associated permissions.Portal
getRequestPortal(HttpServletRequest request)
Return the SmartForm Manager portal associated with the specified request.Portal
getTransactReceiptsPortal()
Return the Transact Receipts portalvoid
loadAdminConsolePortal()
Initialize the portal record for the administration console, if a portal namedPortal.PORTAL_ADMIN_CONSOLE
does not already existvoid
setDefaultPortal(Portal newDefaultPortal)
Set the default portal to a specific portal.void
unsetDefaultPortal(Portal oldDefaultPortal)
Unsets the default flag for a portal.-
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
-
-
-
-
Method Detail
-
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(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()
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 ofPortal.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
-
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/landing.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 namedPortal.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
-
-