public MetaData internalExecute(ControllerContext context) { return context.getScopeInfo().getMetaData(); } }
public ScopeInfo getScopeInfo() { ScopeInfo scopeInfo = delegate.getScopeInfo(); return scopeInfo != null ? new UnmodifiableScopeInfo(scopeInfo) : null; }
protected void preAliasInstall(ControllerContext aliasContext) { ScopeInfo scopeInfo = aliasContext.getScopeInfo(); scopeInfo.setInstallScope(scopeKey); }
public ScopeKey internalExecute(ControllerContext context) { return context.getScopeInfo().getScope(); } }
public ScopeKey getFullScope(ControllerContext context) { return context.getScopeInfo().getScope(); }
public ScopeKey getMutableScope(ControllerContext context) { return context.getScopeInfo().getMutableScope(); }
/** * Get install scope key. * * @param context the context * @return install scope key */ protected ScopeKey getScopeKey(ControllerContext context) { ScopeInfo scopeInfo = context.getScopeInfo(); if (scopeInfo != null) return scopeInfo.getInstallScope(); return null; } }
public void removeMetaData(ControllerContext context) { MutableMetaDataRepository repository = getMetaDataRepository(); ScopeInfo scopeInfo = context.getScopeInfo(); scopeInfo.removeMetaData(repository, context); }
protected JMX readJmxAnnotation(ControllerContext context) throws Exception { MetaData metaData = context.getScopeInfo().getMetaData(); if (metaData != null) return metaData.getAnnotation(JMX.class); return null; }
private JMX readJmxAnnotation(ControllerContext context) throws Exception { MetaData metaData = context.getScopeInfo().getMetaData(); if (metaData != null) return metaData.getAnnotation(JMX.class); return null; }
public void addMetaData(ControllerContext context) { MutableMetaDataRepository repository = getMetaDataRepository(); ScopeInfo scopeInfo = context.getScopeInfo(); scopeInfo.addMetaData(repository, context); }
private JMX readJmxAnnotation(ControllerContext context) throws Exception { MetaData metaData = context.getScopeInfo().getMetaData(); if (metaData != null) return metaData.getAnnotation(JMX.class); return null; }
/** * Initialise metadata retrieval * * @param context the context * @return the retrieval */ protected MetaDataRetrieval initMetaDataRetrieval(ControllerContext context) { MutableMetaDataRepository repository = getMetaDataRepository(); ScopeInfo scopeInfo = context.getScopeInfo(); return scopeInfo.initMetaDataRetrieval(repository, context); } }
protected JMX readJmxAnnotation(ControllerContext context) throws Exception { MetaData metaData = context.getScopeInfo().getMetaData(); if (metaData != null) return metaData.getAnnotation(JMX.class); return null; }
public MetaData getMetaData(ControllerContext context) { MutableMetaDataRepository repository = getMetaDataRepository(); ScopeKey scope = context.getScopeInfo().getScope(); MetaData metaData = repository.getMetaData(scope); if (metaData == null) { initMetaDataRetrieval(context); metaData = repository.getMetaData(scope); if (metaData == null) throw new IllegalStateException("Error initialising metadata state: " + scope); } return metaData; }
public void removeMetaData(MutableMetaDataRepository repository, ControllerContext context) { ScopeKey mutableScope = getMutableScope(); MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(mutableScope); if (retrieval != null) { MutableMetaDataLoader mutable = getMutableMetaDataLoader(retrieval); if (mutable != null) updateMetaData(repository, context, mutable, false); } for (ScopeKey scope : addedScopes) { try { repository.removeMetaDataRetrieval(scope); } catch (Exception e) { log.trace("Ignored", e); } } addedScopes.clear(); if (context != null && context.getScopeInfo() == this) this.context = null; this.repository = null; }
public void addMetaData(MutableMetaDataRepository repository, ControllerContext context) { this.repository = repository; // only keep ref on the owning context if (context != null && context.getScopeInfo() == this) this.context = context; ScopeKey scope = getMutableScope(); MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(scope); MutableMetaDataLoader mutable; if (retrieval == null) { mutable = initMutableMetaDataRetrieval(repository, context, scope); repository.addMetaDataRetrieval(mutable); addedScopes.add(scope); } else { mutable = getMutableMetaDataLoader(retrieval); } if (mutable == null) { log.warn("MetaData context is not mutable: " + retrieval + " for " + context.toShortString()); return; } updateMetaData(repository, context, mutable, true); }