public class PortalUtilInternal extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
PortalUtilInternal.ISessionConfigAware<T>
Piece of code that runs with a session config.
|
static interface |
PortalUtilInternal.ITransactionAware<T>
Piece of code that runs with a transaction.
|
Constructor and Description |
---|
PortalUtilInternal() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
execWithSessionConfig(PortalUtilInternal.ISessionConfigAware<T> code)
Executes the given code with the current session config.
|
static <T> T |
execWithSessionConfigWithSilentThrow(PortalUtilInternal.ISessionConfigAware<T> code)
Executes the given code with the current session config.
|
static <T> T |
execWithSilentThrow(Callable<T> c)
Executes the given code with no exception.
|
static <T> T |
execWithTransaction(boolean createIfNeeded,
PortalUtilInternal.ITransactionAware<T> code)
Executes the given code with the given transaction.
|
static <T> T |
execWithTransaction(PortalUtilInternal.ITransactionAware<T> code)
Executes the given code using the current transaction.
|
static <T> T |
execWithTransactionWithSilentThrow(boolean createTransactionIfRequired,
PortalUtilInternal.ITransactionAware<T> code)
Executes the given code with the given transaction.
|
static <T> T |
execWithTransactionWithSilentThrow(PortalUtilInternal.ITransactionAware<T> code)
Executes the given code using the current transaction.
|
static Document |
getDefinitionDocument(String relativePath)
Returns the XML Document for a definition file.
|
static org.jsoup.nodes.Element |
getPageHolderHtmlByServiceInterfaceInstance(String lumServiceInterfaceInstance)
Returns the service interface instance pageholder HTML fragment,
if there is any.
|
static void |
throwUncheckedly(Throwable t)
Throws uncheckedly checked exceptions
|
public static Document getDefinitionDocument(String relativePath) throws PortalException
relativePath
- the relative path of the file. Must not start with '/'.PortalException
- if the document could not be read.public static org.jsoup.nodes.Element getPageHolderHtmlByServiceInterfaceInstance(String lumServiceInterfaceInstance) throws PortalException
lumServiceInterfaceInstance
- a lumis servince interface instancePortalException
public static void throwUncheckedly(Throwable t)
t
- the checked exception.public static <T> T execWithSilentThrow(Callable<T> c)
throw uncheckedly
.c
- the code.public static <T> T execWithTransaction(PortalUtilInternal.ITransactionAware<T> code) throws Exception
code
- the code.Exception
public static <T> T execWithTransaction(boolean createIfNeeded, PortalUtilInternal.ITransactionAware<T> code) throws Exception
createIfNeeded
parameter
is true
and no transaction is available, a new transaction will be created.createIfNeeded
- indicates whether a transaction should be created if no current transaction is available.code
- the code.Exception
public static <T> T execWithTransactionWithSilentThrow(boolean createTransactionIfRequired, PortalUtilInternal.ITransactionAware<T> code)
createIfNeeded
parameter
is true
and no transaction is available, a new transaction will be created.
Unlike execWithTransaction(boolean, ITransactionAware)
, this method does not declare any throw.createIfNeeded
- indicates whether a transaction should be created if no current transaction is available.code
- the code.public static <T> T execWithTransactionWithSilentThrow(PortalUtilInternal.ITransactionAware<T> code)
execWithTransaction(ITransactionAware)
, this method does not declare any throw.code
- the code.public static <T> T execWithSessionConfigWithSilentThrow(PortalUtilInternal.ISessionConfigAware<T> code)
execWithSessionConfig(ISessionConfigAware)
, this method does not declare any throw.code
- the code.public static <T> T execWithSessionConfig(PortalUtilInternal.ISessionConfigAware<T> code) throws Exception
code
- the code.Exception
Lumisportal 10.1.2.170428 - Copyright © 2006–2017 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.