Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into feature/skip-mapping
# Conflicts: # repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/qmodel/report/QReportMapping.java
- Loading branch information
Showing
113 changed files
with
5,200 additions
and
517 deletions.
There are no files selected for viewing
174 changes: 174 additions & 0 deletions
174
...java/com/evolveum/midpoint/common/refinery/deleg/RefinedAttributeDefinitionDelegator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
package com.evolveum.midpoint.common.refinery.deleg; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.function.Consumer; | ||
|
||
import javax.xml.namespace.QName; | ||
|
||
import com.evolveum.midpoint.common.refinery.PropertyLimitations; | ||
import com.evolveum.midpoint.common.refinery.RefinedAttributeDefinition; | ||
import com.evolveum.midpoint.prism.ComplexTypeDefinition; | ||
import com.evolveum.midpoint.prism.ItemDefinition; | ||
import com.evolveum.midpoint.prism.ItemProcessing; | ||
import com.evolveum.midpoint.schema.processor.ResourceAttributeDefinition; | ||
import com.evolveum.midpoint.schema.processor.deleg.AttributeDefinitionDelegator; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.AttributeFetchStrategyType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.AttributeStorageStrategyType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.LayerType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.MappingType; | ||
|
||
public interface RefinedAttributeDefinitionDelegator<T> extends AttributeDefinitionDelegator<T>, RefinedAttributeDefinition<T> { | ||
|
||
@Override | ||
RefinedAttributeDefinition<T> delegate(); | ||
|
||
@Override | ||
default boolean isTolerant() { | ||
return delegate().isTolerant(); | ||
} | ||
|
||
@Override | ||
default Boolean isSecondaryIdentifierOverride() { | ||
return delegate().isSecondaryIdentifierOverride(); | ||
} | ||
|
||
@Override | ||
default boolean canAdd(LayerType layer) { | ||
return delegate().canAdd(layer); | ||
} | ||
|
||
@Override | ||
default boolean canRead(LayerType layer) { | ||
return delegate().canRead(layer); | ||
} | ||
|
||
@Override | ||
default boolean canModify(LayerType layer) { | ||
return delegate().canModify(layer); | ||
} | ||
|
||
@Override | ||
default boolean isIgnored(LayerType layer) { | ||
return delegate().isIgnored(layer); | ||
} | ||
|
||
@Override | ||
default ItemProcessing getProcessing(LayerType layer) { | ||
return delegate().getProcessing(layer); | ||
} | ||
|
||
@Override | ||
default String getDescription() { | ||
return delegate().getDescription(); | ||
} | ||
|
||
@Override | ||
default ResourceAttributeDefinition<T> getAttributeDefinition() { | ||
return delegate().getAttributeDefinition(); | ||
} | ||
|
||
@Override | ||
default MappingType getOutboundMappingType() { | ||
return delegate().getOutboundMappingType(); | ||
} | ||
|
||
@Override | ||
default boolean hasOutboundMapping() { | ||
return delegate().hasOutboundMapping(); | ||
} | ||
|
||
@Override | ||
default List<MappingType> getInboundMappingTypes() { | ||
return delegate().getInboundMappingTypes(); | ||
} | ||
|
||
@Override | ||
default int getMaxOccurs(LayerType layer) { | ||
return delegate().getMaxOccurs(layer); | ||
} | ||
|
||
@Override | ||
default int getMinOccurs(LayerType layer) { | ||
return delegate().getMinOccurs(layer); | ||
} | ||
|
||
@Override | ||
default boolean isOptional(LayerType layer) { | ||
return delegate().isOptional(layer); | ||
} | ||
|
||
@Override | ||
default boolean isMandatory(LayerType layer) { | ||
return delegate().isMandatory(layer); | ||
} | ||
|
||
@Override | ||
default boolean isMultiValue(LayerType layer) { | ||
return delegate().isMultiValue(layer); | ||
} | ||
|
||
@Override | ||
default boolean isSingleValue(LayerType layer) { | ||
return delegate().isSingleValue(layer); | ||
} | ||
|
||
@Override | ||
default boolean isExclusiveStrong() { | ||
return delegate().isExclusiveStrong(); | ||
} | ||
|
||
@Override | ||
default PropertyLimitations getLimitations(LayerType layer) { | ||
return delegate().getLimitations(layer); | ||
} | ||
|
||
@Override | ||
default AttributeFetchStrategyType getFetchStrategy() { | ||
return delegate().getFetchStrategy(); | ||
} | ||
|
||
@Override | ||
default AttributeStorageStrategyType getStorageStrategy() { | ||
return delegate().getStorageStrategy(); | ||
} | ||
|
||
@Override | ||
default List<String> getTolerantValuePattern() { | ||
return delegate().getTolerantValuePattern(); | ||
} | ||
|
||
@Override | ||
default List<String> getIntolerantValuePattern() { | ||
return delegate().getIntolerantValuePattern(); | ||
} | ||
|
||
@Override | ||
default boolean isVolatilityTrigger() { | ||
return delegate().isVolatilityTrigger(); | ||
} | ||
|
||
@Override | ||
default String debugDump(int indent, LayerType layer) { | ||
return delegate().debugDump(indent, layer); | ||
} | ||
|
||
@Override | ||
default Integer getModificationPriority() { | ||
return delegate().getModificationPriority(); | ||
} | ||
|
||
@Override | ||
default Boolean getReadReplaceMode() { | ||
return delegate().getReadReplaceMode(); | ||
} | ||
|
||
@Override | ||
default boolean isDisplayNameAttribute() { | ||
return delegate().isDisplayNameAttribute(); | ||
} | ||
|
||
@Override | ||
RefinedAttributeDefinition<T> deepClone(Map<QName, ComplexTypeDefinition> ctdMap, | ||
Map<QName, ComplexTypeDefinition> onThisPath, Consumer<ItemDefinition> postCloneAction); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
infra/prism-api/src/main/java/com/evolveum/midpoint/prism/ItemDefinitionTransformer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.evolveum.midpoint.prism; | ||
|
||
|
||
public interface ItemDefinitionTransformer { | ||
|
||
<I extends ItemDefinition<?>> I transformItem(ComplexTypeDefinition parentDef, I currentDef); | ||
|
||
<T extends TypeDefinition> T applyValue(ComplexTypeDefinition parentDef, ItemDefinition<?> itemDef, T valueDef); | ||
|
||
|
||
public interface TransformableItem { | ||
|
||
void transformDefinition(ComplexTypeDefinition parentDef, ItemDefinitionTransformer transformer); | ||
|
||
} | ||
|
||
public interface TransformableValue { | ||
|
||
void transformDefinition(ComplexTypeDefinition parentDef, ItemDefinition<?> itemDef, ItemDefinitionTransformer transformation); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismItemAccessDefinition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright (c) 2021 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
package com.evolveum.midpoint.prism; | ||
|
||
public interface PrismItemAccessDefinition { | ||
|
||
/** | ||
* Returns true if this item can be read (displayed). | ||
* In case of containers this flag is, strictly speaking, not applicable. Container is an | ||
* empty shell. What matters is access to individual sub-item. However, for containers this | ||
* value has a "hint" meaning. It means that the container itself contains something that is | ||
* readable. Which can be used as a hint by the presentation to display container label or block. | ||
* This usually happens if the container contains at least one readable item. | ||
* This does NOT mean that also all the container items can be displayed. The sub-item permissions | ||
* are controlled by similar properties on the items. This property only applies to the container | ||
* itself: the "shell" of the container. | ||
* <p> | ||
* Note: It was considered to use a different meaning for this flag - a meaning that would allow | ||
* canRead()=false containers to have readable items. However, this was found not to be very useful. | ||
* Therefore the "something readable inside" meaning was confirmed instead. | ||
*/ | ||
boolean canRead(); | ||
|
||
/** | ||
* Returns true if this item can be modified (updated). | ||
* In case of containers this means that the container itself should be displayed in modification forms | ||
* E.g. that the container label or block should be displayed. This usually happens if the container | ||
* contains at least one modifiable item. | ||
* This does NOT mean that also all the container items can be modified. The sub-item permissions | ||
* are controlled by similar properties on the items. This property only applies to the container | ||
* itself: the "shell" of the container. | ||
*/ | ||
boolean canModify(); | ||
|
||
/** | ||
* Returns true if this item can be added: it can be part of an object that is created. | ||
* In case of containers this means that the container itself should be displayed in creation forms | ||
* E.g. that the container label or block should be displayed. This usually happens if the container | ||
* contains at least one createable item. | ||
* This does NOT mean that also all the container items can be created. The sub-item permissions | ||
* are controlled by similar properties on the items. This property only applies to the container | ||
* itself: the "shell" of the container. | ||
*/ | ||
boolean canAdd(); | ||
|
||
interface Mutable extends PrismItemAccessDefinition { | ||
|
||
void setCanRead(boolean val); | ||
|
||
void setCanModify(boolean val); | ||
|
||
void setCanAdd(boolean val); | ||
|
||
} | ||
} |
Oops, something went wrong.