Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/shadow-meta…
Browse files Browse the repository at this point in the history
…data
  • Loading branch information
1azyman committed May 26, 2023
2 parents 319c304 + 6a97e0e commit 6f3f80f
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,14 @@ public ResponseEntity<?> getSelf() {
return response;
}

@PostMapping("/{type}/")
public <T extends ObjectType> ResponseEntity<?> addObjectAlt(
@PathVariable("type") String type,
@RequestParam(value = "options", required = false) List<String> options,
@RequestBody @NotNull PrismObject<T> object) {
return addObject(type, options, object);
}

@PostMapping("/{type}")
public <T extends ObjectType> ResponseEntity<?> addObject(
@PathVariable("type") String type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,30 @@
package com.evolveum.midpoint.repo.sql.util;

import org.hibernate.boot.model.TypeContributions;
import org.hibernate.dialect.PostgreSQL95Dialect;
import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.type.SqlTypes;
import org.hibernate.type.descriptor.jdbc.LongVarbinaryJdbcType;
import org.hibernate.type.descriptor.sql.internal.DdlTypeImpl;

import java.sql.Types;

/**
* @author lazyman
*/
public class MidPointPostgreSQLDialect extends PostgreSQL95Dialect {
public class MidPointPostgreSQLDialect extends PostgreSQLDialect {

public MidPointPostgreSQLDialect() {

super( DatabaseVersion.make( 9, 5 ) );
}

@Override
protected void registerColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) {
public void contributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) {
super.registerColumnTypes(typeContributions, serviceRegistry);
var blobBytea = new DdlTypeImpl(SqlTypes.BLOB, "bytea", this);
typeContributions.getTypeConfiguration().getDdlTypeRegistry().addDescriptor(blobBytea);

typeContributions.getTypeConfiguration().getJdbcTypeRegistry().addDescriptor(Types.BLOB, LongVarbinaryJdbcType.INSTANCE);
}

@Override
Expand All @@ -40,13 +42,4 @@ protected String columnType(int sqlTypeCode) {
return super.columnType(sqlTypeCode);
}

/*
@Override
public SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
if (Types.BLOB == sqlCode) {
return LongVarbinaryTypeDescriptor.INSTANCE;
}
return super.getSqlTypeDescriptorOverride(sqlCode);
}*/
}
2 changes: 1 addition & 1 deletion testing/story/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jms-client</artifactId>
<artifactId>artemis-jakarta-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<!-- administrator -->
</ownerRef>
<executionState>runnable</executionState>
<category>AsynchronousUpdate</category>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/async-update/handler-3</handlerUri>
<objectRef oid="1eff65de-5bb6-483d-9edf-8cc2c2ee0233" relation="org:default" type="c:ResourceType">
<!-- Grouper Resource -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ Looks for groups with the lifecycleState of 'retired' and completes their deleti
</extension>
<ownerRef oid="00000000-0000-0000-0000-000000000002"/>
<executionState>runnable</executionState>
<category>BulkActions</category>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/iterative-scripting/handler-3</handlerUri>
<schedule>
<recurrence>recurring</recurrence>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public class ExportMiningOptions extends BaseMiningOptions implements BasicExpor
public static final String P_SUFFIX_APPLICATION_LONG = "--applicationRoleSuffix";
public static final String P_SUFFIX_BUSINESS = "-brs";
public static final String P_SUFFIX_BUSINESS_LONG = "--businessRoleSuffix";
public static final String P_ORG = "-org";
public static final String P_ORG_LONG = "--includeOrg";
public static final String P_ORG = "-do";
public static final String P_ORG_LONG = "--disableOrg";
public static final String P_NAME_OPTIONS = "-nm";
public static final String P_NAME_OPTIONS_LONG = "--nameMode";
public static final String P_ARCHETYPE_OID_APPLICATION_LONG = "--applicationRoleArchetypeOid";
Expand Down Expand Up @@ -64,7 +64,7 @@ public class ExportMiningOptions extends BaseMiningOptions implements BasicExpor
private String applicationRolePrefix;

@Parameter(names = { P_ORG, P_ORG_LONG }, descriptionKey = "export.prevent.org")
private boolean includeOrg = true;
private boolean disableOrg = false;

@Parameter(names = { P_NAME_OPTIONS, P_NAME_OPTIONS_LONG }, descriptionKey = "export.name.options")
private RoleMiningExportUtils.NameMode nameMode = RoleMiningExportUtils.NameMode.SEQUENTIAL;
Expand All @@ -82,7 +82,7 @@ public RoleMiningExportUtils.SecurityMode getSecurityLevel() {
}

public boolean isIncludeOrg() {
return includeOrg;
return !disableOrg;
}

public String getApplicationRoleArchetypeOid() {
Expand Down
2 changes: 1 addition & 1 deletion tools/ninja/src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export.application.role.prefix=Prefix for identifying exported application roles
export.application.role.suffix=Suffix for identifying exported application roles. Multiple suffixes can be specified using a comma "," as a delimiter.
export.business.role.prefix=Prefix for identifying exported business roles. Multiple prefixes can be specified using a comma "," as a delimiter.
export.business.role.suffix=Suffix for identifying exported business roles. Multiple suffixes can be specified using a comma "," as a delimiter.
export.prevent.org=Specifies whether to include the export of organizational structures.
export.prevent.org=Prevent the export of organizational structures.
export.name.options=Defines the format of the name parameter in the export.
export.business.role.archetype.oid=Detects a business role based on a specific archetype, provided by its OID.
export.application.role.archetype.oid=Detects an application role based on a specific archetype, provided by its OID.
Expand Down

0 comments on commit 6f3f80f

Please sign in to comment.