@Override public String getIntent() { return structuralObjectClassDefinition.getIntent(); }
@Override public String getIntent() { return refinedObjectClassDefinition.getIntent(); }
public String getIntent() { if (refinedObjectClassDefinition == null) { throw new IllegalStateException("Intent can only be fetched from evaluated Construction"); } return refinedObjectClassDefinition.getIntent(); }
@Override public RefinedObjectClassDefinition getRefinedDefinition(ShadowKindType kind, String intent) { for (RefinedObjectClassDefinition acctDef: getRefinedDefinitions(kind)) { if (intent == null && acctDef.isDefault()) { return acctDef; } if (acctDef.getIntent() != null && acctDef.getIntent().equals(intent)) { return acctDef; } if (acctDef.getIntent() == null && intent == null) { return acctDef; } } return null; }
public RefinedObjectClassDefinitionKey(RefinedObjectClassDefinition rObjectClassDefinition) { typeName = rObjectClassDefinition.getTypeName(); intent = rObjectClassDefinition.getIntent(); }
@NotNull public String getObjectTypeName(RefinedObjectClassDefinition refinedObjectClassDefinition, boolean formatted) { if (refinedObjectClassDefinition == null) { return "?"; } StringBuilder sb = new StringBuilder(); if (refinedObjectClassDefinition.getDisplayName() != null) { sb.append(refinedObjectClassDefinition.getDisplayName()); sb.append(formatted ? LF : "/"); } sb.append(ResourceTypeUtil.fillDefault(refinedObjectClassDefinition.getKind())); sb.append(formatted ? LF : "/"); sb.append(ResourceTypeUtil.fillDefault(refinedObjectClassDefinition.getIntent())); sb.append(formatted ? LF : "/"); sb.append("("); sb.append(refinedObjectClassDefinition.getObjectClassDefinition().getTypeName().getLocalPart()); sb.append(")"); return sb.toString(); }
public static String debugDump(int indent, LayerType layer, RefinedObjectClassDefinition _this) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < indent; i++) { sb.append(INDENT_STRING); } sb.append(_this.getDebugDumpClassName()).append("("); sb.append(SchemaDebugUtil.prettyPrint(_this.getTypeName())); if (_this.isDefault()) { sb.append(",default"); } if (_this.getKind() != null) { sb.append(" ").append(_this.getKind().value()); } sb.append(","); if (_this.getIntent() != null) { sb.append("intent=").append(_this.getIntent()); } if (layer != null) { sb.append(",layer=").append(layer); } sb.append(")"); for (RefinedAttributeDefinition rAttrDef: _this.getAttributeDefinitions()) { sb.append("\n"); sb.append(rAttrDef.debugDump(indent + 1, layer)); } return sb.toString(); }
public static String refineProjectionIntent(ShadowKindType kind, String intent, ResourceType resource, PrismContext prismContext) throws SchemaException { RefinedResourceSchema refinedSchema = RefinedResourceSchemaImpl.getRefinedSchema(resource, LayerType.MODEL, prismContext); RefinedObjectClassDefinition rObjClassDef = refinedSchema.getRefinedDefinition(kind, intent); if (rObjClassDef == null) { throw new SchemaException("No projection definition for kind="+kind+" intent="+intent+" in "+resource); } return rObjClassDef.getIntent(); }
public boolean isIgnored(LayerType layer) { QName name = getAssociationAttribute(); RefinedAttributeDefinition<?> associationAttributeDef = associationTarget.findAttributeDefinition(name); if (associationAttributeDef == null) { throw new IllegalStateException("No such attribute :" + name + " in kind: " + associationTarget.getKind() + ", intent: " + associationTarget.getIntent() + " as defined for association: " + resourceObjectAssociationType.getDisplayName()); } return associationAttributeDef.isIgnored(layer); }
public PropertyLimitations getLimitations(LayerType layer) { QName name = getAssociationAttribute(); RefinedAttributeDefinition<?> associationAttributeDef = associationTarget.findAttributeDefinition(name); if (associationAttributeDef == null) { throw new IllegalStateException("No such attribute :" + name + " in kind: " + associationTarget.getKind() + ", intent: " + associationTarget.getIntent() + " as defined for association: " + resourceObjectAssociationType.getDisplayName()); } return associationAttributeDef.getLimitations(layer); }
@Override public RefinedObjectClassDefinition getRefinedDefinition(ShadowKindType kind, Collection<String> intents) throws SchemaException { RefinedObjectClassDefinition found = null; for (RefinedObjectClassDefinition acctDef: getRefinedDefinitions(kind)) { RefinedObjectClassDefinition foundCurrent = null; if (intents == null || intents.isEmpty()) { if (acctDef.isDefault()) { foundCurrent = acctDef; } } else { if (intents.contains(acctDef.getIntent())) { foundCurrent = acctDef; } } if (foundCurrent != null) { if (found != null) { if (!QNameUtil.match(found.getTypeName(), foundCurrent.getTypeName())) { throw new SchemaException("More than one ObjectClass found for kind " + kind + ", intents: " + intents + ": " + found.getTypeName() + ", " + foundCurrent.getTypeName()); } } else { found = foundCurrent; } } } return found; }
continue; ResourceDataItem item = dataModel.findResourceItem(resource.getOid(), def.getKind(), def.getIntent(), getObjectClassName(def), attrDef.getName()); previousNodeName = addResourceItem(itemsShown, indent, sb1, previousNodeName, item); continue; ResourceDataItem item = dataModel.findResourceItem(resource.getOid(), def.getKind(), def.getIntent(), getObjectClassName(def), assocDef.getName()); previousNodeName = addResourceItem(itemsShown, indent, sb1, previousNodeName, item); dataModel.findResourceItem(resource.getOid(), def.getKind(), def.getIntent(), getObjectClassName(def), ItemPath.create(ShadowType.F_ACTIVATION, ActivationType.F_ADMINISTRATIVE_STATUS))); previousNodeName = addResourceItem(itemsShown, indent, sb1, previousNodeName, dataModel.findResourceItem(resource.getOid(), def.getKind(), def.getIntent(), getObjectClassName(def), ItemPath.create(ShadowType.F_ACTIVATION, DataModelVisualizerImpl.ACTIVATION_EXISTENCE))); previousNodeName = addResourceItem(itemsShown, indent, sb1, previousNodeName, dataModel.findResourceItem(resource.getOid(), def.getKind(), def.getIntent(), getObjectClassName(def), ItemPath.create(ShadowType.F_ACTIVATION, ActivationType.F_VALID_FROM))); previousNodeName = addResourceItem(itemsShown, indent, sb1, previousNodeName, dataModel.findResourceItem(resource.getOid(), def.getKind(), def.getIntent(), getObjectClassName(def), ItemPath.create(ShadowType.F_ACTIVATION, ActivationType.F_VALID_TO))); previousNodeName = addResourceItem(itemsShown, indent, sb1, previousNodeName, dataModel.findResourceItem(resource.getOid(), def.getKind(), def.getIntent(), getObjectClassName(def), ItemPath.create(ShadowType.F_ACTIVATION, ActivationType.F_LOCKOUT_STATUS))); previousNodeName = addResourceItem(itemsShown, indent, sb1, previousNodeName, dataModel.findResourceItem(resource.getOid(), def.getKind(), def.getIntent(), getObjectClassName(def), ItemPath.create(ShadowType.F_CREDENTIALS, CredentialsType.F_PASSWORD)));
private void assertRefinedObjectClass(ObjectClassComplexTypeDefinition objectClass, QName objectClassQName, ShadowKindType kind, String intent) { assertNotNull("No object class", objectClass); if (!(objectClass instanceof RefinedObjectClassDefinition)) { AssertJUnit.fail("Expected refined object class definition, but it was "+objectClass+" ("+objectClass.getClass()+")"); } RefinedObjectClassDefinition rOcDef = (RefinedObjectClassDefinition)objectClass; assertEquals("Wrong object class QName in rOcDef "+rOcDef, objectClassQName, rOcDef.getTypeName()); assertEquals("Wrong kind in rOcDef "+rOcDef, kind, rOcDef.getKind()); assertEquals("Wrong kind in rOcDef "+rOcDef, intent, rOcDef.getIntent()); }
assertEquals("Wrong intent in account definition", SchemaConstants.INTENT_DEFAULT, accountDef.getIntent()); assertFalse("Account definition is deprecated", accountDef.isDeprecated()); assertFalse("Account definition in auxiliary", accountDef.isAuxiliary());
assertEquals("Wrong intent in account definition", SchemaConstants.INTENT_DEFAULT, accountDef.getIntent()); assertFalse("Account definition is deprecated", accountDef.isDeprecated()); assertFalse("Account definition in auxiliary", accountDef.isAuxiliary());
Collection<? extends RefinedAttributeDefinition<?>> attributeDefinitions = refinedDefinition.getAttributeDefinitions(); final ShadowKindType kind = def(refinedDefinition.getKind()); final String intent = def(refinedDefinition.getIntent()); for (RefinedAttributeDefinition<?> attributeDefinition : attributeDefinitions) { if (attributeDefinition.isIgnored()) {
final String intent = def(refinedDefinition.getIntent()); for (RefinedAttributeDefinition<?> attributeDefinition : attributeDefinitions) { if (attributeDefinition.isIgnored()) {