Skip to content

Commit

Permalink
custom container wrapper facotry method
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Sep 6, 2017
1 parent 52e916b commit d0dd050
Showing 1 changed file with 2 additions and 11 deletions.
Expand Up @@ -377,7 +377,7 @@ private List<ItemWrapper> createProperties(ContainerWrapper cWrapper, OperationR
return properties;
}

public ContainerWrapper<AssignmentType> createAssignmentContainerWrapper(AssignmentType container, ContainerStatus status, ItemPath path, boolean readonly) {
public <C extends Containerable> ContainerWrapper<C> createCustomContainerWrapper(C container, ContainerStatus status, ItemPath path, boolean readonly) {

result = new OperationResult(CREATE_PROPERTIES);

Expand All @@ -393,7 +393,7 @@ public ContainerWrapper<AssignmentType> createAssignmentContainerWrapper(Assignm
return cWrapper;
}

private List<ItemWrapper> createProperties(AssignmentType container, PrismContainerDefinition definition, ContainerWrapper<Containerable> cWrapper) {
private <C extends Containerable> List<ItemWrapper> createProperties(C container, PrismContainerDefinition definition, ContainerWrapper<Containerable> cWrapper) {
Collection<ItemDefinition> propertyDefinitions = definition.getDefinitions();

List<ItemWrapper> properties = new ArrayList<>();
Expand All @@ -414,15 +414,6 @@ private List<ItemWrapper> createProperties(AssignmentType container, PrismContai
continue;
}

// capability handling for activation properties
if (isShadowActivation(cWrapper) && !hasActivationCapability(cWrapper, def)) {
continue;
}

if (isShadowAssociation(cWrapper)) {
continue;
}

PrismProperty property = container.asPrismContainerValue().findProperty(def.getName());
boolean propertyIsReadOnly;
// decision is based on parent object status, not this
Expand Down

0 comments on commit d0dd050

Please sign in to comment.