static IsisSessionFactory getIsisSessionFactory() { return IsisContext.getSessionFactory(); } }
@Override public PersistenceSession getPersistenceSession() { return IsisContext.getPersistenceSession(); }
protected AuthenticationSession getSession() { return IsisContext.getAuthenticationSession(); }
protected SpecificationLoaderSpi getSpecificationLoader() { return IsisContext.getSpecificationLoader(); }
public boolean isMetaModelValid() { return IsisContext.getMetaModelInvalidExceptionIfAny() == null; } //endregion
protected void initIfRequiredThenOpenSession() throws Exception { final MetaModelInvalidException mmie = IsisContext.getMetaModelInvalidExceptionIfAny(); if(mmie != null) { final Set<String> validationErrors = mmie.getValidationErrors(); final MetaModelInvalidException ex = IsisContext.getMetaModelInvalidExceptionIfAny(); if (ex != null) { IsisContext.testReset();
protected static OidMarshaller getOidMarshaller() { return IsisContext.getOidMarshaller(); }
@Override public Localization getLocalization() { return IsisContext.getLocalization(); }
@Override public IsisConfiguration getConfiguration() { return IsisContext.getConfiguration(); }
protected SpecificationLoader getSpecificationLookup() { return IsisContext.getSpecificationLoader(); }
private static void ensureMetamodelIsValid() { final MetaModelInvalidException ex = IsisContext.getMetaModelInvalidExceptionIfAny(); if(ex != null) { final Set<String> validationErrors = ex.getValidationErrors(); final StringBuilder buf = new StringBuilder(); for (String validationError : validationErrors) { buf.append(validationError).append("\n"); } throw new IllegalStateException("Metamodel validation errors: \n" + buf.toString()); } }
private void initIfRequiredThenOpenSession(FireListeners fireListeners) throws Exception { final MetaModelInvalidException mmie = IsisContext.getMetaModelInvalidExceptionIfAny(); if(mmie != null) { final Set<String> validationErrors = mmie.getValidationErrors(); final MetaModelInvalidException ex = IsisContext.getMetaModelInvalidExceptionIfAny(); if (ex != null) { IsisContext.testReset();
protected static OidMarshaller getOidMarshaller() { return IsisContext.getOidMarshaller(); }
protected Localization getLocalization() { return IsisContext.getLocalization(); }
protected IsisConfiguration getConfiguration () { return IsisContext.getConfiguration(); }
IsisSessionFactory getSessionFactory() { return IsisContext.getSessionFactory(); } }
/** * Must use {@link IsisContext context}, because although this object is * recreated with each {@link PersistenceSession session}, the persisted * objects that get * {@link #attachPersistedObjects(MemoryObjectStorePersistedObjects) * attached} to it span multiple sessions. * * <p> * The alternative design would be to laboriously inject this object via the * {@link InMemoryObjectStore}. */ protected PersistenceSession getPersistenceSession() { return IsisContext.getPersistenceSession(); }
protected SpecificationLoaderSpi getSpecificationLoader() { return IsisContext.getSpecificationLoader(); }
@Override public AuthenticationSession getAuthenticationSession() { return IsisContext.getAuthenticationSession(); }
@Override void shutdown() { if(IsisContext.getMetaModelInvalidExceptionIfAny() != null) { // suppress logging translations return; } logTranslations(); }