@NotNull @Override public ResourceAttributeContainerDefinitionImpl clone() { ResourceAttributeContainerDefinitionImpl clone = new ResourceAttributeContainerDefinitionImpl(name, (ObjectClassComplexTypeDefinition)complexTypeDefinition.clone(), prismContext); copyDefinitionData(clone); return clone; }
@Override public List<? extends ResourceAttributeDefinition> getDefinitions() { return getAttributeDefinitions(); }
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()).append(":").append(getName()).append(" (").append(getTypeName()).append(")"); if (isDefaultInAKind()) { sb.append(" def"); } if (getKind() != null) { sb.append(" ").append(getKind()); } if (getNativeObjectClass()!=null) { sb.append(" native="); sb.append(getNativeObjectClass()); } return sb.toString(); }
@NotNull @Override public ResourceAttributeContainer instantiate() { return instantiate(getName()); }
/** * TODO * * Convenience method. It will internally look up the correct definition. * * @param displayName */ public void setDisplayNameAttribute(QName displayName) { ((ObjectClassComplexTypeDefinitionImpl) getComplexTypeDefinition()).setDisplayNameAttribute(displayName); }
@Override public ResourceAttributeDefinition findAttributeDefinition(String elementLocalname) { ItemName elementQName = new ItemName(getName().getNamespaceURI(),elementLocalname); return findAttributeDefinition(elementQName); }
@Override public ResourceAttributeDefinition findAttributeDefinition(ItemPath elementPath) { if (elementPath.isSingleName()) { // this is a bit of hack return findLocalItemDefinition(elementPath.asSingleNameOrFail(), ResourceAttributeDefinition.class, false); } else { return findItemDefinition(elementPath, ResourceAttributeDefinition.class); } }
@Override public String debugDump(int indent) { StringBuilder sb = new StringBuilder(); for (int i=0; i<indent; i++) { sb.append(DebugDumpable.INDENT_STRING); } sb.append(toString()); for (Definition def : getDefinitions()) { sb.append("\n"); if (def instanceof ResourceAttributeDefinition) { ResourceAttributeDefinition attrDef = (ResourceAttributeDefinition)def; sb.append(attrDef.debugDump(indent+1)); if (attrDef.isPrimaryIdentifier(this)) { sb.deleteCharAt(sb.length()-1); sb.append(" id"); } } else { sb.append(def.debugDump(indent+1)); } } return sb.toString(); }
private PrismContainerDefinition createResourceAttributeContainerDefinition(XSComplexType complexType, ObjectClassComplexTypeDefinition complexTypeDefinition, PrismContext prismContext, XSAnnotation annotation) { ResourceAttributeContainerDefinition attrContDef = new ResourceAttributeContainerDefinitionImpl(null, complexTypeDefinition, prismContext); return attrContDef; }
@Override public ResourceAttributeDefinition findAttributeDefinition(QName elementQName, boolean caseInsensitive) { return findLocalItemDefinition(ItemName.fromQName(elementQName), ResourceAttributeDefinition.class, caseInsensitive); }
public void setDescriptionAttribute(ResourceAttributeDefinition descriptionAttribute) { // We can afford to delegate a set here as we know that there is one-to-one correspondence between // object class definition and attribute container ((ObjectClassComplexTypeDefinitionImpl) getComplexTypeDefinition()).setDescriptionAttribute(descriptionAttribute); }
public static ResourceAttributeContainerDefinition createResourceAttributeContainerDefinition(QName name, ObjectClassComplexTypeDefinition complexTypeDefinition, PrismContext prismContext) { return new ResourceAttributeContainerDefinitionImpl(name, complexTypeDefinition, prismContext); }
public void setNamingAttribute(ResourceAttributeDefinition namingAttribute) { // We can afford to delegate a set here as we know that there is one-to-one correspondence between // object class definition and attribute container ((ObjectClassComplexTypeDefinitionImpl) getComplexTypeDefinition()).setNamingAttribute(namingAttribute); }
static ResourceAttributeContainerImpl createEmptyContainer(QName elementName, ObjectClassComplexTypeDefinition objectClassDefinition) { ResourceAttributeContainerDefinition attributesContainerDefinition = new ResourceAttributeContainerDefinitionImpl(elementName, objectClassDefinition, objectClassDefinition.getPrismContext()); return new ResourceAttributeContainerImpl(elementName, attributesContainerDefinition , objectClassDefinition.getPrismContext()); }
public void setNativeObjectClass(String nativeObjectClass) { // We can afford to delegate a set here as we know that there is one-to-one correspondence between // object class definition and attribute container ((ObjectClassComplexTypeDefinitionImpl) getComplexTypeDefinition()).setNativeObjectClass(nativeObjectClass); }
@Override public Collection<? extends ResourceAttributeDefinition> getAllIdentifiers() { return getComplexTypeDefinition().getAllIdentifiers(); }
@Override public String getIntent() { return getComplexTypeDefinition().getIntent(); }
@Override public ShadowKindType getKind() { return getComplexTypeDefinition().getKind(); }
public void setNamingAttribute(QName namingAttribute) { ((ObjectClassComplexTypeDefinitionImpl) getComplexTypeDefinition()).setNamingAttribute(namingAttribute); }
public void setIntent(String accountTypeName) { ((ObjectClassComplexTypeDefinitionImpl) getComplexTypeDefinition()).setIntent(accountTypeName); }