private void forElement(XMap element, boolean custom, String graniteConfigProperties) { String scan = element.get("@scan"); this.scan = Boolean.TRUE.toString().equals(scan); loadCustomAMF3Serializer(element, custom); loadCustomConverters(element, custom); loadCustomInstantiators(element, custom); loadCustomClassGetter(element, custom); loadCustomExternalizers(element, custom); loadCustomDescriptors(element, custom); if (this.scan) scanConfig(graniteConfigProperties); finishCustomConverters(custom); }
public Class<? extends ActionScriptClassDescriptor> getActionScriptDescriptor(String type) { return getElementByType(type, ASC_DESCRIPTOR_FACTORY, as3DescriptorsByType, as3DescriptorsByInstanceOf, null, null); }
public boolean handleMarkerItem(ScannedItem item) { try { return handleProperties(item.loadAsProperties()); } catch (Exception e) { log.error(e, "Could not load properties: %s", item); } return true; }
public void handleScannedItem(ScannedItem item) { if ("class".equals(item.getExtension()) && item.getName().indexOf('$') == -1) { try { handleClass(item.loadAsClass()); } catch (NoClassDefFoundError e) { // Ignore errors with Tide classes depending on Gravity } catch (LinkageError e) { // Ignore errors with GraniteDS/Hibernate classes depending on Hibernate 3 when using Hibernate 4 } catch (Throwable t) { log.error(t, "Could not load class: %s", item); } } }
public void load() { InputStream is = null; try { is = Thread.currentThread().getContextClassLoader().getResourceAsStream(graniteStdConfigPath); if (graniteConfigPath != null) is = Thread.currentThread().getContextClassLoader().getResourceAsStream(graniteConfigPath); graniteConfig = new ClientGraniteConfig(graniteStdConfigPath, is, null, null); postLoad(graniteConfig); servicesConfig = new ClientServicesConfig(); } catch (Exception e) { graniteConfig = null; servicesConfig = null; throw new RuntimeException("Cannot load configuration", e); } finally { if (is != null) try { is.close(); } catch (IOException e) { } } }
is = StreamUtil.getResourceAsStream("org/granite/client/configuration/granite-config.xml", loader); XMap doc = new XMap(is, resolver); forElement(doc, false, null); } finally { if (is != null) is = StreamUtil.getResourceAsStream(stdConfig, loader); XMap doc = new XMap(is, resolver); forElement(doc, false, null); } finally { if (is != null) forElement(doc, true, configuration != null ? configuration.getGraniteConfigProperties() : null);
public boolean handleMarkerItem(ScannedItem item) { try { return handleProperties(item.loadAsProperties()); } catch (Exception e) { log.error(e, "Could not load properties: %s", item); } return true; }
public void handleScannedItem(ScannedItem item) { if ("class".equals(item.getExtension()) && item.getName().indexOf('$') == -1) { try { handleClass(item.loadAsClass()); } catch (NoClassDefFoundError e) { // Ignore errors with Tide classes depending on Gravity } catch (LinkageError e) { // Ignore errors with GraniteDS/Hibernate classes depending on Hibernate 3 when using Hibernate 4 } catch (Throwable t) { log.error(t, "Could not load class: %s", item); } } }
public void load() { InputStream is = null; try { is = Thread.currentThread().getContextClassLoader().getResourceAsStream(graniteStdConfigPath); if (graniteConfigPath != null) is = Thread.currentThread().getContextClassLoader().getResourceAsStream(graniteConfigPath); graniteConfig = new ClientGraniteConfig(graniteStdConfigPath, is, null, null); postLoad(graniteConfig); servicesConfig = new ClientServicesConfig(); } catch (Exception e) { graniteConfig = null; servicesConfig = null; throw new RuntimeException("Cannot load configuration", e); } finally { if (is != null) try { is.close(); } catch (IOException e) { } } }
is = StreamUtil.getResourceAsStream("org/granite/client/configuration/granite-config.xml", loader); XMap doc = new XMap(is, resolver); forElement(doc, false, null); } finally { if (is != null) is = StreamUtil.getResourceAsStream(stdConfig, loader); XMap doc = new XMap(is, resolver); forElement(doc, false, null); } finally { if (is != null) forElement(doc, true, configuration != null ? configuration.getGraniteConfigProperties() : null);
private void forElement(XMap element, boolean custom, String graniteConfigProperties) { String scan = element.get("@scan"); this.scan = Boolean.TRUE.toString().equals(scan); loadCustomAMF3Serializer(element, custom); loadCustomConverters(element, custom); loadCustomInstantiators(element, custom); loadCustomClassGetter(element, custom); loadCustomExternalizers(element, custom); loadCustomDescriptors(element, custom); if (this.scan) scanConfig(graniteConfigProperties); finishCustomConverters(custom); }
public Class<? extends JavaClassDescriptor> getJavaDescriptor(String type) { return getElementByType(type, JC_DESCRIPTOR_FACTORY, javaDescriptorsByType, javaDescriptorsByInstanceOf, null, null); }
public Class<? extends ActionScriptClassDescriptor> getActionScriptDescriptor(String type) { return getElementByType(type, ASC_DESCRIPTOR_FACTORY, as3DescriptorsByType, as3DescriptorsByInstanceOf, null, null); }
public Class<? extends JavaClassDescriptor> getJavaDescriptor(String type) { return getElementByType(type, JC_DESCRIPTOR_FACTORY, javaDescriptorsByType, javaDescriptorsByInstanceOf, null, null); }
public Externalizer getExternalizer(String type) { Externalizer externalizer = getElementByType( type, EXTERNALIZER_FACTORY,
public Externalizer getExternalizer(String type) { Externalizer externalizer = getElementByType( type, EXTERNALIZER_FACTORY,