@Override public boolean execute(Context ctx) throws Exception { if (StringUtils.isNotBlank(getPath()) && isProperty(getPath())) { throw new UnsupportedOperationException("Deactivation is not supported for properties."); } Syndicator syndicator = Components.getComponentProvider().newInstance(Syndicator.class); syndicator.init(getUser(ctx), this.getRepository(), ContentRepository.getDefaultWorkspace(this.getRepository()), new Rule()); final Content node = getNode(ctx); syndicator.deactivate(node); return true; }
public Syndicator getSyndicator() { // lazy bound, but only if this is a clone if (syndicator == null) { syndicator = Components.getComponentProvider().newInstance(Syndicator.class); syndicator.init( getUser(), this.getRepository(), ContentRepository.getDefaultWorkspace(this.getRepository()), getRule()); } return syndicator; }