Skip to content

Commit

Permalink
Post-merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Apr 5, 2019
1 parent 6003f05 commit 1df0181
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Expand Up @@ -56,6 +56,11 @@ public class ArchetypeManager {

@Autowired private SystemObjectCache systemObjectCache;

public PrismObject<ArchetypeType> getArchetype(String oid, OperationResult result) throws ObjectNotFoundException, SchemaException {
// TODO: make this efficient (use cache)
return systemObjectCache.getArchetype(oid, result);
}

public <O extends AssignmentHolderType> PrismObject<ArchetypeType> determineArchetype(PrismObject<O> assignmentHolder, OperationResult result) throws SchemaException, ConfigurationException {
if (assignmentHolder == null) {
return null;
Expand Down
Expand Up @@ -31,6 +31,7 @@
import com.evolveum.midpoint.model.api.context.EvaluatedCollectionStatsTrigger;
import com.evolveum.midpoint.model.api.context.EvaluatedPolicyRule;
import com.evolveum.midpoint.model.api.context.EvaluatedPolicyRuleTrigger;
import com.evolveum.midpoint.model.common.ArchetypeManager;
import com.evolveum.midpoint.model.common.SystemObjectCache;
import com.evolveum.midpoint.model.impl.lens.AssignmentPathImpl;
import com.evolveum.midpoint.model.impl.lens.AssignmentPathSegmentImpl;
Expand Down Expand Up @@ -91,8 +92,7 @@ public class CollectionProcessor {
@Autowired private RelationRegistry relationRegistry;
@Autowired private ModelService modelService;
@Autowired @Qualifier("modelObjectResolver") private ObjectResolver objectResolver;
// TODO change to archetype manager
@Autowired private SystemObjectCache systemObjectCache;
@Autowired private ArchetypeManager archetypeManager;

public Collection<EvaluatedPolicyRule> evaluateCollectionPolicyRules(PrismObject<ObjectCollectionType> collection, CompiledObjectCollectionView collectionView, Class<? extends ObjectType> targetTypeClass, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException {
if (collectionView == null) {
Expand Down Expand Up @@ -253,7 +253,7 @@ public void compileObjectCollectionView(CompiledObjectCollectionView existingVie
existingView.setFilter(filter);

try {
PrismObject<ArchetypeType> archetype = systemObjectCache.getArchetype(collectionRef.getOid(), result);
PrismObject<ArchetypeType> archetype = archetypeManager.getArchetype(collectionRef.getOid(), result);
ArchetypePolicyType archetypePolicy = archetype.asObjectable().getArchetypePolicy();
if (archetypePolicy != null) {
DisplayType archetypeDisplay = archetypePolicy.getDisplay();
Expand Down
Expand Up @@ -212,6 +212,7 @@
import com.evolveum.midpoint.xml.ns._public.common.common_3.LookupTableRowType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.LookupTableType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.MergeConfigurationType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectCollectionType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectTemplateItemDefinitionType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectTemplateType;
Expand Down

0 comments on commit 1df0181

Please sign in to comment.