public ApplicationEntity(String siteId, String appType) { this.site = new SiteEntity("", siteId); ApplicationDesc applicationDesc = new ApplicationDesc(); applicationDesc.setType(appType); this.descriptor = applicationDesc; this.mode = null; this.status = null; }
public void setAlertSubject(String alertSubject) { this.alertSubject = alertSubject; valueChanged("alertSubject"); } }
/** * Update mutable fields from another ApplicationEntity. */ public void updateMutable(ApplicationEntity entityToUpdate) { this.ensureDefault(); this.setJarPath(entityToUpdate.getJarPath()); this.setMode(entityToUpdate.getMode()); this.setConfiguration(entityToUpdate.getConfiguration()); }
@Override public String toString() { return String.format("ApplicationDesc [type=%s, name=%s, version=%s, appClass=%s, viewPath=%s, jarpath=%s, providerClass=%s, configuration= %s properties, description=%s", getType(), getName(), getVersion(), getAppClass(), getViewPath(), getJarPath(), getProviderClass(), getConfiguration() == null ? 0 : getConfiguration().size(), getDescription()); }
private void validateDependingApplicationInstalled(ApplicationEntity applicationEntity) { if (applicationEntity.getDescriptor().getDependencies() != null) { for (ApplicationDependency dependency : applicationEntity.getDescriptor().getDependencies()) { if (dependency.isRequired() && applicationEntityService.getBySiteIdAndAppType(applicationEntity.getSite().getSiteId(), dependency.getType()) == null) { throw new IllegalStateException("Required dependency " + dependency.toString() + " of " + applicationEntity.getDescriptor().getType() + " was not installed"); } } } }
public void doUninstall() { // we should remove alert data source and stream definition while we do uninstall if (metadata.getStreams() == null) { return; } // iterate each stream descriptor and create alert datasource for each for (StreamDesc streamDesc : metadata.getStreams()) { alertMetadataService.removeDataSource(streamDesc.getStreamId()); alertMetadataService.removeStream(streamDesc.getStreamId()); } }
public ApplicationEntity(SiteEntity site, ApplicationDesc descriptor, Mode mode, Status status, String uuid, String appId) { this.site = site; this.descriptor = descriptor; this.mode = mode; this.status = status; this.setUuid(uuid); this.appId = appId; }
public void setType(String type) { applicationDesc.setType(type); }
public void setModifiedTimestamp(Long modifiedTimestamp) { this.modifiedTimestamp = modifiedTimestamp; this.valueChanged("modifiedTimestamp"); } }
public MetadataEntityRepository() { registerEntity(AlertEntity.class); registerEntity(MetricSchemaEntity.class); } }
protected void setAppClass(Class<T> appClass) { applicationDesc.setAppClass(appClass); }
protected void setConfiguration(Configuration configuration) { applicationDesc.setConfiguration(configuration); }
public void setAlertData(Map<String, Object> alertData) { this.alertData = alertData; valueChanged("alertData"); }
public void setDimensionFields(List<String> dimensionFields) { this.dimensionFields = dimensionFields; this.valueChanged("dimensionFields"); }
public void setAlertBody(String alertBody) { this.alertBody = alertBody; valueChanged("alertBody"); }
public void setMetricFields(List<String> metricFields) { this.metricFields = metricFields; this.valueChanged("metricFields"); }
public void setPolicyValue(String policyValue) { this.policyValue = policyValue; valueChanged("policyValue"); }
public void setGranularity(String granularity) { this.granularity = granularity; this.valueChanged("granularity"); }
public void setAppIds(List<String> appIds) { this.appIds = appIds; valueChanged("appIds"); }