@PreAuthorize("hasRole('" + StandardEntitlement.IMPLEMENTATION_READ + "')") @Transactional(readOnly = true) public ImplementationTO read(final ImplementationType type, final String key) { Implementation implementation = implementationDAO.find(key); if (implementation == null) { LOG.error("Could not find implementation '" + key + "'"); throw new NotFoundException(key); } if (implementation.getType() != type) { SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.InvalidRequest); sce.getElements().add("Found " + type + ", expected " + implementation.getType()); throw sce; } return binder.getImplementationTO(implementation); }
if (implementation.getType() != type) { SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.InvalidRequest); sce.getElements().add("Found " + type + ", expected " + implementation.getType()); throw sce; switch (implementation.getType()) { case REPORTLET: inUse = !reportDAO.findByReportlet(implementation).isEmpty();
SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.InvalidImplementation); if (implementation.getType() != null && implementation.getType() != implementationTO.getType()) { sce.getElements().add("ImplementationType cannot be changed"); throw sce; switch (implementation.getType()) { case REPORTLET: base = Reportlet.class; sce.getElements().add("No Java interface found for " + implementation.getType()); throw sce; if (implementation.getType() == ImplementationType.REPORTLET) { ReportletConf reportlet = POJOHelper.deserialize(implementation.getBody(), ReportletConf.class); if (reportlet == null) { throw sce; } else if (implementation.getType() == ImplementationType.ACCOUNT_RULE || implementation.getType() == ImplementationType.PASSWORD_RULE || implementation.getType() == ImplementationType.PULL_CORRELATION_RULE || implementation.getType() == ImplementationType.PUSH_CORRELATION_RULE) {
@Override public ImplementationTO getImplementationTO(final Implementation implementation) { ImplementationTO implementationTO = new ImplementationTO(); implementationTO.setKey(implementation.getKey()); implementationTO.setEngine(implementation.getEngine()); implementationTO.setType(implementation.getType()); implementationTO.setBody(implementation.getBody()); return implementationTO; } }
pushTaskTO.getActions().forEach(key -> { Implementation impl = implementationDAO.find(key); if (impl == null || impl.getType() != ImplementationType.PUSH_ACTIONS) { LOG.debug("Invalid " + Implementation.class.getSimpleName() + " {}, ignoring...", key); } else {
pullTaskTO.getActions().forEach(key -> { Implementation impl = implementationDAO.find(key); if (impl == null || impl.getType() != ImplementationType.PULL_ACTIONS) { LOG.debug("Invalid " + Implementation.class.getSimpleName() + " {}, ignoring...", key); } else {