Class RefinedResourceSchemaImpl
- java.lang.Object
- 
- com.evolveum.midpoint.common.refinery.RefinedResourceSchemaImpl
 
- 
- All Implemented Interfaces:
- RefinedResourceSchema,- Freezable,- PrismContextSensitive,- DefinitionSearchImplementation,- DefinitionsStore,- GlobalDefinitionsStore,- PrismSchema,- ResourceSchema,- DebugDumpable
 
 public final class RefinedResourceSchemaImpl extends Object implements RefinedResourceSchema TODO: this whole class would benefit from more refactoring. TODO: especially the parsing part.- Author:
- semancik, mederly
 
- 
- 
Field Summary- 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRING
 
- 
 - 
Method Summary- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpabledebugDumpLazily, debugDumpLazily
 - 
Methods inherited from interface com.evolveum.midpoint.prism.FreezablecheckImmutable, checkMutable
 - 
Methods inherited from interface com.evolveum.midpoint.prism.schema.GlobalDefinitionsStorefindComplexTypeDefinitionByCompileTimeClass, findComplexTypeDefinitionByType, findContainerDefinitionByCompileTimeClass, findContainerDefinitionByElementName, findContainerDefinitionByType, findItemDefinitionByCompileTimeClass, findItemDefinitionByElementName, findItemDefinitionByElementName, findItemDefinitionByType, findItemDefinitionsByElementName, findObjectDefinitionByCompileTimeClass, findObjectDefinitionByElementName, findObjectDefinitionByType, findPropertyDefinitionByElementName, findReferenceDefinitionByElementName, findSimpleTypeDefinitionByType, findTypeDefinitionByType, findTypeDefinitionsByType
 - 
Methods inherited from interface com.evolveum.midpoint.prism.schema.PrismSchemagetComplexTypeDefinitions, getObjectDefinitions
 - 
Methods inherited from interface com.evolveum.midpoint.common.refinery.RefinedResourceSchemagetDefaultRefinedDefinition, getObjectDefinition, getObjectDefinition, getRefinedDefinition
 - 
Methods inherited from interface com.evolveum.midpoint.schema.processor.ResourceSchemafindObjectClassDefinition, findObjectClassDefinition, getObjectClassList
 
- 
 
- 
- 
- 
Method Detail- 
getObjectClassDefinitionspublic Collection<ObjectClassComplexTypeDefinition> getObjectClassDefinitions() - Specified by:
- getObjectClassDefinitionsin interface- ResourceSchema
 
 - 
getRefinedDefinitionspublic List<? extends RefinedObjectClassDefinition> getRefinedDefinitions() - Specified by:
- getRefinedDefinitionsin interface- RefinedResourceSchema
 
 - 
getRefinedDefinitionspublic List<? extends RefinedObjectClassDefinition> getRefinedDefinitions(ShadowKindType kind) - Specified by:
- getRefinedDefinitionsin interface- RefinedResourceSchema
 
 - 
getOriginalResourceSchemapublic ResourceSchema getOriginalResourceSchema() - Specified by:
- getOriginalResourceSchemain interface- RefinedResourceSchema
 
 - 
getRefinedDefinitionpublic RefinedObjectClassDefinition getRefinedDefinition(ShadowKindType kind, String intent) Description copied from interface:RefinedResourceSchemaif null accountType is provided, default account definition is returned.- Specified by:
- getRefinedDefinitionin interface- RefinedResourceSchema
 
 - 
determineCompositeObjectClassDefinitionpublic CompositeRefinedObjectClassDefinition determineCompositeObjectClassDefinition(ResourceShadowDiscriminator discriminator) - Specified by:
- determineCompositeObjectClassDefinitionin interface- RefinedResourceSchema
 
 - 
determineCompositeObjectClassDefinitionpublic CompositeRefinedObjectClassDefinition determineCompositeObjectClassDefinition(PrismObject<ShadowType> shadow) throws SchemaException - Specified by:
- determineCompositeObjectClassDefinitionin interface- RefinedResourceSchema
- Throws:
- SchemaException
 
 - 
determineCompositeObjectClassDefinitionpublic CompositeRefinedObjectClassDefinition determineCompositeObjectClassDefinition(PrismObject<ShadowType> shadow, Collection<QName> additionalAuxiliaryObjectClassQNames) throws SchemaException - Specified by:
- determineCompositeObjectClassDefinitionin interface- RefinedResourceSchema
- Throws:
- SchemaException
 
 - 
determineCompositeObjectClassDefinitionpublic CompositeRefinedObjectClassDefinition determineCompositeObjectClassDefinition(QName structuralObjectClassQName, ShadowKindType kind, String intent) - Specified by:
- determineCompositeObjectClassDefinitionin interface- RefinedResourceSchema
 
 - 
