public UserDisplayAttributesModalPanel( final BaseModal<T> modal, final PageReference pageRef, final List<String> schemaNames, final List<String> dSchemaNames) { super(modal, pageRef, schemaNames, dSchemaNames, AnyTypeKind.USER.name()); } }
events.add(new EventCategory(EventCategoryType.PUSH)); for (AnyTypeKind anyTypeKind : AnyTypeKind.values()) { resourceDAO.findAll().forEach(resource -> { EventCategory propEventCategory = new EventCategory(EventCategoryType.PROPAGATION); EventCategory pushEventCategory = new EventCategory(EventCategoryType.PUSH); propEventCategory.setCategory(anyTypeKind.name().toLowerCase()); propEventCategory.setSubcategory(resource.getKey()); pullEventCategory.setCategory(anyTypeKind.name().toLowerCase()); pushEventCategory.setCategory(anyTypeKind.name().toLowerCase()); pullEventCategory.setSubcategory(resource.getKey()); pushEventCategory.setSubcategory(resource.getKey());
protected void deleteAttrs(final PlainSchema schema) { for (AnyTypeKind anyTypeKind : AnyTypeKind.values()) { AnyUtils anyUtils = anyUtilsFactory.getInstance(anyTypeKind); findAttrs(schema, anyUtils.plainAttrClass()).forEach(attr -> { plainAttrDAO.delete(attr); }); } }
if (remediation.getPayloadAsTO(remediation.getAnyType().getKind().getTOClass()) == null) { context.disableDefaultConstraintViolation(); context.buildConstraintViolationWithTemplate( getTemplate(EntityViolationType.InvalidRemediation, "Expected " + remediation.getAnyType().getKind().getTOClass().getName())). addPropertyNode("payload").addConstraintViolation(); if (remediation.getPayloadAsPatch(remediation.getAnyType().getKind().getPatchClass()) == null) { context.disableDefaultConstraintViolation(); context.buildConstraintViolationWithTemplate( getTemplate(EntityViolationType.InvalidRemediation, "Expected " + remediation.getAnyType().getKind().getPatchClass().getName())). addPropertyNode("payload").addConstraintViolation();
@Override public List<Triple<ConnObjectTO, ConnObjectWrapper, String>> get( final AnyTO any, final Collection<String> resources) { return ReconStatusUtils.getReconStatuses( AnyTypeKind.fromTOClass(any.getClass()), any.getKey(), any.getResources()).stream(). map(status -> Triple.<ConnObjectTO, ConnObjectWrapper, String>of( status.getRight().getOnSyncope(), new ConnObjectWrapper(any, status.getLeft(), status.getRight().getOnResource()), null)). collect(Collectors.toList()); } }
@Override public AnyTO get() { return template == null ? anyType == null ? null : ApplicationContextProvider.getApplicationContext().getBean(AnyUtilsFactory.class). getInstance(anyType.getKind()).newAnyTO() : anyType == null ? null : POJOHelper.deserialize(template, anyType.getKind().getTOClass()); }
@Override public PlainSchema update(final PlainSchemaTO schemaTO, final PlainSchema schema) { SyncopeClientCompositeException scce = SyncopeClientException.buildComposite(); boolean hasAttrs = false; for (AnyTypeKind anyTypeKind : AnyTypeKind.values()) { AnyUtils anyUtils = anyUtilsFactory.getInstance(anyTypeKind); hasAttrs |= plainSchemaDAO.findAttrs(schema, anyUtils.plainAttrClass()).isEmpty(); } if (hasAttrs) { if (schema.getType() != schemaTO.getType()) { SyncopeClientException e = SyncopeClientException.build(ClientExceptionType.InvalidPlainSchema); e.getElements().add("Cannot change type since " + schema.getKey() + " has attributes"); scce.addException(e); } if (schema.isUniqueConstraint() != schemaTO.isUniqueConstraint()) { SyncopeClientException e = SyncopeClientException.build(ClientExceptionType.InvalidPlainSchema); e.getElements().add("Cannot alter unique contraint since " + schema.getKey() + " has attributes"); scce.addException(e); } } if (scce.hasExceptions()) { throw scce; } return fill(schema, schemaTO); }
case CREATE: remediationTO.setAnyTOPayload( remediation.getPayloadAsTO(remediation.getAnyType().getKind().getTOClass())); break; remediation.getPayloadAsPatch(remediation.getAnyType().getKind().getPatchClass())); break;
intAttrName = intAttrNameParser.parse(mapItem.getIntAttrName(), AnyTypeKind.fromTOClass(anyTO.getClass())); } catch (ParseException e) { LOG.error("Invalid intAttrName '{}' specified, ignoring", mapItem.getIntAttrName(), e);
public GroupDisplayAttributesModalPanel( final BaseModal<T> modal, final PageReference pageRef, final List<String> schemaNames, final List<String> dSchemaNames) { super(modal, pageRef, schemaNames, dSchemaNames, AnyTypeKind.GROUP.name()); } }
public AnyTypeDetailsPanel(final String id, final AnyTypeTO anyTypeTO) { super(id); final WebMarkupContainer container = new WebMarkupContainer("container"); container.setOutputMarkupId(true); add(container); final Form<AnyTypeTO> form = new Form<>("form"); form.setModel(new CompoundPropertyModel<>(anyTypeTO)); container.add(form); final AjaxTextFieldPanel key = new AjaxTextFieldPanel("key", getString("key"), new PropertyModel<>(anyTypeTO, "key")); key.addRequiredLabel(); key.setEnabled(key.getModelObject() == null || key.getModelObject().isEmpty()); form.add(key); final AjaxDropDownChoicePanel<AnyTypeKind> kind = new AjaxDropDownChoicePanel<>( "kind", getString("kind"), new PropertyModel<>(anyTypeTO, "kind")); kind.setChoices(Arrays.asList(AnyTypeKind.values())); kind.setOutputMarkupId(true); if (anyTypeTO.getKind() == null) { kind.setModelObject(AnyTypeKind.ANY_OBJECT); } kind.setEnabled(false); form.add(kind); form.add(new AjaxPalettePanel.Builder<String>().setAllowOrder(true).build("classes", new PropertyModel<List<String>>(anyTypeTO, "classes"), new ListModel<>(getAvailableAnyTypeClasses())).hideLabel().setOutputMarkupId(true)); }
@Override public String getType() { return AnyTypeKind.GROUP.name(); }
@Override public String getType() { return AnyTypeKind.USER.name(); }
@Override public String getType() { return AnyTypeKind.GROUP.name(); }
CorrelationRule(final Class<? extends AbstractCorrelationRuleConf> ruleConfClass) { this.ruleConfClass = ruleConfClass; this.anyType = AnyTypeKind.USER.name(); }
@Override public String getType() { return AnyTypeKind.USER.name(); }
public Builder(final IModel<List<SearchClause>> model) { super(AnyTypeKind.USER.name(), model); }
protected AbstractSearchPanel(final String id, final AnyTypeKind kind, final Builder<?> builder) { this(id, kind, kind.name(), builder); }
@Override protected Pair<String, List<SearchClause>> newModelObject() { return Pair.<String, List<SearchClause>>of(AnyTypeKind.USER.name(), new ArrayList<>()); }