public final class LegacyUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
beginLegacyContext() |
static <T> T |
doInLegacyContext(Callable<T> callable)
Performs the specified
Callable inside of the legacy context. |
static <T> T |
doInLegacyContext(String documentId,
UserSession userSession,
Callable<T> callable)
Performs the specified
Callable inside of both the legacy context (if necessary as dependent on the
documentId) and in new GlobalVariables as specified by the given userSession. |
static void |
endLegacyContext() |
static boolean |
isInLegacyContext() |
static boolean |
isKnsDocumentEntry(DocumentEntry documentEntry)
Indicates whether or not the given DocumentEntry represents a legacy KNS document entry.
|
static boolean |
isKnsEnabled() |
static boolean |
isKradDataManaged(Class<?> type)
Indicates whether the given type is managed by the non-legacy data framework.
|
static boolean |
isLegacyDataFrameworkEnabled()
Return whether the legacy data framework is enabled
|
static boolean |
isLegacyManaged(Class<?> type)
Indicates whether the given type is managed by the legacy data framework.
|
static boolean |
useLegacy(Class<?> dataObjectClass)
Return whether objects of the given class should be handled via the legacy data framework
|
static boolean |
useLegacyForObject(Object dataObject)
Return whether the object should be handled via the legacy data framework
|
public static boolean isLegacyManaged(Class<?> type)
type - the type to checkpublic static boolean isKradDataManaged(Class<?> type)
type - the type to checkpublic static boolean isKnsDocumentEntry(DocumentEntry documentEntry)
documentEntry - the document entry to checkpublic static boolean isKnsEnabled()
public static boolean isLegacyDataFrameworkEnabled()
public static boolean useLegacy(Class<?> dataObjectClass)
dataObjectClass - the data object classpublic static boolean useLegacyForObject(Object dataObject)
dataObject - the data objectpublic static boolean isInLegacyContext()
public static void beginLegacyContext()
public static void endLegacyContext()
public static <T> T doInLegacyContext(Callable<T> callable) throws Exception
Callable inside of the legacy context.T - the return type of the callablecallable - the method to call inside of the new contextsException - any exception thrown during the execution of the contextpublic static <T> T doInLegacyContext(String documentId, UserSession userSession, Callable<T> callable) throws Exception
Callable inside of both the legacy context (if necessary as dependent on the
documentId) and in new GlobalVariables as specified by the given userSession.T - the return type of the callabledocumentId - id of the document for which to establish the data contextuserSession - the new user session to establishcallable - the method to call inside of the new contextsException - any exception thrown during the execution of the contextCopyright © 2005–2015 The Kuali Foundation. All rights reserved.