getRefinedDefinitionpublic RefinedObjectClassDefinition getRefinedDefinition(ShadowKindType kind, Collection<String> intents) throws SchemaException Description copied from interface:RefinedResourceSchemaIf no intents are provided, default account definition is returned. We check whether there is only one relevant rOCD.- Specified by:
- getRefinedDefinitionin interface- RefinedResourceSchema
- Throws:
- SchemaException
 
 - 
getRefinedDefinitionpublic RefinedObjectClassDefinition getRefinedDefinition(QName objectClassName) - Specified by:
- getRefinedDefinitionin interface- RefinedResourceSchema
 
 - 
findRefinedDefinitionByObjectClassQNamepublic RefinedObjectClassDefinition findRefinedDefinitionByObjectClassQName(ShadowKindType kind, QName objectClass) - Specified by:
- findRefinedDefinitionByObjectClassQNamein interface- RefinedResourceSchema
 
 - 
forLayerpublic LayerRefinedResourceSchema forLayer(LayerType layer) - Specified by:
- forLayerin interface- RefinedResourceSchema
 
 - 
getRefinedSchemapublic static RefinedResourceSchema getRefinedSchema(ResourceType resourceType) throws SchemaException - Throws:
- SchemaException
 
 - 
getRefinedSchemapublic static LayerRefinedResourceSchema getRefinedSchema(ResourceType resourceType, LayerType layer) throws SchemaException - Throws:
- SchemaException
 
 - 
getRefinedSchemapublic static RefinedResourceSchema getRefinedSchema(ResourceType resourceType, PrismContext prismContext) throws SchemaException - Throws:
- SchemaException
 
 - 
getRefinedSchemapublic static LayerRefinedResourceSchema getRefinedSchema(ResourceType resourceType, LayerType layer, PrismContext prismContext) throws SchemaException - Throws:
- SchemaException
 
 - 
getRefinedSchemapublic static RefinedResourceSchema getRefinedSchema(PrismObject<ResourceType> resource) throws SchemaException - Throws:
- SchemaException
 
 - 
getExistingRefinedSchemapublic static RefinedResourceSchema getExistingRefinedSchema(PrismObject<ResourceType> resource) 
 - 
getRefinedSchemapublic static RefinedResourceSchema getRefinedSchema(PrismObject<ResourceType> resource, PrismContext prismContext) throws SchemaException Obtains refined schema for the resource. If the resource does NOT contain the schema, it must be mutable. TODO rework this -- management of refined resource schemas will be the responsibility of ResourceManager- Throws:
- SchemaException
 
 - 
getRefinedSchemapublic static LayerRefinedResourceSchema getRefinedSchema(PrismObject<ResourceType> resource, LayerType layer, PrismContext prismContext) throws SchemaException - Throws:
- SchemaException
 
 - 
hasRefinedSchemapublic static boolean hasRefinedSchema(ResourceType resourceType) 
 - 
getResourceSchemapublic static ResourceSchema getResourceSchema(ResourceType resourceType, PrismContext prismContext) throws SchemaException - Throws:
- SchemaException
 
 - 
getResourceSchemapublic static ResourceSchema getResourceSchema(PrismObject<ResourceType> resource, PrismContext prismContext) throws SchemaException Obtains schema for the resource. If the resource does NOT contain the schema, it must be mutable. TODO rework this -- management of resource schemas will be the responsibility of ResourceManager- Throws:
- SchemaException
 
 - 
hasParsedSchemapublic static boolean hasParsedSchema(ResourceType resourceType) 
 - 
parsepublic static RefinedResourceSchema parse(PrismObject<ResourceType> resource, PrismContext prismContext) throws SchemaException - Throws:
- SchemaException
 
 - 
parsepublic static RefinedResourceSchema parse(ResourceType resourceType, PrismContext prismContext) throws SchemaException - Throws:
- SchemaException
 
 - 
getIntentsForKindpublic static List<String> getIntentsForKind(RefinedResourceSchema rSchema, ShadowKindType kind) 
 - 
findObjectClassDefinitionpublic ObjectClassComplexTypeDefinition findObjectClassDefinition(QName objectClassQName) - Specified by:
- findObjectClassDefinitionin interface- RefinedResourceSchema
- Specified by:
- findObjectClassDefinitionin interface- ResourceSchema
 
 - 
findObjectClassDefinitionpublic ObjectClassComplexTypeDefinition findObjectClassDefinition(ShadowKindType kind, String intent) - Specified by:
- findObjectClassDefinitionin interface- ResourceSchema
 
 - 
findDefaultObjectClassDefinitionpublic ObjectClassComplexTypeDefinition findDefaultObjectClassDefinition(ShadowKindType kind) - Specified by:
- findDefaultObjectClassDefinitionin interface- ResourceSchema
 
 - 
