use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class DashboardCatalogService method getWidget.
public Widget getWidget(Long dashboardId, Long widgetId) {
Widget widget = new Widget();
widget.setDashboardId(dashboardId);
widget.setId(widgetId);
ensureDashboardExists(dashboardId);
return dao.get(new StorableKey(WIDGET_NAMESPACE, widget.getPrimaryKey()));
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method removeWindow.
public TopologyWindow removeWindow(Long topologyId, Long windowId, Long versionId) throws Exception {
TopologyWindow topologyWindow = getWindow(topologyId, windowId, versionId);
if (topologyWindow != null) {
topologyWindow = dao.remove(new StorableKey(TOPOLOGY_WINDOWINFO_NAMESPACE, topologyWindow.getPrimaryKey()));
topologyWindow.setVersionTimestamp(updateVersionTimestamp(versionId).getTimestamp());
}
return topologyWindow;
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method getTopologyProcessor.
public TopologyProcessor getTopologyProcessor(Long topologyId, Long processorId, Long versionId) {
TopologyProcessor topologyProcessor = new TopologyProcessor();
topologyProcessor.setId(processorId);
topologyProcessor.setVersionId(versionId);
TopologyProcessor processor = dao.get(new StorableKey(TOPOLOGY_PROCESSOR_NAMESPACE, topologyProcessor.getPrimaryKey()));
if (processor == null || !processor.getTopologyId().equals(topologyId)) {
return null;
}
fillProcessorStreams(processor);
processor.setVersionTimestamp(getVersionTimestamp(versionId));
return processor;
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method getRule.
public TopologyRule getRule(Long topologyId, Long ruleId, Long versionId) {
TopologyRule topologyTopologyRule = new TopologyRule();
topologyTopologyRule.setId(ruleId);
topologyTopologyRule.setVersionId(versionId);
TopologyRule ruleInfo = dao.get(new StorableKey(TOPOLOGY_RULEINFO_NAMESPACE, topologyTopologyRule.getPrimaryKey()));
if (ruleInfo == null || !ruleInfo.getTopologyId().equals(topologyId)) {
return null;
}
ruleInfo.setVersionTimestamp(getVersionTimestamp(versionId));
return ruleInfo;
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method removeRule.
public TopologyRule removeRule(Long topologyId, Long ruleId, Long versionId) throws Exception {
TopologyRule topologyRule = getRule(topologyId, ruleId, versionId);
if (topologyRule != null) {
topologyRule = dao.remove(new StorableKey(TOPOLOGY_RULEINFO_NAMESPACE, topologyRule.getPrimaryKey()));
topologyRule.setVersionTimestamp(updateVersionTimestamp(versionId).getTimestamp());
}
return topologyRule;
}
Aggregations