public class XMLSessionConfigLoader extends Object
Modifier and Type | Class and Description |
---|---|
class |
XMLSessionConfigLoader.XMLSessionConfigLoaderErrorHandler
INTERNAL:
|
Modifier and Type | Field and Description |
---|---|
protected ClassLoader |
classLoader
Define the class loader that should be used to find the resource.
|
protected static String |
DEFAULT_RESOURCE_NAME |
protected static String |
DEFAULT_RESOURCE_NAME_IN_META_INF |
static String |
ECLIPSELINK_SESSIONS_SCHEMA |
protected org.eclipse.persistence.internal.sessions.factories.PersistenceEntityResolver |
entityResolver
Used to store the entity resolver to validate the XML schema when parsing.
|
protected Vector<Throwable> |
exceptionStore
Stores any exceptions that occurred to provide all the exceptions up front if the load fails.
|
protected static Project |
project
Cache the creation and initialization of the Session XML mapping project.
|
protected String |
resourceName |
protected String |
resourcePath
Stores the resource path to provide a better error message if the load fails.
|
protected String |
sessionName
Stores the name of the Session in the sessions XML file desired to be loaded.
|
protected boolean |
shouldCheckClassLoader
Defines if the session will be refreshed from the file if the class loader requesting the load is different than the loaded session's class loader.
|
protected boolean |
shouldLogin
Define if the loaded session should be connected, default true.
|
protected boolean |
shouldRefresh
Define if the loaded session should be refreshed from the file.
|
Constructor and Description |
---|
XMLSessionConfigLoader()
PUBLIC:
This constructor is used when the file resource named 'sessions.xml' will
be parsed for configuration.
|
XMLSessionConfigLoader(String resourceName)
PUBLIC:
This constructor is used when passing in the resource name of the
configuration file that should be parsed
|
Modifier and Type | Method and Description |
---|---|
ClassLoader |
getClassLoader()
PUBLIC:
Return the class loader that should be used to find the resource.
|
Vector<Throwable> |
getExceptionStore()
INTERNAL:
|
protected static Project |
getProject()
Cache the creation and initialization of the Session XML mapping project.
|
String |
getResourceName()
PUBLIC:
Returns the resource name we are trying to load.
|
String |
getResourcePath()
INTERNAL:
Will return the the resource name with full path of the resource file.
|
String |
getSessionName()
PUBLIC:
Returns the name of the Session in the sessions XML file desired to be loaded.
|
boolean |
load(SessionManager sessionManager,
ClassLoader loader)
INTERNAL:
This method instantiates the parser and builds the document based on the
schema.
|
org.eclipse.persistence.internal.sessions.factories.model.SessionConfigs |
loadConfigsForMappingWorkbench(ClassLoader loader)
INTERNAL:
This method is to be used to load config objects for the Mapping Workbench
only.
|
org.eclipse.persistence.internal.sessions.factories.model.SessionConfigs |
loadConfigsForMappingWorkbench(ClassLoader loader,
boolean validate)
INTERNAL:
This method is to be used to load config objects for the Mapping Workbench
only.
|
protected Document |
loadDocument(ClassLoader loader)
INTERNAL:
Load a session.xml document.
|
protected Document |
loadDocument(ClassLoader loader,
boolean validate)
INTERNAL:
Load a session.xml document.
|
void |
setClassLoader(ClassLoader classLoader)
PUBLIC:
Set the class loader that should be used to find the resource.
|
void |
setResourceName(String resourceName)
PUBLIC:
Set the resource name we are trying to load.
|
void |
setSessionName(String sessionName)
PUBLIC:
Set the name of the Session in the sessions XML file desired to be loaded.
|
void |
setShouldCheckClassLoader(boolean shouldCheckClassLoader)
PUBLIC:
Set if the session will be refreshed from the file if the class loader requesting the load is different than the loaded session's class loader.
|
void |
setShouldLogin(boolean shouldLogin)
PUBLIC:
Set if the loaded session should be connected.
|
void |
setShouldRefresh(boolean shouldRefresh)
PUBLIC:
Set if the loaded session should be refreshed from the file.
|
boolean |
shouldCheckClassLoader()
PUBLIC:
Return if the session will be refreshed from the file if the class loader requesting the load is different than the loaded session's class loader.
|
boolean |
shouldLogin()
PUBLIC:
Return if the loaded session should be connected.
|
boolean |
shouldRefresh()
PUBLIC:
Return if the loaded session should be refreshed from the file.
|
protected String resourceName
protected String resourcePath
protected String sessionName
protected boolean shouldLogin
protected boolean shouldRefresh
protected ClassLoader classLoader
protected boolean shouldCheckClassLoader
protected Vector<Throwable> exceptionStore
protected org.eclipse.persistence.internal.sessions.factories.PersistenceEntityResolver entityResolver
public static final String ECLIPSELINK_SESSIONS_SCHEMA
protected static final String DEFAULT_RESOURCE_NAME
protected static final String DEFAULT_RESOURCE_NAME_IN_META_INF
protected static final Project project
public XMLSessionConfigLoader()
public XMLSessionConfigLoader(String resourceName)
protected static Project getProject()
public String getResourcePath()
public String getResourceName()
public void setResourceName(String resourceName)
public String getSessionName()
public void setSessionName(String sessionName)
public boolean shouldLogin()
public void setShouldLogin(boolean shouldLogin)
public boolean shouldRefresh()
public void setShouldRefresh(boolean shouldRefresh)
public boolean shouldCheckClassLoader()
public void setShouldCheckClassLoader(boolean shouldCheckClassLoader)
public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader classLoader)
public boolean load(SessionManager sessionManager, ClassLoader loader)
public org.eclipse.persistence.internal.sessions.factories.model.SessionConfigs loadConfigsForMappingWorkbench(ClassLoader loader)
public org.eclipse.persistence.internal.sessions.factories.model.SessionConfigs loadConfigsForMappingWorkbench(ClassLoader loader, boolean validate)
protected Document loadDocument(ClassLoader loader)
protected Document loadDocument(ClassLoader loader, boolean validate)
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.