public static InternalAPIAccessor getRESTServerAPIAccessor(){ return getObject(InternalAPIAccessor.class, true); }
@SuppressWarnings("unchecked") private static <T> T getObject(final Class<T> clazz, final boolean isREST) { try { String implementationClassName = null; if(isREST){ implementationClassName = getMapping().getProperty(clazz.getName()+"REST"); } else { implementationClassName = getMapping().getProperty(clazz.getName()); } if (implementationClassName == null) { String message = ExceptionManager.getInstance().getFullMessage("baa_SIAPIAF_2", clazz.getName()); throw new BonitaInternalException(message); } final ClassLoader cl = Thread.currentThread().getContextClassLoader(); final Class<T> implClass = (Class<T>) cl.loadClass(implementationClassName); return implClass.newInstance(); } catch (final Exception e) { throw new BonitaRuntimeException(e); } }
LocalAPIAccessorFactory.getStandardServerAPIAccessor(); if (LOG.isLoggable(Level.INFO)) { LOG.info(AccessorUtil.class.getName() + " called from server side. Using " + Context.Standard + " context.");
@SuppressWarnings("unchecked") private static <T> T getObject(final Class<T> clazz, final boolean isREST) { try { String implementationClassName = null; if(isREST){ implementationClassName = getMapping().getProperty(clazz.getName()+"REST"); } else { implementationClassName = getMapping().getProperty(clazz.getName()); } if (implementationClassName == null) { String message = ExceptionManager.getInstance().getFullMessage("baa_SIAPIAF_2", clazz.getName()); throw new BonitaInternalException(message); } final ClassLoader cl = Thread.currentThread().getContextClassLoader(); final Class<T> implClass = (Class<T>) cl.loadClass(implementationClassName); return implClass.newInstance(); } catch (final Exception e) { throw new BonitaRuntimeException(e); } }
LocalAPIAccessorFactory.getStandardServerAPIAccessor(); if (LOG.isLoggable(Level.INFO)) { LOG.info(AccessorUtil.class.getName() + " called from server side. Using " + Context.Standard + " context.");
public static InternalQueryAPIAccessor getStandardServerQueryAPIAccessor() { return getObject(InternalQueryAPIAccessor.class, false); }
public static InternalQueryAPIAccessor getRESTServertQueryAPIAccessor(){ return getObject(InternalQueryAPIAccessor.class, true); }
public static InternalQueryAPIAccessor getStandardServerQueryAPIAccessor() { return getObject(InternalQueryAPIAccessor.class, false); }
public static InternalAPIAccessor getRESTServerAPIAccessor(){ return getObject(InternalAPIAccessor.class, true); }
public static InternalAPIAccessor getStandardServerAPIAccessor() { return getObject(InternalAPIAccessor.class, false); }
public static InternalAPIAccessor getStandardServerAPIAccessor() { return getObject(InternalAPIAccessor.class, false); }
public static InternalQueryAPIAccessor getRESTServertQueryAPIAccessor(){ return getObject(InternalQueryAPIAccessor.class, true); }