Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Apr 1, 2020
2 parents c9666f8 + 92368c6 commit baab2fd
Show file tree
Hide file tree
Showing 142 changed files with 6,890 additions and 9,028 deletions.
Expand Up @@ -202,7 +202,7 @@ public String getObject() {
PrismContext context = getPageBase().getPrismContext();
String xml = "";
try {
xml = context.serializerFor(PrismContext.LANG_XML).serialize(object);
xml = context.xmlSerializer().serialize(object);
} catch (Exception ex) {
LoggingUtils.logUnexpectedException(LOGGER, "Couldn't serialize object", ex);
}
Expand Down
Expand Up @@ -28,7 +28,8 @@ public interface MidpointConfiguration {
String MIDPOINT_NODE_ID_PROPERTY = "midpoint.nodeId";
String MIDPOINT_NODE_ID_EXPRESSION_PROPERTY = "midpoint.nodeIdExpression";
String MIDPOINT_NODE_ID_SOURCE_PROPERTY = "midpoint.nodeIdSource";
@Deprecated String MIDPOINT_JMX_HOST_NAME_PROPERTY = "midpoint.jmxHostName";
@Deprecated // Remove in 4.4
String MIDPOINT_JMX_HOST_NAME_PROPERTY = "midpoint.jmxHostName";
String MIDPOINT_URL_PROPERTY = "midpoint.url";
String MIDPOINT_HOST_NAME_PROPERTY = "midpoint.hostName";
String MIDPOINT_HTTP_PORT_PROPERTY = "midpoint.httpPort";
Expand Down
Expand Up @@ -344,7 +344,7 @@ public AttributeFetchStrategyType getPasswordFetchStrategy() {
}

@Override
@Deprecated
@Deprecated // Remove in 4.4
public ObjectReferenceType getPasswordPolicy() {
return structuralObjectClassDefinition.getPasswordPolicy();
}
Expand Down
Expand Up @@ -348,7 +348,7 @@ public List<MappingType> getPasswordOutbound() {
}

@Override
@Deprecated
@Deprecated // Remove in 4.4
public ObjectReferenceType getPasswordPolicy() {
return refinedObjectClassDefinition.getPasswordPolicy();
}
Expand Down
Expand Up @@ -36,7 +36,7 @@ public interface RefinedAttributeDefinition<T> extends ResourceAttributeDefiniti

boolean canModify(LayerType layer);

@Deprecated
@Deprecated // Remove in 4.2
boolean isIgnored(LayerType layer);

ItemProcessing getProcessing(LayerType layer);
Expand Down
Expand Up @@ -163,7 +163,7 @@ default PrismObject<ShadowType> createBlankShadow() {

AttributeFetchStrategyType getPasswordFetchStrategy();

@Deprecated
@Deprecated // Remove in 4.4
ObjectReferenceType getPasswordPolicy();

ObjectReferenceType getSecurityPolicyRef();
Expand Down
Expand Up @@ -516,7 +516,7 @@ public ObjectReferenceType getSecurityPolicyRef() {
}

@Override
@Deprecated
@Deprecated // Remove in 4.4
public ObjectReferenceType getPasswordPolicy() {
ResourcePasswordDefinitionType password = getPasswordDefinition();
if (password == null || password.getPasswordPolicyRef() == null){
Expand Down
Expand Up @@ -95,10 +95,7 @@ private void initialize() {
if (prismContext == null) {
throw new IllegalStateException("No prism context set during validator initialization");
}
SchemaRegistry schemaRegistry = prismContext.getSchemaRegistry();
Schema midPointJavaxSchema = schemaRegistry.getJavaxSchema();
xsdValidator = midPointJavaxSchema.newValidator();
xsdValidator.setResourceResolver(prismContext.getEntityResolver());
xsdValidator = prismContext.getSchemaRegistry().getJavaxSchemaValidator();
}

public EventHandler getHandler() {
Expand Down

This file was deleted.

Expand Up @@ -73,7 +73,7 @@ public interface Definition extends PrismContextSensitive, Serializable, DebugDu
*
* Semantics of this flag for complex type definitions is to be defined yet.
*/
@Deprecated
@Deprecated // Remove in 4.2
boolean isIgnored();

ItemProcessing getProcessing();
Expand Down

This file was deleted.

This file was deleted.

Expand Up @@ -267,31 +267,6 @@ <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findOr

boolean equivalent(PrismContainerValue<?> other);

// copies the definition from original to aClone (created outside of this method)
// it has to (artifically) create a parent PrismContainer to hold the definition
//
// without having a definition, such containers cannot be serialized using
// PrismJaxbProcessor.marshalContainerableToString (without definition, there is
// no information on corresponding element name)
//
// todo review usefulness and appropriateness of this method and its placement
@Deprecated
static void copyDefinition(Containerable aClone, Containerable original, PrismContext prismContext) {
try {
Validate.notNull(original.asPrismContainerValue().getParent(), "original PrismContainerValue has no parent");

ComplexTypeDefinition definition = original.asPrismContainerValue().getComplexTypeDefinition();
Validate.notNull(definition, "original PrismContainer definition is null");

PrismContainer<?> aCloneParent = prismContext.getSchemaRegistry()
.findContainerDefinitionByCompileTimeClass((Class<? extends Containerable>) definition.getCompileTimeClass())
.instantiate();
aCloneParent.add(aClone.asPrismContainerValue());
} catch (SchemaException e) {
throw new SystemException("Unexpected SchemaException when copying definition from original object to its clone", e);
}
}

@Nullable
ComplexTypeDefinition getComplexTypeDefinition();

Expand Down
Expand Up @@ -208,9 +208,6 @@ <C extends Containerable, O extends Objectable> void adopt(PrismContainerValue<C
@NotNull
PrismSerializer<RootXNode> xnodeSerializer();

@Deprecated // use serializerFor + serialize instead
<O extends Objectable> String serializeObjectToString(PrismObject<O> object, String language) throws SchemaException;

/**
* TODO
* @param value
Expand Down Expand Up @@ -255,19 +252,6 @@ <C extends Containerable, O extends Objectable> void adopt(PrismContainerValue<C
@NotNull
<O extends Objectable> O createKnownObjectable(@NotNull Class<O> clazz);

/**
* Do not use.
*/
@Deprecated
LSResourceResolver getEntityResolver();

/**
* TODO eliminate this method
*/
@NotNull
@Deprecated
JaxbDomHack getJaxbDomHack();

PrismMonitor getMonitor();

void setMonitor(PrismMonitor monitor);
Expand Down
Expand Up @@ -61,13 +61,6 @@ public interface Protector {
*/
ProtectedStringType encryptString(String text) throws EncryptionException;

/**
* Returns true if protected string contains encrypted data that seems valid.
* DEPRECATED. Use ProtectedStringType.isEncrypted() instead
*/
@Deprecated
boolean isEncrypted(ProtectedStringType ps);

<T> void hash(ProtectedData<T> protectedData) throws EncryptionException, SchemaException;

/**
Expand Down
Expand Up @@ -20,7 +20,8 @@
*/
public interface DeltaFactory {

@Deprecated // please use DeltaBuilder instead
// please use DeltaBuilder instead
@Deprecated // TODO decide on removal
interface Property {

@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -90,7 +91,8 @@ Collection<? extends ItemDelta> createModificationReplacePropertyCollection(QNam
PrismObjectDefinition<?> objectDefinition, java.lang.Object... propertyValues);
}

@Deprecated // please use DeltaBuilder instead
// please use DeltaBuilder instead
@Deprecated // TODO decide on removal
interface Reference {

ReferenceDelta create(ItemPath path, PrismReferenceDefinition definition);
Expand Down Expand Up @@ -163,7 +165,8 @@ <T extends Objectable> Collection<? extends ItemDelta> createModificationDeleteC
PrismObject<?> refTarget);
}

@Deprecated // please use DeltaBuilder instead
// please use DeltaBuilder instead
@Deprecated // TODO decide on removal
interface Container {
<C extends Containerable> ContainerDelta<C> create(ItemPath path, PrismContainerDefinition<C> definition);

Expand Down Expand Up @@ -209,12 +212,12 @@ <T extends Containerable,O extends Objectable> ContainerDelta<T> createModificat
Class<O> type, PrismContainerValue<T> cValue) throws SchemaException;

// cValues should be parent-less
@Deprecated
@Deprecated // TODO decide on removal
Collection<? extends ItemDelta> createModificationReplaceContainerCollection(ItemName containerName,
PrismObjectDefinition<?> objectDefinition, PrismContainerValue... cValues);

// cValues should be parent-less
@Deprecated
@Deprecated // TODO decide on removal
<T extends Containerable> ContainerDelta<T> createModificationReplace(ItemName containerName,
PrismObjectDefinition<?> objectDefinition, PrismContainerValue... cValues);
}
Expand Down
Expand Up @@ -106,7 +106,6 @@ public class ParameterizedEquivalenceStrategy implements EquivalenceStrategy {
LITERAL.consideringOperationalData = true;
LITERAL.consideringContainerIds = true;
LITERAL.consideringDifferentContainerIds = true;
LITERAL.consideringValueOrigin = false;
LITERAL.consideringReferenceFilters = true;
LITERAL.consideringReferenceOptions = true;
LITERAL.compareElementNames = true;
Expand All @@ -117,7 +116,6 @@ public class ParameterizedEquivalenceStrategy implements EquivalenceStrategy {
NOT_LITERAL.consideringOperationalData = true;
NOT_LITERAL.consideringContainerIds = true;
NOT_LITERAL.consideringDifferentContainerIds = true;
NOT_LITERAL.consideringValueOrigin = false;
NOT_LITERAL.consideringReferenceFilters = true;
NOT_LITERAL.consideringReferenceOptions = true; // ok?
NOT_LITERAL.compareElementNames = true;
Expand All @@ -128,7 +126,6 @@ public class ParameterizedEquivalenceStrategy implements EquivalenceStrategy {
IGNORE_METADATA.consideringOperationalData = false;
IGNORE_METADATA.consideringContainerIds = false;
IGNORE_METADATA.consideringDifferentContainerIds = false;
IGNORE_METADATA.consideringValueOrigin = false;
IGNORE_METADATA.consideringReferenceFilters = true;
IGNORE_METADATA.consideringReferenceOptions = true; // ok?
IGNORE_METADATA.compareElementNames = true; //???
Expand All @@ -139,7 +136,6 @@ public class ParameterizedEquivalenceStrategy implements EquivalenceStrategy {
IGNORE_METADATA_CONSIDER_DIFFERENT_IDS.consideringOperationalData = false;
IGNORE_METADATA_CONSIDER_DIFFERENT_IDS.consideringContainerIds = false;
IGNORE_METADATA_CONSIDER_DIFFERENT_IDS.consideringDifferentContainerIds = true;
IGNORE_METADATA_CONSIDER_DIFFERENT_IDS.consideringValueOrigin = false;
IGNORE_METADATA_CONSIDER_DIFFERENT_IDS.consideringReferenceFilters = true;
IGNORE_METADATA_CONSIDER_DIFFERENT_IDS.consideringReferenceOptions = true; // ok?
IGNORE_METADATA_CONSIDER_DIFFERENT_IDS.compareElementNames = true; //???
Expand All @@ -150,7 +146,6 @@ public class ParameterizedEquivalenceStrategy implements EquivalenceStrategy {
LITERAL_IGNORE_METADATA.consideringOperationalData = false;
LITERAL_IGNORE_METADATA.consideringContainerIds = false;
LITERAL_IGNORE_METADATA.consideringDifferentContainerIds = false;
LITERAL_IGNORE_METADATA.consideringValueOrigin = false;
LITERAL_IGNORE_METADATA.consideringReferenceFilters = true;
LITERAL_IGNORE_METADATA.consideringReferenceOptions = true;
LITERAL_IGNORE_METADATA.compareElementNames = true;
Expand All @@ -161,7 +156,6 @@ public class ParameterizedEquivalenceStrategy implements EquivalenceStrategy {
REAL_VALUE.consideringOperationalData = false;
REAL_VALUE.consideringContainerIds = false;
REAL_VALUE.consideringDifferentContainerIds = false;
REAL_VALUE.consideringValueOrigin = false;
REAL_VALUE.consideringReferenceFilters = false;
REAL_VALUE.consideringReferenceOptions = false;
REAL_VALUE.compareElementNames = false;
Expand All @@ -172,7 +166,6 @@ public class ParameterizedEquivalenceStrategy implements EquivalenceStrategy {
REAL_VALUE_CONSIDER_DIFFERENT_IDS.consideringOperationalData = false;
REAL_VALUE_CONSIDER_DIFFERENT_IDS.consideringContainerIds = false;
REAL_VALUE_CONSIDER_DIFFERENT_IDS.consideringDifferentContainerIds = true;
REAL_VALUE_CONSIDER_DIFFERENT_IDS.consideringValueOrigin = false;
REAL_VALUE_CONSIDER_DIFFERENT_IDS.consideringReferenceFilters = false;
REAL_VALUE_CONSIDER_DIFFERENT_IDS.consideringReferenceOptions = false;
REAL_VALUE_CONSIDER_DIFFERENT_IDS.compareElementNames = false;
Expand All @@ -191,9 +184,6 @@ private static void putIntoNiceNames(ParameterizedEquivalenceStrategy strategy,
private boolean consideringOperationalData; // O
private boolean consideringContainerIds; // I
private boolean consideringDifferentContainerIds; // i
// FIXME: Metadata, Unused (never set to true)
@Deprecated
private boolean consideringValueOrigin; // o
private boolean consideringReferenceFilters; // F
/**
* Whether we consider resolutionTime and referentialIntegrity.
Expand All @@ -218,7 +208,6 @@ public String getDescription() {
(consideringOperationalData ? "O" : "-") +
(consideringContainerIds ? "I" : "-") +
(consideringDifferentContainerIds ? "i" : "-") +
(consideringValueOrigin ? "o" : "-") +
(consideringReferenceFilters ? "F" : "-") +
(consideringReferenceOptions ? "r" : "-") +
(compareElementNames ? "E" : "-") +
Expand Down Expand Up @@ -257,16 +246,6 @@ public void setCompareElementNames(boolean compareElementNames) {
this.compareElementNames = compareElementNames;
}

@Deprecated
public boolean isConsideringValueOrigin() {
return consideringValueOrigin;
}

@Deprecated
public void setConsideringValueOrigin(boolean consideringValueOrigin) {
this.consideringValueOrigin = consideringValueOrigin;
}

public boolean isLiteralDomComparison() {
return literalDomComparison;
}
Expand Down
Expand Up @@ -34,8 +34,4 @@ public interface ObjectFilter extends DebugDumpable, Serializable, Revivable, Pr
void checkConsistence(boolean requireDefinitions);

boolean equals(Object o, boolean exact);

// FIXME: Unused
@Deprecated
void setPrismContext(PrismContext prismContext);
}
Expand Up @@ -145,16 +145,6 @@ default ItemDefinition findItemDefinitionByElementName(@NotNull QName elementNam
return findItemDefinitionByElementName(elementName, ItemDefinition.class);
}

@Deprecated
default <ID extends ItemDefinition> ID findItemDefinition(@NotNull String localElementName, @NotNull Class<ID> definitionClass) {
return findItemDefinitionByElementName(new QName(localElementName), definitionClass);
}

@Deprecated
default <ID extends ItemDefinition> ID findItemDefinition(@NotNull QName elementName, @NotNull Class<ID> definitionClass) {
return findItemDefinitionByElementName(elementName, definitionClass);
}

// TypeDefinition-related

default ComplexTypeDefinition findComplexTypeDefinitionByType(@NotNull QName typeName) {
Expand All @@ -168,8 +158,4 @@ default SimpleTypeDefinition findSimpleTypeDefinitionByType(@NotNull QName typeN
default TypeDefinition findTypeDefinitionByType(@NotNull QName typeName) {
return findTypeDefinitionByType(typeName, TypeDefinition.class);
}

@Deprecated default ComplexTypeDefinition findComplexTypeDefinition(@NotNull QName typeName) {
return findComplexTypeDefinitionByType(typeName);
}
}

0 comments on commit baab2fd

Please sign in to comment.