use of com.thinkbiganalytics.metadata.modeshape.sla.JcrServiceLevelAgreement in project kylo by Teradata.
the class FeedDetails method addServiceLevelAgreement.
public boolean addServiceLevelAgreement(ServiceLevelAgreement sla) {
JcrServiceLevelAgreement jcrServiceLevelAgreement = (JcrServiceLevelAgreement) sla;
Node node = jcrServiceLevelAgreement.getNode();
// add a ref to this node
return JcrPropertyUtil.addToSetProperty(this.node, SLA, node, true);
}
use of com.thinkbiganalytics.metadata.modeshape.sla.JcrServiceLevelAgreement in project kylo by Teradata.
the class JcrFeedProvider method enableFeed.
//
// @Override
// public com.thinkbiganalytics.metadata.api.feed.FeedSource.ID resolveSource(Serializable sid) {
// return new JcrFeedSource.FeedSourceId((sid));
// }
//
// @Override
// public com.thinkbiganalytics.metadata.api.feed.FeedDestination.ID resolveDestination(Serializable sid) {
// return new JcrFeedDestination.FeedDestinationId(sid);
// }
@Override
public boolean enableFeed(Feed.ID id) {
Feed feed = getFeed(id);
if (accessController.isEntityAccessControlled()) {
feed.getAllowedActions().checkPermission(FeedAccessControl.ENABLE_DISABLE);
}
if (!feed.getState().equals(Feed.State.ENABLED)) {
feed.setState(Feed.State.ENABLED);
// Enable any SLAs on this feed
List<ServiceLevelAgreement> serviceLevelAgreements = feed.getServiceLevelAgreements();
if (serviceLevelAgreements != null) {
for (ServiceLevelAgreement sla : serviceLevelAgreements) {
JcrServiceLevelAgreement jcrSla = (JcrServiceLevelAgreement) sla;
jcrSla.enable();
}
}
return true;
}
return false;
}
use of com.thinkbiganalytics.metadata.modeshape.sla.JcrServiceLevelAgreement in project kylo by Teradata.
the class JcrFeedProvider method disableFeed.
@Override
public boolean disableFeed(Feed.ID id) {
Feed feed = getFeed(id);
if (accessController.isEntityAccessControlled()) {
feed.getAllowedActions().checkPermission(FeedAccessControl.ENABLE_DISABLE);
}
if (!feed.getState().equals(Feed.State.DISABLED)) {
feed.setState(Feed.State.DISABLED);
// disable any SLAs on this feed
List<ServiceLevelAgreement> serviceLevelAgreements = feed.getServiceLevelAgreements();
if (serviceLevelAgreements != null) {
for (ServiceLevelAgreement sla : serviceLevelAgreements) {
JcrServiceLevelAgreement jcrSla = (JcrServiceLevelAgreement) sla;
jcrSla.disabled();
}
}
return true;
}
return false;
}
Aggregations