getNamespace@NotNull public @NotNull String getNamespace() Description copied from interface:PrismSchemaReturns schema namespace. All schema definitions are placed in the returned namespace.- Specified by:
- getNamespacein interface- PrismSchema
- Returns:
- schema namespace
 
 - 
getDefinitions@NotNull public @NotNull Collection<Definition> getDefinitions() Description copied from interface:PrismSchemaReturns set of definitions. The set contains all definitions of all types that were parsed. Order of definitions is insignificant.- Specified by:
- getDefinitionsin interface- PrismSchema
- Returns:
- set of definitions
 
 - 
getDefinitions@NotNull public <T extends Definition> @NotNull List<T> getDefinitions(@NotNull @NotNull Class<T> type) Description copied from interface:PrismSchemaReturns set of definitions of a given type. The set contains all definitions of the given type that were parsed. Order of definitions is insignificant.- Specified by:
- getDefinitionsin interface- PrismSchema
- Returns:
- set of definitions
 
 - 
getPrismContextpublic PrismContext getPrismContext() - Specified by:
- getPrismContextin interface- PrismContextSensitive
 
 - 
serializeToXsd@NotNull public @NotNull Document serializeToXsd() throws SchemaException - Specified by:
- serializeToXsdin interface- PrismSchema
- Throws:
- SchemaException
 
 - 
isEmptypublic boolean isEmpty() - Specified by:
- isEmptyin interface- PrismSchema
 
 - 
findItemDefinitionsByCompileTimeClass@NotNull public <ID extends ItemDefinition> @NotNull List<ID> findItemDefinitionsByCompileTimeClass(@NotNull @NotNull Class<?> compileTimeClass, @NotNull @NotNull Class<ID> definitionClass) - Specified by:
- findItemDefinitionsByCompileTimeClassin interface- GlobalDefinitionsStore
 
 - 
findTypeDefinitionByCompileTimeClass@Nullable public <TD extends TypeDefinition> TD findTypeDefinitionByCompileTimeClass(@NotNull @NotNull Class<?> compileTimeClass, @NotNull @NotNull Class<TD> definitionClass) - Specified by:
- findTypeDefinitionByCompileTimeClassin interface- GlobalDefinitionsStore
 
 - 
findTypeDefinitionByType@Nullable public <TD extends TypeDefinition> TD findTypeDefinitionByType(@NotNull @NotNull QName typeName, @NotNull @NotNull Class<TD> definitionClass) - Specified by:
- findTypeDefinitionByTypein interface- GlobalDefinitionsStore
 
 - 
debugDumppublic String debugDump() Description copied from interface:DebugDumpableShow the content of the object intended for diagnostics by system administrator. The out put should be suitable to use in system logs at "debug" level. It may be multi-line, but in that case it should be well indented and quite terse. As it is intended to be used by system administrator, it should not use any developer terms such as class names, exceptions or stack traces.- Specified by:
- debugDumpin interface- DebugDumpable
- Returns:
- content of the object intended for diagnostics by system administrator.
 
 - 
debugDumppublic String debugDump(int indent) - Specified by:
- debugDumpin interface- DebugDumpable
 
 - 
findItemDefinitionByType@Nullable public <ID extends ItemDefinition> ID findItemDefinitionByType(@NotNull @NotNull QName typeName, @NotNull @NotNull Class<ID> definitionType) - Specified by:
- findItemDefinitionByTypein interface- GlobalDefinitionsStore
 
 - 
findItemDefinitionsByElementName@NotNull public <ID extends ItemDefinition> @NotNull List<ID> findItemDefinitionsByElementName(@NotNull @NotNull QName elementName, @NotNull @NotNull Class<ID> definitionClass) - Specified by:
- findItemDefinitionsByElementNamein interface- GlobalDefinitionsStore
 
 - 
findTypeDefinitionsByType@NotNull public <TD extends TypeDefinition> @NotNull Collection<? extends TD> findTypeDefinitionsByType(@NotNull @NotNull QName typeName, @NotNull @NotNull Class<TD> definitionClass) - Specified by:
- findTypeDefinitionsByTypein interface- GlobalDefinitionsStore
 
 - 
validateRefinedSchemapublic static void validateRefinedSchema(RefinedResourceSchema refinedSchema, PrismObject<ResourceType> resource) throws SchemaException - Throws:
- SchemaException
 
 - 
toMutablepublic MutableResourceSchema toMutable() - Specified by:
- toMutablein interface- ResourceSchema
 
 - 
isImmutablepublic boolean isImmutable() - Specified by:
- isImmutablein interface- Freezable
 
 
- 
 
-