diff --git a/.travis.yml b/.travis.yml index a395bfc44ab..63b90655494 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ -sudo: required -dist: trusty -language: java +os: windows +language: shell #skips default install - see script bellow install: true @@ -10,28 +9,21 @@ cache: - $HOME/.m2 before_install: - #- wget http://ftp.wayne.edu/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip - - wget https://archive.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.zip - - unzip -qq apache-maven-3.5.0-bin.zip - - export M2_HOME=$PWD/apache-maven-3.5.0 - - export PATH=$M2_HOME/bin:$PATH - - export MAVEN_OPTS='-Xmx6g' - -# custom script is used so build and tests are done in one mvn command, separating it (as Travis does by default) leads to problem with ConnId (notably DummyResource) -script: mvn clean install + - choco install maven + - RefreshEnv.cmd + - export MAVEN_OPTS='-Xmx6g' + - export JAVA_HOME=`find "/c/Program Files/Java" -name jdk1.8.*` addons: hostname: localhost # workaround for short hostname - #apt: - #packages: - #- oracle-java8-installer # install newest JDK8 env: global: - MALLOC_ARENA_MAX=2 - -jdk: - #- openjdk7 - #- oraclejdk7 - - oraclejdk8 - - openjdk8 + +matrix: + include: + - name: JDK8 - Run all excluding model-intest + script: mvn install -T 1C -q -DskipTests; mvn verify -DskipModelIntTest=true -DskipModelUnitTest=true -DtestsRetryCount=2 + - name: JDK8 - Run only model-intest + script: mvn install -T 1C -q -DskipTests; travis_wait 120 mvn verify -pl :model-intest -DtestsRetryCount=2 diff --git a/.tx/config b/.tx/config index 8a15ea7fa2b..fcb8fe1c894 100644 --- a/.tx/config +++ b/.tx/config @@ -1,15 +1,15 @@ -[main] -host = https://www.transifex.com - -[midpoint.admin-gui] -file_filter = gui/admin-gui/src/main/resources/localization/Midpoint_.properties -source_file = gui/admin-gui/src/main/resources/localization/Midpoint.properties -source_lang = en -type = UNICODEPROPERTIES - -[midpoint.schema] -file_filter = infra/schema/src/main/resources/localization/schema_.properties -source_file = infra/schema/src/main/resources/localization/schema.properties -source_lang = en -type = UNICODEPROPERTIES - +[main] +host = https://www.transifex.com + +[midpoint.admin-gui] +file_filter = gui/admin-gui/src/main/resources/localization/Midpoint_.properties +source_file = gui/admin-gui/src/main/resources/localization/Midpoint.properties +source_lang = en +type = UNICODEPROPERTIES + +[midpoint.schema] +file_filter = infra/schema/src/main/resources/localization/schema_.properties +source_file = infra/schema/src/main/resources/localization/schema.properties +source_lang = en +type = UNICODEPROPERTIES + diff --git a/build-system/pom.xml b/build-system/pom.xml index 5e752d7a0cc..6a54a128297 100644 --- a/build-system/pom.xml +++ b/build-system/pom.xml @@ -67,7 +67,7 @@ 5.0.7.RELEASE 5.0.6.RELEASE 3.5.0 - 6.8.8 + 6.14.3 1.2 2.1.1 2.2.3 @@ -89,11 +89,11 @@ 1.8.0 2.9.5 1.19 - 2.22.1 + 3.0.0-M2 0.9.11 20.0 1.72 - 2.22.0 + 3.0.0-M2 1.8 @@ -682,7 +682,7 @@ com.evolveum.polygon connector-csv - 2.2 + 2.3 com.evolveum.polygon @@ -1404,94 +1404,8 @@ -Xdebug -Xrunjdwp:transport=dt_socket,address=5000,server=y,suspend=n - - org.apache.maven.plugins - maven-surefire-plugin - ${surefire.version} - - - default-test - test - - test - - - - testng-unit.xml - - - - suitename - Unit - - - - - - integration-test - integration-test - - test - - - - testng-integration.xml - - - - suitename - Integration - - - usedefaultlisteners - false - - - - - - - false - 1 - true - - true - - - - false - false - - - listener - com.evolveum.midpoint.tools.testng.TestListener - - - - src/test/resources/truststore.jks - target/midpoint-home - ${project.build.directory}/test-classes/logging.properties - - -Xms1024m -Xmx4096m - - - - /opt/jenkins_db_configs/ojdbc7.jar - - c:\midpoint\jdbc-drivers\ojdbc7.jar - - - - - org.apache.maven.surefire - surefire-testng - ${surefire.version} - - - + org.codehaus.mojo findbugs-maven-plugin @@ -1589,6 +1503,119 @@ + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${surefire.version} + + + default-test + test + + test + + + + testng-unit.xml + + + + suitename + Unit + + + listener + com.evolveum.midpoint.tools.testng.TestListener,com.evolveum.midpoint.tools.testng.RetryListener + + + + + + + false + 1 + true + + true + + + + false + false + + src/test/resources/truststore.jks + target/midpoint-home + ${project.build.directory}/test-classes/logging.properties + + -Xms1024m -Xmx4096m + + + + + /opt/jenkins_db_configs/ojdbc7.jar + + c:\midpoint\jdbc-drivers\ojdbc7.jar + + + + + org.apache.maven.surefire + surefire-testng + ${surefire.version} + + + + + org.apache.maven.plugins + maven-failsafe-plugin + ${failsafe.version} + + + integration-test + integration-test + + integration-test + verify + + + true + + src/test/resources/truststore.jks + target/midpoint-home + ${project.build.directory}/test-classes/logging.properties + + -Xms1024m -Xmx4096m -Duser.language=en + + testng-integration.xml + + + + suitename + Integration + + + listener + com.evolveum.midpoint.tools.testng.TestListener,com.evolveum.midpoint.tools.testng.RetryListener + + + + + /opt/jenkins_db_configs/ojdbc7.jar + + c:\midpoint\jdbc-drivers\ojdbc7.jar + + + + + + + @@ -1626,6 +1653,13 @@ true + + maven-failsafe-plugin + ${failsafe.version} + + true + + @@ -1641,6 +1675,13 @@ true + + maven-failsafe-plugin + ${failsafe.version} + + true + + @@ -1656,6 +1697,13 @@ true + + maven-failsafe-plugin + ${failsafe.version} + + true + + @@ -1671,6 +1719,13 @@ true + + maven-failsafe-plugin + ${failsafe.version} + + true + + diff --git a/config/sql/_all/h2-3.8-all.sql b/config/sql/_all/h2-3.8-all.sql deleted file mode 100644 index 057a8d81f7c..00000000000 --- a/config/sql/_all/h2-3.8-all.sql +++ /dev/null @@ -1,1145 +0,0 @@ --- It's no use putting Quartz and Activiti in the same DB as midPoint data. (They need different modes of db opening.) --- So, contrary to all the other databases, this file contains only midPoint-related scripts. --- If you want to add Quartz and Activiti-related tables, please use files from quartz and activiti directories, respectively. - -CREATE TABLE m_acc_cert_campaign ( - definitionRef_relation VARCHAR(157), - definitionRef_targetOid VARCHAR(36), - definitionRef_type INTEGER, - endTimestamp TIMESTAMP, - handlerUri VARCHAR(255), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36), - ownerRef_type INTEGER, - stageNumber INTEGER, - startTimestamp TIMESTAMP, - state INTEGER, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_acc_cert_case ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - administrativeStatus INTEGER, - archiveTimestamp TIMESTAMP, - disableReason VARCHAR(255), - disableTimestamp TIMESTAMP, - effectiveStatus INTEGER, - enableTimestamp TIMESTAMP, - validFrom TIMESTAMP, - validTo TIMESTAMP, - validityChangeTimestamp TIMESTAMP, - validityStatus INTEGER, - currentStageOutcome VARCHAR(255), - fullObject BLOB, - objectRef_relation VARCHAR(157), - objectRef_targetOid VARCHAR(36), - objectRef_type INTEGER, - orgRef_relation VARCHAR(157), - orgRef_targetOid VARCHAR(36), - orgRef_type INTEGER, - outcome VARCHAR(255), - remediedTimestamp TIMESTAMP, - reviewDeadline TIMESTAMP, - reviewRequestedTimestamp TIMESTAMP, - stageNumber INTEGER, - targetRef_relation VARCHAR(157), - targetRef_targetOid VARCHAR(36), - targetRef_type INTEGER, - tenantRef_relation VARCHAR(157), - tenantRef_targetOid VARCHAR(36), - tenantRef_type INTEGER, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_acc_cert_definition ( - handlerUri VARCHAR(255), - lastCampaignClosedTimestamp TIMESTAMP, - lastCampaignStartedTimestamp TIMESTAMP, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36), - ownerRef_type INTEGER, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_acc_cert_wi ( - id INTEGER NOT NULL, - owner_id INTEGER NOT NULL, - owner_owner_oid VARCHAR(36) NOT NULL, - closeTimestamp TIMESTAMP, - outcome VARCHAR(255), - outputChangeTimestamp TIMESTAMP, - performerRef_relation VARCHAR(157), - performerRef_targetOid VARCHAR(36), - performerRef_type INTEGER, - stageNumber INTEGER, - PRIMARY KEY (owner_owner_oid, owner_id, id) -); -CREATE TABLE m_acc_cert_wi_reference ( - owner_id INTEGER NOT NULL, - owner_owner_id INTEGER NOT NULL, - owner_owner_owner_oid VARCHAR(36) NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) NOT NULL, - targetType INTEGER, - PRIMARY KEY (owner_owner_owner_oid, owner_owner_id, owner_id, relation, targetOid) -); -CREATE TABLE m_assignment ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - administrativeStatus INTEGER, - archiveTimestamp TIMESTAMP, - disableReason VARCHAR(255), - disableTimestamp TIMESTAMP, - effectiveStatus INTEGER, - enableTimestamp TIMESTAMP, - validFrom TIMESTAMP, - validTo TIMESTAMP, - validityChangeTimestamp TIMESTAMP, - validityStatus INTEGER, - assignmentOwner INTEGER, - createChannel VARCHAR(255), - createTimestamp TIMESTAMP, - creatorRef_relation VARCHAR(157), - creatorRef_targetOid VARCHAR(36), - creatorRef_type INTEGER, - lifecycleState VARCHAR(255), - modifierRef_relation VARCHAR(157), - modifierRef_targetOid VARCHAR(36), - modifierRef_type INTEGER, - modifyChannel VARCHAR(255), - modifyTimestamp TIMESTAMP, - orderValue INTEGER, - orgRef_relation VARCHAR(157), - orgRef_targetOid VARCHAR(36), - orgRef_type INTEGER, - resourceRef_relation VARCHAR(157), - resourceRef_targetOid VARCHAR(36), - resourceRef_type INTEGER, - targetRef_relation VARCHAR(157), - targetRef_targetOid VARCHAR(36), - targetRef_type INTEGER, - tenantRef_relation VARCHAR(157), - tenantRef_targetOid VARCHAR(36), - tenantRef_type INTEGER, - extId INTEGER, - extOid VARCHAR(36), - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_assignment_ext_boolean ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - booleanValue BOOLEAN NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, booleanValue) -); -CREATE TABLE m_assignment_ext_date ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - dateValue TIMESTAMP NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, dateValue) -); -CREATE TABLE m_assignment_ext_long ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - longValue BIGINT NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, longValue) -); -CREATE TABLE m_assignment_ext_poly ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - orig VARCHAR(255) NOT NULL, - norm VARCHAR(255), - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, orig) -); -CREATE TABLE m_assignment_ext_reference ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - targetoid VARCHAR(36) NOT NULL, - relation VARCHAR(157), - targetType INTEGER, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, targetoid) -); -CREATE TABLE m_assignment_ext_string ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - stringValue VARCHAR(255) NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, stringValue) -); -CREATE TABLE m_assignment_extension ( - owner_id INTEGER NOT NULL, - owner_owner_oid VARCHAR(36) NOT NULL, - booleansCount SMALLINT, - datesCount SMALLINT, - longsCount SMALLINT, - polysCount SMALLINT, - referencesCount SMALLINT, - stringsCount SMALLINT, - PRIMARY KEY (owner_owner_oid, owner_id) -); -CREATE TABLE m_assignment_policy_situation ( - assignment_id INTEGER NOT NULL, - assignment_oid VARCHAR(36) NOT NULL, - policySituation VARCHAR(255) -); -CREATE TABLE m_assignment_reference ( - owner_id INTEGER NOT NULL, - owner_owner_oid VARCHAR(36) NOT NULL, - reference_type INTEGER NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) NOT NULL, - targetType INTEGER, - PRIMARY KEY (owner_owner_oid, owner_id, reference_type, relation, targetOid) -); -CREATE TABLE m_audit_delta ( - checksum VARCHAR(32) NOT NULL, - record_id BIGINT NOT NULL, - delta BLOB, - deltaOid VARCHAR(36), - deltaType INTEGER, - fullResult BLOB, - objectName_norm VARCHAR(255), - objectName_orig VARCHAR(255), - resourceName_norm VARCHAR(255), - resourceName_orig VARCHAR(255), - resourceOid VARCHAR(36), - status INTEGER, - PRIMARY KEY (record_id, checksum) -); -CREATE TABLE m_audit_event ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY, - attorneyName VARCHAR(255), - attorneyOid VARCHAR(36), - channel VARCHAR(255), - eventIdentifier VARCHAR(255), - eventStage INTEGER, - eventType INTEGER, - hostIdentifier VARCHAR(255), - initiatorName VARCHAR(255), - initiatorOid VARCHAR(36), - initiatorType INTEGER, - message VARCHAR(1024), - nodeIdentifier VARCHAR(255), - outcome INTEGER, - parameter VARCHAR(255), - remoteHostAddress VARCHAR(255), - result VARCHAR(255), - sessionIdentifier VARCHAR(255), - targetName VARCHAR(255), - targetOid VARCHAR(36), - targetOwnerName VARCHAR(255), - targetOwnerOid VARCHAR(36), - targetOwnerType INTEGER, - targetType INTEGER, - taskIdentifier VARCHAR(255), - taskOID VARCHAR(255), - timestampValue TIMESTAMP, - PRIMARY KEY (id) -); -CREATE TABLE m_audit_item ( - changedItemPath VARCHAR(255) NOT NULL, - record_id BIGINT NOT NULL, - PRIMARY KEY (record_id, changedItemPath) -); -CREATE TABLE m_audit_prop_value ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY, - name VARCHAR(255), - record_id BIGINT, - value VARCHAR(1024), - PRIMARY KEY (id) -); -CREATE TABLE m_audit_ref_value ( - id BIGINT GENERATED BY DEFAULT AS IDENTITY, - name VARCHAR(255), - oid VARCHAR(36), - record_id BIGINT, - targetName_norm VARCHAR(255), - targetName_orig VARCHAR(255), - type VARCHAR(255), - PRIMARY KEY (id) -); -CREATE TABLE m_case_wi ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - closeTimestamp TIMESTAMP, - deadline TIMESTAMP, - originalAssigneeRef_relation VARCHAR(157), - originalAssigneeRef_targetOid VARCHAR(36), - originalAssigneeRef_type INTEGER, - outcome VARCHAR(255), - performerRef_relation VARCHAR(157), - performerRef_targetOid VARCHAR(36), - performerRef_type INTEGER, - stageNumber INTEGER, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_case_wi_reference ( - owner_id INTEGER NOT NULL, - owner_owner_oid VARCHAR(36) NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) NOT NULL, - targetType INTEGER, - PRIMARY KEY (owner_owner_oid, owner_id, targetOid, relation) -); -CREATE TABLE m_connector_target_system ( - connector_oid VARCHAR(36) NOT NULL, - targetSystemType VARCHAR(255) -); -CREATE TABLE m_ext_item ( - id INTEGER GENERATED BY DEFAULT AS IDENTITY, - kind INTEGER, - itemName VARCHAR(157), - itemType VARCHAR(157), - PRIMARY KEY (id) -); -CREATE TABLE m_focus_photo ( - owner_oid VARCHAR(36) NOT NULL, - photo BLOB, - PRIMARY KEY (owner_oid) -); -CREATE TABLE m_focus_policy_situation ( - focus_oid VARCHAR(36) NOT NULL, - policySituation VARCHAR(255) -); -CREATE TABLE m_object ( - oid VARCHAR(36) NOT NULL, - booleansCount SMALLINT, - createChannel VARCHAR(255), - createTimestamp TIMESTAMP, - creatorRef_relation VARCHAR(157), - creatorRef_targetOid VARCHAR(36), - creatorRef_type INTEGER, - datesCount SMALLINT, - fullObject BLOB, - lifecycleState VARCHAR(255), - longsCount SMALLINT, - modifierRef_relation VARCHAR(157), - modifierRef_targetOid VARCHAR(36), - modifierRef_type INTEGER, - modifyChannel VARCHAR(255), - modifyTimestamp TIMESTAMP, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - objectTypeClass INTEGER, - polysCount SMALLINT, - referencesCount SMALLINT, - stringsCount SMALLINT, - tenantRef_relation VARCHAR(157), - tenantRef_targetOid VARCHAR(36), - tenantRef_type INTEGER, - version INTEGER NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_object_ext_boolean ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INTEGER NOT NULL, - booleanValue BOOLEAN NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, booleanValue) -); -CREATE TABLE m_object_ext_date ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INTEGER NOT NULL, - dateValue TIMESTAMP NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, dateValue) -); -CREATE TABLE m_object_ext_long ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INTEGER NOT NULL, - longValue BIGINT NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, longValue) -); -CREATE TABLE m_object_ext_poly ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INTEGER NOT NULL, - orig VARCHAR(255) NOT NULL, - norm VARCHAR(255), - PRIMARY KEY (owner_oid, ownerType, item_id, orig) -); -CREATE TABLE m_object_ext_reference ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INTEGER NOT NULL, - targetoid VARCHAR(36) NOT NULL, - relation VARCHAR(157), - targetType INTEGER, - PRIMARY KEY (owner_oid, ownerType, item_id, targetoid) -); -CREATE TABLE m_object_ext_string ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INTEGER NOT NULL, - stringValue VARCHAR(255) NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, stringValue) -); -CREATE TABLE m_object_subtype ( - object_oid VARCHAR(36) NOT NULL, - subtype VARCHAR(255) -); -CREATE TABLE m_object_text_info ( - owner_oid VARCHAR(36) NOT NULL, - text VARCHAR(255) NOT NULL, - PRIMARY KEY (owner_oid, text) -); -CREATE TABLE m_operation_execution ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - initiatorRef_relation VARCHAR(157), - initiatorRef_targetOid VARCHAR(36), - initiatorRef_type INTEGER, - status INTEGER, - taskRef_relation VARCHAR(157), - taskRef_targetOid VARCHAR(36), - taskRef_type INTEGER, - timestampValue TIMESTAMP, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_org_closure ( - ancestor_oid VARCHAR(36) NOT NULL, - descendant_oid VARCHAR(36) NOT NULL, - val INTEGER, - PRIMARY KEY (ancestor_oid, descendant_oid) -); -CREATE TABLE m_org_org_type ( - org_oid VARCHAR(36) NOT NULL, - orgType VARCHAR(255) -); -CREATE TABLE m_reference ( - owner_oid VARCHAR(36) NOT NULL, - reference_type INTEGER NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) NOT NULL, - targetType INTEGER, - PRIMARY KEY (owner_oid, reference_type, relation, targetOid) -); -CREATE TABLE m_service_type ( - service_oid VARCHAR(36) NOT NULL, - serviceType VARCHAR(255) -); -CREATE TABLE m_shadow ( - attemptNumber INTEGER, - dead BOOLEAN, - exist BOOLEAN, - failedOperationType INTEGER, - fullSynchronizationTimestamp TIMESTAMP, - intent VARCHAR(255), - kind INTEGER, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - objectClass VARCHAR(157), - pendingOperationCount INTEGER, - resourceRef_relation VARCHAR(157), - resourceRef_targetOid VARCHAR(36), - resourceRef_type INTEGER, - status INTEGER, - synchronizationSituation INTEGER, - synchronizationTimestamp TIMESTAMP, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_task ( - binding INTEGER, - canRunOnNode VARCHAR(255), - category VARCHAR(255), - completionTimestamp TIMESTAMP, - executionStatus INTEGER, - fullResult BLOB, - handlerUri VARCHAR(255), - lastRunFinishTimestamp TIMESTAMP, - lastRunStartTimestamp TIMESTAMP, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - node VARCHAR(255), - objectRef_relation VARCHAR(157), - objectRef_targetOid VARCHAR(36), - objectRef_type INTEGER, - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36), - ownerRef_type INTEGER, - parent VARCHAR(255), - recurrence INTEGER, - status INTEGER, - taskIdentifier VARCHAR(255), - threadStopAction INTEGER, - waitingReason INTEGER, - wfEndTimestamp TIMESTAMP, - wfObjectRef_relation VARCHAR(157), - wfObjectRef_targetOid VARCHAR(36), - wfObjectRef_type INTEGER, - wfProcessInstanceId VARCHAR(255), - wfRequesterRef_relation VARCHAR(157), - wfRequesterRef_targetOid VARCHAR(36), - wfRequesterRef_type INTEGER, - wfStartTimestamp TIMESTAMP, - wfTargetRef_relation VARCHAR(157), - wfTargetRef_targetOid VARCHAR(36), - wfTargetRef_type INTEGER, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_task_dependent ( - task_oid VARCHAR(36) NOT NULL, - dependent VARCHAR(255) -); -CREATE TABLE m_user_employee_type ( - user_oid VARCHAR(36) NOT NULL, - employeeType VARCHAR(255) -); -CREATE TABLE m_user_organization ( - user_oid VARCHAR(36) NOT NULL, - norm VARCHAR(255), - orig VARCHAR(255) -); -CREATE TABLE m_user_organizational_unit ( - user_oid VARCHAR(36) NOT NULL, - norm VARCHAR(255), - orig VARCHAR(255) -); -CREATE TABLE m_abstract_role ( - approvalProcess VARCHAR(255), - autoassign_enabled BOOLEAN, - displayName_norm VARCHAR(255), - displayName_orig VARCHAR(255), - identifier VARCHAR(255), - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36), - ownerRef_type INTEGER, - requestable BOOLEAN, - riskLevel VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_case ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - objectRef_relation VARCHAR(157), - objectRef_targetOid VARCHAR(36), - objectRef_type INTEGER, - state VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_connector ( - connectorBundle VARCHAR(255), - connectorHostRef_relation VARCHAR(157), - connectorHostRef_targetOid VARCHAR(36), - connectorHostRef_type INTEGER, - connectorType VARCHAR(255), - connectorVersion VARCHAR(255), - framework VARCHAR(255), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_connector_host ( - hostname VARCHAR(255), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - port VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_focus ( - administrativeStatus INTEGER, - archiveTimestamp TIMESTAMP, - disableReason VARCHAR(255), - disableTimestamp TIMESTAMP, - effectiveStatus INTEGER, - enableTimestamp TIMESTAMP, - validFrom TIMESTAMP, - validTo TIMESTAMP, - validityChangeTimestamp TIMESTAMP, - validityStatus INTEGER, - costCenter VARCHAR(255), - emailAddress VARCHAR(255), - hasPhoto BOOLEAN DEFAULT FALSE NOT NULL, - locale VARCHAR(255), - locality_norm VARCHAR(255), - locality_orig VARCHAR(255), - preferredLanguage VARCHAR(255), - telephoneNumber VARCHAR(255), - timezone VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_form ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_function_library ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_generic_object ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - objectType VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_lookup_table ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_lookup_table_row ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - row_key VARCHAR(255), - label_norm VARCHAR(255), - label_orig VARCHAR(255), - lastChangeTimestamp TIMESTAMP, - row_value VARCHAR(255), - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_node ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - nodeIdentifier VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_object_template ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - type INTEGER, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_org ( - displayOrder INTEGER, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - tenant BOOLEAN, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_report ( - export INTEGER, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - orientation INTEGER, - parent BOOLEAN, - useHibernateSession BOOLEAN, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_report_output ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - reportRef_relation VARCHAR(157), - reportRef_targetOid VARCHAR(36), - reportRef_type INTEGER, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_resource ( - administrativeState INTEGER, - connectorRef_relation VARCHAR(157), - connectorRef_targetOid VARCHAR(36), - connectorRef_type INTEGER, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - o16_lastAvailabilityStatus INTEGER, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_role ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - roleType VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_security_policy ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_sequence ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_service ( - displayOrder INTEGER, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_system_configuration ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_trigger ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - handlerUri VARCHAR(255), - timestampValue TIMESTAMP, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_user ( - additionalName_norm VARCHAR(255), - additionalName_orig VARCHAR(255), - employeeNumber VARCHAR(255), - familyName_norm VARCHAR(255), - familyName_orig VARCHAR(255), - fullName_norm VARCHAR(255), - fullName_orig VARCHAR(255), - givenName_norm VARCHAR(255), - givenName_orig VARCHAR(255), - honorificPrefix_norm VARCHAR(255), - honorificPrefix_orig VARCHAR(255), - honorificSuffix_norm VARCHAR(255), - honorificSuffix_orig VARCHAR(255), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - nickName_norm VARCHAR(255), - nickName_orig VARCHAR(255), - title_norm VARCHAR(255), - title_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_value_policy ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE INDEX iCertCampaignNameOrig - ON m_acc_cert_campaign (name_orig); -ALTER TABLE m_acc_cert_campaign - ADD CONSTRAINT uc_acc_cert_campaign_name UNIQUE (name_norm); -CREATE INDEX iCaseObjectRefTargetOid - ON m_acc_cert_case (objectRef_targetOid); -CREATE INDEX iCaseTargetRefTargetOid - ON m_acc_cert_case (targetRef_targetOid); -CREATE INDEX iCaseTenantRefTargetOid - ON m_acc_cert_case (tenantRef_targetOid); -CREATE INDEX iCaseOrgRefTargetOid - ON m_acc_cert_case (orgRef_targetOid); -CREATE INDEX iCertDefinitionNameOrig - ON m_acc_cert_definition (name_orig); -ALTER TABLE m_acc_cert_definition - ADD CONSTRAINT uc_acc_cert_definition_name UNIQUE (name_norm); -CREATE INDEX iCertWorkItemRefTargetOid - ON m_acc_cert_wi_reference (targetOid); -CREATE INDEX iAssignmentAdministrative - ON m_assignment (administrativeStatus); -CREATE INDEX iAssignmentEffective - ON m_assignment (effectiveStatus); -CREATE INDEX iAssignmentValidFrom - ON m_assignment (validFrom); -CREATE INDEX iAssignmentValidTo - ON m_assignment (validTo); -CREATE INDEX iTargetRefTargetOid - ON m_assignment (targetRef_targetOid); -CREATE INDEX iTenantRefTargetOid - ON m_assignment (tenantRef_targetOid); -CREATE INDEX iOrgRefTargetOid - ON m_assignment (orgRef_targetOid); -CREATE INDEX iResourceRefTargetOid - ON m_assignment (resourceRef_targetOid); -CREATE INDEX iAExtensionBoolean - ON m_assignment_ext_boolean (booleanValue); -CREATE INDEX iAExtensionDate - ON m_assignment_ext_date (dateValue); -CREATE INDEX iAExtensionLong - ON m_assignment_ext_long (longValue); -CREATE INDEX iAExtensionPolyString - ON m_assignment_ext_poly (orig); -CREATE INDEX iAExtensionReference - ON m_assignment_ext_reference (targetoid); -CREATE INDEX iAExtensionString - ON m_assignment_ext_string (stringValue); -CREATE INDEX iAssignmentReferenceTargetOid - ON m_assignment_reference (targetOid); -CREATE INDEX iAuditDeltaRecordId - ON m_audit_delta (record_id); -CREATE INDEX iTimestampValue - ON m_audit_event (timestampValue); -CREATE INDEX iChangedItemPath - ON m_audit_item (changedItemPath); -CREATE INDEX iAuditItemRecordId - ON m_audit_item (record_id); -CREATE INDEX iAuditPropValRecordId - ON m_audit_prop_value (record_id); -CREATE INDEX iAuditRefValRecordId - ON m_audit_ref_value (record_id); -CREATE INDEX iCaseWorkItemRefTargetOid - ON m_case_wi_reference (targetOid); - -ALTER TABLE m_ext_item - ADD CONSTRAINT iExtItemDefinition UNIQUE (itemName, itemType, kind); - -CREATE INDEX iObjectNameOrig - ON m_object (name_orig); -CREATE INDEX iObjectNameNorm - ON m_object (name_norm); -CREATE INDEX iObjectTypeClass - ON m_object (objectTypeClass); -CREATE INDEX iObjectCreateTimestamp - ON m_object (createTimestamp); -CREATE INDEX iObjectLifecycleState - ON m_object (lifecycleState); -CREATE INDEX iExtensionBoolean - ON m_object_ext_boolean (booleanValue); -CREATE INDEX iExtensionDate - ON m_object_ext_date (dateValue); -CREATE INDEX iExtensionLong - ON m_object_ext_long (longValue); -CREATE INDEX iExtensionPolyString - ON m_object_ext_poly (orig); -CREATE INDEX iExtensionReference - ON m_object_ext_reference (targetoid); -CREATE INDEX iExtensionString - ON m_object_ext_string (stringValue); -CREATE INDEX iOpExecTaskOid - ON m_operation_execution (taskRef_targetOid); -CREATE INDEX iOpExecInitiatorOid - ON m_operation_execution (initiatorRef_targetOid); -CREATE INDEX iOpExecStatus - ON m_operation_execution (status); -CREATE INDEX iOpExecOwnerOid - ON m_operation_execution (owner_oid); -CREATE INDEX iAncestor - ON m_org_closure (ancestor_oid); -CREATE INDEX iDescendant - ON m_org_closure (descendant_oid); -CREATE INDEX iDescendantAncestor - ON m_org_closure (descendant_oid, ancestor_oid); -CREATE INDEX iReferenceTargetTypeRelation - ON m_reference (targetOid, reference_type, relation); -CREATE INDEX iShadowResourceRef - ON m_shadow (resourceRef_targetOid); -CREATE INDEX iShadowDead - ON m_shadow (dead); -CREATE INDEX iShadowKind - ON m_shadow (kind); -CREATE INDEX iShadowIntent - ON m_shadow (intent); -CREATE INDEX iShadowObjectClass - ON m_shadow (objectClass); -CREATE INDEX iShadowFailedOperationType - ON m_shadow (failedOperationType); -CREATE INDEX iShadowSyncSituation - ON m_shadow (synchronizationSituation); -CREATE INDEX iShadowPendingOperationCount - ON m_shadow (pendingOperationCount); -CREATE INDEX iShadowNameOrig - ON m_shadow (name_orig); -CREATE INDEX iShadowNameNorm - ON m_shadow (name_norm); -CREATE INDEX iParent - ON m_task (parent); -CREATE INDEX iTaskWfProcessInstanceId - ON m_task (wfProcessInstanceId); -CREATE INDEX iTaskWfStartTimestamp - ON m_task (wfStartTimestamp); -CREATE INDEX iTaskWfEndTimestamp - ON m_task (wfEndTimestamp); -CREATE INDEX iTaskWfRequesterOid - ON m_task (wfRequesterRef_targetOid); -CREATE INDEX iTaskWfObjectOid - ON m_task (wfObjectRef_targetOid); -CREATE INDEX iTaskWfTargetOid - ON m_task (wfTargetRef_targetOid); -CREATE INDEX iTaskNameOrig - ON m_task (name_orig); -ALTER TABLE m_task - ADD CONSTRAINT uc_task_identifier UNIQUE (taskIdentifier); -CREATE INDEX iAbstractRoleIdentifier - ON m_abstract_role (identifier); -CREATE INDEX iRequestable - ON m_abstract_role (requestable); -CREATE INDEX iAutoassignEnabled - ON m_abstract_role (autoassign_enabled); -CREATE INDEX iCaseNameOrig - ON m_case (name_orig); -ALTER TABLE m_case - ADD CONSTRAINT uc_case_name UNIQUE (name_norm); -CREATE INDEX iConnectorNameOrig - ON m_connector (name_orig); -CREATE INDEX iConnectorNameNorm - ON m_connector (name_norm); -CREATE INDEX iConnectorHostNameOrig - ON m_connector_host (name_orig); -ALTER TABLE m_connector_host - ADD CONSTRAINT uc_connector_host_name UNIQUE (name_norm); -CREATE INDEX iFocusAdministrative - ON m_focus (administrativeStatus); -CREATE INDEX iFocusEffective - ON m_focus (effectiveStatus); -CREATE INDEX iLocality - ON m_focus (locality_orig); -CREATE INDEX iFocusValidFrom - ON m_focus (validFrom); -CREATE INDEX iFocusValidTo - ON m_focus (validTo); -CREATE INDEX iFormNameOrig - ON m_form (name_orig); -ALTER TABLE m_form - ADD CONSTRAINT uc_form_name UNIQUE (name_norm); -CREATE INDEX iFunctionLibraryNameOrig - ON m_function_library (name_orig); -ALTER TABLE m_function_library - ADD CONSTRAINT uc_function_library_name UNIQUE (name_norm); -CREATE INDEX iGenericObjectNameOrig - ON m_generic_object (name_orig); -ALTER TABLE m_generic_object - ADD CONSTRAINT uc_generic_object_name UNIQUE (name_norm); -CREATE INDEX iLookupTableNameOrig - ON m_lookup_table (name_orig); -ALTER TABLE m_lookup_table - ADD CONSTRAINT uc_lookup_name UNIQUE (name_norm); -ALTER TABLE m_lookup_table_row - ADD CONSTRAINT uc_row_key UNIQUE (owner_oid, row_key); -CREATE INDEX iNodeNameOrig - ON m_node (name_orig); -ALTER TABLE m_node - ADD CONSTRAINT uc_node_name UNIQUE (name_norm); -CREATE INDEX iObjectTemplateNameOrig - ON m_object_template (name_orig); -ALTER TABLE m_object_template - ADD CONSTRAINT uc_object_template_name UNIQUE (name_norm); -CREATE INDEX iDisplayOrder - ON m_org (displayOrder); -CREATE INDEX iOrgNameOrig - ON m_org (name_orig); -ALTER TABLE m_org - ADD CONSTRAINT uc_org_name UNIQUE (name_norm); -CREATE INDEX iReportParent - ON m_report (parent); -CREATE INDEX iReportNameOrig - ON m_report (name_orig); -ALTER TABLE m_report - ADD CONSTRAINT uc_report_name UNIQUE (name_norm); -CREATE INDEX iReportOutputNameOrig - ON m_report_output (name_orig); -CREATE INDEX iReportOutputNameNorm - ON m_report_output (name_norm); -CREATE INDEX iResourceNameOrig - ON m_resource (name_orig); -ALTER TABLE m_resource - ADD CONSTRAINT uc_resource_name UNIQUE (name_norm); -CREATE INDEX iRoleNameOrig - ON m_role (name_orig); -ALTER TABLE m_role - ADD CONSTRAINT uc_role_name UNIQUE (name_norm); -CREATE INDEX iSecurityPolicyNameOrig - ON m_security_policy (name_orig); -ALTER TABLE m_security_policy - ADD CONSTRAINT uc_security_policy_name UNIQUE (name_norm); -CREATE INDEX iSequenceNameOrig - ON m_sequence (name_orig); -ALTER TABLE m_sequence - ADD CONSTRAINT uc_sequence_name UNIQUE (name_norm); -CREATE INDEX iServiceNameOrig - ON m_service (name_orig); -CREATE INDEX iServiceNameNorm - ON m_service (name_norm); -CREATE INDEX iSystemConfigurationNameOrig - ON m_system_configuration (name_orig); -ALTER TABLE m_system_configuration - ADD CONSTRAINT uc_system_configuration_name UNIQUE (name_norm); -CREATE INDEX iTriggerTimestamp - ON m_trigger (timestampValue); -CREATE INDEX iFullName - ON m_user (fullName_orig); -CREATE INDEX iFamilyName - ON m_user (familyName_orig); -CREATE INDEX iGivenName - ON m_user (givenName_orig); -CREATE INDEX iEmployeeNumber - ON m_user (employeeNumber); -CREATE INDEX iUserNameOrig - ON m_user (name_orig); -ALTER TABLE m_user - ADD CONSTRAINT uc_user_name UNIQUE (name_norm); -CREATE INDEX iValuePolicyNameOrig - ON m_value_policy (name_orig); -ALTER TABLE m_value_policy - ADD CONSTRAINT uc_value_policy_name UNIQUE (name_norm); -ALTER TABLE m_acc_cert_campaign - ADD CONSTRAINT fk_acc_cert_campaign FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_acc_cert_case - ADD CONSTRAINT fk_acc_cert_case_owner FOREIGN KEY (owner_oid) REFERENCES m_acc_cert_campaign; -ALTER TABLE m_acc_cert_definition - ADD CONSTRAINT fk_acc_cert_definition FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_acc_cert_wi - ADD CONSTRAINT fk_acc_cert_wi_owner FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_acc_cert_case; -ALTER TABLE m_acc_cert_wi_reference - ADD CONSTRAINT fk_acc_cert_wi_ref_owner FOREIGN KEY (owner_owner_owner_oid, owner_owner_id, owner_id) REFERENCES m_acc_cert_wi; -ALTER TABLE m_assignment - ADD CONSTRAINT fk_assignment_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_assignment_ext_boolean - ADD CONSTRAINT fk_a_ext_boolean_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_boolean - ADD CONSTRAINT fk_a_ext_boolean_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_date - ADD CONSTRAINT fk_a_ext_date_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_date - ADD CONSTRAINT fk_a_ext_date_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_long - ADD CONSTRAINT fk_a_ext_long_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_long - ADD CONSTRAINT fk_a_ext_long_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_poly - ADD CONSTRAINT fk_a_ext_poly_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_poly - ADD CONSTRAINT fk_a_ext_poly_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_reference - ADD CONSTRAINT fk_a_ext_reference_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_reference - ADD CONSTRAINT fk_a_ext_boolean_reference FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_string - ADD CONSTRAINT fk_a_ext_string_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_string - ADD CONSTRAINT fk_a_ext_string_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_policy_situation - ADD CONSTRAINT fk_assignment_policy_situation FOREIGN KEY (assignment_oid, assignment_id) REFERENCES m_assignment; -ALTER TABLE m_assignment_reference - ADD CONSTRAINT fk_assignment_reference FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_assignment; -ALTER TABLE m_audit_delta - ADD CONSTRAINT fk_audit_delta FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE m_audit_item - ADD CONSTRAINT fk_audit_item FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE m_audit_prop_value - ADD CONSTRAINT fk_audit_prop_value FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE m_audit_ref_value - ADD CONSTRAINT fk_audit_ref_value FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE m_case_wi - ADD CONSTRAINT fk_case_wi_owner FOREIGN KEY (owner_oid) REFERENCES m_case; -ALTER TABLE m_case_wi_reference - ADD CONSTRAINT fk_case_wi_reference_owner FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_case_wi; -ALTER TABLE m_connector_target_system - ADD CONSTRAINT fk_connector_target_system FOREIGN KEY (connector_oid) REFERENCES m_connector; -ALTER TABLE m_focus_photo - ADD CONSTRAINT fk_focus_photo FOREIGN KEY (owner_oid) REFERENCES m_focus; -ALTER TABLE m_focus_policy_situation - ADD CONSTRAINT fk_focus_policy_situation FOREIGN KEY (focus_oid) REFERENCES m_focus; -ALTER TABLE m_object_ext_boolean - ADD CONSTRAINT fk_o_ext_boolean_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_boolean - ADD CONSTRAINT fk_o_ext_boolean_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_date - ADD CONSTRAINT fk_o_ext_date_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_date - ADD CONSTRAINT fk_o_ext_date_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_long - ADD CONSTRAINT fk_object_ext_long FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_long - ADD CONSTRAINT fk_o_ext_long_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_poly - ADD CONSTRAINT fk_o_ext_poly_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_poly - ADD CONSTRAINT fk_o_ext_poly_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_reference - ADD CONSTRAINT fk_o_ext_reference_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_reference - ADD CONSTRAINT fk_o_ext_reference_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_string - ADD CONSTRAINT fk_object_ext_string FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_string - ADD CONSTRAINT fk_o_ext_string_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_subtype - ADD CONSTRAINT fk_object_subtype FOREIGN KEY (object_oid) REFERENCES m_object; -ALTER TABLE m_object_text_info - ADD CONSTRAINT fk_object_text_info_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_operation_execution - ADD CONSTRAINT fk_op_exec_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_org_closure - ADD CONSTRAINT fk_ancestor FOREIGN KEY (ancestor_oid) REFERENCES m_object; -ALTER TABLE m_org_closure - ADD CONSTRAINT fk_descendant FOREIGN KEY (descendant_oid) REFERENCES m_object; -ALTER TABLE m_org_org_type - ADD CONSTRAINT fk_org_org_type FOREIGN KEY (org_oid) REFERENCES m_org; -ALTER TABLE m_reference - ADD CONSTRAINT fk_reference_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_service_type - ADD CONSTRAINT fk_service_type FOREIGN KEY (service_oid) REFERENCES m_service; -ALTER TABLE m_shadow - ADD CONSTRAINT fk_shadow FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_task - ADD CONSTRAINT fk_task FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_task_dependent - ADD CONSTRAINT fk_task_dependent FOREIGN KEY (task_oid) REFERENCES m_task; -ALTER TABLE m_user_employee_type - ADD CONSTRAINT fk_user_employee_type FOREIGN KEY (user_oid) REFERENCES m_user; -ALTER TABLE m_user_organization - ADD CONSTRAINT fk_user_organization FOREIGN KEY (user_oid) REFERENCES m_user; -ALTER TABLE m_user_organizational_unit - ADD CONSTRAINT fk_user_org_unit FOREIGN KEY (user_oid) REFERENCES m_user; -ALTER TABLE m_abstract_role - ADD CONSTRAINT fk_abstract_role FOREIGN KEY (oid) REFERENCES m_focus; -ALTER TABLE m_case - ADD CONSTRAINT fk_case FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_connector - ADD CONSTRAINT fk_connector FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_connector_host - ADD CONSTRAINT fk_connector_host FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_focus - ADD CONSTRAINT fk_focus FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_form - ADD CONSTRAINT fk_form FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_function_library - ADD CONSTRAINT fk_function_library FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_generic_object - ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_lookup_table - ADD CONSTRAINT fk_lookup_table FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_lookup_table_row - ADD CONSTRAINT fk_lookup_table_owner FOREIGN KEY (owner_oid) REFERENCES m_lookup_table; -ALTER TABLE m_node - ADD CONSTRAINT fk_node FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_object_template - ADD CONSTRAINT fk_object_template FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_org - ADD CONSTRAINT fk_org FOREIGN KEY (oid) REFERENCES m_abstract_role; -ALTER TABLE m_report - ADD CONSTRAINT fk_report FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_report_output - ADD CONSTRAINT fk_report_output FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_resource - ADD CONSTRAINT fk_resource FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_role - ADD CONSTRAINT fk_role FOREIGN KEY (oid) REFERENCES m_abstract_role; -ALTER TABLE m_security_policy - ADD CONSTRAINT fk_security_policy FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_sequence - ADD CONSTRAINT fk_sequence FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_service - ADD CONSTRAINT fk_service FOREIGN KEY (oid) REFERENCES m_abstract_role; -ALTER TABLE m_system_configuration - ADD CONSTRAINT fk_system_configuration FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_trigger - ADD CONSTRAINT fk_trigger_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_user - ADD CONSTRAINT fk_user FOREIGN KEY (oid) REFERENCES m_focus; -ALTER TABLE m_value_policy - ADD CONSTRAINT fk_value_policy FOREIGN KEY (oid) REFERENCES m_object; - -COMMIT; diff --git a/config/sql/_all/h2-3.9-all.sql b/config/sql/_all/h2-4.0-all.sql similarity index 98% rename from config/sql/_all/h2-3.9-all.sql rename to config/sql/_all/h2-4.0-all.sql index d6c0eb06b0b..728585b0dcc 100644 --- a/config/sql/_all/h2-3.9-all.sql +++ b/config/sql/_all/h2-4.0-all.sql @@ -523,6 +523,12 @@ CREATE TABLE m_abstract_role ( oid VARCHAR(36) NOT NULL, PRIMARY KEY (oid) ); +CREATE TABLE m_archetype ( + name_norm VARCHAR(255), + name_orig VARCHAR(255), + oid VARCHAR(36) NOT NULL, + PRIMARY KEY (oid) +); CREATE TABLE m_case ( name_norm VARCHAR(255), name_orig VARCHAR(255), @@ -889,8 +895,9 @@ CREATE INDEX iAbstractRoleIdentifier ON m_abstract_role (identifier); CREATE INDEX iRequestable ON m_abstract_role (requestable); -CREATE INDEX iAutoassignEnabled - ON m_abstract_role (autoassign_enabled); +CREATE INDEX iAutoassignEnabled ON m_abstract_role(autoassign_enabled); +CREATE INDEX iArchetypeNameOrig ON m_archetype(name_orig); +CREATE INDEX iArchetypeNameNorm ON m_archetype(name_norm); CREATE INDEX iCaseNameOrig ON m_case (name_orig); ALTER TABLE m_case @@ -1113,6 +1120,8 @@ ALTER TABLE m_user_organizational_unit ADD CONSTRAINT fk_user_org_unit FOREIGN KEY (user_oid) REFERENCES m_user; ALTER TABLE m_abstract_role ADD CONSTRAINT fk_abstract_role FOREIGN KEY (oid) REFERENCES m_focus; +ALTER TABLE m_archetype + ADD CONSTRAINT fk_archetype FOREIGN KEY (oid) REFERENCES m_abstract_role; ALTER TABLE m_case ADD CONSTRAINT fk_case FOREIGN KEY (oid) REFERENCES m_object; ALTER TABLE m_connector @@ -1126,7 +1135,7 @@ ALTER TABLE m_form ALTER TABLE m_function_library ADD CONSTRAINT fk_function_library FOREIGN KEY (oid) REFERENCES m_object; ALTER TABLE m_generic_object - ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_object; + ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_focus; ALTER TABLE m_lookup_table ADD CONSTRAINT fk_lookup_table FOREIGN KEY (oid) REFERENCES m_object; ALTER TABLE m_lookup_table_row @@ -1162,6 +1171,6 @@ ALTER TABLE m_user ALTER TABLE m_value_policy ADD CONSTRAINT fk_value_policy FOREIGN KEY (oid) REFERENCES m_object; -INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '3.9'); +INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '4.0'); COMMIT; diff --git a/config/sql/_all/h2-upgrade-3.8-3.9.sql b/config/sql/_all/h2-upgrade-3.8-3.9.sql deleted file mode 100644 index 21d8c72affe..00000000000 --- a/config/sql/_all/h2-upgrade-3.8-3.9.sql +++ /dev/null @@ -1,26 +0,0 @@ -CREATE TABLE m_object_collection ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); - -CREATE INDEX iObjectCollectionNameOrig - ON m_object_collection (name_orig); -ALTER TABLE m_object_collection - ADD CONSTRAINT uc_object_collection_name UNIQUE (name_norm); - -ALTER TABLE m_object_collection - ADD CONSTRAINT fk_object_collection FOREIGN KEY (oid) REFERENCES m_object; - -ALTER TABLE m_acc_cert_campaign ADD COLUMN iteration INTEGER DEFAULT 1 NOT NULL; -ALTER TABLE m_acc_cert_case ADD COLUMN iteration INTEGER DEFAULT 1 NOT NULL; -ALTER TABLE m_acc_cert_wi ADD COLUMN iteration INTEGER DEFAULT 1 NOT NULL; - -CREATE TABLE m_global_metadata ( - name VARCHAR(255) NOT NULL, - value VARCHAR(255), - PRIMARY KEY (name) -); - -INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '3.9'); \ No newline at end of file diff --git a/config/sql/_all/h2-upgrade-3.9-4.0.sql b/config/sql/_all/h2-upgrade-3.9-4.0.sql new file mode 100644 index 00000000000..243b2d0cc50 --- /dev/null +++ b/config/sql/_all/h2-upgrade-3.9-4.0.sql @@ -0,0 +1,18 @@ +CREATE TABLE m_archetype ( + name_norm VARCHAR(255), + name_orig VARCHAR(255), + oid VARCHAR(36) NOT NULL, + PRIMARY KEY (oid) +); + +CREATE INDEX iArchetypeNameOrig ON m_archetype(name_orig); +CREATE INDEX iArchetypeNameNorm ON m_archetype(name_norm); + +ALTER TABLE m_archetype + ADD CONSTRAINT fk_archetype FOREIGN KEY (oid) REFERENCES m_abstract_role; + +ALTER TABLE m_generic_object DROP CONSTRAINT fk_generic_object; +ALTER TABLE m_generic_object + ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_focus; + +UPDATE m_global_metadata SET value = '4.0' WHERE name = 'databaseSchemaVersion'; diff --git a/config/sql/_all/mysql-3.8-all-utf8mb4.sql b/config/sql/_all/mysql-3.8-all-utf8mb4.sql deleted file mode 100644 index cc4fd0ad3d4..00000000000 --- a/config/sql/_all/mysql-3.8-all-utf8mb4.sql +++ /dev/null @@ -1,2124 +0,0 @@ --- remove iAncestor and iDescendant index, they are the same as FK for that fields - -CREATE TABLE m_acc_cert_campaign ( - definitionRef_relation VARCHAR(157), - definitionRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin, - definitionRef_type INTEGER, - endTimestamp DATETIME(6), - handlerUri VARCHAR(255), - name_norm VARCHAR(191), - name_orig VARCHAR(191), - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - ownerRef_type INTEGER, - stageNumber INTEGER, - startTimestamp DATETIME(6), - state INTEGER, - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_acc_cert_case ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - administrativeStatus INTEGER, - archiveTimestamp DATETIME(6), - disableReason VARCHAR(255), - disableTimestamp DATETIME(6), - effectiveStatus INTEGER, - enableTimestamp DATETIME(6), - validFrom DATETIME(6), - validTo DATETIME(6), - validityChangeTimestamp DATETIME(6), - validityStatus INTEGER, - currentStageOutcome VARCHAR(255), - fullObject LONGBLOB, - objectRef_relation VARCHAR(157), - objectRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - objectRef_type INTEGER, - orgRef_relation VARCHAR(157), - orgRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - orgRef_type INTEGER, - outcome VARCHAR(255), - remediedTimestamp DATETIME(6), - reviewDeadline DATETIME(6), - reviewRequestedTimestamp DATETIME(6), - stageNumber INTEGER, - targetRef_relation VARCHAR(157), - targetRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - targetRef_type INTEGER, - tenantRef_relation VARCHAR(157), - tenantRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - tenantRef_type INTEGER, - PRIMARY KEY (owner_oid, id) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_acc_cert_definition ( - handlerUri VARCHAR(255), - lastCampaignClosedTimestamp DATETIME(6), - lastCampaignStartedTimestamp DATETIME(6), - name_norm VARCHAR(191), - name_orig VARCHAR(191), - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin, - ownerRef_type INTEGER, - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_acc_cert_wi ( - id INTEGER NOT NULL, - owner_id INTEGER NOT NULL, - owner_owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - closeTimestamp DATETIME(6), - outcome VARCHAR(255), - outputChangeTimestamp DATETIME(6), - performerRef_relation VARCHAR(157), - performerRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - performerRef_type INTEGER, - stageNumber INTEGER, - PRIMARY KEY (owner_owner_oid, owner_id, id) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_acc_cert_wi_reference ( - owner_id INTEGER NOT NULL, - owner_owner_id INTEGER NOT NULL, - owner_owner_owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - targetType INTEGER, - PRIMARY KEY (owner_owner_owner_oid, owner_owner_id, owner_id, relation, targetOid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - administrativeStatus INTEGER, - archiveTimestamp DATETIME(6), - disableReason VARCHAR(255), - disableTimestamp DATETIME(6), - effectiveStatus INTEGER, - enableTimestamp DATETIME(6), - validFrom DATETIME(6), - validTo DATETIME(6), - validityChangeTimestamp DATETIME(6), - validityStatus INTEGER, - assignmentOwner INTEGER, - createChannel VARCHAR(255), - createTimestamp DATETIME(6), - creatorRef_relation VARCHAR(157), - creatorRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - creatorRef_type INTEGER, - lifecycleState VARCHAR(255), - modifierRef_relation VARCHAR(157), - modifierRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - modifierRef_type INTEGER, - modifyChannel VARCHAR(255), - modifyTimestamp DATETIME(6), - orderValue INTEGER, - orgRef_relation VARCHAR(157), - orgRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - orgRef_type INTEGER, - resourceRef_relation VARCHAR(157), - resourceRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - resourceRef_type INTEGER, - targetRef_relation VARCHAR(157), - targetRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - targetRef_type INTEGER, - tenantRef_relation VARCHAR(157), - tenantRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - tenantRef_type INTEGER, - extId INTEGER, - extOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - PRIMARY KEY (owner_oid, id) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_ext_boolean ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - booleanValue BIT NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, booleanValue) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_ext_date ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - dateValue DATETIME(6) NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, dateValue) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_ext_long ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - longValue BIGINT NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, longValue) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_ext_poly ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - orig VARCHAR(191) NOT NULL, - norm VARCHAR(191), - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, orig) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_ext_reference ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - targetoid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - relation VARCHAR(157), - targetType INTEGER, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, targetoid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_ext_string ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - stringValue VARCHAR(191) NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, stringValue) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_extension ( - owner_id INTEGER NOT NULL, - owner_owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - booleansCount SMALLINT, - datesCount SMALLINT, - longsCount SMALLINT, - polysCount SMALLINT, - referencesCount SMALLINT, - stringsCount SMALLINT, - PRIMARY KEY (owner_owner_oid, owner_id) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_policy_situation ( - assignment_id INTEGER NOT NULL, - assignment_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - policySituation VARCHAR(255) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_reference ( - owner_id INTEGER NOT NULL, - owner_owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - reference_type INTEGER NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - targetType INTEGER, - PRIMARY KEY (owner_owner_oid, owner_id, reference_type, relation, targetOid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_audit_delta ( - checksum VARCHAR(32) NOT NULL, - record_id BIGINT NOT NULL, - delta LONGBLOB, - deltaOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - deltaType INTEGER, - fullResult LONGBLOB, - objectName_norm VARCHAR(255), - objectName_orig VARCHAR(255), - resourceName_norm VARCHAR(255), - resourceName_orig VARCHAR(255), - resourceOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - status INTEGER, - PRIMARY KEY (record_id, checksum) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_audit_event ( - id BIGINT NOT NULL AUTO_INCREMENT, - attorneyName VARCHAR(255), - attorneyOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - channel VARCHAR(255), - eventIdentifier VARCHAR(255), - eventStage INTEGER, - eventType INTEGER, - hostIdentifier VARCHAR(255), - initiatorName VARCHAR(255), - initiatorOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - initiatorType INTEGER, - message VARCHAR(1024), - nodeIdentifier VARCHAR(255), - outcome INTEGER, - parameter VARCHAR(255), - remoteHostAddress VARCHAR(255), - result VARCHAR(255), - sessionIdentifier VARCHAR(255), - targetName VARCHAR(255), - targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - targetOwnerName VARCHAR(255), - targetOwnerOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - targetOwnerType INTEGER, - targetType INTEGER, - taskIdentifier VARCHAR(255), - taskOID VARCHAR(255) CHARSET utf8 COLLATE utf8_bin , - timestampValue DATETIME(6), - PRIMARY KEY (id) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_audit_item ( - changedItemPath VARCHAR(255) CHARSET utf8 COLLATE utf8_bin NOT NULL, - record_id BIGINT NOT NULL, - PRIMARY KEY (record_id, changedItemPath) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_audit_prop_value ( - id BIGINT NOT NULL AUTO_INCREMENT, - name VARCHAR(255), - record_id BIGINT, - value VARCHAR(1024), - PRIMARY KEY (id) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_audit_ref_value ( - id BIGINT NOT NULL AUTO_INCREMENT, - name VARCHAR(255), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - record_id BIGINT, - targetName_norm VARCHAR(255), - targetName_orig VARCHAR(255), - type VARCHAR(255), - PRIMARY KEY (id) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_case_wi ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - closeTimestamp DATETIME(6), - deadline DATETIME(6), - originalAssigneeRef_relation VARCHAR(157), - originalAssigneeRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin, - originalAssigneeRef_type INTEGER, - outcome VARCHAR(255), - performerRef_relation VARCHAR(157), - performerRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin, - performerRef_type INTEGER, - stageNumber INTEGER, - PRIMARY KEY (owner_oid, id) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_case_wi_reference ( - owner_id INTEGER NOT NULL, - owner_owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - targetType INTEGER, - PRIMARY KEY (owner_owner_oid, owner_id, targetOid, relation) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_connector_target_system ( - connector_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - targetSystemType VARCHAR(255) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_ext_item ( - id INTEGER NOT NULL AUTO_INCREMENT, - kind INTEGER, - itemName VARCHAR(157), - itemType VARCHAR(157), - PRIMARY KEY (id) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_focus_photo ( - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - photo LONGBLOB, - PRIMARY KEY (owner_oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_focus_policy_situation ( - focus_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - policySituation VARCHAR(255) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_object ( - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - booleansCount SMALLINT, - createChannel VARCHAR(255), - createTimestamp DATETIME(6), - creatorRef_relation VARCHAR(157), - creatorRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - creatorRef_type INTEGER, - datesCount SMALLINT, - fullObject LONGBLOB, - lifecycleState VARCHAR(191), - longsCount SMALLINT, - modifierRef_relation VARCHAR(157), - modifierRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - modifierRef_type INTEGER, - modifyChannel VARCHAR(255), - modifyTimestamp DATETIME(6), - name_norm VARCHAR(191), - name_orig VARCHAR(191), - objectTypeClass INTEGER, - polysCount SMALLINT, - referencesCount SMALLINT, - stringsCount SMALLINT, - tenantRef_relation VARCHAR(157), - tenantRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - tenantRef_type INTEGER, - version INTEGER NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_object_ext_boolean ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - ownerType INTEGER NOT NULL, - booleanValue BIT NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, booleanValue) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_object_ext_date ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - ownerType INTEGER NOT NULL, - dateValue DATETIME(6) NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, dateValue) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_object_ext_long ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - ownerType INTEGER NOT NULL, - longValue BIGINT NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, longValue) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_object_ext_poly ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - ownerType INTEGER NOT NULL, - orig VARCHAR(191) NOT NULL, - norm VARCHAR(191), - PRIMARY KEY (owner_oid, ownerType, item_id, orig) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_object_ext_reference ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - ownerType INTEGER NOT NULL, - targetoid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - relation VARCHAR(157), - targetType INTEGER, - PRIMARY KEY (owner_oid, ownerType, item_id, targetoid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_object_ext_string ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - ownerType INTEGER NOT NULL, - stringValue VARCHAR(191) NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, stringValue) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_object_subtype ( - object_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - subtype VARCHAR(255) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_object_text_info ( - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - text VARCHAR(191) NOT NULL, - PRIMARY KEY (owner_oid, text) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_operation_execution ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - initiatorRef_relation VARCHAR(157), - initiatorRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - initiatorRef_type INTEGER, - status INTEGER, - taskRef_relation VARCHAR(157), - taskRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - taskRef_type INTEGER, - timestampValue DATETIME(6), - PRIMARY KEY (owner_oid, id) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_org_closure ( - ancestor_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - descendant_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - val INTEGER, - PRIMARY KEY (ancestor_oid, descendant_oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_org_org_type ( - org_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - orgType VARCHAR(255) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_reference ( - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - reference_type INTEGER NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - targetType INTEGER, - PRIMARY KEY (owner_oid, reference_type, relation, targetOid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_service_type ( - service_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - serviceType VARCHAR(255) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_shadow ( - attemptNumber INTEGER, - dead BIT, - exist BIT, - failedOperationType INTEGER, - fullSynchronizationTimestamp DATETIME(6), - intent VARCHAR(191), - kind INTEGER, - name_norm VARCHAR(191), - name_orig VARCHAR(191), - objectClass VARCHAR(157), - pendingOperationCount INTEGER, - resourceRef_relation VARCHAR(157), - resourceRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - resourceRef_type INTEGER, - status INTEGER, - synchronizationSituation INTEGER, - synchronizationTimestamp DATETIME(6), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_task ( - binding INTEGER, - canRunOnNode VARCHAR(255), - category VARCHAR(255), - completionTimestamp DATETIME(6), - executionStatus INTEGER, - fullResult LONGBLOB, - handlerUri VARCHAR(255), - lastRunFinishTimestamp DATETIME(6), - lastRunStartTimestamp DATETIME(6), - name_norm VARCHAR(191), - name_orig VARCHAR(191), - node VARCHAR(255), - objectRef_relation VARCHAR(157), - objectRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - objectRef_type INTEGER, - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - ownerRef_type INTEGER, - parent VARCHAR(191), - recurrence INTEGER, - status INTEGER, - taskIdentifier VARCHAR(191), - threadStopAction INTEGER, - waitingReason INTEGER, - wfEndTimestamp DATETIME(6), - wfObjectRef_relation VARCHAR(157), - wfObjectRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - wfObjectRef_type INTEGER, - wfProcessInstanceId VARCHAR(191), - wfRequesterRef_relation VARCHAR(157), - wfRequesterRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - wfRequesterRef_type INTEGER, - wfStartTimestamp DATETIME(6), - wfTargetRef_relation VARCHAR(157), - wfTargetRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - wfTargetRef_type INTEGER, - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_task_dependent ( - task_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - dependent VARCHAR(255) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_user_employee_type ( - user_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - employeeType VARCHAR(255) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_user_organization ( - user_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - norm VARCHAR(255), - orig VARCHAR(255) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_user_organizational_unit ( - user_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - norm VARCHAR(255), - orig VARCHAR(255) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_abstract_role ( - approvalProcess VARCHAR(255), - autoassign_enabled BIT, - displayName_norm VARCHAR(255), - displayName_orig VARCHAR(255), - identifier VARCHAR(191), - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - ownerRef_type INTEGER, - requestable BIT, - riskLevel VARCHAR(255), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_case ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - objectRef_relation VARCHAR(157), - objectRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin, - objectRef_type INTEGER, - state VARCHAR(255), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_connector ( - connectorBundle VARCHAR(255), - connectorHostRef_relation VARCHAR(157), - connectorHostRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - connectorHostRef_type INTEGER, - connectorType VARCHAR(255), - connectorVersion VARCHAR(255), - framework VARCHAR(255), - name_norm VARCHAR(191), - name_orig VARCHAR(191), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_connector_host ( - hostname VARCHAR(255), - name_norm VARCHAR(191), - name_orig VARCHAR(191), - port VARCHAR(255), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_focus ( - administrativeStatus INTEGER, - archiveTimestamp DATETIME(6), - disableReason VARCHAR(255), - disableTimestamp DATETIME(6), - effectiveStatus INTEGER, - enableTimestamp DATETIME(6), - validFrom DATETIME(6), - validTo DATETIME(6), - validityChangeTimestamp DATETIME(6), - validityStatus INTEGER, - costCenter VARCHAR(255), - emailAddress VARCHAR(255), - hasPhoto BIT DEFAULT FALSE NOT NULL, - locale VARCHAR(255), - locality_norm VARCHAR(255), - locality_orig VARCHAR(191), - preferredLanguage VARCHAR(255), - telephoneNumber VARCHAR(255), - timezone VARCHAR(255), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_form ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_function_library ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_generic_object ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - objectType VARCHAR(255), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_lookup_table ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_lookup_table_row ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - row_key VARCHAR(191), - label_norm VARCHAR(255), - label_orig VARCHAR(255), - lastChangeTimestamp DATETIME(6), - row_value VARCHAR(255), - PRIMARY KEY (owner_oid, id) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_node ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - nodeIdentifier VARCHAR(255), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_object_template ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - type INTEGER, - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_org ( - displayOrder INTEGER, - name_norm VARCHAR(191), - name_orig VARCHAR(191), - tenant BIT, - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_report ( - export INTEGER, - name_norm VARCHAR(191), - name_orig VARCHAR(191), - orientation INTEGER, - parent BIT, - useHibernateSession BIT, - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_report_output ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - reportRef_relation VARCHAR(157), - reportRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - reportRef_type INTEGER, - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_resource ( - administrativeState INTEGER, - connectorRef_relation VARCHAR(157), - connectorRef_targetOid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin , - connectorRef_type INTEGER, - name_norm VARCHAR(191), - name_orig VARCHAR(191), - o16_lastAvailabilityStatus INTEGER, - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_role ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - roleType VARCHAR(255), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_security_policy ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_sequence ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_service ( - displayOrder INTEGER, - name_norm VARCHAR(191), - name_orig VARCHAR(191), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_system_configuration ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_trigger ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - handlerUri VARCHAR(255), - timestampValue DATETIME(6), - PRIMARY KEY (owner_oid, id) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_user ( - additionalName_norm VARCHAR(255), - additionalName_orig VARCHAR(255), - employeeNumber VARCHAR(191), - familyName_norm VARCHAR(191), - familyName_orig VARCHAR(191), - fullName_norm VARCHAR(191), - fullName_orig VARCHAR(191), - givenName_norm VARCHAR(191), - givenName_orig VARCHAR(191), - honorificPrefix_norm VARCHAR(255), - honorificPrefix_orig VARCHAR(255), - honorificSuffix_norm VARCHAR(255), - honorificSuffix_orig VARCHAR(255), - name_norm VARCHAR(191), - name_orig VARCHAR(191), - nickName_norm VARCHAR(255), - nickName_orig VARCHAR(255), - title_norm VARCHAR(255), - title_orig VARCHAR(255), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE TABLE m_value_policy ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; -CREATE INDEX iCertCampaignNameOrig - ON m_acc_cert_campaign (name_orig); -ALTER TABLE m_acc_cert_campaign - ADD CONSTRAINT uc_acc_cert_campaign_name UNIQUE (name_norm); -CREATE INDEX iCaseObjectRefTargetOid - ON m_acc_cert_case (objectRef_targetOid); -CREATE INDEX iCaseTargetRefTargetOid - ON m_acc_cert_case (targetRef_targetOid); -CREATE INDEX iCaseTenantRefTargetOid - ON m_acc_cert_case (tenantRef_targetOid); -CREATE INDEX iCaseOrgRefTargetOid - ON m_acc_cert_case (orgRef_targetOid); -CREATE INDEX iCertDefinitionNameOrig - ON m_acc_cert_definition (name_orig); -ALTER TABLE m_acc_cert_definition - ADD CONSTRAINT uc_acc_cert_definition_name UNIQUE (name_norm); -CREATE INDEX iCertWorkItemRefTargetOid - ON m_acc_cert_wi_reference (targetOid); -CREATE INDEX iAssignmentAdministrative - ON m_assignment (administrativeStatus); -CREATE INDEX iAssignmentEffective - ON m_assignment (effectiveStatus); -CREATE INDEX iAssignmentValidFrom - ON m_assignment (validFrom); -CREATE INDEX iAssignmentValidTo - ON m_assignment (validTo); -CREATE INDEX iTargetRefTargetOid - ON m_assignment (targetRef_targetOid); -CREATE INDEX iTenantRefTargetOid - ON m_assignment (tenantRef_targetOid); -CREATE INDEX iOrgRefTargetOid - ON m_assignment (orgRef_targetOid); -CREATE INDEX iResourceRefTargetOid - ON m_assignment (resourceRef_targetOid); -CREATE INDEX iAExtensionBoolean - ON m_assignment_ext_boolean (booleanValue); -CREATE INDEX iAExtensionDate - ON m_assignment_ext_date (dateValue); -CREATE INDEX iAExtensionLong - ON m_assignment_ext_long (longValue); -CREATE INDEX iAExtensionPolyString - ON m_assignment_ext_poly (orig); -CREATE INDEX iAExtensionReference - ON m_assignment_ext_reference (targetoid); -CREATE INDEX iAExtensionString - ON m_assignment_ext_string (stringValue); -CREATE INDEX iAssignmentReferenceTargetOid - ON m_assignment_reference (targetOid); -CREATE INDEX iAuditDeltaRecordId - ON m_audit_delta (record_id); -CREATE INDEX iTimestampValue - ON m_audit_event (timestampValue); -CREATE INDEX iChangedItemPath - ON m_audit_item (changedItemPath); -CREATE INDEX iAuditItemRecordId - ON m_audit_item (record_id); -CREATE INDEX iAuditPropValRecordId - ON m_audit_prop_value (record_id); -CREATE INDEX iAuditRefValRecordId - ON m_audit_ref_value (record_id); -CREATE INDEX iCaseWorkItemRefTargetOid - ON m_case_wi_reference (targetOid); - -ALTER TABLE m_ext_item - ADD CONSTRAINT iExtItemDefinition UNIQUE (itemName, itemType, kind); -CREATE INDEX iObjectNameOrig - ON m_object (name_orig); -CREATE INDEX iObjectNameNorm - ON m_object (name_norm); -CREATE INDEX iObjectTypeClass - ON m_object (objectTypeClass); -CREATE INDEX iObjectCreateTimestamp - ON m_object (createTimestamp); -CREATE INDEX iObjectLifecycleState - ON m_object (lifecycleState); -CREATE INDEX iExtensionBoolean - ON m_object_ext_boolean (booleanValue); -CREATE INDEX iExtensionDate - ON m_object_ext_date (dateValue); -CREATE INDEX iExtensionLong - ON m_object_ext_long (longValue); -CREATE INDEX iExtensionPolyString - ON m_object_ext_poly (orig); -CREATE INDEX iExtensionReference - ON m_object_ext_reference (targetoid); -CREATE INDEX iExtensionString - ON m_object_ext_string (stringValue); -CREATE INDEX iOpExecTaskOid - ON m_operation_execution (taskRef_targetOid); -CREATE INDEX iOpExecInitiatorOid - ON m_operation_execution (initiatorRef_targetOid); -CREATE INDEX iOpExecStatus - ON m_operation_execution (status); -CREATE INDEX iOpExecOwnerOid - ON m_operation_execution (owner_oid); --- create index iAncestor on m_org_closure (ancestor_oid); --- create index iDescendant on m_org_closure (descendant_oid); -CREATE INDEX iDescendantAncestor - ON m_org_closure (descendant_oid, ancestor_oid); -CREATE INDEX iReferenceTargetTypeRelation - ON m_reference (targetOid, reference_type, relation); -CREATE INDEX iShadowResourceRef - ON m_shadow (resourceRef_targetOid); -CREATE INDEX iShadowDead - ON m_shadow (dead); -CREATE INDEX iShadowKind - ON m_shadow (kind); -CREATE INDEX iShadowIntent - ON m_shadow (intent); -CREATE INDEX iShadowObjectClass - ON m_shadow (objectClass); -CREATE INDEX iShadowFailedOperationType - ON m_shadow (failedOperationType); -CREATE INDEX iShadowSyncSituation - ON m_shadow (synchronizationSituation); -CREATE INDEX iShadowPendingOperationCount - ON m_shadow (pendingOperationCount); -CREATE INDEX iShadowNameOrig - ON m_shadow (name_orig); -CREATE INDEX iShadowNameNorm - ON m_shadow (name_norm); -CREATE INDEX iParent - ON m_task (parent); -CREATE INDEX iTaskWfProcessInstanceId - ON m_task (wfProcessInstanceId); -CREATE INDEX iTaskWfStartTimestamp - ON m_task (wfStartTimestamp); -CREATE INDEX iTaskWfEndTimestamp - ON m_task (wfEndTimestamp); -CREATE INDEX iTaskWfRequesterOid - ON m_task (wfRequesterRef_targetOid); -CREATE INDEX iTaskWfObjectOid - ON m_task (wfObjectRef_targetOid); -CREATE INDEX iTaskWfTargetOid - ON m_task (wfTargetRef_targetOid); -CREATE INDEX iTaskNameOrig - ON m_task (name_orig); -ALTER TABLE m_task - ADD CONSTRAINT uc_task_identifier UNIQUE (taskIdentifier); -CREATE INDEX iAbstractRoleIdentifier - ON m_abstract_role (identifier); -CREATE INDEX iRequestable - ON m_abstract_role (requestable); -CREATE INDEX iAutoassignEnabled - ON m_abstract_role (autoassign_enabled); -CREATE INDEX iCaseNameOrig - ON m_case (name_orig); -ALTER TABLE m_case - ADD CONSTRAINT uc_case_name UNIQUE (name_norm); -CREATE INDEX iConnectorNameOrig - ON m_connector (name_orig); -CREATE INDEX iConnectorNameNorm - ON m_connector (name_norm); -CREATE INDEX iConnectorHostNameOrig - ON m_connector_host (name_orig); -ALTER TABLE m_connector_host - ADD CONSTRAINT uc_connector_host_name UNIQUE (name_norm); -CREATE INDEX iFocusAdministrative - ON m_focus (administrativeStatus); -CREATE INDEX iFocusEffective - ON m_focus (effectiveStatus); -CREATE INDEX iLocality - ON m_focus (locality_orig); -CREATE INDEX iFocusValidFrom - ON m_focus (validFrom); -CREATE INDEX iFocusValidTo - ON m_focus (validTo); -CREATE INDEX iFormNameOrig - ON m_form (name_orig); -ALTER TABLE m_form - ADD CONSTRAINT uc_form_name UNIQUE (name_norm); -CREATE INDEX iFunctionLibraryNameOrig - ON m_function_library (name_orig); -ALTER TABLE m_function_library - ADD CONSTRAINT uc_function_library_name UNIQUE (name_norm); -CREATE INDEX iGenericObjectNameOrig - ON m_generic_object (name_orig); -ALTER TABLE m_generic_object - ADD CONSTRAINT uc_generic_object_name UNIQUE (name_norm); -CREATE INDEX iLookupTableNameOrig - ON m_lookup_table (name_orig); -ALTER TABLE m_lookup_table - ADD CONSTRAINT uc_lookup_name UNIQUE (name_norm); -ALTER TABLE m_lookup_table_row - ADD CONSTRAINT uc_row_key UNIQUE (owner_oid, row_key); -CREATE INDEX iNodeNameOrig - ON m_node (name_orig); -ALTER TABLE m_node - ADD CONSTRAINT uc_node_name UNIQUE (name_norm); -CREATE INDEX iObjectTemplateNameOrig - ON m_object_template (name_orig); -ALTER TABLE m_object_template - ADD CONSTRAINT uc_object_template_name UNIQUE (name_norm); -CREATE INDEX iDisplayOrder - ON m_org (displayOrder); -CREATE INDEX iOrgNameOrig - ON m_org (name_orig); -ALTER TABLE m_org - ADD CONSTRAINT uc_org_name UNIQUE (name_norm); -CREATE INDEX iReportParent - ON m_report (parent); -CREATE INDEX iReportNameOrig - ON m_report (name_orig); -ALTER TABLE m_report - ADD CONSTRAINT uc_report_name UNIQUE (name_norm); -CREATE INDEX iReportOutputNameOrig - ON m_report_output (name_orig); -CREATE INDEX iReportOutputNameNorm - ON m_report_output (name_norm); -CREATE INDEX iResourceNameOrig - ON m_resource (name_orig); -ALTER TABLE m_resource - ADD CONSTRAINT uc_resource_name UNIQUE (name_norm); -CREATE INDEX iRoleNameOrig - ON m_role (name_orig); -ALTER TABLE m_role - ADD CONSTRAINT uc_role_name UNIQUE (name_norm); -CREATE INDEX iSecurityPolicyNameOrig - ON m_security_policy (name_orig); -ALTER TABLE m_security_policy - ADD CONSTRAINT uc_security_policy_name UNIQUE (name_norm); -CREATE INDEX iSequenceNameOrig - ON m_sequence (name_orig); -ALTER TABLE m_sequence - ADD CONSTRAINT uc_sequence_name UNIQUE (name_norm); -CREATE INDEX iServiceNameOrig - ON m_service (name_orig); -CREATE INDEX iServiceNameNorm - ON m_service (name_norm); -CREATE INDEX iSystemConfigurationNameOrig - ON m_system_configuration (name_orig); -ALTER TABLE m_system_configuration - ADD CONSTRAINT uc_system_configuration_name UNIQUE (name_norm); -CREATE INDEX iTriggerTimestamp - ON m_trigger (timestampValue); -CREATE INDEX iFullName - ON m_user (fullName_orig); -CREATE INDEX iFamilyName - ON m_user (familyName_orig); -CREATE INDEX iGivenName - ON m_user (givenName_orig); -CREATE INDEX iEmployeeNumber - ON m_user (employeeNumber); -CREATE INDEX iUserNameOrig - ON m_user (name_orig); -ALTER TABLE m_user - ADD CONSTRAINT uc_user_name UNIQUE (name_norm); -CREATE INDEX iValuePolicyNameOrig - ON m_value_policy (name_orig); -ALTER TABLE m_value_policy - ADD CONSTRAINT uc_value_policy_name UNIQUE (name_norm); -ALTER TABLE m_acc_cert_campaign - ADD CONSTRAINT fk_acc_cert_campaign FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_acc_cert_case - ADD CONSTRAINT fk_acc_cert_case_owner FOREIGN KEY (owner_oid) REFERENCES m_acc_cert_campaign (oid); -ALTER TABLE m_acc_cert_definition - ADD CONSTRAINT fk_acc_cert_definition FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_acc_cert_wi - ADD CONSTRAINT fk_acc_cert_wi_owner FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_acc_cert_case (owner_oid, id); -ALTER TABLE m_acc_cert_wi_reference - ADD CONSTRAINT fk_acc_cert_wi_ref_owner FOREIGN KEY (owner_owner_owner_oid, owner_owner_id, owner_id) REFERENCES m_acc_cert_wi (owner_owner_oid, owner_id, id); -ALTER TABLE m_assignment - ADD CONSTRAINT fk_assignment_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_assignment_ext_boolean - ADD CONSTRAINT fk_a_ext_boolean_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension (owner_owner_oid, owner_id); -ALTER TABLE m_assignment_ext_boolean - ADD CONSTRAINT fk_a_ext_boolean_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_assignment_ext_date - ADD CONSTRAINT fk_a_ext_date_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension (owner_owner_oid, owner_id); -ALTER TABLE m_assignment_ext_date - ADD CONSTRAINT fk_a_ext_date_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_assignment_ext_long - ADD CONSTRAINT fk_a_ext_long_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension (owner_owner_oid, owner_id); -ALTER TABLE m_assignment_ext_long - ADD CONSTRAINT fk_a_ext_long_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_assignment_ext_poly - ADD CONSTRAINT fk_a_ext_poly_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension (owner_owner_oid, owner_id); -ALTER TABLE m_assignment_ext_poly - ADD CONSTRAINT fk_a_ext_poly_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_assignment_ext_reference - ADD CONSTRAINT fk_a_ext_reference_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension (owner_owner_oid, owner_id); -ALTER TABLE m_assignment_ext_reference - ADD CONSTRAINT fk_a_ext_boolean_reference FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_assignment_ext_string - ADD CONSTRAINT fk_a_ext_string_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension (owner_owner_oid, owner_id); -ALTER TABLE m_assignment_ext_string - ADD CONSTRAINT fk_a_ext_string_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_assignment_policy_situation - ADD CONSTRAINT fk_assignment_policy_situation FOREIGN KEY (assignment_oid, assignment_id) REFERENCES m_assignment (owner_oid, id); -ALTER TABLE m_assignment_reference - ADD CONSTRAINT fk_assignment_reference FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_assignment (owner_oid, id); -ALTER TABLE m_audit_delta - ADD CONSTRAINT fk_audit_delta FOREIGN KEY (record_id) REFERENCES m_audit_event (id); -ALTER TABLE m_audit_item - ADD CONSTRAINT fk_audit_item FOREIGN KEY (record_id) REFERENCES m_audit_event (id); -ALTER TABLE m_audit_prop_value - ADD CONSTRAINT fk_audit_prop_value FOREIGN KEY (record_id) REFERENCES m_audit_event (id); -ALTER TABLE m_audit_ref_value - ADD CONSTRAINT fk_audit_ref_value FOREIGN KEY (record_id) REFERENCES m_audit_event (id); -ALTER TABLE m_case_wi - ADD CONSTRAINT fk_case_wi_owner FOREIGN KEY (owner_oid) REFERENCES m_case (oid); -ALTER TABLE m_case_wi_reference - ADD CONSTRAINT fk_case_wi_reference_owner FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_case_wi (owner_oid, id); -ALTER TABLE m_connector_target_system - ADD CONSTRAINT fk_connector_target_system FOREIGN KEY (connector_oid) REFERENCES m_connector (oid); -ALTER TABLE m_focus_photo - ADD CONSTRAINT fk_focus_photo FOREIGN KEY (owner_oid) REFERENCES m_focus (oid); -ALTER TABLE m_focus_policy_situation - ADD CONSTRAINT fk_focus_policy_situation FOREIGN KEY (focus_oid) REFERENCES m_focus (oid); -ALTER TABLE m_object_ext_boolean - ADD CONSTRAINT fk_o_ext_boolean_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_ext_boolean - ADD CONSTRAINT fk_o_ext_boolean_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_object_ext_date - ADD CONSTRAINT fk_o_ext_date_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_ext_date - ADD CONSTRAINT fk_o_ext_date_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_object_ext_long - ADD CONSTRAINT fk_object_ext_long FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_ext_long - ADD CONSTRAINT fk_o_ext_long_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_object_ext_poly - ADD CONSTRAINT fk_o_ext_poly_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_ext_poly - ADD CONSTRAINT fk_o_ext_poly_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_object_ext_reference - ADD CONSTRAINT fk_o_ext_reference_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_ext_reference - ADD CONSTRAINT fk_o_ext_reference_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_object_ext_string - ADD CONSTRAINT fk_object_ext_string FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_ext_string - ADD CONSTRAINT fk_o_ext_string_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_object_subtype - ADD CONSTRAINT fk_object_subtype FOREIGN KEY (object_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_text_info - ADD CONSTRAINT fk_object_text_info_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_operation_execution - ADD CONSTRAINT fk_op_exec_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_org_closure - ADD CONSTRAINT fk_ancestor FOREIGN KEY (ancestor_oid) REFERENCES m_object (oid); -ALTER TABLE m_org_closure - ADD CONSTRAINT fk_descendant FOREIGN KEY (descendant_oid) REFERENCES m_object (oid); -ALTER TABLE m_org_org_type - ADD CONSTRAINT fk_org_org_type FOREIGN KEY (org_oid) REFERENCES m_org (oid); -ALTER TABLE m_reference - ADD CONSTRAINT fk_reference_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_service_type - ADD CONSTRAINT fk_service_type FOREIGN KEY (service_oid) REFERENCES m_service (oid); -ALTER TABLE m_shadow - ADD CONSTRAINT fk_shadow FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_task - ADD CONSTRAINT fk_task FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_task_dependent - ADD CONSTRAINT fk_task_dependent FOREIGN KEY (task_oid) REFERENCES m_task (oid); -ALTER TABLE m_user_employee_type - ADD CONSTRAINT fk_user_employee_type FOREIGN KEY (user_oid) REFERENCES m_user (oid); -ALTER TABLE m_user_organization - ADD CONSTRAINT fk_user_organization FOREIGN KEY (user_oid) REFERENCES m_user (oid); -ALTER TABLE m_user_organizational_unit - ADD CONSTRAINT fk_user_org_unit FOREIGN KEY (user_oid) REFERENCES m_user (oid); -ALTER TABLE m_abstract_role - ADD CONSTRAINT fk_abstract_role FOREIGN KEY (oid) REFERENCES m_focus (oid); -ALTER TABLE m_case - ADD CONSTRAINT fk_case FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_connector - ADD CONSTRAINT fk_connector FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_connector_host - ADD CONSTRAINT fk_connector_host FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_focus - ADD CONSTRAINT fk_focus FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_form - ADD CONSTRAINT fk_form FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_function_library - ADD CONSTRAINT fk_function_library FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_generic_object - ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_lookup_table - ADD CONSTRAINT fk_lookup_table FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_lookup_table_row - ADD CONSTRAINT fk_lookup_table_owner FOREIGN KEY (owner_oid) REFERENCES m_lookup_table (oid); -ALTER TABLE m_node - ADD CONSTRAINT fk_node FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_object_template - ADD CONSTRAINT fk_object_template FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_org - ADD CONSTRAINT fk_org FOREIGN KEY (oid) REFERENCES m_abstract_role (oid); -ALTER TABLE m_report - ADD CONSTRAINT fk_report FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_report_output - ADD CONSTRAINT fk_report_output FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_resource - ADD CONSTRAINT fk_resource FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_role - ADD CONSTRAINT fk_role FOREIGN KEY (oid) REFERENCES m_abstract_role (oid); -ALTER TABLE m_security_policy - ADD CONSTRAINT fk_security_policy FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_sequence - ADD CONSTRAINT fk_sequence FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_service - ADD CONSTRAINT fk_service FOREIGN KEY (oid) REFERENCES m_abstract_role (oid); -ALTER TABLE m_system_configuration - ADD CONSTRAINT fk_system_configuration FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_trigger - ADD CONSTRAINT fk_trigger_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_user - ADD CONSTRAINT fk_user FOREIGN KEY (oid) REFERENCES m_focus (oid); -ALTER TABLE m_value_policy - ADD CONSTRAINT fk_value_policy FOREIGN KEY (oid) REFERENCES m_object (oid); - -# By: Ron Cordell - roncordell -# I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM. - -DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS; -DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE; -DROP TABLE IF EXISTS QRTZ_LOCKS; -DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_JOB_DETAILS; -DROP TABLE IF EXISTS QRTZ_CALENDARS; - -CREATE TABLE QRTZ_JOB_DETAILS( - SCHED_NAME VARCHAR(120) NOT NULL, - JOB_NAME VARCHAR(191) NOT NULL, - JOB_GROUP VARCHAR(191) NOT NULL, - DESCRIPTION VARCHAR(250) NULL, - JOB_CLASS_NAME VARCHAR(250) NOT NULL, - IS_DURABLE VARCHAR(1) NOT NULL, - IS_NONCONCURRENT VARCHAR(1) NOT NULL, - IS_UPDATE_DATA VARCHAR(1) NOT NULL, - REQUESTS_RECOVERY VARCHAR(1) NOT NULL, - JOB_DATA BLOB NULL, - PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -CREATE TABLE QRTZ_TRIGGERS ( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_NAME VARCHAR(191) NOT NULL, - TRIGGER_GROUP VARCHAR(191) NOT NULL, - JOB_NAME VARCHAR(191) NOT NULL, - JOB_GROUP VARCHAR(191) NOT NULL, - DESCRIPTION VARCHAR(250) NULL, - NEXT_FIRE_TIME BIGINT(13) NULL, - PREV_FIRE_TIME BIGINT(13) NULL, - PRIORITY INTEGER NULL, - EXECUTION_GROUP VARCHAR(200) NULL, - TRIGGER_STATE VARCHAR(16) NOT NULL, - TRIGGER_TYPE VARCHAR(8) NOT NULL, - START_TIME BIGINT(13) NOT NULL, - END_TIME BIGINT(13) NULL, - CALENDAR_NAME VARCHAR(191) NULL, - MISFIRE_INSTR SMALLINT(2) NULL, - JOB_DATA BLOB NULL, - PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) - REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -CREATE TABLE QRTZ_SIMPLE_TRIGGERS ( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_NAME VARCHAR(191) NOT NULL, - TRIGGER_GROUP VARCHAR(191) NOT NULL, - REPEAT_COUNT BIGINT(7) NOT NULL, - REPEAT_INTERVAL BIGINT(12) NOT NULL, - TIMES_TRIGGERED BIGINT(10) NOT NULL, - PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -CREATE TABLE QRTZ_CRON_TRIGGERS ( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_NAME VARCHAR(191) NOT NULL, - TRIGGER_GROUP VARCHAR(191) NOT NULL, - CRON_EXPRESSION VARCHAR(120) NOT NULL, - TIME_ZONE_ID VARCHAR(80), - PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -CREATE TABLE QRTZ_SIMPROP_TRIGGERS -( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_NAME VARCHAR(191) NOT NULL, - TRIGGER_GROUP VARCHAR(191) NOT NULL, - STR_PROP_1 VARCHAR(512) NULL, - STR_PROP_2 VARCHAR(512) NULL, - STR_PROP_3 VARCHAR(512) NULL, - INT_PROP_1 INT NULL, - INT_PROP_2 INT NULL, - LONG_PROP_1 BIGINT NULL, - LONG_PROP_2 BIGINT NULL, - DEC_PROP_1 NUMERIC(13,4) NULL, - DEC_PROP_2 NUMERIC(13,4) NULL, - BOOL_PROP_1 VARCHAR(1) NULL, - BOOL_PROP_2 VARCHAR(1) NULL, - PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -CREATE TABLE QRTZ_BLOB_TRIGGERS ( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_NAME VARCHAR(191) NOT NULL, - TRIGGER_GROUP VARCHAR(191) NOT NULL, - BLOB_DATA BLOB NULL, - PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - INDEX (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP), - FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -CREATE TABLE QRTZ_CALENDARS ( - SCHED_NAME VARCHAR(120) NOT NULL, - CALENDAR_NAME VARCHAR(191) NOT NULL, - CALENDAR BLOB NOT NULL, - PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS ( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_GROUP VARCHAR(191) NOT NULL, - PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -CREATE TABLE QRTZ_FIRED_TRIGGERS ( - SCHED_NAME VARCHAR(120) NOT NULL, - ENTRY_ID VARCHAR(95) NOT NULL, - TRIGGER_NAME VARCHAR(191) NOT NULL, - TRIGGER_GROUP VARCHAR(191) NOT NULL, - INSTANCE_NAME VARCHAR(191) NOT NULL, - FIRED_TIME BIGINT(13) NOT NULL, - SCHED_TIME BIGINT(13) NOT NULL, - PRIORITY INTEGER NOT NULL, - EXECUTION_GROUP VARCHAR(200) NULL, - STATE VARCHAR(16) NOT NULL, - JOB_NAME VARCHAR(191) NULL, - JOB_GROUP VARCHAR(191) NULL, - IS_NONCONCURRENT VARCHAR(1) NULL, - REQUESTS_RECOVERY VARCHAR(1) NULL, - PRIMARY KEY (SCHED_NAME,ENTRY_ID)) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -CREATE TABLE QRTZ_SCHEDULER_STATE ( - SCHED_NAME VARCHAR(120) NOT NULL, - INSTANCE_NAME VARCHAR(191) NOT NULL, - LAST_CHECKIN_TIME BIGINT(13) NOT NULL, - CHECKIN_INTERVAL BIGINT(13) NOT NULL, - PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -CREATE TABLE QRTZ_LOCKS ( - SCHED_NAME VARCHAR(120) NOT NULL, - LOCK_NAME VARCHAR(40) NOT NULL, - PRIMARY KEY (SCHED_NAME,LOCK_NAME)) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY); -CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP); - -CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME); -CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP); -CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME); -CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME); -CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME); -CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE); - -CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME); -CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY); -CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP); -CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP); - -create table ACT_GE_PROPERTY ( - NAME_ varchar(64), - VALUE_ varchar(300), - REV_ integer, - primary key (NAME_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -insert into ACT_GE_PROPERTY -values ('schema.version', '5.22.0.0', 1); - -insert into ACT_GE_PROPERTY -values ('schema.history', 'create(5.22.0.0)', 1); - -insert into ACT_GE_PROPERTY -values ('next.dbid', '1', 1); - -create table ACT_GE_BYTEARRAY ( - ID_ varchar(64), - REV_ integer, - NAME_ varchar(255), - DEPLOYMENT_ID_ varchar(64), - BYTES_ LONGBLOB, - GENERATED_ TINYINT, - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_RE_DEPLOYMENT ( - ID_ varchar(64), - NAME_ varchar(255), - CATEGORY_ varchar(255), - TENANT_ID_ varchar(255) default '', - DEPLOY_TIME_ timestamp(3) NULL, - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_RE_MODEL ( - ID_ varchar(64) not null, - REV_ integer, - NAME_ varchar(255), - KEY_ varchar(255), - CATEGORY_ varchar(255), - CREATE_TIME_ timestamp(3) null, - LAST_UPDATE_TIME_ timestamp(3) null, - VERSION_ integer, - META_INFO_ varchar(4000), - DEPLOYMENT_ID_ varchar(64), - EDITOR_SOURCE_VALUE_ID_ varchar(64), - EDITOR_SOURCE_EXTRA_VALUE_ID_ varchar(64), - TENANT_ID_ varchar(255) default '', - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_RU_EXECUTION ( - ID_ varchar(64), - REV_ integer, - PROC_INST_ID_ varchar(64), - BUSINESS_KEY_ varchar(191), - PARENT_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - SUPER_EXEC_ varchar(64), - ACT_ID_ varchar(255), - IS_ACTIVE_ TINYINT, - IS_CONCURRENT_ TINYINT, - IS_SCOPE_ TINYINT, - IS_EVENT_SCOPE_ TINYINT, - SUSPENSION_STATE_ integer, - CACHED_ENT_STATE_ integer, - TENANT_ID_ varchar(255) default '', - NAME_ varchar(255), - LOCK_TIME_ timestamp(3) NULL, - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_RU_JOB ( - ID_ varchar(64) NOT NULL, - REV_ integer, - TYPE_ varchar(255) NOT NULL, - LOCK_EXP_TIME_ timestamp(3) NULL, - LOCK_OWNER_ varchar(255), - EXCLUSIVE_ boolean, - EXECUTION_ID_ varchar(64), - PROCESS_INSTANCE_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - RETRIES_ integer, - EXCEPTION_STACK_ID_ varchar(64), - EXCEPTION_MSG_ varchar(4000), - DUEDATE_ timestamp(3) NULL, - REPEAT_ varchar(255), - HANDLER_TYPE_ varchar(255), - HANDLER_CFG_ varchar(4000), - TENANT_ID_ varchar(255) default '', - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_RE_PROCDEF ( - ID_ varchar(64) not null, - REV_ integer, - CATEGORY_ varchar(255), - NAME_ varchar(255), - KEY_ varchar(191) not null, - VERSION_ integer not null, - DEPLOYMENT_ID_ varchar(64), - RESOURCE_NAME_ varchar(4000), - DGRM_RESOURCE_NAME_ varchar(4000), - DESCRIPTION_ varchar(4000), - HAS_START_FORM_KEY_ TINYINT, - HAS_GRAPHICAL_NOTATION_ TINYINT, - SUSPENSION_STATE_ integer, - TENANT_ID_ varchar(191) default '', - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_RU_TASK ( - ID_ varchar(64), - REV_ integer, - EXECUTION_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - NAME_ varchar(255), - PARENT_TASK_ID_ varchar(64), - DESCRIPTION_ varchar(4000), - TASK_DEF_KEY_ varchar(255), - OWNER_ varchar(255), - ASSIGNEE_ varchar(255), - DELEGATION_ varchar(64), - PRIORITY_ integer, - CREATE_TIME_ timestamp(3) NULL, - DUE_DATE_ datetime(3), - CATEGORY_ varchar(255), - SUSPENSION_STATE_ integer, - TENANT_ID_ varchar(255) default '', - FORM_KEY_ varchar(255), - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_RU_IDENTITYLINK ( - ID_ varchar(64), - REV_ integer, - GROUP_ID_ varchar(191), - TYPE_ varchar(255), - USER_ID_ varchar(191), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_RU_VARIABLE ( - ID_ varchar(64) not null, - REV_ integer, - TYPE_ varchar(255) not null, - NAME_ varchar(255) not null, - EXECUTION_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - TASK_ID_ varchar(64), - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double, - LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_RU_EVENT_SUBSCR ( - ID_ varchar(64) not null, - REV_ integer, - EVENT_TYPE_ varchar(255) not null, - EVENT_NAME_ varchar(255), - EXECUTION_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - ACTIVITY_ID_ varchar(64), - CONFIGURATION_ varchar(191), - CREATED_ timestamp(3) not null DEFAULT CURRENT_TIMESTAMP(3), - PROC_DEF_ID_ varchar(64), - TENANT_ID_ varchar(255) default '', - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_EVT_LOG ( - LOG_NR_ bigint auto_increment, - TYPE_ varchar(64), - PROC_DEF_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - TASK_ID_ varchar(64), - TIME_STAMP_ timestamp(3) not null, - USER_ID_ varchar(255), - DATA_ LONGBLOB, - LOCK_OWNER_ varchar(255), - LOCK_TIME_ timestamp(3) null, - IS_PROCESSED_ tinyint default 0, - primary key (LOG_NR_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_PROCDEF_INFO ( - ID_ varchar(64) not null, - PROC_DEF_ID_ varchar(64) not null, - REV_ integer, - INFO_JSON_ID_ varchar(64), - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_); -create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_); -create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_); -create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_); -create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_); -create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_); -create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_); -create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_); - -alter table ACT_GE_BYTEARRAY - add constraint ACT_FK_BYTEARR_DEPL -foreign key (DEPLOYMENT_ID_) -references ACT_RE_DEPLOYMENT (ID_); - -alter table ACT_RE_PROCDEF - add constraint ACT_UNIQ_PROCDEF -unique (KEY_,VERSION_, TENANT_ID_); - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PROCINST -foreign key (PROC_INST_ID_) -references ACT_RU_EXECUTION (ID_) on delete cascade on update cascade; - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PARENT -foreign key (PARENT_ID_) -references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_SUPER -foreign key (SUPER_EXEC_) -references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PROCDEF -foreign key (PROC_DEF_ID_) -references ACT_RE_PROCDEF (ID_); - -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_TSKASS_TASK -foreign key (TASK_ID_) -references ACT_RU_TASK (ID_); - -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_ATHRZ_PROCEDEF -foreign key (PROC_DEF_ID_) -references ACT_RE_PROCDEF(ID_); - -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_IDL_PROCINST -foreign key (PROC_INST_ID_) -references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_EXE -foreign key (EXECUTION_ID_) -references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_PROCINST -foreign key (PROC_INST_ID_) -references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_PROCDEF -foreign key (PROC_DEF_ID_) -references ACT_RE_PROCDEF (ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_EXE -foreign key (EXECUTION_ID_) -references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_PROCINST -foreign key (PROC_INST_ID_) -references ACT_RU_EXECUTION(ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_BYTEARRAY -foreign key (BYTEARRAY_ID_) -references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RU_JOB - add constraint ACT_FK_JOB_EXCEPTION -foreign key (EXCEPTION_STACK_ID_) -references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RU_EVENT_SUBSCR - add constraint ACT_FK_EVENT_EXEC -foreign key (EXECUTION_ID_) -references ACT_RU_EXECUTION(ID_); - -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_SOURCE -foreign key (EDITOR_SOURCE_VALUE_ID_) -references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_SOURCE_EXTRA -foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) -references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_DEPLOYMENT -foreign key (DEPLOYMENT_ID_) -references ACT_RE_DEPLOYMENT (ID_); - -alter table ACT_PROCDEF_INFO - add constraint ACT_FK_INFO_JSON_BA -foreign key (INFO_JSON_ID_) -references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_PROCDEF_INFO - add constraint ACT_FK_INFO_PROCDEF -foreign key (PROC_DEF_ID_) -references ACT_RE_PROCDEF (ID_); - -alter table ACT_PROCDEF_INFO - add constraint ACT_UNIQ_INFO_PROCDEF -unique (PROC_DEF_ID_); - -create table ACT_HI_PROCINST ( - ID_ varchar(64) not null, - PROC_INST_ID_ varchar(64) not null, - BUSINESS_KEY_ varchar(191), - PROC_DEF_ID_ varchar(64) not null, - START_TIME_ datetime(3) not null, - END_TIME_ datetime(3), - DURATION_ bigint, - START_USER_ID_ varchar(255), - START_ACT_ID_ varchar(255), - END_ACT_ID_ varchar(255), - SUPER_PROCESS_INSTANCE_ID_ varchar(64), - DELETE_REASON_ varchar(4000), - TENANT_ID_ varchar(255) default '', - NAME_ varchar(255), - primary key (ID_), - unique (PROC_INST_ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_HI_ACTINST ( - ID_ varchar(64) not null, - PROC_DEF_ID_ varchar(64) not null, - PROC_INST_ID_ varchar(64) not null, - EXECUTION_ID_ varchar(64) not null, - ACT_ID_ varchar(191) not null, - TASK_ID_ varchar(64), - CALL_PROC_INST_ID_ varchar(64), - ACT_NAME_ varchar(255), - ACT_TYPE_ varchar(255) not null, - ASSIGNEE_ varchar(255), - START_TIME_ datetime(3) not null, - END_TIME_ datetime(3), - DURATION_ bigint, - TENANT_ID_ varchar(255) default '', - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_HI_TASKINST ( - ID_ varchar(64) not null, - PROC_DEF_ID_ varchar(64), - TASK_DEF_KEY_ varchar(255), - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - NAME_ varchar(255), - PARENT_TASK_ID_ varchar(64), - DESCRIPTION_ varchar(4000), - OWNER_ varchar(255), - ASSIGNEE_ varchar(255), - START_TIME_ datetime(3) not null, - CLAIM_TIME_ datetime(3), - END_TIME_ datetime(3), - DURATION_ bigint, - DELETE_REASON_ varchar(4000), - PRIORITY_ integer, - DUE_DATE_ datetime(3), - FORM_KEY_ varchar(255), - CATEGORY_ varchar(255), - TENANT_ID_ varchar(255) default '', - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_HI_VARINST ( - ID_ varchar(64) not null, - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - TASK_ID_ varchar(64), - NAME_ varchar(191) not null, - VAR_TYPE_ varchar(100), - REV_ integer, - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double, - LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), - CREATE_TIME_ datetime(3), - LAST_UPDATED_TIME_ datetime(3), - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_HI_DETAIL ( - ID_ varchar(64) not null, - TYPE_ varchar(255) not null, - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - TASK_ID_ varchar(64), - ACT_INST_ID_ varchar(64), - NAME_ varchar(191) not null, - VAR_TYPE_ varchar(255), - REV_ integer, - TIME_ datetime(3) not null, - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double, - LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_HI_COMMENT ( - ID_ varchar(64) not null, - TYPE_ varchar(255), - TIME_ datetime(3) not null, - USER_ID_ varchar(255), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - ACTION_ varchar(255), - MESSAGE_ varchar(4000), - FULL_MSG_ LONGBLOB, - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_HI_ATTACHMENT ( - ID_ varchar(64) not null, - REV_ integer, - USER_ID_ varchar(255), - NAME_ varchar(255), - DESCRIPTION_ varchar(4000), - TYPE_ varchar(255), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - URL_ varchar(4000), - CONTENT_ID_ varchar(64), - TIME_ datetime(3), - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_HI_IDENTITYLINK ( - ID_ varchar(64), - GROUP_ID_ varchar(255), - TYPE_ varchar(255), - USER_ID_ varchar(191), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - - -create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_); -create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_); -create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_); -create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_); -create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_); -create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_); -create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_); -create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_); -create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_); -create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_); -create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_); -create index ACT_IDX_HI_PROCVAR_TASK_ID on ACT_HI_VARINST(TASK_ID_); -create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_); -create index ACT_IDX_HI_ACT_INST_EXEC on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_); -create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_); -create index ACT_IDX_HI_IDENT_LNK_TASK on ACT_HI_IDENTITYLINK(TASK_ID_); -create index ACT_IDX_HI_IDENT_LNK_PROCINST on ACT_HI_IDENTITYLINK(PROC_INST_ID_); -create index ACT_IDX_HI_TASK_INST_PROCINST on ACT_HI_TASKINST(PROC_INST_ID_); - -create table ACT_ID_GROUP ( - ID_ varchar(64), - REV_ integer, - NAME_ varchar(255), - TYPE_ varchar(255), - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_ID_MEMBERSHIP ( - USER_ID_ varchar(64), - GROUP_ID_ varchar(64), - primary key (USER_ID_, GROUP_ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_ID_USER ( - ID_ varchar(64), - REV_ integer, - FIRST_ varchar(255), - LAST_ varchar(255), - EMAIL_ varchar(255), - PWD_ varchar(255), - PICTURE_ID_ varchar(64), - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -create table ACT_ID_INFO ( - ID_ varchar(64), - REV_ integer, - USER_ID_ varchar(64), - TYPE_ varchar(64), - KEY_ varchar(255), - VALUE_ varchar(255), - PASSWORD_ LONGBLOB, - PARENT_ID_ varchar(255), - primary key (ID_) -) DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_GROUP -foreign key (GROUP_ID_) -references ACT_ID_GROUP (ID_); - -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_USER -foreign key (USER_ID_) -references ACT_ID_USER (ID_); - -commit; diff --git a/config/sql/_all/mysql-3.8-all.sql b/config/sql/_all/mysql-3.8-all.sql deleted file mode 100644 index a679e5805a5..00000000000 --- a/config/sql/_all/mysql-3.8-all.sql +++ /dev/null @@ -1,2052 +0,0 @@ --- remove iAncestor and iDescendant index, they are the same as FK for that fields - -CREATE TABLE m_acc_cert_campaign ( - definitionRef_relation VARCHAR(157), - definitionRef_targetOid VARCHAR(36), - definitionRef_type INTEGER, - endTimestamp DATETIME(6), - handlerUri VARCHAR(255), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36), - ownerRef_type INTEGER, - stageNumber INTEGER, - startTimestamp DATETIME(6), - state INTEGER, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_acc_cert_case ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - administrativeStatus INTEGER, - archiveTimestamp DATETIME(6), - disableReason VARCHAR(255), - disableTimestamp DATETIME(6), - effectiveStatus INTEGER, - enableTimestamp DATETIME(6), - validFrom DATETIME(6), - validTo DATETIME(6), - validityChangeTimestamp DATETIME(6), - validityStatus INTEGER, - currentStageOutcome VARCHAR(255), - fullObject LONGBLOB, - objectRef_relation VARCHAR(157), - objectRef_targetOid VARCHAR(36), - objectRef_type INTEGER, - orgRef_relation VARCHAR(157), - orgRef_targetOid VARCHAR(36), - orgRef_type INTEGER, - outcome VARCHAR(255), - remediedTimestamp DATETIME(6), - reviewDeadline DATETIME(6), - reviewRequestedTimestamp DATETIME(6), - stageNumber INTEGER, - targetRef_relation VARCHAR(157), - targetRef_targetOid VARCHAR(36), - targetRef_type INTEGER, - tenantRef_relation VARCHAR(157), - tenantRef_targetOid VARCHAR(36), - tenantRef_type INTEGER, - PRIMARY KEY (owner_oid, id) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_acc_cert_definition ( - handlerUri VARCHAR(255), - lastCampaignClosedTimestamp DATETIME(6), - lastCampaignStartedTimestamp DATETIME(6), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36), - ownerRef_type INTEGER, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_acc_cert_wi ( - id INTEGER NOT NULL, - owner_id INTEGER NOT NULL, - owner_owner_oid VARCHAR(36) NOT NULL, - closeTimestamp DATETIME(6), - outcome VARCHAR(255), - outputChangeTimestamp DATETIME(6), - performerRef_relation VARCHAR(157), - performerRef_targetOid VARCHAR(36), - performerRef_type INTEGER, - stageNumber INTEGER, - PRIMARY KEY (owner_owner_oid, owner_id, id) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_acc_cert_wi_reference ( - owner_id INTEGER NOT NULL, - owner_owner_id INTEGER NOT NULL, - owner_owner_owner_oid VARCHAR(36) NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) NOT NULL, - targetType INTEGER, - PRIMARY KEY (owner_owner_owner_oid, owner_owner_id, owner_id, relation, targetOid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - administrativeStatus INTEGER, - archiveTimestamp DATETIME(6), - disableReason VARCHAR(255), - disableTimestamp DATETIME(6), - effectiveStatus INTEGER, - enableTimestamp DATETIME(6), - validFrom DATETIME(6), - validTo DATETIME(6), - validityChangeTimestamp DATETIME(6), - validityStatus INTEGER, - assignmentOwner INTEGER, - createChannel VARCHAR(255), - createTimestamp DATETIME(6), - creatorRef_relation VARCHAR(157), - creatorRef_targetOid VARCHAR(36), - creatorRef_type INTEGER, - lifecycleState VARCHAR(255), - modifierRef_relation VARCHAR(157), - modifierRef_targetOid VARCHAR(36), - modifierRef_type INTEGER, - modifyChannel VARCHAR(255), - modifyTimestamp DATETIME(6), - orderValue INTEGER, - orgRef_relation VARCHAR(157), - orgRef_targetOid VARCHAR(36), - orgRef_type INTEGER, - resourceRef_relation VARCHAR(157), - resourceRef_targetOid VARCHAR(36), - resourceRef_type INTEGER, - targetRef_relation VARCHAR(157), - targetRef_targetOid VARCHAR(36), - targetRef_type INTEGER, - tenantRef_relation VARCHAR(157), - tenantRef_targetOid VARCHAR(36), - tenantRef_type INTEGER, - extId INTEGER, - extOid VARCHAR(36), - PRIMARY KEY (owner_oid, id) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_ext_boolean ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - booleanValue BIT NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, booleanValue) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_ext_date ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - dateValue DATETIME(6) NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, dateValue) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_ext_long ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - longValue BIGINT NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, longValue) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_ext_poly ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - orig VARCHAR(255) NOT NULL, - norm VARCHAR(255), - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, orig) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_ext_reference ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - targetoid VARCHAR(36) NOT NULL, - relation VARCHAR(157), - targetType INTEGER, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, targetoid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_ext_string ( - item_id INTEGER NOT NULL, - anyContainer_owner_id INTEGER NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - stringValue VARCHAR(255) NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, stringValue) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_extension ( - owner_id INTEGER NOT NULL, - owner_owner_oid VARCHAR(36) NOT NULL, - booleansCount SMALLINT, - datesCount SMALLINT, - longsCount SMALLINT, - polysCount SMALLINT, - referencesCount SMALLINT, - stringsCount SMALLINT, - PRIMARY KEY (owner_owner_oid, owner_id) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_policy_situation ( - assignment_id INTEGER NOT NULL, - assignment_oid VARCHAR(36) NOT NULL, - policySituation VARCHAR(255) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_assignment_reference ( - owner_id INTEGER NOT NULL, - owner_owner_oid VARCHAR(36) NOT NULL, - reference_type INTEGER NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) NOT NULL, - targetType INTEGER, - PRIMARY KEY (owner_owner_oid, owner_id, reference_type, relation, targetOid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_audit_delta ( - checksum VARCHAR(32) NOT NULL, - record_id BIGINT NOT NULL, - delta LONGBLOB, - deltaOid VARCHAR(36), - deltaType INTEGER, - fullResult LONGBLOB, - objectName_norm VARCHAR(255), - objectName_orig VARCHAR(255), - resourceName_norm VARCHAR(255), - resourceName_orig VARCHAR(255), - resourceOid VARCHAR(36), - status INTEGER, - PRIMARY KEY (record_id, checksum) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_audit_event ( - id BIGINT NOT NULL AUTO_INCREMENT, - attorneyName VARCHAR(255), - attorneyOid VARCHAR(36), - channel VARCHAR(255), - eventIdentifier VARCHAR(255), - eventStage INTEGER, - eventType INTEGER, - hostIdentifier VARCHAR(255), - initiatorName VARCHAR(255), - initiatorOid VARCHAR(36), - initiatorType INTEGER, - message VARCHAR(1024), - nodeIdentifier VARCHAR(255), - outcome INTEGER, - parameter VARCHAR(255), - remoteHostAddress VARCHAR(255), - result VARCHAR(255), - sessionIdentifier VARCHAR(255), - targetName VARCHAR(255), - targetOid VARCHAR(36), - targetOwnerName VARCHAR(255), - targetOwnerOid VARCHAR(36), - targetOwnerType INTEGER, - targetType INTEGER, - taskIdentifier VARCHAR(255), - taskOID VARCHAR(255), - timestampValue DATETIME(6), - PRIMARY KEY (id) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_audit_item ( - changedItemPath VARCHAR(255) NOT NULL, - record_id BIGINT NOT NULL, - PRIMARY KEY (record_id, changedItemPath) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_audit_prop_value ( - id BIGINT NOT NULL AUTO_INCREMENT, - name VARCHAR(255), - record_id BIGINT, - value VARCHAR(1024), - PRIMARY KEY (id) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_audit_ref_value ( - id BIGINT NOT NULL AUTO_INCREMENT, - name VARCHAR(255), - oid VARCHAR(36), - record_id BIGINT, - targetName_norm VARCHAR(255), - targetName_orig VARCHAR(255), - type VARCHAR(255), - PRIMARY KEY (id) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_case_wi ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - closeTimestamp DATETIME(6), - deadline DATETIME(6), - originalAssigneeRef_relation VARCHAR(157), - originalAssigneeRef_targetOid VARCHAR(36), - originalAssigneeRef_type INTEGER, - outcome VARCHAR(255), - performerRef_relation VARCHAR(157), - performerRef_targetOid VARCHAR(36), - performerRef_type INTEGER, - stageNumber INTEGER, - PRIMARY KEY (owner_oid, id) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_case_wi_reference ( - owner_id INTEGER NOT NULL, - owner_owner_oid VARCHAR(36) NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) NOT NULL, - targetType INTEGER, - PRIMARY KEY (owner_owner_oid, owner_id, targetOid, relation) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_connector_target_system ( - connector_oid VARCHAR(36) NOT NULL, - targetSystemType VARCHAR(255) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_ext_item ( - id INTEGER NOT NULL AUTO_INCREMENT, - kind INTEGER, - itemName VARCHAR(157), - itemType VARCHAR(157), - PRIMARY KEY (id) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_focus_photo ( - owner_oid VARCHAR(36) NOT NULL, - photo LONGBLOB, - PRIMARY KEY (owner_oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_focus_policy_situation ( - focus_oid VARCHAR(36) NOT NULL, - policySituation VARCHAR(255) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_object ( - oid VARCHAR(36) NOT NULL, - booleansCount SMALLINT, - createChannel VARCHAR(255), - createTimestamp DATETIME(6), - creatorRef_relation VARCHAR(157), - creatorRef_targetOid VARCHAR(36), - creatorRef_type INTEGER, - datesCount SMALLINT, - fullObject LONGBLOB, - lifecycleState VARCHAR(255), - longsCount SMALLINT, - modifierRef_relation VARCHAR(157), - modifierRef_targetOid VARCHAR(36), - modifierRef_type INTEGER, - modifyChannel VARCHAR(255), - modifyTimestamp DATETIME(6), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - objectTypeClass INTEGER, - polysCount SMALLINT, - referencesCount SMALLINT, - stringsCount SMALLINT, - tenantRef_relation VARCHAR(157), - tenantRef_targetOid VARCHAR(36), - tenantRef_type INTEGER, - version INTEGER NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_object_ext_boolean ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INTEGER NOT NULL, - booleanValue BIT NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, booleanValue) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_object_ext_date ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INTEGER NOT NULL, - dateValue DATETIME(6) NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, dateValue) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_object_ext_long ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INTEGER NOT NULL, - longValue BIGINT NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, longValue) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_object_ext_poly ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INTEGER NOT NULL, - orig VARCHAR(255) NOT NULL, - norm VARCHAR(255), - PRIMARY KEY (owner_oid, ownerType, item_id, orig) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_object_ext_reference ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INTEGER NOT NULL, - targetoid VARCHAR(36) NOT NULL, - relation VARCHAR(157), - targetType INTEGER, - PRIMARY KEY (owner_oid, ownerType, item_id, targetoid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_object_ext_string ( - item_id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INTEGER NOT NULL, - stringValue VARCHAR(255) NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, stringValue) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_object_subtype ( - object_oid VARCHAR(36) NOT NULL, - subtype VARCHAR(255) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_object_text_info ( - owner_oid VARCHAR(36) NOT NULL, - text VARCHAR(255) NOT NULL, - PRIMARY KEY (owner_oid, text) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_operation_execution ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - initiatorRef_relation VARCHAR(157), - initiatorRef_targetOid VARCHAR(36), - initiatorRef_type INTEGER, - status INTEGER, - taskRef_relation VARCHAR(157), - taskRef_targetOid VARCHAR(36), - taskRef_type INTEGER, - timestampValue DATETIME(6), - PRIMARY KEY (owner_oid, id) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_org_closure ( - ancestor_oid VARCHAR(36) NOT NULL, - descendant_oid VARCHAR(36) NOT NULL, - val INTEGER, - PRIMARY KEY (ancestor_oid, descendant_oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_org_org_type ( - org_oid VARCHAR(36) NOT NULL, - orgType VARCHAR(255) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_reference ( - owner_oid VARCHAR(36) NOT NULL, - reference_type INTEGER NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) NOT NULL, - targetType INTEGER, - PRIMARY KEY (owner_oid, reference_type, relation, targetOid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_service_type ( - service_oid VARCHAR(36) NOT NULL, - serviceType VARCHAR(255) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_shadow ( - attemptNumber INTEGER, - dead BIT, - exist BIT, - failedOperationType INTEGER, - fullSynchronizationTimestamp DATETIME(6), - intent VARCHAR(255), - kind INTEGER, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - objectClass VARCHAR(157), - pendingOperationCount INTEGER, - resourceRef_relation VARCHAR(157), - resourceRef_targetOid VARCHAR(36), - resourceRef_type INTEGER, - status INTEGER, - synchronizationSituation INTEGER, - synchronizationTimestamp DATETIME(6), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_task ( - binding INTEGER, - canRunOnNode VARCHAR(255), - category VARCHAR(255), - completionTimestamp DATETIME(6), - executionStatus INTEGER, - fullResult LONGBLOB, - handlerUri VARCHAR(255), - lastRunFinishTimestamp DATETIME(6), - lastRunStartTimestamp DATETIME(6), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - node VARCHAR(255), - objectRef_relation VARCHAR(157), - objectRef_targetOid VARCHAR(36), - objectRef_type INTEGER, - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36), - ownerRef_type INTEGER, - parent VARCHAR(255), - recurrence INTEGER, - status INTEGER, - taskIdentifier VARCHAR(255), - threadStopAction INTEGER, - waitingReason INTEGER, - wfEndTimestamp DATETIME(6), - wfObjectRef_relation VARCHAR(157), - wfObjectRef_targetOid VARCHAR(36), - wfObjectRef_type INTEGER, - wfProcessInstanceId VARCHAR(255), - wfRequesterRef_relation VARCHAR(157), - wfRequesterRef_targetOid VARCHAR(36), - wfRequesterRef_type INTEGER, - wfStartTimestamp DATETIME(6), - wfTargetRef_relation VARCHAR(157), - wfTargetRef_targetOid VARCHAR(36), - wfTargetRef_type INTEGER, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_task_dependent ( - task_oid VARCHAR(36) NOT NULL, - dependent VARCHAR(255) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_user_employee_type ( - user_oid VARCHAR(36) NOT NULL, - employeeType VARCHAR(255) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_user_organization ( - user_oid VARCHAR(36) NOT NULL, - norm VARCHAR(255), - orig VARCHAR(255) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_user_organizational_unit ( - user_oid VARCHAR(36) NOT NULL, - norm VARCHAR(255), - orig VARCHAR(255) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_abstract_role ( - approvalProcess VARCHAR(255), - autoassign_enabled BIT, - displayName_norm VARCHAR(255), - displayName_orig VARCHAR(255), - identifier VARCHAR(255), - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36), - ownerRef_type INTEGER, - requestable BIT, - riskLevel VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_case ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - objectRef_relation VARCHAR(157), - objectRef_targetOid VARCHAR(36), - objectRef_type INTEGER, - state VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_connector ( - connectorBundle VARCHAR(255), - connectorHostRef_relation VARCHAR(157), - connectorHostRef_targetOid VARCHAR(36), - connectorHostRef_type INTEGER, - connectorType VARCHAR(255), - connectorVersion VARCHAR(255), - framework VARCHAR(255), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_connector_host ( - hostname VARCHAR(255), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - port VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_focus ( - administrativeStatus INTEGER, - archiveTimestamp DATETIME(6), - disableReason VARCHAR(255), - disableTimestamp DATETIME(6), - effectiveStatus INTEGER, - enableTimestamp DATETIME(6), - validFrom DATETIME(6), - validTo DATETIME(6), - validityChangeTimestamp DATETIME(6), - validityStatus INTEGER, - costCenter VARCHAR(255), - emailAddress VARCHAR(255), - hasPhoto BIT DEFAULT FALSE NOT NULL, - locale VARCHAR(255), - locality_norm VARCHAR(255), - locality_orig VARCHAR(255), - preferredLanguage VARCHAR(255), - telephoneNumber VARCHAR(255), - timezone VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_form ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_function_library ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_generic_object ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - objectType VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_lookup_table ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_lookup_table_row ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - row_key VARCHAR(255), - label_norm VARCHAR(255), - label_orig VARCHAR(255), - lastChangeTimestamp DATETIME(6), - row_value VARCHAR(255), - PRIMARY KEY (owner_oid, id) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_node ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - nodeIdentifier VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_object_template ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - type INTEGER, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_org ( - displayOrder INTEGER, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - tenant BIT, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_report ( - export INTEGER, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - orientation INTEGER, - parent BIT, - useHibernateSession BIT, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_report_output ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - reportRef_relation VARCHAR(157), - reportRef_targetOid VARCHAR(36), - reportRef_type INTEGER, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_resource ( - administrativeState INTEGER, - connectorRef_relation VARCHAR(157), - connectorRef_targetOid VARCHAR(36), - connectorRef_type INTEGER, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - o16_lastAvailabilityStatus INTEGER, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_role ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - roleType VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_security_policy ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_sequence ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_service ( - displayOrder INTEGER, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_system_configuration ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_trigger ( - id INTEGER NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - handlerUri VARCHAR(255), - timestampValue DATETIME(6), - PRIMARY KEY (owner_oid, id) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_user ( - additionalName_norm VARCHAR(255), - additionalName_orig VARCHAR(255), - employeeNumber VARCHAR(255), - familyName_norm VARCHAR(255), - familyName_orig VARCHAR(255), - fullName_norm VARCHAR(255), - fullName_orig VARCHAR(255), - givenName_norm VARCHAR(255), - givenName_orig VARCHAR(255), - honorificPrefix_norm VARCHAR(255), - honorificPrefix_orig VARCHAR(255), - honorificSuffix_norm VARCHAR(255), - honorificSuffix_orig VARCHAR(255), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - nickName_norm VARCHAR(255), - nickName_orig VARCHAR(255), - title_norm VARCHAR(255), - title_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE TABLE m_value_policy ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; -CREATE INDEX iCertCampaignNameOrig - ON m_acc_cert_campaign (name_orig); -ALTER TABLE m_acc_cert_campaign - ADD CONSTRAINT uc_acc_cert_campaign_name UNIQUE (name_norm); -CREATE INDEX iCaseObjectRefTargetOid - ON m_acc_cert_case (objectRef_targetOid); -CREATE INDEX iCaseTargetRefTargetOid - ON m_acc_cert_case (targetRef_targetOid); -CREATE INDEX iCaseTenantRefTargetOid - ON m_acc_cert_case (tenantRef_targetOid); -CREATE INDEX iCaseOrgRefTargetOid - ON m_acc_cert_case (orgRef_targetOid); -CREATE INDEX iCertDefinitionNameOrig - ON m_acc_cert_definition (name_orig); -ALTER TABLE m_acc_cert_definition - ADD CONSTRAINT uc_acc_cert_definition_name UNIQUE (name_norm); -CREATE INDEX iCertWorkItemRefTargetOid - ON m_acc_cert_wi_reference (targetOid); -CREATE INDEX iAssignmentAdministrative - ON m_assignment (administrativeStatus); -CREATE INDEX iAssignmentEffective - ON m_assignment (effectiveStatus); -CREATE INDEX iAssignmentValidFrom - ON m_assignment (validFrom); -CREATE INDEX iAssignmentValidTo - ON m_assignment (validTo); -CREATE INDEX iTargetRefTargetOid - ON m_assignment (targetRef_targetOid); -CREATE INDEX iTenantRefTargetOid - ON m_assignment (tenantRef_targetOid); -CREATE INDEX iOrgRefTargetOid - ON m_assignment (orgRef_targetOid); -CREATE INDEX iResourceRefTargetOid - ON m_assignment (resourceRef_targetOid); -CREATE INDEX iAExtensionBoolean - ON m_assignment_ext_boolean (booleanValue); -CREATE INDEX iAExtensionDate - ON m_assignment_ext_date (dateValue); -CREATE INDEX iAExtensionLong - ON m_assignment_ext_long (longValue); -CREATE INDEX iAExtensionPolyString - ON m_assignment_ext_poly (orig); -CREATE INDEX iAExtensionReference - ON m_assignment_ext_reference (targetoid); -CREATE INDEX iAExtensionString - ON m_assignment_ext_string (stringValue); -CREATE INDEX iAssignmentReferenceTargetOid - ON m_assignment_reference (targetOid); -CREATE INDEX iAuditDeltaRecordId - ON m_audit_delta (record_id); -CREATE INDEX iTimestampValue - ON m_audit_event (timestampValue); -CREATE INDEX iChangedItemPath - ON m_audit_item (changedItemPath); -CREATE INDEX iAuditItemRecordId - ON m_audit_item (record_id); -CREATE INDEX iAuditPropValRecordId - ON m_audit_prop_value (record_id); -CREATE INDEX iAuditRefValRecordId - ON m_audit_ref_value (record_id); -CREATE INDEX iCaseWorkItemRefTargetOid - ON m_case_wi_reference (targetOid); - -ALTER TABLE m_ext_item - ADD CONSTRAINT iExtItemDefinition UNIQUE (itemName, itemType, kind); -CREATE INDEX iObjectNameOrig - ON m_object (name_orig); -CREATE INDEX iObjectNameNorm - ON m_object (name_norm); -CREATE INDEX iObjectTypeClass - ON m_object (objectTypeClass); -CREATE INDEX iObjectCreateTimestamp - ON m_object (createTimestamp); -CREATE INDEX iObjectLifecycleState - ON m_object (lifecycleState); -CREATE INDEX iExtensionBoolean - ON m_object_ext_boolean (booleanValue); -CREATE INDEX iExtensionDate - ON m_object_ext_date (dateValue); -CREATE INDEX iExtensionLong - ON m_object_ext_long (longValue); -CREATE INDEX iExtensionPolyString - ON m_object_ext_poly (orig); -CREATE INDEX iExtensionReference - ON m_object_ext_reference (targetoid); -CREATE INDEX iExtensionString - ON m_object_ext_string (stringValue); -CREATE INDEX iOpExecTaskOid - ON m_operation_execution (taskRef_targetOid); -CREATE INDEX iOpExecInitiatorOid - ON m_operation_execution (initiatorRef_targetOid); -CREATE INDEX iOpExecStatus - ON m_operation_execution (status); -CREATE INDEX iOpExecOwnerOid - ON m_operation_execution (owner_oid); --- create index iAncestor on m_org_closure (ancestor_oid); --- create index iDescendant on m_org_closure (descendant_oid); -CREATE INDEX iDescendantAncestor - ON m_org_closure (descendant_oid, ancestor_oid); -CREATE INDEX iReferenceTargetTypeRelation - ON m_reference (targetOid, reference_type, relation); -CREATE INDEX iShadowResourceRef - ON m_shadow (resourceRef_targetOid); -CREATE INDEX iShadowDead - ON m_shadow (dead); -CREATE INDEX iShadowKind - ON m_shadow (kind); -CREATE INDEX iShadowIntent - ON m_shadow (intent); -CREATE INDEX iShadowObjectClass - ON m_shadow (objectClass); -CREATE INDEX iShadowFailedOperationType - ON m_shadow (failedOperationType); -CREATE INDEX iShadowSyncSituation - ON m_shadow (synchronizationSituation); -CREATE INDEX iShadowPendingOperationCount - ON m_shadow (pendingOperationCount); -CREATE INDEX iShadowNameOrig - ON m_shadow (name_orig); -CREATE INDEX iShadowNameNorm - ON m_shadow (name_norm); -CREATE INDEX iParent - ON m_task (parent); -CREATE INDEX iTaskWfProcessInstanceId - ON m_task (wfProcessInstanceId); -CREATE INDEX iTaskWfStartTimestamp - ON m_task (wfStartTimestamp); -CREATE INDEX iTaskWfEndTimestamp - ON m_task (wfEndTimestamp); -CREATE INDEX iTaskWfRequesterOid - ON m_task (wfRequesterRef_targetOid); -CREATE INDEX iTaskWfObjectOid - ON m_task (wfObjectRef_targetOid); -CREATE INDEX iTaskWfTargetOid - ON m_task (wfTargetRef_targetOid); -CREATE INDEX iTaskNameOrig - ON m_task (name_orig); -ALTER TABLE m_task - ADD CONSTRAINT uc_task_identifier UNIQUE (taskIdentifier); -CREATE INDEX iAbstractRoleIdentifier - ON m_abstract_role (identifier); -CREATE INDEX iRequestable - ON m_abstract_role (requestable); -CREATE INDEX iAutoassignEnabled - ON m_abstract_role (autoassign_enabled); -CREATE INDEX iCaseNameOrig - ON m_case (name_orig); -ALTER TABLE m_case - ADD CONSTRAINT uc_case_name UNIQUE (name_norm); -CREATE INDEX iConnectorNameOrig - ON m_connector (name_orig); -CREATE INDEX iConnectorNameNorm - ON m_connector (name_norm); -CREATE INDEX iConnectorHostNameOrig - ON m_connector_host (name_orig); -ALTER TABLE m_connector_host - ADD CONSTRAINT uc_connector_host_name UNIQUE (name_norm); -CREATE INDEX iFocusAdministrative - ON m_focus (administrativeStatus); -CREATE INDEX iFocusEffective - ON m_focus (effectiveStatus); -CREATE INDEX iLocality - ON m_focus (locality_orig); -CREATE INDEX iFocusValidFrom - ON m_focus (validFrom); -CREATE INDEX iFocusValidTo - ON m_focus (validTo); -CREATE INDEX iFormNameOrig - ON m_form (name_orig); -ALTER TABLE m_form - ADD CONSTRAINT uc_form_name UNIQUE (name_norm); -CREATE INDEX iFunctionLibraryNameOrig - ON m_function_library (name_orig); -ALTER TABLE m_function_library - ADD CONSTRAINT uc_function_library_name UNIQUE (name_norm); -CREATE INDEX iGenericObjectNameOrig - ON m_generic_object (name_orig); -ALTER TABLE m_generic_object - ADD CONSTRAINT uc_generic_object_name UNIQUE (name_norm); -CREATE INDEX iLookupTableNameOrig - ON m_lookup_table (name_orig); -ALTER TABLE m_lookup_table - ADD CONSTRAINT uc_lookup_name UNIQUE (name_norm); -ALTER TABLE m_lookup_table_row - ADD CONSTRAINT uc_row_key UNIQUE (owner_oid, row_key); -CREATE INDEX iNodeNameOrig - ON m_node (name_orig); -ALTER TABLE m_node - ADD CONSTRAINT uc_node_name UNIQUE (name_norm); -CREATE INDEX iObjectTemplateNameOrig - ON m_object_template (name_orig); -ALTER TABLE m_object_template - ADD CONSTRAINT uc_object_template_name UNIQUE (name_norm); -CREATE INDEX iDisplayOrder - ON m_org (displayOrder); -CREATE INDEX iOrgNameOrig - ON m_org (name_orig); -ALTER TABLE m_org - ADD CONSTRAINT uc_org_name UNIQUE (name_norm); -CREATE INDEX iReportParent - ON m_report (parent); -CREATE INDEX iReportNameOrig - ON m_report (name_orig); -ALTER TABLE m_report - ADD CONSTRAINT uc_report_name UNIQUE (name_norm); -CREATE INDEX iReportOutputNameOrig - ON m_report_output (name_orig); -CREATE INDEX iReportOutputNameNorm - ON m_report_output (name_norm); -CREATE INDEX iResourceNameOrig - ON m_resource (name_orig); -ALTER TABLE m_resource - ADD CONSTRAINT uc_resource_name UNIQUE (name_norm); -CREATE INDEX iRoleNameOrig - ON m_role (name_orig); -ALTER TABLE m_role - ADD CONSTRAINT uc_role_name UNIQUE (name_norm); -CREATE INDEX iSecurityPolicyNameOrig - ON m_security_policy (name_orig); -ALTER TABLE m_security_policy - ADD CONSTRAINT uc_security_policy_name UNIQUE (name_norm); -CREATE INDEX iSequenceNameOrig - ON m_sequence (name_orig); -ALTER TABLE m_sequence - ADD CONSTRAINT uc_sequence_name UNIQUE (name_norm); -CREATE INDEX iServiceNameOrig - ON m_service (name_orig); -CREATE INDEX iServiceNameNorm - ON m_service (name_norm); -CREATE INDEX iSystemConfigurationNameOrig - ON m_system_configuration (name_orig); -ALTER TABLE m_system_configuration - ADD CONSTRAINT uc_system_configuration_name UNIQUE (name_norm); -CREATE INDEX iTriggerTimestamp - ON m_trigger (timestampValue); -CREATE INDEX iFullName - ON m_user (fullName_orig); -CREATE INDEX iFamilyName - ON m_user (familyName_orig); -CREATE INDEX iGivenName - ON m_user (givenName_orig); -CREATE INDEX iEmployeeNumber - ON m_user (employeeNumber); -CREATE INDEX iUserNameOrig - ON m_user (name_orig); -ALTER TABLE m_user - ADD CONSTRAINT uc_user_name UNIQUE (name_norm); -CREATE INDEX iValuePolicyNameOrig - ON m_value_policy (name_orig); -ALTER TABLE m_value_policy - ADD CONSTRAINT uc_value_policy_name UNIQUE (name_norm); -ALTER TABLE m_acc_cert_campaign - ADD CONSTRAINT fk_acc_cert_campaign FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_acc_cert_case - ADD CONSTRAINT fk_acc_cert_case_owner FOREIGN KEY (owner_oid) REFERENCES m_acc_cert_campaign (oid); -ALTER TABLE m_acc_cert_definition - ADD CONSTRAINT fk_acc_cert_definition FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_acc_cert_wi - ADD CONSTRAINT fk_acc_cert_wi_owner FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_acc_cert_case (owner_oid, id); -ALTER TABLE m_acc_cert_wi_reference - ADD CONSTRAINT fk_acc_cert_wi_ref_owner FOREIGN KEY (owner_owner_owner_oid, owner_owner_id, owner_id) REFERENCES m_acc_cert_wi (owner_owner_oid, owner_id, id); -ALTER TABLE m_assignment - ADD CONSTRAINT fk_assignment_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_assignment_ext_boolean - ADD CONSTRAINT fk_a_ext_boolean_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension (owner_owner_oid, owner_id); -ALTER TABLE m_assignment_ext_boolean - ADD CONSTRAINT fk_a_ext_boolean_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_assignment_ext_date - ADD CONSTRAINT fk_a_ext_date_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension (owner_owner_oid, owner_id); -ALTER TABLE m_assignment_ext_date - ADD CONSTRAINT fk_a_ext_date_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_assignment_ext_long - ADD CONSTRAINT fk_a_ext_long_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension (owner_owner_oid, owner_id); -ALTER TABLE m_assignment_ext_long - ADD CONSTRAINT fk_a_ext_long_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_assignment_ext_poly - ADD CONSTRAINT fk_a_ext_poly_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension (owner_owner_oid, owner_id); -ALTER TABLE m_assignment_ext_poly - ADD CONSTRAINT fk_a_ext_poly_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_assignment_ext_reference - ADD CONSTRAINT fk_a_ext_reference_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension (owner_owner_oid, owner_id); -ALTER TABLE m_assignment_ext_reference - ADD CONSTRAINT fk_a_ext_boolean_reference FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_assignment_ext_string - ADD CONSTRAINT fk_a_ext_string_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension (owner_owner_oid, owner_id); -ALTER TABLE m_assignment_ext_string - ADD CONSTRAINT fk_a_ext_string_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_assignment_policy_situation - ADD CONSTRAINT fk_assignment_policy_situation FOREIGN KEY (assignment_oid, assignment_id) REFERENCES m_assignment (owner_oid, id); -ALTER TABLE m_assignment_reference - ADD CONSTRAINT fk_assignment_reference FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_assignment (owner_oid, id); -ALTER TABLE m_audit_delta - ADD CONSTRAINT fk_audit_delta FOREIGN KEY (record_id) REFERENCES m_audit_event (id); -ALTER TABLE m_audit_item - ADD CONSTRAINT fk_audit_item FOREIGN KEY (record_id) REFERENCES m_audit_event (id); -ALTER TABLE m_audit_prop_value - ADD CONSTRAINT fk_audit_prop_value FOREIGN KEY (record_id) REFERENCES m_audit_event (id); -ALTER TABLE m_audit_ref_value - ADD CONSTRAINT fk_audit_ref_value FOREIGN KEY (record_id) REFERENCES m_audit_event (id); -ALTER TABLE m_case_wi - ADD CONSTRAINT fk_case_wi_owner FOREIGN KEY (owner_oid) REFERENCES m_case (oid); -ALTER TABLE m_case_wi_reference - ADD CONSTRAINT fk_case_wi_reference_owner FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_case_wi (owner_oid, id); -ALTER TABLE m_connector_target_system - ADD CONSTRAINT fk_connector_target_system FOREIGN KEY (connector_oid) REFERENCES m_connector (oid); -ALTER TABLE m_focus_photo - ADD CONSTRAINT fk_focus_photo FOREIGN KEY (owner_oid) REFERENCES m_focus (oid); -ALTER TABLE m_focus_policy_situation - ADD CONSTRAINT fk_focus_policy_situation FOREIGN KEY (focus_oid) REFERENCES m_focus (oid); -ALTER TABLE m_object_ext_boolean - ADD CONSTRAINT fk_o_ext_boolean_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_ext_boolean - ADD CONSTRAINT fk_o_ext_boolean_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_object_ext_date - ADD CONSTRAINT fk_o_ext_date_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_ext_date - ADD CONSTRAINT fk_o_ext_date_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_object_ext_long - ADD CONSTRAINT fk_object_ext_long FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_ext_long - ADD CONSTRAINT fk_o_ext_long_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_object_ext_poly - ADD CONSTRAINT fk_o_ext_poly_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_ext_poly - ADD CONSTRAINT fk_o_ext_poly_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_object_ext_reference - ADD CONSTRAINT fk_o_ext_reference_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_ext_reference - ADD CONSTRAINT fk_o_ext_reference_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_object_ext_string - ADD CONSTRAINT fk_object_ext_string FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_ext_string - ADD CONSTRAINT fk_o_ext_string_item FOREIGN KEY (item_id) REFERENCES m_ext_item (id); -ALTER TABLE m_object_subtype - ADD CONSTRAINT fk_object_subtype FOREIGN KEY (object_oid) REFERENCES m_object (oid); -ALTER TABLE m_object_text_info - ADD CONSTRAINT fk_object_text_info_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_operation_execution - ADD CONSTRAINT fk_op_exec_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_org_closure - ADD CONSTRAINT fk_ancestor FOREIGN KEY (ancestor_oid) REFERENCES m_object (oid); -ALTER TABLE m_org_closure - ADD CONSTRAINT fk_descendant FOREIGN KEY (descendant_oid) REFERENCES m_object (oid); -ALTER TABLE m_org_org_type - ADD CONSTRAINT fk_org_org_type FOREIGN KEY (org_oid) REFERENCES m_org (oid); -ALTER TABLE m_reference - ADD CONSTRAINT fk_reference_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_service_type - ADD CONSTRAINT fk_service_type FOREIGN KEY (service_oid) REFERENCES m_service (oid); -ALTER TABLE m_shadow - ADD CONSTRAINT fk_shadow FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_task - ADD CONSTRAINT fk_task FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_task_dependent - ADD CONSTRAINT fk_task_dependent FOREIGN KEY (task_oid) REFERENCES m_task (oid); -ALTER TABLE m_user_employee_type - ADD CONSTRAINT fk_user_employee_type FOREIGN KEY (user_oid) REFERENCES m_user (oid); -ALTER TABLE m_user_organization - ADD CONSTRAINT fk_user_organization FOREIGN KEY (user_oid) REFERENCES m_user (oid); -ALTER TABLE m_user_organizational_unit - ADD CONSTRAINT fk_user_org_unit FOREIGN KEY (user_oid) REFERENCES m_user (oid); -ALTER TABLE m_abstract_role - ADD CONSTRAINT fk_abstract_role FOREIGN KEY (oid) REFERENCES m_focus (oid); -ALTER TABLE m_case - ADD CONSTRAINT fk_case FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_connector - ADD CONSTRAINT fk_connector FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_connector_host - ADD CONSTRAINT fk_connector_host FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_focus - ADD CONSTRAINT fk_focus FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_form - ADD CONSTRAINT fk_form FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_function_library - ADD CONSTRAINT fk_function_library FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_generic_object - ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_lookup_table - ADD CONSTRAINT fk_lookup_table FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_lookup_table_row - ADD CONSTRAINT fk_lookup_table_owner FOREIGN KEY (owner_oid) REFERENCES m_lookup_table (oid); -ALTER TABLE m_node - ADD CONSTRAINT fk_node FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_object_template - ADD CONSTRAINT fk_object_template FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_org - ADD CONSTRAINT fk_org FOREIGN KEY (oid) REFERENCES m_abstract_role (oid); -ALTER TABLE m_report - ADD CONSTRAINT fk_report FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_report_output - ADD CONSTRAINT fk_report_output FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_resource - ADD CONSTRAINT fk_resource FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_role - ADD CONSTRAINT fk_role FOREIGN KEY (oid) REFERENCES m_abstract_role (oid); -ALTER TABLE m_security_policy - ADD CONSTRAINT fk_security_policy FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_sequence - ADD CONSTRAINT fk_sequence FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_service - ADD CONSTRAINT fk_service FOREIGN KEY (oid) REFERENCES m_abstract_role (oid); -ALTER TABLE m_system_configuration - ADD CONSTRAINT fk_system_configuration FOREIGN KEY (oid) REFERENCES m_object (oid); -ALTER TABLE m_trigger - ADD CONSTRAINT fk_trigger_owner FOREIGN KEY (owner_oid) REFERENCES m_object (oid); -ALTER TABLE m_user - ADD CONSTRAINT fk_user FOREIGN KEY (oid) REFERENCES m_focus (oid); -ALTER TABLE m_value_policy - ADD CONSTRAINT fk_value_policy FOREIGN KEY (oid) REFERENCES m_object (oid); - -# By: Ron Cordell - roncordell -# I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM. - -DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS; -DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE; -DROP TABLE IF EXISTS QRTZ_LOCKS; -DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_JOB_DETAILS; -DROP TABLE IF EXISTS QRTZ_CALENDARS; - -CREATE TABLE QRTZ_JOB_DETAILS( -SCHED_NAME VARCHAR(120) NOT NULL, -JOB_NAME VARCHAR(200) NOT NULL, -JOB_GROUP VARCHAR(200) NOT NULL, -DESCRIPTION VARCHAR(250) NULL, -JOB_CLASS_NAME VARCHAR(250) NOT NULL, -IS_DURABLE VARCHAR(1) NOT NULL, -IS_NONCONCURRENT VARCHAR(1) NOT NULL, -IS_UPDATE_DATA VARCHAR(1) NOT NULL, -REQUESTS_RECOVERY VARCHAR(1) NOT NULL, -JOB_DATA BLOB NULL, -PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_TRIGGERS ( -SCHED_NAME VARCHAR(120) NOT NULL, -TRIGGER_NAME VARCHAR(200) NOT NULL, -TRIGGER_GROUP VARCHAR(200) NOT NULL, -JOB_NAME VARCHAR(200) NOT NULL, -JOB_GROUP VARCHAR(200) NOT NULL, -DESCRIPTION VARCHAR(250) NULL, -NEXT_FIRE_TIME BIGINT(13) NULL, -PREV_FIRE_TIME BIGINT(13) NULL, -PRIORITY INTEGER NULL, -EXECUTION_GROUP VARCHAR(200) NULL, -TRIGGER_STATE VARCHAR(16) NOT NULL, -TRIGGER_TYPE VARCHAR(8) NOT NULL, -START_TIME BIGINT(13) NOT NULL, -END_TIME BIGINT(13) NULL, -CALENDAR_NAME VARCHAR(200) NULL, -MISFIRE_INSTR SMALLINT(2) NULL, -JOB_DATA BLOB NULL, -PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), -FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) -REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_SIMPLE_TRIGGERS ( -SCHED_NAME VARCHAR(120) NOT NULL, -TRIGGER_NAME VARCHAR(200) NOT NULL, -TRIGGER_GROUP VARCHAR(200) NOT NULL, -REPEAT_COUNT BIGINT(7) NOT NULL, -REPEAT_INTERVAL BIGINT(12) NOT NULL, -TIMES_TRIGGERED BIGINT(10) NOT NULL, -PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), -FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_CRON_TRIGGERS ( -SCHED_NAME VARCHAR(120) NOT NULL, -TRIGGER_NAME VARCHAR(200) NOT NULL, -TRIGGER_GROUP VARCHAR(200) NOT NULL, -CRON_EXPRESSION VARCHAR(120) NOT NULL, -TIME_ZONE_ID VARCHAR(80), -PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), -FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_SIMPROP_TRIGGERS - ( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_NAME VARCHAR(200) NOT NULL, - TRIGGER_GROUP VARCHAR(200) NOT NULL, - STR_PROP_1 VARCHAR(512) NULL, - STR_PROP_2 VARCHAR(512) NULL, - STR_PROP_3 VARCHAR(512) NULL, - INT_PROP_1 INT NULL, - INT_PROP_2 INT NULL, - LONG_PROP_1 BIGINT NULL, - LONG_PROP_2 BIGINT NULL, - DEC_PROP_1 NUMERIC(13,4) NULL, - DEC_PROP_2 NUMERIC(13,4) NULL, - BOOL_PROP_1 VARCHAR(1) NULL, - BOOL_PROP_2 VARCHAR(1) NULL, - PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_BLOB_TRIGGERS ( -SCHED_NAME VARCHAR(120) NOT NULL, -TRIGGER_NAME VARCHAR(200) NOT NULL, -TRIGGER_GROUP VARCHAR(200) NOT NULL, -BLOB_DATA BLOB NULL, -PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), -INDEX (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP), -FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_CALENDARS ( -SCHED_NAME VARCHAR(120) NOT NULL, -CALENDAR_NAME VARCHAR(200) NOT NULL, -CALENDAR BLOB NOT NULL, -PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS ( -SCHED_NAME VARCHAR(120) NOT NULL, -TRIGGER_GROUP VARCHAR(200) NOT NULL, -PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_FIRED_TRIGGERS ( -SCHED_NAME VARCHAR(120) NOT NULL, -ENTRY_ID VARCHAR(95) NOT NULL, -TRIGGER_NAME VARCHAR(200) NOT NULL, -TRIGGER_GROUP VARCHAR(200) NOT NULL, -INSTANCE_NAME VARCHAR(200) NOT NULL, -FIRED_TIME BIGINT(13) NOT NULL, -SCHED_TIME BIGINT(13) NOT NULL, -PRIORITY INTEGER NOT NULL, -EXECUTION_GROUP VARCHAR(200) NULL, -STATE VARCHAR(16) NOT NULL, -JOB_NAME VARCHAR(200) NULL, -JOB_GROUP VARCHAR(200) NULL, -IS_NONCONCURRENT VARCHAR(1) NULL, -REQUESTS_RECOVERY VARCHAR(1) NULL, -PRIMARY KEY (SCHED_NAME,ENTRY_ID)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_SCHEDULER_STATE ( -SCHED_NAME VARCHAR(120) NOT NULL, -INSTANCE_NAME VARCHAR(200) NOT NULL, -LAST_CHECKIN_TIME BIGINT(13) NOT NULL, -CHECKIN_INTERVAL BIGINT(13) NOT NULL, -PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_LOCKS ( -SCHED_NAME VARCHAR(120) NOT NULL, -LOCK_NAME VARCHAR(40) NOT NULL, -PRIMARY KEY (SCHED_NAME,LOCK_NAME)) -ENGINE=InnoDB; - -CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY); -CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP); - -CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME); -CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP); -CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME); -CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME); -CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME); -CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE); - -CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME); -CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY); -CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP); -CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP); - -create table ACT_GE_PROPERTY ( - NAME_ varchar(64), - VALUE_ varchar(300), - REV_ integer, - primary key (NAME_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -insert into ACT_GE_PROPERTY -values ('schema.version', '5.22.0.0', 1); - -insert into ACT_GE_PROPERTY -values ('schema.history', 'create(5.22.0.0)', 1); - -insert into ACT_GE_PROPERTY -values ('next.dbid', '1', 1); - -create table ACT_GE_BYTEARRAY ( - ID_ varchar(64), - REV_ integer, - NAME_ varchar(255), - DEPLOYMENT_ID_ varchar(64), - BYTES_ LONGBLOB, - GENERATED_ TINYINT, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RE_DEPLOYMENT ( - ID_ varchar(64), - NAME_ varchar(255), - CATEGORY_ varchar(255), - TENANT_ID_ varchar(255) default '', - DEPLOY_TIME_ timestamp(3) NULL, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RE_MODEL ( - ID_ varchar(64) not null, - REV_ integer, - NAME_ varchar(255), - KEY_ varchar(255), - CATEGORY_ varchar(255), - CREATE_TIME_ timestamp(3) null, - LAST_UPDATE_TIME_ timestamp(3) null, - VERSION_ integer, - META_INFO_ varchar(4000), - DEPLOYMENT_ID_ varchar(64), - EDITOR_SOURCE_VALUE_ID_ varchar(64), - EDITOR_SOURCE_EXTRA_VALUE_ID_ varchar(64), - TENANT_ID_ varchar(255) default '', - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_EXECUTION ( - ID_ varchar(64), - REV_ integer, - PROC_INST_ID_ varchar(64), - BUSINESS_KEY_ varchar(255), - PARENT_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - SUPER_EXEC_ varchar(64), - ACT_ID_ varchar(255), - IS_ACTIVE_ TINYINT, - IS_CONCURRENT_ TINYINT, - IS_SCOPE_ TINYINT, - IS_EVENT_SCOPE_ TINYINT, - SUSPENSION_STATE_ integer, - CACHED_ENT_STATE_ integer, - TENANT_ID_ varchar(255) default '', - NAME_ varchar(255), - LOCK_TIME_ timestamp(3) NULL, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_JOB ( - ID_ varchar(64) NOT NULL, - REV_ integer, - TYPE_ varchar(255) NOT NULL, - LOCK_EXP_TIME_ timestamp(3) NULL, - LOCK_OWNER_ varchar(255), - EXCLUSIVE_ boolean, - EXECUTION_ID_ varchar(64), - PROCESS_INSTANCE_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - RETRIES_ integer, - EXCEPTION_STACK_ID_ varchar(64), - EXCEPTION_MSG_ varchar(4000), - DUEDATE_ timestamp(3) NULL, - REPEAT_ varchar(255), - HANDLER_TYPE_ varchar(255), - HANDLER_CFG_ varchar(4000), - TENANT_ID_ varchar(255) default '', - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RE_PROCDEF ( - ID_ varchar(64) not null, - REV_ integer, - CATEGORY_ varchar(255), - NAME_ varchar(255), - KEY_ varchar(255) not null, - VERSION_ integer not null, - DEPLOYMENT_ID_ varchar(64), - RESOURCE_NAME_ varchar(4000), - DGRM_RESOURCE_NAME_ varchar(4000), - DESCRIPTION_ varchar(4000), - HAS_START_FORM_KEY_ TINYINT, - HAS_GRAPHICAL_NOTATION_ TINYINT, - SUSPENSION_STATE_ integer, - TENANT_ID_ varchar(255) default '', - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_TASK ( - ID_ varchar(64), - REV_ integer, - EXECUTION_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - NAME_ varchar(255), - PARENT_TASK_ID_ varchar(64), - DESCRIPTION_ varchar(4000), - TASK_DEF_KEY_ varchar(255), - OWNER_ varchar(255), - ASSIGNEE_ varchar(255), - DELEGATION_ varchar(64), - PRIORITY_ integer, - CREATE_TIME_ timestamp(3) NULL, - DUE_DATE_ datetime(3), - CATEGORY_ varchar(255), - SUSPENSION_STATE_ integer, - TENANT_ID_ varchar(255) default '', - FORM_KEY_ varchar(255), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_IDENTITYLINK ( - ID_ varchar(64), - REV_ integer, - GROUP_ID_ varchar(255), - TYPE_ varchar(255), - USER_ID_ varchar(255), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_VARIABLE ( - ID_ varchar(64) not null, - REV_ integer, - TYPE_ varchar(255) not null, - NAME_ varchar(255) not null, - EXECUTION_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - TASK_ID_ varchar(64), - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double, - LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_RU_EVENT_SUBSCR ( - ID_ varchar(64) not null, - REV_ integer, - EVENT_TYPE_ varchar(255) not null, - EVENT_NAME_ varchar(255), - EXECUTION_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - ACTIVITY_ID_ varchar(64), - CONFIGURATION_ varchar(255), - CREATED_ timestamp(3) not null DEFAULT CURRENT_TIMESTAMP(3), - PROC_DEF_ID_ varchar(64), - TENANT_ID_ varchar(255) default '', - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_EVT_LOG ( - LOG_NR_ bigint auto_increment, - TYPE_ varchar(64), - PROC_DEF_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - TASK_ID_ varchar(64), - TIME_STAMP_ timestamp(3) not null, - USER_ID_ varchar(255), - DATA_ LONGBLOB, - LOCK_OWNER_ varchar(255), - LOCK_TIME_ timestamp(3) null, - IS_PROCESSED_ tinyint default 0, - primary key (LOG_NR_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_PROCDEF_INFO ( - ID_ varchar(64) not null, - PROC_DEF_ID_ varchar(64) not null, - REV_ integer, - INFO_JSON_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_); -create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_); -create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_); -create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_); -create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_); -create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_); -create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_); -create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_); - -alter table ACT_GE_BYTEARRAY - add constraint ACT_FK_BYTEARR_DEPL - foreign key (DEPLOYMENT_ID_) - references ACT_RE_DEPLOYMENT (ID_); - -alter table ACT_RE_PROCDEF - add constraint ACT_UNIQ_PROCDEF - unique (KEY_,VERSION_, TENANT_ID_); - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_) on delete cascade on update cascade; - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PARENT - foreign key (PARENT_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_SUPER - foreign key (SUPER_EXEC_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_TSKASS_TASK - foreign key (TASK_ID_) - references ACT_RU_TASK (ID_); - -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_ATHRZ_PROCEDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF(ID_); - -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_IDL_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_EXE - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_EXE - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION(ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_BYTEARRAY - foreign key (BYTEARRAY_ID_) - references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RU_JOB - add constraint ACT_FK_JOB_EXCEPTION - foreign key (EXCEPTION_STACK_ID_) - references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RU_EVENT_SUBSCR - add constraint ACT_FK_EVENT_EXEC - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION(ID_); - -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_SOURCE - foreign key (EDITOR_SOURCE_VALUE_ID_) - references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_SOURCE_EXTRA - foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) - references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_DEPLOYMENT - foreign key (DEPLOYMENT_ID_) - references ACT_RE_DEPLOYMENT (ID_); - -alter table ACT_PROCDEF_INFO - add constraint ACT_FK_INFO_JSON_BA - foreign key (INFO_JSON_ID_) - references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_PROCDEF_INFO - add constraint ACT_FK_INFO_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -alter table ACT_PROCDEF_INFO - add constraint ACT_UNIQ_INFO_PROCDEF - unique (PROC_DEF_ID_); - -create table ACT_HI_PROCINST ( - ID_ varchar(64) not null, - PROC_INST_ID_ varchar(64) not null, - BUSINESS_KEY_ varchar(255), - PROC_DEF_ID_ varchar(64) not null, - START_TIME_ datetime(3) not null, - END_TIME_ datetime(3), - DURATION_ bigint, - START_USER_ID_ varchar(255), - START_ACT_ID_ varchar(255), - END_ACT_ID_ varchar(255), - SUPER_PROCESS_INSTANCE_ID_ varchar(64), - DELETE_REASON_ varchar(4000), - TENANT_ID_ varchar(255) default '', - NAME_ varchar(255), - primary key (ID_), - unique (PROC_INST_ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_ACTINST ( - ID_ varchar(64) not null, - PROC_DEF_ID_ varchar(64) not null, - PROC_INST_ID_ varchar(64) not null, - EXECUTION_ID_ varchar(64) not null, - ACT_ID_ varchar(255) not null, - TASK_ID_ varchar(64), - CALL_PROC_INST_ID_ varchar(64), - ACT_NAME_ varchar(255), - ACT_TYPE_ varchar(255) not null, - ASSIGNEE_ varchar(255), - START_TIME_ datetime(3) not null, - END_TIME_ datetime(3), - DURATION_ bigint, - TENANT_ID_ varchar(255) default '', - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_TASKINST ( - ID_ varchar(64) not null, - PROC_DEF_ID_ varchar(64), - TASK_DEF_KEY_ varchar(255), - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - NAME_ varchar(255), - PARENT_TASK_ID_ varchar(64), - DESCRIPTION_ varchar(4000), - OWNER_ varchar(255), - ASSIGNEE_ varchar(255), - START_TIME_ datetime(3) not null, - CLAIM_TIME_ datetime(3), - END_TIME_ datetime(3), - DURATION_ bigint, - DELETE_REASON_ varchar(4000), - PRIORITY_ integer, - DUE_DATE_ datetime(3), - FORM_KEY_ varchar(255), - CATEGORY_ varchar(255), - TENANT_ID_ varchar(255) default '', - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_VARINST ( - ID_ varchar(64) not null, - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - TASK_ID_ varchar(64), - NAME_ varchar(255) not null, - VAR_TYPE_ varchar(100), - REV_ integer, - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double, - LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), - CREATE_TIME_ datetime(3), - LAST_UPDATED_TIME_ datetime(3), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_DETAIL ( - ID_ varchar(64) not null, - TYPE_ varchar(255) not null, - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - TASK_ID_ varchar(64), - ACT_INST_ID_ varchar(64), - NAME_ varchar(255) not null, - VAR_TYPE_ varchar(255), - REV_ integer, - TIME_ datetime(3) not null, - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double, - LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_COMMENT ( - ID_ varchar(64) not null, - TYPE_ varchar(255), - TIME_ datetime(3) not null, - USER_ID_ varchar(255), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - ACTION_ varchar(255), - MESSAGE_ varchar(4000), - FULL_MSG_ LONGBLOB, - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_ATTACHMENT ( - ID_ varchar(64) not null, - REV_ integer, - USER_ID_ varchar(255), - NAME_ varchar(255), - DESCRIPTION_ varchar(4000), - TYPE_ varchar(255), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - URL_ varchar(4000), - CONTENT_ID_ varchar(64), - TIME_ datetime(3), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_HI_IDENTITYLINK ( - ID_ varchar(64), - GROUP_ID_ varchar(255), - TYPE_ varchar(255), - USER_ID_ varchar(255), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - - -create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_); -create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_); -create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_); -create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_); -create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_); -create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_); -create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_); -create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_); -create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_); -create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_); -create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_); -create index ACT_IDX_HI_PROCVAR_TASK_ID on ACT_HI_VARINST(TASK_ID_); -create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_); -create index ACT_IDX_HI_ACT_INST_EXEC on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_); -create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_); -create index ACT_IDX_HI_IDENT_LNK_TASK on ACT_HI_IDENTITYLINK(TASK_ID_); -create index ACT_IDX_HI_IDENT_LNK_PROCINST on ACT_HI_IDENTITYLINK(PROC_INST_ID_); -create index ACT_IDX_HI_TASK_INST_PROCINST on ACT_HI_TASKINST(PROC_INST_ID_); - -create table ACT_ID_GROUP ( - ID_ varchar(64), - REV_ integer, - NAME_ varchar(255), - TYPE_ varchar(255), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_MEMBERSHIP ( - USER_ID_ varchar(64), - GROUP_ID_ varchar(64), - primary key (USER_ID_, GROUP_ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_USER ( - ID_ varchar(64), - REV_ integer, - FIRST_ varchar(255), - LAST_ varchar(255), - EMAIL_ varchar(255), - PWD_ varchar(255), - PICTURE_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_INFO ( - ID_ varchar(64), - REV_ integer, - USER_ID_ varchar(64), - TYPE_ varchar(64), - KEY_ varchar(255), - VALUE_ varchar(255), - PASSWORD_ LONGBLOB, - PARENT_ID_ varchar(255), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_GROUP - foreign key (GROUP_ID_) - references ACT_ID_GROUP (ID_); - -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_USER - foreign key (USER_ID_) - references ACT_ID_USER (ID_); - -commit; diff --git a/config/sql/_all/mysql-3.9-all-utf8mb4.sql b/config/sql/_all/mysql-4.0-all-utf8mb4.sql similarity index 99% rename from config/sql/_all/mysql-3.9-all-utf8mb4.sql rename to config/sql/_all/mysql-4.0-all-utf8mb4.sql index 282e1489c41..777ba207126 100644 --- a/config/sql/_all/mysql-3.9-all-utf8mb4.sql +++ b/config/sql/_all/mysql-4.0-all-utf8mb4.sql @@ -662,6 +662,15 @@ CREATE TABLE m_abstract_role ( DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ENGINE = InnoDB; +CREATE TABLE m_archetype ( + name_norm VARCHAR(191), + name_orig VARCHAR(191), + oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, + PRIMARY KEY (oid) +) + DEFAULT CHARACTER SET utf8mb4 + COLLATE utf8mb4_bin + ENGINE = InnoDB; CREATE TABLE m_case ( name_norm VARCHAR(191), name_orig VARCHAR(191), @@ -1100,8 +1109,9 @@ CREATE INDEX iAbstractRoleIdentifier ON m_abstract_role (identifier); CREATE INDEX iRequestable ON m_abstract_role (requestable); -CREATE INDEX iAutoassignEnabled - ON m_abstract_role (autoassign_enabled); +CREATE INDEX iAutoassignEnabled ON m_abstract_role(autoassign_enabled); +CREATE INDEX iArchetypeNameOrig ON m_archetype(name_orig); +CREATE INDEX iArchetypeNameNorm ON m_archetype(name_norm); CREATE INDEX iCaseNameOrig ON m_case (name_orig); ALTER TABLE m_case @@ -1324,6 +1334,8 @@ ALTER TABLE m_user_organizational_unit ADD CONSTRAINT fk_user_org_unit FOREIGN KEY (user_oid) REFERENCES m_user (oid); ALTER TABLE m_abstract_role ADD CONSTRAINT fk_abstract_role FOREIGN KEY (oid) REFERENCES m_focus (oid); +ALTER TABLE m_archetype + ADD CONSTRAINT fk_archetype FOREIGN KEY (oid) REFERENCES m_abstract_role(oid); ALTER TABLE m_case ADD CONSTRAINT fk_case FOREIGN KEY (oid) REFERENCES m_object (oid); ALTER TABLE m_connector @@ -1337,7 +1349,7 @@ ALTER TABLE m_form ALTER TABLE m_function_library ADD CONSTRAINT fk_function_library FOREIGN KEY (oid) REFERENCES m_object (oid); ALTER TABLE m_generic_object - ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_object (oid); + ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_focus(oid); ALTER TABLE m_lookup_table ADD CONSTRAINT fk_lookup_table FOREIGN KEY (oid) REFERENCES m_object (oid); ALTER TABLE m_lookup_table_row @@ -1373,7 +1385,7 @@ ALTER TABLE m_user ALTER TABLE m_value_policy ADD CONSTRAINT fk_value_policy FOREIGN KEY (oid) REFERENCES m_object (oid); -INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '3.9'); +INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '4.0'); # By: Ron Cordell - roncordell # I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM. diff --git a/config/sql/_all/mysql-3.9-all.sql b/config/sql/_all/mysql-4.0-all.sql similarity index 99% rename from config/sql/_all/mysql-3.9-all.sql rename to config/sql/_all/mysql-4.0-all.sql index c06b70d3d23..9b22e4dcb40 100644 --- a/config/sql/_all/mysql-3.9-all.sql +++ b/config/sql/_all/mysql-4.0-all.sql @@ -662,6 +662,15 @@ CREATE TABLE m_abstract_role ( DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB; +CREATE TABLE m_archetype ( + name_norm VARCHAR(255), + name_orig VARCHAR(255), + oid VARCHAR(36) NOT NULL, + PRIMARY KEY (oid) +) + DEFAULT CHARACTER SET utf8 + COLLATE utf8_bin + ENGINE = InnoDB; CREATE TABLE m_case ( name_norm VARCHAR(255), name_orig VARCHAR(255), @@ -1102,6 +1111,8 @@ CREATE INDEX iRequestable ON m_abstract_role (requestable); CREATE INDEX iAutoassignEnabled ON m_abstract_role (autoassign_enabled); +CREATE INDEX iArchetypeNameOrig ON m_archetype(name_orig); +CREATE INDEX iArchetypeNameNorm ON m_archetype(name_norm); CREATE INDEX iCaseNameOrig ON m_case (name_orig); ALTER TABLE m_case @@ -1324,6 +1335,8 @@ ALTER TABLE m_user_organizational_unit ADD CONSTRAINT fk_user_org_unit FOREIGN KEY (user_oid) REFERENCES m_user (oid); ALTER TABLE m_abstract_role ADD CONSTRAINT fk_abstract_role FOREIGN KEY (oid) REFERENCES m_focus (oid); +ALTER TABLE m_archetype + ADD CONSTRAINT fk_archetype FOREIGN KEY (oid) REFERENCES m_abstract_role(oid); ALTER TABLE m_case ADD CONSTRAINT fk_case FOREIGN KEY (oid) REFERENCES m_object (oid); ALTER TABLE m_connector @@ -1337,7 +1350,7 @@ ALTER TABLE m_form ALTER TABLE m_function_library ADD CONSTRAINT fk_function_library FOREIGN KEY (oid) REFERENCES m_object (oid); ALTER TABLE m_generic_object - ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_object (oid); + ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_focus(oid); ALTER TABLE m_lookup_table ADD CONSTRAINT fk_lookup_table FOREIGN KEY (oid) REFERENCES m_object (oid); ALTER TABLE m_lookup_table_row @@ -1373,7 +1386,7 @@ ALTER TABLE m_user ALTER TABLE m_value_policy ADD CONSTRAINT fk_value_policy FOREIGN KEY (oid) REFERENCES m_object (oid); -INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '3.9'); +INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '4.0'); # By: Ron Cordell - roncordell # I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM. diff --git a/config/sql/_all/mysql-upgrade-3.8-3.9-utf8mb4.sql b/config/sql/_all/mysql-upgrade-3.8-3.9-utf8mb4.sql deleted file mode 100644 index 7a74357613a..00000000000 --- a/config/sql/_all/mysql-upgrade-3.8-3.9-utf8mb4.sql +++ /dev/null @@ -1,32 +0,0 @@ -CREATE TABLE m_object_collection ( - name_norm VARCHAR(191), - name_orig VARCHAR(191), - oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8mb4 - COLLATE utf8mb4_bin - ENGINE = InnoDB; - -CREATE INDEX iObjectCollectionNameOrig - ON m_object_collection (name_orig); -ALTER TABLE m_object_collection - ADD CONSTRAINT uc_object_collection_name UNIQUE (name_norm); - -ALTER TABLE m_object_collection - ADD CONSTRAINT fk_object_collection FOREIGN KEY (oid) REFERENCES m_object (oid); - -ALTER TABLE m_acc_cert_campaign ADD COLUMN iteration INTEGER DEFAULT 1 NOT NULL; -ALTER TABLE m_acc_cert_case ADD COLUMN iteration INTEGER DEFAULT 1 NOT NULL; -ALTER TABLE m_acc_cert_wi ADD COLUMN iteration INTEGER DEFAULT 1 NOT NULL; - -CREATE TABLE m_global_metadata ( - name VARCHAR(191) NOT NULL, - value VARCHAR(191), - PRIMARY KEY (name) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; - -INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '3.9'); diff --git a/config/sql/_all/mysql-upgrade-3.8-3.9.sql b/config/sql/_all/mysql-upgrade-3.8-3.9.sql deleted file mode 100644 index c363aa1c6d1..00000000000 --- a/config/sql/_all/mysql-upgrade-3.8-3.9.sql +++ /dev/null @@ -1,32 +0,0 @@ -CREATE TABLE m_object_collection ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; - -CREATE INDEX iObjectCollectionNameOrig - ON m_object_collection (name_orig); -ALTER TABLE m_object_collection - ADD CONSTRAINT uc_object_collection_name UNIQUE (name_norm); - -ALTER TABLE m_object_collection - ADD CONSTRAINT fk_object_collection FOREIGN KEY (oid) REFERENCES m_object (oid); - -ALTER TABLE m_acc_cert_campaign ADD COLUMN iteration INTEGER DEFAULT 1 NOT NULL; -ALTER TABLE m_acc_cert_case ADD COLUMN iteration INTEGER DEFAULT 1 NOT NULL; -ALTER TABLE m_acc_cert_wi ADD COLUMN iteration INTEGER DEFAULT 1 NOT NULL; - -CREATE TABLE m_global_metadata ( - name VARCHAR(255) NOT NULL, - value VARCHAR(255), - PRIMARY KEY (name) -) - DEFAULT CHARACTER SET utf8 - COLLATE utf8_bin - ENGINE = InnoDB; - -INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '3.9'); diff --git a/config/sql/_all/mysql-upgrade-3.9-4.0-utf8mb4.sql b/config/sql/_all/mysql-upgrade-3.9-4.0-utf8mb4.sql new file mode 100644 index 00000000000..a4f66ab0528 --- /dev/null +++ b/config/sql/_all/mysql-upgrade-3.9-4.0-utf8mb4.sql @@ -0,0 +1,21 @@ +CREATE TABLE m_archetype ( + name_norm VARCHAR(191), + name_orig VARCHAR(191), + oid VARCHAR(36) CHARSET utf8 COLLATE utf8_bin NOT NULL, + PRIMARY KEY (oid) +) + DEFAULT CHARACTER SET utf8mb4 + COLLATE utf8mb4_bin + ENGINE = InnoDB; + +CREATE INDEX iArchetypeNameOrig ON m_archetype(name_orig); +CREATE INDEX iArchetypeNameNorm ON m_archetype(name_norm); + +ALTER TABLE m_archetype + ADD CONSTRAINT fk_archetype FOREIGN KEY (oid) REFERENCES m_abstract_role(oid); + +ALTER TABLE m_generic_object DROP FOREIGN KEY fk_generic_object; +ALTER TABLE m_generic_object + ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_focus(oid); + +UPDATE m_global_metadata SET value = '4.0' WHERE name = 'databaseSchemaVersion'; \ No newline at end of file diff --git a/config/sql/_all/mysql-upgrade-3.9-4.0.sql b/config/sql/_all/mysql-upgrade-3.9-4.0.sql new file mode 100644 index 00000000000..a371f4ec673 --- /dev/null +++ b/config/sql/_all/mysql-upgrade-3.9-4.0.sql @@ -0,0 +1,21 @@ +CREATE TABLE m_archetype ( + name_norm VARCHAR(255), + name_orig VARCHAR(255), + oid VARCHAR(36) NOT NULL, + PRIMARY KEY (oid) +) + DEFAULT CHARACTER SET utf8 + COLLATE utf8_bin + ENGINE = InnoDB; + +CREATE INDEX iArchetypeNameOrig ON m_archetype(name_orig); +CREATE INDEX iArchetypeNameNorm ON m_archetype(name_norm); + +ALTER TABLE m_archetype + ADD CONSTRAINT fk_archetype FOREIGN KEY (oid) REFERENCES m_abstract_role(oid); + +ALTER TABLE m_generic_object DROP FOREIGN KEY fk_generic_object; +ALTER TABLE m_generic_object + ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_focus(oid); + +UPDATE m_global_metadata SET value = '4.0' WHERE name = 'databaseSchemaVersion'; \ No newline at end of file diff --git a/config/sql/_all/oracle-3.8-all.sql b/config/sql/_all/oracle-3.8-all.sql deleted file mode 100644 index e54068a2699..00000000000 --- a/config/sql/_all/oracle-3.8-all.sql +++ /dev/null @@ -1,1876 +0,0 @@ -CREATE TABLE m_acc_cert_campaign ( - definitionRef_relation VARCHAR2(157 CHAR), - definitionRef_targetOid VARCHAR2(36 CHAR), - definitionRef_type NUMBER(10, 0), - endTimestamp TIMESTAMP, - handlerUri VARCHAR2(255 CHAR), - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - ownerRef_relation VARCHAR2(157 CHAR), - ownerRef_targetOid VARCHAR2(36 CHAR), - ownerRef_type NUMBER(10, 0), - stageNumber NUMBER(10, 0), - startTimestamp TIMESTAMP, - state NUMBER(10, 0), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_acc_cert_case ( - id NUMBER(10, 0) NOT NULL, - owner_oid VARCHAR2(36 CHAR) NOT NULL, - administrativeStatus NUMBER(10, 0), - archiveTimestamp TIMESTAMP, - disableReason VARCHAR2(255 CHAR), - disableTimestamp TIMESTAMP, - effectiveStatus NUMBER(10, 0), - enableTimestamp TIMESTAMP, - validFrom TIMESTAMP, - validTo TIMESTAMP, - validityChangeTimestamp TIMESTAMP, - validityStatus NUMBER(10, 0), - currentStageOutcome VARCHAR2(255 CHAR), - fullObject BLOB, - objectRef_relation VARCHAR2(157 CHAR), - objectRef_targetOid VARCHAR2(36 CHAR), - objectRef_type NUMBER(10, 0), - orgRef_relation VARCHAR2(157 CHAR), - orgRef_targetOid VARCHAR2(36 CHAR), - orgRef_type NUMBER(10, 0), - outcome VARCHAR2(255 CHAR), - remediedTimestamp TIMESTAMP, - reviewDeadline TIMESTAMP, - reviewRequestedTimestamp TIMESTAMP, - stageNumber NUMBER(10, 0), - targetRef_relation VARCHAR2(157 CHAR), - targetRef_targetOid VARCHAR2(36 CHAR), - targetRef_type NUMBER(10, 0), - tenantRef_relation VARCHAR2(157 CHAR), - tenantRef_targetOid VARCHAR2(36 CHAR), - tenantRef_type NUMBER(10, 0), - PRIMARY KEY (owner_oid, id) -) INITRANS 30; -CREATE TABLE m_acc_cert_definition ( - handlerUri VARCHAR2(255 CHAR), - lastCampaignClosedTimestamp TIMESTAMP, - lastCampaignStartedTimestamp TIMESTAMP, - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - ownerRef_relation VARCHAR2(157 CHAR), - ownerRef_targetOid VARCHAR2(36 CHAR), - ownerRef_type NUMBER(10, 0), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_acc_cert_wi ( - id NUMBER(10, 0) NOT NULL, - owner_id NUMBER(10, 0) NOT NULL, - owner_owner_oid VARCHAR2(36 CHAR) NOT NULL, - closeTimestamp TIMESTAMP, - outcome VARCHAR2(255 CHAR), - outputChangeTimestamp TIMESTAMP, - performerRef_relation VARCHAR2(157 CHAR), - performerRef_targetOid VARCHAR2(36 CHAR), - performerRef_type NUMBER(10, 0), - stageNumber NUMBER(10, 0), - PRIMARY KEY (owner_owner_oid, owner_id, id) -) INITRANS 30; -CREATE TABLE m_acc_cert_wi_reference ( - owner_id NUMBER(10, 0) NOT NULL, - owner_owner_id NUMBER(10, 0) NOT NULL, - owner_owner_owner_oid VARCHAR2(36 CHAR) NOT NULL, - relation VARCHAR2(157 CHAR) NOT NULL, - targetOid VARCHAR2(36 CHAR) NOT NULL, - targetType NUMBER(10, 0), - PRIMARY KEY (owner_owner_owner_oid, owner_owner_id, owner_id, relation, targetOid) -) INITRANS 30; -CREATE TABLE m_assignment ( - id NUMBER(10, 0) NOT NULL, - owner_oid VARCHAR2(36 CHAR) NOT NULL, - administrativeStatus NUMBER(10, 0), - archiveTimestamp TIMESTAMP, - disableReason VARCHAR2(255 CHAR), - disableTimestamp TIMESTAMP, - effectiveStatus NUMBER(10, 0), - enableTimestamp TIMESTAMP, - validFrom TIMESTAMP, - validTo TIMESTAMP, - validityChangeTimestamp TIMESTAMP, - validityStatus NUMBER(10, 0), - assignmentOwner NUMBER(10, 0), - createChannel VARCHAR2(255 CHAR), - createTimestamp TIMESTAMP, - creatorRef_relation VARCHAR2(157 CHAR), - creatorRef_targetOid VARCHAR2(36 CHAR), - creatorRef_type NUMBER(10, 0), - lifecycleState VARCHAR2(255 CHAR), - modifierRef_relation VARCHAR2(157 CHAR), - modifierRef_targetOid VARCHAR2(36 CHAR), - modifierRef_type NUMBER(10, 0), - modifyChannel VARCHAR2(255 CHAR), - modifyTimestamp TIMESTAMP, - orderValue NUMBER(10, 0), - orgRef_relation VARCHAR2(157 CHAR), - orgRef_targetOid VARCHAR2(36 CHAR), - orgRef_type NUMBER(10, 0), - resourceRef_relation VARCHAR2(157 CHAR), - resourceRef_targetOid VARCHAR2(36 CHAR), - resourceRef_type NUMBER(10, 0), - targetRef_relation VARCHAR2(157 CHAR), - targetRef_targetOid VARCHAR2(36 CHAR), - targetRef_type NUMBER(10, 0), - tenantRef_relation VARCHAR2(157 CHAR), - tenantRef_targetOid VARCHAR2(36 CHAR), - tenantRef_type NUMBER(10, 0), - extId NUMBER(10, 0), - extOid VARCHAR2(36 CHAR), - PRIMARY KEY (owner_oid, id) -) INITRANS 30; -CREATE TABLE m_assignment_ext_boolean ( - item_id NUMBER(10, 0) NOT NULL, - anyContainer_owner_id NUMBER(10, 0) NOT NULL, - anyContainer_owner_owner_oid VARCHAR2(36 CHAR) NOT NULL, - booleanValue NUMBER(1, 0) NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, booleanValue) -) INITRANS 30; -CREATE TABLE m_assignment_ext_date ( - item_id NUMBER(10, 0) NOT NULL, - anyContainer_owner_id NUMBER(10, 0) NOT NULL, - anyContainer_owner_owner_oid VARCHAR2(36 CHAR) NOT NULL, - dateValue TIMESTAMP NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, dateValue) -) INITRANS 30; -CREATE TABLE m_assignment_ext_long ( - item_id NUMBER(10, 0) NOT NULL, - anyContainer_owner_id NUMBER(10, 0) NOT NULL, - anyContainer_owner_owner_oid VARCHAR2(36 CHAR) NOT NULL, - longValue NUMBER(19, 0) NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, longValue) -) INITRANS 30; -CREATE TABLE m_assignment_ext_poly ( - item_id NUMBER(10, 0) NOT NULL, - anyContainer_owner_id NUMBER(10, 0) NOT NULL, - anyContainer_owner_owner_oid VARCHAR2(36 CHAR) NOT NULL, - orig VARCHAR2(255 CHAR) NOT NULL, - norm VARCHAR2(255 CHAR), - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, orig) -) INITRANS 30; -CREATE TABLE m_assignment_ext_reference ( - item_id NUMBER(10, 0) NOT NULL, - anyContainer_owner_id NUMBER(10, 0) NOT NULL, - anyContainer_owner_owner_oid VARCHAR2(36 CHAR) NOT NULL, - targetoid VARCHAR2(36 CHAR) NOT NULL, - relation VARCHAR2(157 CHAR), - targetType NUMBER(10, 0), - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, targetoid) -) INITRANS 30; -CREATE TABLE m_assignment_ext_string ( - item_id NUMBER(10, 0) NOT NULL, - anyContainer_owner_id NUMBER(10, 0) NOT NULL, - anyContainer_owner_owner_oid VARCHAR2(36 CHAR) NOT NULL, - stringValue VARCHAR2(255 CHAR) NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, stringValue) -) INITRANS 30; -CREATE TABLE m_assignment_extension ( - owner_id NUMBER(10, 0) NOT NULL, - owner_owner_oid VARCHAR2(36 CHAR) NOT NULL, - booleansCount NUMBER(5, 0), - datesCount NUMBER(5, 0), - longsCount NUMBER(5, 0), - polysCount NUMBER(5, 0), - referencesCount NUMBER(5, 0), - stringsCount NUMBER(5, 0), - PRIMARY KEY (owner_owner_oid, owner_id) -) INITRANS 30; -CREATE TABLE m_assignment_policy_situation ( - assignment_id NUMBER(10, 0) NOT NULL, - assignment_oid VARCHAR2(36 CHAR) NOT NULL, - policySituation VARCHAR2(255 CHAR) -) INITRANS 30; -CREATE TABLE m_assignment_reference ( - owner_id NUMBER(10, 0) NOT NULL, - owner_owner_oid VARCHAR2(36 CHAR) NOT NULL, - reference_type NUMBER(10, 0) NOT NULL, - relation VARCHAR2(157 CHAR) NOT NULL, - targetOid VARCHAR2(36 CHAR) NOT NULL, - targetType NUMBER(10, 0), - PRIMARY KEY (owner_owner_oid, owner_id, reference_type, relation, targetOid) -) INITRANS 30; -CREATE TABLE m_audit_delta ( - checksum VARCHAR2(32 CHAR) NOT NULL, - record_id NUMBER(19, 0) NOT NULL, - delta BLOB, - deltaOid VARCHAR2(36 CHAR), - deltaType NUMBER(10, 0), - fullResult BLOB, - objectName_norm VARCHAR2(255 CHAR), - objectName_orig VARCHAR2(255 CHAR), - resourceName_norm VARCHAR2(255 CHAR), - resourceName_orig VARCHAR2(255 CHAR), - resourceOid VARCHAR2(36 CHAR), - status NUMBER(10, 0), - PRIMARY KEY (record_id, checksum) -) INITRANS 30; -CREATE TABLE m_audit_event ( - id NUMBER(19, 0) GENERATED AS IDENTITY, - attorneyName VARCHAR2(255 CHAR), - attorneyOid VARCHAR2(36 CHAR), - channel VARCHAR2(255 CHAR), - eventIdentifier VARCHAR2(255 CHAR), - eventStage NUMBER(10, 0), - eventType NUMBER(10, 0), - hostIdentifier VARCHAR2(255 CHAR), - initiatorName VARCHAR2(255 CHAR), - initiatorOid VARCHAR2(36 CHAR), - initiatorType NUMBER(10, 0), - message VARCHAR2(1024 CHAR), - nodeIdentifier VARCHAR2(255 CHAR), - outcome NUMBER(10, 0), - parameter VARCHAR2(255 CHAR), - remoteHostAddress VARCHAR2(255 CHAR), - result VARCHAR2(255 CHAR), - sessionIdentifier VARCHAR2(255 CHAR), - targetName VARCHAR2(255 CHAR), - targetOid VARCHAR2(36 CHAR), - targetOwnerName VARCHAR2(255 CHAR), - targetOwnerOid VARCHAR2(36 CHAR), - targetOwnerType NUMBER(10, 0), - targetType NUMBER(10, 0), - taskIdentifier VARCHAR2(255 CHAR), - taskOID VARCHAR2(255 CHAR), - timestampValue TIMESTAMP, - PRIMARY KEY (id) -) INITRANS 30; -CREATE TABLE m_audit_item ( - changedItemPath VARCHAR2(255 CHAR) NOT NULL, - record_id NUMBER(19, 0) NOT NULL, - PRIMARY KEY (record_id, changedItemPath) -) INITRANS 30; -CREATE TABLE m_audit_prop_value ( - id NUMBER(19, 0) GENERATED AS IDENTITY, - name VARCHAR2(255 CHAR), - record_id NUMBER(19, 0), - value VARCHAR2(1024 CHAR), - PRIMARY KEY (id) -) INITRANS 30; -CREATE TABLE m_audit_ref_value ( - id NUMBER(19, 0) GENERATED AS IDENTITY, - name VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR), - record_id NUMBER(19, 0), - targetName_norm VARCHAR2(255 CHAR), - targetName_orig VARCHAR2(255 CHAR), - type VARCHAR2(255 CHAR), - PRIMARY KEY (id) -) INITRANS 30; -CREATE TABLE m_case_wi ( - id NUMBER(10, 0) NOT NULL, - owner_oid VARCHAR2(36 CHAR) NOT NULL, - closeTimestamp TIMESTAMP, - deadline TIMESTAMP, - originalAssigneeRef_relation VARCHAR2(157 CHAR), - originalAssigneeRef_targetOid VARCHAR2(36 CHAR), - originalAssigneeRef_type NUMBER(10, 0), - outcome VARCHAR2(255 CHAR), - performerRef_relation VARCHAR2(157 CHAR), - performerRef_targetOid VARCHAR2(36 CHAR), - performerRef_type NUMBER(10, 0), - stageNumber NUMBER(10, 0), - PRIMARY KEY (owner_oid, id) -) INITRANS 30; -CREATE TABLE m_case_wi_reference ( - owner_id NUMBER(10, 0) NOT NULL, - owner_owner_oid VARCHAR2(36 CHAR) NOT NULL, - relation VARCHAR2(157 CHAR) NOT NULL, - targetOid VARCHAR2(36 CHAR) NOT NULL, - targetType NUMBER(10, 0), - PRIMARY KEY (owner_owner_oid, owner_id, targetOid, relation) -) INITRANS 30; -CREATE TABLE m_connector_target_system ( - connector_oid VARCHAR2(36 CHAR) NOT NULL, - targetSystemType VARCHAR2(255 CHAR) -) INITRANS 30; -CREATE TABLE m_ext_item ( - id NUMBER(10, 0) GENERATED AS IDENTITY, - kind NUMBER(10, 0), - itemName VARCHAR2(157 CHAR), - itemType VARCHAR2(157 CHAR), - PRIMARY KEY (id) -) INITRANS 30; -CREATE TABLE m_focus_photo ( - owner_oid VARCHAR2(36 CHAR) NOT NULL, - photo BLOB, - PRIMARY KEY (owner_oid) -) INITRANS 30; -CREATE TABLE m_focus_policy_situation ( - focus_oid VARCHAR2(36 CHAR) NOT NULL, - policySituation VARCHAR2(255 CHAR) -) INITRANS 30; -CREATE TABLE m_object ( - oid VARCHAR2(36 CHAR) NOT NULL, - booleansCount NUMBER(5, 0), - createChannel VARCHAR2(255 CHAR), - createTimestamp TIMESTAMP, - creatorRef_relation VARCHAR2(157 CHAR), - creatorRef_targetOid VARCHAR2(36 CHAR), - creatorRef_type NUMBER(10, 0), - datesCount NUMBER(5, 0), - fullObject BLOB, - lifecycleState VARCHAR2(255 CHAR), - longsCount NUMBER(5, 0), - modifierRef_relation VARCHAR2(157 CHAR), - modifierRef_targetOid VARCHAR2(36 CHAR), - modifierRef_type NUMBER(10, 0), - modifyChannel VARCHAR2(255 CHAR), - modifyTimestamp TIMESTAMP, - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - objectTypeClass NUMBER(10, 0), - polysCount NUMBER(5, 0), - referencesCount NUMBER(5, 0), - stringsCount NUMBER(5, 0), - tenantRef_relation VARCHAR2(157 CHAR), - tenantRef_targetOid VARCHAR2(36 CHAR), - tenantRef_type NUMBER(10, 0), - version NUMBER(10, 0) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_object_ext_boolean ( - item_id NUMBER(10, 0) NOT NULL, - owner_oid VARCHAR2(36 CHAR) NOT NULL, - ownerType NUMBER(10, 0) NOT NULL, - booleanValue NUMBER(1, 0) NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, booleanValue) -) INITRANS 30; -CREATE TABLE m_object_ext_date ( - item_id NUMBER(10, 0) NOT NULL, - owner_oid VARCHAR2(36 CHAR) NOT NULL, - ownerType NUMBER(10, 0) NOT NULL, - dateValue TIMESTAMP NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, dateValue) -) INITRANS 30; -CREATE TABLE m_object_ext_long ( - item_id NUMBER(10, 0) NOT NULL, - owner_oid VARCHAR2(36 CHAR) NOT NULL, - ownerType NUMBER(10, 0) NOT NULL, - longValue NUMBER(19, 0) NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, longValue) -) INITRANS 30; -CREATE TABLE m_object_ext_poly ( - item_id NUMBER(10, 0) NOT NULL, - owner_oid VARCHAR2(36 CHAR) NOT NULL, - ownerType NUMBER(10, 0) NOT NULL, - orig VARCHAR2(255 CHAR) NOT NULL, - norm VARCHAR2(255 CHAR), - PRIMARY KEY (owner_oid, ownerType, item_id, orig) -) INITRANS 30; -CREATE TABLE m_object_ext_reference ( - item_id NUMBER(10, 0) NOT NULL, - owner_oid VARCHAR2(36 CHAR) NOT NULL, - ownerType NUMBER(10, 0) NOT NULL, - targetoid VARCHAR2(36 CHAR) NOT NULL, - relation VARCHAR2(157 CHAR), - targetType NUMBER(10, 0), - PRIMARY KEY (owner_oid, ownerType, item_id, targetoid) -) INITRANS 30; -CREATE TABLE m_object_ext_string ( - item_id NUMBER(10, 0) NOT NULL, - owner_oid VARCHAR2(36 CHAR) NOT NULL, - ownerType NUMBER(10, 0) NOT NULL, - stringValue VARCHAR2(255 CHAR) NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, stringValue) -) INITRANS 30; -CREATE TABLE m_object_subtype ( - object_oid VARCHAR2(36 CHAR) NOT NULL, - subtype VARCHAR2(255 CHAR) -) INITRANS 30; -CREATE TABLE m_object_text_info ( - owner_oid VARCHAR2(36 CHAR) NOT NULL, - text VARCHAR2(255 CHAR) NOT NULL, - PRIMARY KEY (owner_oid, text) -) INITRANS 30; -CREATE TABLE m_operation_execution ( - id NUMBER(10, 0) NOT NULL, - owner_oid VARCHAR2(36 CHAR) NOT NULL, - initiatorRef_relation VARCHAR2(157 CHAR), - initiatorRef_targetOid VARCHAR2(36 CHAR), - initiatorRef_type NUMBER(10, 0), - status NUMBER(10, 0), - taskRef_relation VARCHAR2(157 CHAR), - taskRef_targetOid VARCHAR2(36 CHAR), - taskRef_type NUMBER(10, 0), - timestampValue TIMESTAMP, - PRIMARY KEY (owner_oid, id) -) INITRANS 30; -CREATE TABLE m_org_closure ( - ancestor_oid VARCHAR2(36 CHAR) NOT NULL, - descendant_oid VARCHAR2(36 CHAR) NOT NULL, - val NUMBER(10, 0), - PRIMARY KEY (ancestor_oid, descendant_oid) -) INITRANS 30; -CREATE TABLE m_org_org_type ( - org_oid VARCHAR2(36 CHAR) NOT NULL, - orgType VARCHAR2(255 CHAR) -) INITRANS 30; -CREATE TABLE m_reference ( - owner_oid VARCHAR2(36 CHAR) NOT NULL, - reference_type NUMBER(10, 0) NOT NULL, - relation VARCHAR2(157 CHAR) NOT NULL, - targetOid VARCHAR2(36 CHAR) NOT NULL, - targetType NUMBER(10, 0), - PRIMARY KEY (owner_oid, reference_type, relation, targetOid) -) INITRANS 30; -CREATE TABLE m_service_type ( - service_oid VARCHAR2(36 CHAR) NOT NULL, - serviceType VARCHAR2(255 CHAR) -) INITRANS 30; -CREATE TABLE m_shadow ( - attemptNumber NUMBER(10, 0), - dead NUMBER(1, 0), - exist NUMBER(1, 0), - failedOperationType NUMBER(10, 0), - fullSynchronizationTimestamp TIMESTAMP, - intent VARCHAR2(255 CHAR), - kind NUMBER(10, 0), - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - objectClass VARCHAR2(157 CHAR), - pendingOperationCount NUMBER(10, 0), - resourceRef_relation VARCHAR2(157 CHAR), - resourceRef_targetOid VARCHAR2(36 CHAR), - resourceRef_type NUMBER(10, 0), - status NUMBER(10, 0), - synchronizationSituation NUMBER(10, 0), - synchronizationTimestamp TIMESTAMP, - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_task ( - binding NUMBER(10, 0), - canRunOnNode VARCHAR2(255 CHAR), - category VARCHAR2(255 CHAR), - completionTimestamp TIMESTAMP, - executionStatus NUMBER(10, 0), - fullResult BLOB, - handlerUri VARCHAR2(255 CHAR), - lastRunFinishTimestamp TIMESTAMP, - lastRunStartTimestamp TIMESTAMP, - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - node VARCHAR2(255 CHAR), - objectRef_relation VARCHAR2(157 CHAR), - objectRef_targetOid VARCHAR2(36 CHAR), - objectRef_type NUMBER(10, 0), - ownerRef_relation VARCHAR2(157 CHAR), - ownerRef_targetOid VARCHAR2(36 CHAR), - ownerRef_type NUMBER(10, 0), - parent VARCHAR2(255 CHAR), - recurrence NUMBER(10, 0), - status NUMBER(10, 0), - taskIdentifier VARCHAR2(255 CHAR), - threadStopAction NUMBER(10, 0), - waitingReason NUMBER(10, 0), - wfEndTimestamp TIMESTAMP, - wfObjectRef_relation VARCHAR2(157 CHAR), - wfObjectRef_targetOid VARCHAR2(36 CHAR), - wfObjectRef_type NUMBER(10, 0), - wfProcessInstanceId VARCHAR2(255 CHAR), - wfRequesterRef_relation VARCHAR2(157 CHAR), - wfRequesterRef_targetOid VARCHAR2(36 CHAR), - wfRequesterRef_type NUMBER(10, 0), - wfStartTimestamp TIMESTAMP, - wfTargetRef_relation VARCHAR2(157 CHAR), - wfTargetRef_targetOid VARCHAR2(36 CHAR), - wfTargetRef_type NUMBER(10, 0), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_task_dependent ( - task_oid VARCHAR2(36 CHAR) NOT NULL, - dependent VARCHAR2(255 CHAR) -) INITRANS 30; -CREATE TABLE m_user_employee_type ( - user_oid VARCHAR2(36 CHAR) NOT NULL, - employeeType VARCHAR2(255 CHAR) -) INITRANS 30; -CREATE TABLE m_user_organization ( - user_oid VARCHAR2(36 CHAR) NOT NULL, - norm VARCHAR2(255 CHAR), - orig VARCHAR2(255 CHAR) -) INITRANS 30; -CREATE TABLE m_user_organizational_unit ( - user_oid VARCHAR2(36 CHAR) NOT NULL, - norm VARCHAR2(255 CHAR), - orig VARCHAR2(255 CHAR) -) INITRANS 30; -CREATE TABLE m_abstract_role ( - approvalProcess VARCHAR2(255 CHAR), - autoassign_enabled NUMBER(1, 0), - displayName_norm VARCHAR2(255 CHAR), - displayName_orig VARCHAR2(255 CHAR), - identifier VARCHAR2(255 CHAR), - ownerRef_relation VARCHAR2(157 CHAR), - ownerRef_targetOid VARCHAR2(36 CHAR), - ownerRef_type NUMBER(10, 0), - requestable NUMBER(1, 0), - riskLevel VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_case ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - objectRef_relation VARCHAR2(157 CHAR), - objectRef_targetOid VARCHAR2(36 CHAR), - objectRef_type NUMBER(10, 0), - state VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_connector ( - connectorBundle VARCHAR2(255 CHAR), - connectorHostRef_relation VARCHAR2(157 CHAR), - connectorHostRef_targetOid VARCHAR2(36 CHAR), - connectorHostRef_type NUMBER(10, 0), - connectorType VARCHAR2(255 CHAR), - connectorVersion VARCHAR2(255 CHAR), - framework VARCHAR2(255 CHAR), - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_connector_host ( - hostname VARCHAR2(255 CHAR), - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - port VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_focus ( - administrativeStatus NUMBER(10, 0), - archiveTimestamp TIMESTAMP, - disableReason VARCHAR2(255 CHAR), - disableTimestamp TIMESTAMP, - effectiveStatus NUMBER(10, 0), - enableTimestamp TIMESTAMP, - validFrom TIMESTAMP, - validTo TIMESTAMP, - validityChangeTimestamp TIMESTAMP, - validityStatus NUMBER(10, 0), - costCenter VARCHAR2(255 CHAR), - emailAddress VARCHAR2(255 CHAR), - hasPhoto NUMBER(1, 0) DEFAULT 0 NOT NULL, - locale VARCHAR2(255 CHAR), - locality_norm VARCHAR2(255 CHAR), - locality_orig VARCHAR2(255 CHAR), - preferredLanguage VARCHAR2(255 CHAR), - telephoneNumber VARCHAR2(255 CHAR), - timezone VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_form ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_function_library ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_generic_object ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - objectType VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_lookup_table ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_lookup_table_row ( - id NUMBER(10, 0) NOT NULL, - owner_oid VARCHAR2(36 CHAR) NOT NULL, - row_key VARCHAR2(255 CHAR), - label_norm VARCHAR2(255 CHAR), - label_orig VARCHAR2(255 CHAR), - lastChangeTimestamp TIMESTAMP, - row_value VARCHAR2(255 CHAR), - PRIMARY KEY (owner_oid, id) -) INITRANS 30; -CREATE TABLE m_node ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - nodeIdentifier VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_object_template ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - type NUMBER(10, 0), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_org ( - displayOrder NUMBER(10, 0), - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - tenant NUMBER(1, 0), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_report ( - export NUMBER(10, 0), - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - orientation NUMBER(10, 0), - parent NUMBER(1, 0), - useHibernateSession NUMBER(1, 0), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_report_output ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - reportRef_relation VARCHAR2(157 CHAR), - reportRef_targetOid VARCHAR2(36 CHAR), - reportRef_type NUMBER(10, 0), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_resource ( - administrativeState NUMBER(10, 0), - connectorRef_relation VARCHAR2(157 CHAR), - connectorRef_targetOid VARCHAR2(36 CHAR), - connectorRef_type NUMBER(10, 0), - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - o16_lastAvailabilityStatus NUMBER(10, 0), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_role ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - roleType VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_security_policy ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_sequence ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_service ( - displayOrder NUMBER(10, 0), - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_system_configuration ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_trigger ( - id NUMBER(10, 0) NOT NULL, - owner_oid VARCHAR2(36 CHAR) NOT NULL, - handlerUri VARCHAR2(255 CHAR), - timestampValue TIMESTAMP, - PRIMARY KEY (owner_oid, id) -) INITRANS 30; -CREATE TABLE m_user ( - additionalName_norm VARCHAR2(255 CHAR), - additionalName_orig VARCHAR2(255 CHAR), - employeeNumber VARCHAR2(255 CHAR), - familyName_norm VARCHAR2(255 CHAR), - familyName_orig VARCHAR2(255 CHAR), - fullName_norm VARCHAR2(255 CHAR), - fullName_orig VARCHAR2(255 CHAR), - givenName_norm VARCHAR2(255 CHAR), - givenName_orig VARCHAR2(255 CHAR), - honorificPrefix_norm VARCHAR2(255 CHAR), - honorificPrefix_orig VARCHAR2(255 CHAR), - honorificSuffix_norm VARCHAR2(255 CHAR), - honorificSuffix_orig VARCHAR2(255 CHAR), - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - nickName_norm VARCHAR2(255 CHAR), - nickName_orig VARCHAR2(255 CHAR), - title_norm VARCHAR2(255 CHAR), - title_orig VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE TABLE m_value_policy ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; -CREATE INDEX iCertCampaignNameOrig - ON m_acc_cert_campaign (name_orig) INITRANS 30; -ALTER TABLE m_acc_cert_campaign - ADD CONSTRAINT uc_acc_cert_campaign_name UNIQUE (name_norm); -CREATE INDEX iCaseObjectRefTargetOid - ON m_acc_cert_case (objectRef_targetOid) INITRANS 30; -CREATE INDEX iCaseTargetRefTargetOid - ON m_acc_cert_case (targetRef_targetOid) INITRANS 30; -CREATE INDEX iCaseTenantRefTargetOid - ON m_acc_cert_case (tenantRef_targetOid) INITRANS 30; -CREATE INDEX iCaseOrgRefTargetOid - ON m_acc_cert_case (orgRef_targetOid) INITRANS 30; -CREATE INDEX iCertDefinitionNameOrig - ON m_acc_cert_definition (name_orig) INITRANS 30; -ALTER TABLE m_acc_cert_definition - ADD CONSTRAINT uc_acc_cert_definition_name UNIQUE (name_norm); -CREATE INDEX iCertWorkItemRefTargetOid - ON m_acc_cert_wi_reference (targetOid) INITRANS 30; -CREATE INDEX iAssignmentAdministrative - ON m_assignment (administrativeStatus) INITRANS 30; -CREATE INDEX iAssignmentEffective - ON m_assignment (effectiveStatus) INITRANS 30; -CREATE INDEX iAssignmentValidFrom - ON m_assignment (validFrom) INITRANS 30; -CREATE INDEX iAssignmentValidTo - ON m_assignment (validTo) INITRANS 30; -CREATE INDEX iTargetRefTargetOid - ON m_assignment (targetRef_targetOid) INITRANS 30; -CREATE INDEX iTenantRefTargetOid - ON m_assignment (tenantRef_targetOid) INITRANS 30; -CREATE INDEX iOrgRefTargetOid - ON m_assignment (orgRef_targetOid) INITRANS 30; -CREATE INDEX iResourceRefTargetOid - ON m_assignment (resourceRef_targetOid) INITRANS 30; -CREATE INDEX iAExtensionBoolean - ON m_assignment_ext_boolean (booleanValue) INITRANS 30; -CREATE INDEX iAExtensionDate - ON m_assignment_ext_date (dateValue) INITRANS 30; -CREATE INDEX iAExtensionLong - ON m_assignment_ext_long (longValue) INITRANS 30; -CREATE INDEX iAExtensionPolyString - ON m_assignment_ext_poly (orig) INITRANS 30; -CREATE INDEX iAExtensionReference - ON m_assignment_ext_reference (targetoid) INITRANS 30; -CREATE INDEX iAExtensionString - ON m_assignment_ext_string (stringValue) INITRANS 30; -CREATE INDEX iAssignmentReferenceTargetOid - ON m_assignment_reference (targetOid) INITRANS 30; -CREATE INDEX iAuditDeltaRecordId - ON m_audit_delta (record_id) INITRANS 30; -CREATE INDEX iTimestampValue - ON m_audit_event (timestampValue) INITRANS 30; -CREATE INDEX iChangedItemPath - ON m_audit_item (changedItemPath) INITRANS 30; -CREATE INDEX iAuditItemRecordId - ON m_audit_item (record_id) INITRANS 30; -CREATE INDEX iAuditPropValRecordId - ON m_audit_prop_value (record_id) INITRANS 30; -CREATE INDEX iAuditRefValRecordId - ON m_audit_ref_value (record_id) INITRANS 30; -CREATE INDEX iCaseWorkItemRefTargetOid - ON m_case_wi_reference (targetOid) INITRANS 30; - -ALTER TABLE m_ext_item - ADD CONSTRAINT iExtItemDefinition UNIQUE (itemName, itemType, kind); -CREATE INDEX iObjectNameOrig - ON m_object (name_orig) INITRANS 30; -CREATE INDEX iObjectNameNorm - ON m_object (name_norm) INITRANS 30; -CREATE INDEX iObjectTypeClass - ON m_object (objectTypeClass) INITRANS 30; -CREATE INDEX iObjectCreateTimestamp - ON m_object (createTimestamp) INITRANS 30; -CREATE INDEX iObjectLifecycleState - ON m_object (lifecycleState) INITRANS 30; -CREATE INDEX iExtensionBoolean - ON m_object_ext_boolean (booleanValue) INITRANS 30; -CREATE INDEX iExtensionDate - ON m_object_ext_date (dateValue) INITRANS 30; -CREATE INDEX iExtensionLong - ON m_object_ext_long (longValue) INITRANS 30; -CREATE INDEX iExtensionPolyString - ON m_object_ext_poly (orig) INITRANS 30; -CREATE INDEX iExtensionReference - ON m_object_ext_reference (targetoid) INITRANS 30; -CREATE INDEX iExtensionString - ON m_object_ext_string (stringValue) INITRANS 30; -CREATE INDEX iOpExecTaskOid - ON m_operation_execution (taskRef_targetOid) INITRANS 30; -CREATE INDEX iOpExecInitiatorOid - ON m_operation_execution (initiatorRef_targetOid) INITRANS 30; -CREATE INDEX iOpExecStatus - ON m_operation_execution (status) INITRANS 30; -CREATE INDEX iOpExecOwnerOid - ON m_operation_execution (owner_oid) INITRANS 30; -CREATE INDEX iAncestor - ON m_org_closure (ancestor_oid) INITRANS 30; -CREATE INDEX iDescendant - ON m_org_closure (descendant_oid) INITRANS 30; -CREATE INDEX iDescendantAncestor - ON m_org_closure (descendant_oid, ancestor_oid) INITRANS 30; -CREATE INDEX iReferenceTargetTypeRelation - ON m_reference (targetOid, reference_type, relation) INITRANS 30; -CREATE INDEX iShadowResourceRef - ON m_shadow (resourceRef_targetOid) INITRANS 30; -CREATE INDEX iShadowDead - ON m_shadow (dead) INITRANS 30; -CREATE INDEX iShadowKind - ON m_shadow (kind) INITRANS 30; -CREATE INDEX iShadowIntent - ON m_shadow (intent) INITRANS 30; -CREATE INDEX iShadowObjectClass - ON m_shadow (objectClass) INITRANS 30; -CREATE INDEX iShadowFailedOperationType - ON m_shadow (failedOperationType) INITRANS 30; -CREATE INDEX iShadowSyncSituation - ON m_shadow (synchronizationSituation) INITRANS 30; -CREATE INDEX iShadowPendingOperationCount - ON m_shadow (pendingOperationCount) INITRANS 30; -CREATE INDEX iShadowNameOrig - ON m_shadow (name_orig) INITRANS 30; -CREATE INDEX iShadowNameNorm - ON m_shadow (name_norm) INITRANS 30; -CREATE INDEX iParent - ON m_task (parent) INITRANS 30; -CREATE INDEX iTaskWfProcessInstanceId - ON m_task (wfProcessInstanceId) INITRANS 30; -CREATE INDEX iTaskWfStartTimestamp - ON m_task (wfStartTimestamp) INITRANS 30; -CREATE INDEX iTaskWfEndTimestamp - ON m_task (wfEndTimestamp) INITRANS 30; -CREATE INDEX iTaskWfRequesterOid - ON m_task (wfRequesterRef_targetOid) INITRANS 30; -CREATE INDEX iTaskWfObjectOid - ON m_task (wfObjectRef_targetOid) INITRANS 30; -CREATE INDEX iTaskWfTargetOid - ON m_task (wfTargetRef_targetOid) INITRANS 30; -CREATE INDEX iTaskNameOrig - ON m_task (name_orig) INITRANS 30; -ALTER TABLE m_task - ADD CONSTRAINT uc_task_identifier UNIQUE (taskIdentifier); -CREATE INDEX iAbstractRoleIdentifier - ON m_abstract_role (identifier) INITRANS 30; -CREATE INDEX iRequestable - ON m_abstract_role (requestable) INITRANS 30; -CREATE INDEX iAutoassignEnabled - ON m_abstract_role (autoassign_enabled) INITRANS 30; -CREATE INDEX iCaseNameOrig - ON m_case (name_orig) INITRANS 30; -ALTER TABLE m_case - ADD CONSTRAINT uc_case_name UNIQUE (name_norm); -CREATE INDEX iConnectorNameOrig - ON m_connector (name_orig) INITRANS 30; -CREATE INDEX iConnectorNameNorm - ON m_connector (name_norm) INITRANS 30; -CREATE INDEX iConnectorHostNameOrig - ON m_connector_host (name_orig) INITRANS 30; -ALTER TABLE m_connector_host - ADD CONSTRAINT uc_connector_host_name UNIQUE (name_norm); -CREATE INDEX iFocusAdministrative - ON m_focus (administrativeStatus) INITRANS 30; -CREATE INDEX iFocusEffective - ON m_focus (effectiveStatus) INITRANS 30; -CREATE INDEX iLocality - ON m_focus (locality_orig) INITRANS 30; -CREATE INDEX iFocusValidFrom - ON m_focus (validFrom) INITRANS 30; -CREATE INDEX iFocusValidTo - ON m_focus (validTo) INITRANS 30; -CREATE INDEX iFormNameOrig - ON m_form (name_orig) INITRANS 30; -ALTER TABLE m_form - ADD CONSTRAINT uc_form_name UNIQUE (name_norm); -CREATE INDEX iFunctionLibraryNameOrig - ON m_function_library (name_orig) INITRANS 30; -ALTER TABLE m_function_library - ADD CONSTRAINT uc_function_library_name UNIQUE (name_norm); -CREATE INDEX iGenericObjectNameOrig - ON m_generic_object (name_orig) INITRANS 30; -ALTER TABLE m_generic_object - ADD CONSTRAINT uc_generic_object_name UNIQUE (name_norm); -CREATE INDEX iLookupTableNameOrig - ON m_lookup_table (name_orig) INITRANS 30; -ALTER TABLE m_lookup_table - ADD CONSTRAINT uc_lookup_name UNIQUE (name_norm); -ALTER TABLE m_lookup_table_row - ADD CONSTRAINT uc_row_key UNIQUE (owner_oid, row_key); -CREATE INDEX iNodeNameOrig - ON m_node (name_orig) INITRANS 30; -ALTER TABLE m_node - ADD CONSTRAINT uc_node_name UNIQUE (name_norm); -CREATE INDEX iObjectTemplateNameOrig - ON m_object_template (name_orig) INITRANS 30; -ALTER TABLE m_object_template - ADD CONSTRAINT uc_object_template_name UNIQUE (name_norm); -CREATE INDEX iDisplayOrder - ON m_org (displayOrder) INITRANS 30; -CREATE INDEX iOrgNameOrig - ON m_org (name_orig) INITRANS 30; -ALTER TABLE m_org - ADD CONSTRAINT uc_org_name UNIQUE (name_norm); -CREATE INDEX iReportParent - ON m_report (parent) INITRANS 30; -CREATE INDEX iReportNameOrig - ON m_report (name_orig) INITRANS 30; -ALTER TABLE m_report - ADD CONSTRAINT uc_report_name UNIQUE (name_norm); -CREATE INDEX iReportOutputNameOrig - ON m_report_output (name_orig) INITRANS 30; -CREATE INDEX iReportOutputNameNorm - ON m_report_output (name_norm) INITRANS 30; -CREATE INDEX iResourceNameOrig - ON m_resource (name_orig) INITRANS 30; -ALTER TABLE m_resource - ADD CONSTRAINT uc_resource_name UNIQUE (name_norm); -CREATE INDEX iRoleNameOrig - ON m_role (name_orig) INITRANS 30; -ALTER TABLE m_role - ADD CONSTRAINT uc_role_name UNIQUE (name_norm); -CREATE INDEX iSecurityPolicyNameOrig - ON m_security_policy (name_orig) INITRANS 30; -ALTER TABLE m_security_policy - ADD CONSTRAINT uc_security_policy_name UNIQUE (name_norm); -CREATE INDEX iSequenceNameOrig - ON m_sequence (name_orig) INITRANS 30; -ALTER TABLE m_sequence - ADD CONSTRAINT uc_sequence_name UNIQUE (name_norm); -CREATE INDEX iServiceNameOrig - ON m_service (name_orig) INITRANS 30; -CREATE INDEX iServiceNameNorm - ON m_service (name_norm) INITRANS 30; -CREATE INDEX iSystemConfigurationNameOrig - ON m_system_configuration (name_orig) INITRANS 30; -ALTER TABLE m_system_configuration - ADD CONSTRAINT uc_system_configuration_name UNIQUE (name_norm); -CREATE INDEX iTriggerTimestamp - ON m_trigger (timestampValue) INITRANS 30; -CREATE INDEX iFullName - ON m_user (fullName_orig) INITRANS 30; -CREATE INDEX iFamilyName - ON m_user (familyName_orig) INITRANS 30; -CREATE INDEX iGivenName - ON m_user (givenName_orig) INITRANS 30; -CREATE INDEX iEmployeeNumber - ON m_user (employeeNumber) INITRANS 30; -CREATE INDEX iUserNameOrig - ON m_user (name_orig) INITRANS 30; -ALTER TABLE m_user - ADD CONSTRAINT uc_user_name UNIQUE (name_norm); -CREATE INDEX iValuePolicyNameOrig - ON m_value_policy (name_orig) INITRANS 30; -ALTER TABLE m_value_policy - ADD CONSTRAINT uc_value_policy_name UNIQUE (name_norm); -ALTER TABLE m_acc_cert_campaign - ADD CONSTRAINT fk_acc_cert_campaign FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_acc_cert_case - ADD CONSTRAINT fk_acc_cert_case_owner FOREIGN KEY (owner_oid) REFERENCES m_acc_cert_campaign; -ALTER TABLE m_acc_cert_definition - ADD CONSTRAINT fk_acc_cert_definition FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_acc_cert_wi - ADD CONSTRAINT fk_acc_cert_wi_owner FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_acc_cert_case; -ALTER TABLE m_acc_cert_wi_reference - ADD CONSTRAINT fk_acc_cert_wi_ref_owner FOREIGN KEY (owner_owner_owner_oid, owner_owner_id, owner_id) REFERENCES m_acc_cert_wi; -ALTER TABLE m_assignment - ADD CONSTRAINT fk_assignment_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_assignment_ext_boolean - ADD CONSTRAINT fk_a_ext_boolean_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_boolean - ADD CONSTRAINT fk_a_ext_boolean_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_date - ADD CONSTRAINT fk_a_ext_date_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_date - ADD CONSTRAINT fk_a_ext_date_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_long - ADD CONSTRAINT fk_a_ext_long_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_long - ADD CONSTRAINT fk_a_ext_long_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_poly - ADD CONSTRAINT fk_a_ext_poly_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_poly - ADD CONSTRAINT fk_a_ext_poly_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_reference - ADD CONSTRAINT fk_a_ext_reference_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_reference - ADD CONSTRAINT fk_a_ext_boolean_reference FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_string - ADD CONSTRAINT fk_a_ext_string_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_string - ADD CONSTRAINT fk_a_ext_string_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_policy_situation - ADD CONSTRAINT fk_assignment_policy_situation FOREIGN KEY (assignment_oid, assignment_id) REFERENCES m_assignment; -ALTER TABLE m_assignment_reference - ADD CONSTRAINT fk_assignment_reference FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_assignment; -ALTER TABLE m_audit_delta - ADD CONSTRAINT fk_audit_delta FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE m_audit_item - ADD CONSTRAINT fk_audit_item FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE m_audit_prop_value - ADD CONSTRAINT fk_audit_prop_value FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE m_audit_ref_value - ADD CONSTRAINT fk_audit_ref_value FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE m_case_wi - ADD CONSTRAINT fk_case_wi_owner FOREIGN KEY (owner_oid) REFERENCES m_case; -ALTER TABLE m_case_wi_reference - ADD CONSTRAINT fk_case_wi_reference_owner FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_case_wi; -ALTER TABLE m_connector_target_system - ADD CONSTRAINT fk_connector_target_system FOREIGN KEY (connector_oid) REFERENCES m_connector; -ALTER TABLE m_focus_photo - ADD CONSTRAINT fk_focus_photo FOREIGN KEY (owner_oid) REFERENCES m_focus; -ALTER TABLE m_focus_policy_situation - ADD CONSTRAINT fk_focus_policy_situation FOREIGN KEY (focus_oid) REFERENCES m_focus; -ALTER TABLE m_object_ext_boolean - ADD CONSTRAINT fk_o_ext_boolean_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_boolean - ADD CONSTRAINT fk_o_ext_boolean_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_date - ADD CONSTRAINT fk_o_ext_date_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_date - ADD CONSTRAINT fk_o_ext_date_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_long - ADD CONSTRAINT fk_object_ext_long FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_long - ADD CONSTRAINT fk_o_ext_long_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_poly - ADD CONSTRAINT fk_o_ext_poly_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_poly - ADD CONSTRAINT fk_o_ext_poly_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_reference - ADD CONSTRAINT fk_o_ext_reference_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_reference - ADD CONSTRAINT fk_o_ext_reference_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_string - ADD CONSTRAINT fk_object_ext_string FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_string - ADD CONSTRAINT fk_o_ext_string_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_subtype - ADD CONSTRAINT fk_object_subtype FOREIGN KEY (object_oid) REFERENCES m_object; -ALTER TABLE m_object_text_info - ADD CONSTRAINT fk_object_text_info_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_operation_execution - ADD CONSTRAINT fk_op_exec_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_org_closure - ADD CONSTRAINT fk_ancestor FOREIGN KEY (ancestor_oid) REFERENCES m_object; -ALTER TABLE m_org_closure - ADD CONSTRAINT fk_descendant FOREIGN KEY (descendant_oid) REFERENCES m_object; -ALTER TABLE m_org_org_type - ADD CONSTRAINT fk_org_org_type FOREIGN KEY (org_oid) REFERENCES m_org; -ALTER TABLE m_reference - ADD CONSTRAINT fk_reference_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_service_type - ADD CONSTRAINT fk_service_type FOREIGN KEY (service_oid) REFERENCES m_service; -ALTER TABLE m_shadow - ADD CONSTRAINT fk_shadow FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_task - ADD CONSTRAINT fk_task FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_task_dependent - ADD CONSTRAINT fk_task_dependent FOREIGN KEY (task_oid) REFERENCES m_task; -ALTER TABLE m_user_employee_type - ADD CONSTRAINT fk_user_employee_type FOREIGN KEY (user_oid) REFERENCES m_user; -ALTER TABLE m_user_organization - ADD CONSTRAINT fk_user_organization FOREIGN KEY (user_oid) REFERENCES m_user; -ALTER TABLE m_user_organizational_unit - ADD CONSTRAINT fk_user_org_unit FOREIGN KEY (user_oid) REFERENCES m_user; -ALTER TABLE m_abstract_role - ADD CONSTRAINT fk_abstract_role FOREIGN KEY (oid) REFERENCES m_focus; -ALTER TABLE m_case - ADD CONSTRAINT fk_case FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_connector - ADD CONSTRAINT fk_connector FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_connector_host - ADD CONSTRAINT fk_connector_host FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_focus - ADD CONSTRAINT fk_focus FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_form - ADD CONSTRAINT fk_form FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_function_library - ADD CONSTRAINT fk_function_library FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_generic_object - ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_lookup_table - ADD CONSTRAINT fk_lookup_table FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_lookup_table_row - ADD CONSTRAINT fk_lookup_table_owner FOREIGN KEY (owner_oid) REFERENCES m_lookup_table; -ALTER TABLE m_node - ADD CONSTRAINT fk_node FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_object_template - ADD CONSTRAINT fk_object_template FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_org - ADD CONSTRAINT fk_org FOREIGN KEY (oid) REFERENCES m_abstract_role; -ALTER TABLE m_report - ADD CONSTRAINT fk_report FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_report_output - ADD CONSTRAINT fk_report_output FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_resource - ADD CONSTRAINT fk_resource FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_role - ADD CONSTRAINT fk_role FOREIGN KEY (oid) REFERENCES m_abstract_role; -ALTER TABLE m_security_policy - ADD CONSTRAINT fk_security_policy FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_sequence - ADD CONSTRAINT fk_sequence FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_service - ADD CONSTRAINT fk_service FOREIGN KEY (oid) REFERENCES m_abstract_role; -ALTER TABLE m_system_configuration - ADD CONSTRAINT fk_system_configuration FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_trigger - ADD CONSTRAINT fk_trigger_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_user - ADD CONSTRAINT fk_user FOREIGN KEY (oid) REFERENCES m_focus; -ALTER TABLE m_value_policy - ADD CONSTRAINT fk_value_policy FOREIGN KEY (oid) REFERENCES m_object; - --- --- A hint submitted by a user: Oracle DB MUST be created as "shared" and the --- job_queue_processes parameter must be greater than 2 --- However, these settings are pretty much standard after any --- Oracle install, so most users need not worry about this. --- --- Many other users (including the primary author of Quartz) have had success --- running in dedicated mode, so only consider the above as a hint --- - - --- there are two semicolons at the end of each of the following lines to work around a bug/feature of ScriptRunner we use -BEGIN -BEGIN EXECUTE IMMEDIATE 'DROP TABLE qrtz_calendars'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END; -BEGIN EXECUTE IMMEDIATE 'DROP TABLE qrtz_fired_triggers'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END; -BEGIN EXECUTE IMMEDIATE 'DROP TABLE qrtz_blob_triggers'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END; -BEGIN EXECUTE IMMEDIATE 'DROP TABLE qrtz_cron_triggers'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END; -BEGIN EXECUTE IMMEDIATE 'DROP TABLE qrtz_simple_triggers'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END; -BEGIN EXECUTE IMMEDIATE 'DROP TABLE qrtz_simprop_triggers'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END; -BEGIN EXECUTE IMMEDIATE 'DROP TABLE qrtz_triggers'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END; -BEGIN EXECUTE IMMEDIATE 'DROP TABLE qrtz_job_details'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END; -BEGIN EXECUTE IMMEDIATE 'DROP TABLE qrtz_paused_trigger_grps'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END; -BEGIN EXECUTE IMMEDIATE 'DROP TABLE qrtz_locks'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END; -BEGIN EXECUTE IMMEDIATE 'DROP TABLE qrtz_scheduler_state'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -942 THEN RAISE; END IF; END; -END; -/ - -CREATE TABLE qrtz_job_details - ( - SCHED_NAME VARCHAR2(120) NOT NULL, - JOB_NAME VARCHAR2(200) NOT NULL, - JOB_GROUP VARCHAR2(200) NOT NULL, - DESCRIPTION VARCHAR2(250) NULL, - JOB_CLASS_NAME VARCHAR2(250) NOT NULL, - IS_DURABLE VARCHAR2(1) NOT NULL, - IS_NONCONCURRENT VARCHAR2(1) NOT NULL, - IS_UPDATE_DATA VARCHAR2(1) NOT NULL, - REQUESTS_RECOVERY VARCHAR2(1) NOT NULL, - JOB_DATA BLOB NULL, - CONSTRAINT QRTZ_JOB_DETAILS_PK PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) -); -CREATE TABLE qrtz_triggers - ( - SCHED_NAME VARCHAR2(120) NOT NULL, - TRIGGER_NAME VARCHAR2(200) NOT NULL, - TRIGGER_GROUP VARCHAR2(200) NOT NULL, - JOB_NAME VARCHAR2(200) NOT NULL, - JOB_GROUP VARCHAR2(200) NOT NULL, - DESCRIPTION VARCHAR2(250) NULL, - NEXT_FIRE_TIME NUMBER(13) NULL, - PREV_FIRE_TIME NUMBER(13) NULL, - PRIORITY NUMBER(13) NULL, - EXECUTION_GROUP VARCHAR2(200) NULL, - TRIGGER_STATE VARCHAR2(16) NOT NULL, - TRIGGER_TYPE VARCHAR2(8) NOT NULL, - START_TIME NUMBER(13) NOT NULL, - END_TIME NUMBER(13) NULL, - CALENDAR_NAME VARCHAR2(200) NULL, - MISFIRE_INSTR NUMBER(2) NULL, - JOB_DATA BLOB NULL, - CONSTRAINT QRTZ_TRIGGERS_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - CONSTRAINT QRTZ_TRIGGER_TO_JOBS_FK FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) - REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP) -); -CREATE TABLE qrtz_simple_triggers - ( - SCHED_NAME VARCHAR2(120) NOT NULL, - TRIGGER_NAME VARCHAR2(200) NOT NULL, - TRIGGER_GROUP VARCHAR2(200) NOT NULL, - REPEAT_COUNT NUMBER(7) NOT NULL, - REPEAT_INTERVAL NUMBER(12) NOT NULL, - TIMES_TRIGGERED NUMBER(10) NOT NULL, - CONSTRAINT QRTZ_SIMPLE_TRIG_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - CONSTRAINT QRTZ_SIMPLE_TRIG_TO_TRIG_FK FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -); -CREATE TABLE qrtz_cron_triggers - ( - SCHED_NAME VARCHAR2(120) NOT NULL, - TRIGGER_NAME VARCHAR2(200) NOT NULL, - TRIGGER_GROUP VARCHAR2(200) NOT NULL, - CRON_EXPRESSION VARCHAR2(120) NOT NULL, - TIME_ZONE_ID VARCHAR2(80), - CONSTRAINT QRTZ_CRON_TRIG_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - CONSTRAINT QRTZ_CRON_TRIG_TO_TRIG_FK FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -); -CREATE TABLE qrtz_simprop_triggers - ( - SCHED_NAME VARCHAR2(120) NOT NULL, - TRIGGER_NAME VARCHAR2(200) NOT NULL, - TRIGGER_GROUP VARCHAR2(200) NOT NULL, - STR_PROP_1 VARCHAR2(512) NULL, - STR_PROP_2 VARCHAR2(512) NULL, - STR_PROP_3 VARCHAR2(512) NULL, - INT_PROP_1 NUMBER(10) NULL, - INT_PROP_2 NUMBER(10) NULL, - LONG_PROP_1 NUMBER(13) NULL, - LONG_PROP_2 NUMBER(13) NULL, - DEC_PROP_1 NUMERIC(13,4) NULL, - DEC_PROP_2 NUMERIC(13,4) NULL, - BOOL_PROP_1 VARCHAR2(1) NULL, - BOOL_PROP_2 VARCHAR2(1) NULL, - CONSTRAINT QRTZ_SIMPROP_TRIG_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - CONSTRAINT QRTZ_SIMPROP_TRIG_TO_TRIG_FK FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -); -CREATE TABLE qrtz_blob_triggers - ( - SCHED_NAME VARCHAR2(120) NOT NULL, - TRIGGER_NAME VARCHAR2(200) NOT NULL, - TRIGGER_GROUP VARCHAR2(200) NOT NULL, - BLOB_DATA BLOB NULL, - CONSTRAINT QRTZ_BLOB_TRIG_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - CONSTRAINT QRTZ_BLOB_TRIG_TO_TRIG_FK FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -); -CREATE TABLE qrtz_calendars - ( - SCHED_NAME VARCHAR2(120) NOT NULL, - CALENDAR_NAME VARCHAR2(200) NOT NULL, - CALENDAR BLOB NOT NULL, - CONSTRAINT QRTZ_CALENDARS_PK PRIMARY KEY (SCHED_NAME,CALENDAR_NAME) -); -CREATE TABLE qrtz_paused_trigger_grps - ( - SCHED_NAME VARCHAR2(120) NOT NULL, - TRIGGER_GROUP VARCHAR2(200) NOT NULL, - CONSTRAINT QRTZ_PAUSED_TRIG_GRPS_PK PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP) -); -CREATE TABLE qrtz_fired_triggers - ( - SCHED_NAME VARCHAR2(120) NOT NULL, - ENTRY_ID VARCHAR2(95) NOT NULL, - TRIGGER_NAME VARCHAR2(200) NOT NULL, - TRIGGER_GROUP VARCHAR2(200) NOT NULL, - INSTANCE_NAME VARCHAR2(200) NOT NULL, - FIRED_TIME NUMBER(13) NOT NULL, - SCHED_TIME NUMBER(13) NOT NULL, - PRIORITY NUMBER(13) NOT NULL, - EXECUTION_GROUP VARCHAR2(200) NULL, - STATE VARCHAR2(16) NOT NULL, - JOB_NAME VARCHAR2(200) NULL, - JOB_GROUP VARCHAR2(200) NULL, - IS_NONCONCURRENT VARCHAR2(1) NULL, - REQUESTS_RECOVERY VARCHAR2(1) NULL, - CONSTRAINT QRTZ_FIRED_TRIGGER_PK PRIMARY KEY (SCHED_NAME,ENTRY_ID) -); -CREATE TABLE qrtz_scheduler_state - ( - SCHED_NAME VARCHAR2(120) NOT NULL, - INSTANCE_NAME VARCHAR2(200) NOT NULL, - LAST_CHECKIN_TIME NUMBER(13) NOT NULL, - CHECKIN_INTERVAL NUMBER(13) NOT NULL, - CONSTRAINT QRTZ_SCHEDULER_STATE_PK PRIMARY KEY (SCHED_NAME,INSTANCE_NAME) -); -CREATE TABLE qrtz_locks - ( - SCHED_NAME VARCHAR2(120) NOT NULL, - LOCK_NAME VARCHAR2(40) NOT NULL, - CONSTRAINT QRTZ_LOCKS_PK PRIMARY KEY (SCHED_NAME,LOCK_NAME) -); - -create index idx_qrtz_j_req_recovery on qrtz_job_details(SCHED_NAME,REQUESTS_RECOVERY); -create index idx_qrtz_j_grp on qrtz_job_details(SCHED_NAME,JOB_GROUP); - -create index idx_qrtz_t_j on qrtz_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); -create index idx_qrtz_t_jg on qrtz_triggers(SCHED_NAME,JOB_GROUP); -create index idx_qrtz_t_c on qrtz_triggers(SCHED_NAME,CALENDAR_NAME); -create index idx_qrtz_t_g on qrtz_triggers(SCHED_NAME,TRIGGER_GROUP); -create index idx_qrtz_t_state on qrtz_triggers(SCHED_NAME,TRIGGER_STATE); -create index idx_qrtz_t_n_state on qrtz_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE); -create index idx_qrtz_t_n_g_state on qrtz_triggers(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE); -create index idx_qrtz_t_next_fire_time on qrtz_triggers(SCHED_NAME,NEXT_FIRE_TIME); -create index idx_qrtz_t_nft_st on qrtz_triggers(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME); -create index idx_qrtz_t_nft_misfire on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME); -create index idx_qrtz_t_nft_st_misfire on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE); -create index idx_qrtz_t_nft_st_misfire_grp on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE); - -create index idx_qrtz_ft_trig_inst_name on qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME); -create index idx_qrtz_ft_inst_job_req_rcvry on qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY); -create index idx_qrtz_ft_j_g on qrtz_fired_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); -create index idx_qrtz_ft_jg on qrtz_fired_triggers(SCHED_NAME,JOB_GROUP); -create index idx_qrtz_ft_t_g on qrtz_fired_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP); -create index idx_qrtz_ft_tg on qrtz_fired_triggers(SCHED_NAME,TRIGGER_GROUP); - -create table ACT_GE_PROPERTY ( - NAME_ NVARCHAR2(64), - VALUE_ NVARCHAR2(300), - REV_ INTEGER, - primary key (NAME_) -); - -insert into ACT_GE_PROPERTY -values ('schema.version', '5.22.0.0', 1); - -insert into ACT_GE_PROPERTY -values ('schema.history', 'create(5.22.0.0)', 1); - -insert into ACT_GE_PROPERTY -values ('next.dbid', '1', 1); - -create table ACT_GE_BYTEARRAY ( - ID_ NVARCHAR2(64), - REV_ INTEGER, - NAME_ NVARCHAR2(255), - DEPLOYMENT_ID_ NVARCHAR2(64), - BYTES_ BLOB, - GENERATED_ NUMBER(1,0) CHECK (GENERATED_ IN (1,0)), - primary key (ID_) -); - -create table ACT_RE_DEPLOYMENT ( - ID_ NVARCHAR2(64), - NAME_ NVARCHAR2(255), - CATEGORY_ NVARCHAR2(255), - TENANT_ID_ NVARCHAR2(255) DEFAULT '', - DEPLOY_TIME_ TIMESTAMP(6), - primary key (ID_) -); - -create table ACT_RE_MODEL ( - ID_ NVARCHAR2(64) not null, - REV_ INTEGER, - NAME_ NVARCHAR2(255), - KEY_ NVARCHAR2(255), - CATEGORY_ NVARCHAR2(255), - CREATE_TIME_ TIMESTAMP(6), - LAST_UPDATE_TIME_ TIMESTAMP(6), - VERSION_ INTEGER, - META_INFO_ NVARCHAR2(2000), - DEPLOYMENT_ID_ NVARCHAR2(64), - EDITOR_SOURCE_VALUE_ID_ NVARCHAR2(64), - EDITOR_SOURCE_EXTRA_VALUE_ID_ NVARCHAR2(64), - TENANT_ID_ NVARCHAR2(255) DEFAULT '', - primary key (ID_) -); - -create table ACT_RU_EXECUTION ( - ID_ NVARCHAR2(64), - REV_ INTEGER, - PROC_INST_ID_ NVARCHAR2(64), - BUSINESS_KEY_ NVARCHAR2(255), - PARENT_ID_ NVARCHAR2(64), - PROC_DEF_ID_ NVARCHAR2(64), - SUPER_EXEC_ NVARCHAR2(64), - ACT_ID_ NVARCHAR2(255), - IS_ACTIVE_ NUMBER(1,0) CHECK (IS_ACTIVE_ IN (1,0)), - IS_CONCURRENT_ NUMBER(1,0) CHECK (IS_CONCURRENT_ IN (1,0)), - IS_SCOPE_ NUMBER(1,0) CHECK (IS_SCOPE_ IN (1,0)), - IS_EVENT_SCOPE_ NUMBER(1,0) CHECK (IS_EVENT_SCOPE_ IN (1,0)), - SUSPENSION_STATE_ INTEGER, - CACHED_ENT_STATE_ INTEGER, - TENANT_ID_ NVARCHAR2(255) DEFAULT '', - NAME_ NVARCHAR2(255), - LOCK_TIME_ TIMESTAMP(6), - primary key (ID_) -); - -create table ACT_RU_JOB ( - ID_ NVARCHAR2(64) NOT NULL, - REV_ INTEGER, - TYPE_ NVARCHAR2(255) NOT NULL, - LOCK_EXP_TIME_ TIMESTAMP(6), - LOCK_OWNER_ NVARCHAR2(255), - EXCLUSIVE_ NUMBER(1,0) CHECK (EXCLUSIVE_ IN (1,0)), - EXECUTION_ID_ NVARCHAR2(64), - PROCESS_INSTANCE_ID_ NVARCHAR2(64), - PROC_DEF_ID_ NVARCHAR2(64), - RETRIES_ INTEGER, - EXCEPTION_STACK_ID_ NVARCHAR2(64), - EXCEPTION_MSG_ NVARCHAR2(2000), - DUEDATE_ TIMESTAMP(6), - REPEAT_ NVARCHAR2(255), - HANDLER_TYPE_ NVARCHAR2(255), - HANDLER_CFG_ NVARCHAR2(2000), - TENANT_ID_ NVARCHAR2(255) DEFAULT '', - primary key (ID_) -); - -create table ACT_RE_PROCDEF ( - ID_ NVARCHAR2(64) NOT NULL, - REV_ INTEGER, - CATEGORY_ NVARCHAR2(255), - NAME_ NVARCHAR2(255), - KEY_ NVARCHAR2(255) NOT NULL, - VERSION_ INTEGER NOT NULL, - DEPLOYMENT_ID_ NVARCHAR2(64), - RESOURCE_NAME_ NVARCHAR2(2000), - DGRM_RESOURCE_NAME_ varchar(4000), - DESCRIPTION_ NVARCHAR2(2000), - HAS_START_FORM_KEY_ NUMBER(1,0) CHECK (HAS_START_FORM_KEY_ IN (1,0)), - HAS_GRAPHICAL_NOTATION_ NUMBER(1,0) CHECK (HAS_GRAPHICAL_NOTATION_ IN (1,0)), - SUSPENSION_STATE_ INTEGER, - TENANT_ID_ NVARCHAR2(255) DEFAULT '', - primary key (ID_) -); - -create table ACT_RU_TASK ( - ID_ NVARCHAR2(64), - REV_ INTEGER, - EXECUTION_ID_ NVARCHAR2(64), - PROC_INST_ID_ NVARCHAR2(64), - PROC_DEF_ID_ NVARCHAR2(64), - NAME_ NVARCHAR2(255), - PARENT_TASK_ID_ NVARCHAR2(64), - DESCRIPTION_ NVARCHAR2(2000), - TASK_DEF_KEY_ NVARCHAR2(255), - OWNER_ NVARCHAR2(255), - ASSIGNEE_ NVARCHAR2(255), - DELEGATION_ NVARCHAR2(64), - PRIORITY_ INTEGER, - CREATE_TIME_ TIMESTAMP(6), - DUE_DATE_ TIMESTAMP(6), - CATEGORY_ NVARCHAR2(255), - SUSPENSION_STATE_ INTEGER, - TENANT_ID_ NVARCHAR2(255) DEFAULT '', - FORM_KEY_ NVARCHAR2(255), - primary key (ID_) -); - -create table ACT_RU_IDENTITYLINK ( - ID_ NVARCHAR2(64), - REV_ INTEGER, - GROUP_ID_ NVARCHAR2(255), - TYPE_ NVARCHAR2(255), - USER_ID_ NVARCHAR2(255), - TASK_ID_ NVARCHAR2(64), - PROC_INST_ID_ NVARCHAR2(64), - PROC_DEF_ID_ NVARCHAR2(64), - primary key (ID_) -); - -create table ACT_RU_VARIABLE ( - ID_ NVARCHAR2(64) not null, - REV_ INTEGER, - TYPE_ NVARCHAR2(255) not null, - NAME_ NVARCHAR2(255) not null, - EXECUTION_ID_ NVARCHAR2(64), - PROC_INST_ID_ NVARCHAR2(64), - TASK_ID_ NVARCHAR2(64), - BYTEARRAY_ID_ NVARCHAR2(64), - DOUBLE_ NUMBER(*,10), - LONG_ NUMBER(19,0), - TEXT_ NVARCHAR2(2000), - TEXT2_ NVARCHAR2(2000), - primary key (ID_) -); - -create table ACT_RU_EVENT_SUBSCR ( - ID_ NVARCHAR2(64) not null, - REV_ integer, - EVENT_TYPE_ NVARCHAR2(255) not null, - EVENT_NAME_ NVARCHAR2(255), - EXECUTION_ID_ NVARCHAR2(64), - PROC_INST_ID_ NVARCHAR2(64), - ACTIVITY_ID_ NVARCHAR2(64), - CONFIGURATION_ NVARCHAR2(255), - CREATED_ TIMESTAMP(6) not null, - PROC_DEF_ID_ NVARCHAR2(64), - TENANT_ID_ NVARCHAR2(255) DEFAULT '', - primary key (ID_) -); - -create table ACT_EVT_LOG ( - LOG_NR_ NUMBER(19), - TYPE_ NVARCHAR2(64), - PROC_DEF_ID_ NVARCHAR2(64), - PROC_INST_ID_ NVARCHAR2(64), - EXECUTION_ID_ NVARCHAR2(64), - TASK_ID_ NVARCHAR2(64), - TIME_STAMP_ TIMESTAMP(6) not null, - USER_ID_ NVARCHAR2(255), - DATA_ BLOB, - LOCK_OWNER_ NVARCHAR2(255), - LOCK_TIME_ TIMESTAMP(6) null, - IS_PROCESSED_ NUMBER(3) default 0, - primary key (LOG_NR_) -); - -create sequence act_evt_log_seq; - -create table ACT_PROCDEF_INFO ( - ID_ NVARCHAR2(64) not null, - PROC_DEF_ID_ NVARCHAR2(64) not null, - REV_ integer, - INFO_JSON_ID_ NVARCHAR2(64), - primary key (ID_) -); - -create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_); -create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_); -create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_); -create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_); -create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_); -create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_); - -create index ACT_IDX_BYTEAR_DEPL on ACT_GE_BYTEARRAY(DEPLOYMENT_ID_); -alter table ACT_GE_BYTEARRAY - add constraint ACT_FK_BYTEARR_DEPL - foreign key (DEPLOYMENT_ID_) - references ACT_RE_DEPLOYMENT (ID_); - -alter table ACT_RE_PROCDEF - add constraint ACT_UNIQ_PROCDEF - unique (KEY_,VERSION_, TENANT_ID_); - -create index ACT_IDX_EXE_PROCINST on ACT_RU_EXECUTION(PROC_INST_ID_); -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_EXE_PARENT on ACT_RU_EXECUTION(PARENT_ID_); -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PARENT - foreign key (PARENT_ID_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_EXE_SUPER on ACT_RU_EXECUTION(SUPER_EXEC_); -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_SUPER - foreign key (SUPER_EXEC_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_EXE_PROCDEF on ACT_RU_EXECUTION(PROC_DEF_ID_); -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -create index ACT_IDX_TSKASS_TASK on ACT_RU_IDENTITYLINK(TASK_ID_); -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_TSKASS_TASK - foreign key (TASK_ID_) - references ACT_RU_TASK (ID_); - -create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_); -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_ATHRZ_PROCEDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -create index ACT_IDX_IDL_PROCINST on ACT_RU_IDENTITYLINK(PROC_INST_ID_); -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_IDL_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_TASK_EXEC on ACT_RU_TASK(EXECUTION_ID_); -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_EXE - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_TASK_PROCINST on ACT_RU_TASK(PROC_INST_ID_); -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_TASK_PROCDEF on ACT_RU_TASK(PROC_DEF_ID_); -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -create index ACT_IDX_VAR_EXE on ACT_RU_VARIABLE(EXECUTION_ID_); -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_EXE - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_VAR_PROCINST on ACT_RU_VARIABLE(PROC_INST_ID_); -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION(ID_); - -create index ACT_IDX_VAR_BYTEARRAY on ACT_RU_VARIABLE(BYTEARRAY_ID_); -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_BYTEARRAY - foreign key (BYTEARRAY_ID_) - references ACT_GE_BYTEARRAY (ID_); - -create index ACT_IDX_JOB_EXCEPTION on ACT_RU_JOB(EXCEPTION_STACK_ID_); -alter table ACT_RU_JOB - add constraint ACT_FK_JOB_EXCEPTION - foreign key (EXCEPTION_STACK_ID_) - references ACT_GE_BYTEARRAY (ID_); - -create index ACT_IDX_EVENT_SUBSCR on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_); -alter table ACT_RU_EVENT_SUBSCR - add constraint ACT_FK_EVENT_EXEC - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION(ID_); - -create index ACT_IDX_MODEL_SOURCE on ACT_RE_MODEL(EDITOR_SOURCE_VALUE_ID_); -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_SOURCE - foreign key (EDITOR_SOURCE_VALUE_ID_) - references ACT_GE_BYTEARRAY (ID_); - -create index ACT_IDX_MODEL_SOURCE_EXTRA on ACT_RE_MODEL(EDITOR_SOURCE_EXTRA_VALUE_ID_); -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_SOURCE_EXTRA - foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) - references ACT_GE_BYTEARRAY (ID_); - -create index ACT_IDX_MODEL_DEPLOYMENT on ACT_RE_MODEL(DEPLOYMENT_ID_); -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_DEPLOYMENT - foreign key (DEPLOYMENT_ID_) - references ACT_RE_DEPLOYMENT (ID_); - -create index ACT_IDX_PROCDEF_INFO_JSON on ACT_PROCDEF_INFO(INFO_JSON_ID_); -alter table ACT_PROCDEF_INFO - add constraint ACT_FK_INFO_JSON_BA - foreign key (INFO_JSON_ID_) - references ACT_GE_BYTEARRAY (ID_); - -create index ACT_IDX_PROCDEF_INFO_PROC on ACT_PROCDEF_INFO(PROC_DEF_ID_); -alter table ACT_PROCDEF_INFO - add constraint ACT_FK_INFO_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -alter table ACT_PROCDEF_INFO - add constraint ACT_UNIQ_INFO_PROCDEF - unique (PROC_DEF_ID_); - -create table ACT_HI_PROCINST ( - ID_ NVARCHAR2(64) not null, - PROC_INST_ID_ NVARCHAR2(64) not null, - BUSINESS_KEY_ NVARCHAR2(255), - PROC_DEF_ID_ NVARCHAR2(64) not null, - START_TIME_ TIMESTAMP(6) not null, - END_TIME_ TIMESTAMP(6), - DURATION_ NUMBER(19,0), - START_USER_ID_ NVARCHAR2(255), - START_ACT_ID_ NVARCHAR2(255), - END_ACT_ID_ NVARCHAR2(255), - SUPER_PROCESS_INSTANCE_ID_ NVARCHAR2(64), - DELETE_REASON_ NVARCHAR2(2000), - TENANT_ID_ NVARCHAR2(255) default '', - NAME_ NVARCHAR2(255), - primary key (ID_), - unique (PROC_INST_ID_) -); - -create table ACT_HI_ACTINST ( - ID_ NVARCHAR2(64) not null, - PROC_DEF_ID_ NVARCHAR2(64) not null, - PROC_INST_ID_ NVARCHAR2(64) not null, - EXECUTION_ID_ NVARCHAR2(64) not null, - ACT_ID_ NVARCHAR2(255) not null, - TASK_ID_ NVARCHAR2(64), - CALL_PROC_INST_ID_ NVARCHAR2(64), - ACT_NAME_ NVARCHAR2(255), - ACT_TYPE_ NVARCHAR2(255) not null, - ASSIGNEE_ NVARCHAR2(255), - START_TIME_ TIMESTAMP(6) not null, - END_TIME_ TIMESTAMP(6), - DURATION_ NUMBER(19,0), - TENANT_ID_ NVARCHAR2(255) default '', - primary key (ID_) -); - -create table ACT_HI_TASKINST ( - ID_ NVARCHAR2(64) not null, - PROC_DEF_ID_ NVARCHAR2(64), - TASK_DEF_KEY_ NVARCHAR2(255), - PROC_INST_ID_ NVARCHAR2(64), - EXECUTION_ID_ NVARCHAR2(64), - PARENT_TASK_ID_ NVARCHAR2(64), - NAME_ NVARCHAR2(255), - DESCRIPTION_ NVARCHAR2(2000), - OWNER_ NVARCHAR2(255), - ASSIGNEE_ NVARCHAR2(255), - START_TIME_ TIMESTAMP(6) not null, - CLAIM_TIME_ TIMESTAMP(6), - END_TIME_ TIMESTAMP(6), - DURATION_ NUMBER(19,0), - DELETE_REASON_ NVARCHAR2(2000), - PRIORITY_ INTEGER, - DUE_DATE_ TIMESTAMP(6), - FORM_KEY_ NVARCHAR2(255), - CATEGORY_ NVARCHAR2(255), - TENANT_ID_ NVARCHAR2(255) default '', - primary key (ID_) -); - -create table ACT_HI_VARINST ( - ID_ NVARCHAR2(64) not null, - PROC_INST_ID_ NVARCHAR2(64), - EXECUTION_ID_ NVARCHAR2(64), - TASK_ID_ NVARCHAR2(64), - NAME_ NVARCHAR2(255) not null, - VAR_TYPE_ NVARCHAR2(100), - REV_ INTEGER, - BYTEARRAY_ID_ NVARCHAR2(64), - DOUBLE_ NUMBER(*,10), - LONG_ NUMBER(19,0), - TEXT_ NVARCHAR2(2000), - TEXT2_ NVARCHAR2(2000), - CREATE_TIME_ TIMESTAMP(6), - LAST_UPDATED_TIME_ TIMESTAMP(6), - primary key (ID_) -); - -create table ACT_HI_DETAIL ( - ID_ NVARCHAR2(64) not null, - TYPE_ NVARCHAR2(255) not null, - PROC_INST_ID_ NVARCHAR2(64), - EXECUTION_ID_ NVARCHAR2(64), - TASK_ID_ NVARCHAR2(64), - ACT_INST_ID_ NVARCHAR2(64), - NAME_ NVARCHAR2(255) not null, - VAR_TYPE_ NVARCHAR2(64), - REV_ INTEGER, - TIME_ TIMESTAMP(6) not null, - BYTEARRAY_ID_ NVARCHAR2(64), - DOUBLE_ NUMBER(*,10), - LONG_ NUMBER(19,0), - TEXT_ NVARCHAR2(2000), - TEXT2_ NVARCHAR2(2000), - primary key (ID_) -); - -create table ACT_HI_COMMENT ( - ID_ NVARCHAR2(64) not null, - TYPE_ NVARCHAR2(255), - TIME_ TIMESTAMP(6) not null, - USER_ID_ NVARCHAR2(255), - TASK_ID_ NVARCHAR2(64), - PROC_INST_ID_ NVARCHAR2(64), - ACTION_ NVARCHAR2(255), - MESSAGE_ NVARCHAR2(2000), - FULL_MSG_ BLOB, - primary key (ID_) -); - -create table ACT_HI_ATTACHMENT ( - ID_ NVARCHAR2(64) not null, - REV_ INTEGER, - USER_ID_ NVARCHAR2(255), - NAME_ NVARCHAR2(255), - DESCRIPTION_ NVARCHAR2(2000), - TYPE_ NVARCHAR2(255), - TASK_ID_ NVARCHAR2(64), - PROC_INST_ID_ NVARCHAR2(64), - URL_ NVARCHAR2(2000), - CONTENT_ID_ NVARCHAR2(64), - TIME_ TIMESTAMP(6), - primary key (ID_) -); - -create table ACT_HI_IDENTITYLINK ( - ID_ NVARCHAR2(64), - GROUP_ID_ NVARCHAR2(255), - TYPE_ NVARCHAR2(255), - USER_ID_ NVARCHAR2(255), - TASK_ID_ NVARCHAR2(64), - PROC_INST_ID_ NVARCHAR2(64), - primary key (ID_) -); - -create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_); -create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_); -create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_); -create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_); -create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_); -create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_); -create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_); -create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_); -create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_); -create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_); -create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_); -create index ACT_IDX_HI_PROCVAR_TASK_ID on ACT_HI_VARINST(TASK_ID_); -create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_); -create index ACT_IDX_HI_IDENT_LNK_TASK on ACT_HI_IDENTITYLINK(TASK_ID_); -create index ACT_IDX_HI_IDENT_LNK_PROCINST on ACT_HI_IDENTITYLINK(PROC_INST_ID_); - -create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_); -create index ACT_IDX_HI_ACT_INST_EXEC on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_); -create index ACT_IDX_HI_TASK_INST_PROCINST on ACT_HI_TASKINST(PROC_INST_ID_); - -create table ACT_ID_GROUP ( - ID_ NVARCHAR2(64), - REV_ INTEGER, - NAME_ NVARCHAR2(255), - TYPE_ NVARCHAR2(255), - primary key (ID_) -); - -create table ACT_ID_MEMBERSHIP ( - USER_ID_ NVARCHAR2(64), - GROUP_ID_ NVARCHAR2(64), - primary key (USER_ID_, GROUP_ID_) -); - -create table ACT_ID_USER ( - ID_ NVARCHAR2(64), - REV_ INTEGER, - FIRST_ NVARCHAR2(255), - LAST_ NVARCHAR2(255), - EMAIL_ NVARCHAR2(255), - PWD_ NVARCHAR2(255), - PICTURE_ID_ NVARCHAR2(64), - primary key (ID_) -); - -create table ACT_ID_INFO ( - ID_ NVARCHAR2(64), - REV_ INTEGER, - USER_ID_ NVARCHAR2(64), - TYPE_ NVARCHAR2(64), - KEY_ NVARCHAR2(255), - VALUE_ NVARCHAR2(255), - PASSWORD_ BLOB, - PARENT_ID_ NVARCHAR2(255), - primary key (ID_) -); - -create index ACT_IDX_MEMB_GROUP on ACT_ID_MEMBERSHIP(GROUP_ID_); -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_GROUP - foreign key (GROUP_ID_) - references ACT_ID_GROUP (ID_); - -create index ACT_IDX_MEMB_USER on ACT_ID_MEMBERSHIP(USER_ID_); -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_USER - foreign key (USER_ID_) - references ACT_ID_USER (ID_); - -commit; diff --git a/config/sql/_all/oracle-3.9-all.sql b/config/sql/_all/oracle-4.0-all.sql similarity index 99% rename from config/sql/_all/oracle-3.9-all.sql rename to config/sql/_all/oracle-4.0-all.sql index 987bb60a720..a320b5f3624 100644 --- a/config/sql/_all/oracle-3.9-all.sql +++ b/config/sql/_all/oracle-4.0-all.sql @@ -519,6 +519,12 @@ CREATE TABLE m_abstract_role ( oid VARCHAR2(36 CHAR) NOT NULL, PRIMARY KEY (oid) ) INITRANS 30; +CREATE TABLE m_archetype ( + name_norm VARCHAR2(255 CHAR), + name_orig VARCHAR2(255 CHAR), + oid VARCHAR2(36 CHAR) NOT NULL, + PRIMARY KEY (oid) +) INITRANS 30; CREATE TABLE m_case ( name_norm VARCHAR2(255 CHAR), name_orig VARCHAR2(255 CHAR), @@ -884,8 +890,9 @@ CREATE INDEX iAbstractRoleIdentifier ON m_abstract_role (identifier) INITRANS 30; CREATE INDEX iRequestable ON m_abstract_role (requestable) INITRANS 30; -CREATE INDEX iAutoassignEnabled - ON m_abstract_role (autoassign_enabled) INITRANS 30; +CREATE INDEX iAutoassignEnabled ON m_abstract_role(autoassign_enabled) INITRANS 30; +CREATE INDEX iArchetypeNameOrig ON m_archetype(name_orig) INITRANS 30; +CREATE INDEX iArchetypeNameNorm ON m_archetype(name_norm) INITRANS 30; CREATE INDEX iCaseNameOrig ON m_case (name_orig) INITRANS 30; ALTER TABLE m_case @@ -1108,6 +1115,8 @@ ALTER TABLE m_user_organizational_unit ADD CONSTRAINT fk_user_org_unit FOREIGN KEY (user_oid) REFERENCES m_user; ALTER TABLE m_abstract_role ADD CONSTRAINT fk_abstract_role FOREIGN KEY (oid) REFERENCES m_focus; +ALTER TABLE m_archetype + ADD CONSTRAINT fk_archetype FOREIGN KEY (oid) REFERENCES m_abstract_role; ALTER TABLE m_case ADD CONSTRAINT fk_case FOREIGN KEY (oid) REFERENCES m_object; ALTER TABLE m_connector @@ -1121,7 +1130,7 @@ ALTER TABLE m_form ALTER TABLE m_function_library ADD CONSTRAINT fk_function_library FOREIGN KEY (oid) REFERENCES m_object; ALTER TABLE m_generic_object - ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_object; + ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_focus; ALTER TABLE m_lookup_table ADD CONSTRAINT fk_lookup_table FOREIGN KEY (oid) REFERENCES m_object; ALTER TABLE m_lookup_table_row @@ -1157,7 +1166,7 @@ ALTER TABLE m_user ALTER TABLE m_value_policy ADD CONSTRAINT fk_value_policy FOREIGN KEY (oid) REFERENCES m_object; -INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '3.9'); +INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '4.0'); -- -- A hint submitted by a user: Oracle DB MUST be created as "shared" and the diff --git a/config/sql/_all/oracle-upgrade-3.8-3.9.sql b/config/sql/_all/oracle-upgrade-3.8-3.9.sql deleted file mode 100644 index 00a6409fc4b..00000000000 --- a/config/sql/_all/oracle-upgrade-3.8-3.9.sql +++ /dev/null @@ -1,26 +0,0 @@ -CREATE TABLE m_object_collection ( - name_norm VARCHAR2(255 CHAR), - name_orig VARCHAR2(255 CHAR), - oid VARCHAR2(36 CHAR) NOT NULL, - PRIMARY KEY (oid) -) INITRANS 30; - -CREATE INDEX iObjectCollectionNameOrig - ON m_object_collection (name_orig) INITRANS 30; -ALTER TABLE m_object_collection - ADD CONSTRAINT uc_object_collection_name UNIQUE (name_norm); - -ALTER TABLE m_object_collection - ADD CONSTRAINT fk_object_collection FOREIGN KEY (oid) REFERENCES m_object; - -ALTER TABLE m_acc_cert_campaign ADD iteration NUMBER(10, 0) DEFAULT 1 NOT NULL; -ALTER TABLE m_acc_cert_case ADD iteration NUMBER(10, 0) DEFAULT 1 NOT NULL; -ALTER TABLE m_acc_cert_wi ADD iteration NUMBER(10, 0) DEFAULT 1 NOT NULL; - -CREATE TABLE m_global_metadata ( - name VARCHAR2(255 CHAR) NOT NULL, - value VARCHAR2(255 CHAR), - PRIMARY KEY (name) -) INITRANS 30; - -INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '3.9'); diff --git a/config/sql/_all/oracle-upgrade-3.9-4.0.sql b/config/sql/_all/oracle-upgrade-3.9-4.0.sql new file mode 100644 index 00000000000..625d3f78224 --- /dev/null +++ b/config/sql/_all/oracle-upgrade-3.9-4.0.sql @@ -0,0 +1,18 @@ +CREATE TABLE m_archetype ( + name_norm VARCHAR2(255 CHAR), + name_orig VARCHAR2(255 CHAR), + oid VARCHAR2(36 CHAR) NOT NULL, + PRIMARY KEY (oid) +) INITRANS 30; + +CREATE INDEX iArchetypeNameOrig ON m_archetype(name_orig) INITRANS 30; +CREATE INDEX iArchetypeNameNorm ON m_archetype(name_norm) INITRANS 30; + +ALTER TABLE m_archetype + ADD CONSTRAINT fk_archetype FOREIGN KEY (oid) REFERENCES m_abstract_role; + +ALTER TABLE m_generic_object DROP CONSTRAINT fk_generic_object; +ALTER TABLE m_generic_object + ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_focus; + +UPDATE m_global_metadata SET value = '4.0' WHERE name = 'databaseSchemaVersion'; \ No newline at end of file diff --git a/config/sql/_all/postgresql-3.8-all.sql b/config/sql/_all/postgresql-3.8-all.sql deleted file mode 100644 index c71fbd6271f..00000000000 --- a/config/sql/_all/postgresql-3.8-all.sql +++ /dev/null @@ -1,1874 +0,0 @@ -CREATE TABLE m_acc_cert_campaign ( - definitionRef_relation VARCHAR(157), - definitionRef_targetOid VARCHAR(36), - definitionRef_type INT4, - endTimestamp TIMESTAMP, - handlerUri VARCHAR(255), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36), - ownerRef_type INT4, - stageNumber INT4, - startTimestamp TIMESTAMP, - state INT4, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_acc_cert_case ( - id INT4 NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - administrativeStatus INT4, - archiveTimestamp TIMESTAMP, - disableReason VARCHAR(255), - disableTimestamp TIMESTAMP, - effectiveStatus INT4, - enableTimestamp TIMESTAMP, - validFrom TIMESTAMP, - validTo TIMESTAMP, - validityChangeTimestamp TIMESTAMP, - validityStatus INT4, - currentStageOutcome VARCHAR(255), - fullObject BYTEA, - objectRef_relation VARCHAR(157), - objectRef_targetOid VARCHAR(36), - objectRef_type INT4, - orgRef_relation VARCHAR(157), - orgRef_targetOid VARCHAR(36), - orgRef_type INT4, - outcome VARCHAR(255), - remediedTimestamp TIMESTAMP, - reviewDeadline TIMESTAMP, - reviewRequestedTimestamp TIMESTAMP, - stageNumber INT4, - targetRef_relation VARCHAR(157), - targetRef_targetOid VARCHAR(36), - targetRef_type INT4, - tenantRef_relation VARCHAR(157), - tenantRef_targetOid VARCHAR(36), - tenantRef_type INT4, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_acc_cert_definition ( - handlerUri VARCHAR(255), - lastCampaignClosedTimestamp TIMESTAMP, - lastCampaignStartedTimestamp TIMESTAMP, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36), - ownerRef_type INT4, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_acc_cert_wi ( - id INT4 NOT NULL, - owner_id INT4 NOT NULL, - owner_owner_oid VARCHAR(36) NOT NULL, - closeTimestamp TIMESTAMP, - outcome VARCHAR(255), - outputChangeTimestamp TIMESTAMP, - performerRef_relation VARCHAR(157), - performerRef_targetOid VARCHAR(36), - performerRef_type INT4, - stageNumber INT4, - PRIMARY KEY (owner_owner_oid, owner_id, id) -); -CREATE TABLE m_acc_cert_wi_reference ( - owner_id INT4 NOT NULL, - owner_owner_id INT4 NOT NULL, - owner_owner_owner_oid VARCHAR(36) NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) NOT NULL, - targetType INT4, - PRIMARY KEY (owner_owner_owner_oid, owner_owner_id, owner_id, relation, targetOid) -); -CREATE TABLE m_assignment ( - id INT4 NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - administrativeStatus INT4, - archiveTimestamp TIMESTAMP, - disableReason VARCHAR(255), - disableTimestamp TIMESTAMP, - effectiveStatus INT4, - enableTimestamp TIMESTAMP, - validFrom TIMESTAMP, - validTo TIMESTAMP, - validityChangeTimestamp TIMESTAMP, - validityStatus INT4, - assignmentOwner INT4, - createChannel VARCHAR(255), - createTimestamp TIMESTAMP, - creatorRef_relation VARCHAR(157), - creatorRef_targetOid VARCHAR(36), - creatorRef_type INT4, - lifecycleState VARCHAR(255), - modifierRef_relation VARCHAR(157), - modifierRef_targetOid VARCHAR(36), - modifierRef_type INT4, - modifyChannel VARCHAR(255), - modifyTimestamp TIMESTAMP, - orderValue INT4, - orgRef_relation VARCHAR(157), - orgRef_targetOid VARCHAR(36), - orgRef_type INT4, - resourceRef_relation VARCHAR(157), - resourceRef_targetOid VARCHAR(36), - resourceRef_type INT4, - targetRef_relation VARCHAR(157), - targetRef_targetOid VARCHAR(36), - targetRef_type INT4, - tenantRef_relation VARCHAR(157), - tenantRef_targetOid VARCHAR(36), - tenantRef_type INT4, - extId INT4, - extOid VARCHAR(36), - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_assignment_ext_boolean ( - item_id INT4 NOT NULL, - anyContainer_owner_id INT4 NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - booleanValue BOOLEAN NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, booleanValue) -); -CREATE TABLE m_assignment_ext_date ( - item_id INT4 NOT NULL, - anyContainer_owner_id INT4 NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - dateValue TIMESTAMP NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, dateValue) -); -CREATE TABLE m_assignment_ext_long ( - item_id INT4 NOT NULL, - anyContainer_owner_id INT4 NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - longValue INT8 NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, longValue) -); -CREATE TABLE m_assignment_ext_poly ( - item_id INT4 NOT NULL, - anyContainer_owner_id INT4 NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - orig VARCHAR(255) NOT NULL, - norm VARCHAR(255), - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, orig) -); -CREATE TABLE m_assignment_ext_reference ( - item_id INT4 NOT NULL, - anyContainer_owner_id INT4 NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - targetoid VARCHAR(36) NOT NULL, - relation VARCHAR(157), - targetType INT4, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, targetoid) -); -CREATE TABLE m_assignment_ext_string ( - item_id INT4 NOT NULL, - anyContainer_owner_id INT4 NOT NULL, - anyContainer_owner_owner_oid VARCHAR(36) NOT NULL, - stringValue VARCHAR(255) NOT NULL, - PRIMARY KEY (anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, stringValue) -); -CREATE TABLE m_assignment_extension ( - owner_id INT4 NOT NULL, - owner_owner_oid VARCHAR(36) NOT NULL, - booleansCount INT2, - datesCount INT2, - longsCount INT2, - polysCount INT2, - referencesCount INT2, - stringsCount INT2, - PRIMARY KEY (owner_owner_oid, owner_id) -); -CREATE TABLE m_assignment_policy_situation ( - assignment_id INT4 NOT NULL, - assignment_oid VARCHAR(36) NOT NULL, - policySituation VARCHAR(255) -); -CREATE TABLE m_assignment_reference ( - owner_id INT4 NOT NULL, - owner_owner_oid VARCHAR(36) NOT NULL, - reference_type INT4 NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) NOT NULL, - targetType INT4, - PRIMARY KEY (owner_owner_oid, owner_id, reference_type, relation, targetOid) -); -CREATE TABLE m_audit_delta ( - checksum VARCHAR(32) NOT NULL, - record_id INT8 NOT NULL, - delta BYTEA, - deltaOid VARCHAR(36), - deltaType INT4, - fullResult BYTEA, - objectName_norm VARCHAR(255), - objectName_orig VARCHAR(255), - resourceName_norm VARCHAR(255), - resourceName_orig VARCHAR(255), - resourceOid VARCHAR(36), - status INT4, - PRIMARY KEY (record_id, checksum) -); -CREATE TABLE m_audit_event ( - id BIGSERIAL NOT NULL, - attorneyName VARCHAR(255), - attorneyOid VARCHAR(36), - channel VARCHAR(255), - eventIdentifier VARCHAR(255), - eventStage INT4, - eventType INT4, - hostIdentifier VARCHAR(255), - initiatorName VARCHAR(255), - initiatorOid VARCHAR(36), - initiatorType INT4, - message VARCHAR(1024), - nodeIdentifier VARCHAR(255), - outcome INT4, - parameter VARCHAR(255), - remoteHostAddress VARCHAR(255), - result VARCHAR(255), - sessionIdentifier VARCHAR(255), - targetName VARCHAR(255), - targetOid VARCHAR(36), - targetOwnerName VARCHAR(255), - targetOwnerOid VARCHAR(36), - targetOwnerType INT4, - targetType INT4, - taskIdentifier VARCHAR(255), - taskOID VARCHAR(255), - timestampValue TIMESTAMP, - PRIMARY KEY (id) -); -CREATE TABLE m_audit_item ( - changedItemPath VARCHAR(255) NOT NULL, - record_id INT8 NOT NULL, - PRIMARY KEY (record_id, changedItemPath) -); -CREATE TABLE m_audit_prop_value ( - id BIGSERIAL NOT NULL, - name VARCHAR(255), - record_id INT8, - value VARCHAR(1024), - PRIMARY KEY (id) -); -CREATE TABLE m_audit_ref_value ( - id BIGSERIAL NOT NULL, - name VARCHAR(255), - oid VARCHAR(36), - record_id INT8, - targetName_norm VARCHAR(255), - targetName_orig VARCHAR(255), - type VARCHAR(255), - PRIMARY KEY (id) -); -CREATE TABLE m_case_wi ( - id INT4 NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - closeTimestamp TIMESTAMP, - deadline TIMESTAMP, - originalAssigneeRef_relation VARCHAR(157), - originalAssigneeRef_targetOid VARCHAR(36), - originalAssigneeRef_type INT4, - outcome VARCHAR(255), - performerRef_relation VARCHAR(157), - performerRef_targetOid VARCHAR(36), - performerRef_type INT4, - stageNumber INT4, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_case_wi_reference ( - owner_id INT4 NOT NULL, - owner_owner_oid VARCHAR(36) NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) NOT NULL, - targetType INT4, - PRIMARY KEY (owner_owner_oid, owner_id, targetOid, relation) -); -CREATE TABLE m_connector_target_system ( - connector_oid VARCHAR(36) NOT NULL, - targetSystemType VARCHAR(255) -); -CREATE TABLE m_ext_item ( - id SERIAL NOT NULL, - kind INT4, - itemName VARCHAR(157), - itemType VARCHAR(157), - PRIMARY KEY (id) -); -CREATE TABLE m_focus_photo ( - owner_oid VARCHAR(36) NOT NULL, - photo BYTEA, - PRIMARY KEY (owner_oid) -); -CREATE TABLE m_focus_policy_situation ( - focus_oid VARCHAR(36) NOT NULL, - policySituation VARCHAR(255) -); -CREATE TABLE m_object ( - oid VARCHAR(36) NOT NULL, - booleansCount INT2, - createChannel VARCHAR(255), - createTimestamp TIMESTAMP, - creatorRef_relation VARCHAR(157), - creatorRef_targetOid VARCHAR(36), - creatorRef_type INT4, - datesCount INT2, - fullObject BYTEA, - lifecycleState VARCHAR(255), - longsCount INT2, - modifierRef_relation VARCHAR(157), - modifierRef_targetOid VARCHAR(36), - modifierRef_type INT4, - modifyChannel VARCHAR(255), - modifyTimestamp TIMESTAMP, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - objectTypeClass INT4, - polysCount INT2, - referencesCount INT2, - stringsCount INT2, - tenantRef_relation VARCHAR(157), - tenantRef_targetOid VARCHAR(36), - tenantRef_type INT4, - version INT4 NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_object_ext_boolean ( - item_id INT4 NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INT4 NOT NULL, - booleanValue BOOLEAN NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, booleanValue) -); -CREATE TABLE m_object_ext_date ( - item_id INT4 NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INT4 NOT NULL, - dateValue TIMESTAMP NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, dateValue) -); -CREATE TABLE m_object_ext_long ( - item_id INT4 NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INT4 NOT NULL, - longValue INT8 NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, longValue) -); -CREATE TABLE m_object_ext_poly ( - item_id INT4 NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INT4 NOT NULL, - orig VARCHAR(255) NOT NULL, - norm VARCHAR(255), - PRIMARY KEY (owner_oid, ownerType, item_id, orig) -); -CREATE TABLE m_object_ext_reference ( - item_id INT4 NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INT4 NOT NULL, - targetoid VARCHAR(36) NOT NULL, - relation VARCHAR(157), - targetType INT4, - PRIMARY KEY (owner_oid, ownerType, item_id, targetoid) -); -CREATE TABLE m_object_ext_string ( - item_id INT4 NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - ownerType INT4 NOT NULL, - stringValue VARCHAR(255) NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, stringValue) -); -CREATE TABLE m_object_subtype ( - object_oid VARCHAR(36) NOT NULL, - subtype VARCHAR(255) -); -CREATE TABLE m_object_text_info ( - owner_oid VARCHAR(36) NOT NULL, - text VARCHAR(255) NOT NULL, - PRIMARY KEY (owner_oid, text) -); -CREATE TABLE m_operation_execution ( - id INT4 NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - initiatorRef_relation VARCHAR(157), - initiatorRef_targetOid VARCHAR(36), - initiatorRef_type INT4, - status INT4, - taskRef_relation VARCHAR(157), - taskRef_targetOid VARCHAR(36), - taskRef_type INT4, - timestampValue TIMESTAMP, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_org_closure ( - ancestor_oid VARCHAR(36) NOT NULL, - descendant_oid VARCHAR(36) NOT NULL, - val INT4, - PRIMARY KEY (ancestor_oid, descendant_oid) -); -CREATE TABLE m_org_org_type ( - org_oid VARCHAR(36) NOT NULL, - orgType VARCHAR(255) -); -CREATE TABLE m_reference ( - owner_oid VARCHAR(36) NOT NULL, - reference_type INT4 NOT NULL, - relation VARCHAR(157) NOT NULL, - targetOid VARCHAR(36) NOT NULL, - targetType INT4, - PRIMARY KEY (owner_oid, reference_type, relation, targetOid) -); -CREATE TABLE m_service_type ( - service_oid VARCHAR(36) NOT NULL, - serviceType VARCHAR(255) -); -CREATE TABLE m_shadow ( - attemptNumber INT4, - dead BOOLEAN, - exist BOOLEAN, - failedOperationType INT4, - fullSynchronizationTimestamp TIMESTAMP, - intent VARCHAR(255), - kind INT4, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - objectClass VARCHAR(157), - pendingOperationCount INT4, - resourceRef_relation VARCHAR(157), - resourceRef_targetOid VARCHAR(36), - resourceRef_type INT4, - status INT4, - synchronizationSituation INT4, - synchronizationTimestamp TIMESTAMP, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_task ( - binding INT4, - canRunOnNode VARCHAR(255), - category VARCHAR(255), - completionTimestamp TIMESTAMP, - executionStatus INT4, - fullResult BYTEA, - handlerUri VARCHAR(255), - lastRunFinishTimestamp TIMESTAMP, - lastRunStartTimestamp TIMESTAMP, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - node VARCHAR(255), - objectRef_relation VARCHAR(157), - objectRef_targetOid VARCHAR(36), - objectRef_type INT4, - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36), - ownerRef_type INT4, - parent VARCHAR(255), - recurrence INT4, - status INT4, - taskIdentifier VARCHAR(255), - threadStopAction INT4, - waitingReason INT4, - wfEndTimestamp TIMESTAMP, - wfObjectRef_relation VARCHAR(157), - wfObjectRef_targetOid VARCHAR(36), - wfObjectRef_type INT4, - wfProcessInstanceId VARCHAR(255), - wfRequesterRef_relation VARCHAR(157), - wfRequesterRef_targetOid VARCHAR(36), - wfRequesterRef_type INT4, - wfStartTimestamp TIMESTAMP, - wfTargetRef_relation VARCHAR(157), - wfTargetRef_targetOid VARCHAR(36), - wfTargetRef_type INT4, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_task_dependent ( - task_oid VARCHAR(36) NOT NULL, - dependent VARCHAR(255) -); -CREATE TABLE m_user_employee_type ( - user_oid VARCHAR(36) NOT NULL, - employeeType VARCHAR(255) -); -CREATE TABLE m_user_organization ( - user_oid VARCHAR(36) NOT NULL, - norm VARCHAR(255), - orig VARCHAR(255) -); -CREATE TABLE m_user_organizational_unit ( - user_oid VARCHAR(36) NOT NULL, - norm VARCHAR(255), - orig VARCHAR(255) -); -CREATE TABLE m_abstract_role ( - approvalProcess VARCHAR(255), - autoassign_enabled BOOLEAN, - displayName_norm VARCHAR(255), - displayName_orig VARCHAR(255), - identifier VARCHAR(255), - ownerRef_relation VARCHAR(157), - ownerRef_targetOid VARCHAR(36), - ownerRef_type INT4, - requestable BOOLEAN, - riskLevel VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_case ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - objectRef_relation VARCHAR(157), - objectRef_targetOid VARCHAR(36), - objectRef_type INT4, - state VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_connector ( - connectorBundle VARCHAR(255), - connectorHostRef_relation VARCHAR(157), - connectorHostRef_targetOid VARCHAR(36), - connectorHostRef_type INT4, - connectorType VARCHAR(255), - connectorVersion VARCHAR(255), - framework VARCHAR(255), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_connector_host ( - hostname VARCHAR(255), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - port VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_focus ( - administrativeStatus INT4, - archiveTimestamp TIMESTAMP, - disableReason VARCHAR(255), - disableTimestamp TIMESTAMP, - effectiveStatus INT4, - enableTimestamp TIMESTAMP, - validFrom TIMESTAMP, - validTo TIMESTAMP, - validityChangeTimestamp TIMESTAMP, - validityStatus INT4, - costCenter VARCHAR(255), - emailAddress VARCHAR(255), - hasPhoto BOOLEAN DEFAULT FALSE NOT NULL, - locale VARCHAR(255), - locality_norm VARCHAR(255), - locality_orig VARCHAR(255), - preferredLanguage VARCHAR(255), - telephoneNumber VARCHAR(255), - timezone VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_form ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_function_library ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_generic_object ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - objectType VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_lookup_table ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_lookup_table_row ( - id INT4 NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - row_key VARCHAR(255), - label_norm VARCHAR(255), - label_orig VARCHAR(255), - lastChangeTimestamp TIMESTAMP, - row_value VARCHAR(255), - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_node ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - nodeIdentifier VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_object_template ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - type INT4, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_org ( - displayOrder INT4, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - tenant BOOLEAN, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_report ( - export INT4, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - orientation INT4, - parent BOOLEAN, - useHibernateSession BOOLEAN, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_report_output ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - reportRef_relation VARCHAR(157), - reportRef_targetOid VARCHAR(36), - reportRef_type INT4, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_resource ( - administrativeState INT4, - connectorRef_relation VARCHAR(157), - connectorRef_targetOid VARCHAR(36), - connectorRef_type INT4, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - o16_lastAvailabilityStatus INT4, - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_role ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - roleType VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_security_policy ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_sequence ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_service ( - displayOrder INT4, - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_system_configuration ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_trigger ( - id INT4 NOT NULL, - owner_oid VARCHAR(36) NOT NULL, - handlerUri VARCHAR(255), - timestampValue TIMESTAMP, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_user ( - additionalName_norm VARCHAR(255), - additionalName_orig VARCHAR(255), - employeeNumber VARCHAR(255), - familyName_norm VARCHAR(255), - familyName_orig VARCHAR(255), - fullName_norm VARCHAR(255), - fullName_orig VARCHAR(255), - givenName_norm VARCHAR(255), - givenName_orig VARCHAR(255), - honorificPrefix_norm VARCHAR(255), - honorificPrefix_orig VARCHAR(255), - honorificSuffix_norm VARCHAR(255), - honorificSuffix_orig VARCHAR(255), - name_norm VARCHAR(255), - name_orig VARCHAR(255), - nickName_norm VARCHAR(255), - nickName_orig VARCHAR(255), - title_norm VARCHAR(255), - title_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_value_policy ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); -CREATE INDEX iCertCampaignNameOrig - ON m_acc_cert_campaign (name_orig); -ALTER TABLE IF EXISTS m_acc_cert_campaign - ADD CONSTRAINT uc_acc_cert_campaign_name UNIQUE (name_norm); -CREATE INDEX iCaseObjectRefTargetOid - ON m_acc_cert_case (objectRef_targetOid); -CREATE INDEX iCaseTargetRefTargetOid - ON m_acc_cert_case (targetRef_targetOid); -CREATE INDEX iCaseTenantRefTargetOid - ON m_acc_cert_case (tenantRef_targetOid); -CREATE INDEX iCaseOrgRefTargetOid - ON m_acc_cert_case (orgRef_targetOid); -CREATE INDEX iCertDefinitionNameOrig - ON m_acc_cert_definition (name_orig); -ALTER TABLE IF EXISTS m_acc_cert_definition - ADD CONSTRAINT uc_acc_cert_definition_name UNIQUE (name_norm); -CREATE INDEX iCertWorkItemRefTargetOid - ON m_acc_cert_wi_reference (targetOid); -CREATE INDEX iAssignmentAdministrative - ON m_assignment (administrativeStatus); -CREATE INDEX iAssignmentEffective - ON m_assignment (effectiveStatus); -CREATE INDEX iAssignmentValidFrom - ON m_assignment (validFrom); -CREATE INDEX iAssignmentValidTo - ON m_assignment (validTo); -CREATE INDEX iTargetRefTargetOid - ON m_assignment (targetRef_targetOid); -CREATE INDEX iTenantRefTargetOid - ON m_assignment (tenantRef_targetOid); -CREATE INDEX iOrgRefTargetOid - ON m_assignment (orgRef_targetOid); -CREATE INDEX iResourceRefTargetOid - ON m_assignment (resourceRef_targetOid); -CREATE INDEX iAExtensionBoolean - ON m_assignment_ext_boolean (booleanValue); -CREATE INDEX iAExtensionDate - ON m_assignment_ext_date (dateValue); -CREATE INDEX iAExtensionLong - ON m_assignment_ext_long (longValue); -CREATE INDEX iAExtensionPolyString - ON m_assignment_ext_poly (orig); -CREATE INDEX iAExtensionReference - ON m_assignment_ext_reference (targetoid); -CREATE INDEX iAExtensionString - ON m_assignment_ext_string (stringValue); -CREATE INDEX iAssignmentReferenceTargetOid - ON m_assignment_reference (targetOid); -CREATE INDEX iAuditDeltaRecordId - ON m_audit_delta (record_id); -CREATE INDEX iTimestampValue - ON m_audit_event (timestampValue); -CREATE INDEX iChangedItemPath - ON m_audit_item (changedItemPath); -CREATE INDEX iAuditItemRecordId - ON m_audit_item (record_id); -CREATE INDEX iAuditPropValRecordId - ON m_audit_prop_value (record_id); -CREATE INDEX iAuditRefValRecordId - ON m_audit_ref_value (record_id); -CREATE INDEX iCaseWorkItemRefTargetOid - ON m_case_wi_reference (targetOid); - -ALTER TABLE IF EXISTS m_ext_item - ADD CONSTRAINT iExtItemDefinition UNIQUE (itemName, itemType, kind); -CREATE INDEX iObjectNameOrig - ON m_object (name_orig); -CREATE INDEX iObjectNameNorm - ON m_object (name_norm); -CREATE INDEX iObjectTypeClass - ON m_object (objectTypeClass); -CREATE INDEX iObjectCreateTimestamp - ON m_object (createTimestamp); -CREATE INDEX iObjectLifecycleState - ON m_object (lifecycleState); -CREATE INDEX iExtensionBoolean - ON m_object_ext_boolean (booleanValue); -CREATE INDEX iExtensionDate - ON m_object_ext_date (dateValue); -CREATE INDEX iExtensionLong - ON m_object_ext_long (longValue); -CREATE INDEX iExtensionPolyString - ON m_object_ext_poly (orig); -CREATE INDEX iExtensionReference - ON m_object_ext_reference (targetoid); -CREATE INDEX iExtensionString - ON m_object_ext_string (stringValue); -CREATE INDEX iOpExecTaskOid - ON m_operation_execution (taskRef_targetOid); -CREATE INDEX iOpExecInitiatorOid - ON m_operation_execution (initiatorRef_targetOid); -CREATE INDEX iOpExecStatus - ON m_operation_execution (status); -CREATE INDEX iOpExecOwnerOid - ON m_operation_execution (owner_oid); -CREATE INDEX iAncestor - ON m_org_closure (ancestor_oid); -CREATE INDEX iDescendant - ON m_org_closure (descendant_oid); -CREATE INDEX iDescendantAncestor - ON m_org_closure (descendant_oid, ancestor_oid); -CREATE INDEX iReferenceTargetTypeRelation - ON m_reference (targetOid, reference_type, relation); -CREATE INDEX iShadowResourceRef - ON m_shadow (resourceRef_targetOid); -CREATE INDEX iShadowDead - ON m_shadow (dead); -CREATE INDEX iShadowKind - ON m_shadow (kind); -CREATE INDEX iShadowIntent - ON m_shadow (intent); -CREATE INDEX iShadowObjectClass - ON m_shadow (objectClass); -CREATE INDEX iShadowFailedOperationType - ON m_shadow (failedOperationType); -CREATE INDEX iShadowSyncSituation - ON m_shadow (synchronizationSituation); -CREATE INDEX iShadowPendingOperationCount - ON m_shadow (pendingOperationCount); -CREATE INDEX iShadowNameOrig - ON m_shadow (name_orig); -CREATE INDEX iShadowNameNorm - ON m_shadow (name_norm); -CREATE INDEX iParent - ON m_task (parent); -CREATE INDEX iTaskWfProcessInstanceId - ON m_task (wfProcessInstanceId); -CREATE INDEX iTaskWfStartTimestamp - ON m_task (wfStartTimestamp); -CREATE INDEX iTaskWfEndTimestamp - ON m_task (wfEndTimestamp); -CREATE INDEX iTaskWfRequesterOid - ON m_task (wfRequesterRef_targetOid); -CREATE INDEX iTaskWfObjectOid - ON m_task (wfObjectRef_targetOid); -CREATE INDEX iTaskWfTargetOid - ON m_task (wfTargetRef_targetOid); -CREATE INDEX iTaskNameOrig - ON m_task (name_orig); -ALTER TABLE IF EXISTS m_task - ADD CONSTRAINT uc_task_identifier UNIQUE (taskIdentifier); -CREATE INDEX iAbstractRoleIdentifier - ON m_abstract_role (identifier); -CREATE INDEX iRequestable - ON m_abstract_role (requestable); -CREATE INDEX iAutoassignEnabled - ON m_abstract_role (autoassign_enabled); -CREATE INDEX iCaseNameOrig - ON m_case (name_orig); -ALTER TABLE IF EXISTS m_case - ADD CONSTRAINT uc_case_name UNIQUE (name_norm); -CREATE INDEX iConnectorNameOrig - ON m_connector (name_orig); -CREATE INDEX iConnectorNameNorm - ON m_connector (name_norm); -CREATE INDEX iConnectorHostNameOrig - ON m_connector_host (name_orig); -ALTER TABLE IF EXISTS m_connector_host - ADD CONSTRAINT uc_connector_host_name UNIQUE (name_norm); -CREATE INDEX iFocusAdministrative - ON m_focus (administrativeStatus); -CREATE INDEX iFocusEffective - ON m_focus (effectiveStatus); -CREATE INDEX iLocality - ON m_focus (locality_orig); -CREATE INDEX iFocusValidFrom - ON m_focus (validFrom); -CREATE INDEX iFocusValidTo - ON m_focus (validTo); -CREATE INDEX iFormNameOrig - ON m_form (name_orig); -ALTER TABLE IF EXISTS m_form - ADD CONSTRAINT uc_form_name UNIQUE (name_norm); -CREATE INDEX iFunctionLibraryNameOrig - ON m_function_library (name_orig); -ALTER TABLE IF EXISTS m_function_library - ADD CONSTRAINT uc_function_library_name UNIQUE (name_norm); -CREATE INDEX iGenericObjectNameOrig - ON m_generic_object (name_orig); -ALTER TABLE IF EXISTS m_generic_object - ADD CONSTRAINT uc_generic_object_name UNIQUE (name_norm); -CREATE INDEX iLookupTableNameOrig - ON m_lookup_table (name_orig); -ALTER TABLE IF EXISTS m_lookup_table - ADD CONSTRAINT uc_lookup_name UNIQUE (name_norm); -ALTER TABLE IF EXISTS m_lookup_table_row - ADD CONSTRAINT uc_row_key UNIQUE (owner_oid, row_key); -CREATE INDEX iNodeNameOrig - ON m_node (name_orig); -ALTER TABLE IF EXISTS m_node - ADD CONSTRAINT uc_node_name UNIQUE (name_norm); -CREATE INDEX iObjectTemplateNameOrig - ON m_object_template (name_orig); -ALTER TABLE IF EXISTS m_object_template - ADD CONSTRAINT uc_object_template_name UNIQUE (name_norm); -CREATE INDEX iDisplayOrder - ON m_org (displayOrder); -CREATE INDEX iOrgNameOrig - ON m_org (name_orig); -ALTER TABLE IF EXISTS m_org - ADD CONSTRAINT uc_org_name UNIQUE (name_norm); -CREATE INDEX iReportParent - ON m_report (parent); -CREATE INDEX iReportNameOrig - ON m_report (name_orig); -ALTER TABLE IF EXISTS m_report - ADD CONSTRAINT uc_report_name UNIQUE (name_norm); -CREATE INDEX iReportOutputNameOrig - ON m_report_output (name_orig); -CREATE INDEX iReportOutputNameNorm - ON m_report_output (name_norm); -CREATE INDEX iResourceNameOrig - ON m_resource (name_orig); -ALTER TABLE IF EXISTS m_resource - ADD CONSTRAINT uc_resource_name UNIQUE (name_norm); -CREATE INDEX iRoleNameOrig - ON m_role (name_orig); -ALTER TABLE IF EXISTS m_role - ADD CONSTRAINT uc_role_name UNIQUE (name_norm); -CREATE INDEX iSecurityPolicyNameOrig - ON m_security_policy (name_orig); -ALTER TABLE IF EXISTS m_security_policy - ADD CONSTRAINT uc_security_policy_name UNIQUE (name_norm); -CREATE INDEX iSequenceNameOrig - ON m_sequence (name_orig); -ALTER TABLE IF EXISTS m_sequence - ADD CONSTRAINT uc_sequence_name UNIQUE (name_norm); -CREATE INDEX iServiceNameOrig - ON m_service (name_orig); -CREATE INDEX iServiceNameNorm - ON m_service (name_norm); -CREATE INDEX iSystemConfigurationNameOrig - ON m_system_configuration (name_orig); -ALTER TABLE IF EXISTS m_system_configuration - ADD CONSTRAINT uc_system_configuration_name UNIQUE (name_norm); -CREATE INDEX iTriggerTimestamp - ON m_trigger (timestampValue); -CREATE INDEX iFullName - ON m_user (fullName_orig); -CREATE INDEX iFamilyName - ON m_user (familyName_orig); -CREATE INDEX iGivenName - ON m_user (givenName_orig); -CREATE INDEX iEmployeeNumber - ON m_user (employeeNumber); -CREATE INDEX iUserNameOrig - ON m_user (name_orig); -ALTER TABLE IF EXISTS m_user - ADD CONSTRAINT uc_user_name UNIQUE (name_norm); -CREATE INDEX iValuePolicyNameOrig - ON m_value_policy (name_orig); -ALTER TABLE IF EXISTS m_value_policy - ADD CONSTRAINT uc_value_policy_name UNIQUE (name_norm); -ALTER TABLE IF EXISTS m_acc_cert_campaign - ADD CONSTRAINT fk_acc_cert_campaign FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_acc_cert_case - ADD CONSTRAINT fk_acc_cert_case_owner FOREIGN KEY (owner_oid) REFERENCES m_acc_cert_campaign; -ALTER TABLE IF EXISTS m_acc_cert_definition - ADD CONSTRAINT fk_acc_cert_definition FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_acc_cert_wi - ADD CONSTRAINT fk_acc_cert_wi_owner FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_acc_cert_case; -ALTER TABLE IF EXISTS m_acc_cert_wi_reference - ADD CONSTRAINT fk_acc_cert_wi_ref_owner FOREIGN KEY (owner_owner_owner_oid, owner_owner_id, owner_id) REFERENCES m_acc_cert_wi; -ALTER TABLE IF EXISTS m_assignment - ADD CONSTRAINT fk_assignment_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_assignment_ext_boolean - ADD CONSTRAINT fk_a_ext_boolean_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE IF EXISTS m_assignment_ext_boolean - ADD CONSTRAINT fk_a_ext_boolean_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE IF EXISTS m_assignment_ext_date - ADD CONSTRAINT fk_a_ext_date_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE IF EXISTS m_assignment_ext_date - ADD CONSTRAINT fk_a_ext_date_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE IF EXISTS m_assignment_ext_long - ADD CONSTRAINT fk_a_ext_long_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE IF EXISTS m_assignment_ext_long - ADD CONSTRAINT fk_a_ext_long_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE IF EXISTS m_assignment_ext_poly - ADD CONSTRAINT fk_a_ext_poly_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE IF EXISTS m_assignment_ext_poly - ADD CONSTRAINT fk_a_ext_poly_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE IF EXISTS m_assignment_ext_reference - ADD CONSTRAINT fk_a_ext_reference_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE IF EXISTS m_assignment_ext_reference - ADD CONSTRAINT fk_a_ext_boolean_reference FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE IF EXISTS m_assignment_ext_string - ADD CONSTRAINT fk_a_ext_string_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE IF EXISTS m_assignment_ext_string - ADD CONSTRAINT fk_a_ext_string_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE IF EXISTS m_assignment_policy_situation - ADD CONSTRAINT fk_assignment_policy_situation FOREIGN KEY (assignment_oid, assignment_id) REFERENCES m_assignment; -ALTER TABLE IF EXISTS m_assignment_reference - ADD CONSTRAINT fk_assignment_reference FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_assignment; -ALTER TABLE IF EXISTS m_audit_delta - ADD CONSTRAINT fk_audit_delta FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE IF EXISTS m_audit_item - ADD CONSTRAINT fk_audit_item FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE IF EXISTS m_audit_prop_value - ADD CONSTRAINT fk_audit_prop_value FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE IF EXISTS m_audit_ref_value - ADD CONSTRAINT fk_audit_ref_value FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE IF EXISTS m_case_wi - ADD CONSTRAINT fk_case_wi_owner FOREIGN KEY (owner_oid) REFERENCES m_case; -ALTER TABLE IF EXISTS m_case_wi_reference - ADD CONSTRAINT fk_case_wi_reference_owner FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_case_wi; -ALTER TABLE IF EXISTS m_connector_target_system - ADD CONSTRAINT fk_connector_target_system FOREIGN KEY (connector_oid) REFERENCES m_connector; -ALTER TABLE IF EXISTS m_focus_photo - ADD CONSTRAINT fk_focus_photo FOREIGN KEY (owner_oid) REFERENCES m_focus; -ALTER TABLE IF EXISTS m_focus_policy_situation - ADD CONSTRAINT fk_focus_policy_situation FOREIGN KEY (focus_oid) REFERENCES m_focus; -ALTER TABLE IF EXISTS m_object_ext_boolean - ADD CONSTRAINT fk_o_ext_boolean_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_object_ext_boolean - ADD CONSTRAINT fk_o_ext_boolean_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE IF EXISTS m_object_ext_date - ADD CONSTRAINT fk_o_ext_date_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_object_ext_date - ADD CONSTRAINT fk_o_ext_date_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE IF EXISTS m_object_ext_long - ADD CONSTRAINT fk_object_ext_long FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_object_ext_long - ADD CONSTRAINT fk_o_ext_long_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE IF EXISTS m_object_ext_poly - ADD CONSTRAINT fk_o_ext_poly_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_object_ext_poly - ADD CONSTRAINT fk_o_ext_poly_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE IF EXISTS m_object_ext_reference - ADD CONSTRAINT fk_o_ext_reference_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_object_ext_reference - ADD CONSTRAINT fk_o_ext_reference_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE IF EXISTS m_object_ext_string - ADD CONSTRAINT fk_object_ext_string FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_object_ext_string - ADD CONSTRAINT fk_o_ext_string_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE IF EXISTS m_object_subtype - ADD CONSTRAINT fk_object_subtype FOREIGN KEY (object_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_object_text_info - ADD CONSTRAINT fk_object_text_info_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_operation_execution - ADD CONSTRAINT fk_op_exec_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_org_closure - ADD CONSTRAINT fk_ancestor FOREIGN KEY (ancestor_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_org_closure - ADD CONSTRAINT fk_descendant FOREIGN KEY (descendant_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_org_org_type - ADD CONSTRAINT fk_org_org_type FOREIGN KEY (org_oid) REFERENCES m_org; -ALTER TABLE IF EXISTS m_reference - ADD CONSTRAINT fk_reference_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_service_type - ADD CONSTRAINT fk_service_type FOREIGN KEY (service_oid) REFERENCES m_service; -ALTER TABLE IF EXISTS m_shadow - ADD CONSTRAINT fk_shadow FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_task - ADD CONSTRAINT fk_task FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_task_dependent - ADD CONSTRAINT fk_task_dependent FOREIGN KEY (task_oid) REFERENCES m_task; -ALTER TABLE IF EXISTS m_user_employee_type - ADD CONSTRAINT fk_user_employee_type FOREIGN KEY (user_oid) REFERENCES m_user; -ALTER TABLE IF EXISTS m_user_organization - ADD CONSTRAINT fk_user_organization FOREIGN KEY (user_oid) REFERENCES m_user; -ALTER TABLE IF EXISTS m_user_organizational_unit - ADD CONSTRAINT fk_user_org_unit FOREIGN KEY (user_oid) REFERENCES m_user; -ALTER TABLE IF EXISTS m_abstract_role - ADD CONSTRAINT fk_abstract_role FOREIGN KEY (oid) REFERENCES m_focus; -ALTER TABLE IF EXISTS m_case - ADD CONSTRAINT fk_case FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_connector - ADD CONSTRAINT fk_connector FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_connector_host - ADD CONSTRAINT fk_connector_host FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_focus - ADD CONSTRAINT fk_focus FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_form - ADD CONSTRAINT fk_form FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_function_library - ADD CONSTRAINT fk_function_library FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_generic_object - ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_lookup_table - ADD CONSTRAINT fk_lookup_table FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_lookup_table_row - ADD CONSTRAINT fk_lookup_table_owner FOREIGN KEY (owner_oid) REFERENCES m_lookup_table; -ALTER TABLE IF EXISTS m_node - ADD CONSTRAINT fk_node FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_object_template - ADD CONSTRAINT fk_object_template FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_org - ADD CONSTRAINT fk_org FOREIGN KEY (oid) REFERENCES m_abstract_role; -ALTER TABLE IF EXISTS m_report - ADD CONSTRAINT fk_report FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_report_output - ADD CONSTRAINT fk_report_output FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_resource - ADD CONSTRAINT fk_resource FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_role - ADD CONSTRAINT fk_role FOREIGN KEY (oid) REFERENCES m_abstract_role; -ALTER TABLE IF EXISTS m_security_policy - ADD CONSTRAINT fk_security_policy FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_sequence - ADD CONSTRAINT fk_sequence FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_service - ADD CONSTRAINT fk_service FOREIGN KEY (oid) REFERENCES m_abstract_role; -ALTER TABLE IF EXISTS m_system_configuration - ADD CONSTRAINT fk_system_configuration FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_trigger - ADD CONSTRAINT fk_trigger_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE IF EXISTS m_user - ADD CONSTRAINT fk_user FOREIGN KEY (oid) REFERENCES m_focus; -ALTER TABLE IF EXISTS m_value_policy - ADD CONSTRAINT fk_value_policy FOREIGN KEY (oid) REFERENCES m_object; - --- Thanks to Patrick Lightbody for submitting this... --- --- In your Quartz properties file, you'll need to set --- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate - -drop table if exists qrtz_fired_triggers; -DROP TABLE if exists QRTZ_PAUSED_TRIGGER_GRPS; -DROP TABLE if exists QRTZ_SCHEDULER_STATE; -DROP TABLE if exists QRTZ_LOCKS; -drop table if exists qrtz_simple_triggers; -drop table if exists qrtz_cron_triggers; -drop table if exists qrtz_simprop_triggers; -DROP TABLE if exists QRTZ_BLOB_TRIGGERS; -drop table if exists qrtz_triggers; -drop table if exists qrtz_job_details; -drop table if exists qrtz_calendars; - -CREATE TABLE qrtz_job_details - ( - SCHED_NAME VARCHAR(120) NOT NULL, - JOB_NAME VARCHAR(200) NOT NULL, - JOB_GROUP VARCHAR(200) NOT NULL, - DESCRIPTION VARCHAR(250) NULL, - JOB_CLASS_NAME VARCHAR(250) NOT NULL, - IS_DURABLE BOOL NOT NULL, - IS_NONCONCURRENT BOOL NOT NULL, - IS_UPDATE_DATA BOOL NOT NULL, - REQUESTS_RECOVERY BOOL NOT NULL, - JOB_DATA BYTEA NULL, - PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) -); - -CREATE TABLE qrtz_triggers - ( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_NAME VARCHAR(200) NOT NULL, - TRIGGER_GROUP VARCHAR(200) NOT NULL, - JOB_NAME VARCHAR(200) NOT NULL, - JOB_GROUP VARCHAR(200) NOT NULL, - DESCRIPTION VARCHAR(250) NULL, - NEXT_FIRE_TIME BIGINT NULL, - PREV_FIRE_TIME BIGINT NULL, - PRIORITY INTEGER NULL, - EXECUTION_GROUP VARCHAR(200) NULL, - TRIGGER_STATE VARCHAR(16) NOT NULL, - TRIGGER_TYPE VARCHAR(8) NOT NULL, - START_TIME BIGINT NOT NULL, - END_TIME BIGINT NULL, - CALENDAR_NAME VARCHAR(200) NULL, - MISFIRE_INSTR SMALLINT NULL, - JOB_DATA BYTEA NULL, - PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) - REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP) -); - -CREATE TABLE qrtz_simple_triggers - ( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_NAME VARCHAR(200) NOT NULL, - TRIGGER_GROUP VARCHAR(200) NOT NULL, - REPEAT_COUNT BIGINT NOT NULL, - REPEAT_INTERVAL BIGINT NOT NULL, - TIMES_TRIGGERED BIGINT NOT NULL, - PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -); - -CREATE TABLE qrtz_cron_triggers - ( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_NAME VARCHAR(200) NOT NULL, - TRIGGER_GROUP VARCHAR(200) NOT NULL, - CRON_EXPRESSION VARCHAR(120) NOT NULL, - TIME_ZONE_ID VARCHAR(80), - PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -); - -CREATE TABLE qrtz_simprop_triggers - ( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_NAME VARCHAR(200) NOT NULL, - TRIGGER_GROUP VARCHAR(200) NOT NULL, - STR_PROP_1 VARCHAR(512) NULL, - STR_PROP_2 VARCHAR(512) NULL, - STR_PROP_3 VARCHAR(512) NULL, - INT_PROP_1 INT NULL, - INT_PROP_2 INT NULL, - LONG_PROP_1 BIGINT NULL, - LONG_PROP_2 BIGINT NULL, - DEC_PROP_1 NUMERIC(13,4) NULL, - DEC_PROP_2 NUMERIC(13,4) NULL, - BOOL_PROP_1 BOOL NULL, - BOOL_PROP_2 BOOL NULL, - PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -); - -CREATE TABLE qrtz_blob_triggers - ( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_NAME VARCHAR(200) NOT NULL, - TRIGGER_GROUP VARCHAR(200) NOT NULL, - BLOB_DATA BYTEA NULL, - PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -); - -CREATE TABLE qrtz_calendars - ( - SCHED_NAME VARCHAR(120) NOT NULL, - CALENDAR_NAME VARCHAR(200) NOT NULL, - CALENDAR BYTEA NOT NULL, - PRIMARY KEY (SCHED_NAME,CALENDAR_NAME) -); - - -CREATE TABLE qrtz_paused_trigger_grps - ( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_GROUP VARCHAR(200) NOT NULL, - PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP) -); - -CREATE TABLE qrtz_fired_triggers - ( - SCHED_NAME VARCHAR(120) NOT NULL, - ENTRY_ID VARCHAR(95) NOT NULL, - TRIGGER_NAME VARCHAR(200) NOT NULL, - TRIGGER_GROUP VARCHAR(200) NOT NULL, - INSTANCE_NAME VARCHAR(200) NOT NULL, - FIRED_TIME BIGINT NOT NULL, - SCHED_TIME BIGINT NOT NULL, - PRIORITY INTEGER NOT NULL, - EXECUTION_GROUP VARCHAR(200) NULL, - STATE VARCHAR(16) NOT NULL, - JOB_NAME VARCHAR(200) NULL, - JOB_GROUP VARCHAR(200) NULL, - IS_NONCONCURRENT BOOL NULL, - REQUESTS_RECOVERY BOOL NULL, - PRIMARY KEY (SCHED_NAME,ENTRY_ID) -); - -CREATE TABLE qrtz_scheduler_state - ( - SCHED_NAME VARCHAR(120) NOT NULL, - INSTANCE_NAME VARCHAR(200) NOT NULL, - LAST_CHECKIN_TIME BIGINT NOT NULL, - CHECKIN_INTERVAL BIGINT NOT NULL, - PRIMARY KEY (SCHED_NAME,INSTANCE_NAME) -); - -CREATE TABLE qrtz_locks - ( - SCHED_NAME VARCHAR(120) NOT NULL, - LOCK_NAME VARCHAR(40) NOT NULL, - PRIMARY KEY (SCHED_NAME,LOCK_NAME) -); - -create index idx_qrtz_j_req_recovery on qrtz_job_details(SCHED_NAME,REQUESTS_RECOVERY); -create index idx_qrtz_j_grp on qrtz_job_details(SCHED_NAME,JOB_GROUP); - -create index idx_qrtz_t_j on qrtz_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); -create index idx_qrtz_t_jg on qrtz_triggers(SCHED_NAME,JOB_GROUP); -create index idx_qrtz_t_c on qrtz_triggers(SCHED_NAME,CALENDAR_NAME); -create index idx_qrtz_t_g on qrtz_triggers(SCHED_NAME,TRIGGER_GROUP); -create index idx_qrtz_t_state on qrtz_triggers(SCHED_NAME,TRIGGER_STATE); -create index idx_qrtz_t_n_state on qrtz_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE); -create index idx_qrtz_t_n_g_state on qrtz_triggers(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE); -create index idx_qrtz_t_next_fire_time on qrtz_triggers(SCHED_NAME,NEXT_FIRE_TIME); -create index idx_qrtz_t_nft_st on qrtz_triggers(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME); -create index idx_qrtz_t_nft_misfire on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME); -create index idx_qrtz_t_nft_st_misfire on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE); -create index idx_qrtz_t_nft_st_misfire_grp on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE); - -create index idx_qrtz_ft_trig_inst_name on qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME); -create index idx_qrtz_ft_inst_job_req_rcvry on qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY); -create index idx_qrtz_ft_j_g on qrtz_fired_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); -create index idx_qrtz_ft_jg on qrtz_fired_triggers(SCHED_NAME,JOB_GROUP); -create index idx_qrtz_ft_t_g on qrtz_fired_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP); -create index idx_qrtz_ft_tg on qrtz_fired_triggers(SCHED_NAME,TRIGGER_GROUP); - -create table ACT_GE_PROPERTY ( - NAME_ varchar(64), - VALUE_ varchar(300), - REV_ integer, - primary key (NAME_) -); - -insert into ACT_GE_PROPERTY -values ('schema.version', '5.22.0.0', 1); - -insert into ACT_GE_PROPERTY -values ('schema.history', 'create(5.22.0.0)', 1); - -insert into ACT_GE_PROPERTY -values ('next.dbid', '1', 1); - -create table ACT_GE_BYTEARRAY ( - ID_ varchar(64), - REV_ integer, - NAME_ varchar(255), - DEPLOYMENT_ID_ varchar(64), - BYTES_ bytea, - GENERATED_ boolean, - primary key (ID_) -); - -create table ACT_RE_DEPLOYMENT ( - ID_ varchar(64), - NAME_ varchar(255), - CATEGORY_ varchar(255), - TENANT_ID_ varchar(255) default '', - DEPLOY_TIME_ timestamp, - primary key (ID_) -); - -create table ACT_RE_MODEL ( - ID_ varchar(64) not null, - REV_ integer, - NAME_ varchar(255), - KEY_ varchar(255), - CATEGORY_ varchar(255), - CREATE_TIME_ timestamp, - LAST_UPDATE_TIME_ timestamp, - VERSION_ integer, - META_INFO_ varchar(4000), - DEPLOYMENT_ID_ varchar(64), - EDITOR_SOURCE_VALUE_ID_ varchar(64), - EDITOR_SOURCE_EXTRA_VALUE_ID_ varchar(64), - TENANT_ID_ varchar(255) default '', - primary key (ID_) -); - -create table ACT_RU_EXECUTION ( - ID_ varchar(64), - REV_ integer, - PROC_INST_ID_ varchar(64), - BUSINESS_KEY_ varchar(255), - PARENT_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - SUPER_EXEC_ varchar(64), - ACT_ID_ varchar(255), - IS_ACTIVE_ boolean, - IS_CONCURRENT_ boolean, - IS_SCOPE_ boolean, - IS_EVENT_SCOPE_ boolean, - SUSPENSION_STATE_ integer, - CACHED_ENT_STATE_ integer, - TENANT_ID_ varchar(255) default '', - NAME_ varchar(255), - LOCK_TIME_ timestamp, - primary key (ID_) -); - -create table ACT_RU_JOB ( - ID_ varchar(64) NOT NULL, - REV_ integer, - TYPE_ varchar(255) NOT NULL, - LOCK_EXP_TIME_ timestamp, - LOCK_OWNER_ varchar(255), - EXCLUSIVE_ boolean, - EXECUTION_ID_ varchar(64), - PROCESS_INSTANCE_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - RETRIES_ integer, - EXCEPTION_STACK_ID_ varchar(64), - EXCEPTION_MSG_ varchar(4000), - DUEDATE_ timestamp, - REPEAT_ varchar(255), - HANDLER_TYPE_ varchar(255), - HANDLER_CFG_ varchar(4000), - TENANT_ID_ varchar(255) default '', - primary key (ID_) -); - -create table ACT_RE_PROCDEF ( - ID_ varchar(64) NOT NULL, - REV_ integer, - CATEGORY_ varchar(255), - NAME_ varchar(255), - KEY_ varchar(255) NOT NULL, - VERSION_ integer NOT NULL, - DEPLOYMENT_ID_ varchar(64), - RESOURCE_NAME_ varchar(4000), - DGRM_RESOURCE_NAME_ varchar(4000), - DESCRIPTION_ varchar(4000), - HAS_START_FORM_KEY_ boolean, - HAS_GRAPHICAL_NOTATION_ boolean, - SUSPENSION_STATE_ integer, - TENANT_ID_ varchar(255) default '', - primary key (ID_) -); - -create table ACT_RU_TASK ( - ID_ varchar(64), - REV_ integer, - EXECUTION_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - PROC_DEF_ID_ varchar(64), - NAME_ varchar(255), - PARENT_TASK_ID_ varchar(64), - DESCRIPTION_ varchar(4000), - TASK_DEF_KEY_ varchar(255), - OWNER_ varchar(255), - ASSIGNEE_ varchar(255), - DELEGATION_ varchar(64), - PRIORITY_ integer, - CREATE_TIME_ timestamp, - DUE_DATE_ timestamp, - CATEGORY_ varchar(255), - SUSPENSION_STATE_ integer, - TENANT_ID_ varchar(255) default '', - FORM_KEY_ varchar(255), - primary key (ID_) -); - -create table ACT_RU_IDENTITYLINK ( - ID_ varchar(64), - REV_ integer, - GROUP_ID_ varchar(255), - TYPE_ varchar(255), - USER_ID_ varchar(255), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - PROC_DEF_ID_ varchar (64), - primary key (ID_) -); - -create table ACT_RU_VARIABLE ( - ID_ varchar(64) not null, - REV_ integer, - TYPE_ varchar(255) not null, - NAME_ varchar(255) not null, - EXECUTION_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - TASK_ID_ varchar(64), - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double precision, - LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), - primary key (ID_) -); - -create table ACT_RU_EVENT_SUBSCR ( - ID_ varchar(64) not null, - REV_ integer, - EVENT_TYPE_ varchar(255) not null, - EVENT_NAME_ varchar(255), - EXECUTION_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - ACTIVITY_ID_ varchar(64), - CONFIGURATION_ varchar(255), - CREATED_ timestamp not null, - PROC_DEF_ID_ varchar(64), - TENANT_ID_ varchar(255) default '', - primary key (ID_) -); - -create table ACT_EVT_LOG ( - LOG_NR_ SERIAL PRIMARY KEY, - TYPE_ varchar(64), - PROC_DEF_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - TASK_ID_ varchar(64), - TIME_STAMP_ timestamp not null, - USER_ID_ varchar(255), - DATA_ bytea, - LOCK_OWNER_ varchar(255), - LOCK_TIME_ timestamp null, - IS_PROCESSED_ smallint default 0 -); - -create table ACT_PROCDEF_INFO ( - ID_ varchar(64) not null, - PROC_DEF_ID_ varchar(64) not null, - REV_ integer, - INFO_JSON_ID_ varchar(64), - primary key (ID_) -); - -create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_); -create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_); -create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_); -create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_); -create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_); -create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_); - -create index ACT_IDX_BYTEAR_DEPL on ACT_GE_BYTEARRAY(DEPLOYMENT_ID_); -alter table ACT_GE_BYTEARRAY - add constraint ACT_FK_BYTEARR_DEPL - foreign key (DEPLOYMENT_ID_) - references ACT_RE_DEPLOYMENT (ID_); - -alter table ACT_RE_PROCDEF - add constraint ACT_UNIQ_PROCDEF - unique (KEY_,VERSION_, TENANT_ID_); - -create index ACT_IDX_EXE_PROCINST on ACT_RU_EXECUTION(PROC_INST_ID_); -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_EXE_PARENT on ACT_RU_EXECUTION(PARENT_ID_); -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PARENT - foreign key (PARENT_ID_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_EXE_SUPER on ACT_RU_EXECUTION(SUPER_EXEC_); -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_SUPER - foreign key (SUPER_EXEC_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_EXE_PROCDEF on ACT_RU_EXECUTION(PROC_DEF_ID_); -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -create index ACT_IDX_TSKASS_TASK on ACT_RU_IDENTITYLINK(TASK_ID_); -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_TSKASS_TASK - foreign key (TASK_ID_) - references ACT_RU_TASK (ID_); - -create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_); -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_ATHRZ_PROCEDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -create index ACT_IDX_IDL_PROCINST on ACT_RU_IDENTITYLINK(PROC_INST_ID_); -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_IDL_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_TASK_EXEC on ACT_RU_TASK(EXECUTION_ID_); -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_EXE - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_TASK_PROCINST on ACT_RU_TASK(PROC_INST_ID_); -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_TASK_PROCDEF on ACT_RU_TASK(PROC_DEF_ID_); -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -create index ACT_IDX_VAR_EXE on ACT_RU_VARIABLE(EXECUTION_ID_); -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_EXE - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION (ID_); - -create index ACT_IDX_VAR_PROCINST on ACT_RU_VARIABLE(PROC_INST_ID_); -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION(ID_); - -create index ACT_IDX_VAR_BYTEARRAY on ACT_RU_VARIABLE(BYTEARRAY_ID_); -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_BYTEARRAY - foreign key (BYTEARRAY_ID_) - references ACT_GE_BYTEARRAY (ID_); - -create index ACT_IDX_JOB_EXCEPTION on ACT_RU_JOB(EXCEPTION_STACK_ID_); -alter table ACT_RU_JOB - add constraint ACT_FK_JOB_EXCEPTION - foreign key (EXCEPTION_STACK_ID_) - references ACT_GE_BYTEARRAY (ID_); - -create index ACT_IDX_EVENT_SUBSCR on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_); -alter table ACT_RU_EVENT_SUBSCR - add constraint ACT_FK_EVENT_EXEC - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION(ID_); - -create index ACT_IDX_MODEL_SOURCE on ACT_RE_MODEL(EDITOR_SOURCE_VALUE_ID_); -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_SOURCE - foreign key (EDITOR_SOURCE_VALUE_ID_) - references ACT_GE_BYTEARRAY (ID_); - -create index ACT_IDX_MODEL_SOURCE_EXTRA on ACT_RE_MODEL(EDITOR_SOURCE_EXTRA_VALUE_ID_); -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_SOURCE_EXTRA - foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) - references ACT_GE_BYTEARRAY (ID_); - -create index ACT_IDX_MODEL_DEPLOYMENT on ACT_RE_MODEL(DEPLOYMENT_ID_); -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_DEPLOYMENT - foreign key (DEPLOYMENT_ID_) - references ACT_RE_DEPLOYMENT (ID_); - -create index ACT_IDX_PROCDEF_INFO_JSON on ACT_PROCDEF_INFO(INFO_JSON_ID_); -alter table ACT_PROCDEF_INFO - add constraint ACT_FK_INFO_JSON_BA - foreign key (INFO_JSON_ID_) - references ACT_GE_BYTEARRAY (ID_); - -create index ACT_IDX_PROCDEF_INFO_PROC on ACT_PROCDEF_INFO(PROC_DEF_ID_); -alter table ACT_PROCDEF_INFO - add constraint ACT_FK_INFO_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -alter table ACT_PROCDEF_INFO - add constraint ACT_UNIQ_INFO_PROCDEF - unique (PROC_DEF_ID_); - -create table ACT_HI_PROCINST ( - ID_ varchar(64) not null, - PROC_INST_ID_ varchar(64) not null, - BUSINESS_KEY_ varchar(255), - PROC_DEF_ID_ varchar(64) not null, - START_TIME_ timestamp not null, - END_TIME_ timestamp, - DURATION_ bigint, - START_USER_ID_ varchar(255), - START_ACT_ID_ varchar(255), - END_ACT_ID_ varchar(255), - SUPER_PROCESS_INSTANCE_ID_ varchar(64), - DELETE_REASON_ varchar(4000), - TENANT_ID_ varchar(255) default '', - NAME_ varchar(255), - primary key (ID_), - unique (PROC_INST_ID_) -); - -create table ACT_HI_ACTINST ( - ID_ varchar(64) not null, - PROC_DEF_ID_ varchar(64) not null, - PROC_INST_ID_ varchar(64) not null, - EXECUTION_ID_ varchar(64) not null, - ACT_ID_ varchar(255) not null, - TASK_ID_ varchar(64), - CALL_PROC_INST_ID_ varchar(64), - ACT_NAME_ varchar(255), - ACT_TYPE_ varchar(255) not null, - ASSIGNEE_ varchar(255), - START_TIME_ timestamp not null, - END_TIME_ timestamp, - DURATION_ bigint, - TENANT_ID_ varchar(255) default '', - primary key (ID_) -); - -create table ACT_HI_TASKINST ( - ID_ varchar(64) not null, - PROC_DEF_ID_ varchar(64), - TASK_DEF_KEY_ varchar(255), - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - NAME_ varchar(255), - PARENT_TASK_ID_ varchar(64), - DESCRIPTION_ varchar(4000), - OWNER_ varchar(255), - ASSIGNEE_ varchar(255), - START_TIME_ timestamp not null, - CLAIM_TIME_ timestamp, - END_TIME_ timestamp, - DURATION_ bigint, - DELETE_REASON_ varchar(4000), - PRIORITY_ integer, - DUE_DATE_ timestamp, - FORM_KEY_ varchar(255), - CATEGORY_ varchar(255), - TENANT_ID_ varchar(255) default '', - primary key (ID_) -); - -create table ACT_HI_VARINST ( - ID_ varchar(64) not null, - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - TASK_ID_ varchar(64), - NAME_ varchar(255) not null, - VAR_TYPE_ varchar(100), - REV_ integer, - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double precision, - LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), - CREATE_TIME_ timestamp, - LAST_UPDATED_TIME_ timestamp, - primary key (ID_) -); - -create table ACT_HI_DETAIL ( - ID_ varchar(64) not null, - TYPE_ varchar(255) not null, - PROC_INST_ID_ varchar(64), - EXECUTION_ID_ varchar(64), - TASK_ID_ varchar(64), - ACT_INST_ID_ varchar(64), - NAME_ varchar(255) not null, - VAR_TYPE_ varchar(64), - REV_ integer, - TIME_ timestamp not null, - BYTEARRAY_ID_ varchar(64), - DOUBLE_ double precision, - LONG_ bigint, - TEXT_ varchar(4000), - TEXT2_ varchar(4000), - primary key (ID_) -); - -create table ACT_HI_COMMENT ( - ID_ varchar(64) not null, - TYPE_ varchar(255), - TIME_ timestamp not null, - USER_ID_ varchar(255), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - ACTION_ varchar(255), - MESSAGE_ varchar(4000), - FULL_MSG_ bytea, - primary key (ID_) -); - -create table ACT_HI_ATTACHMENT ( - ID_ varchar(64) not null, - REV_ integer, - USER_ID_ varchar(255), - NAME_ varchar(255), - DESCRIPTION_ varchar(4000), - TYPE_ varchar(255), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - URL_ varchar(4000), - CONTENT_ID_ varchar(64), - TIME_ timestamp, - primary key (ID_) -); - -create table ACT_HI_IDENTITYLINK ( - ID_ varchar(64), - GROUP_ID_ varchar(255), - TYPE_ varchar(255), - USER_ID_ varchar(255), - TASK_ID_ varchar(64), - PROC_INST_ID_ varchar(64), - primary key (ID_) -); - - -create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_); -create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_); -create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_); -create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_); -create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_); -create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_); -create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_); -create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_); -create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_); -create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_); -create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_); -create index ACT_IDX_HI_PROCVAR_TASK_ID on ACT_HI_VARINST(TASK_ID_); -create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_); -create index ACT_IDX_HI_ACT_INST_EXEC on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_); -create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_); -create index ACT_IDX_HI_IDENT_LNK_TASK on ACT_HI_IDENTITYLINK(TASK_ID_); -create index ACT_IDX_HI_IDENT_LNK_PROCINST on ACT_HI_IDENTITYLINK(PROC_INST_ID_); -create index ACT_IDX_HI_TASK_INST_PROCINST on ACT_HI_TASKINST(PROC_INST_ID_); - -create table ACT_ID_GROUP ( - ID_ varchar(64), - REV_ integer, - NAME_ varchar(255), - TYPE_ varchar(255), - primary key (ID_) -); - -create table ACT_ID_MEMBERSHIP ( - USER_ID_ varchar(64), - GROUP_ID_ varchar(64), - primary key (USER_ID_, GROUP_ID_) -); - -create table ACT_ID_USER ( - ID_ varchar(64), - REV_ integer, - FIRST_ varchar(255), - LAST_ varchar(255), - EMAIL_ varchar(255), - PWD_ varchar(255), - PICTURE_ID_ varchar(64), - primary key (ID_) -); - -create table ACT_ID_INFO ( - ID_ varchar(64), - REV_ integer, - USER_ID_ varchar(64), - TYPE_ varchar(64), - KEY_ varchar(255), - VALUE_ varchar(255), - PASSWORD_ bytea, - PARENT_ID_ varchar(255), - primary key (ID_) -); - -create index ACT_IDX_MEMB_GROUP on ACT_ID_MEMBERSHIP(GROUP_ID_); -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_GROUP - foreign key (GROUP_ID_) - references ACT_ID_GROUP (ID_); - -create index ACT_IDX_MEMB_USER on ACT_ID_MEMBERSHIP(USER_ID_); -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_USER - foreign key (USER_ID_) - references ACT_ID_USER (ID_); - -commit; diff --git a/config/sql/_all/postgresql-3.9-all.sql b/config/sql/_all/postgresql-4.0-all.sql similarity index 99% rename from config/sql/_all/postgresql-3.9-all.sql rename to config/sql/_all/postgresql-4.0-all.sql index f84d02971ef..b9fdab4e3b0 100644 --- a/config/sql/_all/postgresql-3.9-all.sql +++ b/config/sql/_all/postgresql-4.0-all.sql @@ -519,6 +519,12 @@ CREATE TABLE m_abstract_role ( oid VARCHAR(36) NOT NULL, PRIMARY KEY (oid) ); +CREATE TABLE m_archetype ( + name_norm VARCHAR(255), + name_orig VARCHAR(255), + oid VARCHAR(36) NOT NULL, + PRIMARY KEY (oid) +); CREATE TABLE m_case ( name_norm VARCHAR(255), name_orig VARCHAR(255), @@ -884,8 +890,9 @@ CREATE INDEX iAbstractRoleIdentifier ON m_abstract_role (identifier); CREATE INDEX iRequestable ON m_abstract_role (requestable); -CREATE INDEX iAutoassignEnabled - ON m_abstract_role (autoassign_enabled); +CREATE INDEX iAutoassignEnabled ON m_abstract_role(autoassign_enabled); +CREATE INDEX iArchetypeNameOrig ON m_archetype(name_orig); +CREATE INDEX iArchetypeNameNorm ON m_archetype(name_norm); CREATE INDEX iCaseNameOrig ON m_case (name_orig); ALTER TABLE IF EXISTS m_case @@ -1108,6 +1115,8 @@ ALTER TABLE IF EXISTS m_user_organizational_unit ADD CONSTRAINT fk_user_org_unit FOREIGN KEY (user_oid) REFERENCES m_user; ALTER TABLE IF EXISTS m_abstract_role ADD CONSTRAINT fk_abstract_role FOREIGN KEY (oid) REFERENCES m_focus; +ALTER TABLE IF EXISTS m_archetype + ADD CONSTRAINT fk_archetype FOREIGN KEY (oid) REFERENCES m_abstract_role; ALTER TABLE IF EXISTS m_case ADD CONSTRAINT fk_case FOREIGN KEY (oid) REFERENCES m_object; ALTER TABLE IF EXISTS m_connector @@ -1121,7 +1130,7 @@ ALTER TABLE IF EXISTS m_form ALTER TABLE IF EXISTS m_function_library ADD CONSTRAINT fk_function_library FOREIGN KEY (oid) REFERENCES m_object; ALTER TABLE IF EXISTS m_generic_object - ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_object; + ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_focus; ALTER TABLE IF EXISTS m_lookup_table ADD CONSTRAINT fk_lookup_table FOREIGN KEY (oid) REFERENCES m_object; ALTER TABLE IF EXISTS m_lookup_table_row @@ -1157,7 +1166,7 @@ ALTER TABLE IF EXISTS m_user ALTER TABLE IF EXISTS m_value_policy ADD CONSTRAINT fk_value_policy FOREIGN KEY (oid) REFERENCES m_object; -INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '3.9'); +INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '4.0'); -- Thanks to Patrick Lightbody for submitting this... -- diff --git a/config/sql/_all/postgresql-upgrade-3.8-3.9.sql b/config/sql/_all/postgresql-upgrade-3.8-3.9.sql deleted file mode 100644 index 345c3879a18..00000000000 --- a/config/sql/_all/postgresql-upgrade-3.8-3.9.sql +++ /dev/null @@ -1,26 +0,0 @@ -CREATE TABLE m_object_collection ( - name_norm VARCHAR(255), - name_orig VARCHAR(255), - oid VARCHAR(36) NOT NULL, - PRIMARY KEY (oid) -); - -CREATE INDEX iObjectCollectionNameOrig - ON m_object_collection (name_orig); -ALTER TABLE IF EXISTS m_object_collection - ADD CONSTRAINT uc_object_collection_name UNIQUE (name_norm); - -ALTER TABLE IF EXISTS m_object_collection - ADD CONSTRAINT fk_object_collection FOREIGN KEY (oid) REFERENCES m_object; - -ALTER TABLE m_acc_cert_campaign ADD COLUMN iteration INT4 DEFAULT 1 NOT NULL; -ALTER TABLE m_acc_cert_case ADD COLUMN iteration INT4 DEFAULT 1 NOT NULL; -ALTER TABLE m_acc_cert_wi ADD COLUMN iteration INT4 DEFAULT 1 NOT NULL; - -CREATE TABLE m_global_metadata ( - name VARCHAR(255) NOT NULL, - value VARCHAR(255), - PRIMARY KEY (name) -); - -INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '3.9'); diff --git a/config/sql/_all/postgresql-upgrade-3.9-4.0.sql b/config/sql/_all/postgresql-upgrade-3.9-4.0.sql new file mode 100644 index 00000000000..6efd5656b66 --- /dev/null +++ b/config/sql/_all/postgresql-upgrade-3.9-4.0.sql @@ -0,0 +1,19 @@ +CREATE TABLE m_archetype ( + name_norm VARCHAR(255), + name_orig VARCHAR(255), + oid VARCHAR(36) NOT NULL, + PRIMARY KEY (oid) +); + +CREATE INDEX iArchetypeNameOrig ON m_archetype(name_orig); +CREATE INDEX iArchetypeNameNorm ON m_archetype(name_norm); + +ALTER TABLE IF EXISTS m_archetype + ADD CONSTRAINT fk_archetype FOREIGN KEY (oid) REFERENCES m_abstract_role; + +ALTER TABLE m_generic_object DROP CONSTRAINT fk_generic_object; +ALTER TABLE IF EXISTS m_generic_object + ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_focus; + + +UPDATE m_global_metadata SET value = '4.0' WHERE name = 'databaseSchemaVersion'; \ No newline at end of file diff --git a/config/sql/_all/sqlserver-3.8-all.sql b/config/sql/_all/sqlserver-3.8-all.sql deleted file mode 100644 index 9aca7a79678..00000000000 --- a/config/sql/_all/sqlserver-3.8-all.sql +++ /dev/null @@ -1,2026 +0,0 @@ -CREATE TABLE m_acc_cert_campaign ( - definitionRef_relation NVARCHAR(157) COLLATE database_default, - definitionRef_targetOid NVARCHAR(36) COLLATE database_default, - definitionRef_type INT, - endTimestamp DATETIME2, - handlerUri NVARCHAR(255) COLLATE database_default, - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - ownerRef_relation NVARCHAR(157) COLLATE database_default, - ownerRef_targetOid NVARCHAR(36) COLLATE database_default, - ownerRef_type INT, - stageNumber INT, - startTimestamp DATETIME2, - state INT, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_acc_cert_case ( - id INT NOT NULL, - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - administrativeStatus INT, - archiveTimestamp DATETIME2, - disableReason NVARCHAR(255) COLLATE database_default, - disableTimestamp DATETIME2, - effectiveStatus INT, - enableTimestamp DATETIME2, - validFrom DATETIME2, - validTo DATETIME2, - validityChangeTimestamp DATETIME2, - validityStatus INT, - currentStageOutcome NVARCHAR(255) COLLATE database_default, - fullObject VARBINARY(MAX), - objectRef_relation NVARCHAR(157) COLLATE database_default, - objectRef_targetOid NVARCHAR(36) COLLATE database_default, - objectRef_type INT, - orgRef_relation NVARCHAR(157) COLLATE database_default, - orgRef_targetOid NVARCHAR(36) COLLATE database_default, - orgRef_type INT, - outcome NVARCHAR(255) COLLATE database_default, - remediedTimestamp DATETIME2, - reviewDeadline DATETIME2, - reviewRequestedTimestamp DATETIME2, - stageNumber INT, - targetRef_relation NVARCHAR(157) COLLATE database_default, - targetRef_targetOid NVARCHAR(36) COLLATE database_default, - targetRef_type INT, - tenantRef_relation NVARCHAR(157) COLLATE database_default, - tenantRef_targetOid NVARCHAR(36) COLLATE database_default, - tenantRef_type INT, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_acc_cert_definition ( - handlerUri NVARCHAR(255) COLLATE database_default, - lastCampaignClosedTimestamp DATETIME2, - lastCampaignStartedTimestamp DATETIME2, - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - ownerRef_relation NVARCHAR(157) COLLATE database_default, - ownerRef_targetOid NVARCHAR(36) COLLATE database_default, - ownerRef_type INT, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_acc_cert_wi ( - id INT NOT NULL, - owner_id INT NOT NULL, - owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - closeTimestamp DATETIME2, - outcome NVARCHAR(255) COLLATE database_default, - outputChangeTimestamp DATETIME2, - performerRef_relation NVARCHAR(157) COLLATE database_default, - performerRef_targetOid NVARCHAR(36) COLLATE database_default, - performerRef_type INT, - stageNumber INT, - PRIMARY KEY (owner_owner_oid, owner_id, id) -); -CREATE TABLE m_acc_cert_wi_reference ( - owner_id INT NOT NULL, - owner_owner_id INT NOT NULL, - owner_owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - relation NVARCHAR(157) COLLATE database_default NOT NULL, - targetOid NVARCHAR(36) COLLATE database_default NOT NULL, - targetType INT, - PRIMARY KEY (owner_owner_owner_oid, owner_owner_id, owner_id, relation, targetOid) -); -CREATE TABLE m_assignment ( - id INT NOT NULL, - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - administrativeStatus INT, - archiveTimestamp DATETIME2, - disableReason NVARCHAR(255) COLLATE database_default, - disableTimestamp DATETIME2, - effectiveStatus INT, - enableTimestamp DATETIME2, - validFrom DATETIME2, - validTo DATETIME2, - validityChangeTimestamp DATETIME2, - validityStatus INT, - assignmentOwner INT, - createChannel NVARCHAR(255) COLLATE database_default, - createTimestamp DATETIME2, - creatorRef_relation NVARCHAR(157) COLLATE database_default, - creatorRef_targetOid NVARCHAR(36) COLLATE database_default, - creatorRef_type INT, - lifecycleState NVARCHAR(255) COLLATE database_default, - modifierRef_relation NVARCHAR(157) COLLATE database_default, - modifierRef_targetOid NVARCHAR(36) COLLATE database_default, - modifierRef_type INT, - modifyChannel NVARCHAR(255) COLLATE database_default, - modifyTimestamp DATETIME2, - orderValue INT, - orgRef_relation NVARCHAR(157) COLLATE database_default, - orgRef_targetOid NVARCHAR(36) COLLATE database_default, - orgRef_type INT, - resourceRef_relation NVARCHAR(157) COLLATE database_default, - resourceRef_targetOid NVARCHAR(36) COLLATE database_default, - resourceRef_type INT, - targetRef_relation NVARCHAR(157) COLLATE database_default, - targetRef_targetOid NVARCHAR(36) COLLATE database_default, - targetRef_type INT, - tenantRef_relation NVARCHAR(157) COLLATE database_default, - tenantRef_targetOid NVARCHAR(36) COLLATE database_default, - tenantRef_type INT, - extId INT, - extOid NVARCHAR(36) COLLATE database_default, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_assignment_ext_boolean ( - item_id INT NOT NULL, - anyContainer_owner_id INT NOT NULL, - anyContainer_owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - booleanValue BIT NOT NULL, - PRIMARY KEY ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, booleanValue) -); -CREATE TABLE m_assignment_ext_date ( - item_id INT NOT NULL, - anyContainer_owner_id INT NOT NULL, - anyContainer_owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - dateValue DATETIME2 NOT NULL, - PRIMARY KEY ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, dateValue) -); -CREATE TABLE m_assignment_ext_long ( - item_id INT NOT NULL, - anyContainer_owner_id INT NOT NULL, - anyContainer_owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - longValue BIGINT NOT NULL, - PRIMARY KEY ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, longValue) -); -CREATE TABLE m_assignment_ext_poly ( - item_id INT NOT NULL, - anyContainer_owner_id INT NOT NULL, - anyContainer_owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - orig NVARCHAR(255) COLLATE database_default NOT NULL, - norm NVARCHAR(255) COLLATE database_default, - PRIMARY KEY ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, orig) -); -CREATE TABLE m_assignment_ext_reference ( - item_id INT NOT NULL, - anyContainer_owner_id INT NOT NULL, - anyContainer_owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - targetoid NVARCHAR(36) COLLATE database_default NOT NULL, - relation NVARCHAR(157) COLLATE database_default, - targetType INT, - PRIMARY KEY ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, targetoid) -); -CREATE TABLE m_assignment_ext_string ( - item_id INT NOT NULL, - anyContainer_owner_id INT NOT NULL, - anyContainer_owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - stringValue NVARCHAR(255) COLLATE database_default NOT NULL, - PRIMARY KEY ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id, stringValue) -); -CREATE TABLE m_assignment_extension ( - owner_id INT NOT NULL, - owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - booleansCount SMALLINT, - datesCount SMALLINT, - longsCount SMALLINT, - polysCount SMALLINT, - referencesCount SMALLINT, - stringsCount SMALLINT, - PRIMARY KEY (owner_owner_oid, owner_id) -); -CREATE TABLE m_assignment_policy_situation ( - assignment_id INT NOT NULL, - assignment_oid NVARCHAR(36) COLLATE database_default NOT NULL, - policySituation NVARCHAR(255) COLLATE database_default -); -CREATE TABLE m_assignment_reference ( - owner_id INT NOT NULL, - owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - reference_type INT NOT NULL, - relation NVARCHAR(157) COLLATE database_default NOT NULL, - targetOid NVARCHAR(36) COLLATE database_default NOT NULL, - targetType INT, - PRIMARY KEY (owner_owner_oid, owner_id, reference_type, relation, targetOid) -); -CREATE TABLE m_audit_delta ( - checksum NVARCHAR(32) COLLATE database_default NOT NULL, - record_id BIGINT NOT NULL, - delta VARBINARY(MAX), - deltaOid NVARCHAR(36) COLLATE database_default, - deltaType INT, - fullResult VARBINARY(MAX), - objectName_norm NVARCHAR(255) COLLATE database_default, - objectName_orig NVARCHAR(255) COLLATE database_default, - resourceName_norm NVARCHAR(255) COLLATE database_default, - resourceName_orig NVARCHAR(255) COLLATE database_default, - resourceOid NVARCHAR(36) COLLATE database_default, - status INT, - PRIMARY KEY (record_id, checksum) -); -CREATE TABLE m_audit_event ( - id BIGINT IDENTITY NOT NULL, - attorneyName NVARCHAR(255) COLLATE database_default, - attorneyOid NVARCHAR(36) COLLATE database_default, - channel NVARCHAR(255) COLLATE database_default, - eventIdentifier NVARCHAR(255) COLLATE database_default, - eventStage INT, - eventType INT, - hostIdentifier NVARCHAR(255) COLLATE database_default, - initiatorName NVARCHAR(255) COLLATE database_default, - initiatorOid NVARCHAR(36) COLLATE database_default, - initiatorType INT, - message NVARCHAR(1024) COLLATE database_default, - nodeIdentifier NVARCHAR(255) COLLATE database_default, - outcome INT, - parameter NVARCHAR(255) COLLATE database_default, - remoteHostAddress NVARCHAR(255) COLLATE database_default, - result NVARCHAR(255) COLLATE database_default, - sessionIdentifier NVARCHAR(255) COLLATE database_default, - targetName NVARCHAR(255) COLLATE database_default, - targetOid NVARCHAR(36) COLLATE database_default, - targetOwnerName NVARCHAR(255) COLLATE database_default, - targetOwnerOid NVARCHAR(36) COLLATE database_default, - targetOwnerType INT, - targetType INT, - taskIdentifier NVARCHAR(255) COLLATE database_default, - taskOID NVARCHAR(255) COLLATE database_default, - timestampValue DATETIME2, - PRIMARY KEY (id) -); -CREATE TABLE m_audit_item ( - changedItemPath NVARCHAR(255) COLLATE database_default NOT NULL, - record_id BIGINT NOT NULL, - PRIMARY KEY (record_id, changedItemPath) -); -CREATE TABLE m_audit_prop_value ( - id BIGINT IDENTITY NOT NULL, - name NVARCHAR(255) COLLATE database_default, - record_id BIGINT, - value NVARCHAR(1024) COLLATE database_default, - PRIMARY KEY (id) -); -CREATE TABLE m_audit_ref_value ( - id BIGINT IDENTITY NOT NULL, - name NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default, - record_id BIGINT, - targetName_norm NVARCHAR(255) COLLATE database_default, - targetName_orig NVARCHAR(255) COLLATE database_default, - type NVARCHAR(255) COLLATE database_default, - PRIMARY KEY (id) -); -CREATE TABLE m_case_wi ( - id INT NOT NULL, - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - closeTimestamp DATETIME2, - deadline DATETIME2, - originalAssigneeRef_relation NVARCHAR(157) COLLATE database_default, - originalAssigneeRef_targetOid NVARCHAR(36) COLLATE database_default, - originalAssigneeRef_type INT, - outcome NVARCHAR(255) COLLATE database_default, - performerRef_relation NVARCHAR(157) COLLATE database_default, - performerRef_targetOid NVARCHAR(36) COLLATE database_default, - performerRef_type INT, - stageNumber INT, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_case_wi_reference ( - owner_id INT NOT NULL, - owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - relation NVARCHAR(157) COLLATE database_default NOT NULL, - targetOid NVARCHAR(36) COLLATE database_default NOT NULL, - targetType INT, - PRIMARY KEY (owner_owner_oid, owner_id, targetOid, relation) -); -CREATE TABLE m_connector_target_system ( - connector_oid NVARCHAR(36) COLLATE database_default NOT NULL, - targetSystemType NVARCHAR(255) COLLATE database_default -); -CREATE TABLE m_ext_item ( - id INT IDENTITY NOT NULL, - kind INT, - itemName NVARCHAR(157) COLLATE database_default, - itemType NVARCHAR(157) COLLATE database_default, - PRIMARY KEY (id) -); -CREATE TABLE m_focus_photo ( - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - photo VARBINARY(MAX), - PRIMARY KEY (owner_oid) -); -CREATE TABLE m_focus_policy_situation ( - focus_oid NVARCHAR(36) COLLATE database_default NOT NULL, - policySituation NVARCHAR(255) COLLATE database_default -); -CREATE TABLE m_object ( - oid NVARCHAR(36) COLLATE database_default NOT NULL, - booleansCount SMALLINT, - createChannel NVARCHAR(255) COLLATE database_default, - createTimestamp DATETIME2, - creatorRef_relation NVARCHAR(157) COLLATE database_default, - creatorRef_targetOid NVARCHAR(36) COLLATE database_default, - creatorRef_type INT, - datesCount SMALLINT, - fullObject VARBINARY(MAX), - lifecycleState NVARCHAR(255) COLLATE database_default, - longsCount SMALLINT, - modifierRef_relation NVARCHAR(157) COLLATE database_default, - modifierRef_targetOid NVARCHAR(36) COLLATE database_default, - modifierRef_type INT, - modifyChannel NVARCHAR(255) COLLATE database_default, - modifyTimestamp DATETIME2, - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - objectTypeClass INT, - polysCount SMALLINT, - referencesCount SMALLINT, - stringsCount SMALLINT, - tenantRef_relation NVARCHAR(157) COLLATE database_default, - tenantRef_targetOid NVARCHAR(36) COLLATE database_default, - tenantRef_type INT, - version INT NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_object_ext_boolean ( - item_id INT NOT NULL, - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - ownerType INT NOT NULL, - booleanValue BIT NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, booleanValue) -); -CREATE TABLE m_object_ext_date ( - item_id INT NOT NULL, - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - ownerType INT NOT NULL, - dateValue DATETIME2 NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, dateValue) -); -CREATE TABLE m_object_ext_long ( - item_id INT NOT NULL, - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - ownerType INT NOT NULL, - longValue BIGINT NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, longValue) -); -CREATE TABLE m_object_ext_poly ( - item_id INT NOT NULL, - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - ownerType INT NOT NULL, - orig NVARCHAR(255) COLLATE database_default NOT NULL, - norm NVARCHAR(255) COLLATE database_default, - PRIMARY KEY (owner_oid, ownerType, item_id, orig) -); -CREATE TABLE m_object_ext_reference ( - item_id INT NOT NULL, - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - ownerType INT NOT NULL, - targetoid NVARCHAR(36) COLLATE database_default NOT NULL, - relation NVARCHAR(157) COLLATE database_default, - targetType INT, - PRIMARY KEY (owner_oid, ownerType, item_id, targetoid) -); -CREATE TABLE m_object_ext_string ( - item_id INT NOT NULL, - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - ownerType INT NOT NULL, - stringValue NVARCHAR(255) COLLATE database_default NOT NULL, - PRIMARY KEY (owner_oid, ownerType, item_id, stringValue) -); -CREATE TABLE m_object_subtype ( - object_oid NVARCHAR(36) COLLATE database_default NOT NULL, - subtype NVARCHAR(255) COLLATE database_default -); -CREATE TABLE m_object_text_info ( - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - text NVARCHAR(255) COLLATE database_default NOT NULL, - PRIMARY KEY (owner_oid, text) -); -CREATE TABLE m_operation_execution ( - id INT NOT NULL, - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - initiatorRef_relation NVARCHAR(157) COLLATE database_default, - initiatorRef_targetOid NVARCHAR(36) COLLATE database_default, - initiatorRef_type INT, - status INT, - taskRef_relation NVARCHAR(157) COLLATE database_default, - taskRef_targetOid NVARCHAR(36) COLLATE database_default, - taskRef_type INT, - timestampValue DATETIME2, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_org_closure ( - ancestor_oid NVARCHAR(36) COLLATE database_default NOT NULL, - descendant_oid NVARCHAR(36) COLLATE database_default NOT NULL, - val INT, - PRIMARY KEY (ancestor_oid, descendant_oid) -); -CREATE TABLE m_org_org_type ( - org_oid NVARCHAR(36) COLLATE database_default NOT NULL, - orgType NVARCHAR(255) COLLATE database_default -); -CREATE TABLE m_reference ( - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - reference_type INT NOT NULL, - relation NVARCHAR(157) COLLATE database_default NOT NULL, - targetOid NVARCHAR(36) COLLATE database_default NOT NULL, - targetType INT, - PRIMARY KEY (owner_oid, reference_type, relation, targetOid) -); -CREATE TABLE m_service_type ( - service_oid NVARCHAR(36) COLLATE database_default NOT NULL, - serviceType NVARCHAR(255) COLLATE database_default -); -CREATE TABLE m_shadow ( - attemptNumber INT, - dead BIT, - exist BIT, - failedOperationType INT, - fullSynchronizationTimestamp DATETIME2, - intent NVARCHAR(255) COLLATE database_default, - kind INT, - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - objectClass NVARCHAR(157) COLLATE database_default, - pendingOperationCount INT, - resourceRef_relation NVARCHAR(157) COLLATE database_default, - resourceRef_targetOid NVARCHAR(36) COLLATE database_default, - resourceRef_type INT, - status INT, - synchronizationSituation INT, - synchronizationTimestamp DATETIME2, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_task ( - binding INT, - canRunOnNode NVARCHAR(255) COLLATE database_default, - category NVARCHAR(255) COLLATE database_default, - completionTimestamp DATETIME2, - executionStatus INT, - fullResult VARBINARY(MAX), - handlerUri NVARCHAR(255) COLLATE database_default, - lastRunFinishTimestamp DATETIME2, - lastRunStartTimestamp DATETIME2, - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - node NVARCHAR(255) COLLATE database_default, - objectRef_relation NVARCHAR(157) COLLATE database_default, - objectRef_targetOid NVARCHAR(36) COLLATE database_default, - objectRef_type INT, - ownerRef_relation NVARCHAR(157) COLLATE database_default, - ownerRef_targetOid NVARCHAR(36) COLLATE database_default, - ownerRef_type INT, - parent NVARCHAR(255) COLLATE database_default, - recurrence INT, - status INT, - taskIdentifier NVARCHAR(255) COLLATE database_default, - threadStopAction INT, - waitingReason INT, - wfEndTimestamp DATETIME2, - wfObjectRef_relation NVARCHAR(157) COLLATE database_default, - wfObjectRef_targetOid NVARCHAR(36) COLLATE database_default, - wfObjectRef_type INT, - wfProcessInstanceId NVARCHAR(255) COLLATE database_default, - wfRequesterRef_relation NVARCHAR(157) COLLATE database_default, - wfRequesterRef_targetOid NVARCHAR(36) COLLATE database_default, - wfRequesterRef_type INT, - wfStartTimestamp DATETIME2, - wfTargetRef_relation NVARCHAR(157) COLLATE database_default, - wfTargetRef_targetOid NVARCHAR(36) COLLATE database_default, - wfTargetRef_type INT, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_task_dependent ( - task_oid NVARCHAR(36) COLLATE database_default NOT NULL, - dependent NVARCHAR(255) COLLATE database_default -); -CREATE TABLE m_user_employee_type ( - user_oid NVARCHAR(36) COLLATE database_default NOT NULL, - employeeType NVARCHAR(255) COLLATE database_default -); -CREATE TABLE m_user_organization ( - user_oid NVARCHAR(36) COLLATE database_default NOT NULL, - norm NVARCHAR(255) COLLATE database_default, - orig NVARCHAR(255) COLLATE database_default -); -CREATE TABLE m_user_organizational_unit ( - user_oid NVARCHAR(36) COLLATE database_default NOT NULL, - norm NVARCHAR(255) COLLATE database_default, - orig NVARCHAR(255) COLLATE database_default -); -CREATE TABLE m_abstract_role ( - approvalProcess NVARCHAR(255) COLLATE database_default, - autoassign_enabled BIT, - displayName_norm NVARCHAR(255) COLLATE database_default, - displayName_orig NVARCHAR(255) COLLATE database_default, - identifier NVARCHAR(255) COLLATE database_default, - ownerRef_relation NVARCHAR(157) COLLATE database_default, - ownerRef_targetOid NVARCHAR(36) COLLATE database_default, - ownerRef_type INT, - requestable BIT, - riskLevel NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_case ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - objectRef_relation NVARCHAR(157) COLLATE database_default, - objectRef_targetOid NVARCHAR(36) COLLATE database_default, - objectRef_type INT, - state NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_connector ( - connectorBundle NVARCHAR(255) COLLATE database_default, - connectorHostRef_relation NVARCHAR(157) COLLATE database_default, - connectorHostRef_targetOid NVARCHAR(36) COLLATE database_default, - connectorHostRef_type INT, - connectorType NVARCHAR(255) COLLATE database_default, - connectorVersion NVARCHAR(255) COLLATE database_default, - framework NVARCHAR(255) COLLATE database_default, - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_connector_host ( - hostname NVARCHAR(255) COLLATE database_default, - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - port NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_focus ( - administrativeStatus INT, - archiveTimestamp DATETIME2, - disableReason NVARCHAR(255) COLLATE database_default, - disableTimestamp DATETIME2, - effectiveStatus INT, - enableTimestamp DATETIME2, - validFrom DATETIME2, - validTo DATETIME2, - validityChangeTimestamp DATETIME2, - validityStatus INT, - costCenter NVARCHAR(255) COLLATE database_default, - emailAddress NVARCHAR(255) COLLATE database_default, - hasPhoto BIT DEFAULT 0 NOT NULL, - locale NVARCHAR(255) COLLATE database_default, - locality_norm NVARCHAR(255) COLLATE database_default, - locality_orig NVARCHAR(255) COLLATE database_default, - preferredLanguage NVARCHAR(255) COLLATE database_default, - telephoneNumber NVARCHAR(255) COLLATE database_default, - timezone NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_form ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_function_library ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_generic_object ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - objectType NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_lookup_table ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_lookup_table_row ( - id INT NOT NULL, - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - row_key NVARCHAR(255) COLLATE database_default, - label_norm NVARCHAR(255) COLLATE database_default, - label_orig NVARCHAR(255) COLLATE database_default, - lastChangeTimestamp DATETIME2, - row_value NVARCHAR(255) COLLATE database_default, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_node ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - nodeIdentifier NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_object_template ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - type INT, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_org ( - displayOrder INT, - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - tenant BIT, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_report ( - export INT, - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - orientation INT, - parent BIT, - useHibernateSession BIT, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_report_output ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - reportRef_relation NVARCHAR(157) COLLATE database_default, - reportRef_targetOid NVARCHAR(36) COLLATE database_default, - reportRef_type INT, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_resource ( - administrativeState INT, - connectorRef_relation NVARCHAR(157) COLLATE database_default, - connectorRef_targetOid NVARCHAR(36) COLLATE database_default, - connectorRef_type INT, - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - o16_lastAvailabilityStatus INT, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_role ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - roleType NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_security_policy ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_sequence ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_service ( - displayOrder INT, - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_system_configuration ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_trigger ( - id INT NOT NULL, - owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, - handlerUri NVARCHAR(255) COLLATE database_default, - timestampValue DATETIME2, - PRIMARY KEY (owner_oid, id) -); -CREATE TABLE m_user ( - additionalName_norm NVARCHAR(255) COLLATE database_default, - additionalName_orig NVARCHAR(255) COLLATE database_default, - employeeNumber NVARCHAR(255) COLLATE database_default, - familyName_norm NVARCHAR(255) COLLATE database_default, - familyName_orig NVARCHAR(255) COLLATE database_default, - fullName_norm NVARCHAR(255) COLLATE database_default, - fullName_orig NVARCHAR(255) COLLATE database_default, - givenName_norm NVARCHAR(255) COLLATE database_default, - givenName_orig NVARCHAR(255) COLLATE database_default, - honorificPrefix_norm NVARCHAR(255) COLLATE database_default, - honorificPrefix_orig NVARCHAR(255) COLLATE database_default, - honorificSuffix_norm NVARCHAR(255) COLLATE database_default, - honorificSuffix_orig NVARCHAR(255) COLLATE database_default, - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - nickName_norm NVARCHAR(255) COLLATE database_default, - nickName_orig NVARCHAR(255) COLLATE database_default, - title_norm NVARCHAR(255) COLLATE database_default, - title_orig NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE TABLE m_value_policy ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); -CREATE INDEX iCertCampaignNameOrig - ON m_acc_cert_campaign (name_orig); -ALTER TABLE m_acc_cert_campaign - ADD CONSTRAINT uc_acc_cert_campaign_name UNIQUE (name_norm); -CREATE INDEX iCaseObjectRefTargetOid - ON m_acc_cert_case (objectRef_targetOid); -CREATE INDEX iCaseTargetRefTargetOid - ON m_acc_cert_case (targetRef_targetOid); -CREATE INDEX iCaseTenantRefTargetOid - ON m_acc_cert_case (tenantRef_targetOid); -CREATE INDEX iCaseOrgRefTargetOid - ON m_acc_cert_case (orgRef_targetOid); -CREATE INDEX iCertDefinitionNameOrig - ON m_acc_cert_definition (name_orig); -ALTER TABLE m_acc_cert_definition - ADD CONSTRAINT uc_acc_cert_definition_name UNIQUE (name_norm); -CREATE INDEX iCertWorkItemRefTargetOid - ON m_acc_cert_wi_reference (targetOid); -CREATE INDEX iAssignmentAdministrative - ON m_assignment (administrativeStatus); -CREATE INDEX iAssignmentEffective - ON m_assignment (effectiveStatus); -CREATE INDEX iAssignmentValidFrom - ON m_assignment (validFrom); -CREATE INDEX iAssignmentValidTo - ON m_assignment (validTo); -CREATE INDEX iTargetRefTargetOid - ON m_assignment (targetRef_targetOid); -CREATE INDEX iTenantRefTargetOid - ON m_assignment (tenantRef_targetOid); -CREATE INDEX iOrgRefTargetOid - ON m_assignment (orgRef_targetOid); -CREATE INDEX iResourceRefTargetOid - ON m_assignment (resourceRef_targetOid); -CREATE INDEX iAExtensionBoolean - ON m_assignment_ext_boolean (booleanValue); -CREATE INDEX iAExtensionDate - ON m_assignment_ext_date (dateValue); -CREATE INDEX iAExtensionLong - ON m_assignment_ext_long (longValue); -CREATE INDEX iAExtensionPolyString - ON m_assignment_ext_poly (orig); -CREATE INDEX iAExtensionReference - ON m_assignment_ext_reference (targetoid); -CREATE INDEX iAExtensionString - ON m_assignment_ext_string (stringValue); -CREATE INDEX iAssignmentReferenceTargetOid - ON m_assignment_reference (targetOid); -CREATE INDEX iAuditDeltaRecordId - ON m_audit_delta (record_id); -CREATE INDEX iTimestampValue - ON m_audit_event (timestampValue); -CREATE INDEX iChangedItemPath - ON m_audit_item (changedItemPath); -CREATE INDEX iAuditItemRecordId - ON m_audit_item (record_id); -CREATE INDEX iAuditPropValRecordId - ON m_audit_prop_value (record_id); -CREATE INDEX iAuditRefValRecordId - ON m_audit_ref_value (record_id); -CREATE INDEX iCaseWorkItemRefTargetOid - ON m_case_wi_reference (targetOid); - -ALTER TABLE m_ext_item - ADD CONSTRAINT iExtItemDefinition UNIQUE (itemName, itemType, kind); -CREATE INDEX iObjectNameOrig - ON m_object (name_orig); -CREATE INDEX iObjectNameNorm - ON m_object (name_norm); -CREATE INDEX iObjectTypeClass - ON m_object (objectTypeClass); -CREATE INDEX iObjectCreateTimestamp - ON m_object (createTimestamp); -CREATE INDEX iObjectLifecycleState - ON m_object (lifecycleState); -CREATE INDEX iExtensionBoolean - ON m_object_ext_boolean (booleanValue); -CREATE INDEX iExtensionDate - ON m_object_ext_date (dateValue); -CREATE INDEX iExtensionLong - ON m_object_ext_long (longValue); -CREATE INDEX iExtensionPolyString - ON m_object_ext_poly (orig); -CREATE INDEX iExtensionReference - ON m_object_ext_reference (targetoid); -CREATE INDEX iExtensionString - ON m_object_ext_string (stringValue); -CREATE INDEX iOpExecTaskOid - ON m_operation_execution (taskRef_targetOid); -CREATE INDEX iOpExecInitiatorOid - ON m_operation_execution (initiatorRef_targetOid); -CREATE INDEX iOpExecStatus - ON m_operation_execution (status); -CREATE INDEX iOpExecOwnerOid - ON m_operation_execution (owner_oid); -CREATE INDEX iAncestor - ON m_org_closure (ancestor_oid); -CREATE INDEX iDescendant - ON m_org_closure (descendant_oid); -CREATE INDEX iDescendantAncestor - ON m_org_closure (descendant_oid, ancestor_oid); -CREATE INDEX iReferenceTargetTypeRelation - ON m_reference (targetOid, reference_type, relation); -CREATE INDEX iShadowResourceRef - ON m_shadow (resourceRef_targetOid); -CREATE INDEX iShadowDead - ON m_shadow (dead); -CREATE INDEX iShadowKind - ON m_shadow (kind); -CREATE INDEX iShadowIntent - ON m_shadow (intent); -CREATE INDEX iShadowObjectClass - ON m_shadow (objectClass); -CREATE INDEX iShadowFailedOperationType - ON m_shadow (failedOperationType); -CREATE INDEX iShadowSyncSituation - ON m_shadow (synchronizationSituation); -CREATE INDEX iShadowPendingOperationCount - ON m_shadow (pendingOperationCount); -CREATE INDEX iShadowNameOrig - ON m_shadow (name_orig); -CREATE INDEX iShadowNameNorm - ON m_shadow (name_norm); -CREATE INDEX iParent - ON m_task (parent); -CREATE INDEX iTaskWfProcessInstanceId - ON m_task (wfProcessInstanceId); -CREATE INDEX iTaskWfStartTimestamp - ON m_task (wfStartTimestamp); -CREATE INDEX iTaskWfEndTimestamp - ON m_task (wfEndTimestamp); -CREATE INDEX iTaskWfRequesterOid - ON m_task (wfRequesterRef_targetOid); -CREATE INDEX iTaskWfObjectOid - ON m_task (wfObjectRef_targetOid); -CREATE INDEX iTaskWfTargetOid - ON m_task (wfTargetRef_targetOid); -CREATE INDEX iTaskNameOrig - ON m_task (name_orig); -ALTER TABLE m_task - ADD CONSTRAINT uc_task_identifier UNIQUE (taskIdentifier); -CREATE INDEX iAbstractRoleIdentifier - ON m_abstract_role (identifier); -CREATE INDEX iRequestable - ON m_abstract_role (requestable); -CREATE INDEX iAutoassignEnabled - ON m_abstract_role (autoassign_enabled); -CREATE INDEX iCaseNameOrig - ON m_case (name_orig); -ALTER TABLE m_case - ADD CONSTRAINT uc_case_name UNIQUE (name_norm); -CREATE INDEX iConnectorNameOrig - ON m_connector (name_orig); -CREATE INDEX iConnectorNameNorm - ON m_connector (name_norm); -CREATE INDEX iConnectorHostNameOrig - ON m_connector_host (name_orig); -ALTER TABLE m_connector_host - ADD CONSTRAINT uc_connector_host_name UNIQUE (name_norm); -CREATE INDEX iFocusAdministrative - ON m_focus (administrativeStatus); -CREATE INDEX iFocusEffective - ON m_focus (effectiveStatus); -CREATE INDEX iLocality - ON m_focus (locality_orig); -CREATE INDEX iFocusValidFrom - ON m_focus (validFrom); -CREATE INDEX iFocusValidTo - ON m_focus (validTo); -CREATE INDEX iFormNameOrig - ON m_form (name_orig); -ALTER TABLE m_form - ADD CONSTRAINT uc_form_name UNIQUE (name_norm); -CREATE INDEX iFunctionLibraryNameOrig - ON m_function_library (name_orig); -ALTER TABLE m_function_library - ADD CONSTRAINT uc_function_library_name UNIQUE (name_norm); -CREATE INDEX iGenericObjectNameOrig - ON m_generic_object (name_orig); -ALTER TABLE m_generic_object - ADD CONSTRAINT uc_generic_object_name UNIQUE (name_norm); -CREATE INDEX iLookupTableNameOrig - ON m_lookup_table (name_orig); -ALTER TABLE m_lookup_table - ADD CONSTRAINT uc_lookup_name UNIQUE (name_norm); -ALTER TABLE m_lookup_table_row - ADD CONSTRAINT uc_row_key UNIQUE (owner_oid, row_key); -CREATE INDEX iNodeNameOrig - ON m_node (name_orig); -ALTER TABLE m_node - ADD CONSTRAINT uc_node_name UNIQUE (name_norm); -CREATE INDEX iObjectTemplateNameOrig - ON m_object_template (name_orig); -ALTER TABLE m_object_template - ADD CONSTRAINT uc_object_template_name UNIQUE (name_norm); -CREATE INDEX iDisplayOrder - ON m_org (displayOrder); -CREATE INDEX iOrgNameOrig - ON m_org (name_orig); -ALTER TABLE m_org - ADD CONSTRAINT uc_org_name UNIQUE (name_norm); -CREATE INDEX iReportParent - ON m_report (parent); -CREATE INDEX iReportNameOrig - ON m_report (name_orig); -ALTER TABLE m_report - ADD CONSTRAINT uc_report_name UNIQUE (name_norm); -CREATE INDEX iReportOutputNameOrig - ON m_report_output (name_orig); -CREATE INDEX iReportOutputNameNorm - ON m_report_output (name_norm); -CREATE INDEX iResourceNameOrig - ON m_resource (name_orig); -ALTER TABLE m_resource - ADD CONSTRAINT uc_resource_name UNIQUE (name_norm); -CREATE INDEX iRoleNameOrig - ON m_role (name_orig); -ALTER TABLE m_role - ADD CONSTRAINT uc_role_name UNIQUE (name_norm); -CREATE INDEX iSecurityPolicyNameOrig - ON m_security_policy (name_orig); -ALTER TABLE m_security_policy - ADD CONSTRAINT uc_security_policy_name UNIQUE (name_norm); -CREATE INDEX iSequenceNameOrig - ON m_sequence (name_orig); -ALTER TABLE m_sequence - ADD CONSTRAINT uc_sequence_name UNIQUE (name_norm); -CREATE INDEX iServiceNameOrig - ON m_service (name_orig); -CREATE INDEX iServiceNameNorm - ON m_service (name_norm); -CREATE INDEX iSystemConfigurationNameOrig - ON m_system_configuration (name_orig); -ALTER TABLE m_system_configuration - ADD CONSTRAINT uc_system_configuration_name UNIQUE (name_norm); -CREATE INDEX iTriggerTimestamp - ON m_trigger (timestampValue); -CREATE INDEX iFullName - ON m_user (fullName_orig); -CREATE INDEX iFamilyName - ON m_user (familyName_orig); -CREATE INDEX iGivenName - ON m_user (givenName_orig); -CREATE INDEX iEmployeeNumber - ON m_user (employeeNumber); -CREATE INDEX iUserNameOrig - ON m_user (name_orig); -ALTER TABLE m_user - ADD CONSTRAINT uc_user_name UNIQUE (name_norm); -CREATE INDEX iValuePolicyNameOrig - ON m_value_policy (name_orig); -ALTER TABLE m_value_policy - ADD CONSTRAINT uc_value_policy_name UNIQUE (name_norm); -ALTER TABLE m_acc_cert_campaign - ADD CONSTRAINT fk_acc_cert_campaign FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_acc_cert_case - ADD CONSTRAINT fk_acc_cert_case_owner FOREIGN KEY (owner_oid) REFERENCES m_acc_cert_campaign; -ALTER TABLE m_acc_cert_definition - ADD CONSTRAINT fk_acc_cert_definition FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_acc_cert_wi - ADD CONSTRAINT fk_acc_cert_wi_owner FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_acc_cert_case; -ALTER TABLE m_acc_cert_wi_reference - ADD CONSTRAINT fk_acc_cert_wi_ref_owner FOREIGN KEY (owner_owner_owner_oid, owner_owner_id, owner_id) REFERENCES m_acc_cert_wi; -ALTER TABLE m_assignment - ADD CONSTRAINT fk_assignment_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_assignment_ext_boolean - ADD CONSTRAINT fk_a_ext_boolean_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_boolean - ADD CONSTRAINT fk_a_ext_boolean_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_date - ADD CONSTRAINT fk_a_ext_date_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_date - ADD CONSTRAINT fk_a_ext_date_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_long - ADD CONSTRAINT fk_a_ext_long_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_long - ADD CONSTRAINT fk_a_ext_long_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_poly - ADD CONSTRAINT fk_a_ext_poly_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_poly - ADD CONSTRAINT fk_a_ext_poly_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_reference - ADD CONSTRAINT fk_a_ext_reference_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_reference - ADD CONSTRAINT fk_a_ext_boolean_reference FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_ext_string - ADD CONSTRAINT fk_a_ext_string_owner FOREIGN KEY (anyContainer_owner_owner_oid, anyContainer_owner_id) REFERENCES m_assignment_extension; -ALTER TABLE m_assignment_ext_string - ADD CONSTRAINT fk_a_ext_string_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_assignment_policy_situation - ADD CONSTRAINT fk_assignment_policy_situation FOREIGN KEY (assignment_oid, assignment_id) REFERENCES m_assignment; -ALTER TABLE m_assignment_reference - ADD CONSTRAINT fk_assignment_reference FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_assignment; -ALTER TABLE m_audit_delta - ADD CONSTRAINT fk_audit_delta FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE m_audit_item - ADD CONSTRAINT fk_audit_item FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE m_audit_prop_value - ADD CONSTRAINT fk_audit_prop_value FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE m_audit_ref_value - ADD CONSTRAINT fk_audit_ref_value FOREIGN KEY (record_id) REFERENCES m_audit_event; -ALTER TABLE m_case_wi - ADD CONSTRAINT fk_case_wi_owner FOREIGN KEY (owner_oid) REFERENCES m_case; -ALTER TABLE m_case_wi_reference - ADD CONSTRAINT fk_case_wi_reference_owner FOREIGN KEY (owner_owner_oid, owner_id) REFERENCES m_case_wi; -ALTER TABLE m_connector_target_system - ADD CONSTRAINT fk_connector_target_system FOREIGN KEY (connector_oid) REFERENCES m_connector; -ALTER TABLE m_focus_photo - ADD CONSTRAINT fk_focus_photo FOREIGN KEY (owner_oid) REFERENCES m_focus; -ALTER TABLE m_focus_policy_situation - ADD CONSTRAINT fk_focus_policy_situation FOREIGN KEY (focus_oid) REFERENCES m_focus; -ALTER TABLE m_object_ext_boolean - ADD CONSTRAINT fk_o_ext_boolean_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_boolean - ADD CONSTRAINT fk_o_ext_boolean_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_date - ADD CONSTRAINT fk_o_ext_date_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_date - ADD CONSTRAINT fk_o_ext_date_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_long - ADD CONSTRAINT fk_object_ext_long FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_long - ADD CONSTRAINT fk_o_ext_long_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_poly - ADD CONSTRAINT fk_o_ext_poly_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_poly - ADD CONSTRAINT fk_o_ext_poly_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_reference - ADD CONSTRAINT fk_o_ext_reference_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_reference - ADD CONSTRAINT fk_o_ext_reference_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_ext_string - ADD CONSTRAINT fk_object_ext_string FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_object_ext_string - ADD CONSTRAINT fk_o_ext_string_item FOREIGN KEY (item_id) REFERENCES m_ext_item; -ALTER TABLE m_object_subtype - ADD CONSTRAINT fk_object_subtype FOREIGN KEY (object_oid) REFERENCES m_object; -ALTER TABLE m_object_text_info - ADD CONSTRAINT fk_object_text_info_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_operation_execution - ADD CONSTRAINT fk_op_exec_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_org_closure - ADD CONSTRAINT fk_ancestor FOREIGN KEY (ancestor_oid) REFERENCES m_object; -ALTER TABLE m_org_closure - ADD CONSTRAINT fk_descendant FOREIGN KEY (descendant_oid) REFERENCES m_object; -ALTER TABLE m_org_org_type - ADD CONSTRAINT fk_org_org_type FOREIGN KEY (org_oid) REFERENCES m_org; -ALTER TABLE m_reference - ADD CONSTRAINT fk_reference_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_service_type - ADD CONSTRAINT fk_service_type FOREIGN KEY (service_oid) REFERENCES m_service; -ALTER TABLE m_shadow - ADD CONSTRAINT fk_shadow FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_task - ADD CONSTRAINT fk_task FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_task_dependent - ADD CONSTRAINT fk_task_dependent FOREIGN KEY (task_oid) REFERENCES m_task; -ALTER TABLE m_user_employee_type - ADD CONSTRAINT fk_user_employee_type FOREIGN KEY (user_oid) REFERENCES m_user; -ALTER TABLE m_user_organization - ADD CONSTRAINT fk_user_organization FOREIGN KEY (user_oid) REFERENCES m_user; -ALTER TABLE m_user_organizational_unit - ADD CONSTRAINT fk_user_org_unit FOREIGN KEY (user_oid) REFERENCES m_user; -ALTER TABLE m_abstract_role - ADD CONSTRAINT fk_abstract_role FOREIGN KEY (oid) REFERENCES m_focus; -ALTER TABLE m_case - ADD CONSTRAINT fk_case FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_connector - ADD CONSTRAINT fk_connector FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_connector_host - ADD CONSTRAINT fk_connector_host FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_focus - ADD CONSTRAINT fk_focus FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_form - ADD CONSTRAINT fk_form FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_function_library - ADD CONSTRAINT fk_function_library FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_generic_object - ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_lookup_table - ADD CONSTRAINT fk_lookup_table FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_lookup_table_row - ADD CONSTRAINT fk_lookup_table_owner FOREIGN KEY (owner_oid) REFERENCES m_lookup_table; -ALTER TABLE m_node - ADD CONSTRAINT fk_node FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_object_template - ADD CONSTRAINT fk_object_template FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_org - ADD CONSTRAINT fk_org FOREIGN KEY (oid) REFERENCES m_abstract_role; -ALTER TABLE m_report - ADD CONSTRAINT fk_report FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_report_output - ADD CONSTRAINT fk_report_output FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_resource - ADD CONSTRAINT fk_resource FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_role - ADD CONSTRAINT fk_role FOREIGN KEY (oid) REFERENCES m_abstract_role; -ALTER TABLE m_security_policy - ADD CONSTRAINT fk_security_policy FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_sequence - ADD CONSTRAINT fk_sequence FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_service - ADD CONSTRAINT fk_service FOREIGN KEY (oid) REFERENCES m_abstract_role; -ALTER TABLE m_system_configuration - ADD CONSTRAINT fk_system_configuration FOREIGN KEY (oid) REFERENCES m_object; -ALTER TABLE m_trigger - ADD CONSTRAINT fk_trigger_owner FOREIGN KEY (owner_oid) REFERENCES m_object; -ALTER TABLE m_user - ADD CONSTRAINT fk_user FOREIGN KEY (oid) REFERENCES m_focus; -ALTER TABLE m_value_policy - ADD CONSTRAINT fk_value_policy FOREIGN KEY (oid) REFERENCES m_object; - ---# thanks to George Papastamatopoulos for submitting this ... and Marko Lahma for ---# updating it. ---# ---# In your Quartz properties file, you'll need to set ---# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.MSSQLDelegate ---# ---# you shouse enter your DB instance's name on the next line in place of "enter_db_name_here" ---# ---# ---# From a helpful (but anonymous) Quartz user: ---# ---# Regarding this error message: ---# ---# [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode. ---# ---# ---# I added "SelectMethod=cursor;" to my Connection URL in the config file. ---# It Seems to work, hopefully no side effects. ---# ---# example: ---# "jdbc:microsoft:sqlserver://dbmachine:1433;SelectMethod=cursor"; ---# ---# Another user has pointed out that you will probably need to use the ---# JTDS driver ---# ---# ---# USE [enter_db_name_here] ---# GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1) -ALTER TABLE [dbo].[QRTZ_TRIGGERS] DROP CONSTRAINT FK_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1) -ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] DROP CONSTRAINT FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1) -ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] DROP CONSTRAINT FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_SIMPROP_TRIGGERS_QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1) -ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] DROP CONSTRAINT FK_QRTZ_SIMPROP_TRIGGERS_QRTZ_TRIGGERS; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_CALENDARS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_CALENDARS]; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_CRON_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_CRON_TRIGGERS]; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_BLOB_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_BLOB_TRIGGERS]; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_FIRED_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_FIRED_TRIGGERS]; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_PAUSED_TRIGGER_GRPS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS]; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SCHEDULER_STATE]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_SCHEDULER_STATE]; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_LOCKS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_LOCKS]; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_JOB_DETAILS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_JOB_DETAILS]; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SIMPLE_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS]; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SIMPROP_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS]; --- GO - -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_TRIGGERS]; --- GO - -CREATE TABLE [dbo].[QRTZ_CALENDARS] ( - [SCHED_NAME] [VARCHAR] (120) NOT NULL , - [CALENDAR_NAME] [VARCHAR] (200) NOT NULL , - [CALENDAR] [IMAGE] NOT NULL -) ON [PRIMARY]; --- GO - -CREATE TABLE [dbo].[QRTZ_CRON_TRIGGERS] ( - [SCHED_NAME] [VARCHAR] (120) NOT NULL , - [TRIGGER_NAME] [VARCHAR] (200) NOT NULL , - [TRIGGER_GROUP] [VARCHAR] (200) NOT NULL , - [CRON_EXPRESSION] [VARCHAR] (120) NOT NULL , - [TIME_ZONE_ID] [VARCHAR] (80) -) ON [PRIMARY]; --- GO - -CREATE TABLE [dbo].[QRTZ_FIRED_TRIGGERS] ( - [SCHED_NAME] [VARCHAR] (120) NOT NULL , - [ENTRY_ID] [VARCHAR] (95) NOT NULL , - [TRIGGER_NAME] [VARCHAR] (200) NOT NULL , - [TRIGGER_GROUP] [VARCHAR] (200) NOT NULL , - [INSTANCE_NAME] [VARCHAR] (200) NOT NULL , - [FIRED_TIME] [BIGINT] NOT NULL , - [SCHED_TIME] [BIGINT] NOT NULL , - [PRIORITY] [INTEGER] NOT NULL , - [EXECUTION_GROUP] [VARCHAR] (200) NULL , - [STATE] [VARCHAR] (16) NOT NULL, - [JOB_NAME] [VARCHAR] (200) NULL , - [JOB_GROUP] [VARCHAR] (200) NULL , - [IS_NONCONCURRENT] [VARCHAR] (1) NULL , - [REQUESTS_RECOVERY] [VARCHAR] (1) NULL -) ON [PRIMARY]; --- GO - -CREATE TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] ( - [SCHED_NAME] [VARCHAR] (120) NOT NULL , - [TRIGGER_GROUP] [VARCHAR] (200) NOT NULL -) ON [PRIMARY]; --- GO - -CREATE TABLE [dbo].[QRTZ_SCHEDULER_STATE] ( - [SCHED_NAME] [VARCHAR] (120) NOT NULL , - [INSTANCE_NAME] [VARCHAR] (200) NOT NULL , - [LAST_CHECKIN_TIME] [BIGINT] NOT NULL , - [CHECKIN_INTERVAL] [BIGINT] NOT NULL -) ON [PRIMARY]; --- GO - -CREATE TABLE [dbo].[QRTZ_LOCKS] ( - [SCHED_NAME] [VARCHAR] (120) NOT NULL , - [LOCK_NAME] [VARCHAR] (40) NOT NULL -) ON [PRIMARY]; --- GO - -CREATE TABLE [dbo].[QRTZ_JOB_DETAILS] ( - [SCHED_NAME] [VARCHAR] (120) NOT NULL , - [JOB_NAME] [VARCHAR] (200) NOT NULL , - [JOB_GROUP] [VARCHAR] (200) NOT NULL , - [DESCRIPTION] [VARCHAR] (250) NULL , - [JOB_CLASS_NAME] [VARCHAR] (250) NOT NULL , - [IS_DURABLE] [VARCHAR] (1) NOT NULL , - [IS_NONCONCURRENT] [VARCHAR] (1) NOT NULL , - [IS_UPDATE_DATA] [VARCHAR] (1) NOT NULL , - [REQUESTS_RECOVERY] [VARCHAR] (1) NOT NULL , - [JOB_DATA] [IMAGE] NULL -) ON [PRIMARY]; --- GO - -CREATE TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ( - [SCHED_NAME] [VARCHAR] (120) NOT NULL , - [TRIGGER_NAME] [VARCHAR] (200) NOT NULL , - [TRIGGER_GROUP] [VARCHAR] (200) NOT NULL , - [REPEAT_COUNT] [BIGINT] NOT NULL , - [REPEAT_INTERVAL] [BIGINT] NOT NULL , - [TIMES_TRIGGERED] [BIGINT] NOT NULL -) ON [PRIMARY]; --- GO - -CREATE TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ( - [SCHED_NAME] [VARCHAR] (120) NOT NULL , - [TRIGGER_NAME] [VARCHAR] (200) NOT NULL , - [TRIGGER_GROUP] [VARCHAR] (200) NOT NULL , - [STR_PROP_1] [VARCHAR] (512) NULL, - [STR_PROP_2] [VARCHAR] (512) NULL, - [STR_PROP_3] [VARCHAR] (512) NULL, - [INT_PROP_1] [INT] NULL, - [INT_PROP_2] [INT] NULL, - [LONG_PROP_1] [BIGINT] NULL, - [LONG_PROP_2] [BIGINT] NULL, - [DEC_PROP_1] [NUMERIC] (13,4) NULL, - [DEC_PROP_2] [NUMERIC] (13,4) NULL, - [BOOL_PROP_1] [VARCHAR] (1) NULL, - [BOOL_PROP_2] [VARCHAR] (1) NULL, -) ON [PRIMARY]; --- GO - -CREATE TABLE [dbo].[QRTZ_BLOB_TRIGGERS] ( - [SCHED_NAME] [VARCHAR] (120) NOT NULL , - [TRIGGER_NAME] [VARCHAR] (200) NOT NULL , - [TRIGGER_GROUP] [VARCHAR] (200) NOT NULL , - [BLOB_DATA] [IMAGE] NULL -) ON [PRIMARY]; --- GO - -CREATE TABLE [dbo].[QRTZ_TRIGGERS] ( - [SCHED_NAME] [VARCHAR] (120) NOT NULL , - [TRIGGER_NAME] [VARCHAR] (200) NOT NULL , - [TRIGGER_GROUP] [VARCHAR] (200) NOT NULL , - [JOB_NAME] [VARCHAR] (200) NOT NULL , - [JOB_GROUP] [VARCHAR] (200) NOT NULL , - [DESCRIPTION] [VARCHAR] (250) NULL , - [NEXT_FIRE_TIME] [BIGINT] NULL , - [PREV_FIRE_TIME] [BIGINT] NULL , - [PRIORITY] [INTEGER] NULL , - [EXECUTION_GROUP] [VARCHAR] (200) NULL , - [TRIGGER_STATE] [VARCHAR] (16) NOT NULL , - [TRIGGER_TYPE] [VARCHAR] (8) NOT NULL , - [START_TIME] [BIGINT] NOT NULL , - [END_TIME] [BIGINT] NULL , - [CALENDAR_NAME] [VARCHAR] (200) NULL , - [MISFIRE_INSTR] [SMALLINT] NULL , - [JOB_DATA] [IMAGE] NULL -) ON [PRIMARY]; --- GO - -ALTER TABLE [dbo].[QRTZ_CALENDARS] WITH NOCHECK ADD - CONSTRAINT [PK_QRTZ_CALENDARS] PRIMARY KEY CLUSTERED - ( - [SCHED_NAME], - [CALENDAR_NAME] - ) ON [PRIMARY]; --- GO - -ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] WITH NOCHECK ADD - CONSTRAINT [PK_QRTZ_CRON_TRIGGERS] PRIMARY KEY CLUSTERED - ( - [SCHED_NAME], - [TRIGGER_NAME], - [TRIGGER_GROUP] - ) ON [PRIMARY]; --- GO - -ALTER TABLE [dbo].[QRTZ_FIRED_TRIGGERS] WITH NOCHECK ADD - CONSTRAINT [PK_QRTZ_FIRED_TRIGGERS] PRIMARY KEY CLUSTERED - ( - [SCHED_NAME], - [ENTRY_ID] - ) ON [PRIMARY]; --- GO - -ALTER TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] WITH NOCHECK ADD - CONSTRAINT [PK_QRTZ_PAUSED_TRIGGER_GRPS] PRIMARY KEY CLUSTERED - ( - [SCHED_NAME], - [TRIGGER_GROUP] - ) ON [PRIMARY]; --- GO - -ALTER TABLE [dbo].[QRTZ_SCHEDULER_STATE] WITH NOCHECK ADD - CONSTRAINT [PK_QRTZ_SCHEDULER_STATE] PRIMARY KEY CLUSTERED - ( - [SCHED_NAME], - [INSTANCE_NAME] - ) ON [PRIMARY]; --- GO - -ALTER TABLE [dbo].[QRTZ_LOCKS] WITH NOCHECK ADD - CONSTRAINT [PK_QRTZ_LOCKS] PRIMARY KEY CLUSTERED - ( - [SCHED_NAME], - [LOCK_NAME] - ) ON [PRIMARY]; --- GO - -ALTER TABLE [dbo].[QRTZ_JOB_DETAILS] WITH NOCHECK ADD - CONSTRAINT [PK_QRTZ_JOB_DETAILS] PRIMARY KEY CLUSTERED - ( - [SCHED_NAME], - [JOB_NAME], - [JOB_GROUP] - ) ON [PRIMARY]; --- GO - -ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] WITH NOCHECK ADD - CONSTRAINT [PK_QRTZ_SIMPLE_TRIGGERS] PRIMARY KEY CLUSTERED - ( - [SCHED_NAME], - [TRIGGER_NAME], - [TRIGGER_GROUP] - ) ON [PRIMARY]; --- GO - -ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] WITH NOCHECK ADD - CONSTRAINT [PK_QRTZ_SIMPROP_TRIGGERS] PRIMARY KEY CLUSTERED - ( - [SCHED_NAME], - [TRIGGER_NAME], - [TRIGGER_GROUP] - ) ON [PRIMARY]; --- GO - -ALTER TABLE [dbo].[QRTZ_TRIGGERS] WITH NOCHECK ADD - CONSTRAINT [PK_QRTZ_TRIGGERS] PRIMARY KEY CLUSTERED - ( - [SCHED_NAME], - [TRIGGER_NAME], - [TRIGGER_GROUP] - ) ON [PRIMARY]; --- GO - -ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] ADD - CONSTRAINT [FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY - ( - [SCHED_NAME], - [TRIGGER_NAME], - [TRIGGER_GROUP] - ) REFERENCES [dbo].[QRTZ_TRIGGERS] ( - [SCHED_NAME], - [TRIGGER_NAME], - [TRIGGER_GROUP] - ) ON DELETE CASCADE; --- GO - -ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ADD - CONSTRAINT [FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY - ( - [SCHED_NAME], - [TRIGGER_NAME], - [TRIGGER_GROUP] - ) REFERENCES [dbo].[QRTZ_TRIGGERS] ( - [SCHED_NAME], - [TRIGGER_NAME], - [TRIGGER_GROUP] - ) ON DELETE CASCADE; --- GO - -ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ADD - CONSTRAINT [FK_QRTZ_SIMPROP_TRIGGERS_QRTZ_TRIGGERS] FOREIGN KEY - ( - [SCHED_NAME], - [TRIGGER_NAME], - [TRIGGER_GROUP] - ) REFERENCES [dbo].[QRTZ_TRIGGERS] ( - [SCHED_NAME], - [TRIGGER_NAME], - [TRIGGER_GROUP] - ) ON DELETE CASCADE; --- GO - -ALTER TABLE [dbo].[QRTZ_TRIGGERS] ADD - CONSTRAINT [FK_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS] FOREIGN KEY - ( - [SCHED_NAME], - [JOB_NAME], - [JOB_GROUP] - ) REFERENCES [dbo].[QRTZ_JOB_DETAILS] ( - [SCHED_NAME], - [JOB_NAME], - [JOB_GROUP] - ); --- GO; - -create table ACT_GE_PROPERTY ( - NAME_ nvarchar(64), - VALUE_ nvarchar(300), - REV_ int, - primary key (NAME_) -); - -insert into ACT_GE_PROPERTY -values ('schema.version', '5.22.0.0', 1); - -insert into ACT_GE_PROPERTY -values ('schema.history', 'create(5.22.0.0)', 1); - -insert into ACT_GE_PROPERTY -values ('next.dbid', '1', 1); - -create table ACT_GE_BYTEARRAY ( - ID_ nvarchar(64), - REV_ int, - NAME_ nvarchar(255), - DEPLOYMENT_ID_ nvarchar(64), - BYTES_ varbinary(max), - GENERATED_ tinyint, - primary key (ID_) -); - -create table ACT_RE_DEPLOYMENT ( - ID_ nvarchar(64), - NAME_ nvarchar(255), - CATEGORY_ nvarchar(255), - TENANT_ID_ nvarchar(255) default '', - DEPLOY_TIME_ datetime, - primary key (ID_) -); - -create table ACT_RE_MODEL ( - ID_ nvarchar(64) not null, - REV_ int, - NAME_ nvarchar(255), - KEY_ nvarchar(255), - CATEGORY_ nvarchar(255), - CREATE_TIME_ datetime, - LAST_UPDATE_TIME_ datetime, - VERSION_ int, - META_INFO_ nvarchar(4000), - DEPLOYMENT_ID_ nvarchar(64), - EDITOR_SOURCE_VALUE_ID_ nvarchar(64), - EDITOR_SOURCE_EXTRA_VALUE_ID_ nvarchar(64), - TENANT_ID_ nvarchar(255) default '', - primary key (ID_) -); - -create table ACT_RU_EXECUTION ( - ID_ nvarchar(64), - REV_ int, - PROC_INST_ID_ nvarchar(64), - BUSINESS_KEY_ nvarchar(255), - PARENT_ID_ nvarchar(64), - PROC_DEF_ID_ nvarchar(64), - SUPER_EXEC_ nvarchar(64), - ACT_ID_ nvarchar(255), - IS_ACTIVE_ tinyint, - IS_CONCURRENT_ tinyint, - IS_SCOPE_ tinyint, - IS_EVENT_SCOPE_ tinyint, - SUSPENSION_STATE_ tinyint, - CACHED_ENT_STATE_ int, - TENANT_ID_ nvarchar(255) default '', - NAME_ nvarchar(255), - LOCK_TIME_ datetime, - primary key (ID_) -); - -create table ACT_RU_JOB ( - ID_ nvarchar(64) NOT NULL, - REV_ int, - TYPE_ nvarchar(255) NOT NULL, - LOCK_EXP_TIME_ datetime, - LOCK_OWNER_ nvarchar(255), - EXCLUSIVE_ bit, - EXECUTION_ID_ nvarchar(64), - PROCESS_INSTANCE_ID_ nvarchar(64), - PROC_DEF_ID_ nvarchar(64), - RETRIES_ int, - EXCEPTION_STACK_ID_ nvarchar(64), - EXCEPTION_MSG_ nvarchar(4000), - DUEDATE_ datetime NULL, - REPEAT_ nvarchar(255), - HANDLER_TYPE_ nvarchar(255), - HANDLER_CFG_ nvarchar(4000), - TENANT_ID_ nvarchar(255) default '', - primary key (ID_) -); - -create table ACT_RE_PROCDEF ( - ID_ nvarchar(64) not null, - REV_ int, - CATEGORY_ nvarchar(255), - NAME_ nvarchar(255), - KEY_ nvarchar(255) not null, - VERSION_ int not null, - DEPLOYMENT_ID_ nvarchar(64), - RESOURCE_NAME_ nvarchar(4000), - DGRM_RESOURCE_NAME_ nvarchar(4000), - DESCRIPTION_ nvarchar(4000), - HAS_START_FORM_KEY_ tinyint, - HAS_GRAPHICAL_NOTATION_ tinyint, - SUSPENSION_STATE_ tinyint, - TENANT_ID_ nvarchar(255) default '', - primary key (ID_) -); - -create table ACT_RU_TASK ( - ID_ nvarchar(64), - REV_ int, - EXECUTION_ID_ nvarchar(64), - PROC_INST_ID_ nvarchar(64), - PROC_DEF_ID_ nvarchar(64), - NAME_ nvarchar(255), - PARENT_TASK_ID_ nvarchar(64), - DESCRIPTION_ nvarchar(4000), - TASK_DEF_KEY_ nvarchar(255), - OWNER_ nvarchar(255), - ASSIGNEE_ nvarchar(255), - DELEGATION_ nvarchar(64), - PRIORITY_ int, - CREATE_TIME_ datetime, - DUE_DATE_ datetime, - CATEGORY_ nvarchar(255), - SUSPENSION_STATE_ int, - TENANT_ID_ nvarchar(255) default '', - FORM_KEY_ nvarchar(255), - primary key (ID_) -); - -create table ACT_RU_IDENTITYLINK ( - ID_ nvarchar(64), - REV_ int, - GROUP_ID_ nvarchar(255), - TYPE_ nvarchar(255), - USER_ID_ nvarchar(255), - TASK_ID_ nvarchar(64), - PROC_INST_ID_ nvarchar(64), - PROC_DEF_ID_ nvarchar(64), - primary key (ID_) -); - -create table ACT_RU_VARIABLE ( - ID_ nvarchar(64) not null, - REV_ int, - TYPE_ nvarchar(255) not null, - NAME_ nvarchar(255) not null, - EXECUTION_ID_ nvarchar(64), - PROC_INST_ID_ nvarchar(64), - TASK_ID_ nvarchar(64), - BYTEARRAY_ID_ nvarchar(64), - DOUBLE_ double precision, - LONG_ numeric(19,0), - TEXT_ nvarchar(4000), - TEXT2_ nvarchar(4000), - primary key (ID_) -); - -create table ACT_RU_EVENT_SUBSCR ( - ID_ nvarchar(64) not null, - REV_ int, - EVENT_TYPE_ nvarchar(255) not null, - EVENT_NAME_ nvarchar(255), - EXECUTION_ID_ nvarchar(64), - PROC_INST_ID_ nvarchar(64), - ACTIVITY_ID_ nvarchar(64), - CONFIGURATION_ nvarchar(255), - CREATED_ datetime not null, - PROC_DEF_ID_ nvarchar(64), - TENANT_ID_ nvarchar(255) default '', - primary key (ID_) -); - -create table ACT_EVT_LOG ( - LOG_NR_ numeric(19,0) IDENTITY(1,1), - TYPE_ nvarchar(64), - PROC_DEF_ID_ nvarchar(64), - PROC_INST_ID_ nvarchar(64), - EXECUTION_ID_ nvarchar(64), - TASK_ID_ nvarchar(64), - TIME_STAMP_ datetime not null, - USER_ID_ nvarchar(255), - DATA_ varbinary(max), - LOCK_OWNER_ nvarchar(255), - LOCK_TIME_ datetime null, - IS_PROCESSED_ tinyint default 0, - primary key (LOG_NR_) -); - -create table ACT_PROCDEF_INFO ( - ID_ nvarchar(64) not null, - PROC_DEF_ID_ nvarchar(64) not null, - REV_ int, - INFO_JSON_ID_ nvarchar(64), - primary key (ID_) -); - -create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_); -create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_); -create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_); -create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_); -create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_); -create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_); -create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_); -create index ACT_IDX_EXECUTION_PROC on ACT_RU_EXECUTION(PROC_DEF_ID_); -create index ACT_IDX_EXECUTION_PARENT on ACT_RU_EXECUTION(PARENT_ID_); -create index ACT_IDX_EXECUTION_SUPER on ACT_RU_EXECUTION(SUPER_EXEC_); -create index ACT_IDX_EXECUTION_IDANDREV on ACT_RU_EXECUTION(ID_, REV_); -create index ACT_IDX_VARIABLE_BA on ACT_RU_VARIABLE(BYTEARRAY_ID_); -create index ACT_IDX_VARIABLE_EXEC on ACT_RU_VARIABLE(EXECUTION_ID_); -create index ACT_IDX_VARIABLE_PROCINST on ACT_RU_VARIABLE(PROC_INST_ID_); -create index ACT_IDX_IDENT_LNK_TASK on ACT_RU_IDENTITYLINK(TASK_ID_); -create index ACT_IDX_IDENT_LNK_PROCINST on ACT_RU_IDENTITYLINK(PROC_INST_ID_); -create index ACT_IDX_TASK_EXEC on ACT_RU_TASK(EXECUTION_ID_); -create index ACT_IDX_TASK_PROCINST on ACT_RU_TASK(PROC_INST_ID_); -create index ACT_IDX_EXEC_PROC_INST_ID on ACT_RU_EXECUTION(PROC_INST_ID_); -create index ACT_IDX_TASK_PROC_DEF_ID on ACT_RU_TASK(PROC_DEF_ID_); -create index ACT_IDX_EVENT_SUBSCR_EXEC_ID on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_); -create index ACT_IDX_JOB_EXCEPTION_STACK_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_); -create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_); - -alter table ACT_GE_BYTEARRAY - add constraint ACT_FK_BYTEARR_DEPL - foreign key (DEPLOYMENT_ID_) - references ACT_RE_DEPLOYMENT (ID_); - -alter table ACT_RE_PROCDEF - add constraint ACT_UNIQ_PROCDEF - unique (KEY_,VERSION_, TENANT_ID_); - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PARENT - foreign key (PARENT_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_SUPER - foreign key (SUPER_EXEC_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_EXECUTION - add constraint ACT_FK_EXE_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_TSKASS_TASK - foreign key (TASK_ID_) - references ACT_RU_TASK (ID_); - -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_ATHRZ_PROCEDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -alter table ACT_RU_IDENTITYLINK - add constraint ACT_FK_IDL_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_EXE - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_TASK - add constraint ACT_FK_TASK_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_EXE - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION (ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_PROCINST - foreign key (PROC_INST_ID_) - references ACT_RU_EXECUTION(ID_); - -alter table ACT_RU_VARIABLE - add constraint ACT_FK_VAR_BYTEARRAY - foreign key (BYTEARRAY_ID_) - references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RU_JOB - add constraint ACT_FK_JOB_EXCEPTION - foreign key (EXCEPTION_STACK_ID_) - references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RU_EVENT_SUBSCR - add constraint ACT_FK_EVENT_EXEC - foreign key (EXECUTION_ID_) - references ACT_RU_EXECUTION(ID_); - -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_SOURCE - foreign key (EDITOR_SOURCE_VALUE_ID_) - references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_SOURCE_EXTRA - foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) - references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_RE_MODEL - add constraint ACT_FK_MODEL_DEPLOYMENT - foreign key (DEPLOYMENT_ID_) - references ACT_RE_DEPLOYMENT (ID_); - -alter table ACT_PROCDEF_INFO - add constraint ACT_FK_INFO_JSON_BA - foreign key (INFO_JSON_ID_) - references ACT_GE_BYTEARRAY (ID_); - -alter table ACT_PROCDEF_INFO - add constraint ACT_FK_INFO_PROCDEF - foreign key (PROC_DEF_ID_) - references ACT_RE_PROCDEF (ID_); - -alter table ACT_PROCDEF_INFO - add constraint ACT_UNIQ_INFO_PROCDEF - unique (PROC_DEF_ID_); - -create table ACT_HI_PROCINST ( - ID_ nvarchar(64) not null, - PROC_INST_ID_ nvarchar(64) not null, - BUSINESS_KEY_ nvarchar(255), - PROC_DEF_ID_ nvarchar(64) not null, - START_TIME_ datetime not null, - END_TIME_ datetime, - DURATION_ numeric(19,0), - START_USER_ID_ nvarchar(255), - START_ACT_ID_ nvarchar(255), - END_ACT_ID_ nvarchar(255), - SUPER_PROCESS_INSTANCE_ID_ nvarchar(64), - DELETE_REASON_ nvarchar(4000), - TENANT_ID_ nvarchar(255) default '', - NAME_ nvarchar(255), - primary key (ID_), - unique (PROC_INST_ID_) -); - -create table ACT_HI_ACTINST ( - ID_ nvarchar(64) not null, - PROC_DEF_ID_ nvarchar(64) not null, - PROC_INST_ID_ nvarchar(64) not null, - EXECUTION_ID_ nvarchar(64) not null, - ACT_ID_ nvarchar(255) not null, - TASK_ID_ nvarchar(64), - CALL_PROC_INST_ID_ nvarchar(64), - ACT_NAME_ nvarchar(255), - ACT_TYPE_ nvarchar(255) not null, - ASSIGNEE_ nvarchar(255), - START_TIME_ datetime not null, - END_TIME_ datetime, - DURATION_ numeric(19,0), - TENANT_ID_ nvarchar(255) default '', - primary key (ID_) -); - -create table ACT_HI_TASKINST ( - ID_ nvarchar(64) not null, - PROC_DEF_ID_ nvarchar(64), - TASK_DEF_KEY_ nvarchar(255), - PROC_INST_ID_ nvarchar(64), - EXECUTION_ID_ nvarchar(64), - NAME_ nvarchar(255), - PARENT_TASK_ID_ nvarchar(64), - DESCRIPTION_ nvarchar(4000), - OWNER_ nvarchar(255), - ASSIGNEE_ nvarchar(255), - START_TIME_ datetime not null, - CLAIM_TIME_ datetime, - END_TIME_ datetime, - DURATION_ numeric(19,0), - DELETE_REASON_ nvarchar(4000), - PRIORITY_ int, - DUE_DATE_ datetime, - FORM_KEY_ nvarchar(255), - CATEGORY_ nvarchar(255), - TENANT_ID_ nvarchar(255) default '', - primary key (ID_) -); - -create table ACT_HI_VARINST ( - ID_ nvarchar(64) not null, - PROC_INST_ID_ nvarchar(64), - EXECUTION_ID_ nvarchar(64), - TASK_ID_ nvarchar(64), - NAME_ nvarchar(255) not null, - VAR_TYPE_ nvarchar(100), - REV_ int, - BYTEARRAY_ID_ nvarchar(64), - DOUBLE_ double precision, - LONG_ numeric(19,0), - TEXT_ nvarchar(4000), - TEXT2_ nvarchar(4000), - CREATE_TIME_ datetime, - LAST_UPDATED_TIME_ datetime, - primary key (ID_) -); - -create table ACT_HI_DETAIL ( - ID_ nvarchar(64) not null, - TYPE_ nvarchar(255) not null, - PROC_INST_ID_ nvarchar(64), - EXECUTION_ID_ nvarchar(64), - TASK_ID_ nvarchar(64), - ACT_INST_ID_ nvarchar(64), - NAME_ nvarchar(255) not null, - VAR_TYPE_ nvarchar(255), - REV_ int, - TIME_ datetime not null, - BYTEARRAY_ID_ nvarchar(64), - DOUBLE_ double precision, - LONG_ numeric(19,0), - TEXT_ nvarchar(4000), - TEXT2_ nvarchar(4000), - primary key (ID_) -); - -create table ACT_HI_COMMENT ( - ID_ nvarchar(64) not null, - TYPE_ nvarchar(255), - TIME_ datetime not null, - USER_ID_ nvarchar(255), - TASK_ID_ nvarchar(64), - PROC_INST_ID_ nvarchar(64), - ACTION_ nvarchar(255), - MESSAGE_ nvarchar(4000), - FULL_MSG_ varbinary(max), - primary key (ID_) -); - -create table ACT_HI_ATTACHMENT ( - ID_ nvarchar(64) not null, - REV_ integer, - USER_ID_ nvarchar(255), - NAME_ nvarchar(255), - DESCRIPTION_ nvarchar(4000), - TYPE_ nvarchar(255), - TASK_ID_ nvarchar(64), - PROC_INST_ID_ nvarchar(64), - URL_ nvarchar(4000), - CONTENT_ID_ nvarchar(64), - TIME_ datetime, - primary key (ID_) -); - -create table ACT_HI_IDENTITYLINK ( - ID_ nvarchar(64), - GROUP_ID_ nvarchar(255), - TYPE_ nvarchar(255), - USER_ID_ nvarchar(255), - TASK_ID_ nvarchar(64), - PROC_INST_ID_ nvarchar(64), - primary key (ID_) -); - - -create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_); -create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_); -create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_); -create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_); -create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_); -create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_); -create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_); -create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_); -create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_); -create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_); -create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_); -create index ACT_IDX_HI_PROCVAR_TASK_ID on ACT_HI_VARINST(TASK_ID_); -create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_); -create index ACT_IDX_HI_ACT_INST_EXEC on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_); -create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_); -create index ACT_IDX_HI_IDENT_LNK_TASK on ACT_HI_IDENTITYLINK(TASK_ID_); -create index ACT_IDX_HI_IDENT_LNK_PROCINST on ACT_HI_IDENTITYLINK(PROC_INST_ID_); -create index ACT_IDX_HI_TASK_INST_PROCINST on ACT_HI_TASKINST(PROC_INST_ID_); - -create table ACT_ID_GROUP ( - ID_ nvarchar(64), - REV_ int, - NAME_ nvarchar(255), - TYPE_ nvarchar(255), - primary key (ID_) -); - -create table ACT_ID_MEMBERSHIP ( - USER_ID_ nvarchar(64), - GROUP_ID_ nvarchar(64), - primary key (USER_ID_, GROUP_ID_) -); - -create table ACT_ID_USER ( - ID_ nvarchar(64), - REV_ int, - FIRST_ nvarchar(255), - LAST_ nvarchar(255), - EMAIL_ nvarchar(255), - PWD_ nvarchar(255), - PICTURE_ID_ nvarchar(64), - primary key (ID_) -); - -create table ACT_ID_INFO ( - ID_ nvarchar(64), - REV_ int, - USER_ID_ nvarchar(64), - TYPE_ nvarchar(64), - KEY_ nvarchar(255), - VALUE_ nvarchar(255), - PASSWORD_ varbinary(max), - PARENT_ID_ nvarchar(255), - primary key (ID_) -); - -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_GROUP - foreign key (GROUP_ID_) - references ACT_ID_GROUP (ID_); - -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_USER - foreign key (USER_ID_) - references ACT_ID_USER (ID_); diff --git a/config/sql/_all/sqlserver-3.9-all.sql b/config/sql/_all/sqlserver-4.0-all.sql similarity index 99% rename from config/sql/_all/sqlserver-3.9-all.sql rename to config/sql/_all/sqlserver-4.0-all.sql index d4870a90698..9180914d165 100644 --- a/config/sql/_all/sqlserver-3.9-all.sql +++ b/config/sql/_all/sqlserver-4.0-all.sql @@ -519,6 +519,12 @@ CREATE TABLE m_abstract_role ( oid NVARCHAR(36) COLLATE database_default NOT NULL, PRIMARY KEY (oid) ); +CREATE TABLE m_archetype ( + name_norm NVARCHAR(255) COLLATE database_default, + name_orig NVARCHAR(255) COLLATE database_default, + oid NVARCHAR(36) COLLATE database_default NOT NULL, + PRIMARY KEY (oid) +); CREATE TABLE m_case ( name_norm NVARCHAR(255) COLLATE database_default, name_orig NVARCHAR(255) COLLATE database_default, @@ -884,8 +890,9 @@ CREATE INDEX iAbstractRoleIdentifier ON m_abstract_role (identifier); CREATE INDEX iRequestable ON m_abstract_role (requestable); -CREATE INDEX iAutoassignEnabled - ON m_abstract_role (autoassign_enabled); +CREATE INDEX iAutoassignEnabled ON m_abstract_role(autoassign_enabled); +CREATE INDEX iArchetypeNameOrig ON m_archetype(name_orig); +CREATE INDEX iArchetypeNameNorm ON m_archetype(name_norm); CREATE INDEX iCaseNameOrig ON m_case (name_orig); ALTER TABLE m_case @@ -1108,6 +1115,8 @@ ALTER TABLE m_user_organizational_unit ADD CONSTRAINT fk_user_org_unit FOREIGN KEY (user_oid) REFERENCES m_user; ALTER TABLE m_abstract_role ADD CONSTRAINT fk_abstract_role FOREIGN KEY (oid) REFERENCES m_focus; +ALTER TABLE m_archetype + ADD CONSTRAINT fk_archetype FOREIGN KEY (oid) REFERENCES m_abstract_role; ALTER TABLE m_case ADD CONSTRAINT fk_case FOREIGN KEY (oid) REFERENCES m_object; ALTER TABLE m_connector @@ -1121,7 +1130,7 @@ ALTER TABLE m_form ALTER TABLE m_function_library ADD CONSTRAINT fk_function_library FOREIGN KEY (oid) REFERENCES m_object; ALTER TABLE m_generic_object - ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_object; + ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_focus; ALTER TABLE m_lookup_table ADD CONSTRAINT fk_lookup_table FOREIGN KEY (oid) REFERENCES m_object; ALTER TABLE m_lookup_table_row @@ -1157,7 +1166,7 @@ ALTER TABLE m_user ALTER TABLE m_value_policy ADD CONSTRAINT fk_value_policy FOREIGN KEY (oid) REFERENCES m_object; -INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '3.9'); +INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '4.0'); --# thanks to George Papastamatopoulos for submitting this ... and Marko Lahma for --# updating it. diff --git a/config/sql/_all/sqlserver-upgrade-3.8-3.9.sql b/config/sql/_all/sqlserver-upgrade-3.8-3.9.sql deleted file mode 100644 index 73425ed7ce9..00000000000 --- a/config/sql/_all/sqlserver-upgrade-3.8-3.9.sql +++ /dev/null @@ -1,26 +0,0 @@ -CREATE TABLE m_object_collection ( - name_norm NVARCHAR(255) COLLATE database_default, - name_orig NVARCHAR(255) COLLATE database_default, - oid NVARCHAR(36) COLLATE database_default NOT NULL, - PRIMARY KEY (oid) -); - -CREATE INDEX iObjectCollectionNameOrig - ON m_object_collection (name_orig); -ALTER TABLE m_object_collection - ADD CONSTRAINT uc_object_collection_name UNIQUE (name_norm); - -ALTER TABLE m_object_collection - ADD CONSTRAINT fk_object_collection FOREIGN KEY (oid) REFERENCES m_object; - -ALTER TABLE m_acc_cert_campaign ADD iteration INT DEFAULT 1 NOT NULL; -ALTER TABLE m_acc_cert_case ADD iteration INT DEFAULT 1 NOT NULL; -ALTER TABLE m_acc_cert_wi ADD iteration INT DEFAULT 1 NOT NULL; - -CREATE TABLE m_global_metadata ( - name NVARCHAR(255) COLLATE database_default NOT NULL, - value NVARCHAR(255) COLLATE database_default, - PRIMARY KEY (name) -); - -INSERT INTO m_global_metadata VALUES ('databaseSchemaVersion', '3.9'); \ No newline at end of file diff --git a/config/sql/_all/sqlserver-upgrade-3.9-4.0.sql b/config/sql/_all/sqlserver-upgrade-3.9-4.0.sql new file mode 100644 index 00000000000..ac5e03a03fd --- /dev/null +++ b/config/sql/_all/sqlserver-upgrade-3.9-4.0.sql @@ -0,0 +1,18 @@ +CREATE TABLE m_archetype ( + name_norm NVARCHAR(255) COLLATE database_default, + name_orig NVARCHAR(255) COLLATE database_default, + oid NVARCHAR(36) COLLATE database_default NOT NULL, + PRIMARY KEY (oid) +); + +CREATE INDEX iArchetypeNameOrig ON m_archetype(name_orig); +CREATE INDEX iArchetypeNameNorm ON m_archetype(name_norm); + +ALTER TABLE m_archetype + ADD CONSTRAINT fk_archetype FOREIGN KEY (oid) REFERENCES m_abstract_role; + +ALTER TABLE m_generic_object DROP CONSTRAINT fk_generic_object; +ALTER TABLE m_generic_object + ADD CONSTRAINT fk_generic_object FOREIGN KEY (oid) REFERENCES m_focus; + +UPDATE m_global_metadata SET value = '4.0' WHERE name = 'databaseSchemaVersion'; \ No newline at end of file diff --git a/custom/pom.xml b/custom/pom.xml index c1e61ce4d8a..216cce58361 100644 --- a/custom/pom.xml +++ b/custom/pom.xml @@ -51,11 +51,30 @@ custom-foo --> + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.testng testng test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/dist/midpoint-api/pom.xml b/dist/midpoint-api/pom.xml index a3d4839e4c3..73aea5f9a34 100644 --- a/dist/midpoint-api/pom.xml +++ b/dist/midpoint-api/pom.xml @@ -134,6 +134,12 @@ true + + maven-failsafe-plugin + + true + + maven-dependency-plugin diff --git a/dist/pom.xml b/dist/pom.xml index fbd32521302..f1bf951c2ec 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -65,6 +65,12 @@ testng test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/GuiStyleConstants.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/GuiStyleConstants.java index 0b8290c5de3..78705db1895 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/GuiStyleConstants.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/GuiStyleConstants.java @@ -173,4 +173,21 @@ public class GuiStyleConstants { public static final String CLASS_ADD_NEW_OBJECT = "fa fa-plus"; public static final String CLASS_UPLOAD = "fa fa-upload"; public static final String CLASS_CREATE_FOCUS = "fa fa-user-plus"; + + public static final String EVO_CROW_ICON = "fe fe-crown-object"; + public static final String EVO_ASSIGNMENT_ICON = "fe fe-assignment"; + public static final String EVO_OFFICER_CAP_ICON = "fe fe-officer-cap-object"; + public static final String EVO_ASSIGNMENT_STRAIGHT_THICKER_ICON = "fe fe-assignment-straight-thicker-object"; + public static final String EVO_ASSIGNMENT_STRAIGHT_ICON = "fe fe-assignment-straight-object"; + public static final String EVO_UNEMPLOYER_ICON = "fe fe-unemployer-icon"; + public static final String EVO_EMPLOYER_ICON = "fe fe-employer-icon"; + public static final String EVO_APPROVER_ICON = "fe fe-approver-object"; + public static final String EVO_MP_SHORTER_LINES = "fe fe-midpoint-shorter-lines"; + public static final String EVO_MP_WHEEL_ICON = "fe fe-midpoint-wheel"; + public static final String EVO_MP_WITH_LINES_ICON = "fe fe-midpoint-with-lines"; + public static final String EVO_ROLE_HAT_ICON = "fe fe-role-hat"; + public static final String EVO_ROLE_TIE_ICON = "fe fe-role-tie"; + public static final String EVO_ROLE_TOP_HAT_ICON = "fe fe-role-top-hat"; + public static final String EVO_ASSIGNMENT_THICKER_ICON = "fe assignment-thicker"; + } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/ObjectListPanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/ObjectListPanel.java index ac1aa0e0b46..5644eaff4ed 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/ObjectListPanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/ObjectListPanel.java @@ -20,6 +20,7 @@ import java.util.stream.Collectors; import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils; +import com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView; import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.schema.constants.ObjectTypes; @@ -257,7 +258,7 @@ protected List, String>> initCustomColumns() { columns.add(checkboxColumn); } - IColumn, String> iconColumn = (IColumn) ColumnUtils.createIconColumn(type.getClassDefinition()); + IColumn, String> iconColumn = (IColumn) ColumnUtils.createIconColumn(type.getClassDefinition(), parentPage); columns.add(iconColumn); columns.addAll(getCustomColumnsTransformed(customColumns)); @@ -341,7 +342,7 @@ private IModel getItemValuesString(Item item, PrismObject) itemValue).getValue()); } else { String lookupTableKey = ((PrismPropertyValue) itemValue).getValue().toString(); - LookupTableType lookupTableObject = lookupTable.getValue().asObjectable(); + LookupTableType lookupTableObject = lookupTable.asObjectable(); String rowLabel = ""; for (LookupTableRowType lookupTableRow : lookupTableObject.getRow()){ if (lookupTableRow.getKey().equals(lookupTableKey)){ @@ -367,7 +368,7 @@ protected List, String>> initColumns() { columns.add(checkboxColumn); } - IColumn, String> iconColumn = (IColumn) ColumnUtils.createIconColumn(type.getClassDefinition()); + IColumn, String> iconColumn = (IColumn) ColumnUtils.createIconColumn(type.getClassDefinition(), parentPage); columns.add(iconColumn); IColumn, String> nameColumn = createNameColumn(null, null); @@ -644,9 +645,9 @@ public StringResourceModel createStringResource(String resourceKey, Object... ob protected abstract List createInlineMenu(); protected void addCustomActions(@NotNull List actionsList, SerializableSupplier> objectsSupplier) { - GuiObjectListViewType guiObjectListViewType = getGuiObjectListViewType(); - if (guiObjectListViewType != null && !guiObjectListViewType.getAction().isEmpty()) { - actionsList.addAll(WebComponentUtil.createMenuItemsFromActions(guiObjectListViewType.getAction(), + CompiledObjectCollectionView guiObjectListViewType = getGuiObjectListViewType(); + if (guiObjectListViewType != null && !guiObjectListViewType.getActions().isEmpty()) { + actionsList.addAll(WebComponentUtil.createMenuItemsFromActions(guiObjectListViewType.getActions(), OPERATION_LOAD_CUSTOM_MENU_ITEMS, parentPage, objectsSupplier)); } } @@ -656,23 +657,12 @@ public void addPerformed(AjaxRequestTarget target, List selected) { } private List getGuiObjectColumnTypeList(){ - GuiObjectListViewType guiObjectListViewType = getGuiObjectListViewType(); - return guiObjectListViewType != null ? guiObjectListViewType.getColumn() : null; - } - - private GuiObjectListViewType getGuiObjectListViewType(){ - AdminGuiConfigurationType adminGuiConfig = parentPage.getPrincipal().getAdminGuiConfiguration(); - if (adminGuiConfig != null && adminGuiConfig.getObjectLists() != null && - adminGuiConfig.getObjectLists().getObjectList() != null){ - for (GuiObjectListViewType object : adminGuiConfig.getObjectLists().getObjectList()){ - if (object.getType() != null && - !type.getClassDefinition().getSimpleName().equals(object.getType().getLocalPart())){ - continue; - } - return object; - } - } - return null; + CompiledObjectCollectionView guiObjectListViewType = getGuiObjectListViewType(); + return guiObjectListViewType != null ? guiObjectListViewType.getColumns() : null; + } + + private CompiledObjectCollectionView getGuiObjectListViewType(){ + return parentPage.getCompiledUserProfile().findObjectCollectionView(type.getTypeQName(), null); } private boolean isCustomColumnsListConfigured(){ diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/autocomplete/AutoCompleteItemDefinitionPanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/autocomplete/AutoCompleteItemDefinitionPanel.java index f21ab0e915a..f844cd1bff4 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/autocomplete/AutoCompleteItemDefinitionPanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/autocomplete/AutoCompleteItemDefinitionPanel.java @@ -33,7 +33,6 @@ public class AutoCompleteItemDefinitionPanel extends AbstractAutoCompletePanel { - private static final long serialVersionUID = 1L; private static final String ID_INPUT = "input"; @@ -73,18 +72,22 @@ protected void onConfigure() { @Override protected void onUpdate(AjaxRequestTarget target) { - String newValue = itemDefinitionAsStringModel.getObject(); - if (StringUtils.isNotBlank(newValue)){ - ItemDefinition def = listChoices("").get(newValue); - if (def != null) { - model.setObject(def); - } - } + onUpdateAutoComplete(target, itemDefinitionAsStringModel, model); } }); add(input); } + + protected void onUpdateAutoComplete(AjaxRequestTarget target, final Model itemDefinitionAsStringModel, final IModel> model) { + String newValue = itemDefinitionAsStringModel.getObject(); + if (StringUtils.isNotBlank(newValue)){ + ItemDefinition def = listChoices("").get(newValue); + if (def != null) { + model.setObject(def); + } + } + } protected Map> listChoices(String input){ return new HashMap<>(); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/button/CsvDownloadButtonPanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/button/CsvDownloadButtonPanel.java index 78f19451dc3..dec615f84c4 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/button/CsvDownloadButtonPanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/button/CsvDownloadButtonPanel.java @@ -21,6 +21,7 @@ import org.apache.wicket.util.resource.IResourceStream; import com.evolveum.midpoint.gui.api.component.BasePanel; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.web.component.AbstractAjaxDownloadBehavior; import com.evolveum.midpoint.web.component.AjaxIconButton; @@ -93,8 +94,7 @@ public String getFileName() { public void onClick(AjaxRequestTarget target) { long exportSizeLimit = -1; try { - AdminGuiConfigurationType adminGuiConfig = getPageBase().getModelInteractionService().getAdminGuiConfiguration(null, - new OperationResult(OPERATION_GET_EXPORT_SIZE_LIMIT)); + CompiledUserProfile adminGuiConfig = getPageBase().getCompiledUserProfile(); if (adminGuiConfig.getDefaultExportSettings() != null && adminGuiConfig.getDefaultExportSettings().getSizeLimit() != null) { exportSizeLimit = adminGuiConfig.getDefaultExportSettings().getSizeLimit(); } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/path/ItemPathDto.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/path/ItemPathDto.java index 0c4632f6fa9..4a3fd8c697b 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/path/ItemPathDto.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/path/ItemPathDto.java @@ -86,6 +86,12 @@ public boolean isPathDefined() { return (path != null && itemDef == null && parentPath == null); } - + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{ObjectType: [").append("], Parent: [").append(parentPath).append("], ItemDef: [") + .append(getItemDef()).append("], Path: [").append(path).append("] }"); + return sb.toString(); + } } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/path/ItemPathPanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/path/ItemPathPanel.java index 4cd1fb1fa0e..0207268c03b 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/path/ItemPathPanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/path/ItemPathPanel.java @@ -32,7 +32,7 @@ public class ItemPathPanel extends BasePanel { private static final long serialVersionUID = 1L; - + private static final String ID_ITEM_PATH = "itemPath"; private static final String ID_NAMESPACE = "namespace"; private static final String ID_DEFINITION = "definition"; @@ -94,6 +94,7 @@ public boolean isVisible() { public ItemPathDto getObject() { return ItemPathPanel.this.getModelObject(); } + }) { private static final long serialVersionUID = 1L; @@ -102,6 +103,11 @@ public ItemPathDto getObject() { protected Map>> getSchemaDefinitionMap() { return initNamspaceDefinitionMap(); } + + @Override + protected void onUpdateAutoCompletePanel(AjaxRequestTarget target) { + ItemPathPanel.this.onUpdate(ItemPathPanel.this.getModelObject()); + } }; itemDefPanel.setOutputMarkupId(true); itemPathPanel.add(itemDefPanel); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/path/ItemPathSegmentPanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/path/ItemPathSegmentPanel.java index 5de2eec976b..c6d5ce2536a 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/path/ItemPathSegmentPanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/path/ItemPathSegmentPanel.java @@ -8,6 +8,7 @@ import org.apache.commons.lang.StringUtils; import org.apache.wicket.Component; +import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; @@ -22,7 +23,7 @@ public class ItemPathSegmentPanel extends BasePanel { private static final long serialVersionUID = 1L; - + private static final String ID_DEFINITION = "definition"; private static final String ID_PARENT = "parentPath"; @@ -75,11 +76,23 @@ protected Map> listChoices(String input) { return collectAvailableDefinitions(input); } + + @Override + protected void onUpdateAutoComplete(AjaxRequestTarget target, + Model itemDefinitionAsStringModel, IModel> model) { + super.onUpdateAutoComplete(target, itemDefinitionAsStringModel, model); + onUpdateAutoCompletePanel(target); + } + }; // itemDefPanel.getBaseFormComponent().add(new EmptyOnBlurAjaxFormUpdatingBehaviour()); itemDefPanel.setOutputMarkupId(true); add(itemDefPanel); } + + protected void onUpdateAutoCompletePanel(AjaxRequestTarget target) { + + } private Map> collectAvailableDefinitions(String input) { Map> toSelect = new HashMap<>(); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/page/PageBase.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/page/PageBase.java index 586952de050..7333b7bf6a0 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/page/PageBase.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/page/PageBase.java @@ -31,6 +31,9 @@ import com.evolveum.midpoint.gui.api.util.WebComponentUtil; import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils; import com.evolveum.midpoint.model.api.*; +import com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; +import com.evolveum.midpoint.model.api.authentication.MidPointUserProfilePrincipal; import com.evolveum.midpoint.model.api.expr.MidpointFunctions; import com.evolveum.midpoint.model.api.validator.ResourceValidator; import com.evolveum.midpoint.prism.delta.ObjectDelta; @@ -67,7 +70,6 @@ import com.evolveum.midpoint.util.CheckedProducer; import com.evolveum.midpoint.util.Holder; import com.evolveum.midpoint.util.Producer; -import com.evolveum.midpoint.util.QNameUtil; import com.evolveum.midpoint.util.exception.*; import com.evolveum.midpoint.util.logging.LoggingUtils; import com.evolveum.midpoint.util.logging.Trace; @@ -88,6 +90,7 @@ import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour; import com.evolveum.midpoint.web.page.admin.PageAdmin; import com.evolveum.midpoint.web.page.admin.PageAdminFocus; +import com.evolveum.midpoint.web.page.admin.PageAdminObjectList; import com.evolveum.midpoint.web.page.admin.cases.PageCase; import com.evolveum.midpoint.web.page.admin.cases.PageCaseWorkItem; import com.evolveum.midpoint.web.page.admin.cases.PageCaseWorkItemsAll; @@ -156,7 +159,6 @@ import org.apache.wicket.markup.html.list.ListView; import org.apache.wicket.model.*; import org.apache.wicket.protocol.http.WebSession; -import org.apache.wicket.request.cycle.RequestCycle; import org.apache.wicket.request.mapper.parameter.PageParameters; import org.apache.wicket.request.resource.CssResourceReference; import org.apache.wicket.resource.CoreLibrariesContributor; @@ -172,8 +174,6 @@ import javax.management.ObjectName; import javax.xml.namespace.QName; -import java.io.Serializable; -import java.net.URI; import java.util.*; /** @@ -186,7 +186,7 @@ public abstract class PageBase extends WebPage implements ModelServiceLocator { private static final String DOT_CLASS = PageBase.class.getName() + "."; private static final String OPERATION_LOAD_USER = DOT_CLASS + "loadUser"; - private static final String OPERATION_LOAD_USERS_VIEW_COLLECTION_REF = DOT_CLASS + "loadUsersViewCollectionRef"; + protected static final String OPERATION_LOAD_VIEW_COLLECTION_REF = DOT_CLASS + "loadViewCollectionRef"; private static final String OPERATION_LOAD_WORK_ITEM_COUNT = DOT_CLASS + "loadWorkItemCount"; private static final String OPERATION_LOAD_CERT_WORK_ITEM_COUNT = DOT_CLASS + "loadCertificationWorkItemCount"; @@ -225,6 +225,8 @@ public abstract class PageBase extends WebPage implements ModelServiceLocator { private static final String ID_BODY = "body"; private static final int DEFAULT_BREADCRUMB_STEP = 2; + public static final String PARAMETER_OBJECT_COLLECTION_TYPE_OID = "collectionOid"; + public static final String PARAMETER_OBJECT_COLLECTION_NAME = "collectionName"; private static final String CLASS_DEFAULT_SKIN = "skin-blue-light"; @@ -316,7 +318,7 @@ public abstract class PageBase extends WebPage implements ModelServiceLocator { private LoadableModel certWorkItemCountModel; // No need to store this in the session. Retrieval is cheap. - private transient AdminGuiConfigurationType adminGuiConfiguration; + private transient CompiledUserProfile compiledUserProfile; // No need for this to store in session. It is used only during single init and render. private transient Task pageTask; @@ -575,25 +577,26 @@ protected ModelDiagnosticService getModelDiagnosticService() { public CacheDispatcher getCacheDispatcher() { return cacheDispatcher; } - + @NotNull @Override - public AdminGuiConfigurationType getAdminGuiConfiguration() { - if (adminGuiConfiguration == null) { - Task task = createSimpleTask(PageBase.DOT_CLASS + "getAdminGuiConfiguration"); + public CompiledUserProfile getCompiledUserProfile() { + // TODO: may need to always go to ModelInteractionService to make sure the setting is up to date + if (compiledUserProfile == null) { + Task task = createSimpleTask(PageBase.DOT_CLASS + "getCompiledUserProfile"); try { - adminGuiConfiguration = modelInteractionService.getAdminGuiConfiguration(task, task.getResult()); - } catch (ObjectNotFoundException | SchemaException e) { - LoggingUtils.logUnexpectedException(LOGGER, "Cannot retrieve admin GUI configuration", e); + compiledUserProfile = modelInteractionService.getCompiledUserProfile(task, task.getResult()); + } catch (ObjectNotFoundException | SchemaException | CommunicationException | ConfigurationException | SecurityViolationException | ExpressionEvaluationException e) { + LoggingUtils.logUnexpectedException(LOGGER, "Cannot retrieve compiled user profile", e); if (InternalsConfig.nonCriticalExceptionsAreFatal()) { - throw new SystemException("Cannot retrieve admin GUI configuration: " + e.getMessage(), e); + throw new SystemException("Cannot retrieve compiled user profile: " + e.getMessage(), e); } else { // Just return empty admin GUI config, so the GUI can go on (and the problem may get fixed) - return new AdminGuiConfigurationType(); + return new CompiledUserProfile(); } } } - return adminGuiConfiguration; + return compiledUserProfile; } @Override @@ -651,7 +654,7 @@ public MidpointFormValidatorRegistry getFormValidatorRegistry() { return formValidatorRegistry; } - public MidPointPrincipal getPrincipal() { + public MidPointUserProfilePrincipal getPrincipal() { return SecurityUtils.getPrincipalUser(); } @@ -984,32 +987,8 @@ public IconType getObject() { } }; - ExternalImage customLogoImgSrc = new ExternalImage(ID_CUSTOM_LOGO_IMG_SRC, new Model() { - - @Override - public String getObject() { - if (logoModel.getObject() == null || logoModel.getObject().getImageUrl() == null) { - return null; - } - - String sUrl = logoModel.getObject().getImageUrl(); - if (URI.create(sUrl).isAbsolute()) { - return sUrl; - } - - List segments = RequestCycle.get().getRequest().getUrl().getSegments(); - if (segments == null || segments.size() < 2) { - return sUrl; - } - - String prefix = StringUtils.repeat("../", segments.size() - 1); - if (!sUrl.startsWith("/")) { - return prefix + sUrl; - } - - return StringUtils.left(prefix, prefix.length() - 1) + sUrl; - } - }); + ExternalImage customLogoImgSrc = new ExternalImage(ID_CUSTOM_LOGO_IMG_SRC, + WebComponentUtil.getIconUrlModel(logoModel != null ? logoModel.getObject() : null)); customLogoImgSrc.add(new VisibleBehaviour(() -> logoModel.getObject() != null && StringUtils.isEmpty(logoModel.getObject().getCssClass()))); WebMarkupContainer customLogoImgCss = new WebMarkupContainer(ID_CUSTOM_LOGO_IMG_CSS); @@ -1339,7 +1318,7 @@ public OpResult showResult(OperationResult result, String errorMessageKey, boole } private OperationResult executeResultScriptHook(OperationResult result) { - AdminGuiConfigurationType adminGuiConfiguration = getAdminGuiConfiguration(); + CompiledUserProfile adminGuiConfiguration = getCompiledUserProfile(); if (adminGuiConfiguration.getFeedbackMessagesHook() == null) { return result; } @@ -1813,6 +1792,9 @@ private MainMenuItem createServerTasksItems() { PageTaskEdit.class, null, createVisibleDisabledBehaviorForEditMenu(PageTaskEdit.class)); item.getItems().add(menuItem); + //should we support archetype view for TaskType? +// addCollectionsMenuItems(item.getItems(), TaskType.COMPLEX_TYPE); + return item; } @@ -1829,6 +1811,8 @@ private MainMenuItem createResourcesItems() { addMenuItem(item, "PageAdmin.menu.top.resources.import", PageImportResource.class); addMenuItem(item, "PageAdmin.menu.top.connectorHosts.list", PageConnectorHosts.class); + addCollectionsMenuItems(item.getItems(), ResourceType.COMPLEX_TYPE, PageResources.class); + return item; } @@ -1921,8 +1905,8 @@ private void createSelfServiceMenu(SideBarMenuItem menu) { } private void createAdditionalMenu(SideBarMenuItem menu) { - AdminGuiConfigurationType adminGuiConfig = loadAdminGuiConfiguration(); - List menuList = adminGuiConfig.getAdditionalMenuLink(); + CompiledUserProfile userProfile = getCompiledUserProfile(); + List menuList = userProfile.getAdditionalMenuLink(); Map urlClassMap = DescriptorLoader.getUrlClassMap(); if (menuList != null && menuList.size() > 0 && urlClassMap != null && urlClassMap.size() > 0) { @@ -1953,7 +1937,7 @@ private MainMenuItem createUsersItems() { createFocusPageNewEditMenu(item.getItems(), "PageAdmin.menu.top.users.new", "PageAdmin.menu.top.users.edit", PageUser.class, true); - addUsersViewMenuItems(item.getItems()); + addCollectionsMenuItems(item.getItems(), UserType.COMPLEX_TYPE, PageUsers.class); return item; } @@ -2071,6 +2055,9 @@ private MainMenuItem createOrganizationsMenu() { createFocusPageNewEditMenu(item.getItems(), "PageAdmin.menu.top.users.org.new", "PageAdmin.menu.top.users.org.edit", PageOrgUnit.class, true); + //todo should we have org list page for collection/archetype view? +// addCollectionsMenuItems(item.getItems(), OrgType.COMPLEX_TYPE); + return item; } @@ -2083,6 +2070,8 @@ private MainMenuItem createRolesItems() { createFocusPageNewEditMenu(item.getItems(), "PageAdmin.menu.top.roles.new", "PageAdmin.menu.top.roles.edit", PageRole.class, true); + addCollectionsMenuItems(item.getItems(), RoleType.COMPLEX_TYPE, PageRoles.class); + return item; } @@ -2095,64 +2084,54 @@ private MainMenuItem createServicesItems() { createFocusPageNewEditMenu(item.getItems(), "PageAdmin.menu.top.services.new", "PageAdmin.menu.top.services.edit", PageService.class, true); + addCollectionsMenuItems(item.getItems(), ServiceType.COMPLEX_TYPE, PageServices.class); + return item; } - private void addUsersViewMenuItems(List menu) { - List objectListViews = getObjectViewsList(); - if (objectListViews == null) { + private void addCollectionsMenuItems(List menu, QName type, Class redirectToPage) { + List objectViews = getCompiledUserProfile().findAllApplicableObjectCollectionViews(type); + if (objectViews == null) { return; } - objectListViews.forEach(objectListView -> { + objectViews.forEach(objectView -> { //objectlistView.getType() might be null - from documentation: // It may not be present in case that the type is defined in a referenced object colleciton. - if (objectListView.getType() != null && !QNameUtil.match(objectListView.getType(), UserType.COMPLEX_TYPE)) { - return; - } - - ObjectReferenceType collectionRef = objectListView.getCollectionRef(); + CollectionSpecificationType collection = objectView.getCollection(); + if (collection == null) { + return; + } + + ObjectReferenceType collectionRef = collection.getCollectionRef(); if (collectionRef == null) { return; } - OperationResult result = new OperationResult(OPERATION_LOAD_USERS_VIEW_COLLECTION_REF); - Task task = createSimpleTask(OPERATION_LOAD_USERS_VIEW_COLLECTION_REF); + OperationResult result = new OperationResult(OPERATION_LOAD_VIEW_COLLECTION_REF); + Task task = createSimpleTask(OPERATION_LOAD_VIEW_COLLECTION_REF); PrismObject collectionObject = WebModelServiceUtils.resolveReferenceNoFetch(collectionRef, this, task, result); if (collectionObject == null) { return; } ObjectType objectType = collectionObject.asObjectable(); - if (!(objectType instanceof ObjectCollectionType)) { - return; - } - - ObjectCollectionType collectionValue = (ObjectCollectionType) objectType; - if (!QNameUtil.match(collectionValue.getType(), UserType.COMPLEX_TYPE)) { + if (!(objectType instanceof ArchetypeType)) { return; } - DisplayType viewDisplayType = objectListView.getDisplay(); + DisplayType viewDisplayType = objectView.getDisplay(); PageParameters pageParameters = new PageParameters(); - pageParameters.add(PageUsersView.PARAMETER_OBJECT_COLLECTION_TYPE_OID, collectionValue.getOid()); + pageParameters.add(PageUsersView.PARAMETER_OBJECT_COLLECTION_NAME, objectView.getViewName()); MenuItem userViewMenu = new MenuItem(viewDisplayType != null && PolyStringUtils.isNotEmpty(viewDisplayType.getLabel()) ? createStringResource(viewDisplayType.getLabel()) - : createStringResource("MenuItem.noName"), PageUsersView.class, pageParameters, null); + : createStringResource("MenuItem.noName"), redirectToPage, pageParameters, null); menu.add(userViewMenu); }); } - private List getObjectViewsList() { - GuiObjectListViewsType objectListViews = getAdminGuiConfiguration().getObjectLists(); - if (objectListViews == null) { - return null; - } - return objectListViews.getObjectList(); - } - public PrismObject loadUserSelf() { Task task = createSimpleTask(OPERATION_LOAD_USER); OperationResult result = task.getResult(); @@ -2182,27 +2161,6 @@ public boolean isEnabled() { }; } - @NotNull - public AdminGuiConfigurationType loadAdminGuiConfiguration() { - MidPointPrincipal user = SecurityUtils.getPrincipalUser(); - AdminGuiConfigurationType adminGuiConfig = new AdminGuiConfigurationType(); - if (user == null) { - return adminGuiConfig; - } else { - OperationResult result = new OperationResult(OPERATION_GET_SYSTEM_CONFIG); - Task task = createSimpleTask(OPERATION_GET_SYSTEM_CONFIG); - try { - adminGuiConfig = getModelInteractionService().getAdminGuiConfiguration(task, result); - LOGGER.trace("Admin GUI config: {}", adminGuiConfig); - result.recordSuccess(); - } catch (Exception ex) { - LoggingUtils.logUnexpectedException(LOGGER, "Couldn't load system configuration", ex); - result.recordFatalError(createStringResource("PageBase.message.loadAdminGuiConfiguration.fatalError").getString(), ex); - } - return adminGuiConfig; - } - } - public DeploymentInformationType loadDeploymentInformationType() { DeploymentInformationType deploymentInformationType = null; OperationResult result = new OperationResult(OPERATION_GET_DEPLOYMENT_INFORMATION); @@ -2332,11 +2290,11 @@ public void redirectBackToBreadcrumb(Breadcrumb breadcrumb) { protected void setTimeZone(PageBase page) { PrismObject user = loadUserSelf(); String timeZone = null; - MidPointPrincipal principal = SecurityUtils.getPrincipalUser(); + MidPointUserProfilePrincipal principal = SecurityUtils.getPrincipalUser(); if (user != null && user.asObjectable().getTimezone() != null) { timeZone = user.asObjectable().getTimezone(); - } else if (principal != null && principal.getAdminGuiConfiguration() != null) { - timeZone = principal.getAdminGuiConfiguration().getDefaultTimezone(); + } else if (principal != null && principal.getCompiledUserProfile() != null) { + timeZone = principal.getCompiledUserProfile().getDefaultTimezone(); } if (timeZone != null) { WebSession.get().getClientInfo().getProperties(). @@ -2448,7 +2406,7 @@ private boolean isFooterVisible() { } protected String determineDataLanguage() { - AdminGuiConfigurationType config = loadAdminGuiConfiguration(); + CompiledUserProfile config = getCompiledUserProfile(); if (config.getPreferredDataLanguage() != null) { if (PrismContext.LANG_JSON.equals(config.getPreferredDataLanguage())) { return PrismContext.LANG_JSON; diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/FeatureVisibleEnableBehaviour.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/FeatureVisibleEnableBehaviour.java index 197621b2309..8e186aa2779 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/FeatureVisibleEnableBehaviour.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/FeatureVisibleEnableBehaviour.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2017 Evolveum + * Copyright (c) 2017-2018 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,9 +16,8 @@ package com.evolveum.midpoint.gui.api.util; import com.evolveum.midpoint.gui.api.GuiFeature; -import com.evolveum.midpoint.schema.util.AdminGuiConfigTypeUtil; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour; -import com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType; import com.evolveum.midpoint.xml.ns._public.common.common_3.UserInterfaceElementVisibilityType; /** @@ -31,14 +30,14 @@ public class FeatureVisibleEnableBehaviour extends VisibleEnableBehaviour { UserInterfaceElementVisibilityType visibility; - public FeatureVisibleEnableBehaviour(GuiFeature feature, AdminGuiConfigurationType adminGuiConfig) { + public FeatureVisibleEnableBehaviour(GuiFeature feature, CompiledUserProfile userProfile) { super(); - visibility = AdminGuiConfigTypeUtil.getFeatureVisibility(adminGuiConfig, feature.getUri()); + visibility = userProfile.getFeatureVisibility(feature.getUri()); } @Override public boolean isVisible() { - return AdminGuiConfigTypeUtil.isVisible(visibility, this::isVisibleAutomatic); + return CompiledUserProfile.isVisible(visibility, this::isVisibleAutomatic); } /** diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/FocusTabVisibleBehavior.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/FocusTabVisibleBehavior.java index 09e0352abf4..91830b2fd0f 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/FocusTabVisibleBehavior.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/FocusTabVisibleBehavior.java @@ -18,12 +18,17 @@ import com.evolveum.midpoint.gui.api.page.PageBase; import com.evolveum.midpoint.model.api.ModelInteractionService; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.task.api.Task; import com.evolveum.midpoint.task.api.TaskManager; +import com.evolveum.midpoint.util.exception.CommunicationException; +import com.evolveum.midpoint.util.exception.ConfigurationException; +import com.evolveum.midpoint.util.exception.ExpressionEvaluationException; import com.evolveum.midpoint.util.exception.ObjectNotFoundException; import com.evolveum.midpoint.util.exception.SchemaException; +import com.evolveum.midpoint.util.exception.SecurityViolationException; import com.evolveum.midpoint.util.exception.SystemException; import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour; import com.evolveum.midpoint.web.security.MidPointApplication; @@ -79,10 +84,10 @@ public boolean isVisible() { SecurityUtils.getPrincipalUser().getUser().asPrismObject(), getTaskManager()); OperationResult result = task.getResult(); - AdminGuiConfigurationType config; + CompiledUserProfile config; try { - config = getModelInteractionService().getAdminGuiConfiguration(task, result); - } catch (ObjectNotFoundException | SchemaException e) { + config = getModelInteractionService().getCompiledUserProfile(task, result); + } catch (ObjectNotFoundException | SchemaException | CommunicationException | ConfigurationException | SecurityViolationException | ExpressionEvaluationException e) { throw new SystemException("Cannot load GUI configuration: " + e.getMessage(), e); } @@ -113,7 +118,7 @@ public boolean isVisible() { return false; } - private List findObjectForm(AdminGuiConfigurationType config, PrismObject object) { + private List findObjectForm(CompiledUserProfile config, PrismObject object) { List result = new ArrayList<>(); if (config == null || config.getObjectForms() == null) { diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/ModelServiceLocator.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/ModelServiceLocator.java index 97beeb9a084..e2355940242 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/ModelServiceLocator.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/ModelServiceLocator.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2016-2017 Evolveum + * Copyright (c) 2016-2018 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ import com.evolveum.midpoint.common.LocalizationService; import com.evolveum.midpoint.model.api.ModelInteractionService; import com.evolveum.midpoint.model.api.ModelService; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.prism.PrismContext; import com.evolveum.midpoint.repo.common.ObjectResolver; import com.evolveum.midpoint.repo.common.expression.ExpressionFactory; @@ -65,14 +66,15 @@ public interface ModelServiceLocator { ExpressionFactory getExpressionFactory(); /** - * Returns adminGuiConfiguraiton applicable to currently logged-in user. + * Returns currently applicable user profile, compiled for efficient use in the user interface. + * applicable to currently logged-in user. * Strictly speaking, this can be retrieved from modelInteractionService. * But having a separate function for that allows to get rid of * task and result parameters. And more importantly: this allows to * cache adminGuiConfig in the page (in case many components need it). */ @NotNull - AdminGuiConfigurationType getAdminGuiConfiguration(); + CompiledUserProfile getCompiledUserProfile(); default ObjectResolver getModelObjectResolver() { return null; diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebComponentUtil.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebComponentUtil.java index 07571cc11f8..c9a7b0c4d05 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebComponentUtil.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebComponentUtil.java @@ -24,6 +24,7 @@ import java.lang.management.RuntimeMXBean; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; +import java.net.URI; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; @@ -52,6 +53,7 @@ import com.evolveum.midpoint.model.api.ModelExecuteOptions; import com.evolveum.midpoint.model.api.ModelInteractionService; import com.evolveum.midpoint.model.api.RoleSelectionSpecification; +import com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView; import com.evolveum.midpoint.model.api.util.ResourceUtils; import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.path.*; @@ -70,7 +72,6 @@ import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem; import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItemAction; import com.evolveum.midpoint.web.component.prism.*; -import com.evolveum.midpoint.web.page.admin.reports.dto.ReportDeleteDialogDto; import com.evolveum.midpoint.web.util.ObjectTypeGuiDescriptor; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; import com.evolveum.prism.xml.ns._public.types_3.ObjectDeltaType; @@ -100,6 +101,7 @@ import org.apache.wicket.markup.repeater.data.IDataProvider; import org.apache.wicket.model.*; import org.apache.wicket.request.IRequestHandler; +import org.apache.wicket.request.cycle.RequestCycle; import org.apache.wicket.request.mapper.parameter.PageParameters; import org.apache.wicket.util.string.StringValue; import org.apache.wicket.util.visit.IVisit; @@ -497,33 +499,13 @@ public static void safeResultCleanup(OperationResult result, Trace logger) { } } - public static GuiObjectListViewType getDefaultGuiObjectListType(PageBase pageBase) { - AdminGuiConfigurationType config = pageBase.getPrincipal().getAdminGuiConfiguration(); - if (config == null) { - return null; - } - GuiObjectListViewsType lists = config.getObjectLists(); - if (lists == null) { - return null; - } - return lists.getDefault(); - } - - public static GuiObjectListViewType getViewTypeConfig(QName type, PageBase pageBase){ - AdminGuiConfigurationType config = pageBase.getPrincipal().getAdminGuiConfiguration(); - if (config == null) { - return null; - } - GuiObjectListViewsType lists = config.getObjectLists(); - if (lists == null) { - return null; - } - for (GuiObjectListViewType viewType : lists.getObjectList()){ - if (QNameUtil.match(viewType.getType(), type)){ - return viewType; - } - } - return null; + /** + * Default list view setting should never be needed. Always check setting for specific + * object type (and archetype). + */ + @Deprecated + public static CompiledObjectCollectionView getDefaultGuiObjectListType(PageBase pageBase) { + return pageBase.getCompiledUserProfile().getDefaultObjectCollectionView(); } public enum Channel { @@ -591,7 +573,7 @@ public static QName classToQName(PrismContext prismContex public static TaskType createSingleRecurrenceTask(String taskName, QName applicableType, ObjectQuery query, ObjectDelta delta, ModelExecuteOptions options, String category, PageBase pageBase) throws SchemaException { - TaskType task = new TaskType(); + TaskType task = new TaskType(pageBase.getPrismContext()); MidPointPrincipal owner = SecurityUtils.getPrincipalUser(); @@ -3075,4 +3057,81 @@ public static ArchetypeInteractionSpecification getArchet } return spec; } + + public static IModel getIconUrlModel(IconType icon){ + if (icon == null || StringUtils.isEmpty(icon.getImageUrl())){ + return Model.of(); + } + String sUrl = icon.getImageUrl(); + if (URI.create(sUrl).isAbsolute()) { + Model.of(sUrl); + } + + List segments = RequestCycle.get().getRequest().getUrl().getSegments(); + if (segments == null || segments.size() < 2) { + Model.of(sUrl); + } + + String prefix = StringUtils.repeat("../", segments.size() - 1); + if (!sUrl.startsWith("/")) { + return Model.of(prefix + sUrl); + } + + return Model.of(StringUtils.left(prefix, prefix.length() - 1) + sUrl); + } + + public static void deleteSyncTokenPerformed(AjaxRequestTarget target, ResourceType resourceType, PageBase pageBase){ + String resourceOid = resourceType.getOid(); + String handlerUri = "http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/live-sync/handler-3"; + ObjectReferenceType resourceRef = new ObjectReferenceType(); + resourceRef.setOid(resourceOid); + PrismObject oldTask; + + OperationResult result = new OperationResult(pageBase.getClass().getName() + "." + "deleteSyncToken"); + ObjectQuery query = pageBase.getPrismContext().queryFor(TaskType.class) + .item(TaskType.F_OBJECT_REF).ref(resourceOid) + .and().item(TaskType.F_HANDLER_URI).eq(handlerUri) + .build(); + + List> taskList = WebModelServiceUtils.searchObjects(TaskType.class, query, result, pageBase); + + if (taskList.size() != 1) { + pageBase.error(pageBase.createStringResource("pageResource.message.invalidTaskSearch")); + } else { + oldTask = taskList.get(0); + saveTask(oldTask, result, pageBase); + } + + result.recomputeStatus(); + pageBase.showResult(result); + target.add(pageBase.getFeedbackPanel()); + } + + public static void saveTask(PrismObject oldTask, OperationResult result, PageBase pageBase){ + Task task = pageBase.createSimpleTask(pageBase.getClass().getName() + "." + "saveSyncTask"); + + PrismProperty property = oldTask.findProperty(ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.SYNC_TOKEN)); + + if(property == null){ + return; + } + Object value = property.getRealValue(); + + ObjectDelta delta = pageBase.getPrismContext().deltaFactory().object().createModifyDelta(oldTask.getOid(), + pageBase.getPrismContext().deltaFactory().property() + .createModificationDeleteProperty(ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.SYNC_TOKEN), property.getDefinition(), value), + TaskType.class); + + if(LOGGER.isTraceEnabled()){ + LOGGER.trace(delta.debugDump()); + } + + try { + pageBase.getModelService().executeChanges(WebComponentUtil.createDeltaCollection(delta), null, task, result); + } catch (Exception e){ + LoggingUtils.logUnexpectedException(LOGGER, "Couldn't save task.", e); + result.recordFatalError("Couldn't save task.", e); + } + result.recomputeStatus(); + } } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebModelServiceUtils.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebModelServiceUtils.java index 3faf4a9c553..2c37e3f30d0 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebModelServiceUtils.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebModelServiceUtils.java @@ -19,6 +19,8 @@ import java.util.*; import com.evolveum.midpoint.model.api.ModelInteractionService; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; +import com.evolveum.midpoint.model.api.authentication.MidPointUserProfilePrincipal; import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.DeltaFactory; import com.evolveum.midpoint.schema.*; @@ -604,7 +606,7 @@ public static TimeZone getTimezone() { } public static TimeZone getTimezone(UserType user) { - MidPointPrincipal principal = SecurityUtils.getPrincipalUser(); + MidPointUserProfilePrincipal principal = SecurityUtils.getPrincipalUser(); if (principal != null && user == null) { user = principal.getUser(); } @@ -613,8 +615,8 @@ public static TimeZone getTimezone(UserType user) { if (user != null && StringUtils.isNotEmpty(user.getTimezone())) { timeZone = user.getTimezone(); } else { - timeZone = principal != null && principal.getAdminGuiConfiguration() != null ? - principal.getAdminGuiConfiguration().getDefaultTimezone() : ""; + timeZone = principal != null && principal.getCompiledUserProfile() != null ? + principal.getCompiledUserProfile().getDefaultTimezone() : ""; } try { if (timeZone != null) { @@ -734,9 +736,9 @@ public static boolean isEnableExperimentalFeature(Task task, ModelServiceLocator ModelInteractionService mInteractionService = pageBase.getModelInteractionService(); - AdminGuiConfigurationType adminGuiConfig = null; + CompiledUserProfile adminGuiConfig = null; try { - adminGuiConfig = mInteractionService.getAdminGuiConfiguration(task, result); + adminGuiConfig = mInteractionService.getCompiledUserProfile(task, result); result.recomputeStatus(); result.recordSuccessIfUnknown(); } catch (Exception e) { diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/AjaxCompositedIconButton.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/AjaxCompositedIconButton.java new file mode 100644 index 00000000000..93610509b5f --- /dev/null +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/AjaxCompositedIconButton.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2010-2017 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.evolveum.midpoint.gui.impl.component; + +import java.util.Map.Entry; + +import org.apache.commons.lang.StringUtils; +import org.apache.wicket.AttributeModifier; +import org.apache.wicket.ajax.markup.html.AjaxLink; +import org.apache.wicket.behavior.AttributeAppender; +import org.apache.wicket.behavior.Behavior; +import org.apache.wicket.markup.ComponentTag; +import org.apache.wicket.markup.MarkupStream; +import org.apache.wicket.markup.parser.XmlTag; +import org.apache.wicket.model.IModel; + +import com.evolveum.midpoint.gui.impl.component.icon.CompositedIcon; + +/** + * @author Viliam Repan (lazyman) + * @author skublik + */ +public abstract class AjaxCompositedIconButton extends AjaxLink { + + private static final long serialVersionUID = 1L; + + private IModel title; + private CompositedIcon icon; + + public AjaxCompositedIconButton(String id, CompositedIcon icon, IModel title) { + super(id); + + this.title = title; + this.icon =icon; + + add(AttributeAppender.append("class", new IModel() { + + private static final long serialVersionUID = 1L; + + @Override + public String getObject() { + return !AjaxCompositedIconButton.this.isEnabled() ? "disabled" : ""; + } + })); + } + + @Override + protected void onInitialize() { + super.onInitialize(); + + if (title != null) { + add(AttributeModifier.replace("title", title)); + } + } + + @Override + public void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { + StringBuilder sb = new StringBuilder(); + + CompositedIcon icon = this.icon; + if(icon.hasBasicIcon()) { + sb.append(" "); + } + + if(icon.hasLayerIcons()) { + for(String entry : icon.getLayerIcons()) { + if (StringUtils.isNotEmpty(entry)) { + sb.append(" "); + } + } + } + + replaceComponentTagBody(markupStream, openTag, sb.toString()); + } + + @Override + protected void onComponentTag(ComponentTag tag) { + super.onComponentTag(tag); + + if (tag.isOpenClose()) { + tag.setType(XmlTag.TagType.OPEN); + } + } +} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/BottomLeftIconCssStyle.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/BottomLeftIconCssStyle.java new file mode 100644 index 00000000000..5a2b107bae9 --- /dev/null +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/BottomLeftIconCssStyle.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.evolveum.midpoint.gui.impl.component.icon; + +/** + * @author skublik + */ +public class BottomLeftIconCssStyle implements LayeredIconCssStyle { + + @Override + public String getBasicCssClass() { + return "icon-basic-transparent"; + } + + @Override + public String getBasicLayerCssClass() { + return "icon-basic-layer"; + } + + @Override + public String getLayerCssClass() { + return "bottom-left-layer"; + } + + @Override + public String getStrokeLayerCssClass() { + return "icon-stroke-layer"; + } + +} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/BottomRightIconCssStyle.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/BottomRightIconCssStyle.java new file mode 100644 index 00000000000..7162856c177 --- /dev/null +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/BottomRightIconCssStyle.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.evolveum.midpoint.gui.impl.component.icon; + +/** + * @author skublik + */ +public class BottomRightIconCssStyle implements LayeredIconCssStyle { + + @Override + public String getBasicCssClass() { + return "icon-basic-transparent"; + } + + @Override + public String getBasicLayerCssClass() { + return "icon-basic-layer"; + } + + @Override + public String getLayerCssClass() { + return "bottom-right-layer"; + } + + @Override + public String getStrokeLayerCssClass() { + return "icon-stroke-layer"; + } + +} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/CompositedIcon.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/CompositedIcon.java new file mode 100644 index 00000000000..2f3dc1a6d68 --- /dev/null +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/CompositedIcon.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.evolveum.midpoint.gui.impl.component.icon; + +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.Validate; + +/** + * @author skublik + */ +public class CompositedIcon { + + private String basicIcon; + private List layerIcons; + + + public CompositedIcon(String basicIcon, List layerIcons){ + this.basicIcon = basicIcon; + this.layerIcons = layerIcons; + } + + public String getBasicIcon() { + return basicIcon; + } + + public List getLayerIcons() { + return layerIcons; + } + + public boolean hasLayerIcons(){ + return getLayerIcons() != null && !getLayerIcons().isEmpty(); + } + public boolean hasBasicIcon() { + return StringUtils.isNotEmpty(getBasicIcon()); + } +} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/CompositedIconBuilder.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/CompositedIconBuilder.java new file mode 100644 index 00000000000..8b7a5ab6edc --- /dev/null +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/CompositedIconBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.evolveum.midpoint.gui.impl.component.icon; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map.Entry; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.Validate; + +/** + * @author skublik + */ +public class CompositedIconBuilder { + + private String basicIcon = ""; + private List layerIcons = new ArrayList(); + + public CompositedIcon build() { + return new CompositedIcon(basicIcon, layerIcons); + } + + private void setBasicIcon(String icon, String style) { + StringBuilder sb = new StringBuilder(icon); + sb.append(" ").append(style); + basicIcon = sb.toString(); + } + + private void appendLayerIcon(String icon) { + layerIcons.add(icon); + } + + private void appendLayerIcon(int index, String icon) { + layerIcons.add(index, icon); + } + + public CompositedIconBuilder setBasicIcon(String icon, IconCssStyle style) { + return setBasicIcon(icon, style, ""); + } + + public CompositedIconBuilder setBasicIcon(String icon, IconCssStyle style, String additionalCssClass) { + validateInput(icon, style); + setBasicIcon(icon, style.getBasicCssClass() + " " + additionalCssClass); + return this; + } + + public CompositedIconBuilder setBasicIcon(String icon, LayeredIconCssStyle style) { + return setBasicIcon(icon, style, ""); + } + + public CompositedIconBuilder setBasicIcon(String icon, LayeredIconCssStyle style, String additionalCssClass) { + validateInput(icon, style); + setBasicIcon(icon, style.getBasicCssClass()); + StringBuilder sb = new StringBuilder(icon); + sb.append(" ").append(style.getBasicLayerCssClass()); + if(StringUtils.isNotEmpty(additionalCssClass)) { + sb.append(" ").append(additionalCssClass); + } + appendLayerIcon(0, sb.toString()); + return this; + } + + public CompositedIconBuilder appendLayerIcon(String icon, CompositedIconCssStyle style) { + return appendLayerIcon(icon, style, ""); + } + + public CompositedIconBuilder appendLayerIcon(String icon, CompositedIconCssStyle style, String additionalCssClass) { + validateInput(icon, style); + StringBuilder sb = new StringBuilder(icon); + sb.append(" "); + if(layerIcons.isEmpty()) { + sb.append(style.getLayerIconCssClassOfFirstIcon()); + } else { + sb.append(style.getLayerCssClass()); + } + if(StringUtils.isNotEmpty(additionalCssClass)) { + sb.append(" ").append(additionalCssClass); + } + appendLayerIcon(sb.toString()); + return this; + } + + public CompositedIconBuilder appendLayerIcon(String icon, LayeredIconCssStyle style) { + return appendLayerIcon(icon, style, ""); + } + + public CompositedIconBuilder appendLayerIcon(String icon, LayeredIconCssStyle style, String additionalCssClass) { + validateInput(icon, style); + StringBuilder sb = new StringBuilder(icon); + sb.append(" ").append(style.getLayerCssClass()); + if(StringUtils.isNotEmpty(additionalCssClass)) { + sb.append(" ").append(additionalCssClass); + } + String layerIconClass = sb.toString(); + sb.append(" ").append(style.getStrokeLayerCssClass()); + appendLayerIcon(sb.toString()); + appendLayerIcon(layerIconClass); + return this; + } + + public CompositedIconBuilder appendLayerIcon(String icon, IconCssStyle style) { + return appendLayerIcon(icon, style, ""); + } + + public CompositedIconBuilder appendLayerIcon(String icon, IconCssStyle style, String additionalCssClass) { + validateInput(icon, style); + StringBuilder sb = new StringBuilder(icon); + sb.append(" ").append(style.getLayerCssClass()); + if(StringUtils.isNotEmpty(additionalCssClass)) { + sb.append(" ").append(additionalCssClass); + } + appendLayerIcon(sb.toString()); + return this; + } + + private void validateInput(String icon, IconCssStyle style) { + Validate.notNull(icon, "no icon class"); + Validate.notNull(style, "no icon style"); + } +} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/CompositedIconCssStyle.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/CompositedIconCssStyle.java new file mode 100644 index 00000000000..f32380a7085 --- /dev/null +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/CompositedIconCssStyle.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.evolveum.midpoint.gui.impl.component.icon; + +/** + * @author skublik + */ +public interface CompositedIconCssStyle extends IconCssStyle { + + public String getLayerIconCssClassOfFirstIcon(); +} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/IconCssStyle.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/IconCssStyle.java new file mode 100644 index 00000000000..f1e73aab453 --- /dev/null +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/IconCssStyle.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.evolveum.midpoint.gui.impl.component.icon; + +/** + * @author skublik + */ +public interface IconCssStyle { + + public static final BottomLeftIconCssStyle BOTTOM_LEFT_STYLE = new BottomLeftIconCssStyle(); + public static final BottomRightIconCssStyle BOTTOM_RIGHT_STYLE = new BottomRightIconCssStyle(); + public static final InRowIconCssStyle IN_ROW_STYLE = new InRowIconCssStyle(); + + public String getBasicCssClass(); + + public String getLayerCssClass(); +} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/InRowIconCssStyle.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/InRowIconCssStyle.java new file mode 100644 index 00000000000..7d6cae9b616 --- /dev/null +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/InRowIconCssStyle.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.evolveum.midpoint.gui.impl.component.icon; + +/** + * @author skublik + */ +public class InRowIconCssStyle implements CompositedIconCssStyle { + + @Override + public String getBasicCssClass() { + return ""; + } + + @Override + public String getLayerCssClass() { + return "in-row-layer"; + } + + @Override + public String getLayerIconCssClassOfFirstIcon() { + return ""; + } + +} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/LayeredIconCssStyle.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/LayeredIconCssStyle.java new file mode 100644 index 00000000000..d5d2ed756f3 --- /dev/null +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/icon/LayeredIconCssStyle.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.evolveum.midpoint.gui.impl.component.icon; + +/** + * @author skublik + */ +public interface LayeredIconCssStyle extends IconCssStyle { + + public String getBasicLayerCssClass(); + + public String getStrokeLayerCssClass(); + +} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/boot/WebSecurityConfig.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/boot/WebSecurityConfig.java old mode 100755 new mode 100644 index 61d4003d291..dbfdc41e8ef --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/boot/WebSecurityConfig.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/boot/WebSecurityConfig.java @@ -40,6 +40,7 @@ import org.springframework.security.web.authentication.logout.LogoutFilter; import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler; import org.springframework.security.web.authentication.preauth.RequestHeaderAuthenticationFilter; +import org.springframework.security.web.authentication.preauth.RequestAttributeAuthenticationFilter; import java.util.Arrays; @@ -63,6 +64,8 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Value("${auth.sso.header:SM_USER}") private String principalRequestHeader; + @Value("${auth.sso.env:REMOTE_USER}") + private String principalRequestEnvVariable; @Value("${auth.cas.server.url:}") private String casServerUrl; @@ -162,6 +165,10 @@ protected void configure(HttpSecurity http) throws Exception { if (Arrays.stream(environment.getActiveProfiles()).anyMatch(p -> p.equalsIgnoreCase("sso"))) { http.addFilterBefore(requestHeaderAuthenticationFilter(), LogoutFilter.class); } + + if (Arrays.stream(environment.getActiveProfiles()).anyMatch(p -> p.equalsIgnoreCase("ssoenv"))) { + http.addFilterBefore(requestAttributeAuthenticationFilter(), LogoutFilter.class); + } } @Bean @@ -214,6 +221,17 @@ public RequestHeaderAuthenticationFilter requestHeaderAuthenticationFilter() { return filter; } + @Profile("ssoenv") + @Bean + public RequestAttributeAuthenticationFilter requestAttributeAuthenticationFilter() { + RequestAttributeAuthenticationFilter filter = new RequestAttributeAuthenticationFilter(); + filter.setPrincipalEnvironmentVariable(principalRequestEnvVariable); + filter.setExceptionIfVariableMissing(false); + filter.setAuthenticationManager(authenticationManager); + + return filter; + } + @Profile("cas") @Bean public CasAuthenticationFilter casFilter() { diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/AbstractSummaryPanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/AbstractSummaryPanel.java index 356f413f2df..e003a3a398b 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/AbstractSummaryPanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/AbstractSummaryPanel.java @@ -202,7 +202,7 @@ private GuiFlexibleLabelType getLabelConfiguration(QName configurationPropertyNa if (subContainer == null) { return null; } - return subContainer.getValue().asContainerable(); + return subContainer.getRealValue(); } protected String getTagBoxCssClass() { diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/ObjectSummaryPanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/ObjectSummaryPanel.java index e255c6bbb2f..10b57bc2a2b 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/ObjectSummaryPanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/ObjectSummaryPanel.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2016-2017 Evolveum + * Copyright (c) 2016-2018 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,10 +16,9 @@ package com.evolveum.midpoint.web.component; import com.evolveum.midpoint.gui.api.util.ModelServiceLocator; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.prism.PrismObject; -import com.evolveum.midpoint.schema.util.AdminGuiConfigTypeUtil; import com.evolveum.midpoint.web.model.ContainerableFromPrismObjectModel; -import com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType; import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectDetailsPageType; import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; import com.evolveum.midpoint.xml.ns._public.common.common_3.SummaryPanelSpecificationType; @@ -30,11 +29,11 @@ public abstract class ObjectSummaryPanel extends AbstractS private static final long serialVersionUID = -3755521482914447912L; public ObjectSummaryPanel(String id, Class type, final IModel> model, ModelServiceLocator serviceLocator) { - super(id, new ContainerableFromPrismObjectModel<>(model), serviceLocator, determineConfig(type, serviceLocator.getAdminGuiConfiguration())); + super(id, new ContainerableFromPrismObjectModel<>(model), serviceLocator, determineConfig(type, serviceLocator.getCompiledUserProfile())); } - private static SummaryPanelSpecificationType determineConfig(Class type, AdminGuiConfigurationType adminGuiConfig) { - GuiObjectDetailsPageType guiObjectDetailsType = AdminGuiConfigTypeUtil.findObjectConfiguration(type, adminGuiConfig); + private static SummaryPanelSpecificationType determineConfig(Class type, CompiledUserProfile compiledUserProfile) { + GuiObjectDetailsPageType guiObjectDetailsType = compiledUserProfile.findObjectDetailsConfiguration(type); if (guiObjectDetailsType == null) { return null; } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/assignment/AssignmentsUtil.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/assignment/AssignmentsUtil.java index 7d9f24aa3d7..76d645aefb1 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/assignment/AssignmentsUtil.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/assignment/AssignmentsUtil.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.evolveum.midpoint.web.component.assignment; import java.util.Date; @@ -11,8 +26,12 @@ import com.evolveum.midpoint.schema.constants.SchemaConstants; import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.util.QNameUtil; +import com.evolveum.midpoint.util.exception.CommunicationException; +import com.evolveum.midpoint.util.exception.ConfigurationException; +import com.evolveum.midpoint.util.exception.ExpressionEvaluationException; import com.evolveum.midpoint.util.exception.ObjectNotFoundException; import com.evolveum.midpoint.util.exception.SchemaException; +import com.evolveum.midpoint.util.exception.SecurityViolationException; import com.evolveum.midpoint.web.component.prism.ContainerValueWrapper; import com.evolveum.midpoint.web.component.prism.ContainerWrapper; import com.evolveum.midpoint.web.session.RoleCatalogStorage; @@ -25,6 +44,7 @@ import com.evolveum.midpoint.gui.api.page.PageBase; import com.evolveum.midpoint.gui.api.util.WebComponentUtil; import com.evolveum.midpoint.gui.impl.model.PropertyWrapperFromContainerValueWrapperModel; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.util.MiscUtil; import com.evolveum.midpoint.util.logging.Trace; import com.evolveum.midpoint.util.logging.TraceManager; @@ -412,12 +432,12 @@ public static boolean isShoppingCartAssignmentsLimitReached(int assignmentsLimit public static int loadAssignmentsLimit(OperationResult result, PageBase pageBase){ int assignmentsLimit = -1; try { - AdminGuiConfigurationType adminGuiConfig = pageBase.getModelInteractionService().getAdminGuiConfiguration( + CompiledUserProfile adminGuiConfig = pageBase.getModelInteractionService().getCompiledUserProfile( pageBase.createSimpleTask(result.getOperation()), result);//pageBase.loadUserSelf().asObjectable().getAdminGuiConfiguration(); if (adminGuiConfig != null && adminGuiConfig.getRoleManagement() != null){ assignmentsLimit = adminGuiConfig.getRoleManagement().getAssignmentApprovalRequestLimit(); } - } catch (ObjectNotFoundException | SchemaException ex){ + } catch (ObjectNotFoundException | SchemaException | CommunicationException | ConfigurationException | SecurityViolationException | ExpressionEvaluationException ex){ LOGGER.error("Error getting system configuration: {}", ex.getMessage(), ex); } return assignmentsLimit; diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/assignment/ConstructionAssociationPanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/assignment/ConstructionAssociationPanel.java index 8cd8c4cd85b..24a7a7dcdc8 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/assignment/ConstructionAssociationPanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/assignment/ConstructionAssociationPanel.java @@ -81,7 +81,7 @@ private void initModels() { resourceModel = new LoadableDetachableModel>() { @Override protected PrismObject load() { - ConstructionType construction = getModelObject().getItem().getValue().asContainerable(); + ConstructionType construction = getModelObject().getItem().getRealValue(); ObjectReferenceType resourceRef = construction.getResourceRef(); Task loadResourceTask = getPageBase().createSimpleTask(OPERATION_LOAD_RESOURCE); OperationResult result = new OperationResult(OPERATION_LOAD_RESOURCE); @@ -98,7 +98,7 @@ protected PrismObject load() { refinedAssociationDefinitionsModel = new LoadableDetachableModel>() { @Override protected List load() { - ConstructionType construction = getModelObject().getItem().getValue().asContainerable(); + ConstructionType construction = getModelObject().getItem().getRealValue(); if (construction == null){ return new ArrayList<>(); } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/BaseSortableDataProvider.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/BaseSortableDataProvider.java index d95bfc8c7c4..5411f42dd70 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/BaseSortableDataProvider.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/BaseSortableDataProvider.java @@ -19,6 +19,8 @@ import com.evolveum.midpoint.gui.api.page.PageBase; import com.evolveum.midpoint.gui.api.util.WebComponentUtil; import com.evolveum.midpoint.model.api.*; +import com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.prism.PrismContext; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.prism.query.ObjectOrdering; @@ -212,7 +214,8 @@ protected boolean checkOrderingSettings() { } public boolean isDistinct() { - GuiObjectListViewType def = WebComponentUtil.getDefaultGuiObjectListType((PageBase) component.getPage()); + // TODO: Default list view setting should never be needed. Always check setting for specific object type (and archetype). + CompiledObjectCollectionView def = WebComponentUtil.getDefaultGuiObjectListType((PageBase) component.getPage()); return def == null || def.getDistinct() != DistinctSearchOptionType.NEVER; // change after other options are added } @@ -239,7 +242,8 @@ public boolean isOrderingDisabled() { if (!checkOrderingSettings()) { return false; } - GuiObjectListViewType def = WebComponentUtil.getDefaultGuiObjectListType((PageBase) component.getPage()); + // TODO: Default list view setting should never be needed. Always check setting for specific object type (and archetype). + CompiledObjectCollectionView def = WebComponentUtil.getDefaultGuiObjectListType((PageBase) component.getPage()); return def != null && def.isDisableSorting(); } @@ -382,7 +386,7 @@ public String toString() { private void setExportLimitValue() { OperationResult result = new OperationResult(OPERATION_GET_EXPORT_SIZE_LIMIT); try { - AdminGuiConfigurationType adminGui = getModelInteractionService().getAdminGuiConfiguration(null, result); + CompiledUserProfile adminGui = getModelInteractionService().getCompiledUserProfile(null, result); if (adminGui.getDefaultExportSettings() != null && adminGui.getDefaultExportSettings().getSizeLimit() != null) { exportLimit = adminGui.getDefaultExportSettings().getSizeLimit(); } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/column/ColumnUtils.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/column/ColumnUtils.java index 4bc6e1caf1c..90ddcfd21ad 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/column/ColumnUtils.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/column/ColumnUtils.java @@ -22,6 +22,8 @@ import javax.xml.namespace.QName; +import com.evolveum.midpoint.gui.api.page.PageBase; +import com.evolveum.midpoint.model.api.ArchetypeInteractionSpecification; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; import com.evolveum.midpoint.prism.path.ItemPath; import org.apache.wicket.Component; @@ -112,305 +114,120 @@ public static List, String>> ge } } - public static IColumn, String> createIconColumn(Class type){ + public static IColumn, String> createIconColumn(Class type, PageBase pageBase){ - if (type.equals(ObjectType.class)){ - return getDefaultIcons(); - } - - if (type.equals(UserType.class)) { - return getUserIconColumn(); - } else if (RoleType.class.equals(type)) { - return getRoleIconColumn(); - } else if (OrgType.class.equals(type)) { - return getOrgIconColumn(); - } else if (ServiceType.class.equals(type)) { - return getServiceIconColumn(); - } else if (ShadowType.class.equals(type)) { - return getShadowIconColumn(); - } else if (type.equals(TaskType.class)) { - return getTaskIconColumn(); - } else if (type.equals(ResourceType.class)) { - return getResourceIconColumn(); - } else if (type.equals(AccessCertificationDefinitionType.class)) { - return getAccessCertificationDefinitionIconColumn(); - } else { - return getEmptyIconColumn(); -// throw new UnsupportedOperationException("Will be implemented eventually"); - } - } - - private static IColumn, String> getEmptyIconColumn(){ - return new IconColumn>(createIconColumnHeaderModel()) { - private static final long serialVersionUID = 1L; + return new IconColumn>(createIconColumnHeaderModel()) { @Override - protected IModel createIconModel(final IModel> rowModel) { - return new IModel() { - private static final long serialVersionUID = 1L; - - @Override - public String getObject() { - return ""; - } - }; + public void populateItem(Item>> cellItem, String componentId, IModel> rowModel) { + DisplayType displayType = getDisplayTypeForRowObject(rowModel, pageBase); + if (displayType != null){ + cellItem.add(new ImagePanel(componentId, displayType)); + } else { + super.populateItem(cellItem, componentId, rowModel); + } } - }; - } - - private static IColumn, String> getDefaultIcons(){ - return new IconColumn>(createIconColumnHeaderModel()) { @Override - protected IModel createIconModel(final IModel> rowModel) { - return new IModel() { - private static final long serialVersionUID = 1L; - - @Override - public String getObject() { - T object = rowModel.getObject().getValue(); - return object != null ? WebComponentUtil.createDefaultIcon(object.asPrismObject()) : null; - } - }; - + protected IModel createIconModel(final IModel> rowModel) { + return Model.of(getIconColumnValue(type, rowModel)); } @Override - protected IModel createTitleModel(final IModel> rowModel) { - - return new IModel() { - - @Override - public String getObject() { - T object = rowModel.getObject().getValue(); - return object.asPrismContainer().getDefinition().getTypeName().getLocalPart(); - } - }; + protected IModel createTitleModel(final IModel> rowModel) { + return Model.of(getIconColumnTitle(type, rowModel)); } - }; - } - private static IModel createIconColumnHeaderModel() { - return new Model() { @Override - public String getObject() { - return ""; + public IModel getDataModel(IModel> rowModel) { + return getIconColumnDataModel(type, rowModel); } }; - } - - private static IColumn, String> getUserIconColumn(){ - return new IconColumn>(createIconColumnHeaderModel()) { - private static final long serialVersionUID = 1L; - @Override - protected IModel createIconModel(final IModel> rowModel) { - return new IModel() { - private static final long serialVersionUID = 1L; + } - @Override - public String getObject() { - T user = rowModel.getObject().getValue(); - return user != null ? WebComponentUtil.createUserIcon(user.asPrismContainer()) : null; - } - }; + private static DisplayType getDisplayTypeForRowObject(IModel> rowModel, PageBase pageBase){ + O object = rowModel.getObject().getValue(); + if (object != null) { + ArchetypeInteractionSpecification archetypeSpec = WebComponentUtil.getArchetypeSpecification(object.asPrismObject(), pageBase); + if (archetypeSpec != null && archetypeSpec.getArchetypePolicy() != null) { + return archetypeSpec.getArchetypePolicy().getDisplay(); } - - @Override - protected IModel createTitleModel(final IModel> rowModel) { - - return new IModel() { - - @Override - public String getObject() { - T user = rowModel.getObject().getValue(); - String iconClass = user != null ? WebComponentUtil.createUserIcon(user.asPrismContainer()) : null; - String compareStringValue = GuiStyleConstants.CLASS_OBJECT_USER_ICON + " " + GuiStyleConstants.CLASS_ICON_STYLE; - String titleValue = ""; - if (iconClass != null && - iconClass.startsWith(compareStringValue) && - iconClass.length() > compareStringValue.length()){ - titleValue = iconClass.substring(compareStringValue.length()); - } - return createStringResource("ColumnUtils.getUserIconColumn.createTitleModel." + titleValue) == null ? - "" : createStringResource("ColumnUtils.getUserIconColumn.createTitleModel." + titleValue).getString(); - } - }; - } - - }; + } + return null; } - public static IColumn, String> getShadowIconColumn(){ - return new IconColumn>(createIconColumnHeaderModel()) { - private static final long serialVersionUID = 1L; - - @Override - protected IModel createIconModel(final IModel> rowModel) { - return new IModel() { - private static final long serialVersionUID = 1L; - - @Override - public String getObject() { - T shadow = rowModel.getObject().getValue(); - if (shadow == null) { - return WebComponentUtil.createErrorIcon(rowModel.getObject().getResult()); - } else { - return WebComponentUtil.createShadowIcon(shadow.asPrismContainer()); - } - } - }; + private static String getIconColumnValue(Class type, IModel> rowModel){ + T object = rowModel.getObject().getValue(); + if (object == null && !ShadowType.class.equals(type)){ + return null; + } else if (type.equals(ObjectType.class)){ + return WebComponentUtil.createDefaultIcon(object.asPrismObject()); + } else if (type.equals(UserType.class)) { + return WebComponentUtil.createUserIcon(object.asPrismContainer()); + } else if (RoleType.class.equals(type)) { + return WebComponentUtil.createRoleIcon(object.asPrismContainer()); + } else if (OrgType.class.equals(type)) { + return WebComponentUtil.createOrgIcon(object.asPrismContainer()); + } else if (ServiceType.class.equals(type)) { + return WebComponentUtil.createServiceIcon(object.asPrismContainer()) ; + } else if (ShadowType.class.equals(type)) { + if (object == null) { + return WebComponentUtil.createErrorIcon(rowModel.getObject().getResult()); + } else { + return WebComponentUtil.createShadowIcon(object.asPrismContainer()); } + } else if (type.equals(TaskType.class)) { + return WebComponentUtil.createTaskIcon(object.asPrismContainer()); + } else if (type.equals(ResourceType.class)) { + return WebComponentUtil.createResourceIcon(object.asPrismContainer()); + } else if (type.equals(AccessCertificationDefinitionType.class)) { + return GuiStyleConstants.CLASS_OBJECT_CERT_DEF_ICON + " " + GuiStyleConstants.CLASS_ICON_STYLE_NORMAL; + } else { + return ""; +// throw new UnsupportedOperationException("Will be implemented eventually"); + } - @Override - public Component getHeader(String componentId) { - return new Label(componentId, ""); - } + } - @Override - public IModel getDataModel(IModel> rowModel) { + private static IModel getIconColumnDataModel(Class type, IModel> rowModel){ + if (ShadowType.class.equals(type)) { T shadow = rowModel.getObject().getValue(); if (shadow == null){ - return super.getDataModel(rowModel); + return null; } return ShadowUtil.isProtected(shadow.asPrismContainer()) ? createStringResource("ThreeStateBooleanPanel.true") : createStringResource("ThreeStateBooleanPanel.false"); - } - - @Override - public IModel getDisplayModel(){ - //TODO what for this label is needed? getHeader is overrided and sends "" as label -// return createStringResource("pageContentAccounts.isProtected"); - //fix for icon column width - return Model.of(""); - } - }; - } - - private static IColumn, String> getRoleIconColumn(){ - return new IconColumn>(createIconColumnHeaderModel()) { - private static final long serialVersionUID = 1L; - - @Override - protected IModel createIconModel(final IModel> rowModel) { - return new IModel() { - private static final long serialVersionUID = 1L; - - @Override - public String getObject() { - T role = rowModel.getObject().getValue(); - return role != null ? WebComponentUtil.createRoleIcon(role.asPrismContainer()) : null; - } - }; - } - }; - } - - private static IColumn, String> getOrgIconColumn(){ - return new IconColumn>(createIconColumnHeaderModel()) { - private static final long serialVersionUID = 1L; - - @Override - protected IModel createIconModel(final IModel> rowModel) { - return new IModel() { - private static final long serialVersionUID = 1L; - - @Override - public String getObject() { - T org = rowModel.getObject().getValue(); - return org != null ? WebComponentUtil.createOrgIcon(org.asPrismContainer()) : null; - } - }; - } - }; - } - - private static IColumn, String> getServiceIconColumn(){ - return new IconColumn>(createIconColumnHeaderModel()) { - - /** - * - */ - private static final long serialVersionUID = 1L; - - @Override - protected IModel createIconModel(final IModel> rowModel) { - return new IModel() { - - /** - * - */ - private static final long serialVersionUID = 1L; - - @Override - public String getObject() { - T service = rowModel.getObject().getValue(); - return service != null ? WebComponentUtil.createServiceIcon(service.asPrismContainer()) : null; - } - }; - } - }; + } + return null; } - private static IColumn, String> getTaskIconColumn(){ - return new IconColumn>(createIconColumnHeaderModel()) { - private static final long serialVersionUID = 1L; - - @Override - protected IModel createIconModel(final IModel> rowModel) { - return new IModel() { - - private static final long serialVersionUID = 1L; - - @Override - public String getObject() { - T task = rowModel.getObject().getValue(); - return task != null ? WebComponentUtil.createTaskIcon(task.asPrismContainer()) : null; - } - }; + private static String getIconColumnTitle(Class type, IModel> rowModel){ + T object = rowModel.getObject().getValue(); + if (object == null && !ShadowType.class.equals(type)){ + return null; + } else if (type.equals(UserType.class)) { + String iconClass = object != null ? WebComponentUtil.createUserIcon(object.asPrismContainer()) : null; + String compareStringValue = GuiStyleConstants.CLASS_OBJECT_USER_ICON + " " + GuiStyleConstants.CLASS_ICON_STYLE; + String titleValue = ""; + if (iconClass != null && + iconClass.startsWith(compareStringValue) && + iconClass.length() > compareStringValue.length()){ + titleValue = iconClass.substring(compareStringValue.length()); } - }; - } - - private static IColumn, String> getAccessCertificationDefinitionIconColumn(){ - return new IconColumn>(createIconColumnHeaderModel()) { - private static final long serialVersionUID = 1L; - - @Override - protected IModel createIconModel(final IModel> rowModel) { - return new IModel() { - private static final long serialVersionUID = 1L; - - @Override - public String getObject() { - return GuiStyleConstants.CLASS_OBJECT_CERT_DEF_ICON + " " + GuiStyleConstants.CLASS_ICON_STYLE_NORMAL; - } - }; - } - }; + return createStringResource("ColumnUtils.getUserIconColumn.createTitleModel." + titleValue) == null ? + "" : createStringResource("ColumnUtils.getUserIconColumn.createTitleModel." + titleValue).getString(); + } else { + return object.asPrismContainer().getDefinition().getTypeName().getLocalPart(); + } } - - private static IColumn, String> getResourceIconColumn(){ - return new IconColumn>(createIconColumnHeaderModel()) { - private static final long serialVersionUID = 1L; - + private static IModel createIconColumnHeaderModel() { + return new Model() { @Override - protected IModel createIconModel(final IModel> rowModel) { - return new IModel() { - private static final long serialVersionUID = 1L; - - @Override - public String getObject() { - T resource = rowModel.getObject().getValue(); - if (resource == null) { - return GuiStyleConstants.CLASS_OBJECT_RESOURCE_ICON; - } else { - return WebComponentUtil.createResourceIcon(resource.asPrismContainer()); - } - } - }; + public String getObject() { + return ""; } }; } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/column/ImagePanel.html b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/column/ImagePanel.html index 87d6e7bfc76..655ed4b831e 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/column/ImagePanel.html +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/column/ImagePanel.html @@ -18,5 +18,6 @@ + diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/column/ImagePanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/column/ImagePanel.java index 0dd77c719f2..2fa5570a051 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/column/ImagePanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/column/ImagePanel.java @@ -16,8 +16,16 @@ package com.evolveum.midpoint.web.component.data.column; +import com.evolveum.midpoint.gui.api.util.WebComponentUtil; +import com.evolveum.midpoint.web.component.util.VisibleBehaviour; +import com.evolveum.midpoint.xml.ns._public.common.common_3.DisplayType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.IconType; +import com.evolveum.prism.xml.ns._public.types_3.PolyStringType; +import org.apache.commons.lang.StringUtils; import org.apache.wicket.AttributeModifier; +import org.apache.wicket.behavior.AttributeAppender; import org.apache.wicket.markup.html.basic.Label; +import org.apache.wicket.markup.html.image.ExternalImage; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.IModel; @@ -26,17 +34,50 @@ */ public class ImagePanel extends Panel { + //image can be defined either with css class or with image file source; therefore we need to use 2 different tags for each case private static final String ID_IMAGE = "image"; + private static final String ID_IMAGE_SRC = "imageSrc"; - public ImagePanel(String id, IModel model, IModel titleModel) { + private DisplayType iconDisplayData; + + public ImagePanel(String id, IModel iconClassModel, IModel titleModel) { + super(id); + iconDisplayData = new DisplayType(); + IconType icon = new IconType(); + icon.setCssClass(iconClassModel != null ? iconClassModel.getObject() : null); + iconDisplayData.setIcon(icon); + + PolyStringType title = new PolyStringType(titleModel != null ? titleModel.getObject() : null); + iconDisplayData.setTooltip(title); + } + + public ImagePanel(String id, DisplayType iconDisplayData){ super(id); + this.iconDisplayData = iconDisplayData == null ? new DisplayType() : iconDisplayData; + } + @Override + protected void onInitialize(){ + super.onInitialize(); + initLayout(); + } + + private void initLayout(){ Label image = new Label(ID_IMAGE); + image.add(AttributeModifier.replace("class", iconDisplayData.getIcon() != null ? iconDisplayData.getIcon().getCssClass() : "")); + if (iconDisplayData.getTooltip() != null && StringUtils.isNotEmpty(iconDisplayData.getTooltip().getOrig())) { + image.add(AttributeModifier.replace("title", iconDisplayData.getTooltip().getOrig())); + } + if (iconDisplayData.getIcon() != null && StringUtils.isNotEmpty(iconDisplayData.getIcon().getColor())){ + image.add(AttributeAppender.append("style", "color: " + iconDisplayData.getIcon().getColor() + ";")); + } + image.setOutputMarkupId(true); + image.add(new VisibleBehaviour(() -> iconDisplayData.getIcon() != null && StringUtils.isNotEmpty(iconDisplayData.getIcon().getCssClass()))); add(image); - image.add(AttributeModifier.replace("class", model)); - if (titleModel != null) { - image.add(AttributeModifier.replace("title", titleModel)); - } + ExternalImage customLogoImgSrc = new ExternalImage(ID_IMAGE_SRC, WebComponentUtil.getIconUrlModel(iconDisplayData.getIcon())); + customLogoImgSrc.setOutputMarkupId(true); + customLogoImgSrc.add(new VisibleBehaviour(() -> iconDisplayData.getIcon() != null && StringUtils.isNotEmpty(iconDisplayData.getIcon().getImageUrl()))); + add(customLogoImgSrc); } } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/model/delta/ContainerValueDto.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/model/delta/ContainerValueDto.java index ba82bff5a9a..677a90f0850 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/model/delta/ContainerValueDto.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/model/delta/ContainerValueDto.java @@ -17,7 +17,6 @@ package com.evolveum.midpoint.web.component.model.delta; import com.evolveum.midpoint.prism.Item; -import com.evolveum.midpoint.prism.PrismContainer; import com.evolveum.midpoint.prism.PrismContainerValue; import java.io.Serializable; @@ -44,8 +43,4 @@ public ContainerValueDto(PrismContainerValue value) { Collections.sort(itemList); } - - public ContainerValueDto(PrismContainer container) { - this(container.getValue()); - } } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/model/delta/DeltaDto.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/model/delta/DeltaDto.java index 506022d98ea..f13b570f0c0 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/model/delta/DeltaDto.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/model/delta/DeltaDto.java @@ -41,7 +41,7 @@ public class DeltaDto implements Serializable { private ContainerValueDto objectToAdd; private boolean add; - public DeltaDto(ObjectDelta delta) { + public DeltaDto(ObjectDelta delta) { changeType = "" + delta.getChangeType(); oid = delta.getOid(); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/ContainerWrapperFactory.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/ContainerWrapperFactory.java index c94c299dfcc..064e2af5bb5 100755 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/ContainerWrapperFactory.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/ContainerWrapperFactory.java @@ -165,7 +165,7 @@ public ShadowAssociationWrapper createAssociationWrapp } if (resourceAssociation.getRef().getItemPath().asSingleName().equals(refinedAssocationDefinition.getName())){ itemPath = associationValue.getPath(); - MappingType outbound = ((ResourceObjectAssociationType)association.getValue().asContainerable()).getOutbound(); + MappingType outbound = ((ResourceObjectAssociationType)association.getRealValue()).getOutbound(); if (outbound == null){ continue; } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/PrismValuePanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/PrismValuePanel.java index 4d259117d13..54acd17dedd 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/PrismValuePanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/PrismValuePanel.java @@ -691,8 +691,7 @@ public DeltaDto getObject() { ObjectDeltaType objectDeltaType = (ObjectDeltaType) ((PrismPropertyValue) getModel().getObject() .getValue()).getValue(); try { - ObjectDelta delta = DeltaConvertor.createObjectDelta(objectDeltaType, prismContext); - return new DeltaDto(delta); + return new DeltaDto(DeltaConvertor.createObjectDelta(objectDeltaType, prismContext)); } catch (SchemaException e) { throw new IllegalStateException("Couldn't convert object delta: " + objectDeltaType); } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/PropertyOrReferenceWrapper.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/PropertyOrReferenceWrapper.java index dec0e5e29b7..ff02276d1a9 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/PropertyOrReferenceWrapper.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/PropertyOrReferenceWrapper.java @@ -305,7 +305,7 @@ public I getUpdatedItem(PrismContext prismContext) throws SchemaException { valueWrapper.normalize(prismContext); if (ValueStatus.DELETED.equals(valueWrapper.getStatus())) { updatedItem.remove(valueWrapper.getValue()); - } else if (!updatedItem.hasValueIgnoringMetadata(valueWrapper.getValue())) { + } else if (!updatedItem.containsEquivalentValue(valueWrapper.getValue(), null)) { PrismValue cloned = ObjectWrapper.clone(valueWrapper.getValue()); if (cloned != null) { updatedItem.add(cloned); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/show/PagePreviewChanges.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/show/PagePreviewChanges.java index 06a880d2367..35839466f3b 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/show/PagePreviewChanges.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/show/PagePreviewChanges.java @@ -17,22 +17,10 @@ import com.evolveum.midpoint.gui.api.component.tabs.PanelTab; import com.evolveum.midpoint.gui.api.util.WebComponentUtil; -import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils; import com.evolveum.midpoint.model.api.ModelInteractionService; import com.evolveum.midpoint.model.api.context.ModelContext; -import com.evolveum.midpoint.model.api.context.ModelProjectionContext; -import com.evolveum.midpoint.model.api.visualizer.Scene; import com.evolveum.midpoint.prism.PrismObject; -import com.evolveum.midpoint.prism.delta.ObjectDelta; -import com.evolveum.midpoint.repo.common.ObjectResolver; -import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.security.api.AuthorizationConstants; -import com.evolveum.midpoint.task.api.Task; -import com.evolveum.midpoint.util.DebugUtil; -import com.evolveum.midpoint.util.exception.ExpressionEvaluationException; -import com.evolveum.midpoint.util.exception.SchemaException; -import com.evolveum.midpoint.util.exception.SystemException; -import com.evolveum.midpoint.util.logging.LoggingUtils; import com.evolveum.midpoint.util.logging.Trace; import com.evolveum.midpoint.util.logging.TraceManager; import com.evolveum.midpoint.web.application.AuthorizationAction; @@ -42,18 +30,11 @@ import com.evolveum.midpoint.web.component.breadcrumbs.Breadcrumb; import com.evolveum.midpoint.web.component.breadcrumbs.BreadcrumbPageInstance; import com.evolveum.midpoint.web.component.util.VisibleBehaviour; -import com.evolveum.midpoint.web.component.wf.ApprovalProcessesPreviewPanel; import com.evolveum.midpoint.web.page.admin.PageAdmin; import com.evolveum.midpoint.web.page.admin.PageAdminObjectDetails; -import com.evolveum.midpoint.web.page.admin.roles.PageAdminRoles; -import com.evolveum.midpoint.web.page.admin.services.PageAdminServices; -import com.evolveum.midpoint.web.page.admin.users.PageAdminUsers; -import com.evolveum.midpoint.web.page.admin.workflow.EvaluatedTriggerGroupListPanel; -import com.evolveum.midpoint.web.page.admin.workflow.dto.ApprovalProcessExecutionInformationDto; import com.evolveum.midpoint.web.page.admin.workflow.dto.EvaluatedTriggerGroupDto; import com.evolveum.midpoint.web.util.OnePageParameterEncoder; import com.evolveum.midpoint.xml.ns._public.common.common_3.AbstractRoleType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.ApprovalSchemaExecutionInformationType; import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; import com.evolveum.midpoint.xml.ns._public.common.common_3.PolicyRuleEnforcerHookPreviewOutputType; import org.apache.wicket.ajax.AjaxRequestTarget; @@ -73,17 +54,13 @@ * @author mederly */ @PageDescriptor(url = "/admin/previewChanges", encoder = OnePageParameterEncoder.class, action = { - @AuthorizationAction(actionUri = PageAdminUsers.AUTH_USERS_ALL, - label = PageAdminUsers.AUTH_USERS_ALL_LABEL, - description = PageAdminUsers.AUTH_USERS_ALL_DESCRIPTION), - @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USER_URL, - label = "PageUser.auth.user.label", - description = "PageUser.auth.user.description"), - @AuthorizationAction(actionUri = PageAdminRoles.AUTH_ROLE_ALL, label = PageAdminRoles.AUTH_ROLE_ALL_LABEL, description = PageAdminRoles.AUTH_ROLE_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USERS_ALL_URL, label = "PageAdminUsers.auth.usersAll.label", description = "PageAdminUsers.auth.usersAll.description"), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USER_URL, label = "PageUser.auth.user.label", description = "PageUser.auth.user.description"), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ROLES_ALL_URL, label = "PageAdminRoles.auth.roleAll.label", description = "PageAdminRoles.auth.roleAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ROLE_URL, label = "PageRole.auth.role.label", description = "PageRole.auth.role.description"), - @AuthorizationAction(actionUri = PageAdminUsers.AUTH_ORG_ALL, label = PageAdminUsers.AUTH_ORG_ALL_LABEL, description = PageAdminUsers.AUTH_ORG_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ORG_ALL_URL, label = "PageAdminUsers.auth.orgAll.label", description = "PageAdminUsers.auth.orgAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ORG_UNIT_URL, label = "PageOrgUnit.auth.orgUnit.label", description = "PageOrgUnit.auth.orgUnit.description"), - @AuthorizationAction(actionUri = PageAdminServices.AUTH_SERVICES_ALL, label = PageAdminServices.AUTH_SERVICES_ALL_LABEL, description = PageAdminServices.AUTH_SERVICES_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SERVICES_ALL_URL, label = "PageAdminServices.auth.servicesAll.label", description = "PageAdminServices.auth.servicesAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SERVICE_URL, label = "PageService.auth.role.label", description = "PageService.auth.role.description") }) public class PagePreviewChanges extends PageAdmin { diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/show/SceneItemValuePanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/show/SceneItemValuePanel.java index 03f8987f764..e7e9eec441d 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/show/SceneItemValuePanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/show/SceneItemValuePanel.java @@ -105,7 +105,7 @@ private boolean hasValidReferenceValue(SceneItemValue object) { private ObjectTypeGuiDescriptor getObjectTypeDescriptor() { SceneItemValue value = getModelObject(); - if (value.getSourceValue() instanceof PrismReferenceValue) { + if (value != null && value.getSourceValue() instanceof PrismReferenceValue) { QName targetType = ((PrismReferenceValue) value.getSourceValue()).getTargetType(); return ObjectTypeGuiDescriptor.getDescriptor(ObjectTypes.getObjectTypeFromTypeQName(targetType)); } else { diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/search/SearchFactory.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/search/SearchFactory.java index fb9e705de43..187c796f848 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/search/SearchFactory.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/search/SearchFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2017 Evolveum + * Copyright (c) 2010-2018 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,8 @@ import com.evolveum.midpoint.gui.api.page.PageBase; import com.evolveum.midpoint.gui.api.util.ModelServiceLocator; import com.evolveum.midpoint.gui.api.util.WebComponentUtil; +import com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.prism.Containerable; import com.evolveum.midpoint.prism.ItemDefinition; import com.evolveum.midpoint.prism.PrismContainerDefinition; @@ -291,20 +293,17 @@ private static boolean isFullTextSearchEnabled(ModelServi private static SearchBoxModeType getDefaultSearchType(ModelServiceLocator modelServiceLocator, Class type) { OperationResult result = new OperationResult(LOAD_ADMIN_GUI_CONFIGURATION); try { - AdminGuiConfigurationType guiConfig = modelServiceLocator.getModelInteractionService().getAdminGuiConfiguration(null, result); - GuiObjectListViewsType objectLists = guiConfig.getObjectLists(); - if (objectLists != null && objectLists.getObjectList() != null){ - for (GuiObjectListViewType objectList : objectLists.getObjectList()){ - if (objectList.getType() != null - && type.getSimpleName().equals(objectList.getType().getLocalPart()) - && objectList.getSearchBoxConfiguration() != null) { - SearchBoxConfigurationType searchBoxConfig = objectList.getSearchBoxConfiguration(); - return searchBoxConfig.getDefaultMode(); - } + CompiledUserProfile guiConfig = modelServiceLocator.getModelInteractionService().getCompiledUserProfile(null, result); + // TODO: improve: use proper view name + List objectLists = guiConfig.findAllApplicableObjectCollectionViews(type); + for (CompiledObjectCollectionView objectList : objectLists){ + if (objectList.getSearchBoxConfiguration() != null) { + SearchBoxConfigurationType searchBoxConfig = objectList.getSearchBoxConfiguration(); + return searchBoxConfig.getDefaultMode(); } } return null; - } catch (SchemaException | ObjectNotFoundException ex) { + } catch (SchemaException | ObjectNotFoundException | CommunicationException | ConfigurationException | SecurityViolationException | ExpressionEvaluationException ex) { throw new SystemException(ex); } } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/util/FocusListInlineMenuHelper.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/util/FocusListInlineMenuHelper.java index ca047693e4e..563b9709076 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/util/FocusListInlineMenuHelper.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/util/FocusListInlineMenuHelper.java @@ -32,6 +32,7 @@ import com.evolveum.midpoint.web.component.menu.cog.ButtonInlineMenuItem; import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem; import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItemAction; +import com.evolveum.midpoint.web.page.admin.PageAdminObjectList; import com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType; import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; import org.apache.wicket.ajax.AjaxRequestTarget; @@ -69,10 +70,10 @@ public class FocusListInlineMenuHelper implements Serializa @NotNull private final Class objectClass; @NotNull private final PageBase parentPage; - @NotNull private final FocusListComponent focusListComponent; + @NotNull private final PageAdminObjectList focusListComponent; private F singleDelete; - public FocusListInlineMenuHelper(@NotNull Class objectClass, @NotNull PageBase parentPage, @NotNull FocusListComponent focusListComponent) { + public FocusListInlineMenuHelper(@NotNull Class objectClass, @NotNull PageBase parentPage, @NotNull PageAdminObjectList focusListComponent) { this.objectClass = objectClass; this.parentPage = parentPage; this.focusListComponent = focusListComponent; diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/PageAdminFocus.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/PageAdminFocus.java index a793dc5e7ab..75cd63b93d1 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/PageAdminFocus.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/PageAdminFocus.java @@ -67,14 +67,6 @@ public abstract class PageAdminFocus extends PageAdminObjec implements ProgressReportingAwarePage { private static final long serialVersionUID = 1L; - public static final String AUTH_USERS_ALL = AuthorizationConstants.AUTZ_UI_USERS_ALL_URL; - public static final String AUTH_USERS_ALL_LABEL = "PageAdminUsers.auth.usersAll.label"; - public static final String AUTH_USERS_ALL_DESCRIPTION = "PageAdminUsers.auth.usersAll.description"; - - public static final String AUTH_ORG_ALL = AuthorizationConstants.AUTZ_UI_ORG_ALL_URL; - public static final String AUTH_ORG_ALL_LABEL = "PageAdminUsers.auth.orgAll.label"; - public static final String AUTH_ORG_ALL_DESCRIPTION = "PageAdminUsers.auth.orgAll.description"; - private LoadableModel>> projectionModel; private LoadableModel> delegatedToMeModel; @@ -877,7 +869,7 @@ protected AssignmentInfoDto createDelegableAssignmentsPreviewDto(AssignmentType PageAdminFocus.this, task, result); Boolean isDelegable = false; if (targetObject != null) { - isDelegable = targetObject.getRealValue().isDelegable(); + isDelegable = targetObject.asObjectable().isDelegable(); } if (Boolean.TRUE.equals(isDelegable)) { return createAssignmentsPreviewDto(targetObject, true, assignment, task, result); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/PageAdminObjectDetails.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/PageAdminObjectDetails.java old mode 100644 new mode 100755 index 7c4820a321c..0fae1fc96d6 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/PageAdminObjectDetails.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/PageAdminObjectDetails.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2017 Evolveum + * Copyright (c) 2010-2018 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ import javax.xml.namespace.QName; import com.evolveum.midpoint.prism.delta.ObjectDeltaCollectionsUtil; -import com.evolveum.midpoint.schema.util.AdminGuiConfigTypeUtil; import com.evolveum.midpoint.web.component.prism.*; import com.evolveum.midpoint.web.component.progress.ProgressPanel; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; @@ -39,6 +38,7 @@ import com.evolveum.midpoint.gui.api.util.WebComponentUtil; import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils; import com.evolveum.midpoint.model.api.ModelExecuteOptions; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.prism.delta.ObjectDelta; import com.evolveum.midpoint.schema.GetOperationOptions; @@ -48,8 +48,12 @@ import com.evolveum.midpoint.task.api.Task; import com.evolveum.midpoint.util.QNameUtil; import com.evolveum.midpoint.util.exception.AuthorizationException; +import com.evolveum.midpoint.util.exception.CommunicationException; +import com.evolveum.midpoint.util.exception.ConfigurationException; +import com.evolveum.midpoint.util.exception.ExpressionEvaluationException; import com.evolveum.midpoint.util.exception.ObjectNotFoundException; import com.evolveum.midpoint.util.exception.SchemaException; +import com.evolveum.midpoint.util.exception.SecurityViolationException; import com.evolveum.midpoint.util.exception.SystemException; import com.evolveum.midpoint.util.logging.LoggingUtils; import com.evolveum.midpoint.util.logging.Trace; @@ -303,6 +307,11 @@ protected ObjectWrapper loadObjectWrapper(PrismObject objectToEdit, boolea if (objectToEdit == null) { LOGGER.trace("Loading object: New object (creating)"); O focusType = createNewObject(); + + // Apply subtype using page parameters + List subtypes = getPageParameters().getValues(ObjectType.F_SUBTYPE.getLocalPart()); + subtypes.stream().filter(p -> !p.isEmpty()).forEach(c -> focusType.subtype(c.toString())); + getMidpointApplication().getPrismContext().adopt(focusType); object = (PrismObject) focusType.asPrismObject(); } else { @@ -700,10 +709,10 @@ protected void performAdditionalValidation(PrismObject object, public List getObjectFormTypes() { Task task = createSimpleTask(OPERATION_LOAD_GUI_CONFIGURATION); OperationResult result = task.getResult(); - AdminGuiConfigurationType adminGuiConfiguration; + CompiledUserProfile adminGuiConfiguration; try { - adminGuiConfiguration = getModelInteractionService().getAdminGuiConfiguration(task, result); - } catch (ObjectNotFoundException | SchemaException e) { + adminGuiConfiguration = getModelInteractionService().getCompiledUserProfile(task, result); + } catch (ObjectNotFoundException | SchemaException | CommunicationException | ConfigurationException | SecurityViolationException | ExpressionEvaluationException e) { throw new SystemException("Cannot load GUI configuration: "+e.getMessage(), e); } ObjectFormsType objectFormsType = adminGuiConfiguration.getObjectForms(); @@ -736,8 +745,8 @@ public boolean isSaveOnConfigure() { return saveOnConfigure; } - public boolean isForcedPreview(){ - GuiObjectDetailsPageType objectDetails = AdminGuiConfigTypeUtil.findObjectConfiguration(getCompileTimeClass(), getAdminGuiConfiguration()); + public boolean isForcedPreview() { + GuiObjectDetailsPageType objectDetails = getCompiledUserProfile().findObjectDetailsConfiguration(getCompileTimeClass()); return objectDetails != null && DetailsPageSaveMethodType.FORCED_PREVIEW.equals(objectDetails.getSaveMethod()); } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResources.html b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/PageAdminObjectList.html similarity index 92% rename from gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResources.html rename to gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/PageAdminObjectList.html index 9cffaf6736c..4e6a0479b8b 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResources.html +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/PageAdminObjectList.html @@ -1,6 +1,6 @@ - - - - - - - - - - - +
\ No newline at end of file diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageCreatedReports.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageCreatedReports.java index 69034077491..ce23dae8837 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageCreatedReports.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageCreatedReports.java @@ -31,6 +31,7 @@ import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItemAction; +import com.evolveum.midpoint.web.page.admin.PageAdminObjectList; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; import org.apache.commons.lang.StringUtils; import org.apache.wicket.ajax.AjaxRequestTarget; @@ -85,13 +86,13 @@ * @author lazyman */ @PageDescriptor(url = "/admin/reports/created", action = { - @AuthorizationAction(actionUri = PageAdminReports.AUTH_REPORTS_ALL, + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_REPORTS_ALL_URL, label = PageAdminConfiguration.AUTH_CONFIGURATION_ALL_LABEL, description = PageAdminConfiguration.AUTH_CONFIGURATION_ALL_DESCRIPTION), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_REPORTS_CREATED_REPORTS_URL, label = "PageCreatedReports.auth.createdReports.label", description = "PageCreatedReports.auth.createdReports.description")}) -public class PageCreatedReports extends PageAdminReports { +public class PageCreatedReports extends PageAdminObjectList { private static final long serialVersionUID = 1L; @@ -103,8 +104,6 @@ public class PageCreatedReports extends PageAdminReports { private static final String OPERATION_GET_REPORT_FILENAME = DOT_CLASS + "getReportFilename"; private static final String OPERATION_LOAD_REPORTS = DOT_CLASS + "loadReports"; - private static final String ID_MAIN_FORM = "mainForm"; - private static final String ID_CREATED_REPORTS_TABLE = "table"; private static final String ID_REPORT_TYPE_SELECT = "reportType"; @@ -114,6 +113,8 @@ public class PageCreatedReports extends PageAdminReports { private static Map reportExportTypeMap = new HashMap<>(); private Map reportTypeMal = new HashMap<>(); + private AjaxDownloadBehaviorFromStream ajaxDownloadBehavior = null; + static { reportExportTypeMap.put(ExportType.CSV, "text/csv; charset=UTF-8"); reportExportTypeMap.put(ExportType.DOCX, "application/vnd.openxmlformats-officedocument.wordprocessingml.document; charset=UTF-8"); @@ -134,10 +135,7 @@ public class PageCreatedReports extends PageAdminReports { public PageCreatedReports(PageParameters pageParameters) { super(pageParameters); - initReportTypeMap(); - initLayout(); - } private void initReportTypeMap() { @@ -158,30 +156,32 @@ private String getReportType(){ return "undefined"; } - private void initLayout() { - Form mainForm = new com.evolveum.midpoint.web.component.form.Form<>(ID_MAIN_FORM); - add(mainForm); - - + @Override + protected void initLayout() { + super.initLayout(); + String reportName = reportTypeMal.get(getReportType()); + List values = new ArrayList<>(reportTypeMal.values()); DropDownChoicePanel reportTypeSelect = new DropDownChoicePanel(ID_REPORT_TYPE_SELECT, - Model.of(reportTypeMal.get(getReportType())), - Model.of(reportTypeMal.values()), - StringChoiceRenderer.simple(), true); + Model.of(reportName), + Model.ofList(values), + StringChoiceRenderer.simple(), true); - reportTypeSelect.getBaseFormComponent().add(new OnChangeAjaxBehavior() { + reportTypeSelect.getBaseFormComponent().add(new OnChangeAjaxBehavior() { - private static final long serialVersionUID = 1L; - @Override - protected void onUpdate(AjaxRequestTarget target) { - getReportOutputTable().refreshTable(ReportOutputType.class, target);; - } - }); - reportTypeSelect.setOutputMarkupId(true); - mainForm.add(reportTypeSelect); + private static final long serialVersionUID = 1L; + + @Override + protected void onUpdate(AjaxRequestTarget target) { + getObjectListPanel().refreshTable(ReportOutputType.class, target); + ; + } + }); + reportTypeSelect.setOutputMarkupId(true); + getMainForm().add(reportTypeSelect); - final AjaxDownloadBehaviorFromStream ajaxDownloadBehavior = new AjaxDownloadBehaviorFromStream() { + AjaxDownloadBehaviorFromStream ajaxDownloadBehavior = new AjaxDownloadBehaviorFromStream() { private static final long serialVersionUID = 1L; @@ -196,71 +196,62 @@ public String getFileName(){ } }; - mainForm.add(ajaxDownloadBehavior); - - - MainObjectListPanel table = new MainObjectListPanel(ID_CREATED_REPORTS_TABLE, ReportOutputType.class, UserProfileStorage.TableId.PAGE_CREATED_REPORTS_PANEL, null, this) { - - private static final long serialVersionUID = 1L; - @Override - protected List createInlineMenu() { - return PageCreatedReports.this.initInlineMenu(); - } - - @Override - protected List, String>> createColumns() { - return PageCreatedReports.this.initColumns(ajaxDownloadBehavior); - } - - @Override - protected void objectDetailsPerformed(AjaxRequestTarget target, ReportOutputType object) { - // TODO Auto-generated method stub + getMainForm().add(ajaxDownloadBehavior); + } - } + @Override + protected List createRowActions() { + return PageCreatedReports.this.initInlineMenu(); + } - @Override - protected void newObjectPerformed(AjaxRequestTarget target) { - // TODO Auto-generated method stub + @Override + protected List, String>> initColumns() { + return PageCreatedReports.this.initColumns(ajaxDownloadBehavior); + } - } + @Override + protected void objectDetailsPerformed(AjaxRequestTarget target, ReportOutputType object) { + // TODO Auto-generated method stub - @Override - protected boolean isClickable(IModel> rowModel) { - return false; - } + } - @Override - protected ObjectQuery addFilterToContentQuery(ObjectQuery query) { - return appendTypeFilter(query); - } + @Override + protected void newObjectActionPerformed(AjaxRequestTarget target) { + // TODO Auto-generated method stub - @Override - protected List createCustomOrdering(SortParam sortParam) { + } - if (sortParam != null && sortParam.getProperty() != null) { - OrderDirection order = sortParam.isAscending() ? OrderDirection.ASCENDING : OrderDirection.DESCENDING; - if (sortParam.getProperty().equals("createTimestamp")) { - return Collections.singletonList( - getPrismContext().queryFactory().createOrdering( - ItemPath.create(ReportOutputType.F_METADATA, MetadataType.F_CREATE_TIMESTAMP), order)); - } - return Collections.singletonList( - getPrismContext().queryFactory().createOrdering( - ItemPath.create(new QName(SchemaConstantsGenerated.NS_COMMON, sortParam.getProperty())), order)); + @Override + protected boolean isNameColumnClickable(IModel> rowModel) { + return false; + } + @Override + protected ObjectQuery addCustomFilterToContentQuery(ObjectQuery query) { + return appendTypeFilter(query); + } - } else { - return Collections.emptyList(); - } - } + @Override + protected List createCustomOrdering(SortParam sortParam) { - }; + if (sortParam != null && sortParam.getProperty() != null) { + OrderDirection order = sortParam.isAscending() ? OrderDirection.ASCENDING : OrderDirection.DESCENDING; + if (sortParam.getProperty().equals("createTimestamp")) { + return Collections.singletonList( + getPrismContext().queryFactory().createOrdering( + ItemPath.create(ReportOutputType.F_METADATA, MetadataType.F_CREATE_TIMESTAMP), order)); + } + return Collections.singletonList( + getPrismContext().queryFactory().createOrdering( + ItemPath.create(new QName(SchemaConstantsGenerated.NS_COMMON, sortParam.getProperty())), order)); - table.setOutputMarkupId(true); - mainForm.add(table); + } else { + return Collections.emptyList(); + } } + //TODO - commented until FileType property will be available in ReportOutputType public PageBase getPageBase() { @@ -395,11 +386,7 @@ public String getObject() { } private List getSelectedData() { - return getReportOutputTable().getSelectedObjects(); - } - - private MainObjectListPanel getReportOutputTable() { - return (MainObjectListPanel) get(createComponentPath(ID_MAIN_FORM, ID_CREATED_REPORTS_TABLE)); + return getObjectListPanel().getSelectedObjects(); } private void deleteAllPerformed(AjaxRequestTarget target, ReportDeleteDialogDto.Operation op) { @@ -470,8 +457,8 @@ private void deleteSelectedConfirmedPerformed(AjaxRequestTarget target, List typeSelect = (DropDownChoicePanel) get(createComponentPath(ID_MAIN_FORM, ID_REPORT_TYPE_SELECT)); - String typeRef = (String) typeSelect.getBaseFormComponent().getModelObject(); + DropDownChoicePanel typeSelect = (DropDownChoicePanel) getMainForm().get(ID_REPORT_TYPE_SELECT); + String typeRef = typeSelect == null ? reportTypeMal.get(getReportType()) : (String) typeSelect.getBaseFormComponent().getModelObject(); S_AtomicFilterEntry q = getPrismContext().queryFor(ReportOutputType.class); S_AtomicFilterExit refF; @@ -572,4 +559,9 @@ public static String getReportFileName(ReportOutputType currentReport){ } return null; } + + @Override + protected Class getType(){ + return ReportOutputType.class; + } } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageNewReport.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageNewReport.java index 31246101beb..c335da55e83 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageNewReport.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageNewReport.java @@ -26,6 +26,7 @@ import com.evolveum.midpoint.web.component.AceEditor; import com.evolveum.midpoint.web.component.AjaxSubmitButton; import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour; +import com.evolveum.midpoint.web.page.admin.PageAdmin; import com.evolveum.midpoint.web.page.admin.configuration.PageAdminConfiguration; import com.evolveum.midpoint.web.page.admin.reports.dto.ReportDto; import com.evolveum.midpoint.web.security.MidPointApplication; @@ -57,13 +58,13 @@ * @author lazyman */ @PageDescriptor(url = "/admin/reports/create", action = { - @AuthorizationAction(actionUri = PageAdminReports.AUTH_REPORTS_ALL, + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_REPORTS_ALL_URL, label = PageAdminConfiguration.AUTH_CONFIGURATION_ALL_LABEL, description = PageAdminConfiguration.AUTH_CONFIGURATION_ALL_DESCRIPTION), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_REPORTS_REPORT_CREATE_URL, label = "PageNewReport.auth.reports.label", description = "PageNewReport.auth.reports.description")}) -public class PageNewReport extends PageAdminReports { +public class PageNewReport extends PageAdmin { private static final Trace LOGGER = TraceManager.getTrace(PageNewReport.class); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageReport.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageReport.java index a5b549db9e1..a64497583ff 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageReport.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageReport.java @@ -19,6 +19,7 @@ import java.util.List; import com.evolveum.midpoint.prism.delta.DeltaFactory; +import com.evolveum.midpoint.web.page.admin.PageAdmin; import org.apache.wicket.RestartResponseException; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; @@ -56,13 +57,13 @@ * @author shood */ @PageDescriptor(url = "/admin/report", encoder = OnePageParameterEncoder.class, action = { - @AuthorizationAction(actionUri = PageAdminReports.AUTH_REPORTS_ALL, + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_REPORTS_ALL_URL, label = PageAdminConfiguration.AUTH_CONFIGURATION_ALL_LABEL, description = PageAdminConfiguration.AUTH_CONFIGURATION_ALL_DESCRIPTION), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_REPORT_URL, label = "PageReport.auth.report.label", description = "PageReport.auth.report.description")}) -public class PageReport extends PageAdminReports { +public class PageReport extends PageAdmin { private static Trace LOGGER = TraceManager.getTrace(PageReport.class); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageReports.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageReports.java index 8a2c0d34883..69f9db7de36 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageReports.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageReports.java @@ -34,6 +34,7 @@ import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem; import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItemAction; import com.evolveum.midpoint.web.component.util.SelectableBean; +import com.evolveum.midpoint.web.page.admin.PageAdmin; import com.evolveum.midpoint.web.page.admin.configuration.PageAdminConfiguration; import com.evolveum.midpoint.web.page.admin.reports.component.RunReportPopupPanel; import com.evolveum.midpoint.web.session.UserProfileStorage; @@ -59,13 +60,13 @@ @Url(mountUrl = "/admin/reports", matchUrlForSecurity = "/admin/reports") }, action = { - @AuthorizationAction(actionUri = PageAdminReports.AUTH_REPORTS_ALL, + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_REPORTS_ALL_URL, label = PageAdminConfiguration.AUTH_CONFIGURATION_ALL_LABEL, description = PageAdminConfiguration.AUTH_CONFIGURATION_ALL_DESCRIPTION), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_REPORTS_URL, label = "PageReports.auth.reports.label", description = "PageReports.auth.reports.description")}) -public class PageReports extends PageAdminReports { +public class PageReports extends PageAdmin { private static final Trace LOGGER = TraceManager.getTrace(PageReports.class); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageAdminResources.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageAdminResources.java deleted file mode 100644 index d1350052e49..00000000000 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageAdminResources.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2010-2015 Evolveum - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.evolveum.midpoint.web.page.admin.resources; - - -import com.evolveum.midpoint.gui.api.util.WebComponentUtil; -import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils; -import com.evolveum.midpoint.prism.PrismObject; -import com.evolveum.midpoint.prism.PrismProperty; -import com.evolveum.midpoint.prism.delta.ObjectDelta; -import com.evolveum.midpoint.prism.path.ItemPath; -import com.evolveum.midpoint.prism.query.*; -import com.evolveum.midpoint.schema.GetOperationOptions; -import com.evolveum.midpoint.schema.SelectorOptions; -import com.evolveum.midpoint.schema.constants.SchemaConstants; -import com.evolveum.midpoint.schema.result.OperationResult; -import com.evolveum.midpoint.security.api.AuthorizationConstants; -import com.evolveum.midpoint.task.api.Task; -import com.evolveum.midpoint.util.logging.LoggingUtils; -import com.evolveum.midpoint.util.logging.Trace; -import com.evolveum.midpoint.util.logging.TraceManager; -import com.evolveum.midpoint.web.page.admin.PageAdmin; -import com.evolveum.midpoint.web.util.OnePageParameterEncoder; -import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType; - -import org.apache.commons.lang.StringUtils; -import org.apache.wicket.RestartResponseException; -import org.apache.wicket.ajax.AjaxRequestTarget; -import org.apache.wicket.util.string.StringValue; - -import java.util.Collection; -import java.util.List; - -/** - * @author lazyman - */ -public class PageAdminResources extends PageAdmin { - - private static final String DOT_CLASS = PageAdminResources.class.getName() + "."; - private static final String OPERATION_LOAD_RESOURCE = DOT_CLASS + "loadResource"; - private static final String OPERATION_DELETE_SYNC_TOKEN = DOT_CLASS + "deleteSyncToken"; - private static final String OPERATION_SAVE_SYNC_TASK = DOT_CLASS + "saveSyncTask"; - - protected static final Trace LOGGER = TraceManager.getTrace(PageAdminResources.class); - - public static final String AUTH_CONNECTOR_HOSTS_ALL = AuthorizationConstants.AUTZ_UI_CONNECTOR_HOSTS_ALL_URL; - public static final String AUTH_CONNECTOR_HOSTS_ALL_LABEL = "PageAdminResources.auth.connectorHostsAll.label"; - public static final String AUTH_CONNECTOR_HOSTS_ALL_DESCRIPTION = "PageAdminResources.auth.connectorHostsAll.description"; - - public static final String AUTH_RESOURCE_ALL = AuthorizationConstants.AUTZ_UI_RESOURCES_ALL_URL; - public static final String AUTH_RESOURCE_ALL_LABEL = "PageAdminResources.auth.resourcesAll.label"; - public static final String AUTH_RESOURCE_ALL_DESCRIPTION = "PageAdminResources.auth.resourcesAll.description"; - - protected boolean isResourceOidAvailable() { - StringValue resourceOid = getPageParameters().get(OnePageParameterEncoder.PARAMETER); - return resourceOid != null && StringUtils.isNotEmpty(resourceOid.toString()); - } - - protected String getResourceOid() { - StringValue resourceOid = getPageParameters().get(OnePageParameterEncoder.PARAMETER); - return resourceOid != null ? resourceOid.toString() : null; - } - - protected PrismObject loadResource(Collection> options) { - OperationResult result = new OperationResult(OPERATION_LOAD_RESOURCE); - PrismObject resource = null; - - try { - Task task = createSimpleTask(OPERATION_LOAD_RESOURCE); - LOGGER.trace("getObject(resource) oid={}, options={}", getResourceOid(), options); - resource = getModelService().getObject(ResourceType.class, getResourceOid(), options, task, result); - result.recomputeStatus(); - - if (LOGGER.isTraceEnabled()) { - LOGGER.trace("getObject(resource) result\n:{}", result.debugDump()); - } - - } catch (Exception ex) { - LoggingUtils.logUnexpectedException(LOGGER, "Couldn't get resource", ex); - result.recordFatalError("Couldn't get resource, reason: " + ex.getMessage(), ex); - } - - if (!WebComponentUtil.isSuccessOrHandledError(result)) { - if (resource != null) { - showResult(result); - } else { - getSession().error(getString("pageAdminResources.message.cantLoadResource")); - throw new RestartResponseException(PageResources.class); - } - } - - return resource; - } - - protected void deleteSyncTokenPerformed(AjaxRequestTarget target, ResourceType resourceType){ -// ResourceDto dto = model.getObject(); - String resourceOid = resourceType.getOid(); - String handlerUri = "http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/live-sync/handler-3"; - ObjectReferenceType resourceRef = new ObjectReferenceType(); - resourceRef.setOid(resourceOid); - PrismObject oldTask; - - OperationResult result = new OperationResult(OPERATION_DELETE_SYNC_TOKEN); - ObjectQuery query = getPrismContext().queryFor(TaskType.class) - .item(TaskType.F_OBJECT_REF).ref(resourceOid) - .and().item(TaskType.F_HANDLER_URI).eq(handlerUri) - .build(); - - List> taskList = WebModelServiceUtils.searchObjects(TaskType.class, query, result, this); - - if (taskList.size() != 1) { - error(getString("pageResource.message.invalidTaskSearch")); - } else { - oldTask = taskList.get(0); - saveTask(oldTask, result); - } - - result.recomputeStatus(); - showResult(result); - target.add(getFeedbackPanel()); - } - - private void saveTask(PrismObject oldTask, OperationResult result){ - Task task = createSimpleTask(OPERATION_SAVE_SYNC_TASK); - - PrismProperty property = oldTask.findProperty(ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.SYNC_TOKEN)); - - if(property == null){ - return; - } - Object value = property.getRealValue(); - - ObjectDelta delta = getPrismContext().deltaFactory().object().createModifyDelta(oldTask.getOid(), - getPrismContext().deltaFactory().property() - .createModificationDeleteProperty(ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.SYNC_TOKEN), property.getDefinition(), value), - TaskType.class); - - if(LOGGER.isTraceEnabled()){ - LOGGER.trace(delta.debugDump()); - } - - try { - getModelService().executeChanges(WebComponentUtil.createDeltaCollection(delta), null, task, result); - } catch (Exception e){ - LoggingUtils.logUnexpectedException(LOGGER, "Couldn't save task.", e); - result.recordFatalError("Couldn't save task.", e); - } - result.recomputeStatus(); - } -} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageConnectorHosts.html b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageConnectorHosts.html deleted file mode 100644 index 1f81e934022..00000000000 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageConnectorHosts.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - -
-
- - - - diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageConnectorHosts.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageConnectorHosts.java index 036d879bd98..b48a2590fae 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageConnectorHosts.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageConnectorHosts.java @@ -17,11 +17,13 @@ package com.evolveum.midpoint.web.page.admin.resources; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import com.evolveum.midpoint.web.component.dialog.ConfirmationPanel; import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItemAction; import com.evolveum.midpoint.web.component.search.*; +import com.evolveum.midpoint.web.page.admin.PageAdminObjectList; import org.apache.wicket.Component; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable; @@ -69,9 +71,9 @@ * @author lazyman */ @PageDescriptor(url = "/admin/connectorHosts", action = { - @AuthorizationAction(actionUri = PageAdminResources.AUTH_CONNECTOR_HOSTS_ALL, label = PageAdminResources.AUTH_CONNECTOR_HOSTS_ALL_LABEL, description = PageAdminResources.AUTH_CONNECTOR_HOSTS_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_CONNECTOR_HOSTS_ALL_URL, label = "PageAdminResources.auth.connectorHostsAll.label", description = "PageAdminResources.auth.connectorHostsAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_CONNECTOR_HOSTS_ALL_URL, label = "PageResources.auth.connectorHosts.label", description = "PageResources.auth.connectorHosts.description") }) -public class PageConnectorHosts extends PageAdminResources { +public class PageConnectorHosts extends PageAdminObjectList { private static final long serialVersionUID = 1L; private static final Trace LOGGER = TraceManager.getTrace(PageConnectorHosts.class); @@ -79,9 +81,6 @@ public class PageConnectorHosts extends PageAdminResources { private static final String OPERATION_DELETE_HOSTS = DOT_CLASS + "deleteHosts"; private static final String OPERATION_CONNECTOR_DISCOVERY = DOT_CLASS + "connectorDiscovery"; - private static final String ID_MAIN_FORM = "mainForm"; - private static final String ID_CONNECTOR_TABLE = "connectorTable"; - private IModel searchModel; public PageConnectorHosts() { @@ -106,56 +105,55 @@ protected Search load() { return SearchFactory.createSearch(ConnectorHostType.class, PageConnectorHosts.this); } }; - - initLayout(); - } - - private void initLayout() { - Form mainForm = new com.evolveum.midpoint.web.component.form.Form<>(ID_MAIN_FORM); - add(mainForm); - - BoxedTablePanel connectorHosts = new BoxedTablePanel( - ID_CONNECTOR_TABLE, - new ObjectDataProvider(PageConnectorHosts.this, - ConnectorHostType.class), - initConnectorHostsColumns(), UserProfileStorage.TableId.PAGE_RESOURCES_CONNECTOR_HOSTS, - (int) getItemsPerPage(UserProfileStorage.TableId.PAGE_RESOURCES_CONNECTOR_HOSTS)) { - private static final long serialVersionUID = 1L; - - @Override - protected WebMarkupContainer createHeader(String headerId) { - return new SearchFormPanel(headerId, searchModel) { - private static final long serialVersionUID = 1L; - - @Override - protected void searchPerformed(ObjectQuery query, AjaxRequestTarget target) { - PageConnectorHosts.this.searchHostPerformed(query, target); - } - }; - } - }; - connectorHosts.setOutputMarkupId(true); - mainForm.add(connectorHosts); } - private List> initConnectorHostsColumns() { - List> columns = new ArrayList<>(); - - IColumn column = new CheckBoxHeaderColumn(); - columns.add(column); - - column = new LinkColumn>( - createStringResource("pageResources.connector.name"), "name", "value.name") { - private static final long serialVersionUID = 1L; - - @Override - public void onClick(AjaxRequestTarget target, - IModel> rowModel) { - ConnectorHostType host = rowModel.getObject().getValue(); - // resourceDetailsPerformed(target, host.getOid()); - } - }; - columns.add(column); +// private void initLayout() { +// Form mainForm = new com.evolveum.midpoint.web.component.form.Form<>(ID_MAIN_FORM); +// add(mainForm); +// +// BoxedTablePanel connectorHosts = new BoxedTablePanel( +// ID_CONNECTOR_TABLE, +// new ObjectDataProvider(PageConnectorHosts.this, +// ConnectorHostType.class), +// initConnectorHostsColumns(), UserProfileStorage.TableId.PAGE_RESOURCES_CONNECTOR_HOSTS, +// (int) getItemsPerPage(UserProfileStorage.TableId.PAGE_RESOURCES_CONNECTOR_HOSTS)) { +// private static final long serialVersionUID = 1L; +// +// @Override +// protected WebMarkupContainer createHeader(String headerId) { +// return new SearchFormPanel(headerId, searchModel) { +// private static final long serialVersionUID = 1L; +// +// @Override +// protected void searchPerformed(ObjectQuery query, AjaxRequestTarget target) { +// PageConnectorHosts.this.searchHostPerformed(query, target); +// } +// }; +// } +// }; +// connectorHosts.setOutputMarkupId(true); +// mainForm.add(connectorHosts); +// } + + @Override + protected List, String>> initColumns() { + List, String>> columns = new ArrayList<>(); +// +// IColumn column = new CheckBoxHeaderColumn(); +// columns.add(column); +// +// column = new LinkColumn>( +// createStringResource("pageResources.connector.name"), "name", "value.name") { +// private static final long serialVersionUID = 1L; +// +// @Override +// public void onClick(AjaxRequestTarget target, +// IModel> rowModel) { +// ConnectorHostType host = rowModel.getObject().getValue(); +// // resourceDetailsPerformed(target, host.getOid()); +// } +// }; +// columns.add(column); columns.add(new PropertyColumn(createStringResource("pageResources.connector.hostname"), "value.hostname")); @@ -165,13 +163,14 @@ public void onClick(AjaxRequestTarget target, columns.add(new CheckBoxColumn(createStringResource("pageResources.connector.protectConnection"), "value.protectConnection")); - InlineMenuHeaderColumn menu = new InlineMenuHeaderColumn(initInlineHostsMenu()); - columns.add(menu); +// InlineMenuHeaderColumn menu = new InlineMenuHeaderColumn(initInlineHostsMenu()); +// columns.add(menu); return columns; } - private List initInlineHostsMenu() { + @Override + protected List createRowActions() { List headerMenuItems = new ArrayList<>(); headerMenuItems.add(new InlineMenuItem(createStringResource("PageBase.button.delete")) { private static final long serialVersionUID = 1L; @@ -207,9 +206,18 @@ public void onClick(AjaxRequestTarget target) { return headerMenuItems; } + @Override + protected boolean isNameColumnClickable(IModel> rowModel) { + return false; + } + + @Override + protected Class getType(){ + return ConnectorHostType.class; + } + private void deleteHostPerformed(AjaxRequestTarget target) { - List> selected = WebComponentUtil - .getSelectedData(getConnectorHostTable()); + List selected = getObjectListPanel().getSelectedObjects(); if (selected.isEmpty()) { warn(getString("pageResources.message.noHostSelected")); target.add(getFeedbackPanel()); @@ -229,10 +237,6 @@ public void yesPerformed(AjaxRequestTarget target) { } - private Table getConnectorHostTable() { - return (Table) get(createComponentPath(ID_MAIN_FORM, ID_CONNECTOR_TABLE)); - } - /** * @param oneDeleteKey * message if deleting one item @@ -247,13 +251,13 @@ private IModel createDeleteConfirmString(final String oneDeleteKey, fina private static final long serialVersionUID = 1L; @Override public String getObject() { - List> selected = WebComponentUtil.getSelectedData(getConnectorHostTable()); + List selected = getObjectListPanel().getSelectedObjects(); switch (selected.size()) { case 1: - Object first = selected.get(0); + ConnectorHostType first = selected.get(0); String name = WebComponentUtil - .getName(((SelectableBean) first).getValue()); + .getName(first); return createStringResource(oneDeleteKey, name).getString(); default: return createStringResource(moreDeleteKey, selected.size()).getString(); @@ -263,17 +267,16 @@ public String getObject() { } private void deleteHostConfirmedPerformed(AjaxRequestTarget target) { - Table hostTable = getConnectorHostTable(); - List> selected = WebComponentUtil.getSelectedData(hostTable); + List selected = getObjectListPanel().getSelectedObjects(); OperationResult result = new OperationResult(OPERATION_DELETE_HOSTS); - for (SelectableBean selectable : selected) { + for (ConnectorHostType selectable : selected) { try { Task task = createSimpleTask(OPERATION_DELETE_HOSTS); - if (selectable.getValue() != null) { + if (selectable != null) { ObjectDelta delta = getPrismContext().deltaFactory().object().createDeleteDelta(ConnectorHostType.class, - selectable.getValue().getOid()); + selectable.getOid()); getModelService().executeChanges(WebComponentUtil.createDeltaCollection(delta), null, task, result); } @@ -288,12 +291,10 @@ private void deleteHostConfirmedPerformed(AjaxRequestTarget target) { result.recordStatus(OperationResultStatus.SUCCESS, createStringResource("PageConnectorHosts.message.deleteHostConfirmedPerformed.success").getString()); } - BaseSortableDataProvider provider = (BaseSortableDataProvider) hostTable.getDataTable() - .getDataProvider(); - provider.clearCache(); + getObjectListPanel().clearCache(); showResult(result); - target.add(getFeedbackPanel(), (Component) hostTable); + target.add(getFeedbackPanel(), getObjectListPanel()); } private void discoveryRemotePerformed(AjaxRequestTarget target) { @@ -302,21 +303,17 @@ private void discoveryRemotePerformed(AjaxRequestTarget target) { PageBase page = (PageBase) getPage(); Task task = page.createSimpleTask(OPERATION_CONNECTOR_DISCOVERY); OperationResult result = task.getResult(); - List> selected = WebComponentUtil - .getSelectedData(getConnectorHostTable()); + List selected = getObjectListPanel().getSelectedObjects(); if (selected.isEmpty()) { warn(getString("pageResources.message.noHostSelected")); return; } - for (SelectableBean bean : selected) { - if (bean.getValue() != null) { - ConnectorHostType host = bean.getValue(); - try { - getModelService().discoverConnectors(host, task, result); - } catch (Exception ex) { - result.recordFatalError(createStringResource("PageConnectorHosts.message.discoveryRemotePerformed.fatalError", host.getHostname(), host.getPort()).getString(), ex); - } + for (ConnectorHostType host : selected) { + try { + getModelService().discoverConnectors(host, task, result); + } catch (Exception ex) { + result.recordFatalError(createStringResource("PageConnectorHosts.message.discoveryRemotePerformed.fatalError", host.getHostname(), host.getPort()).getString(), ex); } } @@ -324,32 +321,20 @@ private void discoveryRemotePerformed(AjaxRequestTarget target) { showResult(result); } - private void searchHostPerformed(ObjectQuery query, AjaxRequestTarget target) { - target.add(getFeedbackPanel()); - - Table panel = getConnectorHostTable(); - DataTable table = panel.getDataTable(); - ObjectDataProvider provider = (ObjectDataProvider) table.getDataProvider(); - provider.setQuery(query); - provider.setOptions(SelectorOptions.createCollection(GetOperationOptions.createNoFetch())); - - target.add((Component) panel); + @Override + protected Collection> getQueryOptions(){ + return SelectorOptions.createCollection(GetOperationOptions.createNoFetch()); } - private void deleteResourceSyncTokenPerformed(AjaxRequestTarget target, ResourceType resourceType) { - deleteSyncTokenPerformed(target, resourceType); - } - - private void editResourcePerformed(ResourceType resourceType) { - PageParameters parameters = new PageParameters(); - parameters.add(OnePageParameterEncoder.PARAMETER, resourceType.getOid()); - navigateToNext(new PageResourceWizard(parameters)); - } - - private void editAsXmlPerformed(ResourceType resourceType) { - PageParameters parameters = new PageParameters(); - parameters.add(PageDebugView.PARAM_OBJECT_ID, resourceType.getOid()); - parameters.add(PageDebugView.PARAM_OBJECT_TYPE, ResourceType.class.getSimpleName()); - navigateToNext(PageDebugView.class, parameters); - } +// private void searchHostPerformed(ObjectQuery query, AjaxRequestTarget target) { +// target.add(getFeedbackPanel()); +// +//// Table panel = getConnectorHostTable(); +//// DataTable table = panel.getDataTable(); +//// ObjectDataProvider provider = (ObjectDataProvider) table.getDataProvider(); +//// provider.setQuery(query); +//// provider.setOptions(SelectorOptions.createCollection(GetOperationOptions.createNoFetch())); +// +// target.add(getObjectListPanel()); +// } } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageImportResource.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageImportResource.java index 49e29f3197a..5a36365d184 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageImportResource.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageImportResource.java @@ -12,9 +12,9 @@ * */ @PageDescriptor(url = "/admin/config/importResource", action = { - @AuthorizationAction(actionUri = PageAdminResources.AUTH_RESOURCE_ALL, - label = PageAdminResources.AUTH_RESOURCE_ALL_LABEL, - description = PageAdminResources.AUTH_RESOURCE_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_RESOURCES_ALL_URL, + label = "PageAdminResources.auth.resourcesAll.label", + description = "PageAdminResources.auth.resourcesAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_CONFIGURATION_IMPORT_URL, label = "PageImportObject.auth.configImport.label", description = "PageImportObject.auth.configImport.description")}) public class PageImportResource extends PageImportObject { diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResource.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResource.java index b02fccc8591..ee160ef78f3 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResource.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResource.java @@ -36,6 +36,7 @@ import com.evolveum.midpoint.web.component.AjaxButton; import com.evolveum.midpoint.web.component.AjaxTabbedPanel; import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour; +import com.evolveum.midpoint.web.page.admin.PageAdmin; import com.evolveum.midpoint.web.page.admin.configuration.PageDebugView; import com.evolveum.midpoint.web.page.admin.resources.component.TestConnectionResultPanel; import com.evolveum.midpoint.web.util.OnePageParameterEncoder; @@ -60,14 +61,14 @@ @Url(mountUrl = "/admin/resource", matchUrlForSecurity = "/admin/resource") }, action = { - @AuthorizationAction(actionUri = PageAdminResources.AUTH_RESOURCE_ALL, - label = PageAdminResources.AUTH_RESOURCE_ALL_LABEL, - description = PageAdminResources.AUTH_RESOURCE_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_RESOURCES_ALL_URL, + label = "PageAdminResources.auth.resourcesAll.label", + description = "PageAdminResources.auth.resourcesAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_RESOURCE_URL, label = "PageResource.auth.resource.label", description = "PageResource.auth.resource.description") }) -public class PageResource extends PageAdminResources { +public class PageResource extends PageAdmin { private static final long serialVersionUID = 1L; private static final Trace LOGGER = TraceManager.getTrace(PageResource.class); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResourceVisualization.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResourceVisualization.java index e16ba2d1cc4..00c8a86433d 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResourceVisualization.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResourceVisualization.java @@ -52,9 +52,9 @@ * @author mederly */ @PageDescriptor(url = "/admin/resources/visualization", action = { - @AuthorizationAction(actionUri = PageAdminResources.AUTH_RESOURCE_ALL, - label = PageAdminResources.AUTH_RESOURCE_ALL_LABEL, - description = PageAdminResources.AUTH_RESOURCE_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_RESOURCES_ALL_URL, + label = "PageAdminResources.auth.resourcesAll.label", + description = "PageAdminResources.auth.resourcesAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_RESOURCE_EDIT_URL, label = "PageResourceWizard.auth.resource.label", description = "PageResourceWizard.auth.resource.description")}) diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResourceWizard.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResourceWizard.java index 55eb8acd9d6..9ddd96d338b 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResourceWizard.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResourceWizard.java @@ -31,13 +31,17 @@ import com.evolveum.midpoint.security.api.AuthorizationConstants; import com.evolveum.midpoint.task.api.Task; import com.evolveum.midpoint.util.logging.LoggingUtils; +import com.evolveum.midpoint.util.logging.Trace; +import com.evolveum.midpoint.util.logging.TraceManager; import com.evolveum.midpoint.web.application.AuthorizationAction; import com.evolveum.midpoint.web.application.PageDescriptor; import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour; import com.evolveum.midpoint.web.component.wizard.Wizard; import com.evolveum.midpoint.web.component.wizard.WizardStep; import com.evolveum.midpoint.web.component.wizard.resource.*; +import com.evolveum.midpoint.web.page.admin.PageAdmin; import com.evolveum.midpoint.web.page.error.PageError; +import com.evolveum.midpoint.web.util.OnePageParameterEncoder; import com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType; import org.apache.wicket.Component; import org.apache.wicket.RestartResponseException; @@ -46,6 +50,7 @@ import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; import org.apache.wicket.request.mapper.parameter.PageParameters; +import org.apache.wicket.util.string.StringValue; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -58,18 +63,19 @@ * @author lazyman */ @PageDescriptor(url = "/admin/resources/wizard", action = { - @AuthorizationAction(actionUri = PageAdminResources.AUTH_RESOURCE_ALL, - label = PageAdminResources.AUTH_RESOURCE_ALL_LABEL, - description = PageAdminResources.AUTH_RESOURCE_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_RESOURCES_ALL_URL, + label = "PageAdminResources.auth.resourcesAll.label", + description = "PageAdminResources.auth.resourcesAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_RESOURCE_EDIT_URL, label = "PageResourceWizard.auth.resource.label", description = "PageResourceWizard.auth.resource.description")}) -public class PageResourceWizard extends PageAdminResources { +public class PageResourceWizard extends PageAdmin { private static final String ID_WIZARD = "wizard"; public static final String PARAM_OID = "oid"; public static final String PARAM_CONFIG_ONLY = "configOnly"; public static final String PARAM_READ_ONLY = "readOnly"; + private static final Trace LOGGER = TraceManager.getTrace(PageResourceWizard.class); // these models should be reset after each 'save' operation, in order to fetch current data (on demand) // each step should use corresponding model @@ -312,4 +318,9 @@ public void visualize(AjaxRequestTarget target) { public boolean showSaveResultInPage(boolean saved, OperationResult result) { return saved || WebComponentUtil.showResultInPage(result); } + + protected String getResourceOid() { + StringValue resourceOid = getPageParameters().get(OnePageParameterEncoder.PARAMETER); + return resourceOid != null ? resourceOid.toString() : null; + } } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResources.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResources.java index 59dee9c40b9..a00f27b5ac7 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResources.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/PageResources.java @@ -20,14 +20,23 @@ import java.util.Collection; import java.util.List; +import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils; +import com.evolveum.midpoint.prism.PrismObject; +import com.evolveum.midpoint.prism.PrismProperty; +import com.evolveum.midpoint.prism.path.ItemPath; +import com.evolveum.midpoint.prism.query.ObjectQuery; +import com.evolveum.midpoint.schema.constants.SchemaConstants; import com.evolveum.midpoint.web.application.Url; import com.evolveum.midpoint.web.component.dialog.ConfirmationPanel; import com.evolveum.midpoint.web.component.menu.cog.ButtonInlineMenuItem; import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItemAction; import com.evolveum.midpoint.web.component.search.*; +import com.evolveum.midpoint.web.page.admin.PageAdminObjectList; import com.evolveum.midpoint.web.session.PageStorage; import com.evolveum.midpoint.web.session.SessionStorage; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType; import com.evolveum.midpoint.xml.ns._public.common.common_3.SearchBoxModeType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType; import org.apache.commons.lang.StringUtils; import org.apache.wicket.Component; import org.apache.wicket.ajax.AjaxRequestTarget; @@ -72,14 +81,14 @@ @Url(mountUrl = "/admin/resources", matchUrlForSecurity = "/admin/resources") }, action = { - @AuthorizationAction(actionUri = PageAdminResources.AUTH_RESOURCE_ALL, - label = PageAdminResources.AUTH_RESOURCE_ALL_LABEL, - description = PageAdminResources.AUTH_RESOURCE_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_RESOURCES_ALL_URL, + label = "PageAdminResources.auth.resourcesAll.label", + description = "PageAdminResources.auth.resourcesAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_RESOURCES_URL, label = "PageResources.auth.resources.label", description = "PageResources.auth.resources.description") }) -public class PageResources extends PageAdminResources { +public class PageResources extends PageAdminObjectList { private static final long serialVersionUID = 1L; private static final Trace LOGGER = TraceManager.getTrace(PageResources.class); @@ -92,42 +101,23 @@ public class PageResources extends PageAdminResources { private static final String ID_TABLE = "table"; private static final String ID_CONNECTOR_TABLE = "connectorTable"; - private IModel searchModel; private ResourceType singleDelete; public PageResources() { - this(true); - } - - public PageResources(boolean clearSessionPaging) { - this(clearSessionPaging, ""); + this(""); } public PageResources(String searchText) { - this(true, searchText); + super(); + if (StringUtils.isNotEmpty(searchText)){ + initSearch(searchText); + } } - public PageResources(boolean clearSessionPaging, String searchText) { - searchModel = new LoadableModel(false) { + protected void initLayout(){ + super.initLayout(); + getObjectListPanel().setAdditionalBoxCssClasses(GuiStyleConstants.CLASS_OBJECT_RESOURCE_BOX_CSS_CLASSES); - private static final long serialVersionUID = 1L; - @Override - protected Search load() { - ResourcesStorage storage = getSessionStorage().getResources(); - Search dto = storage.getSearch(); - - if (dto == null) { - dto = SearchFactory.createSearch(ResourceType.class, PageResources.this); - } - - return dto; - } - }; - - if (StringUtils.isNotEmpty(searchText)){ - initSearch(searchText); - } - initLayout(); } private void initSearch(String text){ @@ -146,46 +136,39 @@ private void initSearch(String text){ getSessionStorage().getPageStorageMap().put(SessionStorage.KEY_RESOURCES, storage); } - private void initLayout() { - Form mainForm = new com.evolveum.midpoint.web.component.form.Form(ID_MAIN_FORM); - add(mainForm); - - Collection> options = getOperationOptionsBuilder() - .noFetch() - .item(ResourceType.F_CONNECTOR).resolve() - .build(); - - MainObjectListPanel resourceListPanel = new MainObjectListPanel(ID_TABLE, - ResourceType.class, TableId.TABLE_RESOURCES, options, this) { - private static final long serialVersionUID = 1L; - - @Override - protected List createInlineMenu() { - return PageResources.this.createRowMenuItems(); - } + @Override + protected List createRowActions() { + return PageResources.this.createRowMenuItems(); + } - @Override - protected List, String>> createColumns() { - return PageResources.this.initResourceColumns(); - } + @Override + protected List, String>> initColumns() { + return PageResources.this.initResourceColumns(); + } - @Override - protected void objectDetailsPerformed(AjaxRequestTarget target, ResourceType object) { - PageResources.this.resourceDetailsPerformed(target, object.getOid()); + @Override + protected void objectDetailsPerformed(AjaxRequestTarget target, ResourceType object) { + PageResources.this.resourceDetailsPerformed(target, object.getOid()); - } + } - @Override - protected void newObjectPerformed(AjaxRequestTarget target) { - navigateToNext(PageResourceWizard.class); + @Override + protected void newObjectActionPerformed(AjaxRequestTarget target) { + navigateToNext(PageResourceWizard.class); - } + } - }; - resourceListPanel.setOutputMarkupId(true); - resourceListPanel.setAdditionalBoxCssClasses(GuiStyleConstants.CLASS_OBJECT_RESOURCE_BOX_CSS_CLASSES); - mainForm.add(resourceListPanel); + @Override + protected Class getType(){ + return ResourceType.class; + } + @Override + protected Collection> getQueryOptions(){ + return getOperationOptionsBuilder() + .noFetch() + .item(ResourceType.F_CONNECTOR).resolve() + .build(); } private List createRowMenuItems() { @@ -414,10 +397,6 @@ private MainObjectListPanel getResourceTable() { return (MainObjectListPanel) get(createComponentPath(ID_MAIN_FORM, ID_TABLE)); } - private Table getConnectorHostTable() { - return (Table) get(createComponentPath(ID_MAIN_FORM, ID_CONNECTOR_TABLE)); - } - /** * @param oneDeleteKey * message if deleting one item @@ -490,8 +469,6 @@ private void testResourcePerformed(AjaxRequestTarget target, ResourceType resour OperationResult result = new OperationResult(OPERATION_TEST_RESOURCE); - // SelectableBean dto = rowModel.getObject(); - // ResourceType resourceType = dto.getValue(); if (StringUtils.isEmpty(resourceType.getOid())) { result.recordFatalError(createStringResource("PageResources.message.testResourcePerformed.partialError").getString()); } @@ -499,9 +476,6 @@ private void testResourcePerformed(AjaxRequestTarget target, ResourceType resour Task task = createSimpleTask(OPERATION_TEST_RESOURCE); try { result = getModelService().testResource(resourceType.getOid(), task); - // ResourceController.updateResourceState(resourceType.getState(), - // result); - // todo de-duplicate code (see the same operation in PageResource) // this provides some additional tests, namely a test for schema // handling section @@ -527,7 +501,7 @@ private void testResourcePerformed(AjaxRequestTarget target, ResourceType resour private void deleteResourceSyncTokenPerformed(AjaxRequestTarget target, ResourceType resourceType) { - deleteSyncTokenPerformed(target, resourceType); + WebComponentUtil.deleteSyncTokenPerformed(target, resourceType, PageResources.this); } private void editResourcePerformed(ResourceType resourceType) { diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/ResourceContentPanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/ResourceContentPanel.java index 195c37adefd..ad050c4f488 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/ResourceContentPanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/ResourceContentPanel.java @@ -282,7 +282,7 @@ protected BaseSortableDataProvider> initProvider() { @Override protected ObjectQuery createContentQuery() { ObjectQuery parentQuery = super.createContentQuery(); - QueryFactory queryFactory = getPrismContext().queryFactory(); + QueryFactory queryFactory = pageBase.getPrismContext().queryFactory(); List filters = new ArrayList<>(); if (parentQuery != null) { @@ -413,7 +413,7 @@ public void onClick(AjaxRequestTarget target) { } private void newTaskPerformed(String category, AjaxRequestTarget target) { - TaskType taskType = new TaskType(); + TaskType taskType = new TaskType(getPageBase().getPrismContext()); PrismProperty pKind; try { pKind = taskType.asPrismObject().findOrCreateProperty( @@ -986,8 +986,8 @@ protected void deleteResourceObjectPerformed(ShadowType selected, AjaxRequestTar } ConfirmationPanel dialog = new ConfirmationPanel(((PageBase) getPage()).getMainPopupBodyId(), - createDeleteConfirmString(selected, "pageContentAccounts.message.deleteConfirmation", - "pageContentAccounts.message.deleteConfirmationSingle")) { + createDeleteConfirmString(selected, "pageContentAccounts.message.deleteConfirmationSingle", + "pageContentAccounts.message.deleteConfirmation")) { @Override public void yesPerformed(AjaxRequestTarget target) { deleteAccountConfirmedPerformed(target, result, selectedShadow); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/content/PageAccount.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/content/PageAccount.java index cee757637f7..81b66f4b6b6 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/content/PageAccount.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/resources/content/PageAccount.java @@ -40,7 +40,7 @@ import com.evolveum.midpoint.web.component.prism.ObjectWrapper; import com.evolveum.midpoint.web.component.util.ObjectWrapperUtil; import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour; -import com.evolveum.midpoint.web.page.admin.resources.PageAdminResources; +import com.evolveum.midpoint.web.page.admin.PageAdmin; import com.evolveum.midpoint.web.page.admin.resources.PageResources; import com.evolveum.midpoint.web.page.admin.resources.ShadowDetailsTabPanel; import com.evolveum.midpoint.web.page.admin.resources.ShadowSummaryPanel; @@ -67,13 +67,13 @@ * @author lazyman */ @PageDescriptor(url = "/admin/resources/account", encoder = OnePageParameterEncoder.class, action = { - @AuthorizationAction(actionUri = PageAdminResources.AUTH_RESOURCE_ALL, - label = PageAdminResources.AUTH_RESOURCE_ALL_LABEL, - description = PageAdminResources.AUTH_RESOURCE_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_RESOURCES_ALL_URL, + label = "PageAdminResources.auth.resourcesAll.label", + description = "PageAdminResources.auth.resourcesAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_RESOURCES_ACCOUNT_URL, label = "PageAccount.auth.resourcesAccount.label", description = "PageAccount.auth.resourcesAccount.description")}) -public class PageAccount extends PageAdminResources { +public class PageAccount extends PageAdmin { private static final Trace LOGGER = TraceManager.getTrace(PageAccount.class); private static final String DOT_CLASS = PageAccount.class.getName() + "."; diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRole.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRole.java index e100d68b024..a225bb2e14e 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRole.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRole.java @@ -37,7 +37,7 @@ * @author semancik */ @PageDescriptor(url = "/admin/role", encoder = OnePageParameterEncoder.class, action = { - @AuthorizationAction(actionUri = PageAdminRoles.AUTH_ROLE_ALL, label = PageAdminRoles.AUTH_ROLE_ALL_LABEL, description = PageAdminRoles.AUTH_ROLE_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ROLES_ALL_URL, label = "PageAdminRoles.auth.roleAll.label", description = "PageAdminRoles.auth.roleAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ROLE_URL, label = "PageRole.auth.role.label", description = "PageRole.auth.role.description") }) public class PageRole extends PageAdminAbstractRole implements ProgressReportingAwarePage { private static final long serialVersionUID = 1L; diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRoleHistory.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRoleHistory.java index 14ddaadb16f..378e2780f11 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRoleHistory.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRoleHistory.java @@ -35,9 +35,9 @@ * Created by honchar */ @PageDescriptor(url = "/admin/roleHistory", action = { - @AuthorizationAction(actionUri = PageAdminRoles.AUTH_ROLE_ALL, - label = PageAdminRoles.AUTH_ROLE_ALL_LABEL, - description = PageAdminRoles.AUTH_ROLE_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ROLES_ALL_URL, + label = "PageAdminRoles.auth.roleAll.label", + description = "PageAdminRoles.auth.roleAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ROLE_HISTORY_URL, label = "PageRoleHistory.auth.roleHistory.label", description = "PageRoleHistory.auth.roleHistory.description")}) diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRoles.html b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRoles.html deleted file mode 100644 index 388e9f0308f..00000000000 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRoles.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - -
-
- - - - - \ No newline at end of file diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRoles.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRoles.java index 7eddab7c4e6..53df99f8bfb 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRoles.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageRoles.java @@ -16,10 +16,7 @@ package com.evolveum.midpoint.web.page.admin.roles; -import com.evolveum.midpoint.gui.api.GuiStyleConstants; -import com.evolveum.midpoint.gui.api.component.MainObjectListPanel; import com.evolveum.midpoint.gui.api.util.WebComponentUtil; -import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.security.api.AuthorizationConstants; import com.evolveum.midpoint.util.logging.Trace; import com.evolveum.midpoint.util.logging.TraceManager; @@ -27,59 +24,42 @@ import com.evolveum.midpoint.web.application.PageDescriptor; import com.evolveum.midpoint.web.component.data.column.ColumnMenuAction; import com.evolveum.midpoint.web.component.data.column.ColumnUtils; -import com.evolveum.midpoint.web.component.data.column.InlineMenuButtonColumn; import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem; import com.evolveum.midpoint.web.component.search.Search; -import com.evolveum.midpoint.web.component.util.FocusListComponent; import com.evolveum.midpoint.web.component.util.FocusListInlineMenuHelper; import com.evolveum.midpoint.web.component.util.SelectableBean; -import com.evolveum.midpoint.web.session.UserProfileStorage.TableId; +import com.evolveum.midpoint.web.page.admin.PageAdminObjectList; import com.evolveum.midpoint.web.util.OnePageParameterEncoder; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; import org.apache.wicket.ajax.AjaxRequestTarget; -import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator; import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; -import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn; -import org.apache.wicket.extensions.markup.html.repeater.data.table.export.AbstractExportableColumn; -import org.apache.wicket.markup.html.basic.Label; -import org.apache.wicket.markup.html.form.Form; -import org.apache.wicket.markup.repeater.Item; import org.apache.wicket.model.IModel; -import org.apache.wicket.model.Model; import org.apache.wicket.request.mapper.parameter.PageParameters; -import java.util.ArrayList; import java.util.List; /** * @author lazyman */ @PageDescriptor(url = "/admin/roles", action = { - @AuthorizationAction(actionUri = PageAdminRoles.AUTH_ROLE_ALL, - label = PageAdminRoles.AUTH_ROLE_ALL_LABEL, - description = PageAdminRoles.AUTH_ROLE_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ROLES_ALL_URL, + label = "PageAdminRoles.auth.roleAll.label", + description = "PageAdminRoles.auth.roleAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ROLES_URL, label = "PageRoles.auth.roles.label", description = "PageRoles.auth.roles.description")}) -public class PageRoles extends PageAdminRoles implements FocusListComponent { +public class PageRoles extends PageAdminObjectList { private static final Trace LOGGER = TraceManager.getTrace(PageRoles.class); private static final String DOT_CLASS = PageRoles.class.getName() + "."; - private static final String ID_TABLE = "table"; - private static final String ID_MAIN_FORM = "mainForm"; - private static final String OPERATION_SEARCH_MEMBERS = DOT_CLASS + "searchMembers"; private IModel searchModel; public PageRoles() { - this(false); - } - - public PageRoles(boolean clearPagingInSession) { - initLayout(); + super(); } private final FocusListInlineMenuHelper listInlineMenuHelper = new FocusListInlineMenuHelper(RoleType.class, this, this){ @@ -95,40 +75,29 @@ protected IModel getConfirmationMessageModel(ColumnMenuAction action, St }; - private void initLayout() { - Form mainForm = new com.evolveum.midpoint.web.component.form.Form(ID_MAIN_FORM); - add(mainForm); - - MainObjectListPanel roleListPanel = new MainObjectListPanel(ID_TABLE, RoleType.class, TableId.TABLE_ROLES, null, this) { - private static final long serialVersionUID = 1L; - - @Override - protected List createInlineMenu() { - return listInlineMenuHelper.createRowActions(); - } - - @Override - protected List, String>> createColumns() { - return ColumnUtils.getDefaultRoleColumns(); - } - - @Override - protected void objectDetailsPerformed(AjaxRequestTarget target, RoleType object) { - PageRoles.this.roleDetailsPerformed(target, object.getOid()); - } - - @Override - protected void newObjectPerformed(AjaxRequestTarget target) { - navigateToNext(PageRole.class); - } - }; - roleListPanel.setOutputMarkupId(true); - roleListPanel.setAdditionalBoxCssClasses(GuiStyleConstants.CLASS_OBJECT_ROLE_BOX_CSS_CLASSES); - mainForm.add(roleListPanel); + @Override + protected List createRowActions() { + return listInlineMenuHelper.createRowActions(); + } + + @Override + protected List, String>> initColumns() { + return ColumnUtils.getDefaultRoleColumns(); + } + + @Override + protected void objectDetailsPerformed(AjaxRequestTarget target, RoleType object) { + PageRoles.this.roleDetailsPerformed(target, object.getOid()); } - private MainObjectListPanel getRoleTable() { - return (MainObjectListPanel) get(createComponentPath(ID_MAIN_FORM, ID_TABLE)); + @Override + protected void newObjectActionPerformed(AjaxRequestTarget target) { + navigateToNext(PageRole.class); + } + + @Override + protected Class getType(){ + return RoleType.class; } private void roleDetailsPerformed(AjaxRequestTarget target, String oid) { @@ -137,21 +106,13 @@ private void roleDetailsPerformed(AjaxRequestTarget target, String oid) { navigateToNext(PageRole.class, parameters); } - @Override - public MainObjectListPanel getObjectListPanel() { - return (MainObjectListPanel) get(createComponentPath(ID_MAIN_FORM, ID_TABLE)); - } - - private IModel getConfirmationMessageModel(ColumnMenuAction action, String actionName){ - return WebComponentUtil.createAbstractRoleConfirmationMessage(actionName, action, getRoleTable(), this); + return WebComponentUtil.createAbstractRoleConfirmationMessage(actionName, action, getObjectListPanel(), this); } - - private boolean isShowConfirmationDialog(ColumnMenuAction action){ return action.getRowModel() != null || - getRoleTable().getSelectedObjectsCount() > 0; + getObjectListPanel().getSelectedObjectsCount() > 0; } } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/PageTaskAdd.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/PageTaskAdd.java index c6bcc0dc5a9..43ba0a23811 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/PageTaskAdd.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/PageTaskAdd.java @@ -674,7 +674,7 @@ private List> prepareChangesToExecute(TaskType } private TaskType createTask(TaskAddDto dto) throws SchemaException { - TaskType task = new TaskType(); + TaskType task = new TaskType(getPrismContext()); MidPointPrincipal owner = SecurityUtils.getPrincipalUser(); ObjectReferenceType ownerRef = new ObjectReferenceType(); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/handlers/dto/GenericHandlerDto.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/handlers/dto/GenericHandlerDto.java index 5ca96dd7eb3..1ee6fc9c426 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/handlers/dto/GenericHandlerDto.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/handlers/dto/GenericHandlerDto.java @@ -99,7 +99,7 @@ public GenericHandlerDto(TaskDto taskDto, @NotNull List items, PageBase pa clonedDefinition.setCanAdd(false); clonedDefinition.setCanModify(false); clonedDefinition.setDisplayOrder(displayOrder); - prismContext.hacks().addToDefinition(ctd, clonedDefinition); + ctd.toMutable().add(clonedDefinition); } displayOrder++; } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageAdminServices.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageAdminServices.java deleted file mode 100644 index e82addf542d..00000000000 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageAdminServices.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2010-2015 Evolveum - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.evolveum.midpoint.web.page.admin.services; - - -import com.evolveum.midpoint.security.api.AuthorizationConstants; -import com.evolveum.midpoint.web.page.admin.PageAdmin; - -/** - * @author lazyman - */ -public class PageAdminServices extends PageAdmin { - - public static final String AUTH_SERVICES_ALL = AuthorizationConstants.AUTZ_UI_SERVICES_ALL_URL; - public static final String AUTH_SERVICES_ALL_LABEL = "PageAdminServices.auth.servicesAll.label"; - public static final String AUTH_SERVICES_ALL_DESCRIPTION = "PageAdminServices.auth.servicesAll.description"; - - -} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageService.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageService.java index 353d38d4c8f..338ae6bad3f 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageService.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageService.java @@ -42,8 +42,12 @@ import com.evolveum.midpoint.xml.ns._public.common.common_3.ServiceType; @PageDescriptor(url = "/admin/service", encoder = OnePageParameterEncoder.class, action = { - @AuthorizationAction(actionUri = PageAdminServices.AUTH_SERVICES_ALL, label = PageAdminServices.AUTH_SERVICES_ALL_LABEL, description = PageAdminServices.AUTH_SERVICES_ALL_DESCRIPTION), - @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SERVICE_URL, label = "PageService.auth.role.label", description = "PageService.auth.role.description") }) + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SERVICES_ALL_URL, + label = "PageAdminServices.auth.servicesAll.label", + description = "PageAdminServices.auth.servicesAll.description"), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SERVICE_URL, + label = "PageService.auth.role.label", + description = "PageService.auth.role.description") }) public class PageService extends PageAdminAbstractRole implements ProgressReportingAwarePage{ private static final long serialVersionUID = 1L; diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageServiceHistory.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageServiceHistory.java index 6ad13201457..b3fe7976222 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageServiceHistory.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageServiceHistory.java @@ -23,22 +23,19 @@ import com.evolveum.midpoint.util.logging.TraceManager; import com.evolveum.midpoint.web.application.AuthorizationAction; import com.evolveum.midpoint.web.application.PageDescriptor; -import com.evolveum.midpoint.web.component.FocusSummaryPanel; import com.evolveum.midpoint.web.component.ObjectSummaryPanel; import com.evolveum.midpoint.web.component.prism.ObjectWrapper; -import com.evolveum.midpoint.web.page.admin.roles.PageAdminRoles; import com.evolveum.midpoint.web.util.OnePageParameterEncoder; import com.evolveum.midpoint.xml.ns._public.common.common_3.ServiceType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType; import org.apache.wicket.model.IModel; -import javax.xml.ws.Service; - /** * Created by honchar */ @PageDescriptor(url = "/admin/serviceHistory", encoder = OnePageParameterEncoder.class, action = { - @AuthorizationAction(actionUri = PageAdminServices.AUTH_SERVICES_ALL, label = PageAdminServices.AUTH_SERVICES_ALL_LABEL, description = PageAdminServices.AUTH_SERVICES_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SERVICES_ALL_URL, + label = "PageAdminServices.auth.servicesAll.label", + description = "PageAdminServices.auth.servicesAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SERVICE_HISTORY_URL, label = "PageServiceHistory.auth.service.label", description = "PageServiceHistory.auth.service.description") }) diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageServices.html b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageServices.html deleted file mode 100644 index 5def4fdb6e5..00000000000 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageServices.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - -
-
- - - - - - - - - - - - \ No newline at end of file diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageServices.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageServices.java index a8d4fbc0f55..0b8468513f8 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageServices.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/services/PageServices.java @@ -33,6 +33,7 @@ import com.evolveum.midpoint.web.component.util.FocusListComponent; import com.evolveum.midpoint.web.component.util.FocusListInlineMenuHelper; import com.evolveum.midpoint.web.component.util.SelectableBean; +import com.evolveum.midpoint.web.page.admin.PageAdminObjectList; import com.evolveum.midpoint.web.session.UserProfileStorage.TableId; import com.evolveum.midpoint.web.util.OnePageParameterEncoder; import com.evolveum.midpoint.xml.ns._public.common.common_3.ServiceType; @@ -50,73 +51,60 @@ * @author lazyman */ @PageDescriptor(url = "/admin/services", action = { - @AuthorizationAction(actionUri = PageAdminServices.AUTH_SERVICES_ALL, - label = PageAdminServices.AUTH_SERVICES_ALL_LABEL, - description = PageAdminServices.AUTH_SERVICES_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SERVICES_ALL_URL, + label = "PageAdminServices.auth.servicesAll.label", + description = "PageAdminServices.auth.servicesAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SERVICES_URL, label = "PageServices.auth.services.label", description = "PageServices.auth.services.description")}) -public class PageServices extends PageAdminServices implements FocusListComponent { +public class PageServices extends PageAdminObjectList { private static final long serialVersionUID = 1L; - private static final String ID_MAIN_FORM = "mainForm"; - private static final String ID_TABLE = "table"; - private static final String DOT_CLASS = PageServices.class.getName() + "."; - private static final Trace LOGGER = TraceManager.getTrace(PageServices.class); + private static final String DOT_CLASS = PageServices.class.getName() + "."; + private static final Trace LOGGER = TraceManager.getTrace(PageServices.class); private static final String OPERATION_DELETE_SERVICES = DOT_CLASS + "deleteServices"; private IModel searchModel; public PageServices() { - this(true); + super(); } - public PageServices(boolean clearPagingInSession) { - initLayout(); - } - - private final FocusListInlineMenuHelper listInlineMenuHelper = new FocusListInlineMenuHelper(ServiceType.class, this, this){ + private final FocusListInlineMenuHelper listInlineMenuHelper = new FocusListInlineMenuHelper(ServiceType.class, this, this) { private static final long serialVersionUID = 1L; - protected boolean isShowConfirmationDialog(ColumnMenuAction action){ + protected boolean isShowConfirmationDialog(ColumnMenuAction action) { return PageServices.this.isShowConfirmationDialog(action); } - protected IModel getConfirmationMessageModel(ColumnMenuAction action, String actionName){ + protected IModel getConfirmationMessageModel(ColumnMenuAction action, String actionName) { return PageServices.this.getConfirmationMessageModel(action, actionName); } }; - private void initLayout() { - Form mainForm = new com.evolveum.midpoint.web.component.form.Form(ID_MAIN_FORM); - add(mainForm); - - MainObjectListPanel servicePanel = new MainObjectListPanel(ID_TABLE, ServiceType.class, TableId.TABLE_SERVICES, null, this){ - private static final long serialVersionUID = 1L; - - @Override - public void objectDetailsPerformed(AjaxRequestTarget target, ServiceType service) { - PageServices.this.serviceDetailsPerformed(target, service); - } - - @Override - protected List, String>> createColumns() { - return ColumnUtils.getDefaultServiceColumns(); - } - - @Override - protected List createInlineMenu() { - return listInlineMenuHelper.createRowActions(); - } - - @Override - protected void newObjectPerformed(AjaxRequestTarget target) { - navigateToNext(PageService.class); - } - }; - servicePanel.setAdditionalBoxCssClasses(GuiStyleConstants.CLASS_OBJECT_SERVICE_BOX_CSS_CLASSES); - servicePanel.setOutputMarkupId(true); - mainForm.add(servicePanel); + @Override + public void objectDetailsPerformed(AjaxRequestTarget target, ServiceType service) { + serviceDetailsPerformed(target, service); + } + + @Override + protected List, String>> initColumns() { + return ColumnUtils.getDefaultServiceColumns(); + } + + @Override + protected List createRowActions() { + return listInlineMenuHelper.createRowActions(); + } + + @Override + protected void newObjectActionPerformed(AjaxRequestTarget target) { + navigateToNext(PageService.class); + } + + @Override + protected Class getType(){ + return ServiceType.class; } protected void serviceDetailsPerformed(AjaxRequestTarget target, ServiceType service) { @@ -125,12 +113,7 @@ protected void serviceDetailsPerformed(AjaxRequestTarget target, ServiceType ser navigateToNext(PageService.class, parameters); } - @Override - public MainObjectListPanel getObjectListPanel() { - return (MainObjectListPanel) get(createComponentPath(ID_MAIN_FORM, ID_TABLE)); - } - - private IModel getConfirmationMessageModel(ColumnMenuAction action, String actionName){ + private IModel getConfirmationMessageModel(ColumnMenuAction action, String actionName){ return WebComponentUtil.createAbstractRoleConfirmationMessage(actionName, action, getObjectListPanel(), this); // if (action.getRowModel() == null) { // return createStringResource("PageServices.message.confirmationMessageForMultipleObject", diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageAdminUsers.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageAdminUsers.java deleted file mode 100644 index 1bb4b8329db..00000000000 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageAdminUsers.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010-2015 Evolveum - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.evolveum.midpoint.web.page.admin.users; - - -import com.evolveum.midpoint.security.api.AuthorizationConstants; -import com.evolveum.midpoint.web.page.admin.PageAdmin; - -/** - * @author lazyman - */ -public class PageAdminUsers extends PageAdmin { - - public static final String AUTH_USERS_ALL = AuthorizationConstants.AUTZ_UI_USERS_ALL_URL; - public static final String AUTH_USERS_ALL_LABEL = "PageAdminUsers.auth.usersAll.label"; - public static final String AUTH_USERS_ALL_DESCRIPTION = "PageAdminUsers.auth.usersAll.description"; - - public static final String AUTH_ORG_ALL = AuthorizationConstants.AUTZ_UI_ORG_ALL_URL; - public static final String AUTH_ORG_ALL_LABEL = "PageAdminUsers.auth.orgAll.label"; - public static final String AUTH_ORG_ALL_DESCRIPTION = "PageAdminUsers.auth.orgAll.description"; -} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageContacts.html b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageContacts.html deleted file mode 100644 index c9712c01634..00000000000 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageContacts.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - -
-
- -
- -
- - - - Search - - -
-
- - -
-
- - - -
- -
- - -
-
-
-
-
- - - - - - - -
-
-
-
-

Org. structure

-
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ministry of offence
-
- - 64x64 - -
-

John Doe (jdoe)

-
Phone: +421 (123) 123 123
- -
-
-
Weapons Section
-
- - 64x64 - -
-

Alice Doe (adoe)

-
Phone: +421 (123) 123 124
- -
-
-
Super Department
-
- - 64x64 - -
-

Bud Light (blight)

-
Phone: +421 (123) 123 129
- -
-
-
-
- - 64x64 - -
-

Foo Bar (fbar)

-
Phone: +421 (123) 123 125
- -
-
-
-
- - 64x64 - -
-

Justin Bieber (jbieber)

-
Phone: +421 (123) 123 126
- -
-
-
-
- - 64x64 - -
-

Lee Child (lchild)

-
Phone: +421 (123) 123 127
- -
-
-
-
- - 64x64 - -
-

Jo Nesbo (jnesbo)

-
Phone: +421 (123) 123 128
- -
-
-
Load more ...
-
-
- -
- - \ No newline at end of file diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageContacts.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageContacts.java deleted file mode 100644 index fa67000ff0b..00000000000 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageContacts.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2010-2015 Evolveum - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.evolveum.midpoint.web.page.admin.users; - -import com.evolveum.midpoint.security.api.AuthorizationConstants; -import com.evolveum.midpoint.web.application.AuthorizationAction; -import com.evolveum.midpoint.web.application.PageDescriptor; - -/** - * @author lazyman - */ -@PageDescriptor(url = "/admin/users/contacts", action = { - @AuthorizationAction(actionUri = PageAdminUsers.AUTH_USERS_ALL, - label = PageAdminUsers.AUTH_USERS_ALL_LABEL, - description = PageAdminUsers.AUTH_USERS_ALL_DESCRIPTION), - @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_CONTACTS_URL, - label = "PageContacts.auth.contacts.label", - description = "PageContacts.auth.contacts.description")}) -public class PageContacts extends PageAdminUsers { - - private static final String ID_TABLE = "table"; - private static final String ID_TREE = "tree"; - - public PageContacts() { - initLayout(); - } - - private void initLayout() { -// ITreeProvider provider = new ContactDataProvider(); -// -// NestedTree tree = new NestedTree(ID_TREE, provider) { -// -// @Override -// protected Component newContentComponent(String id, IModel model) { -// ContactTreeDto dto = (ContactTreeDto) model.getObject(); -// if (dto instanceof ContactUserDto) { -// return new ContactUserPanel(id, model); -// } -// -// return new ContactOrgUnitPanel(id, model); -// } -// }; -// add(tree); - } - - -} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageMergeObjects.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageMergeObjects.java index cccf1285b21..14ed36ad8cc 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageMergeObjects.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageMergeObjects.java @@ -54,9 +54,9 @@ * Created by honchar. */ @PageDescriptor(url = "/admin/mergeObjects", encoder = OnePageParameterEncoder.class, action = { - @AuthorizationAction(actionUri = PageAdminUsers.AUTH_USERS_ALL, - label = PageAdminUsers.AUTH_USERS_ALL_LABEL, - description = PageAdminUsers.AUTH_USERS_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USERS_ALL_URL, + label = "PageAdminUsers.auth.usersAll.label", + description = "PageAdminUsers.auth.usersAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USER_URL, label = "PageUser.auth.user.label", description = "PageUser.auth.user.description"), diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageOrgTree.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageOrgTree.java index 048debee008..4fca322e158 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageOrgTree.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageOrgTree.java @@ -15,6 +15,7 @@ */ package com.evolveum.midpoint.web.page.admin.users; +import com.evolveum.midpoint.web.page.admin.PageAdmin; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.Model; @@ -31,13 +32,13 @@ * @author lazyman */ @PageDescriptor(url = "/admin/org/tree", action = { - @AuthorizationAction(actionUri = PageAdminUsers.AUTH_ORG_ALL, - label = PageAdminUsers.AUTH_ORG_ALL_LABEL, - description = PageAdminUsers.AUTH_ORG_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ORG_ALL_URL, + label = "PageAdminUsers.auth.orgAll.label", + description = "PageAdminUsers.auth.orgAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ORG_TREE_URL, label = "PageOrgTree.auth.orgTree.label", description = "PageOrgTree.auth.orgTree.description")}) -public class PageOrgTree extends PageAdminUsers { +public class PageOrgTree extends PageAdmin { private static final Trace LOGGER = TraceManager.getTrace(PageOrgTree.class); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageOrgUnit.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageOrgUnit.java index 86d7cf52b46..d357133a7f3 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageOrgUnit.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageOrgUnit.java @@ -48,8 +48,12 @@ * @author lazyman */ @PageDescriptor(url = "/admin/org/unit", encoder = OnePageParameterEncoder.class, action = { - @AuthorizationAction(actionUri = PageAdminUsers.AUTH_ORG_ALL, label = PageAdminUsers.AUTH_ORG_ALL_LABEL, description = PageAdminUsers.AUTH_ORG_ALL_DESCRIPTION), - @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ORG_UNIT_URL, label = "PageOrgUnit.auth.orgUnit.label", description = "PageOrgUnit.auth.orgUnit.description") }) + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ORG_ALL_URL, + label = "PageAdminUsers.auth.orgAll.label", + description = "PageAdminUsers.auth.orgAll.description"), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ORG_UNIT_URL, + label = "PageOrgUnit.auth.orgUnit.label", + description = "PageOrgUnit.auth.orgUnit.description") }) public class PageOrgUnit extends PageAdminAbstractRole implements ProgressReportingAwarePage { private static final Trace LOGGER = TraceManager.getTrace(PageOrgUnit.class); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageOrgUnitHistory.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageOrgUnitHistory.java index f9a17e851a9..612f9779c7d 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageOrgUnitHistory.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageOrgUnitHistory.java @@ -56,9 +56,9 @@ * Created by honchar. */ @PageDescriptor(url = "/admin/orgUnitHistory", action = { - @AuthorizationAction(actionUri = PageAdminUsers.AUTH_ORG_ALL, - label = PageAdminUsers.AUTH_ORG_ALL_LABEL, - description = PageAdminUsers.AUTH_ORG_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ORG_ALL_URL, + label = "PageAdminUsers.auth.orgAll.label", + description = "PageAdminUsers.auth.orgAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ORG_UNIT_HISTORY_URL, label = "PageOrgUnitHistory.auth.orgUnitHistory.label", description = "PageOrgUnitHistory.auth.orgUnitHistory.description")}) diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUser.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUser.java index cbea50eba4d..a653dfddb3c 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUser.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUser.java @@ -74,9 +74,9 @@ * @author semancik */ @PageDescriptor(url = "/admin/user", encoder = OnePageParameterEncoder.class, action = { - @AuthorizationAction(actionUri = PageAdminUsers.AUTH_USERS_ALL, - label = PageAdminUsers.AUTH_USERS_ALL_LABEL, - description = PageAdminUsers.AUTH_USERS_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USERS_ALL_URL, + label = "PageAdminUsers.auth.usersAll.label", + description = "PageAdminUsers.auth.usersAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USER_URL, label = "PageUser.auth.user.label", description = "PageUser.auth.user.description")}) diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUserHistory.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUserHistory.java index 28490d32950..efc1a16ecc0 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUserHistory.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUserHistory.java @@ -54,9 +54,9 @@ * Created by honchar. */ @PageDescriptor(url = "/admin/userHistory", action = { - @AuthorizationAction(actionUri = PageAdminUsers.AUTH_USERS_ALL, - label = PageAdminUsers.AUTH_USERS_ALL_LABEL, - description = PageAdminUsers.AUTH_USERS_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USERS_ALL_URL, + label = "PageAdminUsers.auth.usersAll.label", + description = "PageAdminUsers.auth.usersAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USER_HISTORY_URL, label = "PageUser.auth.userHistory.label", description = "PageUser.auth.userHistory.description")}) diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUsers.html b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUsers.html deleted file mode 100644 index 65ac7e27267..00000000000 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUsers.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - -
-
- - - - diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUsers.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUsers.java index 23b9c9af4cb..50093264f75 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUsers.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUsers.java @@ -31,6 +31,7 @@ import com.evolveum.midpoint.web.component.search.SearchFactory; import com.evolveum.midpoint.web.component.search.SearchItem; import com.evolveum.midpoint.web.component.search.SearchValue; +import com.evolveum.midpoint.web.page.admin.PageAdminObjectList; import com.evolveum.midpoint.web.session.PageStorage; import com.evolveum.midpoint.web.session.SessionStorage; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; @@ -82,14 +83,14 @@ @Url(mountUrl = "/admin/users", matchUrlForSecurity = "/admin/users") }, action = { - @AuthorizationAction(actionUri = PageAdminUsers.AUTH_USERS_ALL, - label = PageAdminUsers.AUTH_USERS_ALL_LABEL, - description = PageAdminUsers.AUTH_USERS_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USERS_ALL_URL, + label = "PageAdminUsers.auth.usersAll.label", + description = "PageAdminUsers.auth.usersAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USERS_URL, label = "PageUsers.auth.users.label", description = "PageUsers.auth.users.description") }) -public class PageUsers extends PageAdminUsers { +public class PageUsers extends PageAdminObjectList { private static final long serialVersionUID = 1L; private static final Trace LOGGER = TraceManager.getTrace(PageUsers.class); @@ -110,15 +111,14 @@ public class PageUsers extends PageAdminUsers { private static final String ID_MAIN_FORM = "mainForm"; private static final String ID_TABLE = "table"; - private UserType singleDelete; - private LoadableModel executeOptionsModel; + private LoadableModel executeOptionsModel; public PageUsers() { this(null); } public PageUsers(final String text) { - + super(); executeOptionsModel = new LoadableModel(false) { @Override @@ -132,12 +132,6 @@ protected ExecuteChangeOptionsDto load() { } } - @Override - protected void onInitialize(){ - super.onInitialize(); - initLayout(); - } - private void initSearch(String text){ PageStorage storage = getSessionStorage().getPageStorageMap().get(SessionStorage.KEY_USERS); if (storage == null) { @@ -155,59 +149,8 @@ private void initSearch(String text){ } - private void initLayout() { - Form mainForm = new com.evolveum.midpoint.web.component.form.Form(ID_MAIN_FORM); - add(mainForm); - - initTable(mainForm); - } - - private void initTable(Form mainForm) { - Collection> options = new ArrayList<>(); - MainObjectListPanel userListPanel = new MainObjectListPanel(ID_TABLE, - UserType.class, TableId.TABLE_USERS, options, this) { - private static final long serialVersionUID = 1L; - - @Override - protected List, String>> createColumns() { - return PageUsers.this.initColumns(); - } - - @Override - protected List createInlineMenu() { - return createRowActions(); - } - - @Override - protected void objectDetailsPerformed(AjaxRequestTarget target, UserType object) { - userDetailsPerformed(target, object.getOid()); - } - - @Override - protected void newObjectPerformed(AjaxRequestTarget target) { - navigateToNext(PageUser.class); - } - - @Override - protected ObjectQuery createContentQuery() { - ObjectQuery contentQuery = super.createContentQuery(); - ObjectFilter usersViewFilter = getUsersViewFilter(); - if (usersViewFilter != null){ - if (contentQuery == null) { - contentQuery = getPrismContext().queryFactory().createQuery(); - } - contentQuery.addFilter(usersViewFilter); - } - return contentQuery; - } - }; - - userListPanel.setAdditionalBoxCssClasses(GuiStyleConstants.CLASS_OBJECT_USER_BOX_CSS_CLASSES); - userListPanel.setOutputMarkupId(true); - mainForm.add(userListPanel); - } - - private List, String>> initColumns() { + @Override + protected List, String>> initColumns() { List, String>> columns = new ArrayList<>(); IColumn, String> column = new PropertyColumn( @@ -252,7 +195,8 @@ public IModel getDataModel(IModel> rowModel) { return columns; } - private List createRowActions() { + @Override + protected List createRowActions() { List menu = new ArrayList<>(); menu.add(new ButtonInlineMenuItem(createStringResource("pageUsers.menu.enable")) { private static final long serialVersionUID = 1L; @@ -425,12 +369,23 @@ public boolean isHeaderMenuItem(){ return menu; } - private void userDetailsPerformed(AjaxRequestTarget target, String oid) { + @Override + protected void objectDetailsPerformed(AjaxRequestTarget target, UserType user) { PageParameters parameters = new PageParameters(); - parameters.add(OnePageParameterEncoder.PARAMETER, oid); + parameters.add(OnePageParameterEncoder.PARAMETER, user.getOid()); navigateToNext(PageUser.class, parameters); } + @Override + protected void newObjectActionPerformed(AjaxRequestTarget target){ + navigateToNext(PageUser.class); + } + + @Override + protected Class getType(){ + return UserType.class; + } + private MainObjectListPanel getTable() { return (MainObjectListPanel) get(createComponentPath(ID_MAIN_FORM, ID_TABLE)); } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUsersView.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUsersView.java index bfc91ca36dd..35a8d0edba1 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUsersView.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageUsersView.java @@ -42,9 +42,9 @@ @Url(mountUrl = "/admin/usersView", matchUrlForSecurity = "/admin/usersView") }, action = { - @AuthorizationAction(actionUri = PageAdminUsers.AUTH_USERS_ALL, - label = PageAdminUsers.AUTH_USERS_ALL_LABEL, - description = PageAdminUsers.AUTH_USERS_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USERS_ALL_URL, + label = "PageAdminUsers.auth.usersAll.label", + description = "PageAdminUsers.auth.usersAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USERS_VIEW_URL, label = "PageUsers.auth.users.label", description = "PageUsers.auth.users.description") @@ -52,7 +52,6 @@ public class PageUsersView extends PageUsers { private static final long serialVersionUID = 1L; - public static final String PARAMETER_OBJECT_COLLECTION_TYPE_OID = "collectionOid"; private static final Trace LOGGER = TraceManager.getTrace(PageUsersView.class); @@ -77,7 +76,7 @@ protected ObjectFilter getUsersViewFilter(){ if (collectionObject == null){ return null; } - ObjectCollectionType collectionValue = collectionObject.getValue().asObjectable(); + ObjectCollectionType collectionValue = collectionObject.asObjectable(); if (!QNameUtil.match(collectionValue.getType(), UserType.COMPLEX_TYPE)){ return null; } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageXmlDataReview.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageXmlDataReview.java index e408f13298c..19ee86e5191 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageXmlDataReview.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/PageXmlDataReview.java @@ -30,9 +30,9 @@ * Created by honchar. */ @PageDescriptor(url = "/admin/xmlDataReview", action = { - @AuthorizationAction(actionUri = PageAdminUsers.AUTH_USERS_ALL, - label = PageAdminUsers.AUTH_USERS_ALL_LABEL, - description = PageAdminUsers.AUTH_USERS_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USERS_ALL_URL, + label = "PageAdminUsers.auth.usersAll.label", + description = "PageAdminUsers.auth.usersAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USER_HISTORY_XML_REVIEW_URL, label = "PageUser.auth.userHistoryXmlReview.label", description = "PageUser.auth.userHistoryXmlReview.description")}) diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/component/OrgMemberPanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/component/OrgMemberPanel.java index ef68d612468..0491550d63a 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/component/OrgMemberPanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/users/component/OrgMemberPanel.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2015-2017 Evolveum + * Copyright (c) 2015-2018 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ import org.apache.wicket.model.IModel; import com.evolveum.midpoint.gui.api.util.WebComponentUtil; +import com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView; import com.evolveum.midpoint.prism.query.ObjectQuery; import com.evolveum.midpoint.schema.constants.ObjectTypes; import com.evolveum.midpoint.util.logging.Trace; @@ -143,7 +144,7 @@ protected MemberPanelStorage getMemberPanelStorage(){ @Override protected GuiObjectListPanelConfigurationType getAdditionalPanelConfig(){ - GuiObjectListViewType orgViewType = WebComponentUtil.getViewTypeConfig(OrgType.COMPLEX_TYPE, getPageBase()); + CompiledObjectCollectionView orgViewType = getPageBase().getCompiledUserProfile().findObjectCollectionView(OrgType.COMPLEX_TYPE, null); if (orgViewType == null || orgViewType.getAdditionalPanels() == null){ return null; } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageAdminValuePolicies.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageAdminValuePolicies.java deleted file mode 100644 index 39203f6f8e9..00000000000 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageAdminValuePolicies.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2010-2017 Evolveum - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.evolveum.midpoint.web.page.admin.valuePolicy; - -import com.evolveum.midpoint.security.api.AuthorizationConstants; -import com.evolveum.midpoint.web.page.admin.PageAdmin; - -/** - * Created by matus on 9/8/2017. - */ -public class PageAdminValuePolicies extends PageAdmin { - public static final String AUTH_VALUE_POLICIES_ALL = AuthorizationConstants.AUTZ_UI_VALUE_POLICIES_ALL_URL; - public static final String AUTH_VALUE_POLICIES_ALL_LABEL = "PageAdminValuePolicies.auth.valuePoliciesAll.label"; - public static final String AUTH_VALUE_POLICIES_ALL_DESCRIPTION = "PageAdminValuePolicies.auth.valuePoliciesAll.description"; -} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageValuePolicies.html b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageValuePolicies.html deleted file mode 100644 index 4add3520c24..00000000000 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageValuePolicies.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - -
-
- - - - - \ No newline at end of file diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageValuePolicies.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageValuePolicies.java index 2754cc25058..d180879fb17 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageValuePolicies.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageValuePolicies.java @@ -28,6 +28,7 @@ import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem; import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItemAction; import com.evolveum.midpoint.web.component.util.SelectableBean; +import com.evolveum.midpoint.web.page.admin.PageAdminObjectList; import com.evolveum.midpoint.web.session.UserProfileStorage; import com.evolveum.midpoint.web.util.OnePageParameterEncoder; import com.evolveum.midpoint.xml.ns._public.common.common_3.ValuePolicyType; @@ -48,15 +49,15 @@ @Url(mountUrl = "/admin/valuepolicies", matchUrlForSecurity = "/admin/valuepolicies" ) }, action = { - @AuthorizationAction(actionUri = PageAdminValuePolicies.AUTH_VALUE_POLICIES_ALL, - label = PageAdminValuePolicies.AUTH_VALUE_POLICIES_ALL_LABEL, - description = PageAdminValuePolicies.AUTH_VALUE_POLICIES_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_VALUE_POLICIES_ALL_URL, + label = "PageAdminValuePolicies.auth.valuePoliciesAll.label", + description = "PageAdminValuePolicies.auth.valuePoliciesAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_VALUE_POLICIES_URL, label = "PageValuePolicies.auth.valuePolicies.label", description = "PageValuePolicies.auth.valuePolicies.description") }) -public class PageValuePolicies extends PageAdminValuePolicies { +public class PageValuePolicies extends PageAdminObjectList { private static final long serialVersionUID = 1L; @@ -67,38 +68,30 @@ public PageValuePolicies() { initLayout(); } - protected void initLayout() { - Form mainForm = new Form(ID_MAIN_FORM); - add(mainForm); - - MainObjectListPanel valuePolicyPanel = new MainObjectListPanel(ID_VALUE_POLICIES_TABLE, ValuePolicyType.class, - UserProfileStorage.TableId.TABLE_VALUE_POLICIES, null, this) { - private static final long serialVersionUID = 1L; - - @Override - protected void objectDetailsPerformed(AjaxRequestTarget target, ValuePolicyType valuePolicy) { - PageValuePolicies.this.valuePolicyDetailsPerformed(target, valuePolicy); - } + @Override + protected void objectDetailsPerformed(AjaxRequestTarget target, ValuePolicyType valuePolicy) { + PageValuePolicies.this.valuePolicyDetailsPerformed(target, valuePolicy); + } - @Override - protected void newObjectPerformed(AjaxRequestTarget target) { - navigateToNext(PageValuePolicy.class); - } + @Override + protected void newObjectActionPerformed(AjaxRequestTarget target) { + navigateToNext(PageValuePolicy.class); + } - @Override - protected List, String>> createColumns() { - return PageValuePolicies.this.initColumns(); - } + @Override + protected List, String>> initColumns() { + return PageValuePolicies.this.initValuePoliciesColumns(); + } - @Override - protected List createInlineMenu() { - return PageValuePolicies.this.createInlineMenu(); - } + @Override + protected List createRowActions() { + return PageValuePolicies.this.createInlineMenu(); + } - }; - valuePolicyPanel.setOutputMarkupId(true); - mainForm.add(valuePolicyPanel); + @Override + protected Class getType() { + return ValuePolicyType.class; } private void valuePolicyDetailsPerformed(AjaxRequestTarget target, ValuePolicyType valuePolicy) { @@ -107,7 +100,7 @@ private void valuePolicyDetailsPerformed(AjaxRequestTarget target, ValuePolicyTy navigateToNext(PageValuePolicy.class, pageParameters); } - private List, String>> initColumns() { + private List, String>> initValuePoliciesColumns() { List, String>> columns = new ArrayList<>(); IColumn column = new PropertyColumn(createStringResource("pageValuePolicies.table.description"), "value.description"); diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageValuePolicy.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageValuePolicy.java index f218e708483..78cd4719df6 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageValuePolicy.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/valuePolicy/PageValuePolicy.java @@ -40,6 +40,7 @@ import com.evolveum.midpoint.web.component.prism.ContainerStatus; import com.evolveum.midpoint.web.component.prism.ObjectWrapper; import com.evolveum.midpoint.web.component.util.ObjectWrapperUtil; +import com.evolveum.midpoint.web.page.admin.PageAdmin; import com.evolveum.midpoint.web.page.admin.valuePolicy.component.ValuePolicyBasicPanel; import com.evolveum.midpoint.web.page.admin.valuePolicy.component.ValuePolicySummaryPanel; import com.evolveum.midpoint.web.util.OnePageParameterEncoder; @@ -66,15 +67,15 @@ matchUrlForSecurity = "/admin/valuepolicy") }, action = { - @AuthorizationAction(actionUri = PageAdminValuePolicies.AUTH_VALUE_POLICIES_ALL, - label = PageAdminValuePolicies.AUTH_VALUE_POLICIES_ALL_LABEL, - description = PageAdminValuePolicies.AUTH_VALUE_POLICIES_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_VALUE_POLICIES_ALL_URL, + label = "PageAdminValuePolicies.auth.valuePoliciesAll.label", + description = "PageAdminValuePolicies.auth.valuePoliciesAll.description"), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_VALUE_POLICY_URL, label = "PageValuePolicy.auth.valuePolcy.label", description = "PageValuePolicy.auth.valuePolicy.description") }) -public class PageValuePolicy extends PageAdminValuePolicies { +public class PageValuePolicy extends PageAdmin { private static final long serialVersionUID = 1L; diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageAssignmentsList.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageAssignmentsList.java index 58911374878..49b1f8ebf0a 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageAssignmentsList.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageAssignmentsList.java @@ -80,12 +80,16 @@ public class PageAssignmentsList extends PageBase{ private IModel> assignmentsModel; private OperationResult backgroundTaskOperationResult = null; IModel descriptionModel; + private boolean conflictProblemExists = false; + private boolean loadConflicts = false; + public PageAssignmentsList(){ this(false); } public PageAssignmentsList(boolean loadConflicts){ + this.loadConflicts = loadConflicts; initModels(); if (loadConflicts){ getSessionStorage().getRoleCatalog().setConflictsList(getAssignmentConflicts()); @@ -155,14 +159,13 @@ protected String getUserButtonLabel(){ protected void onDeleteSelectedUsersPerformed(AjaxRequestTarget target){ super.onDeleteSelectedUsersPerformed(target); getSessionStorage().getRoleCatalog().setTargetUserList(new ArrayList<>()); - - target.add(getTargetUserSelectionButton()); + targetUserChangePerformed(target); } @Override protected void multipleUsersSelectionPerformed(AjaxRequestTarget target, List usersList){ getSessionStorage().getRoleCatalog().setTargetUserList(usersList); - target.add(getTargetUserSelectionButton()); + targetUserChangePerformed(target); } }; @@ -215,6 +218,7 @@ protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { public boolean isEnabled(){ return (getSessionStorage().getRoleCatalog().isMultiUserRequest() || onlyWarnings() || areConflictsResolved()) && + !conflictProblemExists && getSessionStorage().getRoleCatalog().getAssignmentShoppingCart() != null && getSessionStorage().getRoleCatalog().getAssignmentShoppingCart().size() > 0; } @@ -286,6 +290,15 @@ private void onSingleUserRequestPerformed(AjaxRequestTarget target) { } } + private void targetUserChangePerformed(AjaxRequestTarget target){ + PageAssignmentsList.this.getFeedbackMessages().clear(); + conflictProblemExists = false; + if (loadConflicts){ + getSessionStorage().getRoleCatalog().setConflictsList(getAssignmentConflicts()); + } + target.add(PageAssignmentsList.this); + } + @NotNull private ModelExecuteOptions createOptions() { OperationBusinessContextType businessContextType; @@ -449,17 +462,22 @@ private List getAssignmentConflicts(){ .previewChanges(WebComponentUtil.createDeltaCollection(delta), recomputeOptions, task, result); DeltaSetTriple evaluatedAssignmentTriple = modelContext .getEvaluatedAssignmentTriple(); - Collection addedAssignments = evaluatedAssignmentTriple.getPlusSet(); - for (EvaluatedAssignment evaluatedAssignment : addedAssignments) { - - for (EvaluatedPolicyRule policyRule : evaluatedAssignment.getAllTargetsPolicyRules()) { - if (!policyRule.containsEnabledAction()) { - continue; + if (evaluatedAssignmentTriple != null) { + Collection addedAssignments = evaluatedAssignmentTriple.getPlusSet(); + for (EvaluatedAssignment evaluatedAssignment : addedAssignments) { + for (EvaluatedPolicyRule policyRule : evaluatedAssignment.getAllTargetsPolicyRules()) { + if (!policyRule.containsEnabledAction()) { + continue; + } + // everything other than 'enforce' is a warning + boolean isWarning = !policyRule.containsEnabledAction(EnforcementPolicyActionType.class); + fillInConflictedObjects(evaluatedAssignment, policyRule.getAllTriggers(), isWarning, conflictsMap); } - // everything other than 'enforce' is a warning - boolean isWarning = !policyRule.containsEnabledAction(EnforcementPolicyActionType.class); - fillInConflictedObjects(evaluatedAssignment, policyRule.getAllTriggers(), isWarning, conflictsMap); } + } else if (!result.isSuccess() && StringUtils.isNotEmpty(getSubresultWarningMessages(result))) { + getFeedbackMessages().warn(PageAssignmentsList.this, + createStringResource("PageAssignmentsList.conflictsWarning").getString() + " " + getSubresultWarningMessages(result)); + conflictProblemExists = true; } } catch (Exception e) { LoggingUtils.logUnexpectedException(LOGGER, "Couldn't get assignments conflicts. Reason: ", e); @@ -468,6 +486,20 @@ private List getAssignmentConflicts(){ conflictsList.addAll(conflictsMap.values()); return conflictsList; } + + private String getSubresultWarningMessages(OperationResult result){ + if (result == null || result.getSubresults() == null){ + return ""; + } + StringBuilder sb = new StringBuilder(); + result.getSubresults().forEach(subresult ->{ + if (subresult.isWarning()){ + sb.append(subresult.getMessage()); + sb.append("\n"); + } + }); + return sb.toString(); + } private void fillInConflictedObjects(EvaluatedAssignment evaluatedAssignment, Collection> triggers, boolean isWarning, Map conflictsMap) { diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PagePostAuthentication.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PagePostAuthentication.java index bff026b4d68..2bbd00108b3 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PagePostAuthentication.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PagePostAuthentication.java @@ -36,6 +36,7 @@ import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.security.api.AuthorizationConstants; import com.evolveum.midpoint.security.api.MidPointPrincipal; +import com.evolveum.midpoint.security.api.MidPointPrincipalManager; import com.evolveum.midpoint.task.api.Task; import com.evolveum.midpoint.util.exception.CommonException; import com.evolveum.midpoint.util.exception.CommunicationException; diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageSelfDashboard.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageSelfDashboard.java index 2b18a8dfb01..34c9a2b0fca 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageSelfDashboard.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageSelfDashboard.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2017 Evolveum + * Copyright (c) 2010-2018 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,9 +21,7 @@ import java.util.*; import com.evolveum.midpoint.gui.api.PredefinedDashboardWidgetId; -import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.query.builder.S_FilterEntryOrEmpty; -import com.evolveum.midpoint.schema.util.AdminGuiConfigTypeUtil; import com.evolveum.midpoint.web.application.Url; import com.evolveum.midpoint.wf.util.QueryUtils; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; @@ -42,6 +40,12 @@ import com.evolveum.midpoint.gui.api.page.PageBase; import com.evolveum.midpoint.gui.api.util.WebComponentUtil; import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; +import com.evolveum.midpoint.prism.PrismContainer; +import com.evolveum.midpoint.prism.PrismContainerValue; +import com.evolveum.midpoint.prism.PrismObject; +import com.evolveum.midpoint.prism.PrismReference; +import com.evolveum.midpoint.prism.PrismReferenceValue; import com.evolveum.midpoint.prism.query.ObjectQuery; import com.evolveum.midpoint.schema.GetOperationOptions; import com.evolveum.midpoint.schema.SelectorOptions; @@ -114,10 +118,10 @@ public class PageSelfDashboard extends PageSelf { private static final int MAX_REQUESTS = 1000; private final Model> principalModel = new Model<>(); - private AdminGuiConfigurationType adminGuiConfig; + private CompiledUserProfile compiledUserProfile; public PageSelfDashboard() { - adminGuiConfig = getPrincipal().getAdminGuiConfiguration(); + compiledUserProfile = getPrincipal().getCompiledUserProfile(); principalModel.setObject(loadUser()); setTimeZone(PageSelfDashboard.this); initLayout(); @@ -352,7 +356,7 @@ private List loadLinksList() { if (user == null) { return new ArrayList<>(); } else { - return ((PageBase) getPage()).loadAdminGuiConfiguration().getUserDashboardLink(); + return ((PageBase) getPage()).getCompiledUserProfile().getUserDashboardLink(); } } @@ -558,8 +562,8 @@ private AssignmentItemDto createAssignmentItem(PrismObject user, PrismContainer construction = assignment.findContainer(AssignmentType.F_CONSTRUCTION); String name = null; String description = ""; - if (construction.getValue().asContainerable() != null && !construction.isEmpty()) { - ConstructionType constr = (ConstructionType) construction.getValue().asContainerable(); + if (construction.getRealValue() != null && !construction.isEmpty()) { + ConstructionType constr = (ConstructionType) construction.getRealValue(); if (constr.getResourceRef() != null) { ObjectReferenceType resourceRef = constr.getResourceRef(); @@ -609,15 +613,14 @@ private String getAssignmentDescription(PrismObject value){ } private UserInterfaceElementVisibilityType getComponentVisibility(PredefinedDashboardWidgetId componentId){ - if (adminGuiConfig == null || adminGuiConfig.getUserDashboard() == null) { + if (compiledUserProfile == null || compiledUserProfile.getUserDashboard() == null) { return UserInterfaceElementVisibilityType.AUTOMATIC; } - List widgetsList = adminGuiConfig.getUserDashboard().getWidget(); + List widgetsList = compiledUserProfile.getUserDashboard().getWidget(); if (widgetsList == null || widgetsList.size() == 0){ return UserInterfaceElementVisibilityType.VACANT; } - DashboardWidgetType widget = AdminGuiConfigTypeUtil.findWidget(adminGuiConfig.getUserDashboard(), - componentId.getUri()); + DashboardWidgetType widget = compiledUserProfile.findUserDashboardWidget(componentId.getUri()); if (widget == null || widget.getVisibility() == null){ return UserInterfaceElementVisibilityType.HIDDEN; } else { diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/RoleCatalogTabPanel.html b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/RoleCatalogTabPanel.html index 4bc92997686..18737fa1580 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/RoleCatalogTabPanel.html +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/RoleCatalogTabPanel.html @@ -20,7 +20,7 @@
-
+
diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/security/MidPointAuthenticationProvider.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/security/MidPointAuthenticationProvider.java index 3ce7dc7b9fc..1a8613934c4 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/security/MidPointAuthenticationProvider.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/security/MidPointAuthenticationProvider.java @@ -56,27 +56,39 @@ public void setMessageSource(MessageSource messageSource) { @Override public Authentication authenticate(Authentication authentication) throws AuthenticationException { - String enteredUsername = (String) authentication.getPrincipal(); - LOGGER.trace("Authenticating username '{}'", enteredUsername); - - ConnectionEnvironment connEnv = ConnectionEnvironment.create(SchemaConstants.CHANNEL_GUI_USER_URI); - - Authentication token; - if (authentication instanceof UsernamePasswordAuthenticationToken) { - String enteredPassword = (String) authentication.getCredentials(); - token = passwordAuthenticationEvaluator.authenticate(connEnv, new PasswordAuthenticationContext(enteredUsername, enteredPassword)); - } else if (authentication instanceof PreAuthenticatedAuthenticationToken) { - token = passwordAuthenticationEvaluator.authenticateUserPreAuthenticated(connEnv, enteredUsername); - } else { - LOGGER.error("Unsupported authentication {}", authentication); - throw new AuthenticationServiceException("web.security.provider.unavailable"); + try { + String enteredUsername = (String) authentication.getPrincipal(); + LOGGER.trace("Authenticating username '{}'", enteredUsername); + + ConnectionEnvironment connEnv = ConnectionEnvironment.create(SchemaConstants.CHANNEL_GUI_USER_URI); + + try { + Authentication token; + if (authentication instanceof UsernamePasswordAuthenticationToken) { + String enteredPassword = (String) authentication.getCredentials(); + token = passwordAuthenticationEvaluator.authenticate(connEnv, new PasswordAuthenticationContext(enteredUsername, enteredPassword)); + } else if (authentication instanceof PreAuthenticatedAuthenticationToken) { + token = passwordAuthenticationEvaluator.authenticateUserPreAuthenticated(connEnv, enteredUsername); + } else { + LOGGER.error("Unsupported authentication {}", authentication); + throw new AuthenticationServiceException("web.security.provider.unavailable"); + } + + MidPointPrincipal principal = (MidPointPrincipal)token.getPrincipal(); + + LOGGER.debug("User '{}' authenticated ({}), authorities: {}", authentication.getPrincipal(), + authentication.getClass().getSimpleName(), principal.getAuthorities()); + return token; + + } catch (AuthenticationException e) { + LOGGER.info("Authentication failed for {}: {}", enteredUsername, e.getMessage()); + throw e; + } + } catch (RuntimeException | Error e) { + // Make sure to explicitly log all runtime errors here. Spring security is doing very poor job and does not log this properly. + LOGGER.error("Authentication (runtime) error: {}", e.getMessage(), e); + throw e; } - - MidPointPrincipal principal = (MidPointPrincipal)token.getPrincipal(); - - LOGGER.debug("User '{}' authenticated ({}), authorities: {}", authentication.getPrincipal(), - authentication.getClass().getSimpleName(), principal.getAuthorities()); - return token; } @Override diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/security/MidPointGuiAuthorizationEvaluator.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/security/MidPointGuiAuthorizationEvaluator.java index 603bfe28f20..947abd4bbce 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/security/MidPointGuiAuthorizationEvaluator.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/security/MidPointGuiAuthorizationEvaluator.java @@ -76,12 +76,12 @@ public MidPointGuiAuthorizationEvaluator(SecurityEnforcer securityEnforcer, Secu } @Override - public UserProfileService getUserProfileService() { + public MidPointPrincipalManager getUserProfileService() { return securityContextManager.getUserProfileService(); } @Override - public void setUserProfileService(UserProfileService userProfileService) { + public void setUserProfileService(MidPointPrincipalManager userProfileService) { securityContextManager.setUserProfileService(userProfileService); } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/security/SecurityUtils.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/security/SecurityUtils.java index abc4648af4f..d840476818e 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/security/SecurityUtils.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/security/SecurityUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2015 Evolveum + * Copyright (c) 2010-2018 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ package com.evolveum.midpoint.web.security; import com.evolveum.midpoint.gui.api.util.WebComponentUtil; +import com.evolveum.midpoint.model.api.authentication.MidPointUserProfilePrincipal; import com.evolveum.midpoint.security.api.AuthorizationConstants; import com.evolveum.midpoint.security.api.MidPointPrincipal; import com.evolveum.midpoint.util.logging.Trace; @@ -47,28 +48,28 @@ public class SecurityUtils { private static final Trace LOGGER = TraceManager.getTrace(SecurityUtils.class); - public static MidPointPrincipal getPrincipalUser() { + public static MidPointUserProfilePrincipal getPrincipalUser() { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); return getPrincipalUser(authentication); } - public static MidPointPrincipal getPrincipalUser(Authentication authentication) { + public static MidPointUserProfilePrincipal getPrincipalUser(Authentication authentication) { if (authentication == null) { LOGGER.trace("Authentication not available in security context."); return null; } Object principal = authentication.getPrincipal(); - if (principal instanceof MidPointPrincipal) { - return (MidPointPrincipal) principal; + if (principal instanceof MidPointUserProfilePrincipal) { + return (MidPointUserProfilePrincipal) principal; } if (AuthorizationConstants.ANONYMOUS_USER_PRINCIPAL.equals(principal)) { // silently ignore to avoid filling the logs return null; } LOGGER.debug("Principal user in security context holder is {} ({}) but not type of {}", - principal, principal.getClass(), MidPointPrincipal.class.getName()); + principal, principal.getClass(), MidPointUserProfilePrincipal.class.getName()); return null; } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/util/ExpressionUtil.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/util/ExpressionUtil.java index 4a99b9c74d5..5eed13e5be6 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/util/ExpressionUtil.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/util/ExpressionUtil.java @@ -349,7 +349,7 @@ public static void removeShadowRefEvaluatorValue(ExpressionType expression, Stri if (node instanceof MapXNode && ((MapXNode) node).containsKey(SHADOW_REF_KEY)) { XNode shadowRefNodes = ((MapXNode) node).get(SHADOW_REF_KEY); if (shadowRefNodes instanceof MapXNode && shadowRefOid.equals(getShadowRefNodeOid((MapXNode) shadowRefNodes))) { - prismContext.hacks().putToMapXNode((MapXNode) node, SHADOW_REF_KEY, null); + prismContext.xnodeMutator().putToMapXNode((MapXNode) node, SHADOW_REF_KEY, null); //todo don't get why while using removeEvaluatorByName no changes are saved // removeEvaluatorByName(expression, SchemaConstantsGenerated.C_VALUE); } else if (shadowRefNodes instanceof ListXNode) { @@ -416,7 +416,7 @@ public static MapXNode getOrCreateAssociationTargetSearchValues(ExpressionType e filterClauseNode = prismContext.xnodeFactory().map(); } if (!filterClauseNode.containsKey(new QName("equal"))) { - prismContext.hacks().putToMapXNode(filterClauseNode, new QName("equal"), null); + prismContext.xnodeMutator().putToMapXNode(filterClauseNode, new QName("equal"), null); } MapXNode values = (MapXNode)filterClauseNode.get(new QName("equal")); if (values == null) { @@ -429,7 +429,7 @@ public static void updateAssociationTargetSearchPath(ExpressionType expression, MapXNode values = getOrCreateAssociationTargetSearchValues(expression, prismContext); PrimitiveXNode pathValue = (PrimitiveXNode)values.get(new QName("path")); if (pathValue != null) { - prismContext.hacks().setPrimitiveXNodeValue(pathValue, path, null); + prismContext.xnodeMutator().setPrimitiveXNodeValue(pathValue, path, null); } } @@ -499,16 +499,16 @@ public static ListXNode getShadowRefNodesList(ExpressionType expression, boolean } else if (createIfNotExist && ((MapXNode) node).get(SHADOW_REF_KEY) instanceof MapXNode) { MapXNode shadowRef = (MapXNode) ((MapXNode) node).get(SHADOW_REF_KEY); shadowRefNodes = prismContext.xnodeFactory().list(shadowRef); - prismContext.hacks().putToMapXNode((MapXNode) node, SHADOW_REF_KEY, shadowRefNodes); + prismContext.xnodeMutator().putToMapXNode((MapXNode) node, SHADOW_REF_KEY, shadowRefNodes); } } else if (createIfNotExist) { shadowRefNodes = prismContext.xnodeFactory().list(); - prismContext.hacks().putToMapXNode((MapXNode) node, SHADOW_REF_KEY, shadowRefNodes); + prismContext.xnodeMutator().putToMapXNode((MapXNode) node, SHADOW_REF_KEY, shadowRefNodes); } } else if (createIfNotExist) { shadowRefNodes = prismContext.xnodeFactory().list(); node = prismContext.xnodeFactory().map(); - prismContext.hacks().putToMapXNode((MapXNode) node, SHADOW_REF_KEY, shadowRefNodes); + prismContext.xnodeMutator().putToMapXNode((MapXNode) node, SHADOW_REF_KEY, shadowRefNodes); raw = new RawType(node, prismContext); element.setValue(raw); } @@ -532,7 +532,7 @@ public static void addShadowRefEvaluatorValue(ExpressionType expression, String Map shadowRefNodeSource = new HashMap<>(); shadowRefNodeSource.put(SHADOW_OID_KEY, factory.primitive(oid)); shadowRefNodeSource.put(SHADOW_TYPE_KEY, factory.primitive(ShadowType.COMPLEX_TYPE.getLocalPart())); - prismContext.hacks().addToListXNode(shadowRefNodes, factory.map(shadowRefNodeSource)); + prismContext.xnodeMutator().addToListXNode(shadowRefNodes, factory.map(shadowRefNodeSource)); } public static List getLiteralExpressionValues(ExpressionType expression) throws SchemaException{ diff --git a/gui/admin-gui/src/main/resources/application.yml b/gui/admin-gui/src/main/resources/application.yml index a7db8b70081..66313955377 100644 --- a/gui/admin-gui/src/main/resources/application.yml +++ b/gui/admin-gui/src/main/resources/application.yml @@ -27,6 +27,9 @@ auth: ## Example SSO header authentication configuration # sso: # header: SM_USER +## Example SSO environment authentication configuration +# sso: +# env: REMOTE_USER ## Example CAS SSO configuration # cas: # midpoint: @@ -50,4 +53,4 @@ auth: # enable-csrf: false # default for midpoint is true # more properties with default values can be found here: -# https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html \ No newline at end of file +# https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint.properties b/gui/admin-gui/src/main/resources/localization/Midpoint.properties index 7b8796da562..33e4eed3522 100755 --- a/gui/admin-gui/src/main/resources/localization/Midpoint.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint.properties @@ -2702,7 +2702,7 @@ ProvisioningStatistics.MaxTime=Max ProvisioningStatistics.MinTime=Min ProvisioningStatistics.ObjectClass=Object class ProvisioningStatistics.OtherFailure=Fail -ProvisioningStatistics.OtherSuccess=Script OK +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Resource ProvisioningStatistics.ScriptFailure=Fail ProvisioningStatistics.ScriptSuccess=Script OK @@ -3901,6 +3901,7 @@ AssignmentConflictPanel.undoAction=Undo PageAssignmentConflicts.title=Assignments conflicts PageAssignmentConflicts.back=Back PageAssignmentConflicts.submit=Submit +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: AbstractShoppingCartTabPanel.addAllButton=Add all AbstractShoppingCartTabPanel.requestingForLabel=Requesting for AbstractShoppingCartTabPanel.availableRelationsLabel=Available relations @@ -4306,6 +4307,7 @@ WorkItemNotificationActionType.details.newValue=New work item notification actio ResourceObjectAssociationType.details.newValue=New resource object association ResourceAttributeDefinitionType.details.newValue=New resource attribute definition MappingType.details.newValue=New mapping +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=Object state assignmentState.details=Assignment state hasAssignment.details=Has assignment diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_cs.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_cs.properties index 9f59d7f2850..2fd2f5bcd0a 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_cs.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_cs.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Cíl AssignmentEditorPanel.tenantRef=Klient AssignmentEditorPanel.undefined=Nedefinováno AssignmentEditorPanel.metadataBlock={0} Metadata +AssignmentEditorPanel.message.loadAttributes.fatalError=V průběhu načítání atributů přiřazení došlo k výjimce. +AssignmentEditorPanel.message.getReference.fatalError=Nepodařilo se získat odkaz na aplikaci v konstrukci účtu. AssignmentActivationPopupPanel.title=Aktivace AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=Zrušit @@ -252,6 +254,7 @@ contentPanel.accounts=Obsah contentPanel.entitlements=Oprávnění CountToolbar.label={0,number,integer} až {1,number,integer} z {2,number,integer} CountToolbar.noFound=Nebylo nic nalezeno. +DataLanguagePanel.message.onStateChanged.fatalError=Nepodařilo se změnit jazyk. DateValidator.message.fromAfterTo=Položka Datum od musí být před položkou Datum do. DebugButtonPanel.button.delete=Smazat DebugButtonPanel.button.export=Exportovat @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Informace fetchStrategy.nullValid=Vyberte jeden filter.duplicate=Filtr se jménem '{0}' je již definován filter.emptyFilter=Filtr nesmí být prázdný +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Nepodařilo se načíst dostupné role H3Header.label.error=Chyba H3Header.showMore=Více HandlerUriActions.ACTION_ADD_FOCUS=Vložit vzorový objekt @@ -566,6 +570,7 @@ Message.SourceMemory=úloha v paměti (získáno {0}) Message.SourceRepository=repozitory (statistika aktualizována {0}) message.success=Vaše odpovědi byly úspěšně změmněny message.WrongAnswer=Otázky nebyly správně zodpovězeny +ModelInitialSetup.message.init.fatalError=Došlo k selhání akcí návazných na inicializaci modelu. ModelOperationStatusPanel.label.focusName=Objekt: ModelOperationStatusPanel.label.focusType=Typ: ModelOperationStatusPanel.label.primaryDelta=Hlavní rozdílová změna: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Min. NotificationsStatistics.TotalTime=Celkový čas NotificationsStatistics.Transport=Přenos nullValid=Vyberte jeden +ObjectDataProvider.message.listObjects.fatalError=Nepodařilo se získat seznam objektů. +ObjectDataProvider.message.countObjects.fatalError=Nepodařilo se spočítat objekty. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Nepodařilo se načíst aplikaci účtu. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Nepodařilo se získat nebo vizualizovat rozdílovou (delta) změnu: {0} objectPolicyConfigurationEditor.button.edit=Upravit objectPolicyConfigurationEditor.label=Politiky objektu objectPolicyConfigurationEditor.name.placeholder=Vložit politiku objektu @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Vložit cestu vlastnosti ObjectPolicyDialog.subtype=Podtyp objektu ObjectPolicyDialog.template=Šablona objektu ObjectPolicyDialog.type=Typ objektu +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Nebylo možno nastavit pravidlo na vlastnost, nebyla definována cesta. ObjectPolicyConfigurationTabPanel.type=Typ ObjectPolicyConfigurationTabPanel.subtype=Podtyp ObjectPolicyConfigurationTabPanel.objectTemplate=Šablona objektu @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Vytvořit novou konfigur PageAdminObjectDetails.title.editSystemConfigurationType=Upravit konfiguraci systému PageAdminObjectDetails.noChangesSave=Nebyly provedeny žádné změny, které by měly být uloženy. PageAdminObjectDetails.noChangesPreview=Nebyly provedeny žádné změny, které by mohly být zobrazeny v náhledu. +PageAdminObjectDetails.message.loadParentOrgs.warning=Nebylo možno načíst nadřazenou organizaci {0} pageAdminFocus.basic=Základní pageAdminFocus.message.cantEditFocus=Nastala neznámá chyba, Nepodařilo se upravit vzorový objekt. pageAdminFocus.message.cantNewFocus=Nastala neznámá chyba, Nepodařilo se vytvořit objekt vzorový objekt. @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Spustit PageBulkAction.message.emptyString=Vložená hronadná akce je prázdná. Vložte neprázdný skript. PageBulkAction.options=Nastavení PageBulkAction.title=Uživatelské hromadné operace +PageBulkAction.message.startPerformed.inProgress=Hromadná dávka {0} byla úspěšně odeslána k vykonání +PageBulkAction.message.startPerformed.success=Akce byla vykonána a bylo vráceno {0} objekt/y/ů. Výstup z konzole a výstupní data jsou k dispozici přes funkcionalitu 'Exportovat do XML'. +PageBulkAction.message.startPerformed.fatalError.execute=Nepodařilo se vykonat hromadnou změnu +PageBulkAction.message.startPerformed.fatalError.submit=Nepodařilo se odeslat hromadnou změnu k vykonání +PageBulkAction.message.startPerformed.fatalError.parse=Objekt hromadné změny se nepodařilo zpracovat. +PageBulkAction.message.startPerformed.fatalError.provided=Nebyl poskytnut objekt hromadné změny. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Dodaný text není objektem hromadného přiřazení. Je očekávána instance {0}; bylo však zadána instance {1} PageRepositoryQuery.title=Dotaz do repozitáře PageRepositoryQuery.button.translateAndExecute=Přeložit a provést PageRepositoryQuery.button.translate=Přeložit na Hibernate dotaz @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Jen povolené položky PageCertDefinition.stagesDefinition=Definice fází PageCertDefinitions.message.deleteDefinitionPerformed.success=Došlo k úspěšnému smazání definice. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Nepodařilo se smazat definici kampaně. +PageCertDefinitions.message.createCampaignPerformed.warning=Definice '{0}' odpovídá ad-hoc kampani. Tu není možno spustit manuálně. PageCert.in=za {0} PageCert.message.assignment={0} z {1} {2} až {3} {4}. PageCert.message.textAdministrativeState=Administrativní stav: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Přidat definici nové fáze StageDefinitionPanel.moveStageLeftButton = Přesunout doleva StageDefinitionPanel.moveStageRightButton = Přesunout doprava StageDefinitionPanel.deleteStageButton = Smazat tuto fázi +PageBase.message.parseObject.fatalError=Nepodařilo se zpracovat objekt: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Nepodařilo se načíst systémovou konfiguraci. +PageBase.message.loadDeploymentInformationType.fatalError=Nepodařilo se načíst informace o nasazení. +PageBase.message.getAdministratorPrivileged.fatalError=Nepodařilo se získat administrátorského uživatele: {0} PageContacts.title=Prohlížení kontaktů pageContentAccounts.button.searchButton=Hledat pageContentAccounts.dialog.title.confirmDelete=Potvrzení smazání @@ -1696,7 +1719,7 @@ PageForgetPassword.resetPassword=Resetovat heslo PageForgotPassword.title=Zapomenuté heslo PageForgetPassword.username=Uživatel PageForgotPassword.unsupported.reset.type=Nepodporovaný typ resetu hesla -PageForgotPassword.send.nonce.failed=Uživatelské heslo nemůže být zresetováno. Bude třeba kontaktovat Vašeho správce systému. +PageForgotPassword.send.nonce.failed=Uživatelské heslo se nepodařilo zresetovat. Bude třeba kontaktovat Vašeho správce systému. PageImportObject.button.import=Importovat objekt PageImportObject.embeddedEditor=Vložený editor PageImportObject.file=Soubor @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Opravdu chcete {0} úlo pageTasks.message.confirmationMessageForMultipleTaskObject=Opravdu chcete {0} {1} vybraných úloh? pageTasks.message.confirmationMessageForSingleNodeObject=Opravdu chcete {0} uzel '{1}'? pageTasks.message.confirmationMessageForMultipleNodeObject=Opravdu chcete {0} {1} vybraných uzlů? +pageTasks.message.resumeTasksPerformed.success=Došlo k úspěšnému pokračování v provádění úlohy či úloh. +pageTasks.message.resumeTasksPerformed.fatalError=Nepodařilo se pokračovat v provádění úlohy; +pageTasks.message.synchronizeTasksPerformed.fatalError=Nepodařilo se synchronizovat úlohy +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Při práci se schématem došlo k chybě pageTask.scheduleHelp=Pro jednorázové úlohy nenastavujte interval opakování ani cron-like specifikaci. Pro opakující se úlohy nastavte buď jedno nebo druhé. pageTask.scheduleInterval=Interval spouštění (vteřiny) pageTask.scheduleTitle=Plánování @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Žadatel: pageWorkItem.requestedOn=Požádáno dne: pageWorkItem.requester.description=Žadatel pageWorkItem.requestSpecific.description=Vaše rozhodnutí -webComponentUtil.message.createMenuItemsFromActions.warning=Nebyly nalezeny žádné objekty, na kterých by se dala vykonat akce +WebComponentUtil.message.createMenuItemsFromActions.warning=Nebyly nalezeny žádné objekty, na kterých by se dala vykonat akce +WebComponentUtil.message.refreshResourceSchema.fatalError=Došlo k chybě při načítání schématu aplikace +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Nepodařilo se načíst dostupné role WebComponentUtil.formatDurationWordsForLocal.seconds=vteřin WebComponentUtil.formatDurationWordsForLocal.minutes=minut WebComponentUtil.formatDurationWordsForLocal.hours=hodin @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=Příbuzné žádosti workItemPanel.reasons=Zdůvodnění pro schvalovací proces workItemPanel.approverComment=Komentář schvalovatele workItemPanel.approverInstruction=Instrukce schvalovatele +PageTaskController.message.deleteSyncTokenPerformed.warning=V této úloze není přítomen pešek. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Nepodařilo se smazat synchronizačního peška z úlohy. pageWorkItems.button.back=Zpět pageWorkItems.button.approve=Schválit pageWorkItems.button.claim=Převzít @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Stav pageWorkItems.message.noItemSelected=Nebyla vybrána žádná pracovní položka. pageWorkItems.message.noItemToBeReleased=Žádná z pracovních položek nemůže být uvolněna (pravděpodobná příčina je, že nebyly převzaty žádným uživatelem). pageWorkItems.message.success.approved=Pracovní položky byly úspěšně schváleny. +pageWorkItems.message.partialError.approved=Nepodařilo se schválit či zamítnout pracovní položku z důvodu neočekávané výjimky. pageWorkItems.message.success.rejected=Pracovní položky byly úspěšně zamítnuty. pageWorkItems.message.success.claimed=Pracovní položky byly úspěšně převzaty. +pageWorkItems.message.partialError.claimed=Pracovní položky se nepodařilo předat z důvodu neočekávané výjimky. pageWorkItems.message.success.released={0} pracovních položek bylo úspěšně uvolněno. +pageWorkItems.message.partialError.released=Nepodařilo se uvolnit pracovní položku z důvodu neočekávané výjimky. PageWorkItemsAll.title=Všechny pracovní položky PageWorkItemsAllocatedToMe.title=Pracovní položky přiřazené mně PageWorkItem.title=Podrobnosti pracovní položky @@ -2641,7 +2675,7 @@ ProgressPanel.ExecutionTimeWhenFinished=Operace trvala {0} milivteřin. ProgressPanel.ExecutionTimeWhenRunning=Operace běží {0} vteřin. ProgressPanel.abortRequested=Bylo vyžádáno přerušení, prosím počkejte. ProgressPanel.abortRequestedFinished=Bylo vyžádáno přerušení, ale vykonávání úlohy už bylo pravděpodobně dokončeno. -ProgressPanel.abortRequestedNoInterrupt=Bylo vyžádáno přerušení, prosím počkejte. (poznámka: vlákno nelze přerušit) +ProgressPanel.abortRequestedNoInterrupt=Bylo vyžádáno přerušení, prosím počkejte. (poznámka: vlákno se nepodařilo přerušit) ProgressPanel.populateStatusItem.resourceObjectActivity={0} ({1}) na {2} ProgressTableHeader.Activity=Aktivita ProgressTableHeader.ResourceObject=Zdrojový objekt (pokud existuje) @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=Max. ProvisioningStatistics.MinTime=Min. ProvisioningStatistics.ObjectClass=Třída objektu ProvisioningStatistics.OtherFailure=Chyba -ProvisioningStatistics.OtherSuccess=Skript OK +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Připojená aplikace ProvisioningStatistics.ScriptFailure=Chyba ProvisioningStatistics.ScriptSuccess=Skript OK @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Stáhnout ReconciliationPopupPanel.resource=Aplikace ReconciliationPopupPanel.title.basic=Základní konfigurace reportů rekonciliace repeater.input.nullValid=Vyberte jeden +RepoInitialSetup.message.init.fatalError=Selhaly kroky následné inicializaci repozitáře. ReportConfigurationPanel.title.basic=Základní ReportConfigurationPanel.title.advanced=Rozšířený Requestable.ALL=Vše @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Tolerantní vzor ResourceAttributeEditor.message.cantParseSchema=Nepodařilo se zpracovat schéma aplikace ResourceAttributeEditor.title.delete=Smazat ResourceAttributeEditor.title.edit=Upravit +ResourceContentPanel.message.importResourceObject.warning=Nebylo nic vybráno k importu +ResourceContentPanel.message.importResourceObject.partialError=Nepodařilo se importovat účet {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nebylo nic vybráno k aktualizaci stavu +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Nebylo možno aktualizovat stav (na {0}) pro {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nebylo vybráno nic ke smazání ResourceCredentialsEditor.label=Upravit pověření aplikace ResourceCredentialsEditor.label.fetchStrategy=Strategie získávání ResourceCredentialsEditor.label.inbound=Příchozí @@ -3261,6 +3301,7 @@ type.nullValid=Vyberte jeden Type.RECONCILIATION=Rekonciliace typeSelect.null=Všechny role Type.USERS=Uživatel +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Nepodařilo se načíst dostupné role UploadPanel.delete.tooltip=Odebrat soubor UploadPanel.message.help=Vyberte soubor pro import. UploadPanel.message.removeError=Soubor nebyl odstraněn. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Bezpečnostní otázky UserMenuPanel.editProfile=Upravit profil UserMenuPanel.logout=Odhlásit se UserMenuPanel.resetPasswords=Reset hesla +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Nepodařilo se načíst systémovou bezpečnostní politiku {0} UserOrgReferenceChoosePanel.type.org=Org. jednotka UserOrgReferenceChoosePanel.type=Typ vlastníka UserOrgReferenceChoosePanel.type.user=Uživatel @@ -3302,10 +3344,15 @@ user.noOrgs=Bez organizací validFromFetchStrategy.nullValid=Vyberte jeden validToFetchStrategy.nullValid=Vyberte jeden valueAttribute.nullValid=Vyberte jeden +WebModelUtils.couldntRunTask=Nepodařilo se spustit úlohu {0} +WebModelUtils.couldntLoadPasswordPolicies=Nepodařilo se načíst politiky hesel +WebModelUtils.couldntAssumePowerAttorney=Nepodařilo se převzít moc zmocněnce +WebModelUtils.couldntDropPowerAttorney=Nepodařilo se odebrat moc zmocněnce +WebModelUtils.couldntLoadSystemConfiguration=Nepodařilo se načíst systémovou konfiguraci. WebModelUtils.couldntLoadObject=Nepodařilo se načíst objekt. -WebModelUtils.couldntSaveObject=Objekt se nepovedlo uložit. -WebModelUtils.couldntSearchObjects=Objekty se nepovedlo vyhledat. -WebModelUtils.couldntDeleteObject=Objekty se nepovedlo smazat. +WebModelUtils.couldntSaveObject=Objekt se nepodařilo uložit. +WebModelUtils.couldntSearchObjects=Objekty se nepodařilo vyhledat. +WebModelUtils.couldntDeleteObject=Objekty se nepodařilo smazat. WebModelUtils.couldntCountObjects=Objekty se nepodařilo spočíst. web.security.provider.access.denied=Přístup odepřen. Nemáte právo k přístupu, kontaktujte prosím administrátory Správce identit. web.security.provider.denied=Přístup odepřen. @@ -3325,13 +3372,13 @@ web.security.ldap.invalid=Chybné uživatelské jméno a/nebo heslo. web.security.ldap.invalid.link=Špatný odkaz web.security.ldap.locked=Uživatel je zamknutý, prosíme, počkejte. web.security.ldap.password.bad=Uživatel nemá určené heslo. -web.security.ldap.password.encoding=Systém nemohl přihlásit uživatele, důvod: Nelze zašifrovat heslo. +web.security.ldap.password.encoding=Nepodařilo se přihlásit uživatele, důvod: Nelze zašifrovat heslo. web.security.ldap.unavailable=Systém nyní nemůže zpracovat Váš požadavek. Prosíme, zkuste to znovu později. LdapAuthenticationProvider.badCredentials=Neplatné uživatelské jméno a/nebo heslo. LdapAuthenticationProvider.emptyUsername=Prázdné uživatelské jméno LdapAuthentication.incorrect.value=Typ principála (přihlášení uživatele) nesedí. LdapAuthentication.bad.user=Neznámý uživatel. -UserProfileServiceImpl.unknownUser=Uživatele nelze nalézt. +UserProfileServiceImpl.unknownUser=Nepodařilo se nalézt uživatele. AbstractLdapAuthenticationProvider.emptyPassword=Prázdné heslo. BindAuthenticator.badCredentials=Neplatné uživatelské jméno a/nebo heslo. WfDeltasPanel.label.deltaIn=Vstup procesu: Rozdílové změny ke schválení @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=Vrátit zpět PageAssignmentConflicts.title=Přiřazení jsou v konfliktu s PageAssignmentConflicts.back=Zpět PageAssignmentConflicts.submit=Odeslat +PageAssignmentsList.conflictsWarning=Ve spočítání konfliktů přiřazení z důvodu brání problém s autorizací. Důvod: AbstractShoppingCartTabPanel.addAllButton=Přidat vše AbstractShoppingCartTabPanel.requestingForLabel=Žádáno pro: AbstractShoppingCartTabPanel.availableRelationsLabel=Dostupné vztahy @@ -4002,13 +4050,15 @@ operation.com.evolveum.midpoint.web.page.admin.reports.PageCreatedReports.delete operation.com.evolveum.midpoint.report.impl.ReportManagerImpl.deleteReportOutput=Smazat report (Report) operation.com.evolveum.midpoint.web.page.admin.reports.PageCreatedReports.downloadReport=Stáhnout report (GUI) operation..com.evolveum.midpoint.report.impl.ReportManagerImpl.getReportOutputData=Získat report (Report) -PageWorkItem.couldNotGetWorkItem=Systém nemohl nalézt pracovní položku. Možná byla smazána, nebo je již dokončena. -PageWorkItem.noRequest=Pracovní položku není možné zobrazit, protože není přidružena k žádnému požadavku na schvalování. Pokud problém přetrvává, spusťte prosím úlohu 'Vyčistit Activiti procesy' -PageCaseWorkItem.couldNotGetCase=Systém nemůže získat případ. Možná už byla dokončen nebo smazán. -PageCaseWorkItem.couldNotGetCaseWorkItem=Systém nemůže získat položku pracovního případu. Možná už byla dokončena nebo smazána. +PageWorkItem.couldNotGetWorkItem=Nepodařilo se nalézt pracovní položku. Možná byla smazána, nebo je již dokončena. +PageWorkItem.noRequest=Nepodařilo se zobrazit pracovní položku, protože není přidružena k žádnému požadavku na schvalování. Pokud problém přetrvává, spusťte prosím úlohu 'Vyčistit Activiti procesy' +PageCaseWorkItem.couldNotGetCase=Nepodařilo se získat případ. Možná už byla dokončen nebo smazán. +PageCaseWorkItem.couldNotGetCaseWorkItem=Nepodařilo se získat položku pracovního případu. Možná už byla dokončena nebo smazána. CsvDownloadButtonPanel.export=Exportovat do CSV CsvDownloadButtonPanel.confirmationMessage=Export do CSV formátu je omezen na {0} záznamů. Pokračovat? AssignmentEditorDto.policyRuleTitle=Pravidlo politiky +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=V průběhu načítání atributů přiřazení došlo k výjimce. +AssignmentEditorDto.message.getReference.fatalError=Nepodařilo se získat odkaz na aplikaci v konstrukci účtu. AssignmentDataTablePanel.targetColumnName=Cíl AssignmentDataTablePanel.validityColumnName=Platnost AssignmentDataTablePanel.organizationColumnName=Organizace @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=Nová pracovní položka notifik ResourceObjectAssociationType.details.newValue=Nová asociace objektu aplikace ResourceAttributeDefinitionType.details.newValue=Nová definice atributu aplikace MappingType.details.newValue=Nové mapování +FullTextSearchIndexedItemsConfigurationType.details.newValue=Nové fulltextové prohledávání indexovaných položek objectState.details=Stav objektu assignmentState.details=Stav přiřazení hasAssignment.details=Má přiřazení diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_de.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_de.properties index bdd7af1394d..b6712317d16 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_de.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_de.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Ziel AssignmentEditorPanel.tenantRef=Besitzer AssignmentEditorPanel.undefined=nicht definiert AssignmentEditorPanel.metadataBlock={0} Metadata +AssignmentEditorPanel.message.loadAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=Aktivierung AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=Abbruch @@ -252,6 +254,7 @@ contentPanel.accounts=Inhalt contentPanel.entitlements=Berechtigungen CountToolbar.label={0,number,integer} bis {1,number,integer} von {2,number,integer} CountToolbar.noFound=Keine übereinstimmenden Ergebnisse gefunden. +DataLanguagePanel.message.onStateChanged.fatalError=Couldn't change the language. DateValidator.message.fromAfterTo="Gültigkeitsdatum vom" muss vor "Gültigkeitsdatum bis" liegen. DebugButtonPanel.button.delete=Löschen DebugButtonPanel.button.export=Exportieren @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Information fetchStrategy.nullValid=Auswählen filter.duplicate=Filter mit dem Namen '{0}' ist bereits definiert filter.emptyFilter=Der Filter darf nicht leer sein +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles H3Header.label.error=Fehler H3Header.showMore=mehr anzeigen HandlerUriActions.ACTION_ADD_FOCUS=Fokus hinzufügen @@ -566,6 +570,7 @@ Message.SourceMemory=Aufgabe im Speicher (fetched {0}) Message.SourceRepository=Verzeichnis (Statistiken am {0} aktualisiert) message.success=Die Antworten wurden erfolgreich aktualisiert message.WrongAnswer=Fragen nicht richtig beanwortet +ModelInitialSetup.message.init.fatalError=Model post initialization failed. ModelOperationStatusPanel.label.focusName=Objekt: ModelOperationStatusPanel.label.focusType=des Typen: ModelOperationStatusPanel.label.primaryDelta=Primäres Delta: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=min NotificationsStatistics.TotalTime=Gesamtzeit NotificationsStatistics.Transport=Transport nullValid=wählen +ObjectDataProvider.message.listObjects.fatalError=Couldn't list objects +ObjectDataProvider.message.countObjects.fatalError=Couldn't count objects. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Couldn't load resource for account. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=bearbeiten objectPolicyConfigurationEditor.label=Objektvorschriften objectPolicyConfigurationEditor.name.placeholder=Objektrichtlinien einfügen @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Pfad zu den Eigenschaften einfügen ObjectPolicyDialog.subtype=Objekt Subtyp ObjectPolicyDialog.template=Objektvorlage ObjectPolicyDialog.type=Objekttyp +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Skipping setting property constraint, no path was defined. ObjectPolicyConfigurationTabPanel.type=Typ ObjectPolicyConfigurationTabPanel.subtype=Subtype ObjectPolicyConfigurationTabPanel.objectTemplate=Objektvorlage @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Create new system config PageAdminObjectDetails.title.editSystemConfigurationType=Edit system configuration PageAdminObjectDetails.noChangesSave=There were no changes to be saved. PageAdminObjectDetails.noChangesPreview=There are no changes to be previewed. +PageAdminObjectDetails.message.loadParentOrgs.warning=Cannot load parent org {0} pageAdminFocus.basic=grundlegend pageAdminFocus.message.cantEditFocus=Unbekannter Fehler ist aufgetreten, Fokusobjekt kann nicht editiert werden. pageAdminFocus.message.cantNewFocus=Ein unbekannter Fehler ist aufgetreten. Neues Fokus Objekt konnte nicht erstellt werden. @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Start PageBulkAction.message.emptyString=Eingefügte Massenaktion ist leer. Bitte ein nicht leeres Script übergeben. PageBulkAction.options=Optionen PageBulkAction.title=Benutzer Massenaktionen +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=Action executed. Returned {0} item(s). Console and data output available via 'Export to XML' function. +PageBulkAction.message.startPerformed.fatalError.execute=Couldn't execute bulk action +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=Couldn't parse bulk action object +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=Verzeichnisabfrage PageRepositoryQuery.button.translateAndExecute=Translate and execute PageRepositoryQuery.button.translate=Translate to hibernate query @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Nur aktivierte Elemente PageCertDefinition.stagesDefinition=Definition der Phasen PageCertDefinitions.message.deleteDefinitionPerformed.success=The definition has been successfully deleted. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Couldn't delete campaign definition. +PageCertDefinitions.message.createCampaignPerformed.warning=Definition '{0}' is for ad-hoc campaigns that cannot be started manually. PageCert.in=in {0} PageCert.message.assignment={0} von {1} {2} bis {3} {4}. PageCert.message.textAdministrativeState=Administrativer Status: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Phasendefinition hinzufügen StageDefinitionPanel.moveStageLeftButton = Nach links verschieben StageDefinitionPanel.moveStageRightButton = Nach rechts verschieben StageDefinitionPanel.deleteStageButton = Diese Phase löschen +PageBase.message.parseObject.fatalError=Couldn't parse object: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Couldn't load system configuration. +PageBase.message.loadDeploymentInformationType.fatalError=Couldn't load deployment information. +PageBase.message.getAdministratorPrivileged.fatalError=Couldn't get administrator user: {0} PageContacts.title=Kontaktübersicht pageContentAccounts.button.searchButton=Suche pageContentAccounts.dialog.title.confirmDelete=Bestätigung löschen @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Wollen Sie wirklich Auf pageTasks.message.confirmationMessageForMultipleTaskObject=Wollen Sie wirklich folgende {1} Aufgabe(n) {0}? pageTasks.message.confirmationMessageForSingleNodeObject=Wollen Sie wirklich Knoten '{1}' {0}? pageTasks.message.confirmationMessageForMultipleNodeObject=Wollen Sie wirklich die angewählten {1} Knoten{0} ? +pageTasks.message.resumeTasksPerformed.success=The task(s) have been successfully resumed. +pageTasks.message.resumeTasksPerformed.fatalError=Couldn't resume the task(s) +pageTasks.message.synchronizeTasksPerformed.fatalError=Couldn't synchronize tasks +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=Für wiederkehrende Aufgaben geben Sie entweder einen Zeitplan Intervall oder eine Cron ähnliche Spezifikation ein. Für einmalige Aufgaben keine der beiden. pageTask.scheduleInterval=Zeitplan Intervall (in Sekunden) pageTask.scheduleTitle=Planung @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Beantragt von: pageWorkItem.requestedOn=Beantragt am: pageWorkItem.requester.description=Antragsteller pageWorkItem.requestSpecific.description=Ihre Entscheidung -webComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Couldn't load available roles WebComponentUtil.formatDurationWordsForLocal.seconds=seconds WebComponentUtil.formatDurationWordsForLocal.minutes=minutes WebComponentUtil.formatDurationWordsForLocal.hours=hours @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=zugehörige Anträge workItemPanel.reasons=Reasons for the approval process workItemPanel.approverComment=Kommentar Genehmiger workItemPanel.approverInstruction=Genehmiger Instruktionen +PageTaskController.message.deleteSyncTokenPerformed.warning=Token is not present in this task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Couldn't delete sync token from the task. pageWorkItems.button.back=Zurück pageWorkItems.button.approve=Genehmigen pageWorkItems.button.claim=Anspruch @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Status pageWorkItems.message.noItemSelected=Es wurde kein Arbeitselement ausgewählt. pageWorkItems.message.noItemToBeReleased=None of the work items can be released (most probably because they were not claimed by the user). pageWorkItems.message.success.approved=The work item(s) have been successfully approved. +pageWorkItems.message.partialError.approved=Couldn't approve/reject work item due to an unexpected exception. pageWorkItems.message.success.rejected=The work item(s) have been successfully rejected. pageWorkItems.message.success.claimed=The work item(s) have been successfully claimed. +pageWorkItems.message.partialError.claimed=Couldn't claim work item due to an unexpected exception. pageWorkItems.message.success.released={0} work item(s) have been successfully released. +pageWorkItems.message.partialError.released=Couldn't release work item due to an unexpected exception. PageWorkItemsAll.title=Alle Arbeitselemente PageWorkItemsAllocatedToMe.title=Mir zugewiesene Arbeitselemente PageWorkItem.title=Work Item Details @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=max ProvisioningStatistics.MinTime=min ProvisioningStatistics.ObjectClass=Objektklasse ProvisioningStatistics.OtherFailure=Fehlgeschlagen -ProvisioningStatistics.OtherSuccess=Skript OK +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Ressource ProvisioningStatistics.ScriptFailure=Fehlgeschlagen ProvisioningStatistics.ScriptSuccess=Skript OK @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Download ReconciliationPopupPanel.resource=Ressource ReconciliationPopupPanel.title.basic=Basis Abstimmungsbericht Konfiguration repeater.input.nullValid=Auswählen +RepoInitialSetup.message.init.fatalError=Repository post initialization failed. ReportConfigurationPanel.title.basic=grundlegend ReportConfigurationPanel.title.advanced=erweitert Requestable.ALL=Alle @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Akzeptierbares Muster ResourceAttributeEditor.message.cantParseSchema=Ressourcenschema konnte nicht geparst werden ResourceAttributeEditor.title.delete=Löschen ResourceAttributeEditor.title.edit=Ändern +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=Could not import account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Could not update status (to {0}) for {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=Zugangsdaten der Ressource bearbeiten ResourceCredentialsEditor.label.fetchStrategy=Anfordern Strategie ResourceCredentialsEditor.label.inbound=eingehend @@ -3261,6 +3301,7 @@ type.nullValid=Auswählen Type.RECONCILIATION=Abgleich typeSelect.null=Alle Rollen Type.USERS=Anwender +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles UploadPanel.delete.tooltip=Datei löschen UploadPanel.message.help=Importdatei auswählen UploadPanel.message.removeError=Datei wurde nicht entfernt @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Sicherheitsfragen UserMenuPanel.editProfile=Profil editieren UserMenuPanel.logout=Abmelden UserMenuPanel.resetPasswords=Passwort zurücksetzen +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Couldn't load system security policy {0} UserOrgReferenceChoosePanel.type.org=Org.-Einheit UserOrgReferenceChoosePanel.type=Owner Type UserOrgReferenceChoosePanel.type.user=Anwender @@ -3302,6 +3344,11 @@ user.noOrgs=Keine Organisationen validFromFetchStrategy.nullValid=Auswählen validToFetchStrategy.nullValid=Auswählen valueAttribute.nullValid=Auswählen +WebModelUtils.couldntRunTask=Couldn't run task {0} +WebModelUtils.couldntLoadPasswordPolicies=Couldn't load password policies. +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=Couldn't load system configuration. WebModelUtils.couldntLoadObject=Couldn't load object. WebModelUtils.couldntSaveObject=Das Objekt kann nicht gespeichert werden. WebModelUtils.couldntSearchObjects=Couldn't search objects. @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=rückgängig machen PageAssignmentConflicts.title=Zuweisungskonflikte PageAssignmentConflicts.back=Zurück PageAssignmentConflicts.submit=Absenden +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: AbstractShoppingCartTabPanel.addAllButton=Add all AbstractShoppingCartTabPanel.requestingForLabel=Requesting for AbstractShoppingCartTabPanel.availableRelationsLabel=Available relations @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Couldn't get case work item. It might h CsvDownloadButtonPanel.export=CSV Exportieren CsvDownloadButtonPanel.confirmationMessage=CSV Export ist in seiner Grösse auf {0} Einträge limitiert. Wollen Sie fortfahren? AssignmentEditorDto.policyRuleTitle=Richtlinienregel +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=Ziel AssignmentDataTablePanel.validityColumnName=Gültigkeit AssignmentDataTablePanel.organizationColumnName=Organisation @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=New work item notification actio ResourceObjectAssociationType.details.newValue=New resource object association ResourceAttributeDefinitionType.details.newValue=New resource attribute definition MappingType.details.newValue=New mapping +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=Object state assignmentState.details=Assignment state hasAssignment.details=Has assignment diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_en.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_en.properties index 14e97dc8562..4078e6ababa 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_en.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_en.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Target AssignmentEditorPanel.tenantRef=Tenant AssignmentEditorPanel.undefined=Undefined AssignmentEditorPanel.metadataBlock={0} Metadata +AssignmentEditorPanel.message.loadAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=Activation AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=Cancel @@ -252,6 +254,7 @@ contentPanel.accounts=Content contentPanel.entitlements=Entitlements CountToolbar.label={0,number,integer} to {1,number,integer} of {2,number,integer} CountToolbar.noFound=No matching result found. +DataLanguagePanel.message.onStateChanged.fatalError=Couldn't change the language. DateValidator.message.fromAfterTo=Valid from date must be before valid to date. DebugButtonPanel.button.delete=Delete DebugButtonPanel.button.export=Export @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Information fetchStrategy.nullValid=Choose One filter.duplicate=Filter with name '{0}' is already defined filter.emptyFilter=Filter must not be empty +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles H3Header.label.error=Error H3Header.showMore=Show more HandlerUriActions.ACTION_ADD_FOCUS=Add focus @@ -566,6 +570,7 @@ Message.SourceMemory=task in memory (fetched {0}) Message.SourceRepository=repository (statistics updated on {0}) message.success=Your Answers Were Updated Successfully message.WrongAnswer=Questions Not Answered Correctly +ModelInitialSetup.message.init.fatalError=Model post initialization failed. ModelOperationStatusPanel.label.focusName=Object: ModelOperationStatusPanel.label.focusType=of type: ModelOperationStatusPanel.label.primaryDelta=Primary delta: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Min NotificationsStatistics.TotalTime=Total time NotificationsStatistics.Transport=Transport nullValid=Choose one +ObjectDataProvider.message.listObjects.fatalError=Couldn't list objects +ObjectDataProvider.message.countObjects.fatalError=Couldn't count objects. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Couldn't load resource for account. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=Edit objectPolicyConfigurationEditor.label=Object policies objectPolicyConfigurationEditor.name.placeholder=Insert object policy @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Insert property path ObjectPolicyDialog.subtype=Object subtype ObjectPolicyDialog.template=Object template ObjectPolicyDialog.type=Object type +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Skipping setting property constraint, no path was defined. ObjectPolicyConfigurationTabPanel.type=Type ObjectPolicyConfigurationTabPanel.subtype=Subtype ObjectPolicyConfigurationTabPanel.objectTemplate=Object template @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Create new system config PageAdminObjectDetails.title.editSystemConfigurationType=Edit system configuration PageAdminObjectDetails.noChangesSave=There were no changes to be saved. PageAdminObjectDetails.noChangesPreview=There are no changes to be previewed. +PageAdminObjectDetails.message.loadParentOrgs.warning=Cannot load parent org {0} pageAdminFocus.basic=Basic pageAdminFocus.message.cantEditFocus=Unknown error occurred, can't edit focus object. pageAdminFocus.message.cantNewFocus=Unknown error occurred, can't create new focus object. @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Start PageBulkAction.message.emptyString=Inserted bulk action is empty. Please provide non-empty script. PageBulkAction.options=Options PageBulkAction.title=User bulk actions +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=Action executed. Returned {0} item(s). Console and data output available via 'Export to XML' function. +PageBulkAction.message.startPerformed.fatalError.execute=Couldn't execute bulk action +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=Couldn't parse bulk action object +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=Repository query PageRepositoryQuery.button.translateAndExecute=Translate and execute PageRepositoryQuery.button.translate=Translate to hibernate query @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Enabled items only PageCertDefinition.stagesDefinition=Stages definition PageCertDefinitions.message.deleteDefinitionPerformed.success=The definition has been successfully deleted. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Couldn't delete campaign definition. +PageCertDefinitions.message.createCampaignPerformed.warning=Definition '{0}' is for ad-hoc campaigns that cannot be started manually. PageCert.in=in {0} PageCert.message.assignment={0} of {1} {2} to {3} {4}. PageCert.message.textAdministrativeState=Administrative state: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Add stage definition StageDefinitionPanel.moveStageLeftButton = Move left StageDefinitionPanel.moveStageRightButton = Move right StageDefinitionPanel.deleteStageButton = Delete this stage +PageBase.message.parseObject.fatalError=Couldn't parse object: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Couldn't load system configuration. +PageBase.message.loadDeploymentInformationType.fatalError=Couldn't load deployment information. +PageBase.message.getAdministratorPrivileged.fatalError=Couldn't get administrator user: {0} PageContacts.title=Contacts browser pageContentAccounts.button.searchButton=Search pageContentAccounts.dialog.title.confirmDelete=Delete Confirmation @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Do you really want to { pageTasks.message.confirmationMessageForMultipleTaskObject=Do you really want to {0} selected {1} task(s)? pageTasks.message.confirmationMessageForSingleNodeObject=Do you really want to {0} node '{1}'? pageTasks.message.confirmationMessageForMultipleNodeObject=Do you really want to {0} selected {1} node(s)? +pageTasks.message.resumeTasksPerformed.success=The task(s) have been successfully resumed. +pageTasks.message.resumeTasksPerformed.fatalError=Couldn't resume the task(s) +pageTasks.message.synchronizeTasksPerformed.fatalError=Couldn't synchronize tasks +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=For one-time tasks, enter neither schedule interval nor cron-like specification. For recurring tasks, enter exactly one of these. pageTask.scheduleInterval=Schedule interval (seconds) pageTask.scheduleTitle=Scheduling @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Requested by: pageWorkItem.requestedOn=Requested on: pageWorkItem.requester.description=Requester pageWorkItem.requestSpecific.description=Your decision -webComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Couldn't load available roles WebComponentUtil.formatDurationWordsForLocal.seconds=seconds WebComponentUtil.formatDurationWordsForLocal.minutes=minutes WebComponentUtil.formatDurationWordsForLocal.hours=hours @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=Related requests workItemPanel.reasons=Reasons for the approval process workItemPanel.approverComment=Approver comment workItemPanel.approverInstruction=Approver instruction +PageTaskController.message.deleteSyncTokenPerformed.warning=Token is not present in this task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Couldn't delete sync token from the task. pageWorkItems.button.back=Back pageWorkItems.button.approve=Approve pageWorkItems.button.claim=Claim @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Status pageWorkItems.message.noItemSelected=No work item has been selected. pageWorkItems.message.noItemToBeReleased=None of the work items can be released (most probably because they were not claimed by the user). pageWorkItems.message.success.approved=The work item(s) have been successfully approved. +pageWorkItems.message.partialError.approved=Couldn't approve/reject work item due to an unexpected exception. pageWorkItems.message.success.rejected=The work item(s) have been successfully rejected. pageWorkItems.message.success.claimed=The work item(s) have been successfully claimed. +pageWorkItems.message.partialError.claimed=Couldn't claim work item due to an unexpected exception. pageWorkItems.message.success.released={0} work item(s) have been successfully released. +pageWorkItems.message.partialError.released=Couldn't release work item due to an unexpected exception. PageWorkItemsAll.title=All work items PageWorkItemsAllocatedToMe.title=Work items allocated to me PageWorkItem.title=Work item details @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=Max ProvisioningStatistics.MinTime=Min ProvisioningStatistics.ObjectClass=Object class ProvisioningStatistics.OtherFailure=Fail -ProvisioningStatistics.OtherSuccess=Script OK +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Resource ProvisioningStatistics.ScriptFailure=Fail ProvisioningStatistics.ScriptSuccess=Script OK @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Download ReconciliationPopupPanel.resource=Resource ReconciliationPopupPanel.title.basic=Basic Reconciliation Report Configuration repeater.input.nullValid=Choose One +RepoInitialSetup.message.init.fatalError=Repository post initialization failed. ReportConfigurationPanel.title.basic=Basic ReportConfigurationPanel.title.advanced=Advanced Requestable.ALL=All @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Tolerant pattern ResourceAttributeEditor.message.cantParseSchema=Couldn't parse resource schema ResourceAttributeEditor.title.delete=Delete ResourceAttributeEditor.title.edit=Edit +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=Could not import account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Could not update status (to {0}) for {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=Edit Resource Credentials ResourceCredentialsEditor.label.fetchStrategy=Fetch strategy ResourceCredentialsEditor.label.inbound=Inbound @@ -3261,6 +3301,7 @@ type.nullValid=Choose One Type.RECONCILIATION=Reconciliation typeSelect.null=All roles Type.USERS=User +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles UploadPanel.delete.tooltip=Remove file UploadPanel.message.help=Choose file for import. UploadPanel.message.removeError=File was not removed. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Security Questions UserMenuPanel.editProfile=Edit profile UserMenuPanel.logout=Log out UserMenuPanel.resetPasswords=Reset password +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Couldn't load system security policy {0} UserOrgReferenceChoosePanel.type.org=Org. Unit UserOrgReferenceChoosePanel.type=Owner Type UserOrgReferenceChoosePanel.type.user=User @@ -3302,6 +3344,11 @@ user.noOrgs=No organizations validFromFetchStrategy.nullValid=Choose One validToFetchStrategy.nullValid=Choose One valueAttribute.nullValid=Choose One +WebModelUtils.couldntRunTask=Couldn't run task {0} +WebModelUtils.couldntLoadPasswordPolicies=Couldn't load password policies. +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=Couldn't load system configuration. WebModelUtils.couldntLoadObject=Couldn't load object. WebModelUtils.couldntSaveObject=Couldn't save object. WebModelUtils.couldntSearchObjects=Couldn't search objects. @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=Undo PageAssignmentConflicts.title=Assignments conflicts PageAssignmentConflicts.back=Back PageAssignmentConflicts.submit=Submit +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: AbstractShoppingCartTabPanel.addAllButton=Add all AbstractShoppingCartTabPanel.requestingForLabel=Requesting for AbstractShoppingCartTabPanel.availableRelationsLabel=Available relations @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Couldn't get case work item. It might h CsvDownloadButtonPanel.export=CSV export CsvDownloadButtonPanel.confirmationMessage=CSV export size is limited to {0} entries. Continue? AssignmentEditorDto.policyRuleTitle=Policy rule +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=Target AssignmentDataTablePanel.validityColumnName=Validity AssignmentDataTablePanel.organizationColumnName=Organization @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=New work item notification actio ResourceObjectAssociationType.details.newValue=New resource object association ResourceAttributeDefinitionType.details.newValue=New resource attribute definition MappingType.details.newValue=New mapping +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=Object state assignmentState.details=Assignment state hasAssignment.details=Has assignment diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_es.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_es.properties index e915ab2dc5e..09207fab7d7 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_es.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_es.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Objetivo AssignmentEditorPanel.tenantRef=Ocupante AssignmentEditorPanel.undefined=Indefinido AssignmentEditorPanel.metadataBlock={0} Metadatos +AssignmentEditorPanel.message.loadAttributes.fatalError=Ocurrió una excepción durante la carga de los atributos de la asignación. +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=Activación AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=Cancelar @@ -77,12 +79,12 @@ MetadataPanel.modifyApprovalTimestamp=Momento de la aprobación de la modificaci RelationTypes.MANAGER=Gerente RelationTypes.OWNER=Dueño RelationTypes.APPROVER=Aprobador -RelationTypes.MEMBER=Default +RelationTypes.MEMBER=Defecto RelationTypes.ANY=Todas RelationTypes.manager=Gerente RelationTypes.owner=Propietario RelationTypes.approver=Aprobador -RelationTypes.default=Default +RelationTypes.default=Defecto DelegationEditorPanel.from=Desde DelegationEditorPanel.to=Hacia DelegationEditorPanel.meLabel=Usuario actual @@ -252,6 +254,7 @@ contentPanel.accounts=Contenido contentPanel.entitlements=Derechos CountToolbar.label=Mostrando {0,number,integer} hasta {1,number,integer} de {2,number,integer} resultados coincidentes. CountToolbar.noFound=No hay resultados coincidentes encontrados. +DataLanguagePanel.message.onStateChanged.fatalError=No se pudo cambiar el idioma. DateValidator.message.fromAfterTo=Válido desde tiene que ser anterior al valor valido hasta. DebugButtonPanel.button.delete=Eliminar DebugButtonPanel.button.export=Exportar @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Información fetchStrategy.nullValid=Elija uno filter.duplicate=El filtro con nombre '{0}' ya se encuentra definido filter.emptyFilter=El filtro no debe ser vacío +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=No se pudieron cargar los roles disponibles H3Header.label.error=Error H3Header.showMore=Mostrar más HandlerUriActions.ACTION_ADD_FOCUS=Agregar foco @@ -403,7 +407,7 @@ ImportOptionsPanel.options=Opciones importOptionsPanel.overwriteExistingObject=Sobreescribir objeto existente importOptionsPanel.protectedByEncryption=Protegido por cifrado importOptionsPanel.referentialIntegrity=Integridad referencial -importOptionsPanel.stopAfter=Stop after errors reach +importOptionsPanel.stopAfter=Detener luego de que los errores alcancen importOptionsPanel.summarizeErrors=Resumir errores importOptionsPanel.summarizeSuccesses=Resumir éxitos importOptionsPanel.validateDynamicSchema=Validar esquema dinámico @@ -434,15 +438,15 @@ JasperReportConfigurationPanel.reportFields=Reporte de campos JasperReportConfigurationPanel.reportParameters=Reporte de parámetros JasperReportConfigurationPanel.reportQuery=Reporte de pregunta JasperReportConfigurationPanel.errormsg=Valores vacíos no permitidos -JasperReportConfigurationPanel.properties=Properties +JasperReportConfigurationPanel.properties=Propiedades JasperReportConfigurationPanel.configure=Configurar -JasperReportParameterProperties.property.name=Property name -JasperReportParameterProperties.property.value=Property value -JasperReportParameterProperties.key=Key +JasperReportParameterProperties.property.name=Nombre de la propiedad +JasperReportParameterProperties.property.value=Valor de la propiedad +JasperReportParameterProperties.key=Clave JasperReportParameterProperties.label=Etiqueta JasperReportParameterProperties.targetType=Target type -JasperReportParameterProperties.multivalue=Multivalue -JasperReportParameterProperties.config=Properties configuration +JasperReportParameterProperties.multivalue=Multivalor +JasperReportParameterProperties.config=Configuración de propiedades JasperReportParameterProperties.title=Configurar kind.nullValid=Elija uno Language.GROOVY=Groovy (por defecto) @@ -517,7 +521,7 @@ LoggingConfigPanel.rootAppender=Añadidor Root LoggingConfigPanel.rootLogger=Logger Root LoggingConfigPanel.subsystem.appender=Añadidor LoggingConfigPanel.subsystem.level=Nivel -LoggingConfigurationTabPanel.loggers.package=Package +LoggingConfigurationTabPanel.loggers.package=Paquete LoggingConfigurationTabPanel.loggers.level=Nivel LoggingConfigurationTabPanel.loggers.appender=Añadidor lower.ActivationStatusType.ARCHIVED=archivado @@ -566,6 +570,7 @@ Message.SourceMemory=task in memory (fetched {0}) Message.SourceRepository=repository (statistics updated on {0}) message.success=Sus respuestas fueron actualizadas con éxito message.WrongAnswer=Preguntas No Respondidas Correctamente +ModelInitialSetup.message.init.fatalError=Model post initialization failed. ModelOperationStatusPanel.label.focusName=Objeto: ModelOperationStatusPanel.label.focusType=de tipo: ModelOperationStatusPanel.label.primaryDelta=Delta primario: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Mínimo NotificationsStatistics.TotalTime=Tiempo total NotificationsStatistics.Transport=Transporte nullValid=Elija una +ObjectDataProvider.message.listObjects.fatalError=Couldn't list objects +ObjectDataProvider.message.countObjects.fatalError=Couldn't count objects. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Couldn't load resource for account. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=Editar objectPolicyConfigurationEditor.label=Políticas del objeto objectPolicyConfigurationEditor.name.placeholder=Insertar política de objeto @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Insertar propiedad ruta ObjectPolicyDialog.subtype=Object subtype ObjectPolicyDialog.template=Plantilla de Objeto ObjectPolicyDialog.type=Tipo de objeto +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Skipping setting property constraint, no path was defined. ObjectPolicyConfigurationTabPanel.type=Tipo ObjectPolicyConfigurationTabPanel.subtype=Subtype ObjectPolicyConfigurationTabPanel.objectTemplate=Plantilla de Objeto @@ -681,8 +691,8 @@ ObjectTypeGuiDescriptor.user=Usuario ObjectTypeGuiDescriptor.service=Servicio ObjectTypeGuiDescriptor.case=Case ObjectTypeGuiDescriptor.valuePolicy=Valor de Política -ObjectTypeGuiDescriptor.functionLibrary=Function library -ObjectTypeGuiDescriptor.objectCollection=Object collection +ObjectTypeGuiDescriptor.functionLibrary=Librería de funciones +ObjectTypeGuiDescriptor.objectCollection=Colección de objetos ObjectTypeGuiDescriptor.unknown=No definido operation.com.evolveum.midpoint.common.crypto.CryptoUtil.securitySelfTest=Autocomprobación de Seguridad operation.com.evolveum.midpoint.common.operation.import.object=Importar objeto @@ -1052,7 +1062,7 @@ PageAccounts.exportFileDoesntExist=No se pudo crear fichero {0} PageAccounts.linked=Vinculado PageAccounts.message.cantShowOwner=Can't show details of owner. PageAccounts.message.ownerNotFound=Could not found owner for shadow with oid {0}. -PageAccounts.message.unsupportedOwnerType=Unsupported owner type. +PageAccounts.message.unsupportedOwnerType=Tipo de dueño no soportado. pageAccounts.message.resourceNotSelected=Recurso no seleccionado. Por favor seleccione el recurso para mostrar sus shadows. PageAccounts.message.success.clearExport=Export folder was cleared successfully PageAccounts.message.success.export=Export was successful. Exported file: {0}. @@ -1074,7 +1084,7 @@ pageAdmin.configuration=Configuración pageAdmin.configuration.description=Securidad, logging, importación pageAdmin.home.description=Comenzar aquí pageAdmin.home=Inicio -PageAdmin.menu.top.certification.campaigns=Campaigns +PageAdmin.menu.top.certification.campaigns=Campañas PageAdmin.menu.top.certification.scheduling=Programación de campañas PageAdmin.menu.top.certification=Certificación PageAdmin.menu.top.certification.decisions=Mis elementos de trabajo @@ -1092,12 +1102,12 @@ PageAdmin.menu.top.configuration.development=Desarrollo PageAdmin.menu.top.configuration.expressionEvaluator=Evaluador de expresión PageAdmin.menu.top.configuration.importObject=Importar objeto PageAdmin.menu.top.configuration.internals=Configuraciones internas -PageAdmin.menu.top.configuration.objectPolicy=Object policy +PageAdmin.menu.top.configuration.objectPolicy=Política de objeto PageAdmin.menu.top.configuration.globalPolicyRule=Política global PageAdmin.menu.top.configuration.globalAccountSynchronization=Global account synchronization PageAdmin.menu.top.configuration.cleanupPolicy=Limpieza de Política -PageAdmin.menu.top.configuration.workflow=Workflow configuration -PageAdmin.menu.top.configuration.roleManagement=Role management +PageAdmin.menu.top.configuration.workflow=Configuración de flujos de trabajo +PageAdmin.menu.top.configuration.roleManagement=Administración de roles PageAdmin.menu.top.configuration.accessCertification=Certificación de accesos PageAdmin.menu.top.configuration.infrastructure=Infraestructura PageAdmin.menu.top.configuration.fullTextSearch=Full text earch @@ -1139,7 +1149,7 @@ PageAdmin.menu.top.valuePolicies.new = New value policy PageAdmin.menu.top.valuePolicies= Value policies PageAdmin.menu.top.workItems.listClaimable=Artículos reclamados por mí PageAdmin.menu.top.workItems.list=Mis artículos -PageAdmin.menu.top.workItems.listAll=All items +PageAdmin.menu.top.workItems.listAll=Todos los elementos PageAdmin.menu.top.workItems.listProcessInstancesAll=Todas las solicitudes PageAdmin.menu.top.workItems.listProcessInstancesRequestedBy=Mis solicitudes PageAdmin.menu.top.workItems.listProcessInstancesRequestedFor=Solicitudes para mi @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Create new system config PageAdminObjectDetails.title.editSystemConfigurationType=Editar configuración del sistema PageAdminObjectDetails.noChangesSave=No había cambios a ser guardados PageAdminObjectDetails.noChangesPreview=No hay cambios para pre-visualizar +PageAdminObjectDetails.message.loadParentOrgs.warning=Cannot load parent org {0} pageAdminFocus.basic=Básico pageAdminFocus.message.cantEditFocus=Error desconocido ha ocurrido, No se puede editar objeto de enfoque. pageAdminFocus.message.cantNewFocus=Error desconocido ha ocurrido, No se puede crear nuevo objeto de enfoque. @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Iniciar PageBulkAction.message.emptyString=La acción de llenado está vacía. Por favor provea un script no vacío. PageBulkAction.options=Opciones PageBulkAction.title=Acciones de llenado de usuario +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=Action executed. Returned {0} item(s). Console and data output available via 'Export to XML' function. +PageBulkAction.message.startPerformed.fatalError.execute=Couldn't execute bulk action +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=Couldn't parse bulk action object +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=Repository query PageRepositoryQuery.button.translateAndExecute=Translate and execute PageRepositoryQuery.button.translate=Translate to hibernate query @@ -1450,10 +1468,10 @@ PageCertDefinitions.table.description=Descripción PageCertDefinitions.table.name=Nombre PageCertDefinitions.title=Definiciones de certificación de acceso PageCertDefinitions.title.confirmDelete=Confirmar eliminación -PageCertDefinitionsxmlDefinition=XML definition +PageCertDefinitionsxmlDefinition=Definición XML PageCertDefinition.title=Access Certification Campaign Definition -PageCertDefinition.campaigns=Campaigns -PageCertDefinition.xmlDefinition=XML definition +PageCertDefinition.campaigns=Campañas +PageCertDefinition.xmlDefinition=Definición XML PageCertDefinition.scopeDefinition=Scope definition PageCertDefinition.basic=Básico PageCertDefinition.scopeName=Scope name @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Enabled items only PageCertDefinition.stagesDefinition=Stages definition PageCertDefinitions.message.deleteDefinitionPerformed.success=The definition has been successfully deleted. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Couldn't delete campaign definition. +PageCertDefinitions.message.createCampaignPerformed.warning=Definition '{0}' is for ad-hoc campaigns that cannot be started manually. PageCert.in=en {0} PageCert.message.assignment={0} of {1} {2} to {3} {4}. PageCert.message.textAdministrativeState=Administrative state: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Add stage definition StageDefinitionPanel.moveStageLeftButton = Move left StageDefinitionPanel.moveStageRightButton = Move right StageDefinitionPanel.deleteStageButton = Delete this stage +PageBase.message.parseObject.fatalError=Couldn't parse object: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Couldn't load system configuration. +PageBase.message.loadDeploymentInformationType.fatalError=Couldn't load deployment information. +PageBase.message.getAdministratorPrivileged.fatalError=Couldn't get administrator user: {0} PageContacts.title=Contacts browser pageContentAccounts.button.searchButton=Buscar pageContentAccounts.dialog.title.confirmDelete=Confirmación de Eliminación @@ -2061,16 +2084,16 @@ pageSystemConfiguration.notifications.title=Notificaciones pageSystemConfiguration.profiling.title=Profiling pageSystemConfiguration.adminGui.title=Admin GUI pageSystemConfiguration.system.title=Sistema -pageSystemConfiguration.objectPolicy.title=Object policy +pageSystemConfiguration.objectPolicy.title=Política de objeto pageSystemConfiguration.globalPolicyRule.title=Política global pageSystemConfiguration.globalAccountSynchronization.title=Global account synchronization pageSystemConfiguration.cleanupPolicy.title=Cleanup policy -pageSystemConfiguration.roleManagement.title=Role management +pageSystemConfiguration.roleManagement.title=Administración de roles pageSystemConfiguration.internals.title=Configuraciones Internas pageSystemConfiguration.deploymentInformation.title=Deployment information pageSystemConfiguration.accessCertification.title=Certificación de accesos pageSystemConfiguration.infrastructure.title=Infraestructura -pageSystemConfiguration.workflow.title=Workflow configuration +pageSystemConfiguration.workflow.title=Configuración de flujos de trabajo pageSystemConfiguration.fullTextSearch.title=Full text search PageSystemConfiguration.title=Configuración AdminGuiConfigPanel.dashboardLinksConfig=Dashboard links configuration @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Do you really want to { pageTasks.message.confirmationMessageForMultipleTaskObject=Do you really want to {0} selected {1} task(s)? pageTasks.message.confirmationMessageForSingleNodeObject=Do you really want to {0} node '{1}'? pageTasks.message.confirmationMessageForMultipleNodeObject=Do you really want to {0} selected {1} node(s)? +pageTasks.message.resumeTasksPerformed.success=The task(s) have been successfully resumed. +pageTasks.message.resumeTasksPerformed.fatalError=Couldn't resume the task(s) +pageTasks.message.synchronizeTasksPerformed.fatalError=Couldn't synchronize tasks +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=Para las tareas de una sola vez, no introduzca ni el intervalo de programación ni especificación cron. Para las tareas recurrentes, introduzca exactamente una de estas. pageTask.scheduleInterval=Intervalo de programación (segundos) pageTask.scheduleTitle=Programando @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Solicitado por: pageWorkItem.requestedOn=Solicitado en: pageWorkItem.requester.description=Solicitante pageWorkItem.requestSpecific.description=Su decisión -webComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=No se pudieron cargar los roles disponibles WebComponentUtil.formatDurationWordsForLocal.seconds=segundos WebComponentUtil.formatDurationWordsForLocal.minutes=minutos WebComponentUtil.formatDurationWordsForLocal.hours=horas @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=Solicitudes relacionadas workItemPanel.reasons=Motivos del proceso de aprobación workItemPanel.approverComment=Comentario del aprobador workItemPanel.approverInstruction=Approver instruction +PageTaskController.message.deleteSyncTokenPerformed.warning=Token is not present in this task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Couldn't delete sync token from the task. pageWorkItems.button.back=Atrás pageWorkItems.button.approve=Aprobar pageWorkItems.button.claim=Reclamar @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Estado pageWorkItems.message.noItemSelected=No se ha seleccionado elemento de trabajo. pageWorkItems.message.noItemToBeReleased=None of the work items can be released (most probably because they were not claimed by the user). pageWorkItems.message.success.approved=The work item(s) have been successfully approved. +pageWorkItems.message.partialError.approved=Couldn't approve/reject work item due to an unexpected exception. pageWorkItems.message.success.rejected=The work item(s) have been successfully rejected. pageWorkItems.message.success.claimed=The work item(s) have been successfully claimed. +pageWorkItems.message.partialError.claimed=Couldn't claim work item due to an unexpected exception. pageWorkItems.message.success.released={0} work item(s) have been successfully released. +pageWorkItems.message.partialError.released=Couldn't release work item due to an unexpected exception. PageWorkItemsAll.title=All work items PageWorkItemsAllocatedToMe.title=Work items allocated to me PageWorkItem.title=Work item details @@ -2598,7 +2632,7 @@ PersonalInfoPanel.other=Otro PersonalInfoPanel.passwordExp=Fecha de expiración de cuenta PersonalInfoPanel.undefined=No definido policyRef.nullValid=Elija uno -prismContainer.mainPanelDisplayName=Properties +prismContainer.mainPanelDisplayName=Propiedades prismContainer.shadow.associations=Associations prismContainer.shadow.mainPanelDisplayName=Atributos PrismObjectPanel.hideEmpty=Ocultar campos vacíos @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=Maxímo ProvisioningStatistics.MinTime=Mínimo ProvisioningStatistics.ObjectClass=Clase de objeto ProvisioningStatistics.OtherFailure=Fail -ProvisioningStatistics.OtherSuccess=Script OK +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Fuente ProvisioningStatistics.ScriptFailure=Fail ProvisioningStatistics.ScriptSuccess=Script OK @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Descargar ReconciliationPopupPanel.resource=Recurso ReconciliationPopupPanel.title.basic=Configuración Básica de Informe de Reconciliación repeater.input.nullValid=Elija uno +RepoInitialSetup.message.init.fatalError=Repository post initialization failed. ReportConfigurationPanel.title.basic=Básico ReportConfigurationPanel.title.advanced=Avanzado Requestable.ALL=Todo @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Patrón de valores Tolerante ResourceAttributeEditor.message.cantParseSchema=No se pudo analizar el esquema de recursos ResourceAttributeEditor.title.delete=Eliminar ResourceAttributeEditor.title.edit=Editar +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=Could not import account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Could not update status (to {0}) for {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=Editar Credenciales de Recurso ResourceCredentialsEditor.label.fetchStrategy=Fetch strategy ResourceCredentialsEditor.label.inbound=Entrante @@ -2871,7 +2911,7 @@ SchemaHandlingStep.label.assignmentPolicyRef=Assignment policy SchemaHandlingStep.label.associations=Associations SchemaHandlingStep.label.attributes=Atributos SchemaHandlingStep.label.credentials=Credenciales -SchemaHandlingStep.label.default=Default +SchemaHandlingStep.label.default=Defecto SchemaHandlingStep.label.dependency=Dependencies SchemaHandlingStep.label.description=Descripción SchemaHandlingStep.label.displayName=Nombre a mostrar @@ -2930,7 +2970,7 @@ SchemaHandlingStep.in=in: {0} SchemaHandlingStep.out=out SchemaHandlingStep.dup=DUP {0} SchemaListPanel.attributes=Atributos -SchemaListPanel.details.default=Default +SchemaListPanel.details.default=Defecto SchemaListPanel.details.description=Descripción SchemaListPanel.details=Detalles SchemaListPanel.details.displayName=Nombre a mostrar @@ -3261,6 +3301,7 @@ type.nullValid=Elija uno Type.RECONCILIATION=Reconciliación typeSelect.null=All roles Type.USERS=Usuario +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=No se pudieron cargar los roles disponibles UploadPanel.delete.tooltip=Borrar fichero UploadPanel.message.help=Elija el fichero a importar. UploadPanel.message.removeError=File was not removed. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Preguntas de Seguridad UserMenuPanel.editProfile=Editar perfil UserMenuPanel.logout=Finalizar sesión UserMenuPanel.resetPasswords=Resetear contraseña +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Couldn't load system security policy {0} UserOrgReferenceChoosePanel.type.org=Org. Unit UserOrgReferenceChoosePanel.type=Owner Type UserOrgReferenceChoosePanel.type.user=Usuario @@ -3302,6 +3344,11 @@ user.noOrgs=No organizations validFromFetchStrategy.nullValid=Elija uno validToFetchStrategy.nullValid=Elija uno valueAttribute.nullValid=Elija uno +WebModelUtils.couldntRunTask=Couldn't run task {0} +WebModelUtils.couldntLoadPasswordPolicies=Couldn't load password policies. +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=Couldn't load system configuration. WebModelUtils.couldntLoadObject=No se pudo cargar el objeto. WebModelUtils.couldntSaveObject=Couldn't save object. WebModelUtils.couldntSearchObjects=Couldn't search objects. @@ -3440,7 +3487,7 @@ AssignmentPanel.allLabel=Todo SearchPanel.more=More... SearchPanel.add=Agregar SearchPanel.close=Cerrar -SearchPanel.properties=Properties +SearchPanel.properties=Propiedades SearchPanel.fullText=Full text SearchPanel.fullTextSearch=Full text search SearchItemPanel.all=Todo @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=Undo PageAssignmentConflicts.title=Assignments conflicts PageAssignmentConflicts.back=Atrás PageAssignmentConflicts.submit=Submit +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: AbstractShoppingCartTabPanel.addAllButton=Add all AbstractShoppingCartTabPanel.requestingForLabel=Requesting for AbstractShoppingCartTabPanel.availableRelationsLabel=Available relations @@ -3825,7 +3873,7 @@ UserSelectionButton.myAssignmentsLabel=Source user: me UserSelectionButton.userAssignmentsLabel=Source user: {0} MultiButtonPanel.plusIconTitle=Add item to shopping cart MultiButtonPanel.assignmentDetailsPopupTitle=Assignment details -MultiButtonPanel.detailsLink=Properties +MultiButtonPanel.detailsLink=Propiedades MultiButtonPanel.addToCartLink=Add to cart MultiButtonPanel.alreadyAssignedIconTitle=Assigned as {0} PageAssignmentDetails.title=Assignment details @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Couldn't get case work item. It might h CsvDownloadButtonPanel.export=CSV export CsvDownloadButtonPanel.confirmationMessage=CSV export size is limited to {0} entries. Continue? AssignmentEditorDto.policyRuleTitle=Política +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Ocurrió una excepción durante la carga de los atributos de la asignación. +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=Objetivo AssignmentDataTablePanel.validityColumnName=Validity AssignmentDataTablePanel.organizationColumnName=Organización @@ -4036,7 +4086,7 @@ PageImportResource.title=Importar definición de recurso ObjectReferenceType.relation=Relación FocusType.telephoneNumber=Telephone number FocusType.consents=Consents -AbstractAssignmentDetailsPanel.properties=Properties +AbstractAssignmentDetailsPanel.properties=Propiedades AssignmentPanel.doneButton=Done AssignmentPanel.cancelButton=Cancelar AssignmentPanel.noName=n/a @@ -4063,7 +4113,7 @@ ExclusionPolicyConstraintPanel.exclusionTitle=Exclusion ValuePolicyBasicPanel.valuePolicy.name=Name ValuePolicyBasicPanel.valuePolicy.description=Descripción comboInput.nullValid=Elija una -ContainerPanel.containerProperties=Properties +ContainerPanel.containerProperties=Propiedades PageOperationResult.title=Operation result PageOperationResult.noResultAvailable=No operation result available. It was probably "deleted" via script hook. PageInternals.tab.clock=Clock @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=New work item notification actio ResourceObjectAssociationType.details.newValue=New resource object association ResourceAttributeDefinitionType.details.newValue=New resource attribute definition MappingType.details.newValue=New mapping +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=Object state assignmentState.details=Assignment state hasAssignment.details=Has assignment diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_et.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_et.properties index c0a5c6cd261..25ca988a796 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_et.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_et.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Sihtmärk AssignmentEditorPanel.tenantRef=Rentnik AssignmentEditorPanel.undefined=Määratlemata AssignmentEditorPanel.metadataBlock={0} metaandmed +AssignmentEditorPanel.message.loadAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=Aktiveerimine AssignmentActivationPopupPanel.okButton=Sobib AssignmentActivationPopupPanel.cancelButton=Loobu @@ -252,6 +254,7 @@ contentPanel.accounts=Sisu contentPanel.entitlements=Õigused CountToolbar.label=Kuvatakse tulemused {0,number,integer} kuni {1,number,integer}, kokku {2,number,integer}-st. CountToolbar.noFound=Tulemusi ei leitud. +DataLanguagePanel.message.onStateChanged.fatalError=Couldn't change the language. DateValidator.message.fromAfterTo=Kehtiv alates kuupäev peab olema enne kehtiv kuni kuupäeva. DebugButtonPanel.button.delete=Kustuta DebugButtonPanel.button.export=Ekspordi @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Informatsioon fetchStrategy.nullValid=Vali üks filter.duplicate=Filter nimega '{0}' on juba olemas filter.emptyFilter=Filter ei tohi olla tühi +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles H3Header.label.error=Viga H3Header.showMore=Näita rohkem HandlerUriActions.ACTION_ADD_FOCUS=Lisa fookus @@ -566,6 +570,7 @@ Message.SourceMemory=ülesanne mälus (toodud {0}) Message.SourceRepository=hoidla (statistika uuenes {0}) message.success=Sinu vastused on nüüd edukalt uuendatud message.WrongAnswer=Küsimustele pole õigesti vastatud +ModelInitialSetup.message.init.fatalError=Model post initialization failed. ModelOperationStatusPanel.label.focusName=Objekt: ModelOperationStatusPanel.label.focusType=tüübist: ModelOperationStatusPanel.label.primaryDelta=Esmane delta: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Min NotificationsStatistics.TotalTime=Koguaeg NotificationsStatistics.Transport=Transport nullValid=Vali üks +ObjectDataProvider.message.listObjects.fatalError=Couldn't list objects +ObjectDataProvider.message.countObjects.fatalError=Ei õnnestu objekti loendada. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Couldn't load resource for account. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=Muuda objectPolicyConfigurationEditor.label=Objektipoliitikad objectPolicyConfigurationEditor.name.placeholder=Lisa objektipoliitika @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Lisa parameetri tee ObjectPolicyDialog.subtype=Objekti alamtüüp ObjectPolicyDialog.template=Objekti mall ObjectPolicyDialog.type=Objekti tüüp +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Skipping setting property constraint, no path was defined. ObjectPolicyConfigurationTabPanel.type=Tüüp ObjectPolicyConfigurationTabPanel.subtype=Subtype ObjectPolicyConfigurationTabPanel.objectTemplate=Objekti mall @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Create new system config PageAdminObjectDetails.title.editSystemConfigurationType=Edit system configuration PageAdminObjectDetails.noChangesSave=Salvestuseks ei leidunud muudatusi. PageAdminObjectDetails.noChangesPreview=Eelvaatamiseks puuduvad muudatused. +PageAdminObjectDetails.message.loadParentOrgs.warning=Cannot load parent org {0} pageAdminFocus.basic=Põhiteave pageAdminFocus.message.cantEditFocus=Ilmnes tundmatu tõrge. Ei õnnestu redigeerida fookusobjekti. pageAdminFocus.message.cantNewFocus=Ilmnes tundmatu tõrge. Ei saa luua uut fookusobjekti. @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Käivita PageBulkAction.message.emptyString=Sisestatud hulgitoiming on tühi. Palun esita mittetühi skript. PageBulkAction.options=Valikud PageBulkAction.title=Kasutaja hulgitoimingud +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=Action executed. Returned {0} item(s). Console and data output available via 'Export to XML' function. +PageBulkAction.message.startPerformed.fatalError.execute=Couldn't execute bulk action +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=Couldn't parse bulk action object +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=Hoidla päring PageRepositoryQuery.button.translateAndExecute=Tõlgi ja täida PageRepositoryQuery.button.translate=Tõlgi hibernate päringuks @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Ainult lubatud üksused PageCertDefinition.stagesDefinition=Etappide määratlus PageCertDefinitions.message.deleteDefinitionPerformed.success=The definition has been successfully deleted. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Couldn't delete campaign definition. +PageCertDefinitions.message.createCampaignPerformed.warning=Definition '{0}' is for ad-hoc campaigns that cannot be started manually. PageCert.in={0} pärast PageCert.message.assignment={0} of {1} {2} to {3} {4}. PageCert.message.textAdministrativeState=Haldusolek: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Lisa etapimääratlus StageDefinitionPanel.moveStageLeftButton = Nihuta vasakule StageDefinitionPanel.moveStageRightButton = Nihuta paremale StageDefinitionPanel.deleteStageButton = Kustuta see etapp +PageBase.message.parseObject.fatalError=Couldn't parse object: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Couldn't load system configuration. +PageBase.message.loadDeploymentInformationType.fatalError=Couldn't load deployment information. +PageBase.message.getAdministratorPrivileged.fatalError=Couldn't get administrator user: {0} PageContacts.title=Kontaktide sirvija pageContentAccounts.button.searchButton=Otsi pageContentAccounts.dialog.title.confirmDelete=Kustutamise kinnitus @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Kas soovid kindlasti {0 pageTasks.message.confirmationMessageForMultipleTaskObject=Kas soovid kindlasti {0} valitud {1} ülesande/ülesannet? pageTasks.message.confirmationMessageForSingleNodeObject=Kas soovid kindlasti {0} sõlme '{1}'? pageTasks.message.confirmationMessageForMultipleNodeObject=Kas soovid kindlasti {0} valitud {1} sõlme? +pageTasks.message.resumeTasksPerformed.success=The task(s) have been successfully resumed. +pageTasks.message.resumeTasksPerformed.fatalError=Couldn't resume the task(s) +pageTasks.message.synchronizeTasksPerformed.fatalError=Couldn't synchronize tasks +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=Ainult üks kord käivituvate sündmuste jaoks jäta ajastusintervall ja cron-spetsifikatsioon täitmata. Korduvate ülesannete puhul täida ainult üks nendest. pageTask.scheduleInterval=Ajastusintervall (sekundites) pageTask.scheduleTitle=Ajastamine @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Taotleja: pageWorkItem.requestedOn=Taotlemise kuupäev: pageWorkItem.requester.description=Taotleja pageWorkItem.requestSpecific.description=Sinu otsus -webComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Couldn't load available roles WebComponentUtil.formatDurationWordsForLocal.seconds=seconds WebComponentUtil.formatDurationWordsForLocal.minutes=minutes WebComponentUtil.formatDurationWordsForLocal.hours=hours @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=Seonduvad taotlused workItemPanel.reasons=Kinnitamisprotsessi põhjused workItemPanel.approverComment=Kinnitaja kommentaar workItemPanel.approverInstruction=Kinnitaja juhis +PageTaskController.message.deleteSyncTokenPerformed.warning=Token is not present in this task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Couldn't delete sync token from the task. pageWorkItems.button.back=Tagasi pageWorkItems.button.approve=Kinnita pageWorkItems.button.claim=Võta endale @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Olek pageWorkItems.message.noItemSelected=Tööüksust pole valitud. pageWorkItems.message.noItemToBeReleased=None of the work items can be released (most probably because they were not claimed by the user). pageWorkItems.message.success.approved=The work item(s) have been successfully approved. +pageWorkItems.message.partialError.approved=Couldn't approve/reject work item due to an unexpected exception. pageWorkItems.message.success.rejected=The work item(s) have been successfully rejected. pageWorkItems.message.success.claimed=The work item(s) have been successfully claimed. +pageWorkItems.message.partialError.claimed=Couldn't claim work item due to an unexpected exception. pageWorkItems.message.success.released={0} work item(s) have been successfully released. +pageWorkItems.message.partialError.released=Couldn't release work item due to an unexpected exception. PageWorkItemsAll.title=Kõik tööüksused PageWorkItemsAllocatedToMe.title=Minule eraldatud tööüksused PageWorkItem.title=Tööüksuse üksikasjad @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=Max ProvisioningStatistics.MinTime=Min ProvisioningStatistics.ObjectClass=Objektiklass ProvisioningStatistics.OtherFailure=Tõrge -ProvisioningStatistics.OtherSuccess=Skript OK +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Ressurss ProvisioningStatistics.ScriptFailure=Tõrge ProvisioningStatistics.ScriptSuccess=Skript OK @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Laadi alla ReconciliationPopupPanel.resource=Ressurss ReconciliationPopupPanel.title.basic=Lepituse põhiaruande konfiguratsioon repeater.input.nullValid=Vali üks +RepoInitialSetup.message.init.fatalError=Repository post initialization failed. ReportConfigurationPanel.title.basic=Põhiteave ReportConfigurationPanel.title.advanced=Täpsemalt Requestable.ALL=Kõik @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Salliv muster ResourceAttributeEditor.message.cantParseSchema=Ei saanud sõeluda ressursi skeemi ResourceAttributeEditor.title.delete=Kustuta ResourceAttributeEditor.title.edit=Muuda +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=Could not import account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Could not update status (to {0}) for {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=Redigeeri ressursi identimisteavet ResourceCredentialsEditor.label.fetchStrategy=Toomise strateegia ResourceCredentialsEditor.label.inbound=Sissetulev @@ -3261,6 +3301,7 @@ type.nullValid=Vali üks Type.RECONCILIATION=Lepitamine typeSelect.null=Kõik rollid Type.USERS=Kasutaja +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles UploadPanel.delete.tooltip=Eemalda fail UploadPanel.message.help=Vali imporditav fail. UploadPanel.message.removeError=Faili ei eemaldatud. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Turbeküsimused UserMenuPanel.editProfile=Redigeeri profiili UserMenuPanel.logout=Logi välja UserMenuPanel.resetPasswords=Lähtesta parool +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Couldn't load system security policy {0} UserOrgReferenceChoosePanel.type.org=Org. üksus UserOrgReferenceChoosePanel.type=Omaniku tüüp UserOrgReferenceChoosePanel.type.user=Kasutaja @@ -3302,6 +3344,11 @@ user.noOrgs=Organisatsioonid puuduvad validFromFetchStrategy.nullValid=Vali üks validToFetchStrategy.nullValid=Vali üks valueAttribute.nullValid=Vali üks +WebModelUtils.couldntRunTask=Couldn't run task {0} +WebModelUtils.couldntLoadPasswordPolicies=Couldn't load password policies. +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=Couldn't load system configuration. WebModelUtils.couldntLoadObject=Ei õnnestu objekti laadida. WebModelUtils.couldntSaveObject=Ei õnnestu objekti salvestada. WebModelUtils.couldntSearchObjects=Ei õnnestu objekte otsida. @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=Võta tagasi PageAssignmentConflicts.title=Omistuste konfliktid PageAssignmentConflicts.back=Tagasi PageAssignmentConflicts.submit=Edasta +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: AbstractShoppingCartTabPanel.addAllButton=Add all AbstractShoppingCartTabPanel.requestingForLabel=Requesting for AbstractShoppingCartTabPanel.availableRelationsLabel=Available relations @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Couldn't get case work item. It might h CsvDownloadButtonPanel.export=CSV eksportimine CsvDownloadButtonPanel.confirmationMessage=CSV eksportimise maht on maksimaalselt {0} kirjet. Kas jätkata? AssignmentEditorDto.policyRuleTitle=Poliitika reegel +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=Sihtüksus AssignmentDataTablePanel.validityColumnName=Kehtivus AssignmentDataTablePanel.organizationColumnName=Organisatsioon @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=New work item notification actio ResourceObjectAssociationType.details.newValue=New resource object association ResourceAttributeDefinitionType.details.newValue=New resource attribute definition MappingType.details.newValue=New mapping +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=Object state assignmentState.details=Assignment state hasAssignment.details=Has assignment diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_fi.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_fi.properties index 8b63281132e..f23283b2668 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_fi.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_fi.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Kohde AssignmentEditorPanel.tenantRef=Haltija AssignmentEditorPanel.undefined=Määrittelemätön AssignmentEditorPanel.metadataBlock={0} Metadata +AssignmentEditorPanel.message.loadAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=Aktivointi AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=Peruuta @@ -252,6 +254,7 @@ contentPanel.accounts=Sisältö contentPanel.entitlements=Oikeutukset CountToolbar.label={0,numero,kokonaisluku}sta {1,numero,kokonaisluku}{2,numero,kokonaisluku}sta CountToolbar.noFound=Vastaavia tuloksia ei löydy. +DataLanguagePanel.message.onStateChanged.fatalError=Couldn't change the language. DateValidator.message.fromAfterTo=voimassa päivämäärästä päivä pitää olla ennen voimassa päivämäärään päivää. DebugButtonPanel.button.delete=Poista DebugButtonPanel.button.export=Vie @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Informaatio fetchStrategy.nullValid=Valitse Yksi filter.duplicate=Suodatin nimellä '{0}' on jo määritetty filter.emptyFilter=Suodatin ei voi olla tyhjä +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles H3Header.label.error=Virhe H3Header.showMore=Näytä lisää HandlerUriActions.ACTION_ADD_FOCUS=Lisää fokus @@ -566,6 +570,7 @@ Message.SourceMemory=Tehtävä muistissa (noudettu {0}) Message.SourceRepository=Säilö (Tiedot päivittyy {0}) message.success=Vastauksesi Päivittyivät Onnistuneesti message.WrongAnswer=Kysymyksiin Ei Vastattu Oikein +ModelInitialSetup.message.init.fatalError=Model post initialization failed. ModelOperationStatusPanel.label.focusName=Objekti: ModelOperationStatusPanel.label.focusType=tyyppiä: ModelOperationStatusPanel.label.primaryDelta=ensisijainen delta: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Min NotificationsStatistics.TotalTime=kokonais aika NotificationsStatistics.Transport=Siirto nullValid=Valitse yksi +ObjectDataProvider.message.listObjects.fatalError=Couldn't list objects +ObjectDataProvider.message.countObjects.fatalError=Ei pystytty laskea objekteja. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Couldn't load resource for account. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=Muokkaa objectPolicyConfigurationEditor.label=Objektilinjaukset objectPolicyConfigurationEditor.name.placeholder=Syötä objektilinjaus @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Aseta ominaisuusreitti ObjectPolicyDialog.subtype=Objektin alatyyppi ObjectPolicyDialog.template=Objektin mallikaavio ObjectPolicyDialog.type=Objektityyppi +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Skipping setting property constraint, no path was defined. ObjectPolicyConfigurationTabPanel.type=Tyyppi ObjectPolicyConfigurationTabPanel.subtype=Subtype ObjectPolicyConfigurationTabPanel.objectTemplate=Objektin mallikaavio @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Create new system config PageAdminObjectDetails.title.editSystemConfigurationType=Edit system configuration PageAdminObjectDetails.noChangesSave=Ei ollut tallennettavia muutoksia. PageAdminObjectDetails.noChangesPreview=Ei ole esikatseltavia muutoksia. +PageAdminObjectDetails.message.loadParentOrgs.warning=Cannot load parent org {0} pageAdminFocus.basic=Perus pageAdminFocus.message.cantEditFocus=Tuntematon virhe, ei voi muokata fokusobjektia pageAdminFocus.message.cantNewFocus=Tuntematon virhe, ei voi luoda uutta fokusobjektia @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Aloita PageBulkAction.message.emptyString=Syötetty massatoimenpide on tyhjä. Toimita ei-tyhjä skripti PageBulkAction.options=Valikko PageBulkAction.title=Käyttäjän massatoimenpiteet +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=Action executed. Returned {0} item(s). Console and data output available via 'Export to XML' function. +PageBulkAction.message.startPerformed.fatalError.execute=Couldn't execute bulk action +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=Couldn't parse bulk action object +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=Säilö kysely PageRepositoryQuery.button.translateAndExecute=Käännä ja suorita PageRepositoryQuery.button.translate=Käännä nukuta kyselyyn @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Vain käyttöön otetut tehtävät PageCertDefinition.stagesDefinition=Vaiheiden määritys PageCertDefinitions.message.deleteDefinitionPerformed.success=The definition has been successfully deleted. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Couldn't delete campaign definition. +PageCertDefinitions.message.createCampaignPerformed.warning=Definition '{0}' is for ad-hoc campaigns that cannot be started manually. PageCert.in= {0}ssa PageCert.message.assignment={0} {1} {2}sta {3} {4}hon. PageCert.message.textAdministrativeState=Hallinnollinen tila: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Lisää vaiheen määritys StageDefinitionPanel.moveStageLeftButton = Siirrä vasemmalle StageDefinitionPanel.moveStageRightButton = Siirrä oikealla StageDefinitionPanel.deleteStageButton = Poista tämä vaihe +PageBase.message.parseObject.fatalError=Couldn't parse object: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Couldn't load system configuration. +PageBase.message.loadDeploymentInformationType.fatalError=Couldn't load deployment information. +PageBase.message.getAdministratorPrivileged.fatalError=Couldn't get administrator user: {0} PageContacts.title=Yhteystietojen selain pageContentAccounts.button.searchButton=Hae pageContentAccounts.dialog.title.confirmDelete=Poista Vahvistus @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Haluatko varmasti {0} pageTasks.message.confirmationMessageForMultipleTaskObject=Haluatko varmasti {0} valitut '{1}' tehtävä(t)? pageTasks.message.confirmationMessageForSingleNodeObject=Haluatko varmasti {0} solmun '{1}'? pageTasks.message.confirmationMessageForMultipleNodeObject=Haluatko varmasti {0} valitut '{1}' solmu(t)? +pageTasks.message.resumeTasksPerformed.success=The task(s) have been successfully resumed. +pageTasks.message.resumeTasksPerformed.fatalError=Couldn't resume the task(s) +pageTasks.message.synchronizeTasksPerformed.fatalError=Couldn't synchronize tasks +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=Älä syötä ajastusväliä tai cron-tyyppistä tarkennusta kerran suoritettaviin tehtäviin . Toistuviin tehtäviin syötä jompi kumpi näistä. pageTask.scheduleInterval=Ajastus aikaväli (sekunneissa) pageTask.scheduleTitle=Ajastus @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Pyytäjä: pageWorkItem.requestedOn=Pyyntö aika: pageWorkItem.requester.description=Pyytäjä pageWorkItem.requestSpecific.description=Teidän päätös -webComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Couldn't load available roles WebComponentUtil.formatDurationWordsForLocal.seconds=seconds WebComponentUtil.formatDurationWordsForLocal.minutes=minutes WebComponentUtil.formatDurationWordsForLocal.hours=hours @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=Liittyvät pyynnöt workItemPanel.reasons=Syitä hyväksyntä prosessille workItemPanel.approverComment=Hyväksyjän kommentti workItemPanel.approverInstruction=Hyväksyjän ohjeistus +PageTaskController.message.deleteSyncTokenPerformed.warning=Token is not present in this task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Couldn't delete sync token from the task. pageWorkItems.button.back=Takaisin pageWorkItems.button.approve=Hyväksy pageWorkItems.button.claim=Väittämä @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Asema pageWorkItems.message.noItemSelected=Yhtään työtehtävää ei ole valittuna. pageWorkItems.message.noItemToBeReleased=None of the work items can be released (most probably because they were not claimed by the user). pageWorkItems.message.success.approved=The work item(s) have been successfully approved. +pageWorkItems.message.partialError.approved=Couldn't approve/reject work item due to an unexpected exception. pageWorkItems.message.success.rejected=The work item(s) have been successfully rejected. pageWorkItems.message.success.claimed=The work item(s) have been successfully claimed. +pageWorkItems.message.partialError.claimed=Couldn't claim work item due to an unexpected exception. pageWorkItems.message.success.released={0} work item(s) have been successfully released. +pageWorkItems.message.partialError.released=Couldn't release work item due to an unexpected exception. PageWorkItemsAll.title=Kaikki työ alkiot PageWorkItemsAllocatedToMe.title=Minulle määrätyt työ alkiot PageWorkItem.title=työtehtävän yksityiskohdat @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=Max ProvisioningStatistics.MinTime=Min ProvisioningStatistics.ObjectClass=Objekti luokka ProvisioningStatistics.OtherFailure=Epäonnistui -ProvisioningStatistics.OtherSuccess=Ohjelmakoodi OK +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Resurssi ProvisioningStatistics.ScriptFailure=Epäonnistui ProvisioningStatistics.ScriptSuccess=Ohjelmakoodi OK @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Lataa ReconciliationPopupPanel.resource=Resurssi ReconciliationPopupPanel.title.basic=Perus Täsmäyttämisraportin asetukset repeater.input.nullValid=Valitse Yksi +RepoInitialSetup.message.init.fatalError=Repository post initialization failed. ReportConfigurationPanel.title.basic=Perus ReportConfigurationPanel.title.advanced=Edistynyt Requestable.ALL=Kaikki @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Saliva kuvio ResourceAttributeEditor.message.cantParseSchema=Ei pystytty jäsentää resurssi kaaviota ResourceAttributeEditor.title.delete=Poista ResourceAttributeEditor.title.edit=Muokkaa +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=Could not import account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Could not update status (to {0}) for {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=Muokkaa Resurssi Tunnukset ResourceCredentialsEditor.label.fetchStrategy=Nouda strategia ResourceCredentialsEditor.label.inbound=Sisääntuleva @@ -3261,6 +3301,7 @@ type.nullValid=Valitse Yksi Type.RECONCILIATION=Täsmäytys typeSelect.null=Kaikki roolit Type.USERS=Käyttäjä +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles UploadPanel.delete.tooltip=Poista tiedosto UploadPanel.message.help=Valitse tuotava tiedosto. UploadPanel.message.removeError=Tiedostoa ei poistettu. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Turvakysymykset UserMenuPanel.editProfile=Muokkaa profiilia UserMenuPanel.logout=Kirjaudu ulos UserMenuPanel.resetPasswords=Aseta salasana uudelleen +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Couldn't load system security policy {0} UserOrgReferenceChoosePanel.type.org=Org. Yksikkö UserOrgReferenceChoosePanel.type=Omistajatyyppi UserOrgReferenceChoosePanel.type.user=Käyttäjä @@ -3302,6 +3344,11 @@ user.noOrgs=Ei organisaatioita validFromFetchStrategy.nullValid=Valitse Yksi validToFetchStrategy.nullValid=Valitse Yksi valueAttribute.nullValid=Valitse Yksi +WebModelUtils.couldntRunTask=Couldn't run task {0} +WebModelUtils.couldntLoadPasswordPolicies=Couldn't load password policies. +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=Couldn't load system configuration. WebModelUtils.couldntLoadObject=Objektin lataus ei onnistunut. WebModelUtils.couldntSaveObject=Ei pystytty tallentamaan objektia. WebModelUtils.couldntSearchObjects=Ei pystytty poistamaan objekteja. @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=Kumoa PageAssignmentConflicts.title=Toimeksiantojen ristiriidat PageAssignmentConflicts.back=Takaisin PageAssignmentConflicts.submit=Kirjaa +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: AbstractShoppingCartTabPanel.addAllButton=Add all AbstractShoppingCartTabPanel.requestingForLabel=Requesting for AbstractShoppingCartTabPanel.availableRelationsLabel=Available relations @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Couldn't get case work item. It might h CsvDownloadButtonPanel.export=CSV vienti CsvDownloadButtonPanel.confirmationMessage=CSV vienti koko on rajoitettu {0} kirjaukseen. Jatka? AssignmentEditorDto.policyRuleTitle=Linjaus sääntö +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=Kohde AssignmentDataTablePanel.validityColumnName=Voimassaolo AssignmentDataTablePanel.organizationColumnName=Organisaatio @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=New work item notification actio ResourceObjectAssociationType.details.newValue=New resource object association ResourceAttributeDefinitionType.details.newValue=New resource attribute definition MappingType.details.newValue=New mapping +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=Objektin tila assignmentState.details=Toimeksiannon tila hasAssignment.details=On toimeksianto diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_fr.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_fr.properties index dfbfe0ed999..006920d1607 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_fr.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_fr.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Cible AssignmentEditorPanel.tenantRef=Locataire AssignmentEditorPanel.undefined=Non défini AssignmentEditorPanel.metadataBlock={0} Métadonnées +AssignmentEditorPanel.message.loadAttributes.fatalError=Une exception s'est produite pendant le chargement des propriétés d'attributions +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=Activation AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=Annuler @@ -77,12 +79,12 @@ MetadataPanel.modifyApprovalTimestamp=Horodatage de modification de validation RelationTypes.MANAGER=Responsable RelationTypes.OWNER=Propriétaire RelationTypes.APPROVER=Valideur -RelationTypes.MEMBER=Défaut -RelationTypes.ANY=N'importe quel +RelationTypes.MEMBER=Par défaut +RelationTypes.ANY=N'importe laquelle RelationTypes.manager=Responsable RelationTypes.owner=Propriétaire RelationTypes.approver=Validateur -RelationTypes.default=Défaut +RelationTypes.default=Par défaut DelegationEditorPanel.from=De DelegationEditorPanel.to=A DelegationEditorPanel.meLabel=Utilisateur actuel @@ -94,7 +96,7 @@ DelegationEditorPanel.delegateCertificationWorkItems=Déléguer la révision des DelegationEditorPanel.allPrivilegesLabel=Déléguer tout ou partie des privilèges d'attribution DelegationEditorPanel.noPrivilegesLabel=Pas de privilèges DelegationEditorPanel.delegateManagementWorkItems=Déléguer l'achèvement des travaux de gestion de cas -DelegationEditorPanel.assignmentLimitations=Limitations des affectations +DelegationEditorPanel.assignmentLimitations=Limitations des attributions DelegationEditorPanel.allowTransitive=Permettre les délégations transitives AssignmentPreviewDialog.button.cancel=Annuler AssignmentPreviewDialog.column.description=Description @@ -104,7 +106,7 @@ AssignmentPreviewDialog.column.name=Nom AssignmentPreviewDialog.column.orgRef=Entité organisationnelle AssignmentPreviewDialog.column.tenant=Locataire AssignmentPreviewDialog.column.relation=Relation -AssignmentPreviewDialog.label=Voir les affectations directes et indirectes +AssignmentPreviewDialog.label=Voir les attributions directes et indirectes AssignmentPreviewDialog.delegationPreviewLabel=Limiter les privilèges AssignmentPreviewDialog.type.direct=Direct AssignmentPreviewDialog.type.indirect=Indirect @@ -118,7 +120,7 @@ AssignmentTablePanel.menu.unassign=Effacer l'attribution AssignmentTablePanel.menu.showAllAssignments=Montrer toutes les attributions AssignmentTablePanel.message.couldntAssignObject=Impossible d'attribuer l'objet « {0} » ; cause : {1}. AssignmentTablePanel.message.illegalAssignmentState=État d'attribution invalide « {0} ». -AssignmentTablePanel.message.noAssignmentSelected=Aucune affectation sélectionnée +AssignmentTablePanel.message.noAssignmentSelected=Aucune attribution sélectionnée AssignmentTablePanel.message.noDelegationsSelected=Aucune délégation sélectionnée. AssignmentTablePanel.modal.message.delete=Voulez-vous vraiment supprimer {0} attribution(s) ? AssignmentTablePanel.modal.message.deleteDelegation=Voulez-vous vraiment supprimer {0} délégation(s) ? @@ -252,6 +254,7 @@ contentPanel.accounts=Contenu contentPanel.entitlements=Droits CountToolbar.label=Affichage de {0,number,integer} à {1,number,integer} (total : {2,number,integer}). CountToolbar.noFound=Aucun résultat correspondant aux critères. +DataLanguagePanel.message.onStateChanged.fatalError=Couldn't change the language. DateValidator.message.fromAfterTo=La date de début de validité doit être antérieure à la date de fin de validité. DebugButtonPanel.button.delete=Supprimer DebugButtonPanel.button.export=Exporter @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Information fetchStrategy.nullValid=Choisissez... filter.duplicate=Le filtre avec le nom « {0} » est déjà défini filter.emptyFilter=Un filtre ne doit pas être vide +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Impossible de charger les rôles disponibles H3Header.label.error=Erreur H3Header.showMore=Afficher plus HandlerUriActions.ACTION_ADD_FOCUS=Ajouter un foyer @@ -566,6 +570,7 @@ Message.SourceMemory=tâche en mémoire ({0} récupérés) Message.SourceRepository=dépôt (statistiques mises à jour sur {0}) message.success=Vos réponses ont été mises à jour avec succès message.WrongAnswer=Questions non répondues correctement +ModelInitialSetup.message.init.fatalError=Model post initialization failed. ModelOperationStatusPanel.label.focusName=Objet : ModelOperationStatusPanel.label.focusType=de type : ModelOperationStatusPanel.label.primaryDelta=Delta primaire : @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Min NotificationsStatistics.TotalTime=Temps total NotificationsStatistics.Transport=Transport nullValid=Choisissez... +ObjectDataProvider.message.listObjects.fatalError=Couldn't list objects +ObjectDataProvider.message.countObjects.fatalError=Impossible de compter les objets. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Couldn't load resource for account. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=Éditer objectPolicyConfigurationEditor.label=Politiques d'objet objectPolicyConfigurationEditor.name.placeholder=Insérer une politique des objets @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Insérer un chemin de propriété ObjectPolicyDialog.subtype=Sous-type d'objet ObjectPolicyDialog.template=Gabarit d'objet ObjectPolicyDialog.type=Type d'objet +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Skipping setting property constraint, no path was defined. ObjectPolicyConfigurationTabPanel.type=Type ObjectPolicyConfigurationTabPanel.subtype=Sous-type ObjectPolicyConfigurationTabPanel.objectTemplate=Gabarit d'objet @@ -1094,7 +1104,7 @@ PageAdmin.menu.top.configuration.importObject=Importer un objet PageAdmin.menu.top.configuration.internals=Configuration interne PageAdmin.menu.top.configuration.objectPolicy=Politique des objets PageAdmin.menu.top.configuration.globalPolicyRule=Règle globale de politique -PageAdmin.menu.top.configuration.globalAccountSynchronization=Synchronisation globale du compte +PageAdmin.menu.top.configuration.globalAccountSynchronization=Synchronisation globale des comptes PageAdmin.menu.top.configuration.cleanupPolicy=Politique de nettoyage PageAdmin.menu.top.configuration.workflow=Configuration de flux de travaux PageAdmin.menu.top.configuration.roleManagement=Gestion des rôles @@ -1153,7 +1163,7 @@ PageAdmin.menu.top.cases.list=Mes cas PageAdmin.menu.top.cases.listAll=Tous les cas pageAdmin.reports.description=Export de rapports pageAdmin.reports=Rapports -PageAdmin.menu.top.users.requestAssign=Demande d'affectation +PageAdmin.menu.top.users.requestAssign=Demande d'attribution PageAdminObjectDetails.title.editUserType=Modifier l'utilisateur « {0} » PageAdminObjectDetails.title.viewUserType=Voir utilisateur « {0} » PageAdminObjectDetails.title.newUserType=Créer un nouvel utilisateur @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Créer une nouvelle conf PageAdminObjectDetails.title.editSystemConfigurationType=Modifier une configuration du système PageAdminObjectDetails.noChangesSave=Il n'y avait aucun changement à enregistrer. PageAdminObjectDetails.noChangesPreview=Il n'y a aucun changement à prévisualiser. +PageAdminObjectDetails.message.loadParentOrgs.warning=Cannot load parent org {0} pageAdminFocus.basic=Base pageAdminFocus.message.cantEditFocus=Erreur inconnue ; impossible de modifier l'objet focal. pageAdminFocus.message.cantNewFocus=Erreur inconnue ; impossible de créer un objet focal. @@ -1191,13 +1202,13 @@ pageAdminFocus.focusDetails=Détails pageAdminFocus.projections=Projections pageAdminFocus.personas=Personas pageAdminFocus.organizations=Organisations -pageAdminFocus.assignments=Affectations +pageAdminFocus.assignments=Attributions pageAdminFocus.policyRules=Règles de politique pageAdminFocus.applicablePolicies=Politiques applicables pageAdminFocus.message.couldntCreateAccountNoSchema=Impossible de créer un formulaire de projection pour « {0} » ; aucun schéma détaillé n'est disponible. Ce peut être en raison d'un problème de connexion ou de configuration du connecteur. Veuillez contrôler les journaux pour plus d'informations. pageAdminFocus.message.couldntCreateAccountNoAccountSchema=Impossible de créer un formulaire de projection pour « {0} » ; aucun schéma n'est disponible pour le type d'objet 'compte' par défaut. Ce peut être en raison d'un problème de configuration de la ressource. Veuillez contrôler les journaux pour plus d'informations. pageAdminFocus.message.couldntCreateAccount=Impossible de créer un formulaire de projection pour « {0} » ; cause : {1}. -pageAdminFocus.message.noAssignableSelected=Aucune affectation sélectionnée +pageAdminFocus.message.noAssignableSelected=Aucune attribution sélectionnée pageAdminFocus.message.couldntAssignObject=Impossible d'attribuer l'objet « {0} » ; cause : {1}. pageAdminFocus.message.noActivationFound=Aucune activation trouvée pour la projection « {0} ». pageAdminFocus.message.noEnabledPropertyFound=Aucune propriété activée trouvée pour le compte « {0} ». @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Démarrer PageBulkAction.message.emptyString=L'action en masse insérée est vide. Veuillez fournir un script non vide. PageBulkAction.options=Options PageBulkAction.title=Actions de masse de l'utilisateur +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=Action executed. Returned {0} item(s). Console and data output available via 'Export to XML' function. +PageBulkAction.message.startPerformed.fatalError.execute=Couldn't execute bulk action +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=Couldn't parse bulk action object +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=Requête de dépôt PageRepositoryQuery.button.translateAndExecute=Traduire et exécuter PageRepositoryQuery.button.translate=Traduire en requête d'hibernation @@ -1461,7 +1479,7 @@ PageCertDefinition.scopeDescription=Description du champ d'application PageCertDefinition.scopeObjectType=Type d'objet PageCertDefinition.scopeSearchFilter=Filtre pour sélectionner des objets PageCertDefinition.scopeAssignmentsInducements=Inclure les attributions ou les inductions -PageCertDefinition.scopeIncludeAssignments=Affectations +PageCertDefinition.scopeIncludeAssignments=Attributions PageCertDefinition.scopeIncludeInducements=Inductions PageCertDefinition.scopeIncludeTargetTypes=Inclure les types de cibles PageCertDefinition.scopeIncludeRoles=Rôles @@ -1473,10 +1491,11 @@ PageCertDefinition.scopeEnabledItemsOnly=Éléments activés uniquement PageCertDefinition.stagesDefinition=Définition des phases PageCertDefinitions.message.deleteDefinitionPerformed.success=La définition a été supprimée avec succès. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Impossible de supprimer la définition de campagne. +PageCertDefinitions.message.createCampaignPerformed.warning=Definition '{0}' is for ad-hoc campaigns that cannot be started manually. PageCert.in=dans {0} PageCert.message.assignment={0} de {1} {2} à {3} {4}. PageCert.message.textAdministrativeState=État administratif : {0}. -PageCert.message.textAssignment=Affectation +PageCert.message.textAssignment=Attribution PageCert.message.textDescription=Description : {0}. PageCert.message.textExtensions=Extensions définies : {0}. PageCert.message.textInducement=Induction @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Ajouter une définition de phase StageDefinitionPanel.moveStageLeftButton = Déplacer vers la gauche StageDefinitionPanel.moveStageRightButton = Déplacer vers la droite StageDefinitionPanel.deleteStageButton = Supprimer cette phase +PageBase.message.parseObject.fatalError=Couldn't parse object: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Couldn't load system configuration. +PageBase.message.loadDeploymentInformationType.fatalError=Couldn't load deployment information. +PageBase.message.getAdministratorPrivileged.fatalError=Couldn't get administrator user: {0} PageContacts.title=Navigateur de contacts pageContentAccounts.button.searchButton=Rechercher pageContentAccounts.dialog.title.confirmDelete=Confirmation de suppression @@ -1846,7 +1869,7 @@ PageOrgUnit.extension=Extension PageOrgUnit.message.cantCreateExtensionDelta=Impossible de créer un delta pour l'extension de l'entité organisationnelle PageOrgUnit.parentOrgRef=Parent PageOrgUnit.title.approvers=Validateurs -PageOrgUnit.title.assignments=Affectations +PageOrgUnit.title.assignments=Attributions PageOrgUnit.title.authorizations=Autorisations PageOrgUnit.title.basic=Base PageOrgUnit.title.exclusions=Exclusions @@ -2026,7 +2049,7 @@ PageRoleEditor.subtitle.basic=Base PageRoleEditor.subtitle.editingRole=rôle « {0} » PageRoleEditor.subtitle.extension=Extension PageRoleEditor.subtitle.newRole=nouveau rôle -PageRoleEditor.title.assignments=Affectations +PageRoleEditor.title.assignments=Attributions PageRoleEditor.title.editingRole=Éditer PageRoleEditor.title.inducements=Inductions PageRoleEditor.title.newRole=Créer @@ -2063,7 +2086,7 @@ pageSystemConfiguration.adminGui.title=Admin GUI pageSystemConfiguration.system.title=Système pageSystemConfiguration.objectPolicy.title=Politique des objets pageSystemConfiguration.globalPolicyRule.title=Règle globale de politique -pageSystemConfiguration.globalAccountSynchronization.title=Synchronisation globale du compte +pageSystemConfiguration.globalAccountSynchronization.title=Synchronisation globale des comptes pageSystemConfiguration.cleanupPolicy.title=Politique de nettoyage pageSystemConfiguration.roleManagement.title=Gestion des rôles pageSystemConfiguration.internals.title=Configuration interne @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Voulez-vous vraiment {0 pageTasks.message.confirmationMessageForMultipleTaskObject=Voulez-vous vraiment {0} les {1} tâches sélectionnées ? pageTasks.message.confirmationMessageForSingleNodeObject=Voulez-vous vraiment {0} le nœud « {1} » ? pageTasks.message.confirmationMessageForMultipleNodeObject=Voulez-vous vraiment {0} les {1} nœuds sélectionnés ? +pageTasks.message.resumeTasksPerformed.success=The task(s) have been successfully resumed. +pageTasks.message.resumeTasksPerformed.fatalError=Couldn't resume the task(s) +pageTasks.message.synchronizeTasksPerformed.fatalError=Impossible de synchroniser les tâches +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=Pour les tâches à exécution unique, n'indiquez ni intervalle de planification ni spécification en syntaxe "cron". Pour les tâches récurrentes, indiquez soit l'un soit l'autre (pas les deux). pageTask.scheduleInterval=Intervalle de planification (secondes) pageTask.scheduleTitle=Planification @@ -2325,7 +2352,7 @@ pageTasks.stalledSince=EN PANNE depuis {0} à {1} pageTasks.state=État pageTasks.subtasks=Montrer les sous-tâches pageTasks.task.category=Catégorie -pageTasks.task.closedAt=closed at +pageTasks.task.closedAt=close à pageTasks.task.currentRunTime=Durée d'exécution jusqu'à présent pageTasks.task.detail=Détail pageTasks.task.executingAt=S'exécute à @@ -2346,7 +2373,7 @@ page.title.editResource=Modifier la ressource pageUser.accounts=Compte pageUser.assignment.active=Actif pageUser.assignment.name=Nom -pageUser.assignments=Affectations +pageUser.assignments=Attributions pageAdminFocus.request=Demander un rôle pageAdminFocus.objectHistory=Historique pageUser.assignment.type=Type @@ -2383,7 +2410,7 @@ pageUser.message.noAccountSelected=Aucun compte sélectionné. pageUser.message.noActivationFound=Aucune activation trouvée pour le compte « {0} ». pageUser.message.noAssignableSelected=Aucun objet attribuable sélectionné. pageUser.message.noAssignmentsAvailable=Il n'y a actuellement aucune assignation à prévisualiser. -pageUser.message.noAssignmentSelected=Aucune affectation sélectionnée +pageUser.message.noAssignmentSelected=Aucune attribution sélectionnée pageUser.message.noEnabledPropertyFound=Aucune propriété activée trouvée pour le compte « {0} ». pageUser.message.noPassword=Le mot de passe n'est pas saisi pageUser.message.noResourceSelected=Aucune ressource sélectionnée @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Demandé par : pageWorkItem.requestedOn=Demandé le : pageWorkItem.requester.description=Demandeur pageWorkItem.requestSpecific.description=Votre décision -webComponentUtil.message.createMenuItemsFromActions.warning=Il n'y a aucun objets sur lesquels exécuter l'action +WebComponentUtil.message.createMenuItemsFromActions.warning=Il n'y a aucun objets sur lesquels exécuter l'action +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Impossible de charger les rôles disponibles WebComponentUtil.formatDurationWordsForLocal.seconds=seconds WebComponentUtil.formatDurationWordsForLocal.minutes=minutes WebComponentUtil.formatDurationWordsForLocal.hours=hours @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=Demandes connexes workItemPanel.reasons=Motifs du processus de validation workItemPanel.approverComment=Commentaire du validateur workItemPanel.approverInstruction=Instruction du validateur +PageTaskController.message.deleteSyncTokenPerformed.warning=Token is not present in this task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Couldn't delete sync token from the task. pageWorkItems.button.back=Retour pageWorkItems.button.approve=Valider pageWorkItems.button.claim=Revendiquer @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=État pageWorkItems.message.noItemSelected=Aucun travail n'a été sélectionné. pageWorkItems.message.noItemToBeReleased=Aucun des travaux ne peut être libéré (probablement parce qu'ils n'ont pas été revendiqués par l'utilisateur). pageWorkItems.message.success.approved=Les travaux ont été approuvés avec succès. +pageWorkItems.message.partialError.approved=Impossible d'approuver ou rejeter le travail en raison d'une exception inattendue. pageWorkItems.message.success.rejected=Les travaux ont été rejetés avec succès. pageWorkItems.message.success.claimed=Les travaux ont été revendiqués avec succès. +pageWorkItems.message.partialError.claimed=Impossible de revendiquer le travail en raison d'une exception inattendue. pageWorkItems.message.success.released={0} travail/travaux a/ont été libéré(s) avec succès. +pageWorkItems.message.partialError.released=Impossible de libérer le travail en raison d'une exception inattendue. PageWorkItemsAll.title=Tous les travaux PageWorkItemsAllocatedToMe.title=Travaux qui me sont alloués PageWorkItem.title=Détails d'un travail @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=Max. ProvisioningStatistics.MinTime=Min. ProvisioningStatistics.ObjectClass=Classe d'objet ProvisioningStatistics.OtherFailure=Échec -ProvisioningStatistics.OtherSuccess=Autres OK +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Ressource ProvisioningStatistics.ScriptFailure=Échec ProvisioningStatistics.ScriptSuccess=Script OK @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Télécharger ReconciliationPopupPanel.resource=Ressource ReconciliationPopupPanel.title.basic=Configuration de base du rapport d'harmonisation repeater.input.nullValid=Choisissez... +RepoInitialSetup.message.init.fatalError=Repository post initialization failed. ReportConfigurationPanel.title.basic=Base ReportConfigurationPanel.title.advanced=Avancé Requestable.ALL=Tout @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Motif tolérant ResourceAttributeEditor.message.cantParseSchema=Impossible d'analyser le schéma de la ressource ResourceAttributeEditor.title.delete=Supprimer ResourceAttributeEditor.title.edit=Éditer +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=Could not import account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Could not update status (to {0}) for {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=Modifier les informations d'identification de la ressource ResourceCredentialsEditor.label.fetchStrategy=Stratégie d'obtention ResourceCredentialsEditor.label.inbound=Entrant @@ -3131,17 +3171,17 @@ SystemConfigPanel.title.modelHooks=Points d'attache au modèle SystemConfigPanel.title.notification=Notifications SystemConfigPanel.title.securityPolicy=Politique globale de sécurité SystemConfigPanel.title.userTemplate=Gabarit utilisateur par défaut -SystemConfigPanel.tooltip.duration=Format : P[n][p], n-nombre, p-période (d - jours, m - mois, ...), P3M - nettoyage tous les 3 mois +SystemConfigPanel.tooltip.duration=Format : P[n][p], n-nombre, p-période (d - jours, m - mois...), P3M - nettoyage tous les 3 mois SystemConfigPanel.tooltip.color =Format hexadécimal, p.e. #3c8dbc pour la couleur d'en-tête par défaut de l'apparence de base « blue-light » SystemInfoPanel.cpuUsage=Utilisation du processeur central SystemInfoPanel.heapMemory=Mémoire en tas (utilisée, engagée, maximale) SystemInfoPanel.nonHeapMemory=Mémoire, hormis celle en tas (utilisée, engagée, maximale) SystemInfoPanel.threads=Exétrons (maintenant, pic, total) -TaskDtoExecutionStatus.CLOSED=Fermé -TaskDtoExecutionStatus.CLOSED.withTimestamp=Fermé à ${} +TaskDtoExecutionStatus.CLOSED=Close +TaskDtoExecutionStatus.CLOSED.withTimestamp=Close à ${} TaskDtoExecutionStatusFilter.ALL=Tous les états d'exécution -TaskDtoExecutionStatusFilter.CLOSED=Fermé -TaskDtoExecutionStatusFilter.NOT_CLOSED=Non fermé +TaskDtoExecutionStatusFilter.CLOSED=Close +TaskDtoExecutionStatusFilter.NOT_CLOSED=Non close TaskDtoExecutionStatusFilter.RUNNING_OR_RUNNABLE=Exécutable ou en cours d'exécution TaskDtoExecutionStatusFilter.SUSPENDED_OR_SUSPENDING=Suspendu ou en cours de suspension TaskDtoExecutionStatusFilter.WAITING=En attente @@ -3151,7 +3191,7 @@ TaskDtoExecutionStatus.RUNNING=En cours d'exécution TaskDtoExecutionStatus.SUSPENDED=Suspendu TaskDtoExecutionStatus.SUSPENDING=En cours de suspension TaskDtoExecutionStatus.WAITING=En attente -TaskExecutionStatus.CLOSED=Fermé +TaskExecutionStatus.CLOSED=Close TaskExecutionStatus.RUNNABLE=Exécutable TaskExecutionStatus.SUSPENDED=Suspendu TaskExecutionStatus.WAITING=En attente @@ -3174,7 +3214,7 @@ TaskStatePanel.message.lastObjectProcessed={0} TaskStatePanel.message.node= - au nœud {0} TaskStatePanel.message.objectsProcessed={0} TaskStatePanel.message.objectsProcessedTime=(temps moyen {1} ms, temps de traitement total {0} secondes) -TaskStatePanel.message.objectsTotal={0} (wall clock average: {1} ms) +TaskStatePanel.message.objectsTotal={0} (durée moyenne : {1} ms) TaskStatePanel.message.timeInfoWithAgo={0} (il y a {1}) TaskStatePanel.message.timeInfoWithDuration={0} (en {1} ms) TaskStatePanel.message.timeInfoWithDurationAndAgo={0} (il y a {1} - en {2} ms) @@ -3254,13 +3294,14 @@ TreeTablePanel.recomputeTask=Recalculer les utilisateurs dans l'organisation « TreeTablePanel.search.scope.one=Un niveau TreeTablePanel.search.scope.subtree=Sous-arbre TreeTablePanel.fullName.displayName=Nom complet / Nom d'affichage -TreeTablePanel.identifier.description=Identifiant/Description +TreeTablePanel.identifier.description=Identifiant / Description TreeTablePanel.warning.childrenExist=L'entité organisationnelle sur le point d'être supprimée contient des membres. Voulez-vous vraiment la supprimer ? Type.AUDIT=Audit type.nullValid=Choisissez... Type.RECONCILIATION=Harmonisation typeSelect.null=Tous les rôles Type.USERS=Utilisateur +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Impossible de charger les rôles disponibles UploadPanel.delete.tooltip=Supprimer fichier UploadPanel.message.help=Sélectionnez le fichier à importer UploadPanel.message.removeError=Le fichier n'a pas été supprimé. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Questions de sécurité UserMenuPanel.editProfile=Modifier le profil UserMenuPanel.logout=Me déconnecter UserMenuPanel.resetPasswords=Réinitialiser le mot de passe +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Couldn't load system security policy {0} UserOrgReferenceChoosePanel.type.org=Entité org. UserOrgReferenceChoosePanel.type=Type de propriétaire UserOrgReferenceChoosePanel.type.user=Utilisateur @@ -3294,7 +3336,7 @@ UserReportConfigPanel.dateTo=A UserReportConfigPanel.exportFileType=Type d'export UserReportConfigPanel.title.basic=Configuration d'un rapport Utilisateurs basique user.enduser=Utilisateur final -user.noAssignments=Pas d'affectations +user.noAssignments=Pas d'attributions user.superuser=Super-utilisateur user.orgManager=Responsable user.orgMember=Membre @@ -3302,6 +3344,11 @@ user.noOrgs=Aucune organisation validFromFetchStrategy.nullValid=Choisissez... validToFetchStrategy.nullValid=Choisissez... valueAttribute.nullValid=Choisissez... +WebModelUtils.couldntRunTask=Couldn't run task {0} +WebModelUtils.couldntLoadPasswordPolicies=Couldn't load password policies. +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=Couldn't load system configuration. WebModelUtils.couldntLoadObject=Impossible de charger l'objet. WebModelUtils.couldntSaveObject=Impossible d'enregistrer l'objet. WebModelUtils.couldntSearchObjects=Impossible de rechercher l'objet @@ -3340,7 +3387,7 @@ WfDeltasPanel.label.deltaOut=Sortie de processus : delta(s) résultant de la va WfHistoryPanel.label.event=Évènement WfHistoryPanel.label.timestamp=Temps WizardHelpDialog.button.ok=OK, j'ai compris ! -WizardHelpDialog.label=Aide relative à l'assistant Ressource +WizardHelpDialog.label=Aide - Assistant Ressource Wizard.message.cancel=La modification de la ressource a été annulée Wizard.correctErrorsFirst=Veuillez corriger les erreurs avant d'enregistrer. Wizard.Issues=Problèmes @@ -3361,7 +3408,7 @@ PageAdmin.menu.selfService=LIBRE SERVICE PageAdmin.menu.mainNavigation=ADMINISTRATION PageAdmin.menu.additional=SUPPLÉMENTAIRE PageAdmin.menu.profile=Profil -PageAdmin.menu.assignments=Affectations +PageAdmin.menu.assignments=Attributions PageAdmin.menu.credentials=Informations d'identification PageAdmin.menu.request=Demander un rôle PageTemplate.version=Version: @@ -3408,15 +3455,15 @@ ChangePasswordPanel.accountsTable.header=Propagation du mot de passe ChangePasswordPanel.name=Nom ChangePasswordPanel.resourceName=Ressource ChangePasswordPanel.enabled=Compte actif -ChangePasswordPanel.legendMessage.selected= - Le mot de passe sera changé -ChangePasswordPanel.legendMessage.propagated= - Propagation automatique du mot de passe (basée sur les stratégies définies dans les définitions de ressources) -ChangePasswordPanel.legendMessage.deselected= - Le mot de passe ne sera pas changé -ChangePasswordPanel.legendMessage.no.password.capability= - La ressource ne gère pas les mots de passe -ChangePasswordPanel.helpInfo=

Cette section relative aux informations d'identification détermine comment le changement de mot de passe sera propagé à chaque système individuel. La première ligne défini si le mot de passe sera changé dans le Système de Gestion des Identités lui-même. Les lignes suivantes représentent chaque système pour lequel le mot de passe peut être changé. La propagation du mot de passe est régie par les icônes:

  • Le mot de passe sera changé. Le mot de passe pour ce système sera mis à la valeur spécifiée dans la boite de dialogue de mot de passe ci-dessus.
  • Propagation automatique du mot de passe. Le mot de passe pourrait être changé. Le fait qu'il le soit effectivement ou non dépend de politiques mises en place par le gestionnaire des identités. Cela signifie habituellement que le mot de passe sera changé si cela a un sens dans la situation et selon les paramètres actuels. Choisir cette option est généralement raisonnable.
  • Le mot de passe ne sera pas changé pour ce système.
  • La capacité de changer les mots de passe n'est pas prise en charge par ce système. Par conséquent, le mot de passe ne sera pas modifié pour ce système.

Vous pouvez ajuster les paramètres de propagation du mot de passe en cliquant sur les icônes et donc régler avec précision comment le changement de mot de passe sera propagé à chaque système individuellement.

-ChangePasswordPanel.helpPopupTitle=Aide relative à la propagation des mots de passe +ChangePasswordPanel.legendMessage.selected= = Le mot de passe sera changé +ChangePasswordPanel.legendMessage.propagated= = Propagation automatique du mot de passe (basée sur les politiques définies dans les définitions de ressources) +ChangePasswordPanel.legendMessage.deselected= = Le mot de passe ne sera pas changé +ChangePasswordPanel.legendMessage.no.password.capability= = La ressource ne gère pas les mots de passe +ChangePasswordPanel.helpInfo=

Cette section relative aux informations d'identification détermine comment le changement de mot de passe sera propagé à chaque système individuel. La première ligne définit si le mot de passe sera changé dans le Système de Gestion des Identités lui-même. Les lignes suivantes représentent chaque système pour lequel le mot de passe peut être changé. La propagation du mot de passe est régie par les icônes :

  •  = Le mot de passe sera changé. Le mot de passe pour ce système sera mis à la valeur spécifiée dans la boite de dialogue de mot de passe ci-dessus.
  •  = Propagation automatique du mot de passe. Le mot de passe pourrait être changé. Le fait qu'il le soit effectivement ou non dépend de politiques mises en place par le gestionnaire des identités. Cela signifie habituellement que le mot de passe sera changé si cela a un sens dans la situation et selon les paramètres actuels. Choisir cette option est généralement raisonnable.
  •  = Le mot de passe ne sera pas changé pour ce système.
  •  = La capacité de changer les mots de passe n'est pas prise en charge par ce système. Par conséquent, le mot de passe ne sera pas modifié pour ce système.

Vous pouvez ajuster les paramètres de propagation du mot de passe en cliquant sur les icônes et donc régler avec précision comment le changement de mot de passe sera propagé à chaque système individuellement.

+ChangePasswordPanel.helpPopupTitle=Aide - Propagation des mots de passe PageBase.button.tooltip.clearSearch=Vider mainForm.uploadTooLarge = Le fichier à téléverser doit être inférieur à ${maxSize}. -mainForm.uploadFailed = Le téléversement du fichier a échoué : ${exception.localizedMessage} +mainForm.uploadFailed = Le téléversement du fichier a échoué : ${exception.localizedMessage} PageSelfCredentials.couldntResolve=Impossible de résoudre la ressource. roleMemberPanel.type=Type : roleMemberPanel.tenant=Locataire : @@ -3515,7 +3562,7 @@ TaskSummaryPanel.progressWithTotalKnown=Progression : {0} sur {1} TaskSummaryPanel.progressWithTotalUnknown=Progression : {0} TaskSummaryPanel.progressIfSuspended=(suspendu) TaskSummaryPanel.progressIfWaiting=(en attente) -TaskSummaryPanel.progressIfClosed=(fermé) +TaskSummaryPanel.progressIfClosed=(close) TaskSummaryPanel.progressIfStalled=(bloqué depuis {0}) TaskSummaryPanel.lastProcessed=Dernier objet traité : {0} ResourceContentResourcePanel.showExisting=Show existing @@ -3626,13 +3673,13 @@ PageCertDefinition.scopeObjectTypeHelp=Détermine quels objets seront inclus dan PageCertDefinition.scopeSearchFilterHelp=Si seul un sous-ensemble des objets d'un certain type doit être soumis à certification, vous pouvez spécifier le filtre correspondant ici. Par exemple vous pouvez spécifier que seuls les utilisateurs d'une certaine entité organisationnelle doivent être certifiés, ou que seuls les utilisateurs ayant une valeur "Type d'employé" spécifique doivent être pris en considération. PageCertDefinition.scopeAssignmentsInducementsHelp=Sélectionner les caractéristiques des objets ci-dessus devant être certifiées : les attributions, les inductions ou les deux. PageCertDefinition.scopeIncludeTargetTypesHelp=Lors de la certification des attributions ou inductions, vous pouvez spécifier quels types de cibles prendre en compte. Par exemple, vous pouvez indiquer que vous voulez certifier uniquement l'attribution des rôles (par exemple à des utilisateurs). -PageCertDefinition.scopeIncludeByStatusHelp=Indique s'il faut certifier uniquement les affectations / incitations dont le statut administratif est défini sur ACTIVÉ (ou non défini du tout). Notez que ce qui est pertinent est le statut administratif de l'affectation, pas le statut administratif de l'objet assigné. +PageCertDefinition.scopeIncludeByStatusHelp=Indique s'il faut certifier uniquement les attributions / incitations dont le statut administratif est défini sur ACTIVÉ (ou non défini du tout). Notez que ce qui est pertinent est le statut administratif de l'attribution, pas le statut administratif de l'objet assigné. StageDefinitionPanel.stageDurationHelp=Pendant cette phase, utilisé pour déterminer l'heure de fin. L'heure de fin est calculée par addition de la durée à l'heure de l'ouverture de la phase, arrondie à 23h59m59s du dernier jour. La durée est spécifiée en format ISO 8601, par exemple P14D pour 14 jours, P3W pour 3 semaines, P2M pour 2 mois, etc. StageDefinitionPanel.notifyBeforeDeadlineHelp=Combien de temps s'écoule avant l'envoi de notifications de rappel de fin de phase (aux vérificateurs et au propriétaire de la campagne). Il est possible de spécifier plus de valeurs ; séparez-les par des virgules. L'intervalle de temps est spécifié au format ISO 8601, comme PT12H pour 12 heures, P2D pour 2 jours, P1W pour 1 semaine, etc. Exemple : « PT48H, PT12H » indique que la première notification sera envoyée 48 heures avant la fin de la phase et la seconde 12 heures avant la fin. StageDefinitionPanel.notifyWhenNoDecisionHelp=Si cette case est cochée, une notification « fin de phase proche » est envoyée à un vérificateur uniquement si certains cas sont en attente de sa décision. Si cette case n'est pas cochée, les relecteurs reçoivent toujours leurs notifications, qu'ils aient ou non pris une décision. (Notez que les notifications au propriétaire de la campagne concernant l'approche de la fin de la phase sont toujours envoyées, peu importe la configuration de ce paramètre.) -StageDefinitionPanel.reviewerSpecificationTargetHelp=Sélection des vérificateurs sur base des propriétaires ou validateurs des cibles des attributions ou inductions. Par exemple vous pouvez spécifier qu'il incombera au propriétaire du rôle de certifier toutes les attributions de « son » rôle (à n'importe quel utilisateur). +StageDefinitionPanel.reviewerSpecificationTargetHelp=Sélection des vérificateurs sur base des propriétaires ou validateurs des cibles des attributions ou inductions. Par exemple vous pouvez spécifier qu'il incombera au propriétaire du rôle de certifier toutes les attributions de « son » rôle (à n'importe quel utilisateur). StageDefinitionPanel.reviewerSpecificationObjectHelp=Sélection des vérificateurs sur base de l'objet auquel est affecté (directement ou par induction) quelque chose. Par exemple, vous pouvez spécifier qu'il incombera au propriétaire du rôle de certifier toutes les inductions conduisant « son » rôle à être membre d'autres rôles etc. -StageDefinitionPanel.reviewerUseObjectManagerHelp=Sélection des vérificateurs sur base des responsables de l'objet (généralement un utilisateur) auquel est affecté ou induit quelque chose. Par exemple, vous pouvez spécifier qu'il incombera à un responsable hiérarchique de certifier toutes les affectations de rôles effectuées aux utilisateurs de « son » entité organisationnelle. +StageDefinitionPanel.reviewerUseObjectManagerHelp=Sélection des vérificateurs sur base des responsables de l'objet (généralement un utilisateur) auquel est affecté ou induit quelque chose. Par exemple, vous pouvez spécifier qu'il incombera à un responsable hiérarchique de certifier toutes les attributions de rôles effectuées aux utilisateurs de « son » entité organisationnelle. StageDefinitionPanel.reviewerUseObjectManagerOrgTypeHelp=Détermination des influences d'un responsable d'un utilisateur :\nTout d'abord, nous prenons tous les responsables de toutes les entités organisationnelles auxquelles l'utilisateur appartient. Nous excluons l'utilisateur lui-même s'il est responsable de cette organisation (et si « autoriser les responsables à approuver leurs propres missions » ci-dessous n'est pas coché). Si la valeur de ce champ est renseignée, nous l'utilisons pour sélectionner uniquement les organisations avec une valeur de type d'organisation donnée, par exemple « fonctionnel » (si vous avez par exemple des organisations de type fonctionnel et de type projet). Si ce champ est vide, nous prenons en compte toutes les organisations. Si nous ne trouvons aucun responsable approprié, nous continuons avec toutes les organisations parentes (encore une fois, du type donné, si spécifié). StageDefinitionPanel.reviewerUseObjectManagerAllowSelfHelp=Si un utilisateur est un responsable de son entité organisationnelle, pourrait-il être sélectionné comme vérificateur pour ses propres attributions ? Si elle n'est pas cochée (valeur par défaut), un gestionnaire de niveau supérieur est recherché - voir la description du champ ci-dessus. StageDefinitionPanel.defaultReviewerRefHelp=Ce(s) vérificateur(s) sera(seront) utilisé(s) si la condition ci-dessus ne mènerait à aucun vérificateur. @@ -3800,41 +3847,42 @@ PageAssignmentShoppingKart.title=Demande d'attribution PageAssignmentShoppingCart.title=Demande d'attribution PageAssignmentShoppingKart.roleCatalogIsNotConfigured=Le catalogue de rôles n'est pas configuré dans le fichier XML de configuration du système. RoleCatalogItemButton.assignmentsLimitReachedTitle=Le nombre maximal de demandes d'attributions a été atteint ({0}). Aucun élément supplémentaire ne peut être ajouté, modifié ou supprimé. -AssignmentPanel.assignmentsLimitReachedWarning=Le nombre d'éléments sélectionnés dépasse la limite de demande d'affectation ({0}). +AssignmentPanel.assignmentsLimitReachedWarning=Le nombre d'éléments sélectionnés dépasse la limite de demande d'attribution ({0}). AssignmentConflictPanel.existingAssignmentLabelMessage=(quel utilisateur a déjà) AssignmentConflictPanel.addedAssignmentLabelMessage=(qui est ajouté au panier) AssignmentConflictPanel.conflictMessage=en conflit avec AssignmentConflictPanel.removeButton=Supprimer AssignmentConflictPanel.unselectButton=Désélectionner AssignmentConflictPanel.undoAction=Annuler -PageAssignmentConflicts.title=Conflits entre affectations +PageAssignmentConflicts.title=Conflits entre attributions PageAssignmentConflicts.back=Retour PageAssignmentConflicts.submit=Soumettre -AbstractShoppingCartTabPanel.addAllButton=Ajouter tous -AbstractShoppingCartTabPanel.requestingForLabel=Demandant pour +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: +AbstractShoppingCartTabPanel.addAllButton=Les ajouter tou(te)s +AbstractShoppingCartTabPanel.requestingForLabel=Demande pour AbstractShoppingCartTabPanel.availableRelationsLabel=Relations disponibles AssignmentCatalogPanel.selectTargetUser=Sélectionner l'utilisateur cible AssignmentCatalogPanel.selectSourceUser=Select assignments source user AssignmentCatalogPanel.sourceUserSelected=Attributions de {0} AssignmentCatalogPanel.selectAssignmentsUserOwner=Select assignments user owner -AssignmentCatalogPanel.requestForMe=moi +AssignmentCatalogPanel.requestForMe=moi-même AssignmentCatalogPanel.requestFor=Utilisateur cible : {0} AssignmentCatalogPanel.requestForMultiple={0} utilisateurs cibles sélectionnés AssignmentCatalogPanel.assignmentsOwner=attributions de {0} -UserSelectionButton.myAssignmentsLabel=Utilisateur source : moi +UserSelectionButton.myAssignmentsLabel=Utilisateur source : moi-même UserSelectionButton.userAssignmentsLabel=Utilisateur source : {0} MultiButtonPanel.plusIconTitle=Ajouter l'élément au panier -MultiButtonPanel.assignmentDetailsPopupTitle=Détails de l'affectation +MultiButtonPanel.assignmentDetailsPopupTitle=Détails de l'attribution MultiButtonPanel.detailsLink=Propriétés MultiButtonPanel.addToCartLink=Ajouter au panier MultiButtonPanel.alreadyAssignedIconTitle=Attribué comme {0} -PageAssignmentDetails.title=Détails de l'affectation +PageAssignmentDetails.title=Détails de l'attribution PageAssignmentDetails.backButton=Retour PageAssignmentDetails.addToCartButton=Ajouter au panier PageAssignmentsList.submitButton=Soumettre PageAssignmentsList.resolveConflicts=Résoudre les conflits -PageAssignmentsList.commentHere=Commentez ici... -PageAssignmentsList.requestComment=Demander un commentaire (facultatif) +PageAssignmentsList.commentHere=Introduisez ici votre commentaire... +PageAssignmentsList.requestComment=Commentaire pour cette demande (facultatif) PageAssignmentsList.saveAssignmentsError=Impossible d'enregistrer les attributions. Cause : AssignmentShoppingCartPanel.treeTitle=Catalogue de rôles AssignmentViewType.ROLE_CATALOG_VIEW=Vue selon le catalogue de rôles @@ -3842,10 +3890,10 @@ AssignmentViewType.ROLE_TYPE=Vue de tous les rôles AssignmentViewType.ORG_TYPE=Vue de toutes les entités organisationnelles AssignmentViewType.SERVICE_TYPE=Vue de tous les services AssignmentViewType.USER_TYPE=Attributions de l'utilisateur -PageAssignmentsList.requestButton = Requête +PageAssignmentsList.requestButton = Demander operation.com.evolveum.midpoint.web.page.self.PageAssignmentsList.requestAssignments=Demander une attribution com.evolveum.midpoint.web.page.self.PageAssignmentsList.requestAssignments=Demander des attributions -PageAssignmentsList.title=Liste des nouvelles attributions +PageAssignmentsList.title=Liste des nouvelles attributions souhaitées PageAuditLogViewer.title=Visionneur de journal d'audit PageAuditLogViewer.menuName=Visionneur de journal d'audit PageAuditLogViewer.timeLabel=Temps @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Impossible d'obtenir le travail relatif CsvDownloadButtonPanel.export=Exporter en CSV CsvDownloadButtonPanel.confirmationMessage=La taille de l'export en CSV est limitée à {0} entrées. Continuer ? AssignmentEditorDto.policyRuleTitle=Règle de politique +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Une exception s'est produite pendant le chargement des propriétés d'attributions. +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=Cible AssignmentDataTablePanel.validityColumnName=Validité AssignmentDataTablePanel.organizationColumnName=Organisation @@ -4074,22 +4124,22 @@ PageInternals.tab.counters=Compteurs PageAttorneySelection.title=Sélection de l'utilisateur PageWorkItemsAttorney.title=Travaux en tant que mandataire PolicyConstraintsType.objectState=État de l'objet -PolicyConstraintsType.assignmentState=État d'affectation -PolicyConstraintsType.hasAssignment=A une affectation -PolicyConstraintsType.hasNoAssignment=N'a pas d'affectation +PolicyConstraintsType.assignmentState=État d'attribution +PolicyConstraintsType.hasAssignment=A une attribution +PolicyConstraintsType.hasNoAssignment=N'a pas d'attribution PolicyConstraintsType.exclusion=Exclusion PolicyConstraintsType.minAssignees=Nombre minimal d'attributaires PolicyConstraintsType.maxAssignees=Nombre maximal d'attributaires PolicyConstraintsType.objectMinAssigneesViolation=Violation du nombre minimal d'attributaires de l'objet PolicyConstraintsType.objectMaxAssigneesViolation=Violation du nombre maximal d'attributaires de l'objet PolicyConstraintsType.modification=Modification -PolicyConstraintsType.assignment=Affectation +PolicyConstraintsType.assignment=Attribution PolicyConstraintsType.objectTimeValidity=Object time validity -PolicyConstraintsType.assignmentTimeValidity=Validité du temps d'affectation +PolicyConstraintsType.assignmentTimeValidity=Validité du temps d'attribution PolicyConstraintsType.situation=Situation PolicyConstraintsType.transition=Transition PolicyConstraintsType.ref=Réf -AssignmentTypeDetailsPanel.containerTitle=Détails de l'affectation +AssignmentTypeDetailsPanel.containerTitle=Détails de l'attribution ResourceObjectAssociationType.details=Association ResourceAttributeDefinitionType.details=Attributs ExpressionValuePanel.shadowRefValueTitle=Référence du reflet @@ -4135,12 +4185,12 @@ InducedEntitlements.value=Valeur AbstractObjectMainPanel.editXmlButton=Modifier en mode brut AbstractObjectMainPanel.confirmEditXmlRedirect=Vos modifications locales seront perdues. Voulez-vous vraiment être redirigé ? CertCampaignStateFilter.ALL=Tous les états de campagne -CertCampaignStateFilter.NOT_CLOSED=Non fermé +CertCampaignStateFilter.NOT_CLOSED=Non close CertCampaignStateFilter.CREATED=Créé CertCampaignStateFilter.IN_REVIEW_STAGE=En phase de révision CertCampaignStateFilter.REVIEW_STAGE_DONE=Phase de révision terminée CertCampaignStateFilter.IN_REMEDIATION=En réhabilitation -CertCampaignStateFilter.CLOSED=Fermé +CertCampaignStateFilter.CLOSED=Close DisplayNamePanel.kindIntentLabel=Sorte : {0}, Finalité : {1} PageUsersView.title=Vue des utilisateurs pageAdminFocus.dataProtection=Protection des données @@ -4152,7 +4202,7 @@ propertyConstraintValidator.error=Impossible d'établir une contrainte sur la pr ReferencePopupPanel.oid=Oid: ReferencePopupPanel.targetType=Type : ReferencePopupPanel.relation=Relation: -chooseFocusTypeAndRelationDialogPanel.relation=Relation: +chooseFocusTypeAndRelationDialogPanel.relation=Relation : chooseFocusTypeAndRelationDialogPanel.type=Type chooseFocusTypeAndRelationDialogPanel.tooltip.type=Type of the object to which the assignment exits abstractRoleMemberPanel.menu.assign=Attribuer @@ -4165,7 +4215,7 @@ abstractRoleMemberPanel.searchScope.tooltip=Applicable uniquement aux membres de abstractRoleMemberPanel.type=Type abstractRoleMemberPanel.type.tooltip=Montrer les membres du type sélectionné abstractRoleMemberPanel.indirectMembers=Indirect -abstractRoleMemberPanel.indirectMembers.tooltip="Indique s'il faut afficher les membres qui ne sont pas affectés directement (il n'y a pas d'affectation dans l'objet)" +abstractRoleMemberPanel.indirectMembers.tooltip="Indique s'il faut afficher les membres qui ne sont pas attribués directement (il n'y a pas d'attribution dans l'objet)" abstractRoleMemberPanel.recomputeAllMembersConfirmationLabel=Voulez-vous vraiment recalculer tous les membres ? abstractRoleMemberPanel.recomputeSelectedMembersConfirmationLabel=Voulez-vous vraiment recalculer les membres sélectionné ? abstractRoleMemberPanel.deleteAllMembersConfirmationLabel=Voulez-vous vraiment supprimer les membres selon les paramètres spécifiés ? @@ -4213,8 +4263,9 @@ WorkItemNotificationActionType.details.newValue=Action de notification pour un n ResourceObjectAssociationType.details.newValue=New resource object association ResourceAttributeDefinitionType.details.newValue=New resource attribute definition MappingType.details.newValue=Nouvelle correspondance +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=État de l'objet -assignmentState.details=État d'affectation +assignmentState.details=État d'attribution hasAssignment.details=A une attribution hasNoAssignment.details=N'a pas d'attribution exclusion.details=Exclusion @@ -4223,7 +4274,7 @@ maxAssignees.details=Nombre maximal d'attributaires modification.details=Modification assignment.details=Attribution objectTimeValidity.details=Object time validity -assignmentTimeValidity.details=Validité du temps d'affectation +assignmentTimeValidity.details=Validité du temps d'attribution situation.details=Situation de politique transition.details=Transition ref.details=Référence diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_hu.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_hu.properties index 641ab685a5b..6514dd8a388 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_hu.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_hu.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Cél AssignmentEditorPanel.tenantRef=Tenant AssignmentEditorPanel.undefined=Nem definiált AssignmentEditorPanel.metadataBlock={0} Metaadat +AssignmentEditorPanel.message.loadAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=Aktiválás AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=Mégse @@ -252,6 +254,7 @@ contentPanel.accounts=Tartalom contentPanel.entitlements=Jogosultságok CountToolbar.label={0,number,integer} to {1,number,integer} of {2,number,integer} CountToolbar.noFound=Nincs találat +DataLanguagePanel.message.onStateChanged.fatalError=Couldn't change the language. DateValidator.message.fromAfterTo=Az "Érvényesség kezdete" korábbi kell, hogy legyen mint az "Érvényesség vége". DebugButtonPanel.button.delete=Törlés DebugButtonPanel.button.export=Export @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Information fetchStrategy.nullValid=Válasszon egyet filter.duplicate=Filter with name '{0}' is already defined filter.emptyFilter=Filter must not be empty +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles H3Header.label.error=Hiba H3Header.showMore=Továbbiak HandlerUriActions.ACTION_ADD_FOCUS=Add focus @@ -566,6 +570,7 @@ Message.SourceMemory=task in memory (fetched {0}) Message.SourceRepository=repository (statistics updated on {0}) message.success=Your Answers Were Updated Successfully message.WrongAnswer=Questions Not Answered Correctly +ModelInitialSetup.message.init.fatalError=Model post initialization failed. ModelOperationStatusPanel.label.focusName=Object: ModelOperationStatusPanel.label.focusType=of type: ModelOperationStatusPanel.label.primaryDelta=Primary delta: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Min NotificationsStatistics.TotalTime=Total time NotificationsStatistics.Transport=Transport nullValid=Choose one +ObjectDataProvider.message.listObjects.fatalError=Couldn't list objects +ObjectDataProvider.message.countObjects.fatalError=Couldn't count objects. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Couldn't load resource for account. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=Edit objectPolicyConfigurationEditor.label=Object policies objectPolicyConfigurationEditor.name.placeholder=Insert object policy @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Insert property path ObjectPolicyDialog.subtype=Object subtype ObjectPolicyDialog.template=Objektum sablon ObjectPolicyDialog.type=Object type +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Skipping setting property constraint, no path was defined. ObjectPolicyConfigurationTabPanel.type=Típus ObjectPolicyConfigurationTabPanel.subtype=Altípus ObjectPolicyConfigurationTabPanel.objectTemplate=Objektum sablon @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Create new system config PageAdminObjectDetails.title.editSystemConfigurationType=Edit system configuration PageAdminObjectDetails.noChangesSave=There were no changes to be saved. PageAdminObjectDetails.noChangesPreview=There are no changes to be previewed. +PageAdminObjectDetails.message.loadParentOrgs.warning=Cannot load parent org {0} pageAdminFocus.basic=Basic pageAdminFocus.message.cantEditFocus=Unknown error occurred, can't edit focus object. pageAdminFocus.message.cantNewFocus=Unknown error occurred, can't create new focus object. @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Start PageBulkAction.message.emptyString=A megadott tömeges művelet üres. Kérem adjon meg egy nem üres parancsfájlt. PageBulkAction.options=Options PageBulkAction.title=Felhasználói tömeges műveletek. +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=Action executed. Returned {0} item(s). Console and data output available via 'Export to XML' function. +PageBulkAction.message.startPerformed.fatalError.execute=Couldn't execute bulk action +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=Couldn't parse bulk action object +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=Repository query PageRepositoryQuery.button.translateAndExecute=Translate and execute PageRepositoryQuery.button.translate=Translate to hibernate query @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Enabled items only PageCertDefinition.stagesDefinition=Stages definition PageCertDefinitions.message.deleteDefinitionPerformed.success=The definition has been successfully deleted. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Couldn't delete campaign definition. +PageCertDefinitions.message.createCampaignPerformed.warning=Definition '{0}' is for ad-hoc campaigns that cannot be started manually. PageCert.in=in {0} PageCert.message.assignment={0} of {1} {2} to {3} {4}. PageCert.message.textAdministrativeState=Administrative state: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Add stage definition StageDefinitionPanel.moveStageLeftButton = Move left StageDefinitionPanel.moveStageRightButton = Move right StageDefinitionPanel.deleteStageButton = Delete this stage +PageBase.message.parseObject.fatalError=Couldn't parse object: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Couldn't load system configuration. +PageBase.message.loadDeploymentInformationType.fatalError=Couldn't load deployment information. +PageBase.message.getAdministratorPrivileged.fatalError=Couldn't get administrator user: {0} PageContacts.title=Contacts browser pageContentAccounts.button.searchButton=Keresés pageContentAccounts.dialog.title.confirmDelete=Delete Confirmation @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Do you really want to { pageTasks.message.confirmationMessageForMultipleTaskObject=Do you really want to {0} selected {1} task(s)? pageTasks.message.confirmationMessageForSingleNodeObject=Do you really want to {0} node '{1}'? pageTasks.message.confirmationMessageForMultipleNodeObject=Do you really want to {0} selected {1} node(s)? +pageTasks.message.resumeTasksPerformed.success=The task(s) have been successfully resumed. +pageTasks.message.resumeTasksPerformed.fatalError=Couldn't resume the task(s) +pageTasks.message.synchronizeTasksPerformed.fatalError=Couldn't synchronize tasks +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=For one-time tasks, enter neither schedule interval nor cron-like specification. For recurring tasks, enter exactly one of these. pageTask.scheduleInterval=Schedule interval (seconds) pageTask.scheduleTitle=Scheduling @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Requested by: pageWorkItem.requestedOn=Requested on: pageWorkItem.requester.description=Igénylő pageWorkItem.requestSpecific.description=Your decision -webComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Couldn't load available roles WebComponentUtil.formatDurationWordsForLocal.seconds=seconds WebComponentUtil.formatDurationWordsForLocal.minutes=minutes WebComponentUtil.formatDurationWordsForLocal.hours=hours @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=Related requests workItemPanel.reasons=Reasons for the approval process workItemPanel.approverComment=Approver comment workItemPanel.approverInstruction=Approver instruction +PageTaskController.message.deleteSyncTokenPerformed.warning=Token is not present in this task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Couldn't delete sync token from the task. pageWorkItems.button.back=Vissza pageWorkItems.button.approve=Approve pageWorkItems.button.claim=Claim @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Állapot pageWorkItems.message.noItemSelected=No work item has been selected. pageWorkItems.message.noItemToBeReleased=None of the work items can be released (most probably because they were not claimed by the user). pageWorkItems.message.success.approved=The work item(s) have been successfully approved. +pageWorkItems.message.partialError.approved=Couldn't approve/reject work item due to an unexpected exception. pageWorkItems.message.success.rejected=The work item(s) have been successfully rejected. pageWorkItems.message.success.claimed=The work item(s) have been successfully claimed. +pageWorkItems.message.partialError.claimed=Couldn't claim work item due to an unexpected exception. pageWorkItems.message.success.released={0} work item(s) have been successfully released. +pageWorkItems.message.partialError.released=Couldn't release work item due to an unexpected exception. PageWorkItemsAll.title=All work items PageWorkItemsAllocatedToMe.title=Work items allocated to me PageWorkItem.title=Work item details @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=Max ProvisioningStatistics.MinTime=Min ProvisioningStatistics.ObjectClass=Object class ProvisioningStatistics.OtherFailure=Fail -ProvisioningStatistics.OtherSuccess=Script OK +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Erőforrás ProvisioningStatistics.ScriptFailure=Fail ProvisioningStatistics.ScriptSuccess=Script OK @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Download ReconciliationPopupPanel.resource=Erőforrás ReconciliationPopupPanel.title.basic=Basic Reconciliation Report Configuration repeater.input.nullValid=Válasszon egyet +RepoInitialSetup.message.init.fatalError=Repository post initialization failed. ReportConfigurationPanel.title.basic=Basic ReportConfigurationPanel.title.advanced=Advanced Requestable.ALL=Összes @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Tolerant pattern ResourceAttributeEditor.message.cantParseSchema=Couldn't parse resource schema ResourceAttributeEditor.title.delete=Törlés ResourceAttributeEditor.title.edit=Edit +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=Could not import account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Could not update status (to {0}) for {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=Edit Resource Credentials ResourceCredentialsEditor.label.fetchStrategy=Fetch strategy ResourceCredentialsEditor.label.inbound=Inbound @@ -3261,6 +3301,7 @@ type.nullValid=Válasszon egyet Type.RECONCILIATION=Egyeztetés typeSelect.null=All roles Type.USERS=Felhasználó +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles UploadPanel.delete.tooltip=Remove file UploadPanel.message.help=Válassza ki az importálandó fájlt. UploadPanel.message.removeError=File was not removed. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Security Questions UserMenuPanel.editProfile=Profil szerkesztése UserMenuPanel.logout=Kijelentkezés UserMenuPanel.resetPasswords=Jelszóreset +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Couldn't load system security policy {0} UserOrgReferenceChoosePanel.type.org=Org. Unit UserOrgReferenceChoosePanel.type=Owner Type UserOrgReferenceChoosePanel.type.user=Felhasználó @@ -3302,6 +3344,11 @@ user.noOrgs=No organizations validFromFetchStrategy.nullValid=Válasszon egyet validToFetchStrategy.nullValid=Válasszon egyet valueAttribute.nullValid=Válasszon egyet +WebModelUtils.couldntRunTask=Couldn't run task {0} +WebModelUtils.couldntLoadPasswordPolicies=Couldn't load password policies. +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=Couldn't load system configuration. WebModelUtils.couldntLoadObject=Az objektum betöltése sikertelen WebModelUtils.couldntSaveObject=Couldn't save object. WebModelUtils.couldntSearchObjects=Couldn't search objects. @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=Visszavonás PageAssignmentConflicts.title=Assignments conflicts PageAssignmentConflicts.back=Vissza PageAssignmentConflicts.submit=Submit +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: AbstractShoppingCartTabPanel.addAllButton=Add all AbstractShoppingCartTabPanel.requestingForLabel=Requesting for AbstractShoppingCartTabPanel.availableRelationsLabel=Available relations @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Couldn't get case work item. It might h CsvDownloadButtonPanel.export=CSV export CsvDownloadButtonPanel.confirmationMessage=CSV export size is limited to {0} entries. Continue? AssignmentEditorDto.policyRuleTitle=Házirend szabály +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=Cél AssignmentDataTablePanel.validityColumnName=Validity AssignmentDataTablePanel.organizationColumnName=Szervezet @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=New work item notification actio ResourceObjectAssociationType.details.newValue=New resource object association ResourceAttributeDefinitionType.details.newValue=New resource attribute definition MappingType.details.newValue=New mapping +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=Object state assignmentState.details=Assignment state hasAssignment.details=Has assignment diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_it.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_it.properties index 018f3649966..7d19860f1d9 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_it.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_it.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Target AssignmentEditorPanel.tenantRef=Società AssignmentEditorPanel.undefined=Non definito AssignmentEditorPanel.metadataBlock={0} Metadati +AssignmentEditorPanel.message.loadAttributes.fatalError=Si è verificata un'eccezione durante il caricamento dell'attributo di assegnazione. +AssignmentEditorPanel.message.getReference.fatalError=Impossibile ottenere il riferimento alla risorsa di costruzione dell'account. AssignmentActivationPopupPanel.title=Attivazione AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=Cancella @@ -252,6 +254,7 @@ contentPanel.accounts=Contenuto contentPanel.entitlements=Abilitazioni CountToolbar.label={0,number,integer} a {1,number,integer} di {2,number,integer} CountToolbar.noFound=Nessun risultato trovato. +DataLanguagePanel.message.onStateChanged.fatalError=Impossibile cambiare la lingua. DateValidator.message.fromAfterTo=La data di inizio validità deve essere precedente alla data di scadenza. DebugButtonPanel.button.delete=Elimina DebugButtonPanel.button.export=Esporta @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Informazione fetchStrategy.nullValid=Scegline uno filter.duplicate=Il filtro con nome '{0}' è già definito filter.emptyFilter=Il filtro non può essere vuoto +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Impossibile caricare i ruoli disponibili H3Header.label.error=Errore H3Header.showMore=Mostra di più HandlerUriActions.ACTION_ADD_FOCUS=Aggiungi focus @@ -566,6 +570,7 @@ Message.SourceMemory=task in memoria (recuperati {0}) Message.SourceRepository=repository (statistiche aggiornate su {0}) message.success=Le tue risposte sono state aggiornate con successo message.WrongAnswer=Domande non risposte correttamente +ModelInitialSetup.message.init.fatalError=Inizializzazione post modello fallita. ModelOperationStatusPanel.label.focusName=Oggetto: ModelOperationStatusPanel.label.focusType=di tipo: ModelOperationStatusPanel.label.primaryDelta=Delta primario: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Minimo NotificationsStatistics.TotalTime=Tempo totale NotificationsStatistics.Transport=Trasporto nullValid=Scegline uno +ObjectDataProvider.message.listObjects.fatalError=Impossibile elencare gli oggetti +ObjectDataProvider.message.countObjects.fatalError=Impossibile contare gli oggetti. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Impossibile caricare la risorsa per l'account. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Impossibile recuperare o visualizzare il delta: {0} objectPolicyConfigurationEditor.button.edit=Modifica objectPolicyConfigurationEditor.label=Policies dell'oggetto objectPolicyConfigurationEditor.name.placeholder=Inserisci policy dell'oggetto @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Inserisci il path della proprietà ObjectPolicyDialog.subtype=Sottotipo dell'oggetto ObjectPolicyDialog.template=Template dell'oggetto ObjectPolicyDialog.type=Tipo dell'oggetto +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Salta l'impostazione del vincolo della proprietà, non è stato definito alcun percorso. ObjectPolicyConfigurationTabPanel.type=Tipo ObjectPolicyConfigurationTabPanel.subtype=Sottotipo ObjectPolicyConfigurationTabPanel.objectTemplate=Template dell'oggetto @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Crea una nuova configura PageAdminObjectDetails.title.editSystemConfigurationType=Modifica configurazione di sistema PageAdminObjectDetails.noChangesSave=Non ci sono modifiche da salvare. PageAdminObjectDetails.noChangesPreview=Non ci sono modifiche da visualizzare in anteprima. +PageAdminObjectDetails.message.loadParentOrgs.warning=Impossibile caricare l'organizzazione padre {0} pageAdminFocus.basic=Di base pageAdminFocus.message.cantEditFocus=Si è verificato un errore sconosciuto, non è possibile modificare l'oggetto in focus. pageAdminFocus.message.cantNewFocus=Si è verificato un errore sconosciuto, impossibile creare un nuovo oggetto in focus. @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Avvia PageBulkAction.message.emptyString=L'azione massiva inserita è vuota. Si prega di fornire script non vuoto. PageBulkAction.options=Opzioni PageBulkAction.title=Azioni massive utente +PageBulkAction.message.startPerformed.inProgress={0} è stato sottomesso con successo all'esecuzione +PageBulkAction.message.startPerformed.success=Azione eseguita. Restituito {0} articolo/i. Console e dati di output disponibili tramite la funzione "Esporta in XML". +PageBulkAction.message.startPerformed.fatalError.execute=Impossibile eseguire l'azione massiva +PageBulkAction.message.startPerformed.fatalError.submit=Impossibile sottomettere l'azione massiva in esecuzione +PageBulkAction.message.startPerformed.fatalError.parse=Impossibile analizzare l'azione massiva +PageBulkAction.message.startPerformed.fatalError.provided=Non è stato fornito alcun oggetto azione massiva. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Il testo fornito non è un oggetto azione massivo. È prevista un'istanza di {0}; hai fornito {1} invece. PageRepositoryQuery.title=Query del repository PageRepositoryQuery.button.translateAndExecute=Traduci ed esegui PageRepositoryQuery.button.translate=Traduci in query hibernate @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Solo elementi abilitati PageCertDefinition.stagesDefinition=Definizione Fasi PageCertDefinitions.message.deleteDefinitionPerformed.success=La definizione è stata cancellata con successo. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Impossibile eliminare la definizione della campagna. +PageCertDefinitions.message.createCampaignPerformed.warning=La definizione '{0}' è per le campagne ad-hoc che non possono essere avviate manualmente. PageCert.in=in {0} PageCert.message.assignment={0} di {1} {2} a {3} {4}. PageCert.message.textAdministrativeState=Stato amministrativo: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Aggiungi definizione fase StageDefinitionPanel.moveStageLeftButton = Sposta a sinistra StageDefinitionPanel.moveStageRightButton = Sposta a destra StageDefinitionPanel.deleteStageButton = Elimina questa fase +PageBase.message.parseObject.fatalError=Impossibile analizzare l'oggetto: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Impossibile caricare la configurazione del sistema. +PageBase.message.loadDeploymentInformationType.fatalError=Impossibile caricare le informazioni di deploy. +PageBase.message.getAdministratorPrivileged.fatalError=Impossibile ottenere l'utente amministratore: {0} PageContacts.title=Browser contatti pageContentAccounts.button.searchButton=Ricerca pageContentAccounts.dialog.title.confirmDelete=Elimina conferma @@ -1814,7 +1837,7 @@ PageLogging.title=Logging Management PageLogin.forgetPassword=Password dimenticata pageLogin.message.ForgetPasswordSettingsWrong=Le impostazioni delle password dimenticate sono errate. Si prega di contattare l'amministratore per cambiare la password. PageLogin.password=Password -PageLogin.signIn=Registrati +PageLogin.signIn=Login PageLogin.title=Accedi PageLogin.username=Username PageMyPasswordQuestions.title=Domande sulla mia password @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Vuoi veramente {0} il t pageTasks.message.confirmationMessageForMultipleTaskObject=Vuoi veramente {0} i {1} task selezionati? pageTasks.message.confirmationMessageForSingleNodeObject=Vuoi veramente {0} il nodo '{1}'? pageTasks.message.confirmationMessageForMultipleNodeObject=Vuoi veramente {0} i {1} nodi selezionati? +pageTasks.message.resumeTasksPerformed.success=I task sono stati ripresi con successo. +pageTasks.message.resumeTasksPerformed.fatalError=Impossibile riprendere l'esecuzione del compito(i) +pageTasks.message.synchronizeTasksPerformed.fatalError=Impossibile sincronizzare i task +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Errore nella gestione dello schema pageTask.scheduleHelp=Per i task una tantum, non inserire né l'intervallo di pianificazione né le specifiche di tipo cron. Per task ricorrenti, inserisci esattamente uno di questi. pageTask.scheduleInterval=Intervallo di pianificazione (secondi) pageTask.scheduleTitle=Pianificazione @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Richiesto da: pageWorkItem.requestedOn=Richiesto su: pageWorkItem.requester.description=Richiedente pageWorkItem.requestSpecific.description=La tua decisione -webComponentUtil.message.createMenuItemsFromActions.warning=Non ci sono oggetti su cui eseguire l'azione +WebComponentUtil.message.createMenuItemsFromActions.warning=Non ci sono oggetti su cui eseguire l'azione +WebComponentUtil.message.refreshResourceSchema.fatalError=Errore nell'aggiornamento dello schema della risorsa +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Impossibile caricare i ruoli disponibili WebComponentUtil.formatDurationWordsForLocal.seconds=secondi WebComponentUtil.formatDurationWordsForLocal.minutes=minuti WebComponentUtil.formatDurationWordsForLocal.hours=ore @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=Richieste correlate workItemPanel.reasons=Motivi per il processo di approvazione workItemPanel.approverComment=Commento approvatore workItemPanel.approverInstruction=Istruzioni per l'approvatore +PageTaskController.message.deleteSyncTokenPerformed.warning=Il token non è presente in questo task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Impossibile eliminare il token di sincronizzazione dal task. pageWorkItems.button.back=Indietro pageWorkItems.button.approve=Approva pageWorkItems.button.claim=Rivendicazione @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Stato pageWorkItems.message.noItemSelected=Nessun elemento di lavoro selezionato. pageWorkItems.message.noItemToBeReleased=Nessuno degli elementi di lavoro può essere rilasciato (molto probabilmente perché non sono stati rivendicati dall'utente). pageWorkItems.message.success.approved=Gli elementi di lavoro sono stati approvati con successo. +pageWorkItems.message.partialError.approved=Impossibile approvare/rifiutare l'elemento di lavoro a causa di un'eccezione imprevista. pageWorkItems.message.success.rejected=Gli elementi di lavoro sono stati respinti con successo. pageWorkItems.message.success.claimed=Gli elementi di lavoro sono stati rivendicati con successo. +pageWorkItems.message.partialError.claimed=Impossibile richiedere l'elemento di lavoro a causa di un'eccezione imprevista. pageWorkItems.message.success.released={0} elementi di lavoro sono stati rilasciati correttamente. +pageWorkItems.message.partialError.released=Impossibile rilasciare l'oggetto di lavoro a causa di un'eccezione imprevista. PageWorkItemsAll.title=Tutti gli elementi di lavoro PageWorkItemsAllocatedToMe.title=Elementi di lavoro assegnati a me PageWorkItem.title=Dettagli elemento di lavoro @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Scarica ReconciliationPopupPanel.resource=Risorsa ReconciliationPopupPanel.title.basic=Configurazione del report di riconciliazione di base repeater.input.nullValid=Scegline uno +RepoInitialSetup.message.init.fatalError=post-Inizializzazione repository non riuscita. ReportConfigurationPanel.title.basic=Di base ReportConfigurationPanel.title.advanced=Avanzate Requestable.ALL=Tutti @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Pattern tollerante ResourceAttributeEditor.message.cantParseSchema=Impossibile analizzare (parsing) lo schema delle risorse ResourceAttributeEditor.title.delete=Elimina ResourceAttributeEditor.title.edit=Modifica +ResourceContentPanel.message.importResourceObject.warning=Non è stato selezionato alcun elemento da importare +ResourceContentPanel.message.importResourceObject.partialError=Impossibile importare l'account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Non è statoi selezionato alcun elemento per cui aggiornare lo stato +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Impossibile aggiornare lo stato (su {0}) per {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nessun elemento selezionato da eiiminare ResourceCredentialsEditor.label=Modifica credenziali della risorsa ResourceCredentialsEditor.label.fetchStrategy=Strategia di Fetch ResourceCredentialsEditor.label.inbound=In entrata @@ -3261,6 +3301,7 @@ type.nullValid=Scegline uno Type.RECONCILIATION=Riconciliazione typeSelect.null=Tutti i ruoli Type.USERS=Utente +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Impossibile caricare i ruoli disponibili UploadPanel.delete.tooltip=Rimuovi file UploadPanel.message.help=Seleziona file da importare. UploadPanel.message.removeError=il file non è stato rimosso. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Domande di sicurezza UserMenuPanel.editProfile=Modifica profilo UserMenuPanel.logout=Esci UserMenuPanel.resetPasswords=Reset password +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Impossibile caricare la policy di sicurezza del sistema {0} UserOrgReferenceChoosePanel.type.org=Unità Organizzativa UserOrgReferenceChoosePanel.type=Tipo di proprietario UserOrgReferenceChoosePanel.type.user=Utente @@ -3302,6 +3344,11 @@ user.noOrgs=Nessuna organizzazione validFromFetchStrategy.nullValid=Scegline uno validToFetchStrategy.nullValid=Scegline uno valueAttribute.nullValid=Scegline uno +WebModelUtils.couldntRunTask=Impossibile eseguire il task {0} +WebModelUtils.couldntLoadPasswordPolicies=Impossibile caricare la password policy. +WebModelUtils.couldntAssumePowerAttorney=Non potrai assumere la delega +WebModelUtils.couldntDropPowerAttorney=Non è possibile eliminare la delega +WebModelUtils.couldntLoadSystemConfiguration=Impossibile caricare la configurazione del sistema. WebModelUtils.couldntLoadObject=Impossibile caricare l'oggetto. WebModelUtils.couldntSaveObject=Impossibile salvare l'oggetto. WebModelUtils.couldntSearchObjects=Impossibile ricercare gli oggetti. @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=Annulla PageAssignmentConflicts.title=Conflitti delle abilitazioni PageAssignmentConflicts.back=Indietro PageAssignmentConflicts.submit=Invia +PageAssignmentsList.conflictsWarning=Impossibile calcolare i conflitti di assegnazione a causa di un problema di autorizzazione. Causa: AbstractShoppingCartTabPanel.addAllButton=Aggiungi tutto AbstractShoppingCartTabPanel.requestingForLabel=Richiesto per AbstractShoppingCartTabPanel.availableRelationsLabel=Relazioni disponibili @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Impossibile ottenere l'elemento di lavo CsvDownloadButtonPanel.export=Esporta CSV CsvDownloadButtonPanel.confirmationMessage=La dimensione di esportazione CSV è limitata a {0} voci. Continua? AssignmentEditorDto.policyRuleTitle=Regola della Policy +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Si è verificata un'eccezione durante il caricamento dell'attributo di assegnazione. +AssignmentEditorDto.message.getReference.fatalError=Impossibile ottenere il riferimento alla risorsa di costruzione dell'account. AssignmentDataTablePanel.targetColumnName=Target AssignmentDataTablePanel.validityColumnName=Validità AssignmentDataTablePanel.organizationColumnName=Organizzazione @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=Nuova azione di notifica dell'el ResourceObjectAssociationType.details.newValue=Nuova associazione oggetto risorsa ResourceAttributeDefinitionType.details.newValue=Definizione di un nuovo attributo della risorsa MappingType.details.newValue=Nuovo mapping +FullTextSearchIndexedItemsConfigurationType.details.newValue=Nuovi oggetti indicizzati per la ricerca a testo completo objectState.details=Stato oggetto assignmentState.details=Stato assegnazione hasAssignment.details=Ha una assegnazione diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_ja.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_ja.properties index 91d405c1702..5bb05bd13ee 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_ja.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_ja.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=ターゲット AssignmentEditorPanel.tenantRef=テナント AssignmentEditorPanel.undefined=未定義 AssignmentEditorPanel.metadataBlock={0} メタデータ +AssignmentEditorPanel.message.loadAttributes.fatalError=割当て属性読み込み中に例外が発生しました。 +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=アクティベーション AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=キャンセル @@ -252,6 +254,7 @@ contentPanel.accounts=コンテンツ contentPanel.entitlements=エンタイトルメント CountToolbar.label={2,number,integer} の {0,number,integer} から {1,number,integer} CountToolbar.noFound=該当する結果がありません +DataLanguagePanel.message.onStateChanged.fatalError=言語を変更できませんでした。 DateValidator.message.fromAfterTo=開始日の日付が終了日よりも後になっています DebugButtonPanel.button.delete=削除 DebugButtonPanel.button.export=出力 @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=情報 fetchStrategy.nullValid=1つを選択 filter.duplicate=名前が'{0}'のフィルターが既に定義されています filter.emptyFilter=フィルターは空にできません +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=利用可能なロールをロードできませんでした H3Header.label.error=エラー H3Header.showMore=詳細表示 HandlerUriActions.ACTION_ADD_FOCUS=フォーカスの追加 @@ -566,6 +570,7 @@ Message.SourceMemory=メモリ中のタスク (フェッチ済 {0}) Message.SourceRepository=リポジトリ({0}に更新された統計) message.success=回答の更新に成功しました message.WrongAnswer=質問の答えが正しくありません +ModelInitialSetup.message.init.fatalError=モデルのポスト初期化に失敗しました。 ModelOperationStatusPanel.label.focusName=オブジェクト: ModelOperationStatusPanel.label.focusType=タイプ: ModelOperationStatusPanel.label.primaryDelta=プライマリ・デルタ: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=最小 NotificationsStatistics.TotalTime=合計時間 NotificationsStatistics.Transport=トランスポート nullValid=1つを選択 +ObjectDataProvider.message.listObjects.fatalError=オブジェクトを一覧表示できませんでした +ObjectDataProvider.message.countObjects.fatalError=オブジェクトを数えられませんでした。 +ObjectDataProvider.message.loadResourceForAccount.fatalError=アカウントのリソースをロードできませんでした。 +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=編集 objectPolicyConfigurationEditor.label=オブジェクトポリシー objectPolicyConfigurationEditor.name.placeholder=オブジェクトポリシーの挿入 @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=プロパティパスの挿入 ObjectPolicyDialog.subtype=オブジェクトサブタイプ ObjectPolicyDialog.template=オブジェクト・テンプレート ObjectPolicyDialog.type=オブジェクトタイプ +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=設定プロパティの抑制をスキップし、パスが定義されませんでした。 ObjectPolicyConfigurationTabPanel.type=タイプ ObjectPolicyConfigurationTabPanel.subtype=サブタイプ ObjectPolicyConfigurationTabPanel.objectTemplate=オブジェクト・テンプレート @@ -844,7 +854,7 @@ operation.com.evolveum.midpoint.web.page.admin.configuration.PageDebugView.loadO operation.com.evolveum.midpoint.web.page.admin.configuration.PageDebugView.saveObject=オブジェクトの保存(Gui) operation.com.evolveum.midpoint.web.page.admin.configuration.PageImportObject.importFile=ファイルのインポート(Gui) operation.com.evolveum.midpoint.web.page.admin.configuration.PageImportObject.importXml=xmlのインポート(Gui) -operation.com.evolveum.midpoint.web.page.admin.configuration.PageInternals.changeTime=時間の作成(Gui) +operation.com.evolveum.midpoint.web.page.admin.configuration.PageInternals.changeTime=時間の変更(Gui) operation.com.evolveum.midpoint.web.page.admin.configuration.PageInternals.changeTimeReset=時間の変更 - リセット(Gui) operation.com.evolveum.midpoint.web.page.admin.configuration.PageLogging.loadLoggingConfiguration=ログ設定のロード(Gui) operation.com.evolveum.midpoint.web.page.admin.configuration.PageLogging.updateLoggingConfiguration=ログ設定の更新(Gui) @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=新規システム設定 PageAdminObjectDetails.title.editSystemConfigurationType=システム設定の編集 PageAdminObjectDetails.noChangesSave=保存される変更はありませんでした。 PageAdminObjectDetails.noChangesPreview=プレビューされる変更はありません。 +PageAdminObjectDetails.message.loadParentOrgs.warning=親組織 {0} をロードできません pageAdminFocus.basic=基本情報 pageAdminFocus.message.cantEditFocus=不明なエラーが発生しました。フォーカスオブジェクトを編集できません。 pageAdminFocus.message.cantNewFocus=不明なエラーが発生しました。新規フォーカスオブジェクトを作成できません。 @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=開始 PageBulkAction.message.emptyString=挿入された一括処理が空です。空でないスクリプトを提供してください。 PageBulkAction.options=オプション PageBulkAction.title=ユーザー・バルク・アクション +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=アクションが実行されました。 返された{0}つのアイテム。コンソールとデータの出力は、 'XMLにエクスポート'機能で利用できます。 +PageBulkAction.message.startPerformed.fatalError.execute=バルク・アクションを実行できませんでした +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=バルク・アクション・オブジェクトを解析できませんでした +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=リポジトリ・クエリー PageRepositoryQuery.button.translateAndExecute=翻訳と実行 PageRepositoryQuery.button.translate=Hibernateクエリーへの翻訳 @@ -1364,7 +1382,7 @@ PageCertCampaigns.table.stage=ステージ PageCertCampaigns.table.iteration=反復 PageCertCampaigns.table.state=状態 PageCertCampaigns.search.state=状態 -PageCertCampaign.stageTime=Stage time +PageCertCampaign.stageTime=ステージ時間 PageCertCampaign.escalationLevel=エスカレーション・レベル PageCertCampaign.statistics.accept=承諾 PageCertCampaign.statistics.delegate=委任 @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=有効なアイテムのみ PageCertDefinition.stagesDefinition=ステージ定義 PageCertDefinitions.message.deleteDefinitionPerformed.success=定義が正常に削除されました。 PageCertDefinitions.message.deleteDefinitionPerformed.partialError=キャンペーン定義を削除できませんでした。 +PageCertDefinitions.message.createCampaignPerformed.warning=定義 '{0}'は、アドホック・キャンペーンのため手動で開始できません。 PageCert.in={0} 内 PageCert.message.assignment={0} of {1} {2} to {3} {4}. PageCert.message.textAdministrativeState=Administrative state: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = ステージの定義を追加する StageDefinitionPanel.moveStageLeftButton = 左に移動 StageDefinitionPanel.moveStageRightButton = 右に移動 StageDefinitionPanel.deleteStageButton = このステージを削除する +PageBase.message.parseObject.fatalError=オブジェクト {0} を解析できませんでした +PageBase.message.loadAdminGuiConfiguration.fatalError=システム設定をロードできませんでした。 +PageBase.message.loadDeploymentInformationType.fatalError=デプロイメント情報をロードできませんでした。 +PageBase.message.getAdministratorPrivileged.fatalError=管理者ユーザーを取得できませんでした:{0} PageContacts.title=Contacts browser pageContentAccounts.button.searchButton=検索 pageContentAccounts.dialog.title.confirmDelete=確認の削除 @@ -1705,7 +1728,7 @@ pageImportObject.message.emptyXml=空のxmlは保存できません。 PageImportObject.message.help=インポートするXML,JSONまたはYAML形式のファイルを選択してください。 pageImportObject.message.nullFile=アップロードされたファイルがnullです。 PageImportObject.title=オブジェクトのインポート -PageInternals.button.changeTime=時刻を変更 +PageInternals.button.changeTime=時間を変更 PageInternals.button.resetTimeChange=システム時間を使用してリセット PageInternals.consistencyChecks=一貫性をチェックする PageInternals.encryptionChecks=暗号化をチェックする @@ -1717,7 +1740,7 @@ PageInternals.offset=オフセット PageInternals.title.debugUtil=デバッグ・ユーティリティ PageInternals.title.internalsConfig=内部設定 PageInternals.title=内部設定 -PageInternals.title.timeChange=時刻変更 +PageInternals.title.timeChange=時間変更 PageInternals.tolerateUndeclaredPrefixes=QNamesとパスで宣言されていない接頭辞を許容する PageInternals.title.counters=パフォーマンス・カウンター PageInternals.title.traces=Performance traces @@ -1794,7 +1817,7 @@ pageLogging.loggers=ロガー pageLogging.loggersTable=ロガー・テーブル pageLogging.logger.TASKMANAGER=タスク・マネージャー・ロガー pageLogging.logger.WORKFLOWS=ワークフロー・モジュール・ロガー -pageLogging.logSubsystemEntryExit=Log subsystem entry/exit +pageLogging.logSubsystemEntryExit=ログ・サブシステムの登録/終了 pageLogging.performanceStatistics=パフォーマンス統計: pageLogging.profiling=プロファイリング pageLogging.requestFilter=リクエスト・フィルター: @@ -2211,8 +2234,8 @@ pageTask.recurring=定期的なタスク pageTask.runUntilNodeDown.error1='スレッド停止アクション'の対応データは、終了かサスペンド pageTask.runUntilNodeDown.error2='スレッド停止アクション'の対応データは、再起動、再スケジュール pageTask.runUntilNodeDown=ノードが停止するまでのみ実行 -pageTasks.alreadyPassed=already passed -pageTasks.alreadyPassedForNotRunningTasks=(already passed) +pageTasks.alreadyPassed=既に過ぎ去った +pageTasks.alreadyPassedForNotRunningTasks=(既に過ぎ去った) pageTasks.button.deactivateServiceThreads=すべてのスレッドを停止 pageTasks.button.deleteNode=削除 pageTasks.button.deleteTask=削除 @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=本当にタスク'{1}' pageTasks.message.confirmationMessageForMultipleTaskObject=本当に選択された{1}個のタスクを{0}しますか? pageTasks.message.confirmationMessageForSingleNodeObject=本当にノード'{1}'を{0}しますか? pageTasks.message.confirmationMessageForMultipleNodeObject=本当に選択された{1}個のノードを{0}しますか? +pageTasks.message.resumeTasksPerformed.success=タスクが正常に再開されました。 +pageTasks.message.resumeTasksPerformed.fatalError=タスクを再開できませんでした +pageTasks.message.synchronizeTasksPerformed.fatalError=タスクを同期できませんでした +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=ワンタイムタスクの場合、スケジュール間隔もCron-like仕様も入力しないでください。繰り返しタスクの場合は、これらのうちの1つを正確に入力します。 pageTask.scheduleInterval=スケジュール間隔(秒) pageTask.scheduleTitle=スケジューリング @@ -2377,7 +2404,7 @@ pageUser.message.couldntCreateAccountNoSchema=Couldn't create account form for ' pageUser.message.deleteAccountConfirm=本当に{0}個のアカウントを削除しますか? pageUser.message.deleteAssignmentConfirm=本当に{0}アサインを削除しますか? pageUser.message.deleteAssignmentRowConfirm=本当にアサイン{0}を削除しますか? -pageUser.message.illegalAccountState=Illegal account state '{0}'. +pageUser.message.illegalAccountState=不正なアカウント状態 '{0}'です。 pageUser.message.illegalAssignmentState=不正な割当状態 '{0}'です。 pageUser.message.noAccountSelected=アカウントが選択されていません。 pageUser.message.noActivationFound=No activation found for account '{0}'. @@ -2387,7 +2414,7 @@ pageUser.message.noAssignmentSelected=割当が選択されていません。 pageUser.message.noEnabledPropertyFound=アカウント '{0}'の有効なプロパティが見つかりませんでした。 pageUser.message.noPassword=パスワードが入力されていません。 pageUser.message.noResourceSelected=リソースが選択されていません。 -pageUser.message.noUserName=It is not possible to compute assignments on unnamed user object. Please provide a name. +pageUser.message.noUserName=名前のないユーザー・オブジェクトの割当てを計算することはできません。 名前を入力してください。 pageUser.message.unsupportedState=サポートされていないユーザー・フォームの状態 '{0}'。 pageUsers.accounts=アカウント pageUsers.dialog.title.confirmDelete=削除の確認 @@ -2475,12 +2502,12 @@ PageValuePolicy.button.back=戻る PageValuePolicy.button.save=保存 PageValuePolicy.basic= 基本情報 pageWorkItem.accordionLabel.additionalData=関連データ(技術情報) -pageWorkItem.accordionLabel.objectNew=Object after proposed change (technical information) +pageWorkItem.accordionLabel.objectNew=提案された変更後のオブジェクト(技術情報) pageWorkItem.accordionLabel.objectOld=変更前のオブジェクト(技術情報) pageWorkItem.accordionLabel.processInstance=プロセスインスタンス情報 pageWorkItem.accordionLabel.requester=リクエスター(技術情報) pageWorkItem.additionalData.description=関連するデータ -pageWorkItem.additionalInfo=Supplementary information +pageWorkItem.additionalInfo=補足情報 pageWorkItem.button.approve=承認 pageWorkItem.button.cancel=戻る pageWorkItem.button.claim=クレーム @@ -2491,7 +2518,7 @@ pageWorkItem.delta=承認待ちのデルタ pageWorkItem.description=作業アイテム pageWorkItem.label.showTechnicalInformation=技術情報の表示 pageWorkItem.mainInfo=基本情報 -pageWorkItem.objectNew.description=Object after proposed change +pageWorkItem.objectNew.description=提案された変更後のオブジェクト pageWorkItem.objectOld.description=変更前のオブジェクト pageWorkItem.options=オプション pageWorkItem.requestCommon.description=リクエストに関する一般情報 @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=申請者: pageWorkItem.requestedOn=申請日時: pageWorkItem.requester.description=要求者 pageWorkItem.requestSpecific.description=決定 -webComponentUtil.message.createMenuItemsFromActions.warning=アクションを実行するオブジェクトはありません +WebComponentUtil.message.createMenuItemsFromActions.warning=アクションを実行するオブジェクトはありません +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=利用可能なロールをロードできませんでした WebComponentUtil.formatDurationWordsForLocal.seconds=秒 WebComponentUtil.formatDurationWordsForLocal.minutes=分 WebComponentUtil.formatDurationWordsForLocal.hours=時 @@ -2511,7 +2540,7 @@ WebComponentUtil.formatDurationWordsForLocal.day=日 workItemPanel.originallyAllocatedTo=Originally allocated to: workItemPanel.currentlyAllocatedTo=Currently allocated to: workItemPanel.candidateActors=候補者 -workItemPanel.stage=Approval stage: +workItemPanel.stage=承認ステージ: workItemPanel.escalationLevel=エスカレーション・レベル: workItemPanel.requesterComment=リクエスト・コメント workItemPanel.delta=承認待ちのデルタ @@ -2553,12 +2582,14 @@ workItemPanel.relatedRequests=関連するリクエスト workItemPanel.reasons=承認プロセスの理由 workItemPanel.approverComment=承認者のコメント workItemPanel.approverInstruction=承認者の指示 +PageTaskController.message.deleteSyncTokenPerformed.warning=トークンはこのタスクには存在しません。 +PageTaskController.message.deleteSyncTokenPerformed.fatalError=タスクから同期トークンを削除できませんでした。 pageWorkItems.button.back=戻る pageWorkItems.button.approve=承認 pageWorkItems.button.claim=クレーム pageWorkItems.button.reject=却下 pageWorkItems.button.release=リリース -PageWorkItemsClaimable.title=Work items claimable by me +PageWorkItemsClaimable.title=私の主張する作業アイテム pageWorkItems.item.created=Created on pageWorkItems.item.name=名前 pageWorkItems.item.owner=オーナー @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=ステータス pageWorkItems.message.noItemSelected=作業項目が選択されていません。 pageWorkItems.message.noItemToBeReleased=どの業務アイテムもリリースすることはできません(おそらく、ユーザーによって要求されていないためです)。 pageWorkItems.message.success.approved=業務アイテムが正常に承認されました。 +pageWorkItems.message.partialError.approved=予期しない例外のために作業アイテムを承認/却下できませんでした。 pageWorkItems.message.success.rejected=業務アイテムが正常に拒否されました。 pageWorkItems.message.success.claimed=業務アイテムが正常に要求されました。 +pageWorkItems.message.partialError.claimed=予期しない例外のために作業アイテムを請求できませんでした。 pageWorkItems.message.success.released={0}個の業務アイテムが正常にリリースされました。 +pageWorkItems.message.partialError.released=予期しない例外のために作業アイテムを解放できませんでした。 PageWorkItemsAll.title=すべての作業アイテム PageWorkItemsAllocatedToMe.title=私に割当てられた業務アイテム PageWorkItem.title= 業務アイテム詳細 @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=最大 ProvisioningStatistics.MinTime=最小 ProvisioningStatistics.ObjectClass=オブジェクトクラス ProvisioningStatistics.OtherFailure=失敗 -ProvisioningStatistics.OtherSuccess=スクリプトOK +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=リソース ProvisioningStatistics.ScriptFailure=失敗 ProvisioningStatistics.ScriptSuccess=スクリプトOK @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=ダウンロード ReconciliationPopupPanel.resource=リソース ReconciliationPopupPanel.title.basic=基本的なリコンシリエーションレポート設定 repeater.input.nullValid=1つを選択 +RepoInitialSetup.message.init.fatalError=リポジトリのポスト初期化に失敗しました。 ReportConfigurationPanel.title.basic=基本情報 ReportConfigurationPanel.title.advanced=高度 Requestable.ALL=すべて @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Tolerant pattern ResourceAttributeEditor.message.cantParseSchema=リソーススキーマを解析できませんでした ResourceAttributeEditor.title.delete=削除 ResourceAttributeEditor.title.edit=編集 +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=アカウント {0} をインポートできませんでした +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError={1}のステータスを{0}に更新できませんでした +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=リソース・クレデンシャルの編集 ResourceCredentialsEditor.label.fetchStrategy=フェッチ・ストラテジー ResourceCredentialsEditor.label.inbound=インバウンド @@ -2833,7 +2873,7 @@ SchemaHandlingStep.association.label.associationNamespace=名前空間 SchemaHandlingStep.association.tooltip.associationAttribute=Name of the attribute that "holds" the association. I.e. an attribute which contains the identifier of the associated object. This is usually an attribute such as "member", "groups", "roles", etc. In subject-to-object associations this is an attribute of a subject (e.g. account attribute "groups"). In object-to-subject associations this is an attribute of an object (e.g. group attribute "members"). SchemaHandlingStep.association.tooltip.associationLocalPart=TODO: SchemaHandlingStep.association.tooltip.associationLocalPart SchemaHandlingStep.association.tooltip.associationNamespace=TODO: SchemaHandlingStep.association.tooltip.associationNamespace -SchemaHandlingStep.association.tooltip.direction=Defines the direction of the association. Object-to-subject: Object (e.g. group) has an attribute that contains identifier of the subject (e.g. account); Subject-to-object: Subject (e.g. account) has an attribute that contains identifier of the object (e.g. group). +SchemaHandlingStep.association.tooltip.direction=アソシエーションの方向を定義します。 オブジェクト対サブジェクト:オブジェクト(例えば、グループ)は、サブジェクト(例えば、アカウント)の識別子を含む属性を有する。 サブジェクトからオブジェクトへ:サブジェクト(例えば、アカウント)には、オブジェクトの識別子(グループなど)を含む属性があります。 SchemaHandlingStep.association.tooltip.explicitRefIntegrity=Explicit referential integrity. If set to false then system assumes that the resource implements referential integrity. E.g. system assumes that the resource automatically updates the association identifiers if an account is renamed and system does not need to do anything. If set to true then system will do referential integrity explicitly. In this case system will explicitly update the association attributes if an account is renamed. SchemaHandlingStep.association.tooltip.intent=Intent of the association target object type. Target kind and intent identify an object type which is association target, e.g. a group, privilege, role, etc. SchemaHandlingStep.association.tooltip.kind=Kind of the association target object type. This is usually "entitlement". Target kind and intent identify an object type which is association target, e.g. a group, privilege, role, etc. @@ -3261,6 +3301,7 @@ type.nullValid=1つを選択 Type.RECONCILIATION=リコンシリエーション typeSelect.null=すべてのロール Type.USERS=ユーザー +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=利用可能なロールをロードできませんでした UploadPanel.delete.tooltip=ファイルの削除 UploadPanel.message.help=インポートするファイルを選択してください。 UploadPanel.message.removeError=ファイルは削除されませんでした。 @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=セキュリティに関する質問 UserMenuPanel.editProfile=プロファイルの編集 UserMenuPanel.logout=ログアウト UserMenuPanel.resetPasswords=パスワードのリセット +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=システム・セキュリティ・ポリシー{0}をロードできませんでした UserOrgReferenceChoosePanel.type.org=組織ユニット UserOrgReferenceChoosePanel.type=オーナータイプ UserOrgReferenceChoosePanel.type.user=ユーザー @@ -3302,6 +3344,11 @@ user.noOrgs=組織がありません validFromFetchStrategy.nullValid=1つを選択 validToFetchStrategy.nullValid=1つを選択 valueAttribute.nullValid=1つを選択 +WebModelUtils.couldntRunTask=タスク {0} を起動できませんでした +WebModelUtils.couldntLoadPasswordPolicies=パスワード・ポリシーをロードできませんでした。 +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=システム設定をロードできませんでした。 WebModelUtils.couldntLoadObject=オブジェクトをロードできませんでした。 WebModelUtils.couldntSaveObject=オブジェクトを保存できませんでした。 WebModelUtils.couldntSearchObjects=オブジェクトを検索できませんでした。 @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=元に戻す PageAssignmentConflicts.title=アサイン競合 PageAssignmentConflicts.back=戻る PageAssignmentConflicts.submit=送信 +PageAssignmentsList.conflictsWarning=権限の問題による割当ての競合を計算できません。 理由: AbstractShoppingCartTabPanel.addAllButton=すべて追加 AbstractShoppingCartTabPanel.requestingForLabel=要求の対象 AbstractShoppingCartTabPanel.availableRelationsLabel=Available relations @@ -3897,15 +3945,15 @@ PageAuditLogDetails.deltaKey=デルタ一覧 ObjectDeltaOperationType.resourceName=リソース名 ObjectDeltaOperationType.objectName=オブジェクト名 ObjectDeltaOperationType.executionResult=実行結果 -PageMergeObjects.noMergeResultObjectWarning=Merge preview object wasn't found +PageMergeObjects.noMergeResultObjectWarning=マージ・プレビュー・オブジェクトが見つかりませんでした PageMergeObjects.title=オブジェクトのマージ -PageMergeObjects.tabTitle=Merge preview -PageMergeObjects.switchDirectionButton=Switch direction +PageMergeObjects.tabTitle=マージ・プレビュー +PageMergeObjects.switchDirectionButton=マージ方向の切り替え PageMergeObjects.mergeButton=マージ PageMergeObjects.mergeDeltaPreviewButton=Merge delta preview PageMergeObjects.backButton=戻る -PageMergeObjects.mergeType=Merge type -MergeObjectsPanel.switchDirection=Switch direction +PageMergeObjects.mergeType=マージ・タイプ +MergeObjectsPanel.switchDirection=マージ方向の切り替え MergeType.DEFAULT=デフォルト MergeType.EXPRESSION=式 MergeType.ALL_RIGHT=allRight @@ -3917,7 +3965,7 @@ PageSelfRegistration.register=登録 PageSelfRegistration.registration.success=登録が成功しました PageSelfRegistration.registration.error=登録に失敗しました:{0} PageSelfRegistration.registration.confirm.message=Congratulation! \n\n\n You have been successfully registered. To activate your account check your email and confirm your registration. -PageRegistrationConfirmation.confirmation.error=Failed to confirm your registration. We are sorry, but probably you'll need to contact system administrator. +PageRegistrationConfirmation.confirmation.error=登録の確認に失敗しました。 お手数ですがシステム管理者にお問い合わせください。 PageRegistrationConfirmation.continueToLogin=ログインページへ続ける PageRegistrationConfirmation.confirmation.successful=確認が成功しました PageSelfRegistration.title=登録 @@ -3943,13 +3991,13 @@ AbstractWorkItemType.originalAssigneeRef=Original Assignee AbstractWorkItemType.deadline=デッドライン AbstractWorkItemType.performerRef=Performer AbstractWorkItemType.closeTimestamp=終了 -PageUserHistory.title='{0}' historical data {1} -PageXmlDataReview.title=Historical data -PageXmlDataReview.aceEditorPanelTitle='{0}' historical xml data {1} +PageUserHistory.title='{0}'の履歴データ{1} +PageXmlDataReview.title=履歴データ +PageXmlDataReview.aceEditorPanelTitle='{0}'の履歴XMLデータ{1} PageLogin.selfRegistration=サインアップ -PageSelfRegistration.registration.failed.unsatisfied.registration.configuration=Registration process not allowed. Please contact system administrator. -ObjectHistoryTabPanel.viewHistoricalObjectDataTitle=View object data -ObjectHistoryTabPanel.viewHistoricalObjectXmlTitle=View object xml +PageSelfRegistration.registration.failed.unsatisfied.registration.configuration=登録プロセスは許可されていません。 システム管理者にお問い合わせください。 +ObjectHistoryTabPanel.viewHistoricalObjectDataTitle=オブジェクト・データを表示 +ObjectHistoryTabPanel.viewHistoricalObjectXmlTitle=オブジェクトXMLを表示 PageRegistrationConfirmation.bad.credentials=ユーザー名またはパスワードが無効です。 PageSelfRegistration.invalid.registration.link=登録リンクが無効です PageSelfRegistration.welcome.message=自己登録 @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=業務項目ケースを取得できま CsvDownloadButtonPanel.export=CSVエクスポート CsvDownloadButtonPanel.confirmationMessage=CSVエクスポートのサイズは {0} に制限されています。続けますか。 AssignmentEditorDto.policyRuleTitle=ポリシールール +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=割当て属性読み込み中に例外が発生しました。 +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=ターゲット AssignmentDataTablePanel.validityColumnName=有効性 AssignmentDataTablePanel.organizationColumnName=組織 @@ -4141,7 +4191,7 @@ CertCampaignStateFilter.IN_REVIEW_STAGE=レビュー・ステージ中 CertCampaignStateFilter.REVIEW_STAGE_DONE=レビュー・ステージ完了 CertCampaignStateFilter.IN_REMEDIATION=修復中 CertCampaignStateFilter.CLOSED=終了 -DisplayNamePanel.kindIntentLabel=Kind: {0}, Intent: {1} +DisplayNamePanel.kindIntentLabel=種類:{0}、用途:{1} PageUsersView.title=ユーザー表示 pageAdminFocus.dataProtection=データ保護 PageInternals.title.cache=キャッシュ @@ -4172,7 +4222,7 @@ abstractRoleMemberPanel.deleteAllMembersConfirmationLabel=本当に指定され abstractRoleMemberPanel.deleteSelectedMembersConfirmationLabel=本当に選択されたメンバーを削除しますか? abstractRoleMemberPanel.unassignAllMembersConfirmationLabel=本当に指定されたパラメーターを持つすべてのメンバーのアサインを解除しますか? abstractRoleMemberPanel.unassignSelectedMembersConfirmationLabel=本当にアサインを解除されたメンバーを削除しますか? -operation.Delete.ALL_DIRECT.members=Delete all direct members +operation.Delete.ALL_DIRECT.members=すべてのダイレクト・メンバーの削除 operation.Delete.SELECTED.members=選択されたメンバーの削除 relationDropDownChoicePanel.relation=リレーション relationDropDownChoicePanel.tooltip.relation=参照の関係。例えばデフォルト、承認者、マネージャー @@ -4208,11 +4258,12 @@ DashboardWidgetType.details.newValue=新規ダッシュボード・ウィジェ RelationDefinitionType.details.newValue=新規リレーション定義 GuiActionType.details.newValue=新規GUIアクション ApprovalStageDefinitionType.details.newValue=新規承認ステージ定義 -WorkItemTimedActionsType.details.newValue=New work item timed actions +WorkItemTimedActionsType.details.newValue=新規作業アイテムの時限式アクション WorkItemNotificationActionType.details.newValue=新規作業項目の通知アクション ResourceObjectAssociationType.details.newValue=新規リソース・オブジェクト・アソシエーション ResourceAttributeDefinitionType.details.newValue=新規リソース属性定義 MappingType.details.newValue=新規マッピング +FullTextSearchIndexedItemsConfigurationType.details.newValue=全文検索の新しいインデックス項目 objectState.details=オブジェクト状態 assignmentState.details=割当て状態 hasAssignment.details=割当て有り diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_lt.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_lt.properties index e8a617354fa..635729b920b 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_lt.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_lt.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Adresatas AssignmentEditorPanel.tenantRef=Paslaugos gavėjas (org.) AssignmentEditorPanel.undefined=Nenurodytas AssignmentEditorPanel.metadataBlock={0} Metaduomenys +AssignmentEditorPanel.message.loadAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=Aktyvacija AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=Atšaukti @@ -252,6 +254,7 @@ contentPanel.accounts=Turinys contentPanel.entitlements=Prieigos teisės CountToolbar.label={0,number,integer} iki {1,number,integer} iš {2,number,integer} CountToolbar.noFound=Nerasta atitikmenų +DataLanguagePanel.message.onStateChanged.fatalError=Couldn't change the language. DateValidator.message.fromAfterTo=Data 'Galioja nuo' turi būti ankstesnė nei data "Galioja iki". DebugButtonPanel.button.delete=Ištrinti DebugButtonPanel.button.export=Išspausdinti @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Informacija fetchStrategy.nullValid=Pasirinkite vieną filter.duplicate=Filtras '{0}' jau yra nurodytas filter.emptyFilter=Filtras negali buti tuščias +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles H3Header.label.error=Klaida H3Header.showMore=Rodyti daugiau HandlerUriActions.ACTION_ADD_FOCUS=Pridėti parinktajį objektą @@ -566,6 +570,7 @@ Message.SourceMemory=užduotis atmintyje (pasiimti {0}) Message.SourceRepository=Saugykla (statistika atnaujinta ant {0}) message.success=Jūsų atsakymai buvo atnaujinti sėkmingai message.WrongAnswer=Klausimai atsakyti neteisingai +ModelInitialSetup.message.init.fatalError=Model post initialization failed. ModelOperationStatusPanel.label.focusName=Objektas : ModelOperationStatusPanel.label.focusType=kurio tipas : ModelOperationStatusPanel.label.primaryDelta=Pirminis pokytis : @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Min NotificationsStatistics.TotalTime=Suminis laikas NotificationsStatistics.Transport=Pokytis nullValid=Pasirinkite vieną +ObjectDataProvider.message.listObjects.fatalError=Couldn't list objects +ObjectDataProvider.message.countObjects.fatalError=Nepavyko suskaičiuoti objektų. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Couldn't load resource for account. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=Redaguoti objectPolicyConfigurationEditor.label=Objektų taisyklės objectPolicyConfigurationEditor.name.placeholder=Įtraukti objekto politiką @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Nurodyti nustatymų lokaciją ObjectPolicyDialog.subtype=Objekto potipis ObjectPolicyDialog.template=Objekto šablonas ObjectPolicyDialog.type=Objekto tipas +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Skipping setting property constraint, no path was defined. ObjectPolicyConfigurationTabPanel.type=Tipas ObjectPolicyConfigurationTabPanel.subtype=Subtipas ObjectPolicyConfigurationTabPanel.objectTemplate=Objekto šablonas @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Sukurti naują sistemos PageAdminObjectDetails.title.editSystemConfigurationType=Keisti sistemos konfigūraciją PageAdminObjectDetails.noChangesSave=Nėra ką saugoti. PageAdminObjectDetails.noChangesPreview=Nėra pakeitimų, kuriuos būtų galima peržiūrėti. +PageAdminObjectDetails.message.loadParentOrgs.warning=Cannot load parent org {0} pageAdminFocus.basic=Pagrindai pageAdminFocus.message.cantEditFocus=Nežinoma klaida, nepavyko pakeisti parinktojo objekto. pageAdminFocus.message.cantNewFocus=Nežinoma klaida, nepavyko sukurti naujo parinktojo objekto. @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Į pradžią PageBulkAction.message.emptyString=Nenurodyti masinio veiksmo duomenys. Prašome pateikite ne tuščią scenarijų. PageBulkAction.options=Nustatymai PageBulkAction.title=Masiniai veiksmai su naudotojais +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=Action executed. Returned {0} item(s). Console and data output available via 'Export to XML' function. +PageBulkAction.message.startPerformed.fatalError.execute=Couldn't execute bulk action +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=Couldn't parse bulk action object +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=Užklausų saugyklos PageRepositoryQuery.button.translateAndExecute=Pritaikyti ir vykdyti PageRepositoryQuery.button.translate=Pakeisti užklausos būseną į "miegančią" @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Tik aktyvūs elementai PageCertDefinition.stagesDefinition=Etapo apibrėžtis PageCertDefinitions.message.deleteDefinitionPerformed.success=Apibrėžtis buvo sėkmingai ištrinta. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Nepavyko ištrinti operacijos apibrėžties. +PageCertDefinitions.message.createCampaignPerformed.warning=Definition '{0}' is for ad-hoc campaigns that cannot be started manually. PageCert.in={0} PageCert.message.assignment={0} iš {1} {2} iki {3} {4}. PageCert.message.textAdministrativeState=Administracinė būsena : {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Pridėti etapo apibrėžtį StageDefinitionPanel.moveStageLeftButton = Į kairę StageDefinitionPanel.moveStageRightButton = Į dešinę StageDefinitionPanel.deleteStageButton = Ištrinti šį etapą +PageBase.message.parseObject.fatalError=Couldn't parse object: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Couldn't load system configuration. +PageBase.message.loadDeploymentInformationType.fatalError=Couldn't load deployment information. +PageBase.message.getAdministratorPrivileged.fatalError=Couldn't get administrator user: {0} PageContacts.title=Kontaktų naršyklė pageContentAccounts.button.searchButton=Ieškoti pageContentAccounts.dialog.title.confirmDelete=Ištrinti patvirtinimą @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Ar tikrai norite {0} u pageTasks.message.confirmationMessageForMultipleTaskObject=Ar tikrai norite {0} pasirinktą(as) {1} užduotį(is)? pageTasks.message.confirmationMessageForSingleNodeObject=Ar tikrai norite {0} mazgą '{1}'? pageTasks.message.confirmationMessageForMultipleNodeObject=Ar tikrai norite {0} pasirinktą (us) {1} mazgą(us)? +pageTasks.message.resumeTasksPerformed.success=The task(s) have been successfully resumed. +pageTasks.message.resumeTasksPerformed.fatalError=Couldn't resume the task(s) +pageTasks.message.synchronizeTasksPerformed.fatalError=Couldn't synchronize tasks +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=Vienkartinėms užduotims nereikia nurodyti nei planavimo intervalo, nei cron tipo planuoklio. Pasikartojančioms užduotims nurodykite vieną iš jų. pageTask.scheduleInterval=Planavimo intervalas (sekundėmis) pageTask.scheduleTitle=Planavimas @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Prašoma: pageWorkItem.requestedOn=Prašoma: pageWorkItem.requester.description=Užklausos siuntėjas pageWorkItem.requestSpecific.description=Tavo sprendimas -webComponentUtil.message.createMenuItemsFromActions.warning=Nėra objektų, kuriuose būtų galima vykdyti veiksmus +WebComponentUtil.message.createMenuItemsFromActions.warning=Nėra objektų, kuriuose būtų galima vykdyti veiksmus +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Couldn't load available roles WebComponentUtil.formatDurationWordsForLocal.seconds=sekundės WebComponentUtil.formatDurationWordsForLocal.minutes=minutės WebComponentUtil.formatDurationWordsForLocal.hours=valandos @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=Susiję užklausos workItemPanel.reasons=Patvirtinimo proceso priežastys workItemPanel.approverComment=Tvirtinančiojo komentaras workItemPanel.approverInstruction=Tvirtinančiojo instrukcija +PageTaskController.message.deleteSyncTokenPerformed.warning=Token is not present in this task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Couldn't delete sync token from the task. pageWorkItems.button.back=Atgal pageWorkItems.button.approve=Patvirtinti pageWorkItems.button.claim=Reikalauti @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Statusas pageWorkItems.message.noItemSelected=Nepasirinktas nei vienas darbas. pageWorkItems.message.noItemToBeReleased=Negali būti paleistas nei vienas darbas (galimai todėl, kad naudotojas jo neprašė) pageWorkItems.message.success.approved=Darbas(ai) sėkmingai patvirtintas(i). +pageWorkItems.message.partialError.approved=Couldn't approve/reject work item due to an unexpected exception. pageWorkItems.message.success.rejected=Darbas(ai) sėkmingai atmestas(i). pageWorkItems.message.success.claimed=Darbas(ai) sėkmingai sukurtas(i). +pageWorkItems.message.partialError.claimed=Couldn't claim work item due to an unexpected exception. pageWorkItems.message.success.released={0} darbas(ai) sėkmėngai paleistas(i). +pageWorkItems.message.partialError.released=Couldn't release work item due to an unexpected exception. PageWorkItemsAll.title=Visi darbai PageWorkItemsAllocatedToMe.title=Man priskirti darbai PageWorkItem.title=Išsami informacija apie darbus @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=Maks. ProvisioningStatistics.MinTime=Min. ProvisioningStatistics.ObjectClass=Objekto klasė ProvisioningStatistics.OtherFailure=Nepavyko -ProvisioningStatistics.OtherSuccess=scenarijus OK +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Resursas ProvisioningStatistics.ScriptFailure=Nepavyko ProvisioningStatistics.ScriptSuccess=scenarijus OK @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Parsiųsti ReconciliationPopupPanel.resource=Resursas ReconciliationPopupPanel.title.basic=Pagrindinė ataskaitos konfigūracija repeater.input.nullValid=Pasirinkite vieną +RepoInitialSetup.message.init.fatalError=Repository post initialization failed. ReportConfigurationPanel.title.basic=Pagrindinė informacija ReportConfigurationPanel.title.advanced=Papildoma informacija Requestable.ALL=Visi @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Tinkamas šablonas ResourceAttributeEditor.message.cantParseSchema=Nepavyko išnagrinėti resurso schemos ResourceAttributeEditor.title.delete=Ištrinti ResourceAttributeEditor.title.edit=Redaguoti +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=Could not import account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Could not update status (to {0}) for {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=Redaguoti resursų prisijungimo duomenis ResourceCredentialsEditor.label.fetchStrategy=Pasiėmimo strategija ResourceCredentialsEditor.label.inbound=Įvestis @@ -3261,6 +3301,7 @@ type.nullValid=Pasirinkite vieną Type.RECONCILIATION=Suderinimas typeSelect.null=Visos rolės Type.USERS=Naudotojas +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles UploadPanel.delete.tooltip=Pašalinti failą UploadPanel.message.help=Pasirinkti failą importavimui. UploadPanel.message.removeError=Failas nebuvo pašalintas. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Saugos klausimas UserMenuPanel.editProfile=Profilio redagavimas UserMenuPanel.logout=Atsijungti UserMenuPanel.resetPasswords=Iš naujo nustatyti slaptažodį +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Couldn't load system security policy {0} UserOrgReferenceChoosePanel.type.org=Org. vienetas UserOrgReferenceChoosePanel.type=Savininko tipas UserOrgReferenceChoosePanel.type.user=Naudotojas @@ -3302,6 +3344,11 @@ user.noOrgs=Organizacija nepriskirta validFromFetchStrategy.nullValid=Pasirinkite vieną validToFetchStrategy.nullValid=Pasirinkite vieną valueAttribute.nullValid=Pasirinkite vieną +WebModelUtils.couldntRunTask=Couldn't run task {0} +WebModelUtils.couldntLoadPasswordPolicies=Couldn't load password policies. +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=Couldn't load system configuration. WebModelUtils.couldntLoadObject=Nepavyko įkelti objekto. WebModelUtils.couldntSaveObject=Nepavyko išsaugoti objekto. WebModelUtils.couldntSearchObjects=Nepavyko objekto paieškas. @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=Atšaukti PageAssignmentConflicts.title=Priskyrimų konfliktai PageAssignmentConflicts.back=Atgal PageAssignmentConflicts.submit=Pateikti +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: AbstractShoppingCartTabPanel.addAllButton=Pridėti visus AbstractShoppingCartTabPanel.requestingForLabel=Prašoma AbstractShoppingCartTabPanel.availableRelationsLabel=Galimi ryšiai @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Nepavyko gauti atvejo darbo. Jis galima CsvDownloadButtonPanel.export=CSV išspausdinimas CsvDownloadButtonPanel.confirmationMessage=CSV eksportavimo dydis yra apribotas iki {0}. Tęsti? AssignmentEditorDto.policyRuleTitle=Politikos taisyklės +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=Adresatas AssignmentDataTablePanel.validityColumnName=Galiojimas AssignmentDataTablePanel.organizationColumnName=Organizacija @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=Naujas pranešimo apie darbą ve ResourceObjectAssociationType.details.newValue=Nauja išteklių objekto asociacija ResourceAttributeDefinitionType.details.newValue=Naujo resurso atributo apibrėžtis MappingType.details.newValue=Naujas susiejimas +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=Objekto būsena assignmentState.details=Priskyrimo būsena hasAssignment.details=Turi priskyrimų diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_pl.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_pl.properties index 29d152b03e2..04fcf5eadef 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_pl.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_pl.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Cel AssignmentEditorPanel.tenantRef=Podmiot AssignmentEditorPanel.undefined=Niezdefiniowany AssignmentEditorPanel.metadataBlock={0} Metadane +AssignmentEditorPanel.message.loadAttributes.fatalError=Wystąpił wyjątek podczas wczytywania atrybutu przypisania. +AssignmentEditorPanel.message.getReference.fatalError=Nie można pobrać referencji systemu konstrukcji konta. AssignmentActivationPopupPanel.title=Aktywacja AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=Anuluj @@ -252,6 +254,7 @@ contentPanel.accounts=Zawartość contentPanel.entitlements=Uprawnienia CountToolbar.label={0,number,integer} do {1,number,integer} z {2,number,integer} CountToolbar.noFound=Nie znaleziono pasującego wyniku. +DataLanguagePanel.message.onStateChanged.fatalError=Nie można zmienić języka. DateValidator.message.fromAfterTo=Data "ważny przed" musi być wcześniejsza od daty "ważny do" DebugButtonPanel.button.delete=Usuń DebugButtonPanel.button.export=Eksport @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Informacja fetchStrategy.nullValid=Wybierz filter.duplicate=Filtr o nazwie '{0}' już istnieje filter.emptyFilter=Filtr nie może być pusty +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Nie można załadować dostępnych ról H3Header.label.error=Błąd H3Header.showMore=Pokaż więcej HandlerUriActions.ACTION_ADD_FOCUS=Dodaj fokus @@ -566,6 +570,7 @@ Message.SourceMemory=zadanie w pamięci (pobrano {0}) Message.SourceRepository=repozytorium (statystyki zaktualizowane o {0}) message.success=Twoje odpowiedzi zaktualizowano poprawnie message.WrongAnswer=Nie odpowiedziano poprawnie na pytania +ModelInitialSetup.message.init.fatalError=Post-inicjalizacja modelu nie powiodła się. ModelOperationStatusPanel.label.focusName=Obiekt: ModelOperationStatusPanel.label.focusType=typu: ModelOperationStatusPanel.label.primaryDelta=Główna delta: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Min NotificationsStatistics.TotalTime=Całkowity czas NotificationsStatistics.Transport=Transport nullValid=Wybierz +ObjectDataProvider.message.listObjects.fatalError=Nie można wyświetlić listy obiektów +ObjectDataProvider.message.countObjects.fatalError=Nie można policzyć obiektów. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Nie można załadować systemu dla konta. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Nie udało się pobrać lub zwizualizować delty: {0} objectPolicyConfigurationEditor.button.edit=Edycja objectPolicyConfigurationEditor.label=Polityki obiektu objectPolicyConfigurationEditor.name.placeholder=Podaj politykę obiektu @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Wprowadź ścieżkę właściwości ObjectPolicyDialog.subtype=Podtyp obiektu ObjectPolicyDialog.template=Szablon obiektu ObjectPolicyDialog.type=Typ obiektu +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Pomijam ustawienia ograniczenia właściwości, nie zdefiniowano ścieżki. ObjectPolicyConfigurationTabPanel.type=Typ ObjectPolicyConfigurationTabPanel.subtype=Podtyp ObjectPolicyConfigurationTabPanel.objectTemplate=Szablon obiektu @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Utwórz nową konfigurac PageAdminObjectDetails.title.editSystemConfigurationType=Edycja konfiguracji systemu PageAdminObjectDetails.noChangesSave=Brak zmian do zapisania. PageAdminObjectDetails.noChangesPreview=Brak zmian do podglądu. +PageAdminObjectDetails.message.loadParentOrgs.warning=Nie można wczytać nadrzędnej organizacji {0} pageAdminFocus.basic=Dane podstawowe pageAdminFocus.message.cantEditFocus=Wystąpił nieznany błąd, nie można edytować obiektu fokus. pageAdminFocus.message.cantNewFocus=Wystąpił nieznany błąd, nie można utworzyć obiektu fokus. @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Rozpocznij PageBulkAction.message.emptyString=Wprowadzone działania masowe są puste. Proszę podać skrypt który nie jest pusty. PageBulkAction.options=Opcje PageBulkAction.title=Działania masowe użytkownika +PageBulkAction.message.startPerformed.inProgress={0} zostało pomyślnie przekazane do wykonania +PageBulkAction.message.startPerformed.success=Akcja wykonana. Zwrócono {0} pozycji. Konsola i wyjście danych dostępne przy użyciu funkcji 'Eksport do XML'. +PageBulkAction.message.startPerformed.fatalError.execute=Nie można uruchomić działania masowego +PageBulkAction.message.startPerformed.fatalError.submit=Nie można przekazać działania masowego do wykonania +PageBulkAction.message.startPerformed.fatalError.parse=Nie można przeanalizować obiektu działania masowego +PageBulkAction.message.startPerformed.fatalError.provided=Nie podano obiektu działania masowego. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Podany tekst nie jest obiektem działania masowego. Oczekiwano instancji {0}; podałeś {1} zamiast tego. PageRepositoryQuery.title=Zapytanie repozytorium PageRepositoryQuery.button.translateAndExecute=Przetłumacz i wykonaj PageRepositoryQuery.button.translate=Przetłumacz na zapytanie hibernate @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Tylko aktywne pozycje PageCertDefinition.stagesDefinition=Definicja etapów PageCertDefinitions.message.deleteDefinitionPerformed.success=Definicja została poprawnie usunięta. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Nie można usunąć definicji kampanii. +PageCertDefinitions.message.createCampaignPerformed.warning=Definicja '{0}' jest dla kampanii ad-hoc które nie mogą być uruchamiane ręcznie. PageCert.in=w {0} PageCert.message.assignment={0} z {1} {2} do {3} {4}. PageCert.message.textAdministrativeState=Stan administracyjny: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Dodaj definicję etapu StageDefinitionPanel.moveStageLeftButton = Przesuń w lewo StageDefinitionPanel.moveStageRightButton = Przesuń w prawo StageDefinitionPanel.deleteStageButton = Usuń ten etap +PageBase.message.parseObject.fatalError=Nie można przeanalizować obiektu: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Nie udało się wczytać konfiguracji systemu. +PageBase.message.loadDeploymentInformationType.fatalError=Nie można wczytać informacji o wdrożeniu. +PageBase.message.getAdministratorPrivileged.fatalError=Nie można pobrać użytkownika administratora: {0} PageContacts.title=Przeglądarka kontaktów pageContentAccounts.button.searchButton=Wyszukiwanie pageContentAccounts.dialog.title.confirmDelete=Usuń potwierdzenie @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Naprawdę chcesz {0} za pageTasks.message.confirmationMessageForMultipleTaskObject=Naprawdę chcesz {0} zaznaczonych {1} zadań? pageTasks.message.confirmationMessageForSingleNodeObject=Naprawdę chcesz {0} noda '{1}'? pageTasks.message.confirmationMessageForMultipleNodeObject=Naprawdę chcesz {0} zaznaczonych {1} nod(ów)? +pageTasks.message.resumeTasksPerformed.success=Zadanie(a) zostało(y) poprawnie wznowione. +pageTasks.message.resumeTasksPerformed.fatalError=Nie można wznowić zadania (zadań) +pageTasks.message.synchronizeTasksPerformed.fatalError=Nie można zsynchronizować zadań +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Błąd związany ze schematem pageTask.scheduleHelp=Dla jednorazowych zadań nie ustawiaj ani częstotliwości uruchamiania ani harmonogramu w stylu crona. Dla powtarzalnych zadań ustaw dokładnie jedno z powyższych. pageTask.scheduleInterval=Częstotliwość uruchamiania (w sekundach) pageTask.scheduleTitle=Harmonogram @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Wnioskowane przez: pageWorkItem.requestedOn=Data wniosku: pageWorkItem.requester.description=Wnioskujący pageWorkItem.requestSpecific.description=Twoja decyzja -webComponentUtil.message.createMenuItemsFromActions.warning=Nie ma obiektów na których można wykonać działanie +WebComponentUtil.message.createMenuItemsFromActions.warning=Nie ma obiektów na których można wykonać działanie +WebComponentUtil.message.refreshResourceSchema.fatalError=Błąd podczas odświeżania schematu systemu +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Nie można załadować dostępnych ról WebComponentUtil.formatDurationWordsForLocal.seconds=sekund WebComponentUtil.formatDurationWordsForLocal.minutes=minut WebComponentUtil.formatDurationWordsForLocal.hours=godzin @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=Powiązane wnioski workItemPanel.reasons=Uzasadnienie procesu zatwierdzania workItemPanel.approverComment=Komentarz od zatwierdzającego workItemPanel.approverInstruction=Instrukcje zatwierdzającego +PageTaskController.message.deleteSyncTokenPerformed.warning=Token nie jest obecny w tym zadaniu. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Nie można usunąć tokena synchronizacji z zadania. pageWorkItems.button.back=Wstecz pageWorkItems.button.approve=Zatwierdź pageWorkItems.button.claim=Przejęcie @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Status pageWorkItems.message.noItemSelected=Nie wybrano zadania pageWorkItems.message.noItemToBeReleased=Żadne z zadań nie może zostać zwolnione (prawdopodobnie dlatego, że nie zostało zgłoszone przez użytkownika). pageWorkItems.message.success.approved=Zadania do wykonania zostały poprawnie zatwierdzone. +pageWorkItems.message.partialError.approved=Nie można zatwierdzić/odrzucić zadania z powodu nieoczekiwanego wyjątku. pageWorkItems.message.success.rejected=Zadania do wykonania zostały poprawnie odrzucone. pageWorkItems.message.success.claimed=Zadania do wykonania zostały poprawnie zgłoszone. +pageWorkItems.message.partialError.claimed=Nie można odebrać zadania z powodu nieoczekiwanego wyjątku. pageWorkItems.message.success.released={0} zadań do wykonania zostało poprawnie zwolnionych. +pageWorkItems.message.partialError.released=Nie można zwolnić zadania z powodu nieoczekiwanego wyjątku. PageWorkItemsAll.title=Wszystkie zadania do wykonania PageWorkItemsAllocatedToMe.title=Zadania do zrobienia przydzielone mi PageWorkItem.title=Szczegóły zadania do wykonania @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=Maks ProvisioningStatistics.MinTime=Min ProvisioningStatistics.ObjectClass=Klasa obiektu ProvisioningStatistics.OtherFailure=Niepowodzenie -ProvisioningStatistics.OtherSuccess=Skrypt OK +ProvisioningStatistics.OtherSuccess=Inne OK ProvisioningStatistics.Resource=System ProvisioningStatistics.ScriptFailure=Niepowodzenie ProvisioningStatistics.ScriptSuccess=Skrypt OK @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Pobierz ReconciliationPopupPanel.resource=System ReconciliationPopupPanel.title.basic=Podstawowa konfiguracja raportu z rekoncyliacji repeater.input.nullValid=Wybierz +RepoInitialSetup.message.init.fatalError=Post-inicjalizacja nie powiodła się. ReportConfigurationPanel.title.basic=Dane podstawowe ReportConfigurationPanel.title.advanced=Zaawansowane Requestable.ALL=Wszystko @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Wzorzec tolerancji ResourceAttributeEditor.message.cantParseSchema=Nie można przeanalizować schematu systemu. ResourceAttributeEditor.title.delete=Usuń ResourceAttributeEditor.title.edit=Edycja +ResourceContentPanel.message.importResourceObject.warning=Nie wybrano niczego do importu +ResourceContentPanel.message.importResourceObject.partialError=Nie można zaimportować konta {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nie wybrano niczego do aktualizacji statusu +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Nie można zaktualizować statusu (do {0}) dla {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nie wybrano niczego do usunięcia ResourceCredentialsEditor.label=Edycja uwierzytelniania systemu ResourceCredentialsEditor.label.fetchStrategy=Strategia pobierania ResourceCredentialsEditor.label.inbound=Przychodzące @@ -3261,6 +3301,7 @@ type.nullValid=Wybierz Type.RECONCILIATION=Rekoncyliacja typeSelect.null=Wszystkie role Type.USERS=Użytkownik +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Nie można załadować dostępnych ról UploadPanel.delete.tooltip=Usuń plik UploadPanel.message.help=Wybierz plik do importu. UploadPanel.message.removeError=Plik nie został usunięty. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Pytania zabezpieczające UserMenuPanel.editProfile=Edycja profilu UserMenuPanel.logout=Wylogowanie UserMenuPanel.resetPasswords=Reset hasła +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Nie udało się wczytać systemowej polityki bezpieczeństwa {0} UserOrgReferenceChoosePanel.type.org=Jednostka organizacyjna UserOrgReferenceChoosePanel.type=Typ właściciela UserOrgReferenceChoosePanel.type.user=Użytkownik @@ -3302,6 +3344,11 @@ user.noOrgs=Brak organizacji validFromFetchStrategy.nullValid=Wybierz validToFetchStrategy.nullValid=Wybierz valueAttribute.nullValid=Wybierz +WebModelUtils.couldntRunTask=Nie można uruchomić zadania {0} +WebModelUtils.couldntLoadPasswordPolicies=Nie można wczytać polityk haseł. +WebModelUtils.couldntAssumePowerAttorney=Nie można objąć pełnomocnictwa +WebModelUtils.couldntDropPowerAttorney=Nie można porzucić pełnomocnictwa +WebModelUtils.couldntLoadSystemConfiguration=Nie udało się wczytać konfiguracji systemu. WebModelUtils.couldntLoadObject=Nie można wczytać obiektu WebModelUtils.couldntSaveObject=Nie można zapisać obiektu WebModelUtils.couldntSearchObjects=Nie można wyszukać obiektów. @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=Cofnij PageAssignmentConflicts.title=Konflikty przypisań PageAssignmentConflicts.back=Wstecz PageAssignmentConflicts.submit=Prześlij +PageAssignmentsList.conflictsWarning=Nie można obliczyć konfliktów przypisać z powodu problemu z autoryzacją. Powód: AbstractShoppingCartTabPanel.addAllButton=Dodaj wszystko AbstractShoppingCartTabPanel.requestingForLabel=Wnioskuj dla AbstractShoppingCartTabPanel.availableRelationsLabel=Dostępne relacje @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Nie można pobrać zadania związanego CsvDownloadButtonPanel.export=Eksport CSV CsvDownloadButtonPanel.confirmationMessage=Eksport do pliku CSV jest ograniczony do {0} rekordów. Kontynuować? AssignmentEditorDto.policyRuleTitle=Reguła polityki +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Wystąpił wyjątek podczas wczytywania atrybutu przypisania. +AssignmentEditorDto.message.getReference.fatalError=Nie można pobrać referencji systemu konstrukcji konta. AssignmentDataTablePanel.targetColumnName=Cel AssignmentDataTablePanel.validityColumnName=Ważność AssignmentDataTablePanel.organizationColumnName=Organizacja @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=Nowe działanie powiadamiania do ResourceObjectAssociationType.details.newValue=Nowe powiązanie obiektu systemu ResourceAttributeDefinitionType.details.newValue=Nowa definicja atrybutu systemu MappingType.details.newValue=Nowe mapowanie +FullTextSearchIndexedItemsConfigurationType.details.newValue=Nowe pełnotekstowe wyszukiwanie indeksowanych pozycji objectState.details=Stan obiektu assignmentState.details=Stan przypisania hasAssignment.details=Posiada przypisanie diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_pt_BR.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_pt_BR.properties index 461a173bd1f..ac443c525a8 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_pt_BR.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_pt_BR.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Alvo AssignmentEditorPanel.tenantRef=Inquilino AssignmentEditorPanel.undefined=Indefinido AssignmentEditorPanel.metadataBlock={0} Metadados +AssignmentEditorPanel.message.loadAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=Ativação AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=Cancelar @@ -252,6 +254,7 @@ contentPanel.accounts=Conteúdo contentPanel.entitlements=Permissões CountToolbar.label={0,number,integer} a {1,number,integer} de {2,number,integer} CountToolbar.noFound=Nenhum resultado apropriado encontrado. +DataLanguagePanel.message.onStateChanged.fatalError=Couldn't change the language. DateValidator.message.fromAfterTo='Data de' deve preceder 'data até'. DebugButtonPanel.button.delete=Deletar DebugButtonPanel.button.export=Exportar @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=informação fetchStrategy.nullValid=Escolher Um filter.duplicate=Filtro com nome '{0}' já foi definido filter.emptyFilter=Filtro não pode ser vazio +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles H3Header.label.error=Erro H3Header.showMore=Mostrar mais HandlerUriActions.ACTION_ADD_FOCUS=Incluir foco @@ -566,6 +570,7 @@ Message.SourceMemory=tarefa em memória (buscados {0}) Message.SourceRepository=repositório (estatísticas atualizadas para {0}) message.success=Suas respostas foram atualizadas com sucesso message.WrongAnswer=Perguntas não respondidas corretamente +ModelInitialSetup.message.init.fatalError=Model post initialization failed. ModelOperationStatusPanel.label.focusName=Objeto ModelOperationStatusPanel.label.focusType=do tipo\: ModelOperationStatusPanel.label.primaryDelta=Delta primário\: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Mín NotificationsStatistics.TotalTime=Tempo total NotificationsStatistics.Transport=Transportar nullValid=Escolher um +ObjectDataProvider.message.listObjects.fatalError=Couldn't list objects +ObjectDataProvider.message.countObjects.fatalError=Não foi possível contar objetos. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Couldn't load resource for account. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=Editar objectPolicyConfigurationEditor.label=Políticas de objeto objectPolicyConfigurationEditor.name.placeholder=Inserir política de objeto @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Inserir caminho de propriedade ObjectPolicyDialog.subtype=Subtipo de objeto ObjectPolicyDialog.template=Modelo de objeto ObjectPolicyDialog.type=Tipo de objeto +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Skipping setting property constraint, no path was defined. ObjectPolicyConfigurationTabPanel.type=Tipo ObjectPolicyConfigurationTabPanel.subtype=Subtype ObjectPolicyConfigurationTabPanel.objectTemplate=Modelo de objeto @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Create new system config PageAdminObjectDetails.title.editSystemConfigurationType=Edit system configuration PageAdminObjectDetails.noChangesSave=Não há alterações a serem salvas. PageAdminObjectDetails.noChangesPreview=Não há alterações para visualizar. +PageAdminObjectDetails.message.loadParentOrgs.warning=Cannot load parent org {0} pageAdminFocus.basic=Básico pageAdminFocus.message.cantEditFocus=Ocorreu um erro desconhecido; não é possível editar objeto foco. pageAdminFocus.message.cantNewFocus=Ocorreu um erro desconhecido; não é possível criar um novo objeto foco. @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Iniciar PageBulkAction.message.emptyString=A ação em lote inserida está vazia. Favor provisionar script não vazio. PageBulkAction.options=Opções PageBulkAction.title=Ações em lote do usuário +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=Action executed. Returned {0} item(s). Console and data output available via 'Export to XML' function. +PageBulkAction.message.startPerformed.fatalError.execute=Couldn't execute bulk action +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=Couldn't parse bulk action object +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=Consulta de repositório PageRepositoryQuery.button.translateAndExecute=Traduzir e executar PageRepositoryQuery.button.translate=Traduzir para consulta hibernate @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Habilitar apenas itens PageCertDefinition.stagesDefinition=Definição de etapas PageCertDefinitions.message.deleteDefinitionPerformed.success=The definition has been successfully deleted. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Couldn't delete campaign definition. +PageCertDefinitions.message.createCampaignPerformed.warning=Definition '{0}' is for ad-hoc campaigns that cannot be started manually. PageCert.in=em {0} PageCert.message.assignment={0} de {1} {2} para {3} {4}. PageCert.message.textAdministrativeState=Estado administrativo \: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Adicionar definição de etapa StageDefinitionPanel.moveStageLeftButton = Mover para esquerda StageDefinitionPanel.moveStageRightButton = Mover para direita StageDefinitionPanel.deleteStageButton = Deletar esta etapa +PageBase.message.parseObject.fatalError=Couldn't parse object: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Couldn't load system configuration. +PageBase.message.loadDeploymentInformationType.fatalError=Couldn't load deployment information. +PageBase.message.getAdministratorPrivileged.fatalError=Couldn't get administrator user: {0} PageContacts.title=Navegador de contatos pageContentAccounts.button.searchButton=Pesquisar pageContentAccounts.dialog.title.confirmDelete=Deletar confirmação @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Você realmente quer {0 pageTasks.message.confirmationMessageForMultipleTaskObject=Você realmente deseja {0} as {1} tarefas selecionadas? pageTasks.message.confirmationMessageForSingleNodeObject=Você realmente quer {0} o nó '{1}'? pageTasks.message.confirmationMessageForMultipleNodeObject=Você realmente quer {0} o(s) {1} nó(s) selecionado(s)? +pageTasks.message.resumeTasksPerformed.success=The task(s) have been successfully resumed. +pageTasks.message.resumeTasksPerformed.fatalError=Couldn't resume the task(s) +pageTasks.message.synchronizeTasksPerformed.fatalError=Couldn't synchronize tasks +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=Para tarefas executadas apenas 1 vez, não informe nem o intervalo de agendamento nem a especificação tipo-con. Para tarefas recorrentes, informe apenas um deles. pageTask.scheduleInterval=Agendar intervalos (segundos) pageTask.scheduleTitle=Agendamento @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Solicitado por: pageWorkItem.requestedOn=Solicitado em: pageWorkItem.requester.description=Solicitante pageWorkItem.requestSpecific.description=Sua decisão -webComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Couldn't load available roles WebComponentUtil.formatDurationWordsForLocal.seconds=seconds WebComponentUtil.formatDurationWordsForLocal.minutes=minutes WebComponentUtil.formatDurationWordsForLocal.hours=hours @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=Solicitações relacionadas workItemPanel.reasons=Reasons for the approval process workItemPanel.approverComment=Comentário do aprovador workItemPanel.approverInstruction=Instrução de aprovação +PageTaskController.message.deleteSyncTokenPerformed.warning=Token is not present in this task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Couldn't delete sync token from the task. pageWorkItems.button.back=Voltar pageWorkItems.button.approve=Aprovar pageWorkItems.button.claim=Reinvindicar @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Status pageWorkItems.message.noItemSelected=Nenhum item de trabalho selecionado. pageWorkItems.message.noItemToBeReleased=None of the work items can be released (most probably because they were not claimed by the user). pageWorkItems.message.success.approved=The work item(s) have been successfully approved. +pageWorkItems.message.partialError.approved=Couldn't approve/reject work item due to an unexpected exception. pageWorkItems.message.success.rejected=The work item(s) have been successfully rejected. pageWorkItems.message.success.claimed=The work item(s) have been successfully claimed. +pageWorkItems.message.partialError.claimed=Couldn't claim work item due to an unexpected exception. pageWorkItems.message.success.released={0} work item(s) have been successfully released. +pageWorkItems.message.partialError.released=Couldn't release work item due to an unexpected exception. PageWorkItemsAll.title=Todos os itens de trabalho PageWorkItemsAllocatedToMe.title=Itens de trabalho alocados para mim PageWorkItem.title=Detalhes de itens de trabalho @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=Máx ProvisioningStatistics.MinTime=Mín ProvisioningStatistics.ObjectClass=Classe de objeto ProvisioningStatistics.OtherFailure=Falha -ProvisioningStatistics.OtherSuccess=Script OK +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Recurso ProvisioningStatistics.ScriptFailure=Falha ProvisioningStatistics.ScriptSuccess=Script OK @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Descarregar ReconciliationPopupPanel.resource=Recurso ReconciliationPopupPanel.title.basic=Configuração de relatório de reconciliação básica repeater.input.nullValid=Escolher um +RepoInitialSetup.message.init.fatalError=Repository post initialization failed. ReportConfigurationPanel.title.basic=Básico ReportConfigurationPanel.title.advanced=Avançado Requestable.ALL=Todos @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Padrão tolerante ResourceAttributeEditor.message.cantParseSchema=Não foi possível analisar esquema do recurso ResourceAttributeEditor.title.delete=Deletar ResourceAttributeEditor.title.edit=Editar +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=Could not import account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Could not update status (to {0}) for {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=Editar credenciais do recurso ResourceCredentialsEditor.label.fetchStrategy=Estratégia de busca ResourceCredentialsEditor.label.inbound=Entrada @@ -3261,6 +3301,7 @@ type.nullValid=Escolher um Type.RECONCILIATION=Reconciliação typeSelect.null=Todos perfis Type.USERS=Usuário +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles UploadPanel.delete.tooltip=Remover arquivo UploadPanel.message.help=Escolher arquivo para importar UploadPanel.message.removeError=Arquivo não foi removido. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Questões de segurança UserMenuPanel.editProfile=Editar perfil UserMenuPanel.logout=Sair UserMenuPanel.resetPasswords=Reiniciar senha +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Couldn't load system security policy {0} UserOrgReferenceChoosePanel.type.org=Unid. Org. UserOrgReferenceChoosePanel.type=Tipo de dono UserOrgReferenceChoosePanel.type.user=Usuário @@ -3302,6 +3344,11 @@ user.noOrgs=Nenhuma organização validFromFetchStrategy.nullValid=Escolher um validToFetchStrategy.nullValid=Escolher um valueAttribute.nullValid=Escolher um +WebModelUtils.couldntRunTask=Couldn't run task {0} +WebModelUtils.couldntLoadPasswordPolicies=Couldn't load password policies. +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=Couldn't load system configuration. WebModelUtils.couldntLoadObject=Não foi possível carregar objeto. WebModelUtils.couldntSaveObject=Não foi possível salvar objeto. WebModelUtils.couldntSearchObjects=Não foi possível pesquisar objetos. @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=Desfazer PageAssignmentConflicts.title=Conflitos entre atribuições PageAssignmentConflicts.back=Voltar PageAssignmentConflicts.submit=Enviar +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: AbstractShoppingCartTabPanel.addAllButton=Add all AbstractShoppingCartTabPanel.requestingForLabel=Requesting for AbstractShoppingCartTabPanel.availableRelationsLabel=Available relations @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Couldn't get case work item. It might h CsvDownloadButtonPanel.export=Exportação CSV CsvDownloadButtonPanel.confirmationMessage=CSV export size is limited to {0} entries. Continue? AssignmentEditorDto.policyRuleTitle=Regra de política +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=Alvo AssignmentDataTablePanel.validityColumnName=Validity AssignmentDataTablePanel.organizationColumnName=Organização @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=New work item notification actio ResourceObjectAssociationType.details.newValue=New resource object association ResourceAttributeDefinitionType.details.newValue=New resource attribute definition MappingType.details.newValue=New mapping +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=Object state assignmentState.details=Assignment state hasAssignment.details=Has assignment diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_ru.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_ru.properties index 3e4687f799e..702c6085b42 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_ru.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_ru.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Управляемая система AssignmentEditorPanel.tenantRef=Владелец AssignmentEditorPanel.undefined=Не определено AssignmentEditorPanel.metadataBlock={0} Метаданные +AssignmentEditorPanel.message.loadAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=Активация AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=Отмена @@ -252,6 +254,7 @@ contentPanel.accounts=Содержание contentPanel.entitlements=Права доступа CountToolbar.label={0,number,integer} to {1,number,integer} of {2,number,integer} CountToolbar.noFound=Не найдено соответствий +DataLanguagePanel.message.onStateChanged.fatalError=Couldn't change the language. DateValidator.message.fromAfterTo=Дата "Действительно с" должна быть меньше, чем дата "Действительно по". DebugButtonPanel.button.delete=Удалить DebugButtonPanel.button.export=Экспорт @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Информация fetchStrategy.nullValid=Выбрать filter.duplicate=Поле с названием '{0}' уже существует. filter.emptyFilter=Фильтр не должен быть пустым +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles H3Header.label.error=Ошибка H3Header.showMore=Ещё HandlerUriActions.ACTION_ADD_FOCUS=Добавить фокус @@ -566,6 +570,7 @@ Message.SourceMemory=задачи в памяти (приведено {0}) Message.SourceRepository=репозиторий (статистика обновлена на {0}) message.success=Ваши ответы были успешно обновлены message.WrongAnswer=Вопросы без правильного ответа +ModelInitialSetup.message.init.fatalError=Model post initialization failed. ModelOperationStatusPanel.label.focusName=Объект: ModelOperationStatusPanel.label.focusType=типа: ModelOperationStatusPanel.label.primaryDelta=Исходные данные: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Мин. NotificationsStatistics.TotalTime=Общее время NotificationsStatistics.Transport=Перемещение nullValid=Выбрать +ObjectDataProvider.message.listObjects.fatalError=Couldn't list objects +ObjectDataProvider.message.countObjects.fatalError=Нельзя посчитать объекты. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Couldn't load resource for account. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=Изменить objectPolicyConfigurationEditor.label=Политики объектов objectPolicyConfigurationEditor.name.placeholder=Включить политику объекта @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Указать путь к свойст ObjectPolicyDialog.subtype=Подтип объекта ObjectPolicyDialog.template=Шаблон объекта ObjectPolicyDialog.type=Тип объекта +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Skipping setting property constraint, no path was defined. ObjectPolicyConfigurationTabPanel.type=Тип ObjectPolicyConfigurationTabPanel.subtype=Subtype ObjectPolicyConfigurationTabPanel.objectTemplate=Шаблон для объекта @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Create new system config PageAdminObjectDetails.title.editSystemConfigurationType=Edit system configuration PageAdminObjectDetails.noChangesSave=Изменения не сохранены. PageAdminObjectDetails.noChangesPreview=Изменения предварительно не просмотрены. +PageAdminObjectDetails.message.loadParentOrgs.warning=Cannot load parent org {0} pageAdminFocus.basic=Основной pageAdminFocus.message.cantEditFocus=Обнаружена неизвестная ошибка, нельзя отредактировать фокус-объект. pageAdminFocus.message.cantNewFocus=Обнаружена неизвестная ошибка, нельзя создать новый фокус-объект. @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Старт PageBulkAction.message.emptyString=Скрипт массового действия пустой. Пожалуйста, предоставьте непустой скрипт. PageBulkAction.options=Опции PageBulkAction.title=Массовые действия с пользователями +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=Action executed. Returned {0} item(s). Console and data output available via 'Export to XML' function. +PageBulkAction.message.startPerformed.fatalError.execute=Couldn't execute bulk action +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=Couldn't parse bulk action object +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=Репозиторий запросов PageRepositoryQuery.button.translateAndExecute=Перевести и выполнить PageRepositoryQuery.button.translate=Перевести запрос в замороженное состояние @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Только активные зада PageCertDefinition.stagesDefinition=Определение этапов PageCertDefinitions.message.deleteDefinitionPerformed.success=The definition has been successfully deleted. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Couldn't delete campaign definition. +PageCertDefinitions.message.createCampaignPerformed.warning=Definition '{0}' is for ad-hoc campaigns that cannot be started manually. PageCert.in=в {0} PageCert.message.assignment={0} из {1} {2} в {3} {4}. PageCert.message.textAdministrativeState=Административный статус: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Добавить определение StageDefinitionPanel.moveStageLeftButton = Сдвинуть влево StageDefinitionPanel.moveStageRightButton = Сдвинуть вправо StageDefinitionPanel.deleteStageButton = Удалить этот этап +PageBase.message.parseObject.fatalError=Couldn't parse object: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Couldn't load system configuration. +PageBase.message.loadDeploymentInformationType.fatalError=Couldn't load deployment information. +PageBase.message.getAdministratorPrivileged.fatalError=Couldn't get administrator user: {0} PageContacts.title=Просмотр контактов pageContentAccounts.button.searchButton=Поиск pageContentAccounts.dialog.title.confirmDelete=Подтверждение удаления @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Вы действите pageTasks.message.confirmationMessageForMultipleTaskObject=Вы действительно хотите {0} выбранные {1} задачи? pageTasks.message.confirmationMessageForSingleNodeObject=Вы действительно хотите {0} узел {1}? pageTasks.message.confirmationMessageForMultipleNodeObject=Вы действительно хотите {0} выбранные {1} узлы? +pageTasks.message.resumeTasksPerformed.success=The task(s) have been successfully resumed. +pageTasks.message.resumeTasksPerformed.fatalError=Couldn't resume the task(s) +pageTasks.message.synchronizeTasksPerformed.fatalError=Couldn't synchronize tasks +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=Для разовых задач не вводите на интервал расписания, ни условия для cron-планировщика. Для повторяющихся задач введите данные для одного из них. pageTask.scheduleInterval=Расписание (в секундах) pageTask.scheduleTitle=Расписание @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Кем запрошено: pageWorkItem.requestedOn=Когда запрошено: pageWorkItem.requester.description=Автор запроса pageWorkItem.requestSpecific.description=Ваше решение -webComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Couldn't load available roles WebComponentUtil.formatDurationWordsForLocal.seconds=seconds WebComponentUtil.formatDurationWordsForLocal.minutes=minutes WebComponentUtil.formatDurationWordsForLocal.hours=hours @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=Связанные запросы workItemPanel.reasons=Reasons for the approval process workItemPanel.approverComment=Комментарий workItemPanel.approverInstruction=Инструкция согласующего +PageTaskController.message.deleteSyncTokenPerformed.warning=Token is not present in this task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Couldn't delete sync token from the task. pageWorkItems.button.back=Назад pageWorkItems.button.approve=Согласовать pageWorkItems.button.claim=Заявка @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Статус pageWorkItems.message.noItemSelected=Ни одно задание не выбрано pageWorkItems.message.noItemToBeReleased=None of the work items can be released (most probably because they were not claimed by the user). pageWorkItems.message.success.approved=The work item(s) have been successfully approved. +pageWorkItems.message.partialError.approved=Couldn't approve/reject work item due to an unexpected exception. pageWorkItems.message.success.rejected=The work item(s) have been successfully rejected. pageWorkItems.message.success.claimed=The work item(s) have been successfully claimed. +pageWorkItems.message.partialError.claimed=Couldn't claim work item due to an unexpected exception. pageWorkItems.message.success.released={0} work item(s) have been successfully released. +pageWorkItems.message.partialError.released=Couldn't release work item due to an unexpected exception. PageWorkItemsAll.title=Все задания PageWorkItemsAllocatedToMe.title=Задания, назначенные мне PageWorkItem.title=Подробные сведения задачи @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=Макс. ProvisioningStatistics.MinTime=Мин. ProvisioningStatistics.ObjectClass=Класс объекта ProvisioningStatistics.OtherFailure=Сбой -ProvisioningStatistics.OtherSuccess=Скрипт ОК +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Ресурс ProvisioningStatistics.ScriptFailure=Сбой ProvisioningStatistics.ScriptSuccess=Скрипт ОК @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Скачать ReconciliationPopupPanel.resource=Ресурс ReconciliationPopupPanel.title.basic=Конфигурация отчёта по основной реконсиляции repeater.input.nullValid=Выбрать +RepoInitialSetup.message.init.fatalError=Repository post initialization failed. ReportConfigurationPanel.title.basic=Основной ReportConfigurationPanel.title.advanced=Дополнительно Requestable.ALL=Все @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Гибкий паттерн ResourceAttributeEditor.message.cantParseSchema=Невозможно сделать разбор схемы ресурса ResourceAttributeEditor.title.delete=Удалить ResourceAttributeEditor.title.edit=Изменить +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=Could not import account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Could not update status (to {0}) for {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=Изменить учетные данные ресурса ResourceCredentialsEditor.label.fetchStrategy=Стратегия привлечения ResourceCredentialsEditor.label.inbound=Входящий @@ -3261,6 +3301,7 @@ type.nullValid=Выбрать Type.RECONCILIATION=Реконсиляция typeSelect.null=Все роли Type.USERS=Пользователь +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles UploadPanel.delete.tooltip=Переместить файл UploadPanel.message.help=Выбрать файл для импорта. UploadPanel.message.removeError=Файл не был удалён. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Контрольные вопросы UserMenuPanel.editProfile=Изменить профиль UserMenuPanel.logout=Выйти UserMenuPanel.resetPasswords=Сброс пароля +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Couldn't load system security policy {0} UserOrgReferenceChoosePanel.type.org=Организационная единица UserOrgReferenceChoosePanel.type=Тип владельца UserOrgReferenceChoosePanel.type.user=Пользователь @@ -3302,6 +3344,11 @@ user.noOrgs=Нет организаций validFromFetchStrategy.nullValid=Выбрать validToFetchStrategy.nullValid=Выбрать valueAttribute.nullValid=Выбрать +WebModelUtils.couldntRunTask=Couldn't run task {0} +WebModelUtils.couldntLoadPasswordPolicies=Couldn't load password policies. +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=Couldn't load system configuration. WebModelUtils.couldntLoadObject=Невозможно загрузить объект. WebModelUtils.couldntSaveObject=Невозможно сохранить объект. WebModelUtils.couldntSearchObjects=Объекты не найдены. @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=Назад PageAssignmentConflicts.title=Конфликты назначений PageAssignmentConflicts.back=Назад PageAssignmentConflicts.submit=Подтвердить +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: AbstractShoppingCartTabPanel.addAllButton=Add all AbstractShoppingCartTabPanel.requestingForLabel=Requesting for AbstractShoppingCartTabPanel.availableRelationsLabel=Available relations @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Couldn't get case work item. It might h CsvDownloadButtonPanel.export=Экспорт CSV CsvDownloadButtonPanel.confirmationMessage=CSV export size is limited to {0} entries. Continue? AssignmentEditorDto.policyRuleTitle=Правило политики +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=Целевая система AssignmentDataTablePanel.validityColumnName=Validity AssignmentDataTablePanel.organizationColumnName=Организация @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=New work item notification actio ResourceObjectAssociationType.details.newValue=New resource object association ResourceAttributeDefinitionType.details.newValue=New resource attribute definition MappingType.details.newValue=New mapping +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=Object state assignmentState.details=Assignment state hasAssignment.details=Has assignment diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_sk.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_sk.properties index 52c0e1bfdb6..ebdf09dc535 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_sk.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_sk.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Cieľ AssignmentEditorPanel.tenantRef=Tenant AssignmentEditorPanel.undefined=Nedefinovaný AssignmentEditorPanel.metadataBlock={0} Metadata +AssignmentEditorPanel.message.loadAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=Aktivácia AssignmentActivationPopupPanel.okButton=OK AssignmentActivationPopupPanel.cancelButton=Zrušiť @@ -252,6 +254,7 @@ contentPanel.accounts=Obsah contentPanel.entitlements=Oprávnenia CountToolbar.label=Zobrazených {0,number,integer} až {1,number,integer} z {2,number,integer} výsledkov. CountToolbar.noFound=Nijaký zhodujúci sa výsledok nebol nájdený. +DataLanguagePanel.message.onStateChanged.fatalError=Couldn't change the language. DateValidator.message.fromAfterTo=Dátum platný od musí byť skôr ako dátum platný do. DebugButtonPanel.button.delete=Zmazať DebugButtonPanel.button.export=Export @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Informácia fetchStrategy.nullValid=Vyberte hodnotu filter.duplicate=Filter s menom '{0}' je už definovaný. filter.emptyFilter=Filter nesmie byť prázdny. +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles H3Header.label.error=Chyba H3Header.showMore=Zobraziť viac HandlerUriActions.ACTION_ADD_FOCUS=Pridať focus @@ -566,6 +570,7 @@ Message.SourceMemory=úloha v pamäti (vybraná {0}) Message.SourceRepository=repozitár (štatistiky aktualizované v {0}) message.success=Vaše odpovede boli úspešne aktualizované. message.WrongAnswer=Otázky neboli zodpovedané správne +ModelInitialSetup.message.init.fatalError=Model post initialization failed. ModelOperationStatusPanel.label.focusName=Objekt: ModelOperationStatusPanel.label.focusType=typu: ModelOperationStatusPanel.label.primaryDelta=Primárne delta: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Min NotificationsStatistics.TotalTime=Celkový čas NotificationsStatistics.Transport=Transport nullValid=Vyberte hodnotu +ObjectDataProvider.message.listObjects.fatalError=Couldn't list objects +ObjectDataProvider.message.countObjects.fatalError=Couldn't count objects. +ObjectDataProvider.message.loadResourceForAccount.fatalError=Couldn't load resource for account. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=Upraviť objectPolicyConfigurationEditor.label=Object policies objectPolicyConfigurationEditor.name.placeholder=Vložiť politiku objektu @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Vložte cestu k vlastnosti ObjectPolicyDialog.subtype=Object subtype ObjectPolicyDialog.template=Šablóna objektu ObjectPolicyDialog.type=Object type +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Skipping setting property constraint, no path was defined. ObjectPolicyConfigurationTabPanel.type=Typ ObjectPolicyConfigurationTabPanel.subtype=Subtype ObjectPolicyConfigurationTabPanel.objectTemplate=Šablóna objektu @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Create new system config PageAdminObjectDetails.title.editSystemConfigurationType=Edit system configuration PageAdminObjectDetails.noChangesSave=Neboli vykonané žiadne zmeny, ktoré by sa dali uložiť. PageAdminObjectDetails.noChangesPreview=Neboli vykonané žiadne zmeny, ktoré by sa dali zobraziť v náhľade. +PageAdminObjectDetails.message.loadParentOrgs.warning=Cannot load parent org {0} pageAdminFocus.basic=Základné pageAdminFocus.message.cantEditFocus=Unknown error occurred, can't edit focus object. pageAdminFocus.message.cantNewFocus=Unknown error occurred, can't create new focus object. @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Štart PageBulkAction.message.emptyString=Vložená bulk akcia je prázdna. Prosím vložte neprázdny skript. PageBulkAction.options=Možnosti PageBulkAction.title=Používateľská bulk akcia +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=Action executed. Returned {0} item(s). Console and data output available via 'Export to XML' function. +PageBulkAction.message.startPerformed.fatalError.execute=Couldn't execute bulk action +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=Couldn't parse bulk action object +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=Repository query PageRepositoryQuery.button.translateAndExecute=Translate and execute PageRepositoryQuery.button.translate=Translate to hibernate query @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Enabled items only PageCertDefinition.stagesDefinition=Stages definition PageCertDefinitions.message.deleteDefinitionPerformed.success=The definition has been successfully deleted. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Couldn't delete campaign definition. +PageCertDefinitions.message.createCampaignPerformed.warning=Definition '{0}' is for ad-hoc campaigns that cannot be started manually. PageCert.in=v {0} PageCert.message.assignment={0} z {1} {2} do {3} {4}. PageCert.message.textAdministrativeState=Administratívny stav: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Add stage definition StageDefinitionPanel.moveStageLeftButton = Move left StageDefinitionPanel.moveStageRightButton = Move right StageDefinitionPanel.deleteStageButton = Delete this stage +PageBase.message.parseObject.fatalError=Couldn't parse object: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Couldn't load system configuration. +PageBase.message.loadDeploymentInformationType.fatalError=Couldn't load deployment information. +PageBase.message.getAdministratorPrivileged.fatalError=Couldn't get administrator user: {0} PageContacts.title=Contacts browser pageContentAccounts.button.searchButton=Vyhľadať pageContentAccounts.dialog.title.confirmDelete=Potvrdiť vymazanie @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=Do you really want to { pageTasks.message.confirmationMessageForMultipleTaskObject=Do you really want to {0} selected {1} task(s)? pageTasks.message.confirmationMessageForSingleNodeObject=Do you really want to {0} node '{1}'? pageTasks.message.confirmationMessageForMultipleNodeObject=Do you really want to {0} selected {1} node(s)? +pageTasks.message.resumeTasksPerformed.success=The task(s) have been successfully resumed. +pageTasks.message.resumeTasksPerformed.fatalError=Couldn't resume the task(s) +pageTasks.message.synchronizeTasksPerformed.fatalError=Couldn't synchronize tasks +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=U jednorazových úloh, nezadávajte plánovaný interval ani cron-like špecifikáciu. U opakovaných úloh, zadajte presne jedno z toho. pageTask.scheduleInterval=Plánovaný interval (sekundy) pageTask.scheduleTitle=Plánovanie @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Požadované od: pageWorkItem.requestedOn=Požadované v: pageWorkItem.requester.description=Žiadateľ pageWorkItem.requestSpecific.description=Vaše rozhodnutie -webComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Couldn't load available roles WebComponentUtil.formatDurationWordsForLocal.seconds=seconds WebComponentUtil.formatDurationWordsForLocal.minutes=minutes WebComponentUtil.formatDurationWordsForLocal.hours=hours @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=Related requests workItemPanel.reasons=Reasons for the approval process workItemPanel.approverComment=Approver comment workItemPanel.approverInstruction=Approver instruction +PageTaskController.message.deleteSyncTokenPerformed.warning=Token is not present in this task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Couldn't delete sync token from the task. pageWorkItems.button.back=Späť pageWorkItems.button.approve=Schváliť pageWorkItems.button.claim=Žiadosť @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Stav pageWorkItems.message.noItemSelected=Nebola vybraná žiadna pracovná položka. pageWorkItems.message.noItemToBeReleased=None of the work items can be released (most probably because they were not claimed by the user). pageWorkItems.message.success.approved=The work item(s) have been successfully approved. +pageWorkItems.message.partialError.approved=Couldn't approve/reject work item due to an unexpected exception. pageWorkItems.message.success.rejected=The work item(s) have been successfully rejected. pageWorkItems.message.success.claimed=The work item(s) have been successfully claimed. +pageWorkItems.message.partialError.claimed=Couldn't claim work item due to an unexpected exception. pageWorkItems.message.success.released={0} work item(s) have been successfully released. +pageWorkItems.message.partialError.released=Couldn't release work item due to an unexpected exception. PageWorkItemsAll.title=All work items PageWorkItemsAllocatedToMe.title=Work items allocated to me PageWorkItem.title=Work item details @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=Max ProvisioningStatistics.MinTime=Min ProvisioningStatistics.ObjectClass=Trieda objektu ProvisioningStatistics.OtherFailure=Zlyhanie -ProvisioningStatistics.OtherSuccess=Skrip zbehol OK +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Systém ProvisioningStatistics.ScriptFailure=Zlyhanie ProvisioningStatistics.ScriptSuccess=Skrip zbehol OK @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=Stiahnuť ReconciliationPopupPanel.resource=Systém ReconciliationPopupPanel.title.basic=Základná konfigurácia pre schvaľujúci report repeater.input.nullValid=Vyberte hodnotu +RepoInitialSetup.message.init.fatalError=Repository post initialization failed. ReportConfigurationPanel.title.basic=Základný ReportConfigurationPanel.title.advanced=Rozšírené Requestable.ALL=Všetky @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Tolerovaný vzor ResourceAttributeEditor.message.cantParseSchema=Nebolo možné parsovať schému systému ResourceAttributeEditor.title.delete=Zmazať ResourceAttributeEditor.title.edit=Editovať +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=Could not import account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Could not update status (to {0}) for {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=Upraviť nastavenia systému ResourceCredentialsEditor.label.fetchStrategy=Fetch strategy ResourceCredentialsEditor.label.inbound=Prichádzajúci @@ -3261,6 +3301,7 @@ type.nullValid=Vyberte hodnotu Type.RECONCILIATION=Rekonciliácia typeSelect.null=Všetky roly Type.USERS=Používateľ +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles UploadPanel.delete.tooltip=Odstrániť súbor UploadPanel.message.help=Vybrať súbor na import. UploadPanel.message.removeError=Súbor bol odstránený. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Bezpečnostné otázky UserMenuPanel.editProfile=Upraviť profil UserMenuPanel.logout=Odhlásiť UserMenuPanel.resetPasswords=Reset hesla +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Couldn't load system security policy {0} UserOrgReferenceChoosePanel.type.org=Org. jednotka UserOrgReferenceChoosePanel.type=Typ vlastníka UserOrgReferenceChoosePanel.type.user=Používateľ @@ -3302,6 +3344,11 @@ user.noOrgs=Žiadne organizácie validFromFetchStrategy.nullValid=Vyberte hodnotu validToFetchStrategy.nullValid=Vyberte hodnotu valueAttribute.nullValid=Vyberte hodnotu +WebModelUtils.couldntRunTask=Couldn't run task {0} +WebModelUtils.couldntLoadPasswordPolicies=Couldn't load password policies. +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=Couldn't load system configuration. WebModelUtils.couldntLoadObject=Nepodarilo sa načítať objekt. WebModelUtils.couldntSaveObject=Couldn't save object. WebModelUtils.couldntSearchObjects=Couldn't search objects. @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=Vrátiť späť PageAssignmentConflicts.title=Assignments conflicts PageAssignmentConflicts.back=Späť PageAssignmentConflicts.submit=Submit +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: AbstractShoppingCartTabPanel.addAllButton=Add all AbstractShoppingCartTabPanel.requestingForLabel=Requesting for AbstractShoppingCartTabPanel.availableRelationsLabel=Available relations @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Couldn't get case work item. It might h CsvDownloadButtonPanel.export=CSV export CsvDownloadButtonPanel.confirmationMessage=CSV export size is limited to {0} entries. Continue? AssignmentEditorDto.policyRuleTitle=Policy rule +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=Cieľ AssignmentDataTablePanel.validityColumnName=Platnosť AssignmentDataTablePanel.organizationColumnName=Organizácia @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=New work item notification actio ResourceObjectAssociationType.details.newValue=New resource object association ResourceAttributeDefinitionType.details.newValue=New resource attribute definition MappingType.details.newValue=New mapping +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=Object state assignmentState.details=Assignment state hasAssignment.details=Has assignment diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_tr.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_tr.properties index 30e82c8310a..f66372d64ad 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_tr.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_tr.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=Hedef AssignmentEditorPanel.tenantRef=En üst AssignmentEditorPanel.undefined=Tanımsız AssignmentEditorPanel.metadataBlock={0} Metaveri +AssignmentEditorPanel.message.loadAttributes.fatalError=Atama özniteliği yükleme sırasında özel durum oluştu. +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=Aktivasyon AssignmentActivationPopupPanel.okButton=Tamam AssignmentActivationPopupPanel.cancelButton=İptal @@ -252,6 +254,7 @@ contentPanel.accounts=İçerik contentPanel.entitlements=Yetkiler CountToolbar.label={0,number,integer} 'den {1,number,integer} 'e kadar olan sonuçları gösteriyor. Toplam {2,number,integer} sonuç. CountToolbar.noFound=Eşleşen sonuç bulunamadı. +DataLanguagePanel.message.onStateChanged.fatalError=Couldn't change the language. DateValidator.message.fromAfterTo=Geçerlilik başlangıcı geçerlilik sonundan önce olmalı. DebugButtonPanel.button.delete=Sil DebugButtonPanel.button.export=Çıkar @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=Bilgi fetchStrategy.nullValid=Birini Seçiniz filter.duplicate='{0}' isimli filtre önceden tanımlı. filter.emptyFilter=Filtre boş olmamalı +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Mevcut roller yüklenemedi H3Header.label.error=Hata H3Header.showMore=Daha Fazla Göster HandlerUriActions.ACTION_ADD_FOCUS=Odak ekle @@ -566,6 +570,7 @@ Message.SourceMemory=hafızadaki görev (getirilen {0}) Message.SourceRepository=depo ({0} tarihinde istatistikler güncellendi) message.success=Cevaplarınız Başarılı Bir Şekilde Güncellendi message.WrongAnswer=Soruları Doğru Cevaplamadınız +ModelInitialSetup.message.init.fatalError=Model post initialization failed. ModelOperationStatusPanel.label.focusName=Nesne: ModelOperationStatusPanel.label.focusType=tipi: ModelOperationStatusPanel.label.primaryDelta=Birincil delta: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=Min NotificationsStatistics.TotalTime=Toplam süre NotificationsStatistics.Transport=Nakil nullValid=Birini Seçiniz +ObjectDataProvider.message.listObjects.fatalError=Nesneler listelenemedi +ObjectDataProvider.message.countObjects.fatalError=Nesneler sayılamadı +ObjectDataProvider.message.loadResourceForAccount.fatalError=Hesap için kaynak yüklenemedi. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=Düzenle objectPolicyConfigurationEditor.label=Nesne politikaları objectPolicyConfigurationEditor.name.placeholder=Nesne politikası ekle @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=Öznitelik yolunu girin ObjectPolicyDialog.subtype=Nesne alt tipi ObjectPolicyDialog.template=Nesne şablonu ObjectPolicyDialog.type=Nesne tipi +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Skipping setting property constraint, no path was defined. ObjectPolicyConfigurationTabPanel.type=Tip ObjectPolicyConfigurationTabPanel.subtype=Alt Tipi ObjectPolicyConfigurationTabPanel.objectTemplate=Nesne şablonu @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Yeni Sistem Yapılandır PageAdminObjectDetails.title.editSystemConfigurationType=Sistem Yapılandırmasını Düzenle PageAdminObjectDetails.noChangesSave=Kaydedilecek bir değişiklik oluşmadı. PageAdminObjectDetails.noChangesPreview=Önizleme yapılabilecek değişklik yok +PageAdminObjectDetails.message.loadParentOrgs.warning=Cannot load parent org {0} pageAdminFocus.basic=Temel pageAdminFocus.message.cantEditFocus=Yeni odak nesnesi bilinmeyen bir hatadan dolayı düzenlenemedi.. pageAdminFocus.message.cantNewFocus=Yeni odak nesnesi bilinmeyen bir hatadan dolayı oluşturulamadı. @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=Başlat PageBulkAction.message.emptyString=Girilen toplu işlem boş. Lütfen boş olmayan betik girin. PageBulkAction.options=Seçenekler PageBulkAction.title=Kullanıcı Toplu İşlemleri +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=Action executed. Returned {0} item(s). Console and data output available via 'Export to XML' function. +PageBulkAction.message.startPerformed.fatalError.execute=Couldn't execute bulk action +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=Couldn't parse bulk action object +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=Depo sorgulaması PageRepositoryQuery.button.translateAndExecute=Çevir ve yürüt PageRepositoryQuery.button.translate=Hibernate sorgusuna çevir @@ -1340,8 +1358,8 @@ PageCertCampaigns.menu.deleteSelected=Seçili operasyonları sil PageCertCampaigns.menu.startSelected=Seçili operasyonları başlat PageCertCampaigns.message.closeCampaignConfirmMultiple=Seçili {0} operasyonu gerçekten kapatmak istiyor musunuz? PageCertCampaigns.message.closeCampaignConfirmSingle='{0}' operasyonunu gerçekten kapatmak istiyor musunuz ? -PageCertCampaigns.message.reiterateCampaignConfirmMultiple=Do you really want to reiterate selected {0} closed campaigns? -PageCertCampaigns.message.reiterateCampaignConfirmSingle=Do you really want to reiterate campaign '{0}' ? +PageCertCampaigns.message.reiterateCampaignConfirmMultiple=Gerçekten seçilen {0} kapalı operasyonları tekrarlamak istiyor musunuz? +PageCertCampaigns.message.reiterateCampaignConfirmSingle='{0}' operasyonunu gerçekten tekrarlamak istiyor musunuz? PageCertCampaigns.message.closeStageConfirmSingle=Gerçekten '{0}' için şu anki etabı kapatmak istiyor musunuz? PageCertCampaigns.message.deleteCampaignConfirmMultiple=Seçili {0} operayon gerçekten silmek istiyor musunuz? PageCertCampaigns.message.deleteCampaignConfirmSingle='{0}' operayonunu gerçekten silmek istiyor musunuz? @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=Sadece aktifleştirilmiş öğeler PageCertDefinition.stagesDefinition=Etapların tanımı PageCertDefinitions.message.deleteDefinitionPerformed.success=The definition has been successfully deleted. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Operasyon tanımı silinemedi. +PageCertDefinitions.message.createCampaignPerformed.warning=Definition '{0}' is for ad-hoc campaigns that cannot be started manually. PageCert.in={0} içinde PageCert.message.assignment={0} ın {1} {2} den {3} e {4}. PageCert.message.textAdministrativeState=İdari durum: {0}. @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = Etap tanımı ekle StageDefinitionPanel.moveStageLeftButton = Sola taşı StageDefinitionPanel.moveStageRightButton = Sağa taşı StageDefinitionPanel.deleteStageButton = Bu etabı sil +PageBase.message.parseObject.fatalError=Couldn't parse object: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Couldn't load system configuration. +PageBase.message.loadDeploymentInformationType.fatalError=Couldn't load deployment information. +PageBase.message.getAdministratorPrivileged.fatalError=Couldn't get administrator user: {0} PageContacts.title=Kişiler tarayıcısı pageContentAccounts.button.searchButton=Ara pageContentAccounts.dialog.title.confirmDelete=Silme Onayı @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject='{1}' görevine {0} yap pageTasks.message.confirmationMessageForMultipleTaskObject=Gerçekten seçili {1} görev(lere) {0} yapmak istiyor musunuz? pageTasks.message.confirmationMessageForSingleNodeObject='{1}' düğümüne {0} yapmak istiyor musunuz? pageTasks.message.confirmationMessageForMultipleNodeObject=Gerçekten seçili {1} düğüm(ler)i {0} yapmak istiyor musunuz? +pageTasks.message.resumeTasksPerformed.success=The task(s) have been successfully resumed. +pageTasks.message.resumeTasksPerformed.fatalError=Couldn't resume the task(s) +pageTasks.message.synchronizeTasksPerformed.fatalError=Couldn't synchronize tasks +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=Tek seferlik görevler için zaman aralığı veya cron tanımı girmeyiniz. Tekrar eden görevler içinse sadece birini giriniz. pageTask.scheduleInterval=Sıklık ayarla (saniyeler) pageTask.scheduleTitle=Zaman planı @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=Talep eden: pageWorkItem.requestedOn=Talep Tarihi pageWorkItem.requester.description=Talep eden pageWorkItem.requestSpecific.description=Kararım -webComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Mevcut roller yüklenemedi WebComponentUtil.formatDurationWordsForLocal.seconds=saniyeler WebComponentUtil.formatDurationWordsForLocal.minutes=dakika WebComponentUtil.formatDurationWordsForLocal.hours=saatler @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=İlgili talepler workItemPanel.reasons=Onay sürecinin sebepleri workItemPanel.approverComment=Onaylayıcının yorumu workItemPanel.approverInstruction=Onaylayıcı talimatı +PageTaskController.message.deleteSyncTokenPerformed.warning=Token is not present in this task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Couldn't delete sync token from the task. pageWorkItems.button.back=Geri pageWorkItems.button.approve=Kabul et pageWorkItems.button.claim=Talep et @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=Durum pageWorkItems.message.noItemSelected=Hiç iş kalemi seçilmedi. pageWorkItems.message.noItemToBeReleased=None of the work items can be released (most probably because they were not claimed by the user). pageWorkItems.message.success.approved=The work item(s) have been successfully approved. +pageWorkItems.message.partialError.approved=Couldn't approve/reject work item due to an unexpected exception. pageWorkItems.message.success.rejected=The work item(s) have been successfully rejected. pageWorkItems.message.success.claimed=The work item(s) have been successfully claimed. +pageWorkItems.message.partialError.claimed=Couldn't claim work item due to an unexpected exception. pageWorkItems.message.success.released={0} work item(s) have been successfully released. +pageWorkItems.message.partialError.released=Couldn't release work item due to an unexpected exception. PageWorkItemsAll.title=Tüm iş öğeleri PageWorkItemsAllocatedToMe.title=Bana ayrılan iş öğeleri PageWorkItem.title=İş öğeleri detayları @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=Maks ProvisioningStatistics.MinTime=Min ProvisioningStatistics.ObjectClass=Nesne sınıfı ProvisioningStatistics.OtherFailure=Başarısız -ProvisioningStatistics.OtherSuccess=Betik BAŞARILI +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=Kaynak ProvisioningStatistics.ScriptFailure=Başarısız ProvisioningStatistics.ScriptSuccess=Betik BAŞARILI @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=İndir ReconciliationPopupPanel.resource=Kaynak ReconciliationPopupPanel.title.basic=Temel Uzlaştırma Raporu Yapılandırması repeater.input.nullValid=Birini Seçiniz +RepoInitialSetup.message.init.fatalError=Repository post initialization failed. ReportConfigurationPanel.title.basic=Temel bilgiler ReportConfigurationPanel.title.advanced=Gelişmiş Requestable.ALL=Hepsi @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=Toleranslı kalıp ResourceAttributeEditor.message.cantParseSchema=Kaynak şema ayrıştırılamadı ResourceAttributeEditor.title.delete=Sil ResourceAttributeEditor.title.edit=Düzenle +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=Could not import account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Could not update status (to {0}) for {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=Kaynaktaki şifreyi düzenle ResourceCredentialsEditor.label.fetchStrategy=Getirme stratejisi ResourceCredentialsEditor.label.inbound=Gelen @@ -3261,6 +3301,7 @@ type.nullValid=Birini Seçiniz Type.RECONCILIATION=Hesap eşleme typeSelect.null=Tüm roller Type.USERS=Kullanıcı +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Mevcut roller yüklenemedi UploadPanel.delete.tooltip=Dosya silme UploadPanel.message.help=İçe aktarılacak dosyayı seçin. UploadPanel.message.removeError=Dosya silinemedi. @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=Şifre Sorularım UserMenuPanel.editProfile=Profili düzenle UserMenuPanel.logout=Çıkış yap UserMenuPanel.resetPasswords=Şifre Değiştir +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Couldn't load system security policy {0} UserOrgReferenceChoosePanel.type.org=Org. Ünitesi UserOrgReferenceChoosePanel.type=Sahip Tİpi UserOrgReferenceChoosePanel.type.user=Kullanıcı @@ -3302,6 +3344,11 @@ user.noOrgs=Hiç bir organizasyon yok. validFromFetchStrategy.nullValid=Birini Seçiniz validToFetchStrategy.nullValid=Birini Seçiniz valueAttribute.nullValid=Birini Seçiniz +WebModelUtils.couldntRunTask=Couldn't run task {0} +WebModelUtils.couldntLoadPasswordPolicies=Couldn't load password policies. +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=Couldn't load system configuration. WebModelUtils.couldntLoadObject=Nesne yüklenemedi. WebModelUtils.couldntSaveObject=Nesne kaydedilemedi. WebModelUtils.couldntSearchObjects=Nesneler aranamadı. @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=Geri al PageAssignmentConflicts.title=Atama çakışmaları PageAssignmentConflicts.back=Geri PageAssignmentConflicts.submit=Gönder +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: AbstractShoppingCartTabPanel.addAllButton=Add all AbstractShoppingCartTabPanel.requestingForLabel=Requesting for AbstractShoppingCartTabPanel.availableRelationsLabel=Available relations @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Couldn't get case work item. It might h CsvDownloadButtonPanel.export=CSV dışa aktarma CsvDownloadButtonPanel.confirmationMessage=CSV dışa aktarma boyutu {0} girdileri ile sınırlıdır. Devam edilsin mi? AssignmentEditorDto.policyRuleTitle=Politika kuralı +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Atama özniteliği yükleme sırasında özel durum oluştu. +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=Hedef AssignmentDataTablePanel.validityColumnName=Geçerlilik AssignmentDataTablePanel.organizationColumnName=Organizasyon @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=New work item notification actio ResourceObjectAssociationType.details.newValue=New resource object association ResourceAttributeDefinitionType.details.newValue=New resource attribute definition MappingType.details.newValue=New mapping +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=Nesne durumu assignmentState.details=Atama durumu hasAssignment.details=Ataması var diff --git a/gui/admin-gui/src/main/resources/localization/Midpoint_zh_CN.properties b/gui/admin-gui/src/main/resources/localization/Midpoint_zh_CN.properties index ece946f20fe..41d050cd7b0 100644 --- a/gui/admin-gui/src/main/resources/localization/Midpoint_zh_CN.properties +++ b/gui/admin-gui/src/main/resources/localization/Midpoint_zh_CN.properties @@ -61,6 +61,8 @@ AssignmentEditorPanel.target=目标 AssignmentEditorPanel.tenantRef=租户 AssignmentEditorPanel.undefined=未定义 AssignmentEditorPanel.metadataBlock={0}元数据 +AssignmentEditorPanel.message.loadAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorPanel.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentActivationPopupPanel.title=激活 AssignmentActivationPopupPanel.okButton=好的 AssignmentActivationPopupPanel.cancelButton=取消 @@ -252,6 +254,7 @@ contentPanel.accounts=账号 contentPanel.entitlements=授权 CountToolbar.label={0,number,integer}至{1,number,integer} ,总共{2,number,integer} CountToolbar.noFound=没有找到匹配的记录。 +DataLanguagePanel.message.onStateChanged.fatalError=Couldn't change the language. DateValidator.message.fromAfterTo=有效起始日期必须在有效截止日期之前。 DebugButtonPanel.button.delete=删除 DebugButtonPanel.button.export=导出 @@ -377,6 +380,7 @@ feedtempMessagePanelbackMessagePanel.message.info=信息 fetchStrategy.nullValid=请选择 filter.duplicate=已定义名称为 "{0}" 的筛选器 filter.emptyFilter=筛选器不得为空 +FocusTypeAssignmentPopupTabPanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles H3Header.label.error=错误 H3Header.showMore=显示更多 HandlerUriActions.ACTION_ADD_FOCUS=添加主对象 @@ -566,6 +570,7 @@ Message.SourceMemory=内存中的任务 (已获取 {0}) Message.SourceRepository=存储库(统计信息更新于{0}) message.success=答案已经更新成功 message.WrongAnswer=问题没有正确回答 +ModelInitialSetup.message.init.fatalError=Model post initialization failed. ModelOperationStatusPanel.label.focusName=对象: ModelOperationStatusPanel.label.focusType=类型: ModelOperationStatusPanel.label.primaryDelta=主体变更数据: @@ -629,6 +634,10 @@ NotificationsStatistics.MinTime=最小 NotificationsStatistics.TotalTime=总时间 NotificationsStatistics.Transport=传输 nullValid=请选择 +ObjectDataProvider.message.listObjects.fatalError=Couldn't list objects +ObjectDataProvider.message.countObjects.fatalError=无法计数对象。 +ObjectDataProvider.message.loadResourceForAccount.fatalError=Couldn't load resource for account. +ObjectDeltaOperationPanel.message.fetchOrVisualize.fatalError=Couldn't fetch or visualize the delta: {0} objectPolicyConfigurationEditor.button.edit=编辑 objectPolicyConfigurationEditor.label=对象策略 objectPolicyConfigurationEditor.name.placeholder=插入对象策略 @@ -643,6 +652,7 @@ ObjectPolicyDialog.property.placeholder=插入属性路径 ObjectPolicyDialog.subtype=对象子类型 ObjectPolicyDialog.template=对象模板 ObjectPolicyDialog.type=对象类型 +ObjectPolicyDialogDto.message.preparePolicyConfig.warning=Skipping setting property constraint, no path was defined. ObjectPolicyConfigurationTabPanel.type=类型 ObjectPolicyConfigurationTabPanel.subtype=Subtype ObjectPolicyConfigurationTabPanel.objectTemplate=对象模板 @@ -1170,6 +1180,7 @@ PageAdminObjectDetails.title.newSystemConfigurationType=Create new system config PageAdminObjectDetails.title.editSystemConfigurationType=Edit system configuration PageAdminObjectDetails.noChangesSave=当前没有需要保存的变更。 PageAdminObjectDetails.noChangesPreview=当前没有需要预览的变更。 +PageAdminObjectDetails.message.loadParentOrgs.warning=Cannot load parent org {0} pageAdminFocus.basic=基本 pageAdminFocus.message.cantEditFocus=发生未知的错误,不能编辑主对象。 pageAdminFocus.message.cantNewFocus=发生未知的错误,不能创建新的主对象。 @@ -1265,6 +1276,13 @@ PageBulkAction.button.start=启动 PageBulkAction.message.emptyString=已插入的批量操作是空的,请提供非空的脚本。 PageBulkAction.options=选项 PageBulkAction.title=用户批量操作 +PageBulkAction.message.startPerformed.inProgress={0} has been successfully submitted to execution +PageBulkAction.message.startPerformed.success=Action executed. Returned {0} item(s). Console and data output available via 'Export to XML' function. +PageBulkAction.message.startPerformed.fatalError.execute=Couldn't execute bulk action +PageBulkAction.message.startPerformed.fatalError.submit=Couldn't submit bulk action to execution +PageBulkAction.message.startPerformed.fatalError.parse=Couldn't parse bulk action object +PageBulkAction.message.startPerformed.fatalError.provided=No bulk action object was provided. +PageBulkAction.message.startPerformed.fatalError.notBulkAction=Provided text is not a bulk action object. An instance of {0} is expected; you have provided {1} instead. PageRepositoryQuery.title=存储库查询 PageRepositoryQuery.button.translateAndExecute=转换和运行 PageRepositoryQuery.button.translate=转换成Hibernate查询 @@ -1473,6 +1491,7 @@ PageCertDefinition.scopeEnabledItemsOnly=仅启用的项 PageCertDefinition.stagesDefinition=阶段定义 PageCertDefinitions.message.deleteDefinitionPerformed.success=The definition has been successfully deleted. PageCertDefinitions.message.deleteDefinitionPerformed.partialError=Couldn't delete campaign definition. +PageCertDefinitions.message.createCampaignPerformed.warning=Definition '{0}' is for ad-hoc campaigns that cannot be started manually. PageCert.in=位于{0} PageCert.message.assignment={0}共{1} {2}到{3} {4}。 PageCert.message.textAdministrativeState=管理状态:{0}。 @@ -1521,6 +1540,10 @@ StageDefinitionPanel.addNewStageButton = 添加阶段定义 StageDefinitionPanel.moveStageLeftButton = 往左移 StageDefinitionPanel.moveStageRightButton = 往右移 StageDefinitionPanel.deleteStageButton = 删除阶段 +PageBase.message.parseObject.fatalError=Couldn't parse object: {0} +PageBase.message.loadAdminGuiConfiguration.fatalError=Couldn't load system configuration. +PageBase.message.loadDeploymentInformationType.fatalError=Couldn't load deployment information. +PageBase.message.getAdministratorPrivileged.fatalError=Couldn't get administrator user: {0} PageContacts.title=联系人浏览 pageContentAccounts.button.searchButton=搜索 pageContentAccounts.dialog.title.confirmDelete=删除确认 @@ -2291,6 +2314,10 @@ pageTasks.message.confirmationMessageForSingleTaskObject=确实要{0}任务‘{1 pageTasks.message.confirmationMessageForMultipleTaskObject=确实要{0}选中的{1}个任务吗? pageTasks.message.confirmationMessageForSingleNodeObject=确实要{0}节点‘{1}’吗? pageTasks.message.confirmationMessageForMultipleNodeObject=确实要{0}选定的{1}个节点吗? +pageTasks.message.resumeTasksPerformed.success=The task(s) have been successfully resumed. +pageTasks.message.resumeTasksPerformed.fatalError=Couldn't resume the task(s) +pageTasks.message.synchronizeTasksPerformed.fatalError=Couldn't synchronize tasks +pageTasks.message.deleteAllClosedTasksConfirmedPerformed.fatalError=Error dealing with schema pageTask.scheduleHelp=对于一次性任务, 既不用输入计划时间间隔也不用设置类似 cron 的规范。对于周期性任务, 则需要输入其中一个。 pageTask.scheduleInterval=调度间隔(秒) pageTask.scheduleTitle=调度中 @@ -2499,7 +2526,9 @@ pageWorkItem.requestedBy=请求人: pageWorkItem.requestedOn=请求时间: pageWorkItem.requester.description=请求方 pageWorkItem.requestSpecific.description=您的决定 -webComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.createMenuItemsFromActions.warning=There are no objects to execute the action on +WebComponentUtil.message.refreshResourceSchema.fatalError=Error refreshing resource schema +WebComponentUtil.message.getAssignableRolesFilter.fatalError=Couldn't load available roles WebComponentUtil.formatDurationWordsForLocal.seconds=seconds WebComponentUtil.formatDurationWordsForLocal.minutes=minutes WebComponentUtil.formatDurationWordsForLocal.hours=hours @@ -2553,6 +2582,8 @@ workItemPanel.relatedRequests=相关请求 workItemPanel.reasons=审批流程的原因 workItemPanel.approverComment=审批人备注 workItemPanel.approverInstruction=审批人说明 +PageTaskController.message.deleteSyncTokenPerformed.warning=Token is not present in this task. +PageTaskController.message.deleteSyncTokenPerformed.fatalError=Couldn't delete sync token from the task. pageWorkItems.button.back=返回 pageWorkItems.button.approve=审批 pageWorkItems.button.claim=获取 @@ -2566,9 +2597,12 @@ pageWorkItems.item.status=状态 pageWorkItems.message.noItemSelected=未选择任何工作项。 pageWorkItems.message.noItemToBeReleased=None of the work items can be released (most probably because they were not claimed by the user). pageWorkItems.message.success.approved=The work item(s) have been successfully approved. +pageWorkItems.message.partialError.approved=Couldn't approve/reject work item due to an unexpected exception. pageWorkItems.message.success.rejected=The work item(s) have been successfully rejected. pageWorkItems.message.success.claimed=The work item(s) have been successfully claimed. +pageWorkItems.message.partialError.claimed=Couldn't claim work item due to an unexpected exception. pageWorkItems.message.success.released={0} work item(s) have been successfully released. +pageWorkItems.message.partialError.released=Couldn't release work item due to an unexpected exception. PageWorkItemsAll.title=所有工作项 PageWorkItemsAllocatedToMe.title=分配给我的工作xia PageWorkItem.title=工作项详情 @@ -2657,7 +2691,7 @@ ProvisioningStatistics.MaxTime=最大 ProvisioningStatistics.MinTime=最小 ProvisioningStatistics.ObjectClass=对象类 ProvisioningStatistics.OtherFailure=失败 -ProvisioningStatistics.OtherSuccess=脚本成功 +ProvisioningStatistics.OtherSuccess=Other OK ProvisioningStatistics.Resource=资源 ProvisioningStatistics.ScriptFailure=失败 ProvisioningStatistics.ScriptSuccess=脚本成功 @@ -2680,6 +2714,7 @@ DownloadButtonPanel.download=下载 ReconciliationPopupPanel.resource=资源 ReconciliationPopupPanel.title.basic=复核报告基本配置 repeater.input.nullValid=请选择 +RepoInitialSetup.message.init.fatalError=Repository post initialization failed. ReportConfigurationPanel.title.basic=基本 ReportConfigurationPanel.title.advanced=高级 Requestable.ALL=所有 @@ -2736,6 +2771,11 @@ ResourceAttributeEditor.label.tolerantVP=容错模式 ResourceAttributeEditor.message.cantParseSchema=不能解析资源架构 ResourceAttributeEditor.title.delete=删除 ResourceAttributeEditor.title.edit=编辑 +ResourceContentPanel.message.importResourceObject.warning=Nothing select to import +ResourceContentPanel.message.importResourceObject.partialError=Could not import account {0} +ResourceContentPanel.message.updateResourceObjectStatusPerformed.warning=Nothing selected to update status +ResourceContentPanel.message.updateResourceObjectStatusPerformed.partialError=Could not update status (to {0}) for {1} +ResourceContentPanel.message.deleteResourceObjectPerformed.warning=Nothing selected to delete ResourceCredentialsEditor.label=设置资源凭证 ResourceCredentialsEditor.label.fetchStrategy=获取策略 ResourceCredentialsEditor.label.inbound=入站 @@ -3261,6 +3301,7 @@ type.nullValid=请选择 Type.RECONCILIATION=复核 typeSelect.null=所有角色 Type.USERS=用户 +TypedAssignablePanel.message.addFilterToContentQuery.fatalError=Couldn't load available roles UploadPanel.delete.tooltip=移除文件 UploadPanel.message.help=选择导入的文件。 UploadPanel.message.removeError=文件没有移除。 @@ -3286,6 +3327,7 @@ UserMenuPanel.editPasswordQuestions=安全问题 UserMenuPanel.editProfile=编辑配置 UserMenuPanel.logout=注销 UserMenuPanel.resetPasswords=重置密码 +UserMenuPanel.message.loadSecurityPolicyQuestionsModel.fatalError=Couldn't load system security policy {0} UserOrgReferenceChoosePanel.type.org=组织单元 UserOrgReferenceChoosePanel.type=所有者类型 UserOrgReferenceChoosePanel.type.user=用户 @@ -3302,6 +3344,11 @@ user.noOrgs=没有组织 validFromFetchStrategy.nullValid=请选择 validToFetchStrategy.nullValid=请选择 valueAttribute.nullValid=请选择 +WebModelUtils.couldntRunTask=Couldn't run task {0} +WebModelUtils.couldntLoadPasswordPolicies=Couldn't load password policies. +WebModelUtils.couldntAssumePowerAttorney=Couldn't assume power of attorney +WebModelUtils.couldntDropPowerAttorney=Couldn't drop power of attorney +WebModelUtils.couldntLoadSystemConfiguration=Couldn't load system configuration. WebModelUtils.couldntLoadObject=不能加载对象 WebModelUtils.couldntSaveObject=不能保存对象。 WebModelUtils.couldntSearchObjects=不能搜索对象。 @@ -3810,6 +3857,7 @@ AssignmentConflictPanel.undoAction=撤销 PageAssignmentConflicts.title=分配冲突 PageAssignmentConflicts.back=返回 PageAssignmentConflicts.submit=提交 +PageAssignmentsList.conflictsWarning=Unable to calculate assignment conflicts due to authorization problem. Reason: AbstractShoppingCartTabPanel.addAllButton=Add all AbstractShoppingCartTabPanel.requestingForLabel=Requesting for AbstractShoppingCartTabPanel.availableRelationsLabel=Available relations @@ -4009,6 +4057,8 @@ PageCaseWorkItem.couldNotGetCaseWorkItem=Couldn't get case work item. It might h CsvDownloadButtonPanel.export=CSV导出 CsvDownloadButtonPanel.confirmationMessage=CSV export size is limited to {0} entries. Continue? AssignmentEditorDto.policyRuleTitle=策略规则 +AssignmentEditorDto.message.prepareAssignmentAttributes.fatalError=Exception occurred during assignment attribute loading. +AssignmentEditorDto.message.getReference.fatalError=Couldn't get account construction resource ref. AssignmentDataTablePanel.targetColumnName=目标 AssignmentDataTablePanel.validityColumnName=有效性 AssignmentDataTablePanel.organizationColumnName=组织 @@ -4213,6 +4263,7 @@ WorkItemNotificationActionType.details.newValue=New work item notification actio ResourceObjectAssociationType.details.newValue=New resource object association ResourceAttributeDefinitionType.details.newValue=New resource attribute definition MappingType.details.newValue=New mapping +FullTextSearchIndexedItemsConfigurationType.details.newValue=New full text search indexed items objectState.details=对象状态 assignmentState.details=分配状态 hasAssignment.details=分配有 diff --git a/gui/admin-gui/src/main/resources/static/css/font-evosome.css b/gui/admin-gui/src/main/resources/static/css/font-evosome.css index 36f43585ae1..351ebb9c384 100755 --- a/gui/admin-gui/src/main/resources/static/css/font-evosome.css +++ b/gui/admin-gui/src/main/resources/static/css/font-evosome.css @@ -18,28 +18,50 @@ -moz-osx-font-smoothing: grayscale; } -.fe-assignment-thicker:before { - content: "\e907"; +.fe-officer-cap-object:before { + content: "\e90b"; } -.fe-assignment:before { +.fe-assignment-straight-thicker-object:before { + content: "\e90a"; +} +.fe-unemployer-icon:before { + content: "\e910"; +} +.fe-employer-icon:before { + content: "\e911"; +} +.fe-assignment-straight-object:before { + content: "\e912"; +} +.fe-crown-object:before { content: "\e900"; } -.fe-midpoint-shorter-lines:before { +.fe-approver-object:before { content: "\e901"; } -.fe-midpoint-wheel:before { +.fe-assignment:before { content: "\e902"; } -.fe-midpoint-with-lines:before { +.fe-midpoint-shorter-lines:before { content: "\e903"; } -.fe-role-hat:before { +.fe-midpoint-wheel:before { content: "\e904"; } -.fe-role-tie:before { +.fe-midpoint-with-lines:before { content: "\e905"; } -.fe-role-top-hat:before { +.fe-role-hat:before { content: "\e906"; } +.fe-role-tie:before { + content: "\e907"; +} +.fe-role-top-hat:before { + content: "\e908"; +} +.fe-assignment-thicker:before { + content: "\e909"; +} + diff --git a/gui/admin-gui/src/main/resources/static/fonts/font-evosome.eot b/gui/admin-gui/src/main/resources/static/fonts/font-evosome.eot index 2d5eac8706c..baee26bbac5 100755 Binary files a/gui/admin-gui/src/main/resources/static/fonts/font-evosome.eot and b/gui/admin-gui/src/main/resources/static/fonts/font-evosome.eot differ diff --git a/gui/admin-gui/src/main/resources/static/fonts/font-evosome.svg b/gui/admin-gui/src/main/resources/static/fonts/font-evosome.svg index 0332365732c..ccfc9d05890 100755 --- a/gui/admin-gui/src/main/resources/static/fonts/font-evosome.svg +++ b/gui/admin-gui/src/main/resources/static/fonts/font-evosome.svg @@ -4,15 +4,22 @@ Generated by IcoMoon - + - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gui/admin-gui/src/main/resources/static/fonts/font-evosome.ttf b/gui/admin-gui/src/main/resources/static/fonts/font-evosome.ttf index f2f8022b8f7..468612094fc 100755 Binary files a/gui/admin-gui/src/main/resources/static/fonts/font-evosome.ttf and b/gui/admin-gui/src/main/resources/static/fonts/font-evosome.ttf differ diff --git a/gui/admin-gui/src/main/resources/static/fonts/font-evosome.woff b/gui/admin-gui/src/main/resources/static/fonts/font-evosome.woff index 277bf25ec92..3f90611deb5 100755 Binary files a/gui/admin-gui/src/main/resources/static/fonts/font-evosome.woff and b/gui/admin-gui/src/main/resources/static/fonts/font-evosome.woff differ diff --git a/gui/admin-gui/src/main/resources/static/less/midpoint-theme.less b/gui/admin-gui/src/main/resources/static/less/midpoint-theme.less index 83c688d93ef..8550a8533d9 100644 --- a/gui/admin-gui/src/main/resources/static/less/midpoint-theme.less +++ b/gui/admin-gui/src/main/resources/static/less/midpoint-theme.less @@ -1416,4 +1416,15 @@ th.countLabel{ .content-wrapper { width: 100%; } +} + +.role-catalog > .object-org-box > .org-tree-container{ + max-height: 50vh; +} + +.skin-red > .wrapper > .main-header > .navbar-static-top > .navbar-custom-menu > .shopping-cart-icon > .badge, +.skin-red-light > .wrapper > .main-header > .navbar-static-top > .navbar-custom-menu > .shopping-cart-icon > .badge{ + border-style: solid; + padding: 2px 5px; + border-color: #f4f4f4; } \ No newline at end of file diff --git a/gui/admin-gui/src/main/resources/static/less/midpoint/icon-style.less b/gui/admin-gui/src/main/resources/static/less/midpoint/icon-style.less new file mode 100644 index 00000000000..4b1d176d0ab --- /dev/null +++ b/gui/admin-gui/src/main/resources/static/less/midpoint/icon-style.less @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + i.icon-stroke-layer { + -webkit-text-stroke: 3px white; + -moz-text-stroke: 3px white; + } + + .btn-success > i.icon-stroke-layer { + -webkit-text-stroke-color: #00a65a; + -moz-text-stroke-color: #00a65a; + } + + .btn-default > i.icon-stroke-layer { + -webkit-text-stroke-color: #f4f4f4; + -moz-text-stroke-color: #f4f4f4; + } + + .btn-primary > i.icon-stroke-layer { + -webkit-text-stroke-color: #3c8dbc; + -moz-text-stroke-color: #3c8dbc; + } + + .btn-info > i.icon-stroke-layer { + -webkit-text-stroke-color: #00c0ef; + -moz-text-stroke-color: #00c0ef; + } + + .btn-warning > i.icon-stroke-layer { + -webkit-text-stroke-color: #f39c12; + -moz-text-stroke-color: #f39c12; + } + + .btn-danger > i.icon-stroke-layer { + -webkit-text-stroke-color: #dd4b39; + -moz-text-stroke-color: #dd4b39; + } + + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active){ + i.icon-stroke-layer { + text-shadow: 1px 0px white, + 0px -1px white, + 1px -1px white, + -1px 0px white, + -1px -1px white; + } + + .btn-success > i.icon-stroke-layer { + text-shadow: 1px 0px #00a65a, + 0px -1px #00a65a, + 1px -1px #00a65a, + -1px 0px #00a65a, + -1px -1px #00a65a; + } + + .btn-default > i.icon-stroke-layer { + text-shadow: 1px 0px #f4f4f4, + 0px -1px #f4f4f4, + 1px -1px #f4f4f4, + -1px 0px #f4f4f4, + -1px -1px #f4f4f4; + } + + .btn-primary > i.icon-stroke-layer { + text-shadow: 1px 0px #3c8dbc, + 0px -1px #3c8dbc, + 1px -1px #3c8dbc, + -1px 0px #3c8dbc, + -1px -1px #3c8dbc; + } + + .btn-info > i.icon-stroke-layer { + text-shadow: 1px 0px #00c0ef, + 0px -1px #00c0ef, + 1px -1px #00c0ef, + -1px 0px #00c0ef, + -1px -1px #00c0ef; + } + + .btn-warning > i.icon-stroke-layer { + text-shadow: 1px 0px #f39c12, + 0px -1px #f39c12, + 1px -1px #f39c12, + -1px 0px #f39c12, + -1px -1px #f39c12; + } + + .btn-danger > i.icon-stroke-layer { + text-shadow: 1px 0px #dd4b39, + 0px -1px #dd4b39, + 1px -1px #dd4b39, + -1px 0px #dd4b39, + -1px -1px #dd4b39; + } + } + + i.icon-basic-transparent { + color: #0029ff00; + } + + i.icon-basic-layer { + font-size: 210%; + position: absolute; + left: 0; + right: 0; + } + + i.in-row-layer { + padding-left:5px; + } + + i.bottom-right-layer { + font-size: 100%; + position: absolute; + right: 10%; + bottom: 5%; + } + + i.bottom-left-layer { + font-size: 100%; + position: absolute; + left: 10%; + bottom: 5%; + } \ No newline at end of file diff --git a/gui/admin-gui/src/main/resources/static/less/midpoint/midpoint.less b/gui/admin-gui/src/main/resources/static/less/midpoint/midpoint.less index 593f6e70c87..2ffa495c66d 100755 --- a/gui/admin-gui/src/main/resources/static/less/midpoint/midpoint.less +++ b/gui/admin-gui/src/main/resources/static/less/midpoint/midpoint.less @@ -12,6 +12,7 @@ @import "capabilities.less"; @import "tree-theme-basic.less"; @import "operation-result.less"; +@import "icon-style.less"; /** * Overall styles for correct footer behaviour diff --git a/gui/admin-gui/src/test/java/com/evolveum/midpoint/web/AbstractGuiIntegrationTest.java b/gui/admin-gui/src/test/java/com/evolveum/midpoint/web/AbstractGuiIntegrationTest.java index dac6657f6dc..e47891035bc 100644 --- a/gui/admin-gui/src/test/java/com/evolveum/midpoint/web/AbstractGuiIntegrationTest.java +++ b/gui/admin-gui/src/test/java/com/evolveum/midpoint/web/AbstractGuiIntegrationTest.java @@ -25,6 +25,7 @@ import com.evolveum.midpoint.gui.api.util.WebComponentUtil; import com.evolveum.midpoint.model.api.ModelInteractionService; import com.evolveum.midpoint.model.api.ModelService; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.model.test.AbstractModelIntegrationTest; import com.evolveum.midpoint.prism.PrismContext; import com.evolveum.midpoint.prism.PrismObject; @@ -38,8 +39,12 @@ import com.evolveum.midpoint.security.api.SecurityContextManager; import com.evolveum.midpoint.security.enforcer.api.SecurityEnforcer; import com.evolveum.midpoint.task.api.Task; +import com.evolveum.midpoint.util.exception.CommunicationException; +import com.evolveum.midpoint.util.exception.ConfigurationException; +import com.evolveum.midpoint.util.exception.ExpressionEvaluationException; import com.evolveum.midpoint.util.exception.ObjectNotFoundException; import com.evolveum.midpoint.util.exception.SchemaException; +import com.evolveum.midpoint.util.exception.SecurityViolationException; import com.evolveum.midpoint.util.exception.SystemException; import com.evolveum.midpoint.util.logging.Trace; import com.evolveum.midpoint.util.logging.TraceManager; @@ -215,11 +220,11 @@ public SecurityContextManager getSecurityContextManager() { @NotNull @Override - public AdminGuiConfigurationType getAdminGuiConfiguration() { - Task task = createSimpleTask("getAdminGuiConfiguration"); + public CompiledUserProfile getCompiledUserProfile() { + Task task = createSimpleTask("getCompiledUserProfile"); try { - return getModelInteractionService().getAdminGuiConfiguration(task, task.getResult()); - } catch (ObjectNotFoundException | SchemaException e) { + return getModelInteractionService().getCompiledUserProfile(task, task.getResult()); + } catch (ObjectNotFoundException | SchemaException | CommunicationException | ConfigurationException | SecurityViolationException | ExpressionEvaluationException e) { throw new SystemException(e.getMessage(), e); } } diff --git a/gui/admin-gui/src/test/java/com/evolveum/midpoint/web/AbstractGuiUnitTest.java b/gui/admin-gui/src/test/java/com/evolveum/midpoint/web/AbstractGuiUnitTest.java index 4d77c62ec6e..c98fe5fb01d 100644 --- a/gui/admin-gui/src/test/java/com/evolveum/midpoint/web/AbstractGuiUnitTest.java +++ b/gui/admin-gui/src/test/java/com/evolveum/midpoint/web/AbstractGuiUnitTest.java @@ -24,6 +24,7 @@ import com.evolveum.midpoint.gui.api.util.ModelServiceLocator; import com.evolveum.midpoint.model.api.ModelInteractionService; import com.evolveum.midpoint.model.api.ModelService; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.prism.PrismContext; import com.evolveum.midpoint.prism.util.PrismTestUtil; import com.evolveum.midpoint.repo.common.expression.ExpressionFactory; @@ -77,8 +78,8 @@ public SecurityContextManager getSecurityContextManager() { @NotNull @Override - public AdminGuiConfigurationType getAdminGuiConfiguration() { - return new AdminGuiConfigurationType(); + public CompiledUserProfile getCompiledUserProfile() { + return new CompiledUserProfile(); } @Override diff --git a/gui/admin-gui/src/test/java/com/evolveum/midpoint/web/TestIntegrationSecurity.java b/gui/admin-gui/src/test/java/com/evolveum/midpoint/web/TestIntegrationSecurity.java index d82e8e99045..9b13decb264 100644 --- a/gui/admin-gui/src/test/java/com/evolveum/midpoint/web/TestIntegrationSecurity.java +++ b/gui/admin-gui/src/test/java/com/evolveum/midpoint/web/TestIntegrationSecurity.java @@ -35,10 +35,11 @@ import org.springframework.test.context.ContextConfiguration; import org.testng.annotations.Test; +import com.evolveum.midpoint.model.api.authentication.UserProfileService; import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.security.api.MidPointPrincipal; -import com.evolveum.midpoint.security.api.UserProfileService; +import com.evolveum.midpoint.security.api.MidPointPrincipalManager; import com.evolveum.midpoint.task.api.Task; import com.evolveum.midpoint.util.exception.CommunicationException; import com.evolveum.midpoint.util.exception.ConfigurationException; diff --git a/gui/pom.xml b/gui/pom.xml index 682ed370193..74a37919d05 100644 --- a/gui/pom.xml +++ b/gui/pom.xml @@ -49,11 +49,30 @@ admin-gui + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.testng testng test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/icf-connectors/dummy-connector-fake/pom.xml b/icf-connectors/dummy-connector-fake/pom.xml index 66c95350d3c..7e264a64603 100644 --- a/icf-connectors/dummy-connector-fake/pom.xml +++ b/icf-connectors/dummy-connector-fake/pom.xml @@ -47,6 +47,12 @@ testng test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/icf-connectors/dummy-connector/pom.xml b/icf-connectors/dummy-connector/pom.xml index 07bf09b954a..feddfceb8cb 100644 --- a/icf-connectors/dummy-connector/pom.xml +++ b/icf-connectors/dummy-connector/pom.xml @@ -52,6 +52,12 @@ testng test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/icf-connectors/dummy-resource/pom.xml b/icf-connectors/dummy-resource/pom.xml index dbf1dab4aff..2f2133ff601 100644 --- a/icf-connectors/dummy-resource/pom.xml +++ b/icf-connectors/dummy-resource/pom.xml @@ -48,5 +48,11 @@ testng test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/icf-connectors/pom.xml b/icf-connectors/pom.xml index c2e4910e3fe..5c90092be92 100644 --- a/icf-connectors/pom.xml +++ b/icf-connectors/pom.xml @@ -51,8 +51,21 @@ dummy-connector-fake dummy-resource + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + - + com.evolveum.midpoint.tools test-ng 4.0-SNAPSHOT diff --git a/infra/common/src/main/java/com/evolveum/midpoint/common/crypto/CryptoUtil.java b/infra/common/src/main/java/com/evolveum/midpoint/common/crypto/CryptoUtil.java index 6eccc63501d..5ee9ab83c5a 100644 --- a/infra/common/src/main/java/com/evolveum/midpoint/common/crypto/CryptoUtil.java +++ b/infra/common/src/main/java/com/evolveum/midpoint/common/crypto/CryptoUtil.java @@ -38,6 +38,7 @@ import com.evolveum.midpoint.prism.crypto.Protector; import com.evolveum.midpoint.prism.delta.ItemDelta; import com.evolveum.midpoint.prism.delta.ObjectDelta; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.schema.result.OperationResultStatus; import com.evolveum.midpoint.util.Holder; @@ -294,7 +295,7 @@ public static void securitySelfTest(OperationResult parentTestResult) { if (changes == 0) { return Collections.emptySet(); } - ObjectDelta diff = object.diff(reencrypted, false, true); + ObjectDelta diff = object.diff(reencrypted, EquivalenceStrategy.LITERAL); if (!diff.isModify()) { throw new AssertionError("Expected MODIFY delta, got " + diff); } diff --git a/infra/pom.xml b/infra/pom.xml index ebc404d0f2d..88da9bd2782 100644 --- a/infra/pom.xml +++ b/infra/pom.xml @@ -56,11 +56,30 @@ prism-api prism-impl + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.testng testng test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/infra/prism-api/pom.xml b/infra/prism-api/pom.xml index ac28c685a0c..6fa8f81e6e8 100644 --- a/infra/prism-api/pom.xml +++ b/infra/prism-api/pom.xml @@ -126,12 +126,12 @@ testng test - - - - - - + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/Hacks.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/Hacks.java index 8aacaa0ed19..5acc0d41d08 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/Hacks.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/Hacks.java @@ -16,20 +16,14 @@ package com.evolveum.midpoint.prism; -import com.evolveum.midpoint.prism.path.ItemName; -import com.evolveum.midpoint.prism.xnode.ListXNode; import com.evolveum.midpoint.prism.xnode.MapXNode; -import com.evolveum.midpoint.prism.xnode.PrimitiveXNode; -import com.evolveum.midpoint.prism.xnode.XNode; import com.evolveum.midpoint.util.exception.SchemaException; import com.evolveum.midpoint.util.logging.Trace; import com.evolveum.prism.xml.ns._public.types_3.ProtectedDataType; -import org.jetbrains.annotations.Nullable; import org.w3c.dom.Element; import javax.xml.namespace.QName; import javax.xml.soap.Detail; -import java.io.Serializable; /** * TEMPORARY. @@ -40,24 +34,9 @@ */ public interface Hacks { - @Nullable - Serializable guessFormattedValue(Serializable value) throws SchemaException; - void serializeFaultMessage(Detail detail, Object faultInfo, QName faultMessageElementName, Trace logger); - void setPrimitiveXNodeValue(PrimitiveXNode node, T value, QName typeName); - - void putToMapXNode(MapXNode map, QName key, XNode value); - - void addToListXNode(ListXNode list, XNode... nodes); - void parseProtectedType(ProtectedDataType protectedType, MapXNode xmap, PrismContext prismContext, ParsingContext pc) throws SchemaException; Element serializeSingleElementMapToElement(MapXNode filterClauseXNode) throws SchemaException; - - void setXNodeType(XNode node, QName explicitTypeName, boolean explicitTypeDeclaration); - - void addToDefinition(ComplexTypeDefinition ctd, ItemDefinition other); - - void replaceDefinition(ComplexTypeDefinition ctd, ItemName name, ItemDefinition other); } diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/Item.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/Item.java index 285f4d1cec2..e19fa08f850 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/Item.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/Item.java @@ -16,100 +16,109 @@ package com.evolveum.midpoint.prism; +import com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.delta.ItemDelta; import com.evolveum.midpoint.prism.path.ItemName; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.util.DebugDumpable; import com.evolveum.midpoint.util.exception.SchemaException; -import com.evolveum.midpoint.util.exception.SystemException; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import javax.xml.namespace.QName; import java.io.Serializable; -import java.lang.reflect.Constructor; import java.util.*; import java.util.function.Function; /** - * Item is a common abstraction of Property and PropertyContainer. + * Item is a common abstraction of Property, Reference and Container. *

* This is supposed to be a superclass for all items. Items are things - * that can appear in property containers, which generally means only a property - * and property container itself. Therefore this is in fact superclass for those - * two definitions. + * that can appear in containers, which generally means only a property, reference + * and container itself. Therefore this is in fact superclass for those + * three definitions. * * @author Radovan Semancik */ -public interface Item extends Itemable, DebugDumpable, Visitable, PathVisitable, Serializable, Revivable { +public interface Item extends Itemable, DebugDumpable, Visitable, PathVisitable, + ParentVisitable, Serializable, Revivable { /** - * Returns applicable property definition. + * Returns applicable definition. *

- * May return null if no definition is applicable or the definition is not - * know. + * May return null if no definition is applicable or the definition is not known. * - * @return applicable property definition + * @return applicable definition */ D getDefinition(); + /** + * Returns true if this item and all contained items have proper definition. + */ boolean hasCompleteDefinition(); - - /** - * Returns the name of the property. - *

- * The name is a QName. It uniquely defines a property. - *

- * The name may be null, but such a property will not work. - *

- * The name is the QName of XML element in the XML representation. - * - * @return property name - */ + /** + * Returns the name of the item. + *

+ * The name is a QName. It uniquely defines an item. + *

+ * The name may be null, but such an item will not work. + *

+ * The name is the QName of XML element in the XML representation. + * + * @return item name + * + * TODO consider making element name obligatory + */ @Override ItemName getElementName(); - /** - * Sets the name of the property. - *

- * The name is a QName. It uniquely defines a property. - *

- * The name may be null, but such a property will not work. - *

- * The name is the QName of XML element in the XML representation. - * - * @param elementName the name to set - */ - void setElementName(QName elementName); // todo remove + /** + * Sets the name of the item. + *

+ * The name is a QName. It uniquely defines an item. + *

+ * The name may be null, but such an item will not work. + *

+ * The name is the QName of XML element in the XML representation. + * + * @param elementName the name to set + * + * TODO consider removing this method + */ + void setElementName(QName elementName); /** - * Sets applicable property definition. + * Sets applicable item definition. * * @param definition the definition to set + * + * TODO consider removing this method */ - void setDefinition(D definition); // todo remove + void setDefinition(@Nullable D definition); /** - * Returns a display name for the property type. + * Returns a display name for the item. *

* Returns null if the display name cannot be determined. *

* The display name is fetched from the definition. If no definition * (schema) is available, the display name will not be returned. * - * @return display name for the property type + * @return display name for the item */ String getDisplayName(); /** - * Returns help message defined for the property type. + * Returns help message defined for the item. *

* Returns null if the help message cannot be determined. *

* The help message is fetched from the definition. If no definition * (schema) is available, the help message will not be returned. * - * @return help message for the property type + * @return help message for the item */ String getHelp(); @@ -128,112 +137,191 @@ public interface Item extends It */ boolean isIncomplete(); - void setIncomplete(boolean incomplete); // todo reconsider - - @Override - PrismContext getPrismContext(); - - // Primarily for testing - PrismContext getPrismContextLocal(); - - void setPrismContext(PrismContext prismContext); // todo remove + /** + * Flags the item as incomplete. + * @see Item#isIncomplete() + * + * @param incomplete The new value + */ + void setIncomplete(boolean incomplete); - PrismValue getParent(); + /** + * Returns the parent of this item (if exists). Currently this has to be a PrismContainerValue. + * + * @return The parent if exists + */ + @Nullable + PrismContainerValue getParent(); - void setParent(PrismValue parentValue); // todo remove + /** + * Sets the parent of this item. + * + * @param parentValue The new parent + */ + void setParent(@Nullable PrismContainerValue parentValue); - ItemPath getPath(); + /** + * Returns the path of this item (sequence of names from the "root" container or similar object to this item). + * Note that if the containing object is a delta (usually a container delta), then the path + * + * @return the path + */ + @NotNull + ItemPath getPath(); + /** + * Returns the "user data", a map that allows attaching arbitrary named data to this item. + * @return the user data map + */ + @NotNull Map getUserData(); + /** + * Returns the user data for the given key (name). + */ T getUserData(String key); - void setUserData(String key, Object value); + /** + * Sets the user data for the given key (name). + */ + void setUserData(String key, Object value); + /** + * Returns the values for this item. Although the ordering of this values is not important, and each value should + * be present at most once, we currently return them as a list instead of a set. TODO reconsider this + */ @NotNull List getValues(); - V getValue(int index); + /** + * Returns the number of values for this item. + */ + int size(); + /** + * Returns any of the values. Usually called when we are quite confident that there is only a single value; + * or we don't care which of the values we get. Does not create values if there are none. + */ + V getAnyValue(); + + /** + * Returns the value, if there is only one. Throws exception if there are more values. + * If there is no value, this method either: + * - returns null (for properties) + * - throws an exception (for items that can hold multiple values) + * - creates an empty value (for containers and references). + * + * TODO think again whether getOrCreateValue would not be better + */ + V getValue(); + + /** + * Returns the "real value" (content) of this item: + * - value contained in PrismPropertyValue + * - Referencable in PrismReferenceValue + * - Containerable in PrismContainerValue + * - Objectable in PrismObjectValue + */ + @Nullable Object getRealValue(); - @NotNull + /** + * Returns (potentially empty) collection of "real values". + * @see Item#getRealValue(). + */ + @NotNull Collection getRealValues(); - - // TODO what about dynamic definitions? See MID-3922 + /** + * Returns true if the item contains 0 or 1 values and (by definition) is not multivalued. + */ boolean isSingleValue(); - - boolean hasValue(PrismValue value, boolean ignoreMetadata); - - boolean hasValue(PrismValue value); + //region Add and remove /** - * Returns true if this item has a given value (ignoring metadata). + * Adds a given value, unless an equivalent one is already there (if checkUniqueness is true). + * @return true if this item changed as a result of the call (i.e. if the value was really added) */ - boolean hasValueIgnoringMetadata(PrismValue value); + boolean add(@NotNull V newValue, boolean checkUniqueness) throws SchemaException; /** - * Returns value that is equal or equivalent to the provided value. - * The returned value is an instance stored in this item, while the - * provided value argument may not be. - */ - PrismValue findValue(PrismValue value, boolean ignoreMetadata); - - List findValuesIgnoringMetadata(PrismValue value); - - /** - * Returns value that is previous to the specified value. - * Note that the order is semantically insignificant and this is used only - * for presentation consistency in order-sensitive formats such as XML or JSON. - * TODO consider removing because it's not used - */ - PrismValue getPreviousValue(PrismValue value); - - /** - * Returns values that is following the specified value. - * Note that the order is semantically insignificant and this is used only - * for presentation consistency in order-sensitive formats such as XML or JSON. - * TODO consider removing because it's not used - */ - PrismValue getNextValue(PrismValue value); + * Adds a given value, unless an equivalent one is already there. It is the same as calling add with checkUniqueness=true. + * @return true if this item changed as a result of the call (i.e. if the value was really added) + */ + boolean add(@NotNull V newValue) throws SchemaException; - Collection getClonedValues(); + /** + * Adds a given value, unless an equivalent one is already there. It is the same as calling add with checkUniqueness=true. + * Uses given strategy for equivalence testing. + * + * @return true if this item changed as a result of the call (i.e. if the value was really added) + */ + boolean add(@NotNull V newValue, @NotNull EquivalenceStrategy equivalenceStrategy) throws SchemaException; - boolean contains(V value); + /** + * Adds given values, with the same semantics as repeated add(..) calls. + * @return true if this item changed as a result of the call (i.e. if at least one value was really added) + */ + boolean addAll(Collection newValues) throws SchemaException; - boolean containsEquivalentValue(V value); - - boolean containsEquivalentValue(V value, Comparator comparator); + /** + * Removes given value from the item. + * + * "Given value" currently means any value that is considered equivalent via REAL_VALUE equivalence strategy + * or a value that is considered "the same" via "representsSameValue(.., lax=false)" method. + * + * TODO This is to be refined; most probably including a comparator or comparison strategy designation. + * + * @return true if this item changed as a result of the call (i.e. if at least one value was really removed) + * + * Note that there can be more than one values removed. + */ + boolean remove(V newValue); - boolean contains(V value, boolean ignoreMetadata, Comparator comparator); + /** + * Removes all given values from the item. + * + * @return true if this item changed as a result of the call (i.e. if at least one value was really removed) + */ + boolean removeAll(Collection newValues); - boolean contains(V value, boolean ignoreMetadata); + /** + * Removes all values from the item. + */ + void clear(); - boolean containsRealValue(V value); + /** + * Replaces all values of the item by given values. + */ + void replaceAll(Collection newValues) throws SchemaException; - boolean valuesExactMatch(Collection matchValues, Comparator comparator); + /** + * Replaces all values of the item by given value. + */ + void replace(V newValue); - int size(); + //endregion - boolean addAll(Collection newValues) throws SchemaException; + //region Comparing values - boolean add(@NotNull V newValue) throws SchemaException; + boolean contains(V value); - boolean add(@NotNull V newValue, boolean checkUniqueness) throws SchemaException; + @Deprecated + boolean containsEquivalentValue(V value, Comparator comparator); - boolean removeAll(Collection newValues); + boolean contains(V value, EquivalenceStrategy strategy); - boolean remove(V newValue); + boolean contains(V value, @NotNull EquivalenceStrategy strategy, Comparator comparator); - V remove(int index); + boolean containsRealValue(V value); - void replaceAll(Collection newValues) throws SchemaException; + boolean valuesExactMatch(Collection matchValues, Comparator comparator); + //endregion - void replace(V newValue); + PrismValue findValue(PrismValue value, EquivalenceStrategy strategy); - void clear(); + Collection getClonedValues(); void normalize(); @@ -253,7 +341,7 @@ public interface Item extends It ItemDelta diff(Item other); // We want this method to be consistent with property diff - ItemDelta diff(Item other, boolean ignoreMetadata, boolean isLiteral); + ItemDelta diff(Item other, ParameterizedEquivalenceStrategy strategy); /** * Creates specific subclass of ItemDelta appropriate for type of item that this definition @@ -263,11 +351,11 @@ public interface Item extends It ItemDelta createDelta(ItemPath path); - @Override - void accept(Visitor visitor); - - @Override - void accept(Visitor visitor, ItemPath path, boolean recursive); + /** + * Accepts a visitor that visits each item/value on the way to the structure root. + * @param visitor + */ + void acceptParentVisitor(@NotNull Visitor visitor); /** * Re-apply PolyString (and possible other) normalizations to the object. @@ -348,15 +436,37 @@ static boolean hasNoValues(Item item) { return item == null || item.getValues().isEmpty(); } - boolean equalsRealValue(Object obj); + /** + * Note: hashcode and equals compare the objects in the "java way". That means the objects must be + * almost precisely equal to match (e.g. including source demarcation in values and other "annotations"). + * For a method that compares the "meaningful" parts of the objects see equivalent(). + */ + @Override + int hashCode(); + + int hashCode(@NotNull EquivalenceStrategy equivalenceStrategy); - boolean match(Object obj); + int hashCode(@NotNull ParameterizedEquivalenceStrategy equivalenceStrategy); + + /** + * Note: hashcode and equals compare the objects in the "java way". That means the objects must be + * almost precisely equal to match (e.g. including source demarcation in values and other "annotations"). + * For a method that compares the "meaningful" parts of the objects see equivalent(). + */ + @Override + boolean equals(Object obj); + + boolean equals(Object obj, @NotNull EquivalenceStrategy equivalenceStrategy); + + boolean equals(Object obj, @NotNull ParameterizedEquivalenceStrategy equivalenceStrategy); + + boolean equalsRealValue(Object obj); /** * Returns true if this item is metadata item that should be ignored * for metadata-insensitive comparisons and hashCode functions. */ - boolean isMetadata(); + boolean isOperational(); boolean isImmutable(); @@ -381,4 +491,13 @@ static Collection getValues(Item item) { static Collection getAllValues(Item item, ItemPath path) { return item != null ? item.getAllValues(path) : Collections.emptySet(); } + + @Override + PrismContext getPrismContext(); + + // Primarily for testing + PrismContext getPrismContextLocal(); + + void setPrismContext(PrismContext prismContext); // todo remove + } diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/MutableComplexTypeDefinition.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/MutableComplexTypeDefinition.java index e078771693d..d1930e6f735 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/MutableComplexTypeDefinition.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/MutableComplexTypeDefinition.java @@ -56,4 +56,6 @@ public interface MutableComplexTypeDefinition extends ComplexTypeDefinition, Mut void setListMarker(boolean value); void setCompileTimeClass(Class compileTimeClass); + + void replaceDefinition(QName itemName, ItemDefinition newDefinition); } diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/ParentVisitable.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/ParentVisitable.java new file mode 100644 index 00000000000..3950dfefd14 --- /dev/null +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/ParentVisitable.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.prism; + +/** + * Allows a visitor to follow the path along the "parent" relationship. + */ +@FunctionalInterface +public interface ParentVisitable { + + void acceptParentVisitor(Visitor visitor); + +} diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismConstants.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismConstants.java index 17d75bbe65e..5177ea0221e 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismConstants.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismConstants.java @@ -145,8 +145,5 @@ public class PrismConstants { // a bit of hack: by this local name we know if a object is a reference (c:ObjectReferenceType) public static final String REFERENCE_TYPE_NAME = "ObjectReferenceType"; - public static final boolean EQUALS_DEFAULT_IGNORE_METADATA = true; - public static final boolean EQUALS_DEFAULT_IS_LITERAL = false; - public static final String EXPRESSION_LOCAL_PART = "expression"; } diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainer.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainer.java index edfec57c778..c073a6c737c 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainer.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainer.java @@ -18,6 +18,7 @@ import com.evolveum.midpoint.prism.delta.ContainerDelta; import com.evolveum.midpoint.prism.delta.ItemDelta; +import com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.util.exception.SchemaException; import org.jetbrains.annotations.NotNull; @@ -80,23 +81,12 @@ public interface PrismContainer @Override Collection getRealValues(); - @Override C getRealValue(); - PrismContainerValue getOrCreateValue(); - - PrismContainerValue getValue(); - void setValue(@NotNull PrismContainerValue value) throws SchemaException; - @Override - boolean add(@NotNull PrismContainerValue newValue, boolean checkUniqueness) throws SchemaException; - - @Override - PrismContainerValue getPreviousValue(PrismValue value); - - @Override - PrismContainerValue getNextValue(PrismValue value); + @NotNull + PrismContainerValue getValue(); PrismContainerValue getValue(Long id); @@ -146,12 +136,6 @@ public interface PrismContainer > I findItem(QName itemQName, Class type); - /** - * Returns true if the object and all contained prisms have proper definition. - */ - @Override - boolean hasCompleteDefinition(); - @Override Object find(ItemPath path); @@ -248,11 +232,11 @@ void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, ContainerDelta diff(PrismContainer other); - ContainerDelta diff(PrismContainer other, boolean ignoreMetadata, boolean isLiteral); + ContainerDelta diff(PrismContainer other, ParameterizedEquivalenceStrategy strategy); List diffModifications(PrismContainer other); - List diffModifications(PrismContainer other, boolean ignoreMetadata, boolean isLiteral); + List diffModifications(PrismContainer other, ParameterizedEquivalenceStrategy strategy); @Override PrismContainer clone(); @@ -262,30 +246,16 @@ void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, PrismContainerDefinition deepCloneDefinition(boolean ultraDeep, Consumer postCloneAction); - @Override + @Deprecated boolean containsEquivalentValue(PrismContainerValue value); + @Deprecated @Override boolean containsEquivalentValue(PrismContainerValue value, Comparator> comparator); @Override void accept(Visitor visitor, ItemPath path, boolean recursive); - /** - * Note: hashcode and equals compare the objects in the "java way". That means the objects must be - * almost precisely equal to match (e.g. including source demarcation in values and other "annotations"). - * For a method that compares the "meaningful" parts of the objects see equivalent(). - */ - @Override - int hashCode(); - - /** - * Note: hashcode and equals compare the objects in the "java way". That means the objects must be - * almost precisely equal to match (e.g. including source demarcation in values and other "annotations"). - * For a method that compares the "meaningful" parts of the objects see equivalent(). - */ - @Override - boolean equals(Object obj); /** * This method ignores some part of the object during comparison (e.g. source demarcation in values) diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainerValue.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainerValue.java index 5e84d212152..b547701338c 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainerValue.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainerValue.java @@ -15,9 +15,9 @@ */ package com.evolveum.midpoint.prism; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.prism.path.ItemName; -import com.evolveum.midpoint.util.DebugDumpable; import com.evolveum.midpoint.util.exception.SchemaException; import com.evolveum.midpoint.util.exception.SystemException; import org.apache.commons.lang.Validate; @@ -35,7 +35,7 @@ * @author semancik * */ -public interface PrismContainerValue extends PrismValue, DebugDumpable { +public interface PrismContainerValue extends PrismValue, ParentVisitable { static T asContainerable(PrismContainerValue value) { return value != null ? value.asContainerable() : null; @@ -170,7 +170,7 @@ static T asContainerable(PrismContainerValue value) static boolean containsRealValue(Collection> cvalCollection, PrismContainerValue cval) { for (PrismContainerValue colVal: cvalCollection) { - if (colVal.equalsRealValue(cval)) { + if (colVal.equals(cval, EquivalenceStrategy.REAL_VALUE)) { return true; } } @@ -296,11 +296,6 @@ > I findOr @Override PrismContainerValue cloneComplex(CloneStrategy strategy); - @Override - boolean equalsComplex(PrismValue other, boolean ignoreMetadata, boolean isLiteral); - - boolean equalsComplex(PrismContainerValue other, boolean ignoreMetadata, boolean isLiteral); - boolean equivalent(PrismContainerValue other); @Override @@ -315,8 +310,6 @@ > I findOr @Override String debugDump(int indent); - boolean match(PrismValue otherValue); - String toHumanReadableString(); // copies the definition from original to aClone (created outside of this method) @@ -415,4 +408,6 @@ static Collection asContainerables(Collection getDefinition(); + + void acceptParentVisitor(Visitor visitor); } diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainerable.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainerable.java index b31a817ef3c..9d87cc65bb5 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainerable.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainerable.java @@ -19,7 +19,7 @@ * @author semancik * */ -public interface PrismContainerable extends Itemable { +public interface PrismContainerable extends Itemable, ParentVisitable { @Override PrismContainerDefinition getDefinition(); diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContext.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContext.java index a00365f5ca4..cb05a47bd40 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContext.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContext.java @@ -35,6 +35,7 @@ import com.evolveum.midpoint.prism.util.PrismMonitor; import com.evolveum.midpoint.prism.xnode.RootXNode; import com.evolveum.midpoint.prism.xnode.XNodeFactory; +import com.evolveum.midpoint.prism.xnode.XNodeMutator; import com.evolveum.midpoint.util.exception.SchemaException; import com.evolveum.prism.xml.ns._public.types_3.ItemPathType; import com.evolveum.prism.xml.ns._public.types_3.PolyStringNormalizerConfigurationType; @@ -317,6 +318,8 @@ void adopt(PrismContainerValue extends PrismContainer { @Override void setValue(@NotNull PrismContainerValue value) throws SchemaException; - @Override - boolean add(@NotNull PrismContainerValue newValue, boolean checkUniqueness) throws SchemaException; - /** * Returns Object ID (OID). * @@ -130,7 +128,7 @@ public interface PrismObject extends PrismContainer { ObjectDelta diff(PrismObject other); @NotNull - ObjectDelta diff(PrismObject other, boolean ignoreMetadata, boolean isLiteral); + ObjectDelta diff(PrismObject other, ParameterizedEquivalenceStrategy strategy); @SuppressWarnings({ "rawtypes", "unchecked" }) Collection> narrowModifications(Collection> modifications); @@ -144,11 +142,12 @@ public interface PrismObject extends PrismContainer { ObjectDelta createDeleteDelta(); @Override - void setParent(PrismValue parentValue); + void setParent(PrismContainerValue parentValue); @Override - PrismValue getParent(); + PrismContainerValue getParent(); + @NotNull @Override ItemPath getPath(); diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismProperty.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismProperty.java index a8ad2f7ebff..4b48d69f407 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismProperty.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismProperty.java @@ -17,6 +17,7 @@ package com.evolveum.midpoint.prism; import com.evolveum.midpoint.prism.delta.PropertyDelta; +import com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import org.jetbrains.annotations.NotNull; @@ -66,13 +67,14 @@ public interface PrismProperty extends Item,PrismProper */ void setDefinition(PrismPropertyDefinition definition); - PrismPropertyValue getValue(); - /** * Type override, also for compatibility. */ List> getValues(Class type); + @Override + PrismPropertyValue getValue(); + @NotNull @Override Collection getRealValues(); @@ -85,8 +87,6 @@ public interface PrismProperty extends Item,PrismProper T getAnyRealValue(); - PrismPropertyValue getAnyValue(); - @Override T getRealValue(); @@ -129,16 +129,8 @@ public interface PrismProperty extends Item,PrismProper void replaceValues(Collection> valuesToReplace); - boolean hasValue(PrismPropertyValue value); - boolean hasRealValue(PrismPropertyValue value); - @Override - PrismPropertyValue getPreviousValue(PrismValue value); - - @Override - PrismPropertyValue getNextValue(PrismValue value); - Class getValueClass(); @Override @@ -155,7 +147,7 @@ public interface PrismProperty extends Item,PrismProper PropertyDelta diff(PrismProperty other); - PropertyDelta diff(PrismProperty other, boolean ignoreMetadata, boolean isLiteral); + PropertyDelta diff(PrismProperty other, ParameterizedEquivalenceStrategy strategy); @Override PrismProperty clone(); diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismPropertyValue.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismPropertyValue.java index fcd8419688c..1324a3a72bb 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismPropertyValue.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismPropertyValue.java @@ -16,6 +16,7 @@ package com.evolveum.midpoint.prism; +import com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy; import com.evolveum.midpoint.prism.match.MatchingRule; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.prism.xnode.XNode; @@ -71,12 +72,7 @@ public interface PrismPropertyValue extends DebugDumpable, Serializable, Pris @Override PrismPropertyValue cloneComplex(CloneStrategy strategy); - @Override - boolean equalsComplex(PrismValue other, boolean ignoreMetadata, boolean isLiteral); - - boolean equalsComplex(PrismPropertyValue other, boolean ignoreMetadata, boolean isLiteral, MatchingRule matchingRule); - - boolean match(PrismValue otherValue); + boolean equals(PrismPropertyValue other, ParameterizedEquivalenceStrategy strategy, MatchingRule matchingRule); @Override boolean equals(Object obj); diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismReference.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismReference.java index dbc28e5d7e0..3f78a75d115 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismReference.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismReference.java @@ -44,11 +44,6 @@ public interface PrismReference extends Item getRealValues(); - boolean add(@NotNull PrismReferenceValue value); - boolean merge(PrismReferenceValue value); String getOid(); diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismReferenceValue.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismReferenceValue.java index 6dc67587eef..f878abb7d32 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismReferenceValue.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismReferenceValue.java @@ -142,11 +142,6 @@ public interface PrismReferenceValue extends PrismValue, ShortDumpable { */ PrismReferenceValue toCanonical(); - @Override - boolean equalsComplex(PrismValue other, boolean ignoreMetadata, boolean isLiteral); - - boolean equalsComplex(PrismReferenceValue other, boolean ignoreMetadata, boolean isLiteral); - @Override boolean equals(Object obj); @@ -156,8 +151,6 @@ public interface PrismReferenceValue extends PrismValue, ShortDumpable { @Override boolean representsSameValue(PrismValue other, boolean lax); - boolean representsSameValue(PrismReferenceValue other); - @Override String toString(); @@ -177,11 +170,6 @@ public interface PrismReferenceValue extends PrismValue, ShortDumpable { @Override PrismReferenceValue cloneComplex(CloneStrategy strategy); - boolean match(PrismValue otherValue); - - /* (non-Javadoc) - * @see com.evolveum.midpoint.prism.PrismValue#getHumanReadableDump() - */ String toHumanReadableString(); @Override diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismValue.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismValue.java index 190368b720d..a0350740c34 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismValue.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismValue.java @@ -16,6 +16,8 @@ package com.evolveum.midpoint.prism; import com.evolveum.midpoint.prism.delta.ItemDelta; +import com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.util.DebugDumpable; import com.evolveum.midpoint.util.exception.SchemaException; @@ -113,15 +115,15 @@ public interface PrismValue extends Visitable, PathVisitable, Serializable, Debu */ PrismValue cloneComplex(CloneStrategy strategy); - boolean equalsComplex(PrismValue other, boolean ignoreMetadata, boolean isLiteral); + int hashCode(@NotNull EquivalenceStrategy equivalenceStrategy); - boolean equals(PrismValue otherValue, boolean ignoreMetadata); + int hashCode(@NotNull ParameterizedEquivalenceStrategy equivalenceStrategy); - boolean equals(PrismValue thisValue, PrismValue otherValue); + boolean equals(PrismValue otherValue, @NotNull EquivalenceStrategy strategy); - boolean equalsRealValue(PrismValue otherValue); + boolean equals(PrismValue otherValue, @NotNull ParameterizedEquivalenceStrategy strategy); - boolean equalsRealValue(PrismValue thisValue, PrismValue otherValue); + boolean equals(PrismValue thisValue, PrismValue otherValue); /** * Assumes matching representations. I.e. it assumes that both this and otherValue represent the same instance of item. @@ -133,7 +135,7 @@ public interface PrismValue extends Visitable, PathVisitable, Serializable, Debu * Assumes matching representations. I.e. it assumes that both this and otherValue represent the same instance of item. * E.g. the container with the same ID. */ - Collection diff(PrismValue otherValue, boolean ignoreMetadata, boolean isLiteral); + Collection diff(PrismValue otherValue, ParameterizedEquivalenceStrategy strategy); boolean isImmutable(); @@ -167,9 +169,9 @@ public interface PrismValue extends Visitable, PathVisitable, Serializable, Debu String toHumanReadableString(); - // todo hide from public - void diffMatchingRepresentation(PrismValue otherValue, - Collection deltas, boolean ignoreMetadata, boolean isLiteral); +// // todo hide from public +// void diffMatchingRepresentation(PrismValue otherValue, +// Collection deltas, boolean ignoreMetadata, boolean isLiteral); Object find(ItemPath path); } diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismValueCollectionsUtil.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismValueCollectionsUtil.java index 59ea390ce62..7c709af1172 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismValueCollectionsUtil.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismValueCollectionsUtil.java @@ -16,6 +16,7 @@ package com.evolveum.midpoint.prism; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.prism.util.PrismUtil; import com.evolveum.midpoint.util.MiscUtil; @@ -41,7 +42,7 @@ public static Collection getValues(Collection> pval public static boolean containsRealValue(Collection> collection, PrismPropertyValue value) { for (PrismPropertyValue colVal: collection) { - if (value.equalsRealValue(colVal)) { + if (value.equals(colVal, EquivalenceStrategy.REAL_VALUE)) { return true; } } @@ -119,10 +120,10 @@ public static boolean containsRealValue(Collection col public static boolean equalsRealValues(Collection collection1, Collection collection2) { - return MiscUtil.unorderedCollectionEquals(collection1, collection2, (v1, v2) -> v1.equalsRealValue(v2)); + return MiscUtil.unorderedCollectionEquals(collection1, collection2, (v1, v2) -> v1.equals(v2, EquivalenceStrategy.REAL_VALUE)); } - public static boolean containsAll(Collection thisSet, Collection otherSet, boolean ignoreMetadata, boolean isLiteral) { + public static boolean containsAll(Collection thisSet, Collection otherSet, EquivalenceStrategy strategy) { if (thisSet == null && otherSet == null) { return true; } @@ -133,7 +134,7 @@ public static boolean containsAll(Collection thisSet, return false; } for (V otherValue: otherSet) { - if (!contains(thisSet, otherValue, ignoreMetadata, isLiteral)) { + if (!contains(thisSet, otherValue, strategy)) { return false; } } @@ -176,7 +177,7 @@ public static boolean containsRealValue(Collection return value == null; } - if (valueExtractor.apply(colVal).equalsRealValue(value)) { + if (valueExtractor.apply(colVal).equals(value, EquivalenceStrategy.REAL_VALUE)) { return true; } @@ -184,9 +185,9 @@ public static boolean containsRealValue(Collection return false; } - public static boolean contains(Collection thisSet, V otherValue, boolean ignoreMetadata, boolean isLiteral) { + public static boolean contains(Collection thisSet, V otherValue, EquivalenceStrategy strategy) { for (V thisValue: thisSet) { - if (thisValue.equalsComplex(otherValue, ignoreMetadata, isLiteral)) { + if (thisValue.equals(otherValue, strategy)) { return true; } } @@ -219,7 +220,7 @@ public static boolean collectionContainsEquivalentValue(C return false; } for (V collectionVal: collection) { - if (collectionVal.equals(value, true)) { + if (collectionVal.equals(value, EquivalenceStrategy.IGNORE_METADATA)) { return true; } } diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/delta/ItemDelta.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/delta/ItemDelta.java index dcf7b903764..98e7e08bdd6 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/delta/ItemDelta.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/delta/ItemDelta.java @@ -15,28 +15,22 @@ */ package com.evolveum.midpoint.prism.delta; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Comparator; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.function.Function; - -import javax.xml.namespace.QName; - import com.evolveum.midpoint.prism.*; -import com.evolveum.midpoint.prism.path.*; -import com.evolveum.midpoint.prism.util.CloneUtil; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; +import com.evolveum.midpoint.prism.path.ItemName; +import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.util.DebugDumpable; import com.evolveum.midpoint.util.Foreachable; import com.evolveum.midpoint.util.Processor; import com.evolveum.midpoint.util.exception.SchemaException; -import com.evolveum.prism.xml.ns._public.types_3.ItemDeltaType; -import com.evolveum.prism.xml.ns._public.types_3.ModificationTypeType; import org.jetbrains.annotations.NotNull; +import javax.xml.namespace.QName; +import java.io.Serializable; +import java.util.Collection; +import java.util.Comparator; +import java.util.function.Function; + /** * @author Radovan Semancik * @@ -302,7 +296,7 @@ public interface ItemDelta extend * in this delta. As a consequence it also returns true if the two * deltas are equal. */ - boolean contains(ItemDelta other, boolean ignoreMetadata, boolean isLiteral); + boolean contains(ItemDelta other, EquivalenceStrategy strategy); void filterValues(Function function); diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/delta/ObjectDelta.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/delta/ObjectDelta.java index c7df6a2a4bb..29625dbd3c4 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/delta/ObjectDelta.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/delta/ObjectDelta.java @@ -16,6 +16,7 @@ package com.evolveum.midpoint.prism.delta; import com.evolveum.midpoint.prism.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.util.DebugDumpable; import com.evolveum.midpoint.util.exception.SchemaException; @@ -97,7 +98,7 @@ static boolean isModify(ObjectDelta objectDelta) { boolean containsModification(ItemDelta itemDelta); - boolean containsModification(ItemDelta itemDelta, boolean ignoreMetadata, boolean isLiteral); + boolean containsModification(ItemDelta itemDelta, EquivalenceStrategy strategy); void addModifications(Collection itemDeltas); diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/equivalence/EquivalenceStrategy.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/equivalence/EquivalenceStrategy.java new file mode 100644 index 00000000000..1b73111e9c6 --- /dev/null +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/equivalence/EquivalenceStrategy.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.evolveum.midpoint.prism.equivalence; + +import com.evolveum.midpoint.prism.Item; +import com.evolveum.midpoint.prism.PrismValue; + +/** + * A strategy used to determine equivalence of prism items and values. + * + * This is quite generic interface. We expect that usually it will not be implemented directly, because comparing prism + * structures is a complex undertaking. The usual approach will be using ParameterizedEquivalenceStrategy that contains + * a set of parameters that drive equals/hashCode methods built into prism structures. + * + * However, if anyone would need the ultimate flexibility, he is free to implement this interface from scratch. + * + * (Note that not all methods in prism API accept this generic form of equivalence strategy. For example, diff(..) methods + * are limited to ParameterizedEquivalenceStrategy at least for now.) + * + * @see ParameterizedEquivalenceStrategy for explanation of individual strategies. + */ + +public interface EquivalenceStrategy { + + ParameterizedEquivalenceStrategy LITERAL = ParameterizedEquivalenceStrategy.LITERAL; + ParameterizedEquivalenceStrategy NOT_LITERAL = ParameterizedEquivalenceStrategy.NOT_LITERAL; + ParameterizedEquivalenceStrategy IGNORE_METADATA = ParameterizedEquivalenceStrategy.IGNORE_METADATA; + ParameterizedEquivalenceStrategy LITERAL_IGNORE_METADATA = ParameterizedEquivalenceStrategy.LITERAL_IGNORE_METADATA; + ParameterizedEquivalenceStrategy REAL_VALUE = ParameterizedEquivalenceStrategy.REAL_VALUE; + + boolean equals(Item first, Item second); + boolean equals(PrismValue first, PrismValue second); + + int hashCode(Item item); + int hashCode(PrismValue value); +} diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/equivalence/ParameterizedEquivalenceStrategy.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/equivalence/ParameterizedEquivalenceStrategy.java new file mode 100644 index 00000000000..b1cc252e98b --- /dev/null +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/equivalence/ParameterizedEquivalenceStrategy.java @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.evolveum.midpoint.prism.equivalence; + +import com.evolveum.midpoint.prism.Item; +import com.evolveum.midpoint.prism.PrismValue; + +/** + * Implementation of EquivalenceStrategy that uses a parametrization of built-in equals/hashCode/diff methods. + * + * These strategies are still in progress and (most probably) will be changed before 4.0 release. + * + * The difference between REAL_VALUE and IGNORE_METADATA is to be established yet. + * + * Basically, REAL_VALUE is oriented towards the effective content of the item or value. + * Contrary to IGNORE_METADATA it ignores element names and reference filters (if OID is present). + */ +public class ParameterizedEquivalenceStrategy implements EquivalenceStrategy { + + /** + * The (almost) highest level of recognition. Useful e.g. for comparing values for the purpose of XML editing. + * Still, ignores e.g. definitions, parent objects, immutability flag, etc. + * + * Corresponds to pre-4.0 flags ignoreMetadata = false, literal = true. + */ + public static final ParameterizedEquivalenceStrategy LITERAL; + + /** + * As LITERAL but ignores XML namespace prefixes. + * Also fills-in default relation name if not present (when comparing reference values). + * + * Currently this is the default for equals/hashCode. + * + * Corresponds to pre-4.0 flags ignoreMetadata = false, literal = false. + */ + public static final ParameterizedEquivalenceStrategy NOT_LITERAL; + + /** + * Ignores metadata, typically operational items and values, container IDs, and origin information. + * + * Currently this is the default for diff. + * + * Corresponds to pre-4.0 flags ignoreMetadata = true, literal = false. + */ + public static final ParameterizedEquivalenceStrategy IGNORE_METADATA; + + /** + * As IGNORE_METADATA, but takes XML namespace prefixes into account. + * + * It is not clear in which situations this should be needed. But we include it here for compatibility reasons. + * Historically it is used on a few places in midPoint. + * + * Corresponds to pre-4.0 flags ignoreMetadata = true, literal = true. + */ + public static final ParameterizedEquivalenceStrategy LITERAL_IGNORE_METADATA; + + /** + * Compares the real content if prism structures. + * Corresponds to "equalsRealValue" method used in pre-4.0. + * + * It is to be seen if operational data should be considered in this mode (they are ignored now). + * So, currently this is the most lax way of determining equivalence. + */ + public static final ParameterizedEquivalenceStrategy REAL_VALUE; + + static { + LITERAL = new ParameterizedEquivalenceStrategy(); + LITERAL.compareElementNames = true; + LITERAL.consideringValueOrigin = true; + LITERAL.literalDomComparison = true; + LITERAL.consideringContainerIds = true; + LITERAL.consideringOperationalData = true; + LITERAL.consideringReferenceFilters = true; + + NOT_LITERAL = new ParameterizedEquivalenceStrategy(); + NOT_LITERAL.compareElementNames = true; + NOT_LITERAL.consideringValueOrigin = true; + NOT_LITERAL.literalDomComparison = false; + NOT_LITERAL.consideringContainerIds = true; + NOT_LITERAL.consideringOperationalData = true; + NOT_LITERAL.consideringReferenceFilters = true; + + IGNORE_METADATA = new ParameterizedEquivalenceStrategy(); + IGNORE_METADATA.compareElementNames = true; //??? + IGNORE_METADATA.consideringValueOrigin = false; + IGNORE_METADATA.literalDomComparison = false; + IGNORE_METADATA.consideringContainerIds = false; + IGNORE_METADATA.consideringOperationalData = false; + IGNORE_METADATA.consideringReferenceFilters = true; + + LITERAL_IGNORE_METADATA = new ParameterizedEquivalenceStrategy(); + LITERAL_IGNORE_METADATA.compareElementNames = true; + LITERAL_IGNORE_METADATA.consideringValueOrigin = false; + LITERAL_IGNORE_METADATA.literalDomComparison = true; + LITERAL_IGNORE_METADATA.consideringContainerIds = false; + LITERAL_IGNORE_METADATA.consideringOperationalData = false; + LITERAL_IGNORE_METADATA.consideringReferenceFilters = true; + + REAL_VALUE = new ParameterizedEquivalenceStrategy(); + REAL_VALUE.compareElementNames = false; + REAL_VALUE.consideringValueOrigin = false; + REAL_VALUE.literalDomComparison = false; + REAL_VALUE.consideringContainerIds = false; + REAL_VALUE.consideringOperationalData = false; + REAL_VALUE.consideringReferenceFilters = false; + } + + private boolean compareElementNames; + private boolean consideringValueOrigin; + private boolean literalDomComparison; + private boolean consideringContainerIds; + private boolean consideringOperationalData; + private boolean consideringReferenceFilters; + + @Override + public boolean equals(Item first, Item second) { + return first == second || first != null && second != null && first.equals(second, this); + } + + @Override + public boolean equals(PrismValue first, PrismValue second) { + return first == second || first != null && second != null && first.equals(second, this); + } + + @Override + public int hashCode(Item item) { + return item != null ? item.hashCode(this) : 0; + } + + @Override + public int hashCode(PrismValue value) { + return value != null ? value.hashCode(this) : 0; + } + + public boolean isConsideringDefinitions() { + return false; + } + + public boolean isConsideringElementNames() { + return compareElementNames; + } + + public void setCompareElementNames(boolean compareElementNames) { + this.compareElementNames = compareElementNames; + } + + public boolean isConsideringValueOrigin() { + return consideringValueOrigin; + } + + public void setConsideringValueOrigin(boolean consideringValueOrigin) { + this.consideringValueOrigin = consideringValueOrigin; + } + + public boolean isLiteralDomComparison() { + return literalDomComparison; + } + + public void setLiteralDomComparison(boolean literalDomComparison) { + this.literalDomComparison = literalDomComparison; + } + + public boolean isConsideringContainerIds() { + return consideringContainerIds; + } + + public void setConsideringContainerIds(boolean consideringContainerIds) { + this.consideringContainerIds = consideringContainerIds; + } + + public boolean isConsideringOperationalData() { + return consideringOperationalData; + } + + public void setConsideringOperationalData(boolean consideringOperationalData) { + this.consideringOperationalData = consideringOperationalData; + } + + public boolean isConsideringReferenceFilters() { + return consideringReferenceFilters; + } + + public void setConsideringReferenceFilters(boolean consideringReferenceFilters) { + this.consideringReferenceFilters = consideringReferenceFilters; + } +} diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedMutableComplexTypeDefinition.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedMutableComplexTypeDefinition.java deleted file mode 100644 index ecfa7ef677e..00000000000 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedMutableComplexTypeDefinition.java +++ /dev/null @@ -1,493 +0,0 @@ -/* - * Copyright (c) 2010-2018 Evolveum - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.evolveum.midpoint.prism.extensions; - -import com.evolveum.midpoint.prism.*; -import com.evolveum.midpoint.prism.path.ItemName; -import com.evolveum.midpoint.prism.path.ItemPath; -import com.evolveum.midpoint.prism.schema.SchemaRegistry; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import javax.xml.namespace.QName; -import java.util.Collection; -import java.util.IdentityHashMap; -import java.util.List; -import java.util.Map; -import java.util.function.Consumer; - -/** - * - */ -public class AbstractDelegatedMutableComplexTypeDefinition implements MutableComplexTypeDefinition { - - protected MutableComplexTypeDefinition inner; - - public AbstractDelegatedMutableComplexTypeDefinition(QName typeName, PrismContext prismContext) { - inner = prismContext.definitionFactory().createComplexTypeDefinition(typeName); - } - - public AbstractDelegatedMutableComplexTypeDefinition(MutableComplexTypeDefinition inner) { - this.inner = inner; - } - - @Override - @NotNull - public List getDefinitions() { - return inner.getDefinitions(); - } - - @Override - public boolean isShared() { - return inner.isShared(); - } - - @Override - @Nullable - public QName getExtensionForType() { - return inner.getExtensionForType(); - } - - @Override - public boolean isReferenceMarker() { - return inner.isReferenceMarker(); - } - - @Override - public boolean isContainerMarker() { - return inner.isContainerMarker(); - } - - @Override - public boolean isObjectMarker() { - return inner.isObjectMarker(); - } - - @Override - public boolean isXsdAnyMarker() { - return inner.isXsdAnyMarker(); - } - - @Override - public boolean isListMarker() { - return inner.isListMarker(); - } - - @Override - @Nullable - public String getDefaultNamespace() { - return inner.getDefaultNamespace(); - } - - @Override - @NotNull - public List getIgnoredNamespaces() { - return inner.getIgnoredNamespaces(); - } - - @Override - public void merge(ComplexTypeDefinition otherComplexTypeDef) { - inner.merge(otherComplexTypeDef); - } - - @Override - public void revive(PrismContext prismContext) { - inner.revive(prismContext); - } - - @Override - public boolean isEmpty() { - return inner.isEmpty(); - } - - @Override - @NotNull - public ComplexTypeDefinition clone() { - return inner.clone(); - } - - @Override - @NotNull - public ComplexTypeDefinition deepClone( - Map ctdMap, - Map onThisPath, - Consumer postCloneAction) { - return inner.deepClone(ctdMap, onThisPath, postCloneAction); - } - - @Override - public void trimTo(@NotNull Collection paths) { - inner.trimTo(paths); - } - - @Override - public boolean containsItemDefinition(QName itemName) { - return inner.containsItemDefinition(itemName); - } - - @Override - public MutableComplexTypeDefinition toMutable() { - return inner.toMutable(); - } - - @Override - @Nullable - public Class getCompileTimeClass() { - return inner.getCompileTimeClass(); - } - - @Override - @Nullable - public QName getSuperType() { - return inner.getSuperType(); - } - - @Override - @NotNull - public Collection getStaticSubTypes() { - return inner.getStaticSubTypes(); - } - - @Override - public Integer getInstantiationOrder() { - return inner.getInstantiationOrder(); - } - - @Override - public boolean canRepresent(QName typeName) { - return inner.canRepresent(typeName); - } - - @Override - @NotNull - public QName getTypeName() { - return inner.getTypeName(); - } - - @Override - public boolean isRuntimeSchema() { - return inner.isRuntimeSchema(); - } - - @Override - @Deprecated - public boolean isIgnored() { - return inner.isIgnored(); - } - - @Override - public ItemProcessing getProcessing() { - return inner.getProcessing(); - } - - @Override - public boolean isAbstract() { - return inner.isAbstract(); - } - - @Override - public boolean isDeprecated() { - return inner.isDeprecated(); - } - - @Override - public boolean isExperimental() { - return inner.isExperimental(); - } - - @Override - public String getPlannedRemoval() { - return inner.getPlannedRemoval(); - } - - @Override - public boolean isElaborate() { - return inner.isElaborate(); - } - - @Override - public String getDeprecatedSince() { - return inner.getDeprecatedSince(); - } - - @Override - public boolean isEmphasized() { - return inner.isEmphasized(); - } - - @Override - public String getDisplayName() { - return inner.getDisplayName(); - } - - @Override - public Integer getDisplayOrder() { - return inner.getDisplayOrder(); - } - - @Override - public String getHelp() { - return inner.getHelp(); - } - - @Override - public String getDocumentation() { - return inner.getDocumentation(); - } - - @Override - public String getDocumentationPreview() { - return inner.getDocumentationPreview(); - } - - @Override - public PrismContext getPrismContext() { - return inner.getPrismContext(); - } - - @Override - public SchemaRegistry getSchemaRegistry() { - return inner.getSchemaRegistry(); - } - - @Override - public Class getTypeClassIfKnown() { - return inner.getTypeClassIfKnown(); - } - - @Override - public Class getTypeClass() { - return inner.getTypeClass(); - } - - @Override - public A getAnnotation(QName qname) { - return inner.getAnnotation(qname); - } - - @Override - public void setAnnotation(QName qname, A value) { - inner.setAnnotation(qname, value); - } - - @Override - public String debugDump(int indent, IdentityHashMap seen) { - return inner.debugDump(indent, seen); - } - - @Override - public String debugDump() { - return inner.debugDump(); - } - - @Override - public String debugDump(int indent) { - return inner.debugDump(indent); - } - - @Override - public Object debugDumpLazily() { - return inner.debugDumpLazily(); - } - - @Override - public Object debugDumpLazily(int index) { - return inner.debugDumpLazily(index); - } - - @Override - public ID findLocalItemDefinition( - @NotNull QName name, - @NotNull Class clazz, boolean caseInsensitive) { - return inner.findLocalItemDefinition(name, clazz, caseInsensitive); - } - - @Override - public ID findLocalItemDefinition( - @NotNull QName name) { - return inner.findLocalItemDefinition(name); - } - - @Override - public ID findItemDefinition( - @NotNull ItemPath path) { - return inner.findItemDefinition(path); - } - - @Override - public PrismReferenceDefinition findReferenceDefinition( - @NotNull ItemName name) { - return inner.findReferenceDefinition(name); - } - - @Override - public PrismContainerDefinition findContainerDefinition( - @NotNull String name) { - return inner.findContainerDefinition(name); - } - - @Override - public ID findItemDefinition( - @NotNull ItemPath path, - @NotNull Class clazz) { - return inner.findItemDefinition(path, clazz); - } - - @Override - public ID findNamedItemDefinition( - @NotNull QName firstName, - @NotNull ItemPath rest, - @NotNull Class clazz) { - return inner.findNamedItemDefinition(firstName, rest, clazz); - } - - @Override - public PrismPropertyDefinition findPropertyDefinition( - @NotNull ItemPath path) { - return inner.findPropertyDefinition(path); - } - - @Override - public PrismReferenceDefinition findReferenceDefinition( - @NotNull ItemPath path) { - return inner.findReferenceDefinition(path); - } - - @Override - public PrismContainerDefinition findContainerDefinition( - @NotNull ItemPath path) { - return inner.findContainerDefinition(path); - } - - @Override - public void accept(Visitor visitor) { - inner.accept(visitor); - } - - public void add(ItemDefinition definition) { - inner.add(definition); - } - - public MutablePrismPropertyDefinition createPropertyDefinition(QName name, QName typeName) { - return inner.createPropertyDefinition(name, typeName); - } - - public MutablePrismPropertyDefinition createPropertyDefinition(String name, QName typeName) { - return inner.createPropertyDefinition(name, typeName); - } - - public void setProcessing(ItemProcessing processing) { - inner.setProcessing(processing); - } - - public void setDeprecated(boolean deprecated) { - inner.setDeprecated(deprecated); - } - - public void setExperimental(boolean experimental) { - inner.setExperimental(experimental); - } - - public void setEmphasized(boolean emphasized) { - inner.setEmphasized(emphasized); - } - - public void setDisplayName(String displayName) { - inner.setDisplayName(displayName); - } - - public void setDisplayOrder(Integer displayOrder) { - inner.setDisplayOrder(displayOrder); - } - - public void setHelp(String help) { - inner.setHelp(help); - } - - public void setRuntimeSchema(boolean value) { - inner.setRuntimeSchema(value); - } - - public void setTypeName(QName typeName) { - inner.setTypeName(typeName); - } - - @Override - public void setInstantiationOrder(Integer order) { - inner.setInstantiationOrder(order); - } - - @Override - public void setExtensionForType(QName type) { - inner.setExtensionForType(type); - } - - @Override - public void setAbstract(boolean value) { - inner.setAbstract(value); - } - - @Override - public void setSuperType(QName superType) { - inner.setSuperType(superType); - } - - @Override - public void setObjectMarker(boolean value) { - inner.setObjectMarker(value); - } - - @Override - public void setContainerMarker(boolean value) { - inner.setContainerMarker(value); - } - - @Override - public void setReferenceMarker(boolean value) { - inner.setReferenceMarker(value); - } - - @Override - public void setDefaultNamespace(String namespace) { - inner.setDefaultNamespace(namespace); - } - - @Override - public void setIgnoredNamespaces(@NotNull List ignoredNamespaces) { - inner.setIgnoredNamespaces(ignoredNamespaces); - } - - @Override - public void setXsdAnyMarker(boolean value) { - inner.setXsdAnyMarker(value); - } - - @Override - public void setListMarker(boolean value) { - inner.setListMarker(value); - } - - @Override - public void setCompileTimeClass(Class compileTimeClass) { - inner.setCompileTimeClass(compileTimeClass); - } - - @Override - public void setDocumentation(String value) { - inner.setDocumentation(value); - } -} diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedMutablePrismPropertyDefinition.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedMutablePrismPropertyDefinition.java deleted file mode 100644 index 878f6aaab60..00000000000 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedMutablePrismPropertyDefinition.java +++ /dev/null @@ -1,538 +0,0 @@ -/* - * Copyright (c) 2010-2018 Evolveum - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.evolveum.midpoint.prism.extensions; - -import com.evolveum.midpoint.prism.*; -import com.evolveum.midpoint.prism.delta.PropertyDelta; -import com.evolveum.midpoint.prism.path.ItemName; -import com.evolveum.midpoint.prism.path.ItemPath; -import com.evolveum.midpoint.prism.schema.SchemaRegistry; -import com.evolveum.midpoint.util.DisplayableValue; -import org.jetbrains.annotations.NotNull; - -import javax.xml.namespace.QName; -import java.util.Collection; -import java.util.IdentityHashMap; -import java.util.Map; -import java.util.function.Consumer; - -/** - * - */ -public class AbstractDelegatedMutablePrismPropertyDefinition implements MutablePrismPropertyDefinition { - - protected MutablePrismPropertyDefinition inner; - - public AbstractDelegatedMutablePrismPropertyDefinition(QName elementName, QName typeName, PrismContext prismContext) { - inner = prismContext.definitionFactory().createPropertyDefinition(elementName, typeName); - } - - public AbstractDelegatedMutablePrismPropertyDefinition(MutablePrismPropertyDefinition inner) { - this.inner = inner; - } - - @Override - public Collection> getAllowedValues() { - return inner.getAllowedValues(); - } - - @Override - public T defaultValue() { - return inner.defaultValue(); - } - - @Override - @Deprecated - public QName getValueType() { - return inner.getValueType(); - } - - @Override - public Boolean isIndexed() { - return inner.isIndexed(); - } - - @Override - public boolean isAnyType() { - return inner.isAnyType(); - } - - @Override - public QName getMatchingRuleQName() { - return inner.getMatchingRuleQName(); - } - - @Override - public PropertyDelta createEmptyDelta(ItemPath path) { - return inner.createEmptyDelta(path); - } - - @Override - @NotNull - public PrismProperty instantiate() { - return inner.instantiate(); - } - - @Override - @NotNull - public PrismProperty instantiate(QName name) { - return inner.instantiate(name); - } - - @Override - @NotNull - public PrismPropertyDefinition clone() { - return inner.clone(); - } - - @Override - public void setInherited(boolean value) { - inner.setInherited(value); - } - - @Override - public Class getTypeClass() { - return inner.getTypeClass(); - } - - @Override - public MutablePrismPropertyDefinition toMutable() { - return inner.toMutable(); - } - - @Override - @NotNull - public ItemName getName() { - return inner.getName(); - } - - @Override - public String getNamespace() { - return inner.getNamespace(); - } - - @Override - public int getMinOccurs() { - return inner.getMinOccurs(); - } - - @Override - public int getMaxOccurs() { - return inner.getMaxOccurs(); - } - - @Override - public boolean isSingleValue() { - return inner.isSingleValue(); - } - - @Override - public boolean isMultiValue() { - return inner.isMultiValue(); - } - - @Override - public boolean isMandatory() { - return inner.isMandatory(); - } - - @Override - public boolean isOptional() { - return inner.isOptional(); - } - - @Override - public boolean isOperational() { - return inner.isOperational(); - } - - @Override - public boolean isInherited() { - return inner.isInherited(); - } - - @Override - public boolean isDynamic() { - return inner.isDynamic(); - } - - @Override - public boolean canRead() { - return inner.canRead(); - } - - @Override - public boolean canModify() { - return inner.canModify(); - } - - @Override - public boolean canAdd() { - return inner.canAdd(); - } - - @Override - public QName getSubstitutionHead() { - return inner.getSubstitutionHead(); - } - - @Override - public boolean isHeterogeneousListItem() { - return inner.isHeterogeneousListItem(); - } - - @Override - public PrismReferenceValue getValueEnumerationRef() { - return inner.getValueEnumerationRef(); - } - - @Override - public boolean isValidFor(QName elementQName, - Class clazz) { - return inner.isValidFor(elementQName, clazz); - } - - @Override - public boolean isValidFor(@NotNull QName elementQName, - @NotNull Class clazz, - boolean caseInsensitive) { - return inner.isValidFor(elementQName, clazz, caseInsensitive); - } - - @Override - public void adoptElementDefinitionFrom(ItemDefinition otherDef) { - inner.adoptElementDefinitionFrom(otherDef); - } - - @Override - public T findItemDefinition( - @NotNull ItemPath path, - @NotNull Class clazz) { - if (ItemPath.isEmpty(path) && clazz.isAssignableFrom(this.getClass())) { - return (T) this; - } else { - return inner.findItemDefinition(path, clazz); - } - } - - @Override - public ItemDefinition> deepClone(boolean ultraDeep, - Consumer postCloneAction) { - return inner.deepClone(ultraDeep, postCloneAction); - } - - @Override - public ItemDefinition> deepClone( - Map ctdMap, - Map onThisPath, - Consumer postCloneAction) { - return inner.deepClone(ctdMap, onThisPath, postCloneAction); - } - - @Override - public void revive(PrismContext prismContext) { - inner.revive(prismContext); - } - - @Override - public void debugDumpShortToString(StringBuilder sb) { - inner.debugDumpShortToString(sb); - } - - @Override - public boolean canBeDefinitionOf(PrismProperty item) { - return inner.canBeDefinitionOf(item); - } - - @Override - public boolean canBeDefinitionOf(PrismValue pvalue) { - return inner.canBeDefinitionOf(pvalue); - } - - @Override - @NotNull - public QName getTypeName() { - return inner.getTypeName(); - } - - @Override - public boolean isRuntimeSchema() { - return inner.isRuntimeSchema(); - } - - @Override - @Deprecated - public boolean isIgnored() { - return inner.isIgnored(); - } - - @Override - public ItemProcessing getProcessing() { - return inner.getProcessing(); - } - - @Override - public boolean isAbstract() { - return inner.isAbstract(); - } - - @Override - public boolean isDeprecated() { - return inner.isDeprecated(); - } - - @Override - public boolean isExperimental() { - return inner.isExperimental(); - } - - @Override - public String getPlannedRemoval() { - return inner.getPlannedRemoval(); - } - - @Override - public boolean isElaborate() { - return inner.isElaborate(); - } - - @Override - public String getDeprecatedSince() { - return inner.getDeprecatedSince(); - } - - @Override - public boolean isEmphasized() { - return inner.isEmphasized(); - } - - @Override - public String getDisplayName() { - return inner.getDisplayName(); - } - - @Override - public Integer getDisplayOrder() { - return inner.getDisplayOrder(); - } - - @Override - public String getHelp() { - return inner.getHelp(); - } - - @Override - public String getDocumentation() { - return inner.getDocumentation(); - } - - @Override - public String getDocumentationPreview() { - return inner.getDocumentationPreview(); - } - - @Override - public PrismContext getPrismContext() { - return inner.getPrismContext(); - } - - @Override - public SchemaRegistry getSchemaRegistry() { - return inner.getSchemaRegistry(); - } - - @Override - public Class getTypeClassIfKnown() { - return inner.getTypeClassIfKnown(); - } - - @Override - public A getAnnotation(QName qname) { - return inner.getAnnotation(qname); - } - - @Override - public void setAnnotation(QName qname, A value) { - inner.setAnnotation(qname, value); - } - - @Override - public String debugDump(int indent, IdentityHashMap seen) { - return inner.debugDump(indent, seen); - } - - @Override - public String debugDump() { - return inner.debugDump(); - } - - @Override - public String debugDump(int indent) { - return inner.debugDump(indent); - } - - @Override - public Object debugDumpLazily() { - return inner.debugDumpLazily(); - } - - @Override - public Object debugDumpLazily(int index) { - return inner.debugDumpLazily(index); - } - - @Override - public void accept(Visitor visitor) { - inner.accept(visitor); - } - - @Override - public void setMinOccurs(int value) { - inner.setMinOccurs(value); - } - - @Override - public void setMaxOccurs(int value) { - inner.setMaxOccurs(value); - } - - @Override - public void setCanRead(boolean val) { - inner.setCanRead(val); - } - - @Override - public void setCanModify(boolean val) { - inner.setCanModify(val); - } - - @Override - public void setCanAdd(boolean val) { - inner.setCanAdd(val); - } - - @Override - public void setValueEnumerationRef(PrismReferenceValue valueEnumerationRef) { - inner.setValueEnumerationRef(valueEnumerationRef); - } - - @Override - public void setOperational(boolean operational) { - inner.setOperational(operational); - } - - @Override - public void setDynamic(boolean value) { - inner.setDynamic(value); - } - - @Override - public void setName(QName name) { - inner.setName(name); - } - - @Override - public void setReadOnly() { - inner.setReadOnly(); - } - - @Override - public void setDeprecatedSince(String value) { - inner.setDeprecatedSince(value); - } - - @Override - public void setPlannedRemoval(String value) { - inner.setPlannedRemoval(value); - } - - @Override - public void setElaborate(boolean value) { - inner.setElaborate(value); - } - - @Override - public void setHeterogeneousListItem(boolean value) { - inner.setHeterogeneousListItem(value); - } - - @Override - public void setSubstitutionHead(QName value) { - inner.setSubstitutionHead(value); - } - - @Override - public void setProcessing(ItemProcessing processing) { - inner.setProcessing(processing); - } - - @Override - public void setDeprecated(boolean deprecated) { - inner.setDeprecated(deprecated); - } - - @Override - public void setExperimental(boolean experimental) { - inner.setExperimental(experimental); - } - - @Override - public void setEmphasized(boolean emphasized) { - inner.setEmphasized(emphasized); - } - - @Override - public void setDisplayName(String displayName) { - inner.setDisplayName(displayName); - } - - @Override - public void setDisplayOrder(Integer displayOrder) { - inner.setDisplayOrder(displayOrder); - } - - @Override - public void setHelp(String help) { - inner.setHelp(help); - } - - @Override - public void setRuntimeSchema(boolean value) { - inner.setRuntimeSchema(value); - } - - @Override - public void setTypeName(QName typeName) { - inner.setTypeName(typeName); - } - - @Override - public void setDocumentation(String value) { - inner.setDocumentation(value); - } - - @Override - public void setIndexed(Boolean value) { - inner.setIndexed(value); - } - - @Override - public void setMatchingRuleQName(QName matchingRuleQName) { - inner.setMatchingRuleQName(matchingRuleQName); - } - -} diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedMutablePrismSchema.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedMutablePrismSchema.java deleted file mode 100644 index 0cdd1622eb8..00000000000 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedMutablePrismSchema.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright (c) 2010-2018 Evolveum - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.evolveum.midpoint.prism.extensions; - -import com.evolveum.midpoint.prism.*; -import com.evolveum.midpoint.prism.schema.DefinitionSupplier; -import com.evolveum.midpoint.prism.schema.MutablePrismSchema; -import com.evolveum.midpoint.util.exception.SchemaException; -import org.jetbrains.annotations.NotNull; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import javax.xml.namespace.QName; -import java.util.Collection; -import java.util.List; - -/** - * - */ -public class AbstractDelegatedMutablePrismSchema implements MutablePrismSchema { - - protected MutablePrismSchema inner; - - public AbstractDelegatedMutablePrismSchema(MutablePrismSchema inner) { - this.inner = inner; - } - - public AbstractDelegatedMutablePrismSchema(PrismContext prismContext) { - this.inner = prismContext.schemaFactory().createPrismSchema(); - } - - public AbstractDelegatedMutablePrismSchema(String namespace, PrismContext prismContext) { - this.inner = prismContext.schemaFactory().createPrismSchema(namespace); - } - - @Override - public void add(@NotNull Definition def) { - inner.add(def); - } - - @Override - public String getNamespace() { - return inner.getNamespace(); - } - - @Override - @NotNull - public Collection getDefinitions() { - return inner.getDefinitions(); - } - - @Override - @NotNull - public List getDefinitions( - @NotNull Class type) { - return inner.getDefinitions(type); - } - - @Override - @NotNull - public List getObjectDefinitions() { - return inner.getObjectDefinitions(); - } - - @Override - @NotNull - public List getComplexTypeDefinitions() { - return inner.getComplexTypeDefinitions(); - } - - @Override - public PrismContext getPrismContext() { - return inner.getPrismContext(); - } - - @Override - @NotNull - public Document serializeToXsd() throws SchemaException { - return inner.serializeToXsd(); - } - - @Override - public boolean isEmpty() { - return inner.isEmpty(); - } - - @Override - public String debugDump() { - return inner.debugDump(); - } - - @Override - public String debugDump(int indent) { - return inner.debugDump(indent); - } - - @Override - public Object debugDumpLazily() { - return inner.debugDumpLazily(); - } - - @Override - public Object debugDumpLazily(int index) { - return inner.debugDumpLazily(index); - } - - @Override - @NotNull - public List findItemDefinitionsByCompileTimeClass( - @NotNull Class compileTimeClass, - @NotNull Class definitionClass) { - return inner.findItemDefinitionsByCompileTimeClass(compileTimeClass, definitionClass); - } - - @Override - public ID findItemDefinitionByType( - @NotNull QName typeName, - @NotNull Class definitionClass) { - return inner.findItemDefinitionByType(typeName, definitionClass); - } - - @Override - @NotNull - public List findItemDefinitionsByElementName( - @NotNull QName elementName, - @NotNull Class definitionClass) { - return inner.findItemDefinitionsByElementName(elementName, definitionClass); - } - - @Override - public ComplexTypeDefinition findComplexTypeDefinitionByCompileTimeClass( - @NotNull Class compileTimeClass) { - return inner.findComplexTypeDefinitionByCompileTimeClass(compileTimeClass); - } - - @Override - public TD findTypeDefinitionByCompileTimeClass( - @NotNull Class compileTimeClass, - @NotNull Class definitionClass) { - return inner.findTypeDefinitionByCompileTimeClass(compileTimeClass, definitionClass); - } - - @Override - public TD findTypeDefinitionByType( - @NotNull QName typeName, - @NotNull Class definitionClass) { - return inner.findTypeDefinitionByType(typeName, definitionClass); - } - - @Override - @NotNull - public Collection findTypeDefinitionsByType( - @NotNull QName typeName, - @NotNull Class definitionClass) { - return inner.findTypeDefinitionsByType(typeName, definitionClass); - } - - @Override - @NotNull - public Collection findTypeDefinitionsByType( - @NotNull QName typeName) { - return inner.findTypeDefinitionsByType(typeName); - } - - @Override - @NotNull - public List findItemDefinitionsByElementName( - @NotNull QName elementName) { - return inner.findItemDefinitionsByElementName(elementName); - } - - @Override - public ID findItemDefinitionByElementName( - @NotNull QName elementName, - @NotNull Class definitionClass) { - return inner.findItemDefinitionByElementName(elementName, definitionClass); - } - - @Override - public ID findItemDefinitionByCompileTimeClass( - @NotNull Class compileTimeClass, - @NotNull Class definitionClass) { - return inner.findItemDefinitionByCompileTimeClass(compileTimeClass, definitionClass); - } - - @Override - public PrismObjectDefinition findObjectDefinitionByCompileTimeClass( - @NotNull Class compileTimeClass) { - return inner.findObjectDefinitionByCompileTimeClass(compileTimeClass); - } - - @Override - public PrismObjectDefinition findObjectDefinitionByType( - @NotNull QName typeName) { - return inner.findObjectDefinitionByType(typeName); - } - - @Override - public PrismObjectDefinition findObjectDefinitionByElementName( - @NotNull QName elementName) { - return inner.findObjectDefinitionByElementName(elementName); - } - - @Override - public PrismContainerDefinition findContainerDefinitionByCompileTimeClass( - @NotNull Class compileTimeClass) { - return inner.findContainerDefinitionByCompileTimeClass(compileTimeClass); - } - - @Override - public PrismContainerDefinition findContainerDefinitionByType( - @NotNull QName typeName) { - return inner.findContainerDefinitionByType(typeName); - } - - @Override - public PrismContainerDefinition findContainerDefinitionByElementName( - @NotNull QName elementName) { - return inner.findContainerDefinitionByElementName(elementName); - } - - @Override - public PrismReferenceDefinition findReferenceDefinitionByElementName( - @NotNull QName elementName) { - return inner.findReferenceDefinitionByElementName(elementName); - } - - @Override - public PrismPropertyDefinition findPropertyDefinitionByElementName( - @NotNull QName elementName) { - return inner.findPropertyDefinitionByElementName(elementName); - } - - @Override - public ItemDefinition findItemDefinitionByType( - @NotNull QName typeName) { - return inner.findItemDefinitionByType(typeName); - } - - @Override - public ItemDefinition findItemDefinitionByElementName( - @NotNull QName elementName) { - return inner.findItemDefinitionByElementName(elementName); - } - - @Override - @Deprecated - public ID findItemDefinition( - @NotNull String localElementName, - @NotNull Class definitionClass) { - return inner.findItemDefinition(localElementName, definitionClass); - } - - @Override - @Deprecated - public ID findItemDefinition( - @NotNull QName elementName, - @NotNull Class definitionClass) { - return inner.findItemDefinition(elementName, definitionClass); - } - - @Override - public ComplexTypeDefinition findComplexTypeDefinitionByType( - @NotNull QName typeName) { - return inner.findComplexTypeDefinitionByType(typeName); - } - - @Override - public SimpleTypeDefinition findSimpleTypeDefinitionByType( - @NotNull QName typeName) { - return inner.findSimpleTypeDefinitionByType(typeName); - } - - @Override - public TypeDefinition findTypeDefinitionByType( - @NotNull QName typeName) { - return inner.findTypeDefinitionByType(typeName); - } - - @Override - @Deprecated - public ComplexTypeDefinition findComplexTypeDefinition( - @NotNull QName typeName) { - return inner.findComplexTypeDefinition(typeName); - } - - @Override - public void parseThis(Element element, boolean isRuntime, String shortDescription, - PrismContext prismContext) throws SchemaException { - inner.parseThis(element, isRuntime, shortDescription, prismContext); - } - - @Override - public void setNamespace(@NotNull String namespace) { - inner.setNamespace(namespace); - } - - @Override - public MutablePrismContainerDefinition createPropertyContainerDefinition(String localTypeName) { - return inner.createPropertyContainerDefinition(localTypeName); - } - - @Override - public MutablePrismContainerDefinition createPropertyContainerDefinition(String localElementName, String localTypeName) { - return inner.createPropertyContainerDefinition(localElementName, localTypeName); - } - - @Override - public ComplexTypeDefinition createComplexTypeDefinition(QName typeName) { - return inner.createComplexTypeDefinition(typeName); - } - - @Override - public PrismPropertyDefinition createPropertyDefinition(String localName, QName typeName) { - return inner.createPropertyDefinition(localName, typeName); - } - - @Override - public PrismPropertyDefinition createPropertyDefinition(QName name, QName typeName) { - return inner.createPropertyDefinition(name, typeName); - } - - @Override - public void addDelayedItemDefinition(DefinitionSupplier o) { - inner.addDelayedItemDefinition(o); - } -} diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedPrismContainer.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedPrismContainer.java deleted file mode 100644 index 92fb3b088bf..00000000000 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedPrismContainer.java +++ /dev/null @@ -1,811 +0,0 @@ -/* - * Copyright (c) 2010-2018 Evolveum - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.evolveum.midpoint.prism.extensions; - -import com.evolveum.midpoint.prism.*; -import com.evolveum.midpoint.prism.delta.ContainerDelta; -import com.evolveum.midpoint.prism.delta.ItemDelta; -import com.evolveum.midpoint.prism.path.ItemName; -import com.evolveum.midpoint.prism.path.ItemPath; -import com.evolveum.midpoint.util.exception.SchemaException; -import org.jetbrains.annotations.NotNull; - -import javax.xml.namespace.QName; -import java.util.Collection; -import java.util.Comparator; -import java.util.List; -import java.util.Map; -import java.util.function.Consumer; -import java.util.function.Function; - -/** - * - */ -public class AbstractDelegatedPrismContainer implements PrismContainer { - - protected PrismContainer inner; - - public AbstractDelegatedPrismContainer(QName name, PrismContainerDefinition definition, PrismContext prismContext) { - inner = prismContext.itemFactory().createContainer(name, definition); - } - - public AbstractDelegatedPrismContainer(PrismContainer inner) { - this.inner = inner; - } - - - - - - @Override - public Class getCompileTimeClass() { - return inner.getCompileTimeClass(); - } - - @Override - public boolean canRepresent(@NotNull Class compileTimeClass) { - return inner.canRepresent(compileTimeClass); - } - - @Override - public boolean canRepresent(QName type) { - return inner.canRepresent(type); - } - - @Override - @NotNull - public Collection getRealValues() { - return inner.getRealValues(); - } - - @Override - public C getRealValue() { - return inner.getRealValue(); - } - - @Override - public PrismContainerValue getOrCreateValue() { - return inner.getOrCreateValue(); - } - - @Override - public PrismContainerValue getValue() { - return inner.getValue(); - } - - @Override - public void setValue(@NotNull PrismContainerValue value) throws SchemaException { - inner.setValue(value); - } - - @Override - public boolean add(@NotNull PrismContainerValue newValue, - boolean checkUniqueness) throws SchemaException { - return inner.add(newValue, checkUniqueness); - } - - @Override - public PrismContainerValue getPreviousValue(PrismValue value) { - return inner.getPreviousValue(value); - } - - @Override - public PrismContainerValue getNextValue(PrismValue value) { - return inner.getNextValue(value); - } - - @Override - public PrismContainerValue getValue(Long id) { - return inner.getValue(id); - } - - @Override - public void setPropertyRealValue(QName propertyName, T realValue) throws SchemaException { - inner.setPropertyRealValue(propertyName, realValue); - } - - @Override - public void setPropertyRealValues(QName propertyName, T... realValues) throws SchemaException { - inner.setPropertyRealValues(propertyName, realValues); - } - - @Override - public T getPropertyRealValue(ItemPath propertyPath, Class type) { - return inner.getPropertyRealValue(propertyPath, type); - } - - @Override - public void add(Item item) throws SchemaException { - inner.add(item); - } - - @Override - public PrismContainerValue createNewValue() { - return inner.createNewValue(); - } - - @Override - public void mergeValues(PrismContainer other) throws SchemaException { - inner.mergeValues(other); - } - - @Override - public void mergeValues(Collection> otherValues) throws SchemaException { - inner.mergeValues(otherValues); - } - - @Override - public void mergeValue(PrismContainerValue otherValue) throws SchemaException { - inner.mergeValue(otherValue); - } - - @Override - public void trim() { - inner.trim(); - } - - @Override - public PrismContainerDefinition getDefinition() { - return inner.getDefinition(); - } - - @Override - public void setDefinition(PrismContainerDefinition definition) { - inner.setDefinition(definition); - } - - @Override - public void applyDefinition(PrismContainerDefinition definition) throws SchemaException { - inner.applyDefinition(definition); - } - - @Override - public > I findItem( - QName itemQName, Class type) { - return inner.findItem(itemQName, type); - } - - @Override - public boolean hasCompleteDefinition() { - return inner.hasCompleteDefinition(); - } - - @Override - public Object find(ItemPath path) { - return inner.find(path); - } - - @Override - public PartiallyResolvedItem findPartial( - ItemPath path) { - return inner.findPartial(path); - } - - @Override - public > I findCreateItem( - QName itemQName, Class type, boolean create) throws SchemaException { - return inner.findCreateItem(itemQName, type, create); - } - - @Override - public > I findItem( - ItemPath path, Class type) { - return inner.findItem(path, type); - } - - @Override - public Item findItem( - ItemPath path) { - return inner.findItem(path); - } - - @Override - public boolean containsItem(ItemPath itemPath, boolean acceptEmptyItem) throws SchemaException { - return inner.containsItem(itemPath, acceptEmptyItem); - } - - @Override - public > I findCreateItem( - ItemPath itemPath, Class type, ID itemDefinition, boolean create) throws SchemaException { - return inner.findCreateItem(itemPath, type, itemDefinition, create); - } - - @Override - public PrismContainerValue findValue(long id) { - return inner.findValue(id); - } - - @Override - public PrismContainer findContainer(ItemPath path) { - return inner.findContainer(path); - } - - @Override - public > List getItems(Class type) { - return inner.getItems(type); - } - - @Override - public List> getContainers() { - return inner.getContainers(); - } - - @Override - public PrismProperty findProperty(ItemPath path) { - return inner.findProperty(path); - } - - @Override - public PrismReference findReference(ItemPath path) { - return inner.findReference(path); - } - - @Override - public PrismReference findReferenceByCompositeObjectElementName(QName elementName) { - return inner.findReferenceByCompositeObjectElementName(elementName); - } - - @Override - public > I findOrCreateItem( - ItemPath containerPath, Class type) throws SchemaException { - return inner.findOrCreateItem(containerPath, type); - } - - @Override - public > I findOrCreateItem( - ItemPath containerPath, Class type, ID definition) throws SchemaException { - return inner.findOrCreateItem(containerPath, type, definition); - } - - @Override - public PrismContainer findOrCreateContainer(ItemPath containerPath) throws SchemaException { - return inner.findOrCreateContainer(containerPath); - } - - @Override - public PrismProperty findOrCreateProperty( - ItemPath propertyPath) throws SchemaException { - return inner.findOrCreateProperty(propertyPath); - } - - @Override - public PrismReference findOrCreateReference(ItemPath propertyPath) throws SchemaException { - return inner.findOrCreateReference(propertyPath); - } - - @Override - public void remove(Item item) { - inner.remove(item); - } - - @Override - public void removeProperty(ItemPath path) { - inner.removeProperty(path); - } - - @Override - public void removeContainer(ItemPath path) { - inner.removeContainer(path); - } - - @Override - public void removeReference(ItemPath path) { - inner.removeReference(path); - } - - @Override - public > void removeItem( - ItemPath path, Class itemType) { - inner.removeItem(path, itemType); - } - - @Override - public ContainerDelta createDelta() { - return inner.createDelta(); - } - - @Override - public ContainerDelta createDelta(ItemPath path) { - return inner.createDelta(path); - } - - @Override - public boolean isEmpty() { - return inner.isEmpty(); - } - - @Override - public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, - boolean prohibitRaw, ConsistencyCheckScope scope) { - inner.checkConsistenceInternal(rootItem, requireDefinitions, prohibitRaw, scope); - } - - @Override - public void assertDefinitions(boolean tolarateRaw, String sourceDescription) throws SchemaException { - inner.assertDefinitions(tolarateRaw, sourceDescription); - } - - @Override - public ContainerDelta diff(PrismContainer other) { - return inner.diff(other); - } - - @Override - public ContainerDelta diff(PrismContainer other, boolean ignoreMetadata, - boolean isLiteral) { - return inner.diff(other, ignoreMetadata, isLiteral); - } - - @Override - public List diffModifications( - PrismContainer other) { - return inner.diffModifications(other); - } - - @Override - public List diffModifications( - PrismContainer other, boolean ignoreMetadata, boolean isLiteral) { - return inner.diffModifications(other, ignoreMetadata, isLiteral); - } - - @Override - public PrismContainer clone() { - return inner.clone(); - } - - @Override - public PrismContainer cloneComplex(CloneStrategy strategy) { - return inner.cloneComplex(strategy); - } - - @Override - public PrismContainerDefinition deepCloneDefinition(boolean ultraDeep, - Consumer postCloneAction) { - return inner.deepCloneDefinition(ultraDeep, postCloneAction); - } - - @Override - public boolean containsEquivalentValue(PrismContainerValue value) { - return inner.containsEquivalentValue(value); - } - - @Override - public boolean containsEquivalentValue(PrismContainerValue value, - Comparator> comparator) { - return inner.containsEquivalentValue(value, comparator); - } - - @Override - public void accept(Visitor visitor, ItemPath path, boolean recursive) { - inner.accept(visitor, path, recursive); - } - - @Override - public int hashCode() { - return inner.hashCode(); - } - - @Override - public boolean equals(Object obj) { - return inner.equals(obj); - } - - @Override - public boolean equivalent(Object obj) { - return inner.equivalent(obj); - } - - @Override - public String toString() { - return inner.toString(); - } - - @Override - public String debugDump(int indent) { - return inner.debugDump(indent); - } - - public static PrismContainer newInstance(PrismContext prismContext, - QName type) throws SchemaException { - return PrismContainer.newInstance(prismContext, type); - } - - public static void createParentIfNeeded(V value, - ItemDefinition definition) throws SchemaException { - PrismContainer.createParentIfNeeded(value, definition); - } - - @Override - public void trimDefinitionTree(Collection alwaysKeep) { - inner.trimDefinitionTree(alwaysKeep); - } - - @Override - public ItemName getElementName() { - return inner.getElementName(); - } - - @Override - public void setElementName(QName elementName) { - inner.setElementName(elementName); - } - - @Override - public String getDisplayName() { - return inner.getDisplayName(); - } - - @Override - public String getHelp() { - return inner.getHelp(); - } - - @Override - public boolean isIncomplete() { - return inner.isIncomplete(); - } - - @Override - public void setIncomplete(boolean incomplete) { - inner.setIncomplete(incomplete); - } - - @Override - public PrismContext getPrismContext() { - return inner.getPrismContext(); - } - - @Override - public PrismContext getPrismContextLocal() { - return inner.getPrismContextLocal(); - } - - @Override - public void setPrismContext(PrismContext prismContext) { - inner.setPrismContext(prismContext); - } - - @Override - public PrismValue getParent() { - return inner.getParent(); - } - - @Override - public void setParent(PrismValue parentValue) { - inner.setParent(parentValue); - } - - @Override - public ItemPath getPath() { - return inner.getPath(); - } - - @Override - public Map getUserData() { - return inner.getUserData(); - } - - @Override - public T getUserData(String key) { - return inner.getUserData(key); - } - - @Override - public void setUserData(String key, Object value) { - inner.setUserData(key, value); - } - - @Override - @NotNull - public List> getValues() { - return inner.getValues(); - } - - @Override - public PrismContainerValue getValue(int index) { - return inner.getValue(index); - } - - @Override - public boolean hasValue(PrismValue value, boolean ignoreMetadata) { - return inner.hasValue(value, ignoreMetadata); - } - - @Override - public boolean hasValue(PrismValue value) { - return inner.hasValue(value); - } - - @Override - public boolean hasValueIgnoringMetadata(PrismValue value) { - return inner.hasValueIgnoringMetadata(value); - } - - @Override - public boolean isSingleValue() { - return inner.isSingleValue(); - } - - @Override - public PrismValue findValue(PrismValue value, boolean ignoreMetadata) { - return inner.findValue(value, ignoreMetadata); - } - - @Override - public List findValuesIgnoringMetadata(PrismValue value) { - return inner.findValuesIgnoringMetadata(value); - } - - @Override - public Collection> getClonedValues() { - return inner.getClonedValues(); - } - - @Override - public boolean contains(PrismContainerValue value) { - return inner.contains(value); - } - - @Override - public boolean contains(PrismContainerValue value, boolean ignoreMetadata, - Comparator> comparator) { - return inner.contains(value, ignoreMetadata, comparator); - } - - @Override - public boolean contains(PrismContainerValue value, boolean ignoreMetadata) { - return inner.contains(value, ignoreMetadata); - } - - @Override - public boolean containsRealValue(PrismContainerValue value) { - return inner.containsRealValue(value); - } - - @Override - public boolean valuesExactMatch(Collection> matchValues, - Comparator> comparator) { - return inner.valuesExactMatch(matchValues, comparator); - } - - @Override - public int size() { - return inner.size(); - } - - @Override - public boolean addAll(Collection> newValues) throws SchemaException { - return inner.addAll(newValues); - } - - @Override - public boolean add(@NotNull PrismContainerValue newValue) throws SchemaException { - return inner.add(newValue); - } - - @Override - public boolean removeAll(Collection> newValues) { - return inner.removeAll(newValues); - } - - @Override - public boolean remove(PrismContainerValue newValue) { - return inner.remove(newValue); - } - - @Override - public PrismContainerValue remove(int index) { - return inner.remove(index); - } - - @Override - public void replaceAll(Collection> newValues) throws SchemaException { - inner.replaceAll(newValues); - } - - @Override - public void replace(PrismContainerValue newValue) { - inner.replace(newValue); - } - - @Override - public void clear() { - inner.clear(); - } - - @Override - public void normalize() { - inner.normalize(); - } - - @Override - public void merge( - Item, PrismContainerDefinition> otherItem) throws SchemaException { - inner.merge(otherItem); - } - - @Override - public ItemDelta, PrismContainerDefinition> diff( - Item, PrismContainerDefinition> other) { - return inner.diff(other); - } - - @Override - public ItemDelta, PrismContainerDefinition> diff( - Item, PrismContainerDefinition> other, - boolean ignoreMetadata, boolean isLiteral) { - return inner.diff(other, ignoreMetadata, isLiteral); - } - - @Override - public void accept(Visitor visitor) { - inner.accept(visitor); - } - - @Override - public void recomputeAllValues() { - inner.recomputeAllValues(); - } - - @Override - public void filterValues( - Function, Boolean> function) { - inner.filterValues(function); - } - - @Override - public void applyDefinition(PrismContainerDefinition definition, boolean force) throws SchemaException { - inner.applyDefinition(definition, force); - } - - @Override - public void revive(PrismContext prismContext) throws SchemaException { - inner.revive(prismContext); - } - - public static Collection cloneCollection(Collection items) { - return Item.cloneCollection(items); - } - - @Override - public void checkConsistence(boolean requireDefinitions, ConsistencyCheckScope scope) { - inner.checkConsistence(requireDefinitions, scope); - } - - @Override - public void checkConsistence(boolean requireDefinitions, boolean prohibitRaw) { - inner.checkConsistence(requireDefinitions, prohibitRaw); - } - - @Override - public void checkConsistence(boolean requireDefinitions, boolean prohibitRaw, - ConsistencyCheckScope scope) { - inner.checkConsistence(requireDefinitions, prohibitRaw, scope); - } - - @Override - public void checkConsistence() { - inner.checkConsistence(); - } - - @Override - public void checkConsistence(ConsistencyCheckScope scope) { - inner.checkConsistence(scope); - } - - @Override - public void assertDefinitions() throws SchemaException { - inner.assertDefinitions(); - } - - @Override - public void assertDefinitions(String sourceDescription) throws SchemaException { - inner.assertDefinitions(sourceDescription); - } - - @Override - public boolean isRaw() { - return inner.isRaw(); - } - - @Override - public boolean hasRaw() { - return inner.hasRaw(); - } - - @Override - public boolean hasNoValues() { - return inner.hasNoValues(); - } - - public static boolean hasNoValues(Item item) { - return Item.hasNoValues(item); - } - - @Override - public boolean equalsRealValue(Object obj) { - return inner.equalsRealValue(obj); - } - - @Override - public boolean match(Object obj) { - return inner.match(obj); - } - - @Override - public boolean isMetadata() { - return inner.isMetadata(); - } - - @Override - public boolean isImmutable() { - return inner.isImmutable(); - } - - @Override - public void setImmutable(boolean immutable) { - inner.setImmutable(immutable); - } - - @Override - public void checkImmutability() { - inner.checkImmutability(); - } - - @Override - public void modifyUnfrozen(Runnable mutator) { - inner.modifyUnfrozen(mutator); - } - - @NotNull - public static Collection getValues( - Item item) { - return Item.getValues(item); - } - - @Override - @NotNull - public Collection getAllValues(ItemPath path) { - return inner.getAllValues(path); - } - - @NotNull - public static Collection getAllValues(Item item, - ItemPath path) { - return Item.getAllValues(item, path); - } - - @Override - public String debugDump() { - return inner.debugDump(); - } - - @Override - public Object debugDumpLazily() { - return inner.debugDumpLazily(); - } - - @Override - public Object debugDumpLazily(int index) { - return inner.debugDumpLazily(index); - } - - @Override - public ComplexTypeDefinition getComplexTypeDefinition() { - return inner.getComplexTypeDefinition(); - } -} diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedPrismProperty.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedPrismProperty.java deleted file mode 100644 index 7457491df4d..00000000000 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/extensions/AbstractDelegatedPrismProperty.java +++ /dev/null @@ -1,667 +0,0 @@ -/* - * Copyright (c) 2010-2018 Evolveum - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.evolveum.midpoint.prism.extensions; - -import com.evolveum.midpoint.prism.*; -import com.evolveum.midpoint.prism.delta.ItemDelta; -import com.evolveum.midpoint.prism.delta.PropertyDelta; -import com.evolveum.midpoint.prism.path.ItemName; -import com.evolveum.midpoint.prism.path.ItemPath; -import com.evolveum.midpoint.util.exception.SchemaException; -import org.jetbrains.annotations.NotNull; - -import javax.xml.namespace.QName; -import java.util.Collection; -import java.util.Comparator; -import java.util.List; -import java.util.Map; -import java.util.function.Function; - -/** - * EXPERIMENTAL - */ -public class AbstractDelegatedPrismProperty implements PrismProperty { - - protected PrismProperty inner; - - public AbstractDelegatedPrismProperty(QName name, PrismPropertyDefinition definition, PrismContext prismContext) { - inner = prismContext.itemFactory().createProperty(name, definition); - } - - public AbstractDelegatedPrismProperty(PrismProperty inner) { - this.inner = inner; - } - - /* - * ================================== BEWARE OF GENERATED CODE ================================== - * - * Methods after this point are generated. They are to be refreshed on each change of the interface. - * Please do NOT change them (unless noted here). - * - */ - - @Override - public PrismPropertyDefinition getDefinition() { - return inner.getDefinition(); - } - - @Override - public void setDefinition(PrismPropertyDefinition definition) { - inner.setDefinition(definition); - } - - @Override - public PrismPropertyValue getValue() { - return inner.getValue(); - } - - @Override - public List> getValues(Class type) { - return inner.getValues(type); - } - - @Override - @NotNull - public Collection getRealValues() { - return inner.getRealValues(); - } - - @Override - public Collection getRealValues(Class type) { - return inner.getRealValues(type); - } - - @Override - public T getAnyRealValue() { - return inner.getAnyRealValue(); - } - - @Override - public PrismPropertyValue getAnyValue() { - return inner.getAnyValue(); - } - - @Override - public T getRealValue() { - return inner.getRealValue(); - } - - @Override - public X getRealValue(Class type) { - return inner.getRealValue(type); - } - - @Override - public X[] getRealValuesArray(Class type) { - return inner.getRealValuesArray(type); - } - - @Override - public PrismPropertyValue getValue(Class type) { - return inner.getValue(type); - } - - @Override - public void setValue(PrismPropertyValue value) { - inner.setValue(value); - } - - @Override - public void setRealValue(T realValue) { - inner.setRealValue(realValue); - } - - @Override - public void setRealValues(T... realValues) { - inner.setRealValues(realValues); - } - - @Override - public void addValues(Collection> pValuesToAdd) { - inner.addValues(pValuesToAdd); - } - - @Override - public void addValue(PrismPropertyValue pValueToAdd) { - inner.addValue(pValueToAdd); - } - - @Override - public void addRealValue(T valueToAdd) { - inner.addRealValue(valueToAdd); - } - - @Override - public void addRealValues(T... valuesToAdd) { - inner.addRealValues(valuesToAdd); - } - - @Override - public boolean deleteValues(Collection> pValuesToDelete) { - return inner.deleteValues(pValuesToDelete); - } - - @Override - public boolean deleteValue(PrismPropertyValue pValueToDelete) { - return inner.deleteValue(pValueToDelete); - } - - @Override - public void replaceValues(Collection> valuesToReplace) { - inner.replaceValues(valuesToReplace); - } - - @Override - public boolean hasValue(PrismPropertyValue value) { - return inner.hasValue(value); - } - - @Override - public boolean hasRealValue(PrismPropertyValue value) { - return inner.hasRealValue(value); - } - - @Override - public PrismPropertyValue getPreviousValue(PrismValue value) { - return inner.getPreviousValue(value); - } - - @Override - public PrismPropertyValue getNextValue(PrismValue value) { - return inner.getNextValue(value); - } - - @Override - public Class getValueClass() { - return inner.getValueClass(); - } - - @Override - public PropertyDelta createDelta() { - return inner.createDelta(); - } - - @Override - public PropertyDelta createDelta(ItemPath path) { - return inner.createDelta(path); - } - - @Override - public Object find(ItemPath path) { - return inner.find(path); - } - - @Override - public PartiallyResolvedItem findPartial( - ItemPath path) { - return inner.findPartial(path); - } - - @Override - public PropertyDelta diff(PrismProperty other) { - return inner.diff(other); - } - - @Override - public PropertyDelta diff(PrismProperty other, boolean ignoreMetadata, boolean isLiteral) { - return inner.diff(other, ignoreMetadata, isLiteral); - } - - @Override - public PrismProperty clone() { - return inner.clone(); - } - - @Override - public PrismProperty cloneComplex(CloneStrategy strategy) { - return inner.cloneComplex(strategy); - } - - @Override - public String toString() { - return inner.toString(); - } - - @Override - public String debugDump(int indent) { - return inner.debugDump(indent); - } - - @Override - public String toHumanReadableString() { - return inner.toHumanReadableString(); - } - - public static T1 getRealValue(PrismProperty property) { - return PrismProperty.getRealValue(property); - } - - @Override - public boolean hasCompleteDefinition() { - return inner.hasCompleteDefinition(); - } - - @Override - public ItemName getElementName() { - return inner.getElementName(); - } - - @Override - public void setElementName(QName elementName) { - inner.setElementName(elementName); - } - - @Override - public String getDisplayName() { - return inner.getDisplayName(); - } - - @Override - public String getHelp() { - return inner.getHelp(); - } - - @Override - public boolean isIncomplete() { - return inner.isIncomplete(); - } - - @Override - public void setIncomplete(boolean incomplete) { - inner.setIncomplete(incomplete); - } - - @Override - public PrismContext getPrismContext() { - return inner.getPrismContext(); - } - - @Override - public PrismContext getPrismContextLocal() { - return inner.getPrismContextLocal(); - } - - @Override - public void setPrismContext(PrismContext prismContext) { - inner.setPrismContext(prismContext); - } - - @Override - public PrismValue getParent() { - return inner.getParent(); - } - - @Override - public void setParent(PrismValue parentValue) { - inner.setParent(parentValue); - } - - @Override - public ItemPath getPath() { - return inner.getPath(); - } - - @Override - public Map getUserData() { - return inner.getUserData(); - } - - @Override - public T getUserData(String key) { - return inner.getUserData(key); - } - - @Override - public void setUserData(String key, Object value) { - inner.setUserData(key, value); - } - - @Override - @NotNull - public List> getValues() { - return inner.getValues(); - } - - @Override - public PrismPropertyValue getValue(int index) { - return inner.getValue(index); - } - - @Override - public boolean hasValue(PrismValue value, boolean ignoreMetadata) { - return inner.hasValue(value, ignoreMetadata); - } - - @Override - public boolean hasValue(PrismValue value) { - return inner.hasValue(value); - } - - @Override - public boolean hasValueIgnoringMetadata(PrismValue value) { - return inner.hasValueIgnoringMetadata(value); - } - - @Override - public boolean isSingleValue() { - return inner.isSingleValue(); - } - - @Override - public PrismValue findValue(PrismValue value, boolean ignoreMetadata) { - return inner.findValue(value, ignoreMetadata); - } - - @Override - public List findValuesIgnoringMetadata(PrismValue value) { - return inner.findValuesIgnoringMetadata(value); - } - - @Override - public Collection> getClonedValues() { - return inner.getClonedValues(); - } - - @Override - public boolean contains(PrismPropertyValue value) { - return inner.contains(value); - } - - @Override - public boolean containsEquivalentValue(PrismPropertyValue value) { - return inner.containsEquivalentValue(value); - } - - @Override - public boolean containsEquivalentValue(PrismPropertyValue value, - Comparator> comparator) { - return inner.containsEquivalentValue(value, comparator); - } - - @Override - public boolean contains(PrismPropertyValue value, boolean ignoreMetadata, - Comparator> comparator) { - return inner.contains(value, ignoreMetadata, comparator); - } - - @Override - public boolean contains(PrismPropertyValue value, boolean ignoreMetadata) { - return inner.contains(value, ignoreMetadata); - } - - @Override - public boolean containsRealValue(PrismPropertyValue value) { - return inner.containsRealValue(value); - } - - @Override - public boolean valuesExactMatch(Collection> matchValues, - Comparator> comparator) { - return inner.valuesExactMatch(matchValues, comparator); - } - - @Override - public int size() { - return inner.size(); - } - - @Override - public boolean addAll(Collection> newValues) throws SchemaException { - return inner.addAll(newValues); - } - - @Override - public boolean add(@NotNull PrismPropertyValue newValue) throws SchemaException { - return inner.add(newValue); - } - - @Override - public boolean add(@NotNull PrismPropertyValue newValue, boolean checkUniqueness) throws SchemaException { - return inner.add(newValue, checkUniqueness); - } - - @Override - public boolean removeAll(Collection> newValues) { - return inner.removeAll(newValues); - } - - @Override - public boolean remove(PrismPropertyValue newValue) { - return inner.remove(newValue); - } - - @Override - public PrismPropertyValue remove(int index) { - return inner.remove(index); - } - - @Override - public void replaceAll(Collection> newValues) throws SchemaException { - inner.replaceAll(newValues); - } - - @Override - public void replace(PrismPropertyValue newValue) { - inner.replace(newValue); - } - - @Override - public void clear() { - inner.clear(); - } - - @Override - public void normalize() { - inner.normalize(); - } - - @Override - public void merge( - Item, PrismPropertyDefinition> otherItem) throws SchemaException { - inner.merge(otherItem); - } - - @Override - public ItemDelta, PrismPropertyDefinition> diff( - Item, PrismPropertyDefinition> other) { - return inner.diff(other); - } - - @Override - public ItemDelta, PrismPropertyDefinition> diff( - Item, PrismPropertyDefinition> other, boolean ignoreMetadata, boolean isLiteral) { - return inner.diff(other, ignoreMetadata, isLiteral); - } - - @Override - public void accept(Visitor visitor) { - inner.accept(visitor); - } - - @Override - public void accept(Visitor visitor, ItemPath path, boolean recursive) { - inner.accept(visitor, path, recursive); - } - - @Override - public void recomputeAllValues() { - inner.recomputeAllValues(); - } - - @Override - public void filterValues( - Function, Boolean> function) { - inner.filterValues(function); - } - - @Override - public void applyDefinition(PrismPropertyDefinition definition) throws SchemaException { - inner.applyDefinition(definition); - } - - @Override - public void applyDefinition(PrismPropertyDefinition definition, boolean force) throws SchemaException { - inner.applyDefinition(definition, force); - } - - @Override - public void revive(PrismContext prismContext) throws SchemaException { - inner.revive(prismContext); - } - - public static Collection cloneCollection(Collection items) { - return Item.cloneCollection(items); - } - - @Override - public void checkConsistence(boolean requireDefinitions, ConsistencyCheckScope scope) { - inner.checkConsistence(requireDefinitions, scope); - } - - @Override - public void checkConsistence(boolean requireDefinitions, boolean prohibitRaw) { - inner.checkConsistence(requireDefinitions, prohibitRaw); - } - - @Override - public void checkConsistence(boolean requireDefinitions, boolean prohibitRaw, - ConsistencyCheckScope scope) { - inner.checkConsistence(requireDefinitions, prohibitRaw, scope); - } - - @Override - public void checkConsistence() { - inner.checkConsistence(); - } - - @Override - public void checkConsistence(ConsistencyCheckScope scope) { - inner.checkConsistence(scope); - } - - @Override - public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, - ConsistencyCheckScope scope) { - inner.checkConsistenceInternal(rootItem, requireDefinitions, prohibitRaw, scope); - } - - @Override - public void assertDefinitions() throws SchemaException { - inner.assertDefinitions(); - } - - @Override - public void assertDefinitions(String sourceDescription) throws SchemaException { - inner.assertDefinitions(sourceDescription); - } - - @Override - public void assertDefinitions(boolean tolarateRawValues, String sourceDescription) throws SchemaException { - inner.assertDefinitions(tolarateRawValues, sourceDescription); - } - - @Override - public boolean isRaw() { - return inner.isRaw(); - } - - @Override - public boolean hasRaw() { - return inner.hasRaw(); - } - - @Override - public boolean isEmpty() { - return inner.isEmpty(); - } - - @Override - public boolean hasNoValues() { - return inner.hasNoValues(); - } - - public static boolean hasNoValues(Item item) { - return Item.hasNoValues(item); - } - - @Override - public boolean equalsRealValue(Object obj) { - return inner.equalsRealValue(obj); - } - - @Override - public boolean match(Object obj) { - return inner.match(obj); - } - - @Override - public boolean isMetadata() { - return inner.isMetadata(); - } - - @Override - public boolean isImmutable() { - return inner.isImmutable(); - } - - @Override - public void setImmutable(boolean immutable) { - inner.setImmutable(immutable); - } - - @Override - public void checkImmutability() { - inner.checkImmutability(); - } - - @Override - public void modifyUnfrozen(Runnable mutator) { - inner.modifyUnfrozen(mutator); - } - - @NotNull - public static Collection getValues(Item item) { - return Item.getValues(item); - } - - @Override - @NotNull - public Collection getAllValues(ItemPath path) { - return inner.getAllValues(path); - } - - @NotNull - public static Collection getAllValues(Item item, ItemPath path) { - return Item.getAllValues(item, path); - } - - @Override - public String debugDump() { - return inner.debugDump(); - } - - @Override - public Object debugDumpLazily() { - return inner.debugDumpLazily(); - } - - @Override - public Object debugDumpLazily(int index) { - return inner.debugDumpLazily(index); - } - -} diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/path/ItemPath.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/path/ItemPath.java index afdfd211f19..d5a0980550f 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/path/ItemPath.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/path/ItemPath.java @@ -95,6 +95,14 @@ static ItemPath create(@NotNull List components) { return ItemPathImpl.createFromList(components); } + /** + * Creates the path from given components in reverse direction. E.g. [a, b, c] -> c/b/a + */ + @NotNull + static ItemPath createReverse(@NotNull List components) { + return ItemPathImpl.createFromListReverse(components); + } + /** * Returns true if the path is empty i.e. has no components. */ diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/path/ItemPathImpl.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/path/ItemPathImpl.java index a509b93529e..2a11b57e2d2 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/path/ItemPathImpl.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/path/ItemPathImpl.java @@ -47,6 +47,15 @@ static ItemPathImpl createFromList(@NotNull List components) { return path; } + @NotNull + static ItemPathImpl createFromListReverse(@NotNull List components) { + ItemPathImpl path = new ItemPathImpl(); + for (int i = components.size() - 1; i >= 0; i--) { + path.add(components.get(i)); + } + return path; + } + @NotNull static ItemPathImpl createFromArray(@NotNull Object[] components) { ItemPathImpl path = new ItemPathImpl(); diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/util/ItemDeltaItem.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/util/ItemDeltaItem.java index edab9652baa..e4388ffcdf4 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/util/ItemDeltaItem.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/util/ItemDeltaItem.java @@ -436,7 +436,7 @@ private V getSingleValue(Item item) { if (item == null || item.isEmpty()) { return null; } else if (item.size() == 1) { - return item.getValue(0); + return item.getAnyValue(); } else { throw new IllegalStateException("Multiple values where single one was expected: " + item); } diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/xnode/PrimitiveXNode.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/xnode/PrimitiveXNode.java index c25738e5a3f..4b906f34b84 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/xnode/PrimitiveXNode.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/xnode/PrimitiveXNode.java @@ -27,6 +27,8 @@ */ public interface PrimitiveXNode extends XNode { + String getGuessedFormattedValue() throws SchemaException; + /** * Returns the value represented as string - in the best format that we can. * There is no guarantee that the returned value will be precise. diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageAdminRoles.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/xnode/XNodeMutator.java similarity index 50% rename from gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageAdminRoles.java rename to infra/prism-api/src/main/java/com/evolveum/midpoint/prism/xnode/XNodeMutator.java index 76811e90c46..1d73bafada9 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/PageAdminRoles.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/xnode/XNodeMutator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2017 Evolveum + * Copyright (c) 2010-2018 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,18 +14,21 @@ * limitations under the License. */ -package com.evolveum.midpoint.web.page.admin.roles; +package com.evolveum.midpoint.prism.xnode; - -import com.evolveum.midpoint.security.api.AuthorizationConstants; -import com.evolveum.midpoint.web.page.admin.PageAdmin; +import javax.xml.namespace.QName; /** - * @author lazyman + * Temporary interface to allow modifying XNode representation. Hopefully it will be removed soon. DO NOT USE. */ -public class PageAdminRoles extends PageAdmin { +public interface XNodeMutator { + + void setPrimitiveXNodeValue(PrimitiveXNode node, T value, QName typeName); + + void putToMapXNode(MapXNode map, QName key, XNode value); + + void addToListXNode(ListXNode list, XNode... nodes); + + void setXNodeType(XNode node, QName explicitTypeName, boolean explicitTypeDeclaration); - public static final String AUTH_ROLE_ALL = AuthorizationConstants.AUTZ_UI_ROLES_ALL_URL; - public static final String AUTH_ROLE_ALL_LABEL = "PageAdminRoles.auth.roleAll.label"; - public static final String AUTH_ROLE_ALL_DESCRIPTION = "PageAdminRoles.auth.roleAll.description"; } diff --git a/infra/prism-api/src/main/java/com/evolveum/prism/xml/ns/_public/types_3/RawType.java b/infra/prism-api/src/main/java/com/evolveum/prism/xml/ns/_public/types_3/RawType.java index f1dde1dafd9..ff6ca9248c3 100644 --- a/infra/prism-api/src/main/java/com/evolveum/prism/xml/ns/_public/types_3/RawType.java +++ b/infra/prism-api/src/main/java/com/evolveum/prism/xml/ns/_public/types_3/RawType.java @@ -162,8 +162,8 @@ public IV getParsedValue(@Null } checkPrismContext(); Item subItem = prismContext.parserFor(getRootXNode(itemName)).name(itemName).definition(itemDefinition).parseItem(); - if (!subItem.isEmpty()){ - value = subItem.getValue(0); + if (!subItem.isEmpty()) { + value = subItem.getAnyValue(); } else { value = null; } @@ -259,7 +259,7 @@ public XNode serializeToXNode() throws SchemaException { } else if (parsed != null) { checkPrismContext(); XNode rv = prismContext.xnodeSerializer().root(new QName("dummy")).serialize(parsed).getSubnode(); - prismContext.hacks().setXNodeType(rv, explicitTypeName, explicitTypeDeclaration); + prismContext.xnodeMutator().setXNodeType(rv, explicitTypeName, explicitTypeDeclaration); return rv; } else { return null; // or an exception here? @@ -392,4 +392,18 @@ public void shortDump(StringBuilder sb) { } } + public boolean isParsed() { + return parsed != null; + } + + // avoid if possible + public String guessFormattedValue() throws SchemaException { + if (parsed != null) { + return parsed.getRealValue().toString(); // todo reconsider this + } else if (xnode instanceof PrimitiveXNode) { + return ((PrimitiveXNode) xnode).getGuessedFormattedValue(); + } else { + return null; + } + } } diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/ComplexTypeDefinitionImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/ComplexTypeDefinitionImpl.java index ae9cc5eb921..f5861f8e1ba 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/ComplexTypeDefinitionImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/ComplexTypeDefinitionImpl.java @@ -376,23 +376,24 @@ protected void copyDefinitionData(ComplexTypeDefinitionImpl clone) { clone.itemDefinitions.addAll(this.itemDefinitions); } - public void replaceDefinition(QName propertyName, ItemDefinition newDefinition) { + @Override + public void replaceDefinition(QName itemName, ItemDefinition newDefinition) { for (int i=0; i @@ -46,8 +49,7 @@ * * @author Radovan Semancik */ -public abstract class ItemImpl implements Item, Itemable, DebugDumpable, - Visitable, PathVisitable, Serializable, Revivable { +public abstract class ItemImpl implements Item { private static final long serialVersionUID = 510000191615288733L; @@ -55,11 +57,13 @@ public abstract class ItemImpl i // usual case when it is constructed "out of the blue", e.g. as a new JAXB object // It may not work perfectly, but basic things should work protected ItemName elementName; - protected PrismValue parent; + protected PrismContainerValue parent; protected D definition; @NotNull protected final List values = new ArrayList<>(); private transient Map userData = new HashMap<>();; + protected EquivalenceStrategy defaultEquivalenceStrategy; + protected boolean immutable; protected boolean incomplete; @@ -121,14 +125,6 @@ private static Class toImplClass(Class type) { } } - /** - * Returns applicable property definition. - *

- * May return null if no definition is applicable or the definition is not - * know. - * - * @return applicable property definition - */ @Override public D getDefinition() { return definition; @@ -139,33 +135,11 @@ public boolean hasCompleteDefinition() { return getDefinition() != null; } - /** - * Returns the name of the property. - *

- * The name is a QName. It uniquely defines a property. - *

- * The name may be null, but such a property will not work. - *

- * The name is the QName of XML element in the XML representation. - * - * @return property name - */ @Override public ItemName getElementName() { return elementName; } - /** - * Sets the name of the property. - *

- * The name is a QName. It uniquely defines a property. - *

- * The name may be null, but such a property will not work. - *

- * The name is the QName of XML element in the XML representation. - * - * @param elementName the name to set - */ @Override public void setElementName(QName elementName) { checkMutability(); @@ -184,49 +158,16 @@ public void setDefinition(D definition) { this.definition = definition; } - /** - * Returns a display name for the property type. - *

- * Returns null if the display name cannot be determined. - *

- * The display name is fetched from the definition. If no definition - * (schema) is available, the display name will not be returned. - * - * @return display name for the property type - */ @Override public String getDisplayName() { return getDefinition() == null ? null : getDefinition().getDisplayName(); } - /** - * Returns help message defined for the property type. - *

- * Returns null if the help message cannot be determined. - *

- * The help message is fetched from the definition. If no definition - * (schema) is available, the help message will not be returned. - * - * @return help message for the property type - */ @Override public String getHelp() { return getDefinition() == null ? null : getDefinition().getHelp(); } - /** - * Flag that indicates incomplete item. If set to true then the - * values in this item are not complete. If this flag is true - * then it can be assumed that the object that this item represents - * has at least one value. This is a method how to indicate that - * the item really has some values, but are not here. This may - * be used for variety of purposes. It may indicate that the - * account has a password, but the password value is not revealed. - * This may indicate that a user has a photo, but the photo was not - * requested and therefore is not returned. This may be used to indicate - * that only part of the attribute values were returned from the search. - * And so on. - */ public boolean isIncomplete() { return incomplete; } @@ -255,11 +196,11 @@ public void setPrismContext(PrismContext prismContext) { this.prismContext = prismContext; } - public PrismValue getParent() { + public PrismContainerValue getParent() { return parent; } - public void setParent(PrismValue parentValue) { + public void setParent(PrismContainerValue parentValue) { if (this.parent != null && parentValue != null && this.parent != parentValue) { throw new IllegalStateException("Attempt to reset parent of item "+this+" from "+this.parent+" to "+parentValue); } @@ -268,15 +209,75 @@ public void setParent(PrismValue parentValue) { this.parent = parentValue; } - @NotNull + protected Object getPathComponent() { + ItemName elementName = getElementName(); + if (elementName != null) { + return elementName; + } else { + throw new IllegalStateException("Unnamed item has no path"); + } + } + + @Nullable + @Override + public Object getRealValue() { + V value = getValue(); + return value != null ? value.getRealValue() : null; + } + + @NotNull public ItemPath getPath() { if (parent == null) { - return getElementName(); + if (getElementName() != null) { + return getElementName(); + } else { + throw new IllegalStateException("Unnamed item has no path"); + } } - return parent.getPath().append(getElementName()); + /* + * This quite ugly algorithm is here to eliminate the need to repeatedly call itemPath.append(..) method + * that leads to creation of many little objects on the heap. Instead we simply collect path segments + * and merge them to a single item path in one operation. + * + * TODO This is not very nice solution. Think again about it. + */ + List names = new ArrayList<>(); + acceptParentVisitor(v -> { + Object pathComponent; + if (v instanceof Item) { + if (v instanceof ItemImpl) { + pathComponent = ((ItemImpl) v).getPathComponent(); + } else { + throw new IllegalStateException("Expected ItemImpl but got " + v.getClass()); + } + } else if (v instanceof PrismValue) { + if (v instanceof PrismValueImpl) { + pathComponent = ((PrismValueImpl) v).getPathComponent(); + } else { + throw new IllegalStateException("Expected PrismValueImpl but got " + v.getClass()); + } + } else if (v instanceof Itemable) { // e.g. a delta + pathComponent = ((Itemable) v).getPath(); + } else { + throw new IllegalStateException("Expected Item or PrismValue but got " + v.getClass()); + } + if (pathComponent != null) { + names.add(pathComponent); + } + }); + return ItemPath.createReverse(names); } - public Map getUserData() { + @Override + public void acceptParentVisitor(@NotNull Visitor visitor) { + visitor.visit(this); + if (parent != null) { + parent.acceptParentVisitor(visitor); + } + } + + @NotNull + public Map getUserData() { if (userData == null) { userData = new HashMap<>(); } @@ -302,26 +303,23 @@ public List getValues() { return values; } - public V getValue(int index) { - if (index < 0) { - index = values.size() + index; - } - return values.get(index); + @Override + public V getAnyValue() { + return !values.isEmpty() ? values.get(0) : null; } - public boolean hasValue(PrismValue value, boolean ignoreMetadata) { - return findValue(value, ignoreMetadata) != null; - } - - public boolean hasValue(PrismValue value) { - return hasValue(value, false); - } - - public boolean hasValueIgnoringMetadata(PrismValue value) { - return hasValue(value, true); - } + @Override + public V getValue() { + if (values.isEmpty()) { + return null; + } else if (values.size() == 1) { + return values.get(0); + } else { + throw new IllegalStateException("Attempt to get single value from item " + getElementName() + " with multiple values"); + } + } - public boolean isSingleValue() { + public boolean isSingleValue() { // TODO what about dynamic definitions? See MID-3922 if (getDefinition() != null) { if (getDefinition().isMultiValue()) { @@ -331,48 +329,23 @@ public boolean isSingleValue() { return values.size() <= 1; } - public PrismValue findValue(PrismValue value, boolean ignoreMetadata) { + @Override + public PrismValue findValue(PrismValue value, EquivalenceStrategy strategy) { for (PrismValue myVal : getValues()) { - if (myVal.equalsComplex(value, ignoreMetadata, false)) { + if (myVal.equals(value, strategy)) { return myVal; } } return null; } - public List findValuesIgnoringMetadata(PrismValue value) { - return getValues().stream() - .filter(v -> v.equalsComplex(value, true, false)) - .collect(Collectors.toList()); - } - - public PrismValue getPreviousValue(PrismValue value) { - PrismValue previousValue = null; - for (PrismValue myVal : getValues()) { - if (myVal == value) { - return previousValue; - } - previousValue = myVal; - } - throw new IllegalStateException("The value "+value+" is not any of "+this+" values, therefore cannot determine previous value"); - } - - public PrismValue getNextValue(PrismValue value) { - Iterator iterator = getValues().iterator(); - while (iterator.hasNext()) { - PrismValue myVal = iterator.next(); - if (myVal == value) { - if (iterator.hasNext()) { - return iterator.next(); - } else { - return null; - } - } - } - throw new IllegalStateException("The value "+value+" is not any of "+this+" values, therefore cannot determine next value"); - } +// public List findValuesIgnoringMetadata(PrismValue value) { +// return getValues().stream() +// .filter(v -> v.equalsComplex(value, true, false)) +// .collect(Collectors.toList()); +// } - public Collection getClonedValues() { + public Collection getClonedValues() { Collection clonedValues = new ArrayList<>(getValues().size()); for (V val: getValues()) { clonedValues.add((V)val.clone()); @@ -381,42 +354,40 @@ public Collection getClonedValues() { } public boolean contains(V value) { - return contains(value, false); + return contains(value, getEqualsHashCodeStrategy()); } - public boolean containsEquivalentValue(V value) { - return contains(value, true); - } - + @Deprecated public boolean containsEquivalentValue(V value, Comparator comparator) { - return contains(value, true, comparator); + return contains(value, EquivalenceStrategy.IGNORE_METADATA, comparator); } - public boolean contains(V value, boolean ignoreMetadata, Comparator comparator) { - if (comparator == null) { - return contains(value, ignoreMetadata); - } else { - for (V myValue: getValues()) { - if (comparator.compare(myValue, value) == 0) { - return true; - } - } - } + public boolean contains(V value, @NotNull EquivalenceStrategy strategy) { + for (V myValue: getValues()) { + if (strategy.equals(myValue, value)) { + return true; + } + } return false; } - public boolean contains(V value, boolean ignoreMetadata) { - for (V myValue: getValues()) { - if (myValue.equals(value, ignoreMetadata)) { - return true; - } - } - return false; + @Override + public boolean contains(V value, @NotNull EquivalenceStrategy strategy, Comparator comparator) { + if (comparator == null) { + return contains(value, strategy); + } else { + for (V myValue : getValues()) { + if (comparator.compare(myValue, value) == 0) { + return true; + } + } + return false; + } } public boolean containsRealValue(V value) { for (V myValue: getValues()) { - if (myValue.equalsRealValue(value)) { + if (myValue.equals(value, EquivalenceStrategy.REAL_VALUE)) { return true; } } @@ -443,18 +414,29 @@ public boolean addAll(Collection newValues) throws SchemaException { } public boolean add(@NotNull V newValue) throws SchemaException { - return add(newValue, true); + return add(newValue, true, getEqualsHashCodeStrategy()); } - public boolean add(@NotNull V newValue, boolean checkUniqueness) throws SchemaException { + @Override + public boolean add(@NotNull V newValue, @NotNull EquivalenceStrategy equivalenceStrategy) throws SchemaException { + return add(newValue, true, equivalenceStrategy); + } + + public boolean add(@NotNull V newValue, boolean checkUniqueness) throws SchemaException { + return add(newValue, checkUniqueness, getEqualsHashCodeStrategy()); + } + + public boolean add(@NotNull V newValue, boolean checkUniqueness, @NotNull EquivalenceStrategy equivalenceStrategy) throws SchemaException { checkMutability(); if (newValue.getPrismContext() == null) { newValue.setPrismContext(prismContext); } - if (checkUniqueness && containsEquivalentValue(newValue)) { + Itemable originalParent = newValue.getParent(); + newValue.setParent(this); // needed e.g. because of PrismReferenceValue comparisons + if (checkUniqueness && contains(newValue, equivalenceStrategy)) { + newValue.setParent(originalParent); return false; } - newValue.setParent(this); D definition = getDefinition(); if (definition != null) { if (!values.isEmpty() && definition.isSingleValue()) { @@ -465,7 +447,7 @@ public boolean add(@NotNull V newValue, boolean checkUniqueness) throws SchemaEx return values.add(newValue); } - public boolean removeAll(Collection newValues) { + public boolean removeAll(Collection newValues) { checkMutability(); // TODO consider if there is real change boolean changed = false; for (V val: newValues) { @@ -485,7 +467,7 @@ public boolean remove(V newValue) { // the same algorithm as when deleting the item value from delete delta // TODO either make equalsRealValue return false if both PCVs have IDs and these IDs are different // TODO or include a special test condition here; see MID-3828 - if (val.representsSameValue(newValue, false) || val.equalsRealValue(newValue)) { + if (val.representsSameValue(newValue, false) || val.equals(newValue, EquivalenceStrategy.REAL_VALUE)) { iterator.remove(); val.setParent(null); changed = true; @@ -496,11 +478,13 @@ public boolean remove(V newValue) { public V remove(int index) { checkMutability(); // TODO consider if there is real change + // TODO set parent for removed value? return values.remove(index); } public void replaceAll(Collection newValues) throws SchemaException { checkMutability(); // TODO consider if there is real change + // TODO set parent for removed values? values.clear(); addAll(newValues); } @@ -537,13 +521,13 @@ public void merge(Item otherItem) throws SchemaException { // We want this method to be consistent with property diff public ItemDelta diff(Item other) { - return diff(other, true, false); + return diff(other, EquivalenceStrategy.IGNORE_METADATA); } // We want this method to be consistent with property diff - public ItemDelta diff(Item other, boolean ignoreMetadata, boolean isLiteral) { + public ItemDelta diff(Item other, ParameterizedEquivalenceStrategy strategy) { List itemDeltas = new ArrayList<>(); - diffInternal(other, itemDeltas, ignoreMetadata, isLiteral); + diffInternal(other, itemDeltas, strategy); if (itemDeltas.isEmpty()) { return null; } @@ -553,8 +537,8 @@ public ItemDelta diff(Item other, boolean ignoreMetadata, boolean isLi return itemDeltas.get(0); } - protected void diffInternal(Item other, Collection deltas, - boolean ignoreMetadata, boolean isLiteral) { + void diffInternal(Item other, Collection deltas, + ParameterizedEquivalenceStrategy strategy) { ItemDelta delta = createDelta(); if (other == null) { if (delta.getDefinition() == null && this.getDefinition() != null) { @@ -576,18 +560,17 @@ protected void diffInternal(Item other, Collection del Iterator iterator = outstandingOtherValues.iterator(); boolean found = false; while (iterator.hasNext()) { - PrismValue otherValue = iterator.next(); - if (thisValue.representsSameValue(otherValue, true) || delta == null) { + PrismValueImpl otherValue = (PrismValueImpl) iterator.next(); + if (thisValue.representsSameValue(otherValue, true)) { found = true; // Matching IDs, look inside to figure out internal deltas - thisValue.diffMatchingRepresentation(otherValue, deltas, - ignoreMetadata, isLiteral); + ((PrismValueImpl) thisValue).diffMatchingRepresentation(otherValue, deltas, strategy); // No need to process this value again iterator.remove(); break; // TODO either make equalsRealValue return false if both PCVs have IDs and these IDs are different // TODO or include a special test condition here; see MID-3828 - } else if (thisValue.equalsComplex(otherValue, ignoreMetadata, isLiteral)) { + } else if (thisValue.equals(otherValue, strategy)) { found = true; // same values. No delta // No need to process this value again @@ -607,14 +590,14 @@ protected void diffInternal(Item other, Collection del } // Some deltas may need to be polished a bit. E.g. transforming // add/delete delta to a replace delta. - delta = fixupDelta(delta, other, ignoreMetadata); + delta = fixupDelta(delta, other); } if (delta != null && !delta.isEmpty()) { ((Collection)deltas).add(delta); } } - protected ItemDelta fixupDelta(ItemDelta delta, Item other, boolean ignoreMetadata) { + protected ItemDelta fixupDelta(ItemDelta delta, Item other) { return delta; } @@ -806,20 +789,37 @@ public boolean hasNoValues() { return getValues().isEmpty(); } + @Override + public int hashCode(@NotNull EquivalenceStrategy equivalenceStrategy) { + return equivalenceStrategy.hashCode(this); + } + + @Override + public int hashCode(@NotNull ParameterizedEquivalenceStrategy equivalenceStrategy) { + int valuesHash = MiscUtil.unorderedCollectionHashcode(values, null); + if (valuesHash == 0) { + // empty or non-significant container. We do not want this to destroy hashcode of + // parent item + return 0; + } + final int prime = 31; + int result = 1; + if (equivalenceStrategy.isConsideringElementNames()) { + String localElementName = elementName != null ? elementName.getLocalPart() : null; + result = prime * result + ((localElementName == null) ? 0 : localElementName.hashCode()); + } + result = prime * result + valuesHash; + return result; + } + @Override public int hashCode() { - int valuesHash = MiscUtil.unorderedCollectionHashcode(values, null); - if (valuesHash == 0) { - // empty or non-significant container. We do not want this to destroy hashcode of - // parent item - return 0; - } - final int prime = 31; - int result = 1; - String localElementName = elementName != null ? elementName.getLocalPart() : null; - result = prime * result + ((localElementName == null) ? 0 : localElementName.hashCode()); - result = prime * result + valuesHash; - return result; + return hashCode(getEqualsHashCodeStrategy()); + } + + @NotNull + private EquivalenceStrategy getEqualsHashCodeStrategy() { + return defaultIfNull(defaultEquivalenceStrategy, EquivalenceStrategy.NOT_LITERAL); } public boolean equalsRealValue(Object obj) { @@ -837,88 +837,53 @@ public boolean equalsRealValue(Object obj) { private boolean equalsRealValues(List thisValue, List otherValues) { return MiscUtil.unorderedCollectionEquals(thisValue, otherValues, - (o1, o2) -> o1 != null && o2 instanceof PrismValue && o1.equalsRealValue((PrismValue) o2)); + (o1, o2) -> o1 != null && o2 instanceof PrismValue && o1.equals((PrismValue) o2, EquivalenceStrategy.IGNORE_METADATA)); } - private boolean match(List thisValue, List otherValues) { - return MiscUtil.unorderedCollectionEquals(thisValue, otherValues, - (o1, o2) -> { - if (o1 instanceof PrismValueImpl && o2 instanceof PrismValueImpl) { - PrismValueImpl v1 = (PrismValueImpl) o1; - PrismValueImpl v2 = (PrismValueImpl)o2; - return v1.match(v2); - } else { - return false; - } - }); + public boolean equals(Object obj, @NotNull EquivalenceStrategy strategy) { + if (!(obj instanceof Item)) { + return false; + } else if (strategy instanceof ParameterizedEquivalenceStrategy) { + return equals(obj, (ParameterizedEquivalenceStrategy) strategy); + } else { + incrementObjectCompareCounterIfNeeded(obj); + return strategy.equals(this, (Item) obj); + } } - @Override - public boolean equals(Object obj) { - if (this == obj) + public boolean equals(Object obj, @NotNull ParameterizedEquivalenceStrategy parameterizedEquivalenceStrategy) { + incrementObjectCompareCounterIfNeeded(obj); + if (this == obj) { return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - ItemImpl other = (ItemImpl) obj; - if (definition == null) { - if (other.definition != null) - return false; - } else if (!definition.equals(other.definition)) - return false; - if (elementName == null) { - if (other.elementName != null) - return false; - } else if (!elementName.equals(other.elementName)) - return false; - if (incomplete != other.incomplete) { - return false; } - // Do not compare parent at all. This is not relevant. - if (values == null) { - if (other.values != null) - return false; - } else if (!MiscUtil.unorderedCollectionEquals(this.values, other.values)) + if (getClass() != obj.getClass()) { return false; - return true; + } + ItemImpl second = (ItemImpl) obj; + return (!parameterizedEquivalenceStrategy.isConsideringDefinitions() || Objects.equals(definition, second.definition)) && + (!parameterizedEquivalenceStrategy.isConsideringElementNames() || Objects.equals(elementName, second.elementName)) && + incomplete == second.incomplete && + MiscUtil.unorderedCollectionEquals(values, second.values, parameterizedEquivalenceStrategy::equals); + // Do not compare parents at all. They are not relevant. } - public boolean match(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - ItemImpl other = (ItemImpl) obj; - if (definition == null) { - if (other.definition != null) - return false; - } else if (!definition.equals(other.definition)) - return false; - if (elementName == null) { - if (other.elementName != null) - return false; - } else if (!elementName.equals(other.elementName)) - return false; - if (incomplete != other.incomplete) { - return false; + private void incrementObjectCompareCounterIfNeeded(Object obj) { + if (this instanceof PrismObject && prismContext != null && prismContext.getMonitor() != null) { + prismContext.getMonitor().recordPrismObjectCompareCount((PrismObject) this, obj); } - // Do not compare parent at all. This is not relevant. - if (values == null) { - if (other.values != null) - return false; - } else if (!match(this.values, other.values)) - return false; - return true; + } + + @SuppressWarnings("EqualsWhichDoesntCheckParameterClass") + @Override + public boolean equals(Object obj) { + return equals(obj, getEqualsHashCodeStrategy()); } /** - * Returns true if this item is metadata item that should be ignored - * for metadata-insensitive comparisons and hashCode functions. + * Returns true if this item is operational one that should be ignored + * for operational data-insensitive comparisons and hashCode functions. */ - public boolean isMetadata() { + public boolean isOperational() { D def = getDefinition(); if (def != null) { return def.isOperational(); diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContainerImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContainerImpl.java index 547a444b119..9dfedae9ff0 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContainerImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContainerImpl.java @@ -18,6 +18,8 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.ContainerDelta; +import com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.impl.delta.ContainerDeltaImpl; import com.evolveum.midpoint.prism.delta.ItemDelta; import com.evolveum.midpoint.prism.path.*; @@ -140,28 +142,16 @@ public Collection getRealValues() { for (PrismContainerValue value : getValues()) { realValues.add(value.asContainerable()); } - return realValues; - } - @Override - public C getRealValue() { - if (getValue() == null) { - return null; - } - return getValue().asContainerable(); - } - - public PrismContainerValue getOrCreateValue() { - if (getValues().size() == 0) { - return createNewValue(); - } else { - return getValue(); - } - } + @Override + public C getRealValue() { + return getValue().getRealValue(); + } - public PrismContainerValue getValue() { + @NotNull + public PrismContainerValue getValue() { if (getValues().size() == 1) { return getValues().get(0); } @@ -231,16 +221,6 @@ public boolean add(@NotNull PrismContainerValue newValue, boolean checkUniquenes return super.add(newValue, checkUniqueness); } - @Override - public PrismContainerValue getPreviousValue(PrismValue value) { - return (PrismContainerValue) super.getPreviousValue(value); - } - - @Override - public PrismContainerValue getNextValue(PrismValue value) { - return (PrismContainerValue) super.getNextValue(value); - } - private boolean canAssumeSingleValue() { if (getDefinition() != null) { return getDefinition().isSingleValue(); @@ -288,7 +268,7 @@ public T getPropertyRealValue(ItemPath propertyPath, Class type) { */ public void add(Item item) throws SchemaException { checkMutability(); - getValue().add(item); + this.getValue().add(item); } public PrismContainerValue createNewValue() { @@ -361,7 +341,7 @@ public void trim() { * @return applicable property container definition */ public PrismContainerDefinition getDefinition() { - return (PrismContainerDefinition) definition; + return definition; } /** @@ -455,7 +435,7 @@ public PartiallyResolvedItem> I findCreateItem(QName itemQName, Class type, boolean create) throws SchemaException { - return ((PrismContainerValueImpl) getValue()).findCreateItem(itemQName, type, null, create); + return ((PrismContainerValueImpl) this.getValue()).findCreateItem(itemQName, type, null, create); } @Override @@ -519,7 +499,7 @@ public PrismContainerValue findValue(long id) { private PrismContainerValue findValue(Long id) { if (id == null) { if (canAssumeSingleValue()) { - return getValue(); + return this.getValue(); } else { throw new IllegalArgumentException("Attempt to get segment without an ID from a multi-valued container "+ getElementName()); } @@ -542,7 +522,7 @@ public PrismContainer findContainer(QName container } public > List getItems(Class type) { - return getValue().getItems(type); + return this.getValue().getItems(type); } @SuppressWarnings("unchecked") @@ -560,7 +540,7 @@ public PrismReference findReference(ItemPath path) { } public PrismReference findReferenceByCompositeObjectElementName(QName elementName) { - return getValue().findReferenceByCompositeObjectElementName(elementName); + return this.getValue().findReferenceByCompositeObjectElementName(elementName); } public > I findOrCreateItem( @@ -597,7 +577,7 @@ public PrismReference findOrCreateReference(ItemPath propertyPath) throws Schema * Convenience method. Works only on single-valued containers. */ public void remove(Item item) { - getValue().remove(item); + this.getValue().remove(item); } public void removeProperty(ItemPath path) { @@ -701,10 +681,10 @@ private void checkIds() { } @Override - public void assertDefinitions(boolean tolarateRaw, String sourceDescription) throws SchemaException { - super.assertDefinitions(tolarateRaw, sourceDescription); + public void assertDefinitions(boolean tolerateRaw, String sourceDescription) throws SchemaException { + super.assertDefinitions(tolerateRaw, sourceDescription); for (PrismContainerValue val: getValues()) { - val.assertDefinitions(tolarateRaw, this.toString()+" in "+sourceDescription); + val.assertDefinitions(tolerateRaw, this.toString()+" in "+sourceDescription); } } @@ -712,17 +692,17 @@ public ContainerDelta diff(PrismContainer other) { return (ContainerDelta) super.diff(other); } - public ContainerDelta diff(PrismContainer other, boolean ignoreMetadata, boolean isLiteral) { - return (ContainerDelta) super.diff(other, true, false); + public ContainerDelta diff(PrismContainer other, ParameterizedEquivalenceStrategy strategy) { + return (ContainerDelta) super.diff(other, strategy); } public List diffModifications(PrismContainer other) { - return diffModifications(other, true, false); + return diffModifications(other, EquivalenceStrategy.IGNORE_METADATA); } - public List diffModifications(PrismContainer other, boolean ignoreMetadata, boolean isLiteral) { + public List diffModifications(PrismContainer other, ParameterizedEquivalenceStrategy strategy) { List itemDeltas = new ArrayList<>(); - diffInternal(other, itemDeltas, ignoreMetadata, isLiteral); + diffInternal(other, itemDeltas, strategy); return itemDeltas; } @@ -765,27 +745,28 @@ protected void propagateDeepCloneDefinition(boolean ultraDeep, PrismContainerDef } } - @Override + @Override public boolean containsEquivalentValue(PrismContainerValue value) { - if (value.isIdOnly()) { - PrismContainerValue myValue = findValue(value.getId()); - return myValue != null; - } else if (value.getId() == null) { - return super.contains(value, true); - } else { - return super.contains(value, false); - } + if (value.isIdOnly()) { + PrismContainerValue myValue = findValue(value.getId()); + return myValue != null; + } else if (value.getId() == null) { + return super.contains(value, EquivalenceStrategy.IGNORE_METADATA); + } else { + return super.contains(value, EquivalenceStrategy.NOT_LITERAL); + } } - - @Override + + @Deprecated // todo + @Override public boolean containsEquivalentValue(PrismContainerValue value, Comparator> comparator) { if (value.isIdOnly()) { PrismContainerValue myValue = findValue(value.getId()); return myValue != null; } else if (value.getId() == null) { - return super.contains(value, true, comparator); + return super.contains(value, EquivalenceStrategy.IGNORE_METADATA, comparator); } else { - return super.contains(value, false, comparator); + return super.contains(value, EquivalenceStrategy.NOT_LITERAL, comparator); } } @@ -815,49 +796,12 @@ public void accept(Visitor visitor, ItemPath path, boolean recursive) { } } - /** - * Note: hashcode and equals compare the objects in the "java way". That means the objects must be - * almost precisely equal to match (e.g. including source demarcation in values and other "annotations"). - * For a method that compares the "meaningful" parts of the objects see equivalent(). - */ - @Override - public int hashCode() { - int result = super.hashCode(); - return result; - } - - /** - * Note: hashcode and equals compare the objects in the "java way". That means the objects must be - * almost precisely equal to match (e.g. including source demarcation in values and other "annotations"). - * For a method that compares the "meaningful" parts of the objects see equivalent(). - */ - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (!super.equals(obj)) - return false; - if (getClass() != obj.getClass()) - return false; - return true; - } - /** * This method ignores some part of the object during comparison (e.g. source demarcation in values) * These methods compare the "meaningful" parts of the objects. */ public boolean equivalent(Object obj) { - // Alibistic implementation for now. But should work well. - if (this == obj) - return true; - if (getClass() != obj.getClass()) - return false; - PrismContainerImpl other = (PrismContainerImpl) obj; - - //todo probably better comparation (ignore some part of object) - return equals(other); -// ObjectDelta delta = compareTo(other); -// return delta.isEmpty(); + return equals(obj, EquivalenceStrategy.REAL_VALUE); } @Override diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContainerValueImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContainerValueImpl.java index b00104f74f3..d9b52f31b93 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContainerValueImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContainerValueImpl.java @@ -17,6 +17,8 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.ItemDelta; +import com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.marshaller.JaxbDomHack; import com.evolveum.midpoint.prism.path.*; import com.evolveum.midpoint.util.*; @@ -255,6 +257,11 @@ public ItemPath getPath() { } } + @Override + protected Object getPathComponent() { + return getId(); + } + // For compatibility with other PrismValue types public C getValue() { return asContainerable(); @@ -523,7 +530,7 @@ public boolean contains(ItemName itemName) { public static boolean containsRealValue(Collection> cvalCollection, PrismContainerValue cval) { for (PrismContainerValue colVal: cvalCollection) { - if (colVal.equalsRealValue(cval)) { + if (colVal.equals(cval, EquivalenceStrategy.REAL_VALUE)) { return true; } } @@ -978,7 +985,16 @@ public void accept(Visitor visitor, ItemPath path, boolean recursive) { } } - public boolean hasCompleteDefinition() { + @Override + public void acceptParentVisitor(Visitor visitor) { + visitor.visit(this); + PrismContainerable parent = getParent(); + if (parent != null) { + parent.acceptParentVisitor(visitor); + } + } + + public boolean hasCompleteDefinition() { if (items != null) { for (Item item : getItems()) { if (!item.hasCompleteDefinition()) { @@ -1024,20 +1040,19 @@ private boolean representsSameValue(PrismContainerValue other, boolean lax) { return false; } - @Override public void diffMatchingRepresentation(PrismValue otherValue, - Collection deltas, boolean ignoreMetadata, boolean isLiteral) { + Collection deltas, ParameterizedEquivalenceStrategy strategy) { if (otherValue instanceof PrismContainerValue) { - diffRepresentation((PrismContainerValue)otherValue, deltas, ignoreMetadata, isLiteral); + diffRepresentation((PrismContainerValue)otherValue, deltas, strategy); } else { throw new IllegalStateException("Comparing incompatible values "+this+" - "+otherValue); } } - void diffRepresentation(PrismContainerValue otherValue, - Collection deltas, boolean ignoreMetadata, boolean isLiteral) { - diffItems(this, otherValue, deltas, ignoreMetadata, isLiteral); + private void diffRepresentation(PrismContainerValue otherValue, + Collection deltas, ParameterizedEquivalenceStrategy strategy) { + diffItems(this, otherValue, deltas, strategy); } @Override @@ -1080,19 +1095,13 @@ private Item parseRawEl return jaxbDomHack.parseRawElement(element, definition); } - private PrismContainerValue parseRawElementsToNewValue( - PrismContainerValue origCVal, PrismContainerValue definitionSource) throws SchemaException { - throw new UnsupportedOperationException("Definition-less containers are not supported any more."); - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - void diffItems(PrismContainerValue thisValue, PrismContainerValue other, - Collection deltas, boolean ignoreMetadata, boolean isLiteral) { + private void diffItems(PrismContainerValue thisValue, PrismContainerValue other, + Collection deltas, ParameterizedEquivalenceStrategy strategy) { - if (thisValue.getItems() != null) { + if (thisValue.getItems() != null) { for (Item thisItem: thisValue.getItems()) { Item otherItem = other.findItem(thisItem.getElementName()); - if (!isLiteral) { + if (!strategy.isConsideringOperationalData()) { ItemDefinition itemDef = thisItem.getDefinition(); if (itemDef == null && other.getDefinition() != null) { itemDef = other.getDefinition().findLocalItemDefinition(thisItem.getElementName()); @@ -1103,7 +1112,7 @@ void diffItems(PrismContainerValue thisValue, PrismContainerValue other, } } // The "delete" delta will also result from the following diff - ((ItemImpl) thisItem).diffInternal(otherItem, deltas, ignoreMetadata, isLiteral); + ((ItemImpl) thisItem).diffInternal(otherItem, deltas, strategy); } } @@ -1114,7 +1123,7 @@ void diffItems(PrismContainerValue thisValue, PrismContainerValue other, // Already processed in previous loop continue; } - if (!isLiteral) { + if (!strategy.isConsideringOperationalData()) { ItemDefinition itemDef = otherItem.getDefinition(); if (itemDef == null && thisValue.getDefinition() != null) { itemDef = thisValue.getDefinition().findLocalItemDefinition(otherItem.getElementName()); @@ -1394,48 +1403,38 @@ private > } @Override - public boolean equalsComplex(PrismValue other, boolean ignoreMetadata, boolean isLiteral) { - if (other == null || !(other instanceof PrismContainerValue)) { - return false; - } - return equalsComplex((PrismContainerValue)other, ignoreMetadata, isLiteral); + public boolean equals(PrismValue other, @NotNull ParameterizedEquivalenceStrategy strategy) { + return other instanceof PrismContainerValue && equals((PrismContainerValue) other, strategy); } - public boolean equalsComplex(PrismContainerValue other, boolean ignoreMetadata, boolean isLiteral) { - if (!super.equalsComplex(other, ignoreMetadata, isLiteral)) { + private boolean equals(PrismContainerValue other, ParameterizedEquivalenceStrategy strategy) { + if (!super.equals(other, strategy)) { return false; } - if (!ignoreMetadata) { - if (this.id == null) { - if (other.getId() != null) - return false; - } else if (!this.id.equals(other.getId())) + if (strategy.isConsideringContainerIds()) { + if (!Objects.equals(id, other.getId())) { return false; + } } if (this.items == null) { if (other.getItems() != null) return false; - } else if (!this.equalsItems(this, (PrismContainerValue) other, ignoreMetadata, isLiteral)) { + } else if (!this.equalsItems((PrismContainerValue) other, strategy)) { return false; } return true; } - boolean equalsItems(PrismContainerValue other, boolean ignoreMetadata, boolean isLiteral) { - return equalsItems(this, other, ignoreMetadata, isLiteral); - } - - boolean equalsItems(PrismContainerValue thisValue, PrismContainerValue other, - boolean ignoreMetadata, boolean isLiteral) { + private boolean equalsItems(PrismContainerValue other, ParameterizedEquivalenceStrategy strategy) { Collection> deltas = new ArrayList<>(); // The EMPTY_PATH is a lie. We don't really care if the returned deltas have correct path or not // we only care whether some deltas are returned or not. - diffItems(thisValue, other, deltas, ignoreMetadata, isLiteral); + diffItems(this, other, deltas, strategy); return deltas.isEmpty(); } public boolean equivalent(PrismContainerValue other) { - return equalsRealValue(other); + return equals(other, EquivalenceStrategy.REAL_VALUE); } @Override @@ -1447,19 +1446,20 @@ public boolean equals(Object obj) { if (getClass() != obj.getClass()) return false; PrismContainerValue other = (PrismContainerValue) obj; - return equalsComplex(other, false, false); + return equals(other, getEqualsHashCodeStrategy()); } + // TODO consider taking equivalence strategy into account @Override - public int hashCode() { + public int hashCode(ParameterizedEquivalenceStrategy strategy) { final int prime = 31; - int result = super.hashCode(); + int result = super.hashCode(strategy); // Do not include id. containers with non-null id and null id may still be considered equivalent // We also need to make sure that container valus that contain only metadata will produce zero hashcode // so it will not ruin hashcodes of parent containers int itemsHash = 0; if (items != null) { - itemsHash = MiscUtil.unorderedCollectionHashcode(items, item -> !item.isMetadata()); + itemsHash = MiscUtil.unorderedCollectionHashcode(items, item -> !item.isOperational()); } if (itemsHash != 0) { result = prime * result + itemsHash; @@ -1531,11 +1531,6 @@ protected void detailedDebugDumpStart(StringBuilder sb) { sb.append("PCV").append(": "); } - @Override - public boolean match(PrismValue otherValue) { - return equalsRealValue(otherValue); - } - @Override public String toHumanReadableString() { return "id="+id+": "+items.size()+" items"; diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContextImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContextImpl.java index 3899e249885..3ae995f866e 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContextImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContextImpl.java @@ -49,6 +49,7 @@ import com.evolveum.midpoint.prism.impl.xnode.RootXNodeImpl; import com.evolveum.midpoint.prism.xnode.XNodeFactory; import com.evolveum.midpoint.prism.impl.xnode.XNodeFactoryImpl; +import com.evolveum.midpoint.prism.xnode.XNodeMutator; import com.evolveum.midpoint.util.QNameUtil; import com.evolveum.midpoint.util.exception.SchemaException; import com.evolveum.midpoint.util.exception.SystemException; @@ -87,7 +88,7 @@ public class PrismContextImpl implements PrismContext { @NotNull private final PrismMarshaller prismMarshaller; @NotNull private final BeanMarshaller beanMarshaller; @NotNull private final BeanUnmarshaller beanUnmarshaller; - @NotNull private final Hacks hacks; + @NotNull private final HacksImpl hacks; @NotNull private final XNodeFactory xnodeFactory; @NotNull private final DeltaFactory deltaFactory; @NotNull private final QueryFactory queryFactory; @@ -134,6 +135,7 @@ private PrismContextImpl(@NotNull SchemaRegistryImpl schemaRegistry) { this.definitionFactory = new DefinitionFactoryImpl(this); this.itemPathParser = new ItemPathParserImpl(this); this.schemaFactory = new SchemaFactoryImpl(this); + this.defaultPolyStringNormalizer = new AlphanumericPolyStringNormalizer(); try { configurePolyStringNormalizer(null); @@ -576,6 +578,11 @@ public XNodeFactory xnodeFactory() { return xnodeFactory; } + @Override + public XNodeMutator xnodeMutator() { + return hacks; + } + @Override public KeyStoreBasedProtector createInitializedProtector(KeyStoreBasedProtectorBuilder builder) { KeyStoreBasedProtectorImpl protector = new KeyStoreBasedProtectorImpl(builder); diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismObjectImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismObjectImpl.java index f8ccfaf10ac..ba8d0a36508 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismObjectImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismObjectImpl.java @@ -20,6 +20,8 @@ import com.evolveum.midpoint.prism.delta.ChangeType; import com.evolveum.midpoint.prism.delta.ItemDelta; import com.evolveum.midpoint.prism.delta.ObjectDelta; +import com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.impl.delta.ObjectDeltaImpl; import com.evolveum.midpoint.prism.path.ItemName; import com.evolveum.midpoint.prism.path.ItemPath; @@ -264,11 +266,11 @@ public PrismObjectDefinition deepCloneDefinition(boolean ultraDeep, Consumer< @NotNull public ObjectDelta diff(PrismObject other) { - return diff(other, true, false); + return diff(other, EquivalenceStrategy.IGNORE_METADATA); } @NotNull - public ObjectDelta diff(PrismObject other, boolean ignoreMetadata, boolean isLiteral) { + public ObjectDelta diff(PrismObject other, ParameterizedEquivalenceStrategy strategy) { if (other == null) { ObjectDelta objectDelta = new ObjectDeltaImpl<>(getCompileTimeClass(), ChangeType.DELETE, getPrismContext()); objectDelta.setOid(getOid()); @@ -279,7 +281,7 @@ public ObjectDelta diff(PrismObject other, boolean ignoreMetadata, boolean objectDelta.setOid(getOid()); Collection itemDeltas = new ArrayList<>(); - diffInternal(other, itemDeltas, ignoreMetadata, isLiteral); + diffInternal(other, itemDeltas, strategy); objectDelta.addModifications(itemDeltas); return objectDelta; @@ -325,13 +327,12 @@ public ObjectDelta createDeleteDelta() { return delta; } - @Override - public void setParent(PrismValue parentValue) { + public void setParent(PrismContainerValue parentValue) { throw new IllegalStateException("Cannot set parent for an object"); } @Override - public PrismValue getParent() { + public PrismContainerValue getParent() { return null; } @@ -342,30 +343,27 @@ public ItemPath getPath() { } @Override - public boolean equals(Object obj) { - if (prismContext != null && prismContext.getMonitor() != null) { - prismContext.getMonitor().recordPrismObjectCompareCount(this, obj); - } - return super.equals(obj); + protected Object getPathComponent() { + return null; } - /** - * this method ignores some part of the object during comparison (e.g. source demarcation in values) - * These methods compare the "meaningful" parts of the objects. - */ - public boolean equivalent(Object obj) { - if (prismContext != null && prismContext.getMonitor() != null) { - prismContext.getMonitor().recordPrismObjectCompareCount(this, obj); - } - if (this == obj) - return true; - if (getClass() != obj.getClass()) - return false; - PrismObjectImpl other = (PrismObjectImpl) obj; - //noinspection unchecked - ObjectDelta delta = diff(other, true, false); - return delta.isEmpty(); - } +// /** +// * this method ignores some part of the object during comparison (e.g. source demarcation in values) +// * These methods compare the "meaningful" parts of the objects. +// */ +// public boolean equivalent(Object obj) { +// if (prismContext != null && prismContext.getMonitor() != null) { +// prismContext.getMonitor().recordPrismObjectCompareCount(this, obj); +// } +// if (this == obj) +// return true; +// if (getClass() != obj.getClass()) +// return false; +// PrismObjectImpl other = (PrismObjectImpl) obj; +// //noinspection unchecked +// ObjectDelta delta = diff(other, EquivalenceStrategy.REAL_VALUE); +// return delta.isEmpty(); +// } @Override public String toString() { diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismObjectValueImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismObjectValueImpl.java index b0bc6c89ddb..3d9e1730ff9 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismObjectValueImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismObjectValueImpl.java @@ -17,6 +17,7 @@ package com.evolveum.midpoint.prism.impl; import com.evolveum.midpoint.prism.*; +import com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemName; import com.evolveum.midpoint.prism.polystring.PolyString; import com.evolveum.midpoint.util.exception.SchemaException; @@ -122,9 +123,10 @@ public boolean equals(Object o) { return Objects.equals(oid, that.oid); } + // TODO consider the strategy @Override - public int hashCode() { - return Objects.hash(super.hashCode(), oid); + public int hashCode(ParameterizedEquivalenceStrategy strategy) { + return Objects.hash(super.hashCode(strategy), oid); } @Override diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismPropertyImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismPropertyImpl.java index f170e2804d3..1f0af17dea8 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismPropertyImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismPropertyImpl.java @@ -19,6 +19,8 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.ItemDelta; import com.evolveum.midpoint.prism.delta.PropertyDelta; +import com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.impl.delta.PropertyDeltaImpl; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.prism.util.PrismPrettyPrinter; @@ -102,23 +104,6 @@ public void setDefinition(PrismPropertyDefinition definition) { this.definition = definition; } - public PrismPropertyValue getValue() { - // I know of no reason why we should not return a value if it's only one (even for multivalued items) (see MID-3922) - // TODO reconsider this - if (getValues().size() == 1) { - return getValues().get(0); - } - if (!isSingleValue()) { - throw new IllegalStateException("Attempt to get single value from property " + getElementName() - + " with multiple values"); - } - List> values = getValues(); - if (values.isEmpty()) { - return null; - } - return values.get(0); - } - /** * Type override, also for compatibility. */ @@ -156,20 +141,10 @@ public T getAnyRealValue() { return values.iterator().next(); } - public PrismPropertyValue getAnyValue() { - Collection> values = getValues(); - if (values.isEmpty()) { - return null; - } - return values.iterator().next(); - } - - @Override - public T getRealValue() { - if (getValue() == null) { - return null; - } - return getValue().getValue(); + @Override + public T getRealValue() { + PrismPropertyValue value = getValue(); + return value != null ? value.getRealValue() : null; } /** @@ -267,7 +242,7 @@ public void addValue(PrismPropertyValue pValueToAdd) { Iterator> iterator = getValues().iterator(); while (iterator.hasNext()) { PrismPropertyValue pValue = iterator.next(); - if (pValue.equalsRealValue(pValueToAdd)) { + if (pValue.equals(pValueToAdd, EquivalenceStrategy.REAL_VALUE)) { LOGGER.warn("Adding value to property "+ getElementName()+" that already exists (overwriting), value: "+pValueToAdd); iterator.remove(); } @@ -307,7 +282,7 @@ public boolean deleteValue(PrismPropertyValue pValueToDelete) { boolean found = false; while (iterator.hasNext()) { PrismPropertyValue pValue = iterator.next(); - if (pValue.equalsRealValue(pValueToDelete)) { + if (pValue.equals(pValueToDelete, EquivalenceStrategy.REAL_VALUE)) { iterator.remove(); pValue.setParent(null); found = true; @@ -325,13 +300,9 @@ public void replaceValues(Collection> valuesToReplace) { addValues(valuesToReplace); } - public boolean hasValue(PrismPropertyValue value) { - return super.hasValue(value); - } - public boolean hasRealValue(PrismPropertyValue value) { for (PrismPropertyValue propVal : getValues()) { - if (propVal.equalsRealValue(value)) { + if (propVal.equals(value, EquivalenceStrategy.REAL_VALUE)) { return true; } } @@ -339,16 +310,6 @@ public boolean hasRealValue(PrismPropertyValue value) { return false; } - @Override - public PrismPropertyValue getPreviousValue(PrismValue value) { - return (PrismPropertyValue) super.getPreviousValue(value); - } - - @Override - public PrismPropertyValue getNextValue(PrismValue value) { - return (PrismPropertyValue) super.getNextValue(value); - } - public Class getValueClass() { if (getDefinition() != null) { return getDefinition().getTypeClass(); @@ -406,8 +367,8 @@ public PropertyDelta diff(PrismProperty other) { return (PropertyDelta) super.diff(other); } - public PropertyDelta diff(PrismProperty other, boolean ignoreMetadata, boolean isLiteral) { - return (PropertyDelta) super.diff(other, true, false); + public PropertyDelta diff(PrismProperty other, ParameterizedEquivalenceStrategy strategy) { + return (PropertyDelta) super.diff(other, strategy); } @Override @@ -437,25 +398,7 @@ protected void copyValues(CloneStrategy strategy, PrismPropertyImpl clone) { } @Override - public int hashCode() { - int result = super.hashCode(); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (!super.equals(obj)) - return false; - if (getClass() != obj.getClass()) - return false; - return true; - } - - @Override - protected ItemDelta fixupDelta(ItemDelta delta, Item otherItem, - boolean ignoreMetadata) { + protected ItemDelta fixupDelta(ItemDelta delta, Item otherItem) { PrismPropertyDefinition def = getDefinition(); if (def != null && def.isSingleValue() && !delta.isEmpty()) { // Drop the current delta (it was used only to detect that something has changed @@ -470,7 +413,7 @@ protected ItemDelta fixupDelta(ItemDelta delta, Item otherItem, propertyDelta.setValuesToReplace(replaceValues); return propertyDelta; } else { - return super.fixupDelta(delta, otherItem, ignoreMetadata); + return super.fixupDelta(delta, otherItem); } } diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismPropertyValueImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismPropertyValueImpl.java index 5a48a328b5f..960a1b95fc9 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismPropertyValueImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismPropertyValueImpl.java @@ -17,6 +17,7 @@ package com.evolveum.midpoint.prism.impl; import com.evolveum.midpoint.prism.*; +import com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy; import com.evolveum.midpoint.prism.impl.marshaller.BeanMarshaller; import com.evolveum.midpoint.prism.match.MatchingRule; import com.evolveum.midpoint.prism.path.ItemPath; @@ -40,6 +41,7 @@ import com.evolveum.prism.xml.ns._public.types_3.RawType; import com.evolveum.prism.xml.ns._public.types_3.SchemaDefinitionType; import org.apache.commons.lang.StringUtils; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jvnet.jaxb2_commons.lang.Equals; import org.w3c.dom.Element; @@ -382,15 +384,13 @@ private T parseRawElementToNewRealValue(PrismPropertyValue prismPropertyValue } @Override - public boolean equalsComplex(PrismValue other, boolean ignoreMetadata, boolean isLiteral) { - if (other == null || !(other instanceof PrismPropertyValue)) { - return false; - } - return equalsComplex((PrismPropertyValue)other, ignoreMetadata, isLiteral, null); + public boolean equals(PrismValue other, @NotNull ParameterizedEquivalenceStrategy strategy) { + return other instanceof PrismPropertyValue && equals((PrismPropertyValue) other, strategy, null); } - public boolean equalsComplex(PrismPropertyValue other, boolean ignoreMetadata, boolean isLiteral, MatchingRule matchingRule) { - if (!super.equalsComplex(other, ignoreMetadata, isLiteral)) { + @Override + public boolean equals(PrismPropertyValue other, ParameterizedEquivalenceStrategy strategy, MatchingRule matchingRule) { + if (!super.equals(other, strategy)) { return false; } @@ -436,27 +436,24 @@ public boolean equalsComplex(PrismPropertyValue other, boolean ignoreMetadata if (thisRealValue instanceof Element && otherRealValue instanceof Element) { - return DOMUtil.compareElement((Element)thisRealValue, (Element)otherRealValue, isLiteral); + return DOMUtil.compareElement((Element)thisRealValue, (Element)otherRealValue, strategy.isLiteralDomComparison()); } if (thisRealValue instanceof SchemaDefinitionType && otherRealValue instanceof SchemaDefinitionType) { SchemaDefinitionType thisSchema = (SchemaDefinitionType) thisRealValue; - return thisSchema.equals(otherRealValue, isLiteral); - // return DOMUtil.compareElement((Element)thisRealValue, (Element)otherRealValue, isLiteral); + return thisSchema.equals(otherRealValue, strategy.isLiteralDomComparison()); } if (thisRealValue instanceof byte[] && otherRealValue instanceof byte[]) { return Arrays.equals((byte[]) thisRealValue, (byte[]) otherRealValue); } - if (isLiteral) { + if (strategy.isLiteralDomComparison()) { if (thisRealValue instanceof QName && otherRealValue instanceof QName) { // we compare prefixes as well - if (!thisRealValue.equals(otherRealValue)) { - return false; - } - return StringUtils.equals(((QName) thisRealValue).getPrefix(), ((QName) otherRealValue).getPrefix()); + return thisRealValue.equals(otherRealValue) && + StringUtils.equals(((QName) thisRealValue).getPrefix(), ((QName) otherRealValue).getPrefix()); } else if (thisRealValue instanceof Equals && otherRealValue instanceof Equals) { return ((Equals) thisRealValue).equals(null, null, otherRealValue, LiteralEqualsStrategy.INSTANCE); } @@ -470,63 +467,6 @@ private boolean equalsRawElements(PrismPropertyValue other) { } - @Override - public boolean match(PrismValue otherValue) { - if (otherValue == null || !(otherValue instanceof PrismPropertyValue)) { - return false; - } - return matchComplex((PrismPropertyValue)otherValue, false, false); - } - - private boolean matchComplex(PrismPropertyValue otherValue, boolean ignoreMetadata, boolean isLiteral) { - - if (!super.equalsComplex(otherValue, ignoreMetadata, isLiteral)) { - return false; - } - - if (this.rawElement != null && otherValue.getRawElement() != null) { - return equalsRawElements((PrismPropertyValue)otherValue); - } - - PrismPropertyValue otherProcessed = (PrismPropertyValue) otherValue; - PrismPropertyValue thisProcessed = this; - if (this.rawElement != null || otherValue.getRawElement() != null) { - try { - if (this.rawElement == null) { - otherProcessed = parseRawElementToNewValue((PrismPropertyValue) otherValue, this); - } else if (otherValue.getRawElement() == null) { - thisProcessed = parseRawElementToNewValue(this, (PrismPropertyValue) otherValue); - } - } catch (SchemaException e) { - // TODO: Maybe just return false? - throw new IllegalArgumentException("Error parsing the value of property "+getParent()+" using the 'other' definition "+ - "during a compare: "+e.getMessage(),e); - } - } - - T otherRealValue = otherProcessed.getValue(); - T thisRealValue = thisProcessed.getValue(); - if (otherRealValue == null && thisRealValue == null) { - return true; - } - if (otherRealValue == null || thisRealValue == null) { - return false; - } - - if (thisRealValue instanceof Element && - otherRealValue instanceof Element) { - return DOMUtil.compareElement((Element)thisRealValue, (Element)otherRealValue, isLiteral); - } - - if (otherRealValue instanceof Matchable && thisRealValue instanceof Matchable){ - Matchable thisMatchableValue = (Matchable) thisRealValue; - Matchable otherMatchableValue = (Matchable) otherRealValue; - return thisMatchableValue.match(otherMatchableValue); - } - - return thisRealValue.equals(otherRealValue); - - } @Override public boolean equals(Object obj) { @@ -537,13 +477,13 @@ public boolean equals(Object obj) { if (getClass() != obj.getClass()) return false; PrismPropertyValue other = (PrismPropertyValue) obj; - return equalsComplex(other, false, false, null); + return equals(other, getEqualsHashCodeStrategy()); } - @Override - public int hashCode() { + @Override + public int hashCode(@NotNull ParameterizedEquivalenceStrategy strategy) { final int prime = 31; - int result = super.hashCode(); + int result = super.hashCode(strategy); if (value != null && value instanceof Element) { // We need special handling here. We haven't found out the proper way now. // so we just do not include this in the hashcode now. diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceImpl.java index 8b9795d56a7..29f2df18f07 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceImpl.java @@ -18,12 +18,14 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.ReferenceDelta; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.impl.delta.ReferenceDeltaImpl; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.prism.polystring.PolyString; import com.evolveum.midpoint.util.DebugUtil; import com.evolveum.midpoint.util.MiscUtil; import com.evolveum.midpoint.util.PrettyPrinter; +import com.evolveum.midpoint.util.exception.SchemaException; import org.jetbrains.annotations.NotNull; import javax.xml.namespace.QName; @@ -57,6 +59,7 @@ public PrismReferenceImpl(QName name) { /** * {@inheritDoc} */ + @NotNull public PrismReferenceValue getValue() { // I know of no reason why we should not return a value if it's only one (even for multivalued items) (see MID-3922) // TODO reconsider this @@ -78,8 +81,12 @@ public PrismReferenceValue getValue() { // Insert first empty value. This simulates empty single-valued reference. It the reference exists // it is clear that it has at least one value (and that value is empty). PrismReferenceValue rval = new PrismReferenceValueImpl(); - add(rval); - return rval; + try { + add(rval); + } catch (SchemaException e) { + throw new IllegalStateException("Unexpected SchemaException while creating new value: " + e.getMessage(), e); + } + return rval; } return getValues().iterator().next(); } @@ -96,10 +103,7 @@ private PrismReferenceValue getValue(String oid) { @Override public Referencable getRealValue() { - if (getValue() == null) { - return null; - } - return getValue().asReferencable(); + return getValue().getRealValue(); } @NotNull @@ -112,50 +116,50 @@ public Collection getRealValues() { return realValues; } - - public boolean add(@NotNull PrismReferenceValue value) { - value.setParent(this); - return getValues().add(value); - } - public boolean merge(PrismReferenceValue value) { - String newOid = value.getOid(); - // We need to tolerate null OIDs here. Because of JAXB. - PrismReferenceValue existingValue = getValue(newOid); - if (existingValue == null) { - return add(value); - } + try { + String newOid = value.getOid(); + // We need to tolerate null OIDs here. Because of JAXB. + PrismReferenceValue existingValue = getValue(newOid); + if (existingValue == null) { + return add(value); + } - // if there is newValue containing object (instead of oid only) and also - // old value containing object (instead of oid only) we need to compare - // these two object if they are equals..this can avoid of bad resolving - // (e.g. creating user and adding two or more accounts at the same time) - if (value.getObject() != null && existingValue.getObject() != null && !value.equalsComplex(existingValue, false, false)){ - return add(value); - } + // if there is newValue containing object (instead of oid only) and also + // old value containing object (instead of oid only) we need to compare + // these two object if they are equals..this can avoid of bad resolving + // (e.g. creating user and adding two or more accounts at the same time) + if (value.getObject() != null && existingValue.getObject() != null && !value + .equals(existingValue, EquivalenceStrategy.NOT_LITERAL)) { + return add(value); + } - // in the value.getObject() is not null, it it probably only resolving - // of refenrence, so only change oid to object - if (value.getObject() != null) { - existingValue.setObject(value.getObject()); - return true; - } + // in the value.getObject() is not null, it it probably only resolving + // of reference, so only change oid to object + if (value.getObject() != null) { + existingValue.setObject(value.getObject()); + return true; + } - // in the case, if the existing value and new value are not equal, add - // also another reference alhtrough one with the same oid exist. It is - // needed for parent org refs, becasue there can exist more than one - // reference with the same oid, but they should be different (e.g. user - // is member and also manager of the org. unit.) - if (!value.equalsComplex(existingValue, false, false)) { - return add(value); - } + // in the case, if the existing value and new value are not equal, add + // also another reference alhtrough one with the same oid exist. It is + // needed for parent org refs, becasue there can exist more than one + // reference with the same oid, but they should be different (e.g. user + // is member and also manager of the org. unit.) + if (!value.equals(existingValue, EquivalenceStrategy.NOT_LITERAL)) { + return add(value); + } - if (value.getTargetType() != null) { - existingValue.setTargetType(value.getTargetType()); -// return true; + if (value.getTargetType() != null) { + existingValue.setTargetType(value.getTargetType()); + // return true; + } + // No need to copy OID as OIDs match + return true; + } catch (SchemaException e) { + // todo or publish SchemaException in the interface? + throw new IllegalStateException("Unexpected SchemaException while merging: " + e.getMessage(), e); } - // No need to copy OID as OIDs match - return true; } @@ -234,7 +238,11 @@ public PrismReferenceImpl cloneComplex(CloneStrategy strategy) { protected void copyValues(CloneStrategy strategy, PrismReferenceImpl clone) { super.copyValues(strategy, clone); for (PrismReferenceValue value : getValues()) { - clone.add(value.cloneComplex(strategy)); + try { + clone.add(value.cloneComplex(strategy)); + } catch (SchemaException e) { + throw new IllegalStateException("Unexpected SchemaException while copying values: " + e.getMessage(), e); + } } } diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceValueImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceValueImpl.java index 0ffed8d3346..2dc9163d3cb 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceValueImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceValueImpl.java @@ -17,6 +17,7 @@ package com.evolveum.midpoint.prism.impl; import com.evolveum.midpoint.prism.*; +import com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy; import com.evolveum.midpoint.prism.path.*; import com.evolveum.midpoint.prism.polystring.PolyString; import com.evolveum.midpoint.util.DOMUtil; @@ -387,14 +388,12 @@ public PrismReferenceValueImpl toCanonical() { return can; } - @Override - public boolean equalsComplex(PrismValue other, boolean ignoreMetadata, boolean isLiteral) { - return other instanceof PrismReferenceValue - && equalsComplex((PrismReferenceValue) other, ignoreMetadata, isLiteral); + public boolean equals(PrismValue other, @NotNull ParameterizedEquivalenceStrategy strategy) { + return other instanceof PrismReferenceValue && equals((PrismReferenceValue) other, strategy); } - public boolean equalsComplex(PrismReferenceValue other, boolean ignoreMetadata, boolean isLiteral) { - if (!super.equalsComplex(other, ignoreMetadata, isLiteral)) { + public boolean equals(PrismReferenceValue other, @NotNull ParameterizedEquivalenceStrategy strategy) { + if (!super.equals(other, strategy)) { return false; } if (this.getOid() == null) { @@ -418,10 +417,10 @@ public boolean equalsComplex(PrismReferenceValue other, boolean ignoreMetadata, if (!equalsTargetType(other)) { return false; } - if (!relationsEquivalent(relation, other.getRelation(), isLiteral)) { + if (!relationsEquivalent(relation, other.getRelation(), strategy.isLiteralDomComparison())) { return false; } - if ((isLiteral || bothOidsNull) && !filtersEquivalent(filter, other.getFilter())) { + if ((strategy.isConsideringReferenceFilters() || bothOidsNull) && !filtersEquivalent(filter, other.getFilter())) { return false; } return true; @@ -438,6 +437,7 @@ private boolean filtersEquivalent(SearchFilterType filter1, SearchFilterType fil } private boolean relationsEquivalent(QName r1, QName r2, boolean isLiteral) { + // todo use equals if isLiteral is true return QNameUtil.match(normalizedRelation(r1, isLiteral), normalizedRelation(r2, isLiteral)); } @@ -473,13 +473,14 @@ public boolean equals(Object obj) { if (getClass() != obj.getClass()) return false; PrismReferenceValue other = (PrismReferenceValue) obj; - return equalsComplex(other, false, false); + return equals(other, getEqualsHashCodeStrategy()); } + // TODO take strategy into account @Override - public int hashCode() { + public int hashCode(ParameterizedEquivalenceStrategy strategy) { final int prime = 31; - int result = super.hashCode(); + int result = super.hashCode(strategy); result = prime * result + ((oid == null) ? 0 : oid.hashCode()); QName normalizedRelation = normalizedRelation(relation, false); if (normalizedRelation != null) { @@ -494,18 +495,15 @@ public int hashCode() { @Override public boolean representsSameValue(PrismValue other, boolean lax) { - if (other instanceof PrismReferenceValue) { - return representsSameValue((PrismReferenceValue)other); - } else { - return false; - } + return other instanceof PrismReferenceValue && representsSameValue((PrismReferenceValue) other); } - public boolean representsSameValue(PrismReferenceValue other) { - if (this.getOid() != null && other.getOid() != null) { - return this.getOid().equals(other.getOid()) && relationsEquivalent(this.getRelation(), other.getRelation(), false); - } - return false; + // TODO fix this one! + private boolean representsSameValue(PrismReferenceValue other) { + return this.getOid() != null && other.getOid() != null && + this.getOid().equals(other.getOid()) && + QNameUtil.match(this.getTargetType(), other.getTargetType()) && + relationsEquivalent(this.getRelation(), other.getRelation(), false); } @Override @@ -621,11 +619,6 @@ protected void copyValues(CloneStrategy strategy, PrismReferenceValueImpl clone) clone.targetName = this.targetName; } - @Override - public boolean match(PrismValue otherValue) { - return equalsRealValue(otherValue); - } - /* (non-Javadoc) * @see com.evolveum.midpoint.prism.PrismValue#getHumanReadableDump() */ diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismValueImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismValueImpl.java index ada993d22ac..2235d3d7196 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismValueImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismValueImpl.java @@ -17,6 +17,8 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.ItemDelta; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; +import com.evolveum.midpoint.prism.equivalence.ParameterizedEquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.util.DebugUtil; import com.evolveum.midpoint.util.exception.SchemaException; @@ -24,13 +26,11 @@ import org.jetbrains.annotations.Nullable; import javax.xml.namespace.QName; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; +import java.util.*; import static java.util.Collections.emptySet; import static java.util.Collections.singleton; +import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; /** * @author semancik @@ -43,6 +43,7 @@ public abstract class PrismValueImpl implements PrismValue { private Itemable parent; private transient Map userData = new HashMap<>(); protected boolean immutable; + protected EquivalenceStrategy defaultEquivalenceStrategy; transient protected PrismContext prismContext; @@ -129,6 +130,10 @@ public ItemPath getPath() { return parent.getPath(); } + protected Object getPathComponent() { + return null; + } + /** * Used when we are removing the value from the previous parent. * Or when we know that the previous parent will be discarded and we @@ -252,66 +257,56 @@ protected void copyValues(CloneStrategy strategy, PrismValueImpl clone) { } } + protected EquivalenceStrategy getEqualsHashCodeStrategy() { + return defaultIfNull(defaultEquivalenceStrategy, EquivalenceStrategy.NOT_LITERAL); + } + @Override public int hashCode() { - int result = 0; - return result; + return hashCode(getEqualsHashCodeStrategy()); } - public boolean equalsComplex(PrismValue other, boolean ignoreMetadata, boolean isLiteral) { - // parent is not considered at all. it is not relevant. - // neither the immutable flag - if (!ignoreMetadata) { - if (originObject == null) { - if (other.getOriginObject() != null) - return false; - } else if (!originObject.equals(other.getOriginObject())) - return false; - if (originType != other.getOriginType()) - return false; - } - return true; + @Override + public int hashCode(@NotNull ParameterizedEquivalenceStrategy equivalenceStrategy) { + return 0; } @Override - public boolean equals(PrismValue otherValue, boolean ignoreMetadata) { - return equalsComplex(otherValue, ignoreMetadata, false); + public int hashCode(@NotNull EquivalenceStrategy equivalenceStrategy) { + return equivalenceStrategy.hashCode(this); } - public boolean equals(PrismValue thisValue, PrismValue otherValue) { - if (thisValue == null && otherValue == null) { - return true; - } - if (thisValue == null || otherValue == null) { - return false; + @Override + public boolean equals(PrismValue otherValue, @NotNull EquivalenceStrategy equivalenceStrategy) { + if (equivalenceStrategy instanceof ParameterizedEquivalenceStrategy) { // todo or skip this check? + return equals(otherValue, (ParameterizedEquivalenceStrategy) equivalenceStrategy); + } else { + return equivalenceStrategy.equals(this, otherValue); } - return thisValue.equalsComplex(otherValue, false, false); } - public boolean equalsRealValue(PrismValue otherValue) { - return equalsComplex(otherValue, true, false); + public boolean equals(PrismValue other, @NotNull ParameterizedEquivalenceStrategy strategy) { + // parent is not considered at all. it is not relevant. + // neither the immutable flag + return !strategy.isConsideringValueOrigin() || + Objects.equals(originObject, other.getOriginObject()) && originType == other.getOriginType(); } - public boolean equalsRealValue(PrismValue thisValue, PrismValue otherValue) { - if (thisValue == null && otherValue == null) { + // original equals was "isLiteral = false"! + public boolean equals(Object other) { + return this == other || + (other == null || other instanceof PrismValue) && + equals((PrismValue) other, getEqualsHashCodeStrategy()); + } + + public boolean equals(PrismValue thisValue, PrismValue otherValue) { + if (thisValue == otherValue) { return true; } if (thisValue == null || otherValue == null) { return false; } - return thisValue.equalsComplex(otherValue, true, false); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - PrismValue other = (PrismValue) obj; - return equalsComplex(other, false, false); + return thisValue.equals(otherValue, getEqualsHashCodeStrategy()); } /** @@ -320,7 +315,7 @@ public boolean equals(Object obj) { */ @Override public Collection diff(PrismValue otherValue) { - return diff(otherValue, true, false); + return diff(otherValue, EquivalenceStrategy.IGNORE_METADATA); } /** @@ -328,14 +323,14 @@ public Collection diff(PrismValue otherValue) { * E.g. the container with the same ID. */ @Override - public Collection diff(PrismValue otherValue, boolean ignoreMetadata, boolean isLiteral) { + public Collection diff(PrismValue otherValue, ParameterizedEquivalenceStrategy strategy) { Collection itemDeltas = new ArrayList<>(); - diffMatchingRepresentation(otherValue, itemDeltas, ignoreMetadata, isLiteral); + diffMatchingRepresentation(otherValue, itemDeltas, strategy); return itemDeltas; } public void diffMatchingRepresentation(PrismValue otherValue, - Collection deltas, boolean ignoreMetadata, boolean isLiteral) { + Collection deltas, ParameterizedEquivalenceStrategy strategy) { // Nothing to do by default } @@ -408,6 +403,4 @@ public Collection getAllValues(ItemPath path) { return emptySet(); } } - - public abstract boolean match(PrismValue v2); } diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/ContainerDeltaImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/ContainerDeltaImpl.java index 397a5e28808..cc441dfb493 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/ContainerDeltaImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/ContainerDeltaImpl.java @@ -383,4 +383,8 @@ protected void dumpValues(StringBuilder sb, String label, Collection valuesToReplace = null; @@ -126,6 +128,7 @@ public ItemName getElementName() { public void setElementName(QName elementName) { this.elementName = ItemName.fromQName(elementName); + this.fullPath = null; } public ItemPath getParentPath() { @@ -134,15 +137,20 @@ public ItemPath getParentPath() { public void setParentPath(ItemPath parentPath) { this.parentPath = parentPath; + this.fullPath = null; } @NotNull @Override public ItemPath getPath() { + if (fullPath != null) { + return fullPath; + } if (getParentPath() == null) { throw new IllegalStateException("No parent path in "+this); } - return getParentPath().append(elementName); + fullPath = getParentPath().append(elementName); + return fullPath; } public D getDefinition() { @@ -363,7 +371,7 @@ private boolean removeValue(PrismValue valueToRemove, Collection set, boolean V existingValue = valuesIterator.next(); // TODO either make equalsRealValue return false if both PCVs have IDs and these IDs are different // TODO or include a special test condition here; see MID-3828 - if (existingValue.equalsRealValue(valueToRemove) + if (existingValue.equals(valueToRemove, EquivalenceStrategy.REAL_VALUE) || toDelete && existingValue.representsSameValue(valueToRemove, false)) { // the same algorithm as when deleting the item value valuesIterator.remove(); removed = true; @@ -447,7 +455,7 @@ protected boolean containsEquivalentValue(Collection collection, V value) { } protected boolean isValueEquivalent(V a, V b) { - return a.equalsRealValue(b); + return a.equals(b, EquivalenceStrategy.REAL_VALUE); } public void mergeValuesToDelete(Collection newValues) { @@ -637,7 +645,7 @@ private boolean isValueSet(V value, boolean ignoreMetadata, Collection set) { return false; } for (V myVal: set) { - if (myVal.equals(value, ignoreMetadata)) { + if (myVal.equals(value, ignoreMetadata ? EquivalenceStrategy.IGNORE_METADATA : EquivalenceStrategy.NOT_LITERAL)) { return true; } } @@ -848,14 +856,11 @@ public ItemDelta narrow(PrismObject object, Comparato * I.e. if it changes the current object state. */ public boolean isRedundant(PrismObject object) { - Comparator comparator = new Comparator() { - @Override - public int compare(V o1, V o2) { - if (o1.equalsComplex(o2, true, false)) { - return 0; - } else { - return 1; - } + Comparator comparator = (o1, o2) -> { + if (o1.equals(o2, EquivalenceStrategy.IGNORE_METADATA)) { + return 0; + } else { + return 1; } }; return isRedundant(object, comparator); @@ -1012,7 +1017,7 @@ private boolean isIn(Collection values, V val) { return false; } for (V v : values) { - if (v.equalsRealValue(val)) { + if (v.equals(val, EquivalenceStrategy.REAL_VALUE)) { return true; } } @@ -1234,7 +1239,7 @@ public void applyToMatchingPath(Item item) throws SchemaException { item.replaceAll(PrismValueCollectionsUtil.cloneCollection(valuesToAdd)); } else { for (V valueToAdd : valuesToAdd) { - if (!item.containsEquivalentValue(valueToAdd)) { + if (!item.contains(valueToAdd, EquivalenceStrategy.REAL_VALUE)) { item.add(valueToAdd.clone()); } } @@ -1316,7 +1321,7 @@ public Item getItemNewMatchingPath(Item itemOld) throws SchemaExceptio * deltas are equal. */ public boolean contains(ItemDelta other) { - return contains(other, PrismConstants.EQUALS_DEFAULT_IGNORE_METADATA, PrismConstants.EQUALS_DEFAULT_IS_LITERAL); + return contains(other, EquivalenceStrategy.REAL_VALUE); } /** * Returns true if the other delta is a complete subset of this delta. @@ -1324,17 +1329,18 @@ public boolean contains(ItemDelta other) { * in this delta. As a consequence it also returns true if the two * deltas are equal. */ - public boolean contains(ItemDelta other, boolean ignoreMetadata, boolean isLiteral) { + + public boolean contains(ItemDelta other, EquivalenceStrategy strategy) { if (!this.getPath().equivalent(other.getPath())) { return false; } - if (!PrismValueCollectionsUtil.containsAll(this.valuesToAdd, other.getValuesToAdd(), ignoreMetadata, isLiteral)) { + if (!PrismValueCollectionsUtil.containsAll(this.valuesToAdd, other.getValuesToAdd(), strategy)) { return false; } - if (!PrismValueCollectionsUtil.containsAll(this.valuesToDelete, other.getValuesToDelete(), ignoreMetadata, isLiteral)) { + if (!PrismValueCollectionsUtil.containsAll(this.valuesToDelete, other.getValuesToDelete(), strategy)) { return false; } - if (!PrismValueCollectionsUtil.containsAll(this.valuesToReplace, other.getValuesToReplace(), ignoreMetadata, isLiteral)) { + if (!PrismValueCollectionsUtil.containsAll(this.valuesToReplace, other.getValuesToReplace(), strategy)) { return false; } return true; @@ -1371,6 +1377,7 @@ protected void copyValues(ItemDeltaImpl clone) { clone.definition = this.definition; clone.elementName = this.elementName; clone.parentPath = this.parentPath; + clone.fullPath = this.fullPath; clone.valuesToAdd = cloneSet(clone, this.valuesToAdd); clone.valuesToDelete = cloneSet(clone, this.valuesToDelete); clone.valuesToReplace = cloneSet(clone, this.valuesToReplace); @@ -1587,7 +1594,7 @@ private boolean equivalentSetRealValue(Collection thisValue, Collection ot // Here it is questionable if we should consider adding "assignment id=1 (A)" and "assignment id=2 (A)" // - i.e. assignments with the same real value but different identifiers - the same delta. // Historically, we considered it as such. But the question is if it's correct. - return v1.equalsRealValue(v2); + return v1.equals(v2, EquivalenceStrategy.REAL_VALUE); } else { // But for container values to be deleted, they can be referred to either using IDs or values. // If content is used - but no IDs - the content must be equal. @@ -1595,7 +1602,7 @@ private boolean equivalentSetRealValue(Collection thisValue, Collection ot // The problem is if one side has content with ID, and the other has the same content without ID. // This might have the same or different effect, depending on the content it is applied to. // See MID-3828 - return (v1.equalsRealValue(v2) && !differentIds(v1, v2)) || v1.representsSameValue(v2, false); + return (v1.equals(v2, EquivalenceStrategy.REAL_VALUE) && !differentIds(v1, v2)) || v1.representsSameValue(v2, false); } } else { return false; @@ -1741,7 +1748,7 @@ private V findValue(Collection values, V value) { return null; } return values.stream() - .filter(v -> !differentIds(v, value) && v.equals(value, true)) + .filter(v -> !differentIds(v, value) && v.equals(value, EquivalenceStrategy.REAL_VALUE)) .findFirst().orElse(null); } diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/ObjectDeltaImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/ObjectDeltaImpl.java index 2b4dc20e5c9..7e429e02237 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/ObjectDeltaImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/ObjectDeltaImpl.java @@ -17,6 +17,7 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.*; import com.evolveum.midpoint.util.DebugUtil; import com.evolveum.midpoint.util.MiscUtil; @@ -215,12 +216,12 @@ public D addModification(D itemDelta) { } public boolean containsModification(ItemDelta itemDelta) { - return containsModification(itemDelta, PrismConstants.EQUALS_DEFAULT_IGNORE_METADATA, PrismConstants.EQUALS_DEFAULT_IS_LITERAL); + return containsModification(itemDelta, EquivalenceStrategy.IGNORE_METADATA); } - public boolean containsModification(ItemDelta itemDelta, boolean ignoreMetadata, boolean isLiteral) { + public boolean containsModification(ItemDelta itemDelta, EquivalenceStrategy strategy) { for (ItemDelta modification: modifications) { - if (modification.contains(itemDelta, ignoreMetadata, isLiteral)) { + if (modification.contains(itemDelta, strategy)) { return true; } } @@ -472,9 +473,9 @@ public ObjectDeltaImpl narrow(PrismObject existingObject) { ObjectDeltaImpl narrowedDelta = new ObjectDeltaImpl<>(this.objectTypeClass, this.changeType, this.prismContext); narrowedDelta.oid = this.oid; for (ItemDelta modification: modifications) { - ItemDelta narrowedModifiacation = modification.narrow(existingObject); - if (narrowedModifiacation != null && !narrowedModifiacation.isEmpty()) { - narrowedDelta.addModification(narrowedModifiacation); + ItemDelta narrowedModification = modification.narrow(existingObject); + if (narrowedModification != null && !narrowedModification.isEmpty()) { + narrowedDelta.addModification(narrowedModification); } } return narrowedDelta; diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/PropertyDeltaImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/PropertyDeltaImpl.java index 7aba460e1c3..656e55c4d75 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/PropertyDeltaImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/PropertyDeltaImpl.java @@ -20,6 +20,7 @@ import com.evolveum.midpoint.prism.delta.ItemDelta; import com.evolveum.midpoint.prism.delta.ObjectDelta; import com.evolveum.midpoint.prism.delta.PropertyDelta; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.impl.PrismPropertyValueImpl; import com.evolveum.midpoint.prism.match.MatchingRule; import com.evolveum.midpoint.prism.path.ItemPath; @@ -204,7 +205,7 @@ public boolean isRealValueToAdd(PrismPropertyValue value) { } for (PrismPropertyValue valueToAdd : valuesToAdd) { - if (valueToAdd.equalsRealValue(value)) { + if (valueToAdd.equals(value, EquivalenceStrategy.REAL_VALUE)) { return true; } } @@ -217,7 +218,7 @@ public boolean isRealValueToDelete(PrismPropertyValue value) { } for (PrismPropertyValue valueToAdd : valuesToDelete) { - if (valueToAdd.equalsRealValue(value)) { + if (valueToAdd.equals(value, EquivalenceStrategy.REAL_VALUE)) { return true; } } @@ -248,7 +249,7 @@ public PropertyDelta narrow(PrismObject object) { public PropertyDelta narrow(PrismObject object, final MatchingRule matchingRule) { Comparator> comparator = (o1, o2) -> { - if (o1.equalsComplex(o2, true, false, matchingRule)) { + if (o1.equals(o2, EquivalenceStrategy.IGNORE_METADATA, matchingRule)) { return 0; } else { return 1; @@ -259,7 +260,7 @@ public PropertyDelta narrow(PrismObject object, final M public boolean isRedundant(PrismObject object, final MatchingRule matchingRule) { Comparator> comparator = (o1, o2) -> { - if (o1.equalsComplex(o2, true, false, matchingRule)) { + if (o1.equals(o2, EquivalenceStrategy.IGNORE_METADATA, matchingRule)) { return 0; } else { return 1; diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/marshaller/PrismMarshaller.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/marshaller/PrismMarshaller.java index bdd5e6e7a36..f79f9a6a455 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/marshaller/PrismMarshaller.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/marshaller/PrismMarshaller.java @@ -172,7 +172,7 @@ public boolean canSerialize(Object object) { private XNodeImpl marshalItemContent(@NotNull Item item, ItemDefinition itemDefinition, SerializationContext context) throws SchemaException { if (item.size() == 1) { - return marshalItemValue(item.getValue(0), itemDefinition, null, context); + return marshalItemValue(item.getAnyValue(), itemDefinition, null, context); } else { ListXNodeImpl xlist = new ListXNodeImpl(); for (PrismValue val : item.getValues()) { diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/marshaller/QueryConverterImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/marshaller/QueryConverterImpl.java index 2b5fff683aa..d4bb9d921c2 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/marshaller/QueryConverterImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/marshaller/QueryConverterImpl.java @@ -298,7 +298,7 @@ private ObjectFilter parseComparisonFilter(QName cla return prismContext.queryFactory().createEqual(itemPath, (PrismPropertyDefinition)itemDefinition, matchingRule, prismContext, values); } //noinspection unchecked - PrismPropertyValue propertyValue = (PrismPropertyValue) item.getValue(0); + PrismPropertyValue propertyValue = (PrismPropertyValue) item.getAnyValue(); propertyValue.clearParent(); if (isGt || isGtEq) { //noinspection unchecked diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/xjc/AnyArrayList.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/xjc/AnyArrayList.java index 198404f33a5..4716f5cb2eb 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/xjc/AnyArrayList.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/xjc/AnyArrayList.java @@ -21,6 +21,7 @@ import javax.xml.namespace.QName; +import com.evolveum.midpoint.prism.impl.ItemImpl; import org.apache.commons.lang.Validate; import com.evolveum.midpoint.prism.Containerable; @@ -77,7 +78,7 @@ public Object get(int index) { if (containerValue != null) { for (Item item : containerValue.getItems()) { if (index < item.getValues().size()) { - return asElement(item.getValue(index)); + return asElement(item.getValues().get(index)); } else { index -= item.getValues().size(); } @@ -130,7 +131,7 @@ public Object remove(int index) { } else { for (Item item: containerValue.getItems()) { if (index < item.getValues().size()) { - item.remove(index); + ((ItemImpl) item).remove(index); } else { index -= item.getValues().size(); } diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/xjc/PrismForJAXBUtil.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/xjc/PrismForJAXBUtil.java index d490ae0129d..6ba1cb99491 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/xjc/PrismForJAXBUtil.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/xjc/PrismForJAXBUtil.java @@ -260,7 +260,11 @@ public static void setReferenceValueAsRef(PrismContainerValue parentValue, QN if (value.getParent() != null) { value = value.clone(); } - reference.add(value); + try { + reference.add(value); + } catch (SchemaException e) { + throw new IllegalStateException("Couldn't add a value: " + e.getMessage(), e); + } } else { reference.getValue().setOid(value.getOid()); reference.getValue().setTargetType(value.getTargetType()); diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/xnode/PrimitiveXNodeImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/xnode/PrimitiveXNodeImpl.java index b8bf8c57fbc..890b658d1b7 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/xnode/PrimitiveXNodeImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/xnode/PrimitiveXNodeImpl.java @@ -197,6 +197,7 @@ public String getFormattedValue() { * * @return properly formatted value */ + @Override public String getGuessedFormattedValue() throws SchemaException { if (isParsed()) { return getFormattedValue(); diff --git a/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestCompare.java b/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestCompare.java index 323e22084e9..fb82239c3f9 100644 --- a/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestCompare.java +++ b/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestCompare.java @@ -25,7 +25,7 @@ import javax.xml.namespace.QName; -import com.evolveum.midpoint.prism.impl.PrismReferenceDefinitionImpl; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.impl.PrismReferenceValueImpl; import com.evolveum.midpoint.prism.path.ItemPath; import org.testng.annotations.Test; @@ -163,7 +163,7 @@ public void testDiffJackLiteral() throws Exception { PrismObject jackModified = prismContext.parseObject(getFile(USER_JACK_MODIFIED_FILE_BASENAME)); // WHEN - ObjectDelta jackDelta = jackOriginal.diff(jackModified, true, true); + ObjectDelta jackDelta = jackOriginal.diff(jackModified, EquivalenceStrategy.NOT_LITERAL); // THEN System.out.println("Jack delta:"); @@ -312,41 +312,43 @@ public void testEqualsReferenceValuesSchema() throws Exception { PrismContext prismContext = constructInitializedPrismContext(); - PrismReferenceDefinitionImpl ref1Def = new PrismReferenceDefinitionImpl(REF_QNAME, REF_TYPE_QNAME, prismContext); + MutablePrismReferenceDefinition ref1Def = prismContext.definitionFactory().createReferenceDefinition(REF_QNAME, REF_TYPE_QNAME); ref1Def.setTargetTypeName(ACCOUNT_TYPE_QNAME); - PrismReference ref1 = prismContext.itemFactory().createReference(REF_QNAME, ref1Def); + PrismReference ref1a = prismContext.itemFactory().createReference(REF_QNAME, ref1Def); PrismReferenceValue val11 = new PrismReferenceValueImpl("oid1"); val11.setTargetType(ACCOUNT_TYPE_QNAME); - ref1.add(val11); + assertTrue(ref1a.add(val11)); PrismReferenceValue val12 = new PrismReferenceValueImpl("oid1"); val12.setTargetType(ACCOUNT_TYPE_QNAME); - ref1.add(val12); + assertFalse(ref1a.add(val12)); + PrismReference ref1b = prismContext.itemFactory().createReference(REF_QNAME, ref1Def); PrismReferenceValue val13 = new PrismReferenceValueImpl("oid1"); // No type - ref1.add(val13); + assertTrue(ref1b.add(val13)); PrismReferenceValue val14 = new PrismReferenceValueImpl("oid1"); // No type - ref1.add(val14); + assertFalse(ref1b.add(val14)); PrismReferenceDefinition ref2Def = prismContext.definitionFactory().createReferenceDefinition(REF_QNAME, REF_TYPE_QNAME); // no target type def - PrismReference ref2 = prismContext.itemFactory().createReference(REF_QNAME, ref2Def); + PrismReference ref2a = prismContext.itemFactory().createReference(REF_QNAME, ref2Def); PrismReferenceValue val21 = new PrismReferenceValueImpl("oid1"); val21.setTargetType(ACCOUNT_TYPE_QNAME); - ref2.add(val21); + assertTrue(ref2a.add(val21)); PrismReferenceValue val22 = new PrismReferenceValueImpl("oid1"); val22.setTargetType(ACCOUNT_TYPE_QNAME); - ref2.add(val22); + assertFalse(ref2a.add(val22)); + PrismReference ref2b = prismContext.itemFactory().createReference(REF_QNAME, ref2Def); PrismReferenceValue val23 = new PrismReferenceValueImpl("oid1"); // No type - ref2.add(val23); + assertTrue(ref2b.add(val23)); // No def in val4x @@ -365,7 +367,7 @@ public void testEqualsReferenceValuesSchema() throws Exception { assertTrue("val12 - val11", val12.equals(val11)); assertTrue("val11 - val13", val11.equals(val13)); assertTrue("val13 - val11", val13.equals(val11)); - assertTrue("val13 - val14", val13.equals(val14)); + assertFalse("val13 - val14", val13.equals(val14)); // val14 has no type because it is not in ref1b assertTrue("val21 - val21", val21.equals(val21)); assertTrue("val21 - val22", val21.equals(val22)); diff --git a/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestDelta.java b/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestDelta.java index 86659d8661f..758bf990c80 100644 --- a/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestDelta.java +++ b/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestDelta.java @@ -675,6 +675,10 @@ public void testAddAssignmentSameNullIdSwallow() throws Exception { Collection> valuesToAdd = containerDeltaAfter.getValuesToAdd(); assertEquals("Unexpected number of values to add", 1, valuesToAdd.size()); assertEquals("Wrong value to add", assignmentValue1, valuesToAdd.iterator().next()); + + PrismAsserts.assertPathEquivalent("Wrong path in container delta", + ItemPath.create(UserType.F_ASSIGNMENT, AssignmentType.F_DESCRIPTION), + assignmentValue2.findProperty(AssignmentType.F_DESCRIPTION).getPath()); } @Test diff --git a/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestEquals.java b/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestEquals.java index aa7b60687bf..51dbccbd4cd 100644 --- a/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestEquals.java +++ b/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestEquals.java @@ -49,14 +49,14 @@ public void testContainsEquivalentValue01() throws Exception { addAssignment(user, ASSIGNMENT_ABRAKADABRA_ID, ASSIGNMENT_ABRAKADABRA_DESCRIPTION); display("user", user); - PrismContainer assignmentConatiner = user.findContainer(UserType.F_ASSIGNMENT); + PrismContainer assignmentContainer = user.findContainer(UserType.F_ASSIGNMENT); // WHEN, THEN displayWhen(TEST_NAME); - assertTrue(ASSIGNMENT_PATLAMA_ID+":null", assignmentConatiner.containsEquivalentValue(createAssignmentValue(ASSIGNMENT_PATLAMA_ID, null))); - assertTrue("null:"+ASSIGNMENT_PATLAMA_DESCRIPTION, assignmentConatiner.containsEquivalentValue(createAssignmentValue(null, ASSIGNMENT_PATLAMA_DESCRIPTION))); - assertFalse("364576:null", assignmentConatiner.containsEquivalentValue(createAssignmentValue(364576L, null))); - assertFalse("null:never ever never", assignmentConatiner.containsEquivalentValue(createAssignmentValue(null, "never ever never"))); + assertTrue(ASSIGNMENT_PATLAMA_ID+":null", assignmentContainer.containsEquivalentValue(createAssignmentValue(ASSIGNMENT_PATLAMA_ID, null))); + assertTrue("null:"+ASSIGNMENT_PATLAMA_DESCRIPTION, assignmentContainer.containsEquivalentValue(createAssignmentValue(null, ASSIGNMENT_PATLAMA_DESCRIPTION))); + assertFalse("364576:null", assignmentContainer.containsEquivalentValue(createAssignmentValue(364576L, null))); + assertFalse("null:never ever never", assignmentContainer.containsEquivalentValue(createAssignmentValue(null, "never ever never"))); } @Test(enabled = false) // normalization no longer removes empty values diff --git a/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestPrismObjectConstruction.java b/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestPrismObjectConstruction.java index 9e4536ffa8b..adc65b9119c 100644 --- a/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestPrismObjectConstruction.java +++ b/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestPrismObjectConstruction.java @@ -297,7 +297,7 @@ private void assertUserDrake(PrismObject user, boolean assertDefinitio private void assertUserDrakeContent(PrismObject user, boolean assertDefinitions) { // fullName - PrismProperty fullNameProperty = user.findProperty(USER_FULLNAME_QNAME); + PrismProperty fullNameProperty = user.findProperty(USER_FULLNAME_QNAME); if (assertDefinitions) PrismAsserts.assertDefinition(fullNameProperty, DOMUtil.XSD_STRING, 1, 1); assertEquals("Wrong fullname", "Sir Fancis Drake", fullNameProperty.getValue().getValue()); // activation @@ -305,7 +305,7 @@ private void assertUserDrakeContent(PrismObject user, boolean assertDe assertEquals(USER_ACTIVATION_QNAME, activationContainer.getElementName()); if (assertDefinitions) PrismAsserts.assertDefinition(activationContainer, ACTIVATION_TYPE_QNAME, 0, 1); // activation/enabled - PrismProperty enabledProperty = user.findProperty(USER_ENABLED_PATH); + PrismProperty enabledProperty = user.findProperty(USER_ENABLED_PATH); assertEquals(USER_ENABLED_QNAME, enabledProperty.getElementName()); if (assertDefinitions) PrismAsserts.assertDefinition(enabledProperty, DOMUtil.XSD_BOOLEAN, 0, 1); assertEquals("Wrong enabled", true, enabledProperty.getValue().getValue()); diff --git a/infra/prism-maven-plugin/pom.xml b/infra/prism-maven-plugin/pom.xml index 6cb866969e7..3e5b4f941d7 100644 --- a/infra/prism-maven-plugin/pom.xml +++ b/infra/prism-maven-plugin/pom.xml @@ -87,6 +87,12 @@ true + + maven-failsafe-plugin + + true + + diff --git a/infra/schema/src/main/java/com/evolveum/midpoint/schema/constants/ObjectTypes.java b/infra/schema/src/main/java/com/evolveum/midpoint/schema/constants/ObjectTypes.java index d3883235890..8b850c1550f 100644 --- a/infra/schema/src/main/java/com/evolveum/midpoint/schema/constants/ObjectTypes.java +++ b/infra/schema/src/main/java/com/evolveum/midpoint/schema/constants/ObjectTypes.java @@ -74,6 +74,9 @@ public enum ObjectTypes { FOCUS_TYPE(FocusType.COMPLEX_TYPE, SchemaConstants.C_FOCUS, FocusType.class, ObjectManager.MODEL, "focus"), + ASSIGNMENT_HOLDER_TYPE(AssignmentHolderType.COMPLEX_TYPE, SchemaConstantsGenerated.C_ASSIGNMENT_HOLDER, + AssignmentHolderType.class, ObjectManager.MODEL, "assignmentHolders"), + REPORT(ReportType.COMPLEX_TYPE, SchemaConstants.C_REPORT, ReportType.class, ObjectManager.MODEL, "reports"), REPORT_OUTPUT(ReportOutputType.COMPLEX_TYPE, SchemaConstants.C_REPORT_OUTPUT, ReportOutputType.class, @@ -133,15 +136,15 @@ public enum ObjectManager { } @NotNull private final QName type; - @NotNull private final QName name; + @NotNull private final QName elementName; @NotNull private final Class classDefinition; @NotNull private final ObjectManager objectManager; @NotNull private final String restType; - ObjectTypes(@NotNull QName type, @NotNull QName name, @NotNull Class classDefinition, + ObjectTypes(@NotNull QName type, @NotNull QName elementName, @NotNull Class classDefinition, @NotNull ObjectManager objectManager, @NotNull String restType) { this.type = type; - this.name = name; + this.elementName = elementName; this.classDefinition = classDefinition; this.objectManager = objectManager; this.restType = restType; @@ -160,8 +163,8 @@ public String getValue() { } @NotNull - public QName getQName() { - return name; + public QName getElementName() { + return elementName; } @NotNull diff --git a/infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceAttributeContainerImpl.java b/infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceAttributeContainerImpl.java index e8544124cf1..951a9f3cf8e 100644 --- a/infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceAttributeContainerImpl.java +++ b/infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceAttributeContainerImpl.java @@ -431,5 +431,4 @@ public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitio protected String getDebugDumpClassName() { return "RAC"; } - } diff --git a/infra/schema/src/main/java/com/evolveum/midpoint/schema/util/AdminGuiConfigTypeUtil.java b/infra/schema/src/main/java/com/evolveum/midpoint/schema/util/AdminGuiConfigTypeUtil.java deleted file mode 100644 index c81fe30713a..00000000000 --- a/infra/schema/src/main/java/com/evolveum/midpoint/schema/util/AdminGuiConfigTypeUtil.java +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright (c) 2015-2017 Evolveum - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.evolveum.midpoint.schema.util; - -import com.evolveum.midpoint.prism.PrismObject; -import com.evolveum.midpoint.schema.constants.ObjectTypes; -import com.evolveum.midpoint.util.QNameUtil; -import com.evolveum.midpoint.xml.ns._public.common.common_3.*; - -import org.jetbrains.annotations.NotNull; - -import java.util.*; -import java.util.function.BooleanSupplier; - -import javax.xml.namespace.QName; - -/** - * @author semancik - * - */ -public class AdminGuiConfigTypeUtil { - - public static AdminGuiConfigurationType compileAdminGuiConfiguration(@NotNull List adminGuiConfigurations, - PrismObject systemConfiguration) { - - // if there's no admin config at all, return null (to preserve original behavior) - if (adminGuiConfigurations.isEmpty() && - (systemConfiguration == null || systemConfiguration.asObjectable().getAdminGuiConfiguration() == null)) { - return null; - } - - AdminGuiConfigurationType composite = new AdminGuiConfigurationType(); - if (systemConfiguration != null) { - applyAdminGuiConfiguration(composite, systemConfiguration.asObjectable().getAdminGuiConfiguration()); - } - for (AdminGuiConfigurationType adminGuiConfiguration: adminGuiConfigurations) { - applyAdminGuiConfiguration(composite, adminGuiConfiguration); - } - return composite; - } - - private static void applyAdminGuiConfiguration(AdminGuiConfigurationType composite, AdminGuiConfigurationType adminGuiConfiguration) { - if (adminGuiConfiguration == null) { - return; - } - adminGuiConfiguration.getAdditionalMenuLink().forEach(additionalMenuLink -> composite.getAdditionalMenuLink().add(additionalMenuLink.clone())); - adminGuiConfiguration.getUserDashboardLink().forEach(userDashboardLink -> composite.getUserDashboardLink().add(userDashboardLink.clone())); - if (adminGuiConfiguration.getDefaultTimezone() != null) { - composite.setDefaultTimezone(adminGuiConfiguration.getDefaultTimezone()); - } - if (adminGuiConfiguration.getPreferredDataLanguage() != null) { - composite.setPreferredDataLanguage(adminGuiConfiguration.getPreferredDataLanguage()); - } - if (adminGuiConfiguration.isEnableExperimentalFeatures() != null) { - composite.setEnableExperimentalFeatures(adminGuiConfiguration.isEnableExperimentalFeatures()); - } - if (adminGuiConfiguration.getDefaultExportSettings() != null) { - composite.setDefaultExportSettings(adminGuiConfiguration.getDefaultExportSettings().clone()); - } - if (adminGuiConfiguration.getObjectLists() != null) { - if (composite.getObjectLists() == null) { - composite.setObjectLists(adminGuiConfiguration.getObjectLists().clone()); - } else { - for (GuiObjectListViewType objectList: adminGuiConfiguration.getObjectLists().getObjectList()) { - mergeList(composite.getObjectLists(), objectList.clone()); - } - } - } - if (adminGuiConfiguration.getObjectForms() != null) { - if (composite.getObjectForms() == null) { - composite.setObjectForms(adminGuiConfiguration.getObjectForms().clone()); - } else { - for (ObjectFormType objectForm: adminGuiConfiguration.getObjectForms().getObjectForm()) { - joinForms(composite.getObjectForms(), objectForm.clone()); - } - } - } - if (adminGuiConfiguration.getObjectDetails() != null) { - if (composite.getObjectDetails() == null) { - composite.setObjectDetails(adminGuiConfiguration.getObjectDetails().clone()); - } else { - for (GuiObjectDetailsPageType objectDetails: adminGuiConfiguration.getObjectDetails().getObjectDetailsPage()) { - joinObjectDetails(composite.getObjectDetails(), objectDetails); - } - } - } - if (adminGuiConfiguration.getUserDashboard() != null) { - if (composite.getUserDashboard() == null) { - composite.setUserDashboard(adminGuiConfiguration.getUserDashboard().clone()); - } else { - for (DashboardWidgetType widget: adminGuiConfiguration.getUserDashboard().getWidget()) { - mergeWidget(composite.getUserDashboard(), widget); - } - } - } - for (UserInterfaceFeatureType feature: adminGuiConfiguration.getFeature()) { - mergeFeature(composite.getFeature(), feature.clone()); - } - if (composite.getObjectLists() != null && composite.getObjectLists().getObjectList() != null){ - for (GuiObjectListViewType objectListType : composite.getObjectLists().getObjectList()){ - if (objectListType.getColumn() != null) { -// objectListType.getColumn().clear(); -// objectListType.getColumn().addAll(orderCustomColumns(objectListType.getColumn())); - List orderedList = orderCustomColumns(objectListType.getColumn()); - objectListType.getColumn().clear(); - objectListType.getColumn().addAll(orderedList); - } - } - } - - if (adminGuiConfiguration.getFeedbackMessagesHook() != null) { - composite.setFeedbackMessagesHook(adminGuiConfiguration.getFeedbackMessagesHook().clone()); - } - - if (adminGuiConfiguration.getRoleManagement() != null && - adminGuiConfiguration.getRoleManagement().getAssignmentApprovalRequestLimit() != null) { - if (composite.getRoleManagement() != null && composite.getRoleManagement().getAssignmentApprovalRequestLimit() != null) { - // the greater value wins (so it is possible to give an exception to selected users) - Integer newValue = Math.max( - adminGuiConfiguration.getRoleManagement().getAssignmentApprovalRequestLimit(), - composite.getRoleManagement().getAssignmentApprovalRequestLimit()); - composite.getRoleManagement().setAssignmentApprovalRequestLimit(newValue); - } else { - if (composite.getRoleManagement() == null) { - composite.setRoleManagement(new AdminGuiConfigurationRoleManagementType()); - } - composite.getRoleManagement().setAssignmentApprovalRequestLimit( - adminGuiConfiguration.getRoleManagement().getAssignmentApprovalRequestLimit()); - } - } - } - - private static void joinForms(ObjectFormsType objectForms, ObjectFormType newForm) { - objectForms.getObjectForm().removeIf(currentForm -> isTheSameObjectForm(currentForm, newForm)); - objectForms.getObjectForm().add(newForm.clone()); - } - - private static void joinObjectDetails(GuiObjectDetailsSetType objectDetailsSet, GuiObjectDetailsPageType newObjectDetails) { - objectDetailsSet.getObjectDetailsPage().removeIf(currentDetails -> isTheSameObjectType(currentDetails, newObjectDetails)); - objectDetailsSet.getObjectDetailsPage().add(newObjectDetails.clone()); - } - - private static boolean isTheSameObjectType(AbstractObjectTypeConfigurationType oldConf, AbstractObjectTypeConfigurationType newConf) { - return QNameUtil.match(oldConf.getType(), newConf.getType()); - } - - private static boolean isTheSameObjectForm(ObjectFormType oldForm, ObjectFormType newForm){ - if (!isTheSameObjectType(oldForm,newForm)) { - return false; - } - if (oldForm.isIncludeDefaultForms() != null && - newForm.isIncludeDefaultForms() != null){ - return true; - } - if (oldForm.getFormSpecification() == null && newForm.getFormSpecification() == null) { - String oldFormPanelUri = oldForm.getFormSpecification().getPanelUri(); - String newFormPanelUri = newForm.getFormSpecification().getPanelUri(); - if (oldFormPanelUri != null && oldFormPanelUri.equals(newFormPanelUri)) { - return true; - } - - String oldFormPanelClass = oldForm.getFormSpecification().getPanelClass(); - String newFormPanelClass = newForm.getFormSpecification().getPanelClass(); - if (oldFormPanelClass != null && oldFormPanelClass.equals(newFormPanelClass)) { - return true; - } - - String oldFormRefOid = oldForm.getFormSpecification().getFormRef() == null ? - null : oldForm.getFormSpecification().getFormRef().getOid(); - String newFormRefOid = newForm.getFormSpecification().getFormRef() == null ? - null : newForm.getFormSpecification().getFormRef().getOid(); - if (oldFormRefOid != null && oldFormRefOid.equals(newFormRefOid)) { - return true; - } - } - return false; - } - - private static void mergeList(GuiObjectListViewsType objectLists, GuiObjectListViewType newList) { - // We support only the default object lists now, so simply replace the existing definition with the - // latest definition. We will need a more sophisticated merging later. - objectLists.getObjectList().removeIf(currentList -> currentList.getType().equals(newList.getType())); - objectLists.getObjectList().add(newList.clone()); - } - - private static void mergeWidget(DashboardLayoutType compositeDashboard, DashboardWidgetType newWidget) { - String newWidgetIdentifier = newWidget.getIdentifier(); - DashboardWidgetType compositeWidget = findWidget(compositeDashboard, newWidgetIdentifier); - if (compositeWidget == null) { - compositeDashboard.getWidget().add(newWidget.clone()); - } else { - mergeWidget(compositeWidget, newWidget); - } - } - - public static DashboardWidgetType findWidget(DashboardLayoutType dashboard, String widgetIdentifier) { - return findFeature(dashboard.getWidget(), widgetIdentifier); - } - - private static void mergeWidget(DashboardWidgetType compositeWidget, DashboardWidgetType newWidget) { - mergeFeature(compositeWidget, newWidget, UserInterfaceElementVisibilityType.VACANT); - // merge other widget properties (in the future) - } - - private static void mergeFeature(List compositeFeatures, UserInterfaceFeatureType newFeature) { - String newIdentifier = newFeature.getIdentifier(); - UserInterfaceFeatureType compositeFeature = findFeature(compositeFeatures, newIdentifier); - if (compositeFeature == null) { - compositeFeatures.add(newFeature.clone()); - } else { - mergeFeature(compositeFeature, newFeature, UserInterfaceElementVisibilityType.AUTOMATIC); - } - } - - private static void mergeFeature(T compositeFeature, T newFeature, UserInterfaceElementVisibilityType defaultVisibility) { - UserInterfaceElementVisibilityType newCompositeVisibility = mergeVisibility(compositeFeature.getVisibility(), newFeature.getVisibility(), defaultVisibility); - compositeFeature.setVisibility(newCompositeVisibility); - } - - public static T findFeature(List features, String identifier) { - for (T feature: features) { - if (feature.getIdentifier().equals(identifier)) { - return feature; - } - } - return null; - } - - public static UserInterfaceElementVisibilityType getFeatureVisibility(AdminGuiConfigurationType adminGuiConfig, String identifier) { - if (adminGuiConfig == null) { - return UserInterfaceElementVisibilityType.AUTOMATIC; - } - UserInterfaceFeatureType feature = findFeature(adminGuiConfig.getFeature(), identifier); - if (feature == null) { - return UserInterfaceElementVisibilityType.AUTOMATIC; - } - UserInterfaceElementVisibilityType visibility = feature.getVisibility(); - if (visibility == null) { - return UserInterfaceElementVisibilityType.AUTOMATIC; - } - return visibility; - } - - public static boolean isFeatureVisible(AdminGuiConfigurationType adminGuiConfig, String identifier) { - return isFeatureVisible(adminGuiConfig, identifier, null); - } - - public static boolean isFeatureVisible(AdminGuiConfigurationType adminGuiConfig, String identifier, BooleanSupplier automaticPredicate) { - UserInterfaceElementVisibilityType visibility = getFeatureVisibility(adminGuiConfig, identifier); - return isVisible(visibility, automaticPredicate); - } - - public static boolean isVisible(UserInterfaceElementVisibilityType visibility, BooleanSupplier automaticPredicate) { - if (visibility == UserInterfaceElementVisibilityType.HIDDEN) { - return false; - } - if (visibility == UserInterfaceElementVisibilityType.VISIBLE) { - return true; - } - if (visibility == UserInterfaceElementVisibilityType.AUTOMATIC) { - if (automaticPredicate == null) { - return true; - } else { - return automaticPredicate.getAsBoolean(); - } - } - return false; - } - - private static UserInterfaceElementVisibilityType mergeVisibility( - UserInterfaceElementVisibilityType compositeVisibility, UserInterfaceElementVisibilityType newVisibility, UserInterfaceElementVisibilityType defaultVisibility) { - if (compositeVisibility == null) { - compositeVisibility = defaultVisibility; - } - if (newVisibility == null) { - newVisibility = defaultVisibility; - } - if (compositeVisibility == UserInterfaceElementVisibilityType.HIDDEN || newVisibility == UserInterfaceElementVisibilityType.HIDDEN) { - return UserInterfaceElementVisibilityType.HIDDEN; - } - if (compositeVisibility == UserInterfaceElementVisibilityType.VISIBLE || newVisibility == UserInterfaceElementVisibilityType.VISIBLE) { - return UserInterfaceElementVisibilityType.VISIBLE; - } - if (compositeVisibility == UserInterfaceElementVisibilityType.AUTOMATIC || newVisibility == UserInterfaceElementVisibilityType.AUTOMATIC) { - return UserInterfaceElementVisibilityType.AUTOMATIC; - } - return UserInterfaceElementVisibilityType.VACANT; - } - - /* - the ordering algorithm is: the first level is occupied by - the column which previousColumn == null || "" || notExistingColumnNameValue. - Each next level contains columns which - previousColumn == columnNameFromPreviousLevel - */ - public static List orderCustomColumns(List customColumns){ - if (customColumns == null || customColumns.size() == 0){ - return new ArrayList<>(); - } - List customColumnsList = new ArrayList<>(customColumns); - List previousColumnValues = new ArrayList<>(); - previousColumnValues.add(null); - previousColumnValues.add(""); - - Map columnRefsMap = new HashMap<>(); - for (GuiObjectColumnType column : customColumns){ - columnRefsMap.put(column.getName(), column.getPreviousColumn() == null ? "" : column.getPreviousColumn()); - } - - List temp = new ArrayList<> (); - int index = 0; - while (index < customColumns.size()){ - int sortFrom = index; - for (int i = index; i < customColumnsList.size(); i++){ - GuiObjectColumnType column = customColumnsList.get(i); - if (previousColumnValues.contains(column.getPreviousColumn()) || - !columnRefsMap.containsKey(column.getPreviousColumn())){ - Collections.swap(customColumnsList, index, i); - index++; - temp.add(column.getName()); - } - } - if (temp.size() == 0){ - temp.add(customColumnsList.get(index).getName()); - index++; - } - if (index - sortFrom > 1){ - customColumnsList.subList(sortFrom, index - 1) - .sort((o1, o2) -> String.CASE_INSENSITIVE_ORDER.compare(o1.getName(), o2.getName())); - } - previousColumnValues.clear(); - previousColumnValues.addAll(temp); - temp.clear(); - } - return customColumnsList; - } - - public static GuiObjectDetailsPageType findObjectConfiguration(Class type, AdminGuiConfigurationType adminGuiConfig) { - if (adminGuiConfig == null) { - return null; - } - GuiObjectDetailsSetType objectDetailsSetType = adminGuiConfig.getObjectDetails(); - if (objectDetailsSetType == null) { - return null; - } - return AdminGuiConfigTypeUtil.findObjectConfiguration(objectDetailsSetType.getObjectDetailsPage(), type); - } - - public static T findObjectConfiguration( - List list, Class type) { - if (list == null) { - return null; - } - QName typeQName = ObjectTypes.getObjectType(type).getTypeQName(); - for (T item: list) { - if (QNameUtil.match(item.getType(), typeQName)) { - return item; - } - } - for (T item: list) { - if (item.getType() == null) { - return item; - } - } - return null; - } - -} diff --git a/infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ObjectTypeUtil.java b/infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ObjectTypeUtil.java index a5cf76c767c..95d451d7819 100644 --- a/infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ObjectTypeUtil.java +++ b/infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ObjectTypeUtil.java @@ -206,7 +206,7 @@ public static String getShortTypeName(ObjectType object) { public static String getShortTypeName(Class type) { ObjectTypes objectTypeType = ObjectTypes.getObjectType(type); if (objectTypeType != null) { - return objectTypeType.getQName().getLocalPart(); + return objectTypeType.getElementName().getLocalPart(); } else { return type.getSimpleName(); } diff --git a/infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ParamsTypeUtil.java b/infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ParamsTypeUtil.java index e51823a7dd3..9a71fb4b97d 100644 --- a/infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ParamsTypeUtil.java +++ b/infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ParamsTypeUtil.java @@ -62,20 +62,28 @@ private static EntryType createEntryElement(String key, String value) { return entryType; } - public static Map fromParamsType(ParamsType paramsType, PrismContext prismContext) throws SchemaException{ + public static Map fromParamsType(ParamsType paramsType, PrismContext prismContext) throws SchemaException { if (paramsType != null) { Map params = new HashMap<>(); for (EntryType entry : paramsType.getEntry()) { Serializable realValue; if (entry.getEntryValue() != null) { Serializable value = (Serializable) entry.getEntryValue().getValue(); - realValue = prismContext.hacks().guessFormattedValue(value); + if (value instanceof RawType) { + RawType raw = (RawType) value; + if (raw.isParsed()) { + realValue = raw.getAlreadyParsedValue().getRealValue(); + } else { + realValue = raw.guessFormattedValue(); + } + } else { + realValue = value; + } } else { realValue = null; } params.put(entry.getKey(), realValue); } - return params; } return null; diff --git a/infra/schema/src/main/resources/localization/schema.properties b/infra/schema/src/main/resources/localization/schema.properties index e88b68399ed..c312b50e295 100755 --- a/infra/schema/src/main/resources/localization/schema.properties +++ b/infra/schema/src/main/resources/localization/schema.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=Name FileConfigurationType.file=File FullTextSearchConfigurationType.enabled=Enabled FullTextSearchConfigurationType.indexed=Indexed +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=Object type +FullTextSearchIndexedItemsConfigurationType.item=Item FocusType.activation=Activation FocusType.assignment=Assignments FocusType.inducement=Inducements diff --git a/infra/schema/src/main/resources/localization/schema_cs.properties b/infra/schema/src/main/resources/localization/schema_cs.properties index cedf491407d..465c5a76455 100644 --- a/infra/schema/src/main/resources/localization/schema_cs.properties +++ b/infra/schema/src/main/resources/localization/schema_cs.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=Název FileConfigurationType.file=Soubor FullTextSearchConfigurationType.enabled=Povolený FullTextSearchConfigurationType.indexed=Indexovaný +FullTextSearchIndexedItemsConfigurationType.details=Fulltextové prohledávání indexovaných položek +FullTextSearchIndexedItemsConfigurationType.objectType=Typ objektu +FullTextSearchIndexedItemsConfigurationType.item=Položka FocusType.activation=Aktivace FocusType.assignment=Přiřazení FocusType.inducement=Indukce diff --git a/infra/schema/src/main/resources/localization/schema_de.properties b/infra/schema/src/main/resources/localization/schema_de.properties index 8de0fa7a9a2..8ae67973b7e 100644 --- a/infra/schema/src/main/resources/localization/schema_de.properties +++ b/infra/schema/src/main/resources/localization/schema_de.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=Name FileConfigurationType.file=Datei FullTextSearchConfigurationType.enabled=aktiv FullTextSearchConfigurationType.indexed=Indexed +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=Objekttyp +FullTextSearchIndexedItemsConfigurationType.item=Element FocusType.activation=Aktivierung FocusType.assignment=Zuweisungen FocusType.inducement=Veranlassungen diff --git a/infra/schema/src/main/resources/localization/schema_en.properties b/infra/schema/src/main/resources/localization/schema_en.properties index f28fef1b360..63bb49ccd9f 100644 --- a/infra/schema/src/main/resources/localization/schema_en.properties +++ b/infra/schema/src/main/resources/localization/schema_en.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=Name FileConfigurationType.file=File FullTextSearchConfigurationType.enabled=Enabled FullTextSearchConfigurationType.indexed=Indexed +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=Object type +FullTextSearchIndexedItemsConfigurationType.item=Item FocusType.activation=Activation FocusType.assignment=Assignments FocusType.inducement=Inducements diff --git a/infra/schema/src/main/resources/localization/schema_es.properties b/infra/schema/src/main/resources/localization/schema_es.properties index 14ffdaa6fea..12fda848849 100644 --- a/infra/schema/src/main/resources/localization/schema_es.properties +++ b/infra/schema/src/main/resources/localization/schema_es.properties @@ -47,7 +47,7 @@ ActivationStatusType.null=Indefinido ActivationType.administrativeStatus=Estado Administrativo ActivationType.effectiveStatus=Estado efectivo ActivationType.enabled=Habilitado -ActivationType.properties=Properties +ActivationType.properties=Propiedades ActivationType.title=Activación ActivationType.validFrom=Válido desde ActivationType.validTo=Válido hasta @@ -275,6 +275,9 @@ FileConfigurationType.name=Name FileConfigurationType.file=Fichero FullTextSearchConfigurationType.enabled=Habilitado FullTextSearchConfigurationType.indexed=Indexed +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=Tipo de objeto +FullTextSearchIndexedItemsConfigurationType.item=Item FocusType.activation=Activación FocusType.assignment=Asignaciones FocusType.inducement=Inducements @@ -325,7 +328,7 @@ GuiObjectListViewType.distinct=Distinct GuiObjectListViewType.column=Column GuiObjectListViewType.disableSorting=Disable sorting GuiObjectListViewType.action=Action -GuiObjectListViewsType.default=Default +GuiObjectListViewsType.default=Defecto GuiObjectListViewsType.objectList=Object list HasAssignmentPolicyConstraintType.targetRef=Objetivo HasAssignmentPolicyConstraintType.enabled=Habilitar @@ -481,11 +484,11 @@ ObjectType.ConnectorType=Conector ObjectType.ConnectorHostType=Host Conector ObjectType.FocusType=Foco ObjectType.FormType=Form -ObjectType.FunctionLibraryType=Function library +ObjectType.FunctionLibraryType=Librería de funciones ObjectType.GenericObjectType=Objeto Genérico ObjectType.LookupTableType=Lookup table ObjectType.NodeType=Nodo -ObjectType.ObjectCollectionType=Object collection +ObjectType.ObjectCollectionType=Colección de objetos ObjectType.ObjectType=Objeto ObjectType.ObjectTemplateType=Plantilla de Objeto ObjectType.OrgManagerType=Org. manager @@ -733,8 +736,8 @@ ObjectTypes.SERVICE=Servicio ObjectTypes.OBJECT=Objeto ObjectTypes.FORM=Form ObjectTypes.CASE=Case -ObjectTypes.FUNCTION_LIBRARY=Function library -ObjectTypes.OBJECT_COLLECTION=Object collection +ObjectTypes.FUNCTION_LIBRARY=Librería de funciones +ObjectTypes.OBJECT_COLLECTION=Colección de objetos OrgType.parentOrganization=Parent Organization ObjectType.extension=Extensión FocusType.assignmentKey=Assignment @@ -776,7 +779,7 @@ RoleType.roleType=Role Type ObjectPolicyConfigurationType.details=Object policy configuration ObjectPolicyConfigurationType.type=Tipo ObjectPolicyConfigurationType.subtype=Subtype -ObjectPolicyConfigurationType.objectTemplateRef=Object policy +ObjectPolicyConfigurationType.objectTemplateRef=Política de objeto ObjectPolicyConfigurationType.propertyConstraint=Property Constraint ObjectPolicyConfigurationType.conflictResolution=Conflict Resolution ObjectPolicyConfigurationType.lifecycleStateModel=Lifecycle State Model @@ -793,9 +796,9 @@ SystemConfigurationType.globalSecurityPolicyRef=Global security policy SystemConfigurationType.globalAccountSynchronizationSettings=Configuraciones globales de sincronización de cuentas SystemConfigurationType.logging=Logging SystemConfigurationType.notificationConfiguration=Notification configuration -SystemConfigurationType.workflowConfiguration=Workflow configuration +SystemConfigurationType.workflowConfiguration=Configuración de flujos de trabajo SystemConfigurationType.accessCertification=Certificación de accesos -SystemConfigurationType.roleManagement=Role management +SystemConfigurationType.roleManagement=Administración de roles SystemConfigurationType.profilingConfiguration=Profiling configuration SystemConfigurationType.cleanupPolicy=Cleanup policy SystemConfigurationType.internals=Internals @@ -857,7 +860,7 @@ AdminGuiConfigurationType.enableExperimentalFeatures=Enable experimental feature AdminGuiConfigurationType.defaultExportSettings=Default export settings AdminGuiConfigurationType.feature=Feature AdminGuiConfigurationType.feedbackMessagesHook=Feedback messages hook -AdminGuiConfigurationType.roleManagement=Role management +AdminGuiConfigurationType.roleManagement=Administración de roles midPointVersion=${pom.version} midPointRevision=${git.describe} IdempotenceType.CONSERVATIVE=Conservative @@ -1189,7 +1192,7 @@ PendingOperationExecutionStatusType.COMPLETED=Completed PendingOperationTypeType.MANUAL=Manual PendingOperationTypeType.RETRY=Retry UserType.roleMembershipRef=Role Membership -ObjectType.default=Default +ObjectType.default=Defecto ObjectType.manager=Gerente ObjectType.meta=Meta ObjectType.deputy=Deputy diff --git a/infra/schema/src/main/resources/localization/schema_et.properties b/infra/schema/src/main/resources/localization/schema_et.properties index 2fd55f395c6..63806aece8e 100644 --- a/infra/schema/src/main/resources/localization/schema_et.properties +++ b/infra/schema/src/main/resources/localization/schema_et.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=Nimi FileConfigurationType.file=Failist FullTextSearchConfigurationType.enabled=Lubatud FullTextSearchConfigurationType.indexed=Indexed +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=Objekti tüüp +FullTextSearchIndexedItemsConfigurationType.item=Üksus FocusType.activation=Aktiveerimine FocusType.assignment=Omistused FocusType.inducement=Tekitused diff --git a/infra/schema/src/main/resources/localization/schema_fi.properties b/infra/schema/src/main/resources/localization/schema_fi.properties index 76fbfa9fed3..fa26bab8b29 100644 --- a/infra/schema/src/main/resources/localization/schema_fi.properties +++ b/infra/schema/src/main/resources/localization/schema_fi.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=Bini FileConfigurationType.file=Tiedosto FullTextSearchConfigurationType.enabled=Käytössä FullTextSearchConfigurationType.indexed=Indexed +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=Objektityyppi +FullTextSearchIndexedItemsConfigurationType.item=Tehtävä FocusType.activation=Aktivointi FocusType.assignment=Toimeksiannot FocusType.inducement=Vaikuttimet diff --git a/infra/schema/src/main/resources/localization/schema_fr.properties b/infra/schema/src/main/resources/localization/schema_fr.properties index b701c7de444..46e71c289b8 100644 --- a/infra/schema/src/main/resources/localization/schema_fr.properties +++ b/infra/schema/src/main/resources/localization/schema_fr.properties @@ -25,7 +25,7 @@ AbstractWorkItemActionType.name=Nom AbstractWorkItemActionType.displayName=Nom d'affichage AbstractWorkItemActionType.description=Description AbstractWorkItemActionType.condition=Condition -AccessCertificationCampaignStateType.CLOSED=Fermé +AccessCertificationCampaignStateType.CLOSED=Close AccessCertificationCampaignStateType.CREATED=Créé AccessCertificationCampaignStateType.IN_REMEDIATION=En réhabilitation AccessCertificationCampaignStateType.IN_REVIEW_STAGE_FULL=En phase de révision {0} ({1}) @@ -56,7 +56,7 @@ ActivityType.NOTIFICATIONS=Envoi des notifications ActivityType.PROJECTOR=Calcul des projections de l'objet focal ActivityType.RESOURCE_OBJECT_OPERATION=Opération sur un objet de la ressource ActivityType.WORKFLOWS=Envisager ou démarrer des flux de travaux de validation -AdminGuiConfigurationRoleManagementType.assignmentApprovalRequestLimit=Limite de demande de validation d'affectation +AdminGuiConfigurationRoleManagementType.assignmentApprovalRequestLimit=Limite de demande de validation d'attribution AppenderConfigurationType.pattern=Motif AppenderConfigurationType.name=Nom ApplicablePoliciesType.policyGroupRef=Groupe de politique @@ -123,7 +123,7 @@ AssignmentType.tenantReference=Référence du locataire AssignmentType.tenantReference.help=Référence du locataire auquel cette attribution est associée. Il s'agit d'un paramètre de la cible de cette attribution. Par exemple il est souvent utilisé pour paramétrer le rôle assigné par cette attribution. AssignmentType.orgReference=Référence de l'organisation AssignmentType.orgReferenceShorten=Référence de l'org. -AssignmentType.orgReference.help=Référence à l'organisation (entité organisationnelle, projet,...) à laquelle cette affectation est associée. Ceci est un argument pour la cible de cette affectation. Par exemple si elle est fréquemment utilisée pour paramétrer le rôle attribué par cette affectation. +AssignmentType.orgReference.help=Référence à l'organisation (entité organisationnelle, projet,...) à laquelle cette attribution est associée. Ceci est un argument pour la cible de cette attribution. Par exemple si elle est fréquemment utilisée pour paramétrer le rôle attribué par cette attribution. AttributeFetchStrategyType.EXPLICIT=Explicite AttributeFetchStrategyType.IMPLICIT=Implicite AttributeFetchStrategyType.MINIMAL=Minimal @@ -194,10 +194,10 @@ CapabilitiesType.runAs=Exécuter en tant que CleanupPoliciesType.auditRecords=Enregistrements d'audit CleanupPoliciesType.closedTasks=Tâches closes CleanupPoliciesType.closedCertificationCampaigns=Campagnes de certification closes -CleanupPoliciesType.outputReports=Rapports de sortie +CleanupPoliciesType.outputReports=Rapports produits CleanupPoliciesType.objectResults=Résultats d'objet CleanupPolicyType.maxAge=Intervalle de nettoyage -CleanupPolicyType.maxAge.help=Format : P[n][p], n-nombre, p-période (d - jours, m - mois, ...), P3M - nettoyage tous les 3 mois +CleanupPolicyType.maxAge.help=Format : P[n][p], n-nombre, p-période (d - jours, m - mois...), P3M - nettoyage tous les 3 mois CleanupPolicyType.maxRecords=Nombre maximal d'enregistrements à conserver ChangeType.ADD=Ajouter ChangeType.DELETE=Supprimer @@ -275,6 +275,9 @@ FileConfigurationType.name=Nom FileConfigurationType.file=Fichier FullTextSearchConfigurationType.enabled=Activé FullTextSearchConfigurationType.indexed=Indexé +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=Type d'objet +FullTextSearchIndexedItemsConfigurationType.item=Objet FocusType.activation=Activation FocusType.assignment=Attributions FocusType.inducement=Inductions @@ -407,7 +410,7 @@ LoggingLevelType.OFF=Éteint LoggingLevelType.TRACE=Traçage LoggingLevelType.WARN=Avertissement MailConfigurationType.details=Configuration du courriel -MailConfigurationType.defaultFrom=Défaut de +MailConfigurationType.defaultFrom=Expéditeur par défaut MailConfigurationType.debug=Déboguer MailConfigurationType.redirectToFile=Rediriger vers un fichier MailConfigurationType.logToFile=Journaliser dans un fichier @@ -681,7 +684,7 @@ ThreadStopActionType.RESCHEDULE=Replanifier ThreadStopActionType.RESTART=Redémarrer ThreadStopActionType.SUSPEND=Suspendre TimeValidityPolicyConstraintType.item=Objet -TimeValidityPolicyConstraintType.assignment=Affectation +TimeValidityPolicyConstraintType.assignment=Attribution TimeValidityPolicyConstraintType.activateOn=Activer sur TimeValidityPolicyConstraintType.deactivateOn=Désactiver sur TransitionPolicyConstraintType.stateBefore=État avant @@ -737,7 +740,7 @@ ObjectTypes.FUNCTION_LIBRARY=Bibliothèque de fonctions ObjectTypes.OBJECT_COLLECTION=Collection de l'objet OrgType.parentOrganization=Organisation parente ObjectType.extension=Extension -FocusType.assignmentKey=Affectation +FocusType.assignmentKey=Attribution FocusType.jpegPhoto=Photo JPEG UserType.additionalName=Nom supplémentaire UserType.nickname=Surnom @@ -758,7 +761,7 @@ FocusType.locality=Localité UserType.credentials=Informations d'identification CredentialsType.password=Mot de passe CredentialsType.securityQuestions=Questions de sécurité -AssignmentType.assignment=Affectation +AssignmentType.assignment=Attribution AssignmentType.construction=Construction ActivationType.activation=Activation ActivationType.validityStatus=État de validité @@ -864,8 +867,8 @@ IdempotenceType.CONSERVATIVE=Prudente IdempotenceType.AGGRESSIVE=Agressive IdempotenceType.NONE=Aucune AdditionalInformationGenerator.exclusionsTitle=Exclusions à valider -AdditionalInformationGenerator.assignmentOf=Affectation de {0} -AdditionalInformationGenerator.isInConflictWithAssignmentOf=est en conflit avec l'affectation de {0} +AdditionalInformationGenerator.assignmentOf=Attribution de {0} +AdditionalInformationGenerator.isInConflictWithAssignmentOf=est en conflit avec l'attribution de {0} AdditionalInformationGenerator.notes=Notes ExclusionPolicyType.ENFORCE=Imposer ExclusionPolicyType.APPROVE=Valider @@ -873,12 +876,12 @@ ExclusionPolicyType.REPORT=Signaler TechnicalObjectSpecification={0} « {1} » (OID {2}) ObjectSpecification={0} « {1} » ObjectSpecificationWithPath={0} « {1} » ({2}) -DefaultPolicyConstraint.assignmentModification.toBeAdded=L'affectation de {0} (relation {1}) doit être ajoutée -DefaultPolicyConstraint.assignmentModification.wasAdded=L'affectation de {0} (relation {1}) a été ajoutée -DefaultPolicyConstraint.assignmentModification.toBeDeleted=L'affectation de {0} (relation {1}) doit être effacée -DefaultPolicyConstraint.assignmentModification.wasDeleted=L'affectation de {0} (relation {1}) a été supprimée -DefaultPolicyConstraint.assignmentModification.toBeModified=L'affectation de {0} (relation {1}) doit être modifiée -DefaultPolicyConstraint.assignmentModification.wasModified=L'affectation de {0} (relation {1}) a été modifiée +DefaultPolicyConstraint.assignmentModification.toBeAdded=L'attribution de {0} (relation {1}) doit être ajoutée +DefaultPolicyConstraint.assignmentModification.wasAdded=L'attribution de {0} (relation {1}) a été ajoutée +DefaultPolicyConstraint.assignmentModification.toBeDeleted=L'attribution de {0} (relation {1}) doit être effacée +DefaultPolicyConstraint.assignmentModification.wasDeleted=L'attribution de {0} (relation {1}) a été supprimée +DefaultPolicyConstraint.assignmentModification.toBeModified=L'attribution de {0} (relation {1}) doit être modifiée +DefaultPolicyConstraint.assignmentModification.wasModified=L'attribution de {0} (relation {1}) a été modifiée DefaultPolicyConstraint.objectModification.toBeAdded={0} doit être ajouté(e) DefaultPolicyConstraint.objectModification.wasAdded={0} a été ajouté(e) DefaultPolicyConstraint.objectModification.toBeDeleted={0} doit être supprimé(e) @@ -889,14 +892,14 @@ PolicyConstraints.before=avant l'opération PolicyConstraints.after=après l'opération DefaultPolicyConstraint.objectState.unnamed=L'état de l'objet {0} correspond à la contrainte DefaultPolicyConstraint.objectState.named=L'état de l'objet {0} correspond à la contrainte « {1} » -DefaultPolicyConstraint.objectState.namedWithPath=L'état de l'objet {0} correspond à la contrainte « {1} » dans le chemin d'affectation {2} +DefaultPolicyConstraint.objectState.namedWithPath=L'état de l'objet {0} correspond à la contrainte « {1} » dans le chemin d'attribution {2} # {0} = before/after, {1} target/path, {2} rule name -DefaultPolicyConstraint.assignmentState.unnamed=L'état d'affectation {0} correspond à la contrainte ({1}) -DefaultPolicyConstraint.assignmentState.named=L'état d'affectation {0} correspond à la contrainte « {1} » ({2}) +DefaultPolicyConstraint.assignmentState.unnamed=L'état d'attribution {0} correspond à la contrainte ({1}) +DefaultPolicyConstraint.assignmentState.named=L'état d'attribution {0} correspond à la contrainte « {1} » ({2}) DefaultPolicyConstraint.exclusion=Violation of SoD policy: {0} excludes {1}, they cannot be assigned at the same time -DefaultPolicyConstraint.hasAssignment=L'affectation existe pour {0} ({1}) +DefaultPolicyConstraint.hasAssignment=L'attribution existe pour {0} ({1}) # {0} = type name, {1} = OID, {2} = before/after. TODO do something with the OID -DefaultPolicyConstraint.hasNoAssignment=Aucune affectation n'existe pour {0} {1} ({2}) +DefaultPolicyConstraint.hasNoAssignment=Aucune attribution n'existe pour {0} {1} ({2}) DefaultPolicyConstraint.multiplicityConstraint.min.object={0} nécessite au moins {1} attributaire(s) avec la relation « {2} » DefaultPolicyConstraint.multiplicityConstraint.max.object={0} nécessite au plus {1} attributaire(s) avec la relation « {2} » DefaultPolicyConstraint.multiplicityConstraint.min.target={0} nécessite au moins {1} attributaire(s) avec la relation « {2} ». L'opération entraînerait {3} attributaire(s). @@ -918,7 +921,7 @@ Credentials.securityQuestions=questions de sécurité ValuePolicy.minAgeNotReached=L'âge minimum n'a pas encore été atteint. ValuePolicy.valueRecentlyUsed=La valeur a été utilisée récemment. ValuePolicy.valueMustBePresent=La valeur doit être présente. -ValuePolicy.valuesMustBePresent=Au moins {0} valeurs doi(ven)t être présente(s). Nombre actuel de valeur: {1}. +ValuePolicy.valuesMustBePresent=Au moins {0} valeurs doi(ven)t être présente(s). Nombre actuel de valeur : {1}. ValuePolicy.minimalSizeNotMet=La taille minimale ({0}) n'est pas atteinte (longueur réelle: {1}). ValuePolicy.maximalSizeExceeded=La taille maximale ({0}) a été dépassée (longueur réelle: {1}). ValuePolicy.minimalUniqueCharactersNotMet=Le nombre minimal de caractères uniques ({0}) n'est pas atteint (caractères uniques: {1}). @@ -942,7 +945,7 @@ DataProtectionType.automatedDecisionMakingDescription=Prise de décision automat DataProtectionType.securityMeasuresDescription=Mesures de sécurité DataProtectionType.dataErasureDescription=Description de l'effacement des données PolicyRuleEvaluationTargetType.OBJECT=Objet -PolicyRuleEvaluationTargetType.ASSIGNMENT=Affectation +PolicyRuleEvaluationTargetType.ASSIGNMENT=Attribution PolicyRuleType.name=Nom PolicyRuleType.name.help=Nom abrégé de la règle de politique. Il est utilisé pour identifier la règle dans l'interface utilisateur, les fichiers journaux, etc. PolicyRuleType.description=Description @@ -963,7 +966,7 @@ AbstractPolicyConstraintType.presentation=Présentation AbstractPolicyConstraintType.presentation.help=Comment le déclenchement de cette contrainte devrait être présentée, par exemple dans les messages de mise en application, les validations, la certification, les notifications, etc. PolicyConstraintsType.objectState=État de l'objet PolicyConstraintsType.objectState.help=Contrainte relative à un certain état de l'objet. -PolicyConstraintsType.assignmentState=État d'affectation +PolicyConstraintsType.assignmentState=État d'attribution PolicyConstraintsType.assignmentState.help=Contrainte relative à un certain état d'une attribution PolicyConstraintsType.hasAssignment=A une attribution PolicyConstraintsType.hasAssignment.help=Contrainte exigeant une certaine attribution. @@ -981,7 +984,7 @@ PolicyConstraintsType.assignment=Attribution PolicyConstraintsType.assignment.help=Contrainte déclenchée lorsqu'un objet est attribué ou que l'attribution est retirée ou modifiée. PolicyConstraintsType.objectTimeValidity=Object time validity PolicyConstraintsType.objectTimeValidity.help=Une contrainte qui se déclenche lorsque la validité d'un objet ou n'importe lequel de ses éléments asservis au temps (p.e. un mot de passe) est sur le point d'expirer. -PolicyConstraintsType.assignmentTimeValidity=Validité du temps d'affectation +PolicyConstraintsType.assignmentTimeValidity=Validité du temps d'attribution PolicyConstraintsType.assignmentTimeValidity.help=Une contrainte qui se déclenche lorsque la validité d'une attribution ou n'importe lequel de ses éléments asservis au temps (p.e. un mot de passe) est sur le point d'expirer. PolicyConstraintsType.situation=Situation de politique PolicyConstraintsType.situation.help=Occurrence de la situation de politique au sein d'un objet ou d'une attribution. @@ -1046,12 +1049,12 @@ PolicyConstraintPresentationType.hidden.help=Si mis à Vrai, ce déclencheur ser PolicyConstraintPresentationType.displayOrder=Ordre d'affichage PolicyConstraintPresentationType.displayOrder.help=Nombre ordinal qui détermine l'ordre d'affichage des messages. -DefaultPolicyConstraint.Short.assignmentModification.toBeAdded=Affectation de {0} à {1} +DefaultPolicyConstraint.Short.assignmentModification.toBeAdded=Attribution de {0} à {1} DefaultPolicyConstraint.Short.assignmentModification.wasAdded=Affecté {0} à {1} -DefaultPolicyConstraint.Short.assignmentModification.toBeDeleted=Désattribution de {0} à partir de {1} +DefaultPolicyConstraint.Short.assignmentModification.toBeDeleted=Retrait de l'attribution {0} de {1} DefaultPolicyConstraint.Short.assignmentModification.wasDeleted=Désattribué de {0} à partir de {1} -DefaultPolicyConstraint.Short.assignmentModification.toBeModified=Modification de l'affectation de {0} sur {1} -DefaultPolicyConstraint.Short.assignmentModification.wasModified=Affectation modifiée de {0} sur {1} +DefaultPolicyConstraint.Short.assignmentModification.toBeModified=Modification de l'attribution de {0} sur {1} +DefaultPolicyConstraint.Short.assignmentModification.wasModified=Attribution modifiée de {0} sur {1} DefaultPolicyConstraint.Short.objectModification.toBeAdded=Ajout de {0} DefaultPolicyConstraint.Short.objectModification.wasAdded={0} ajouté(e) DefaultPolicyConstraint.Short.objectModification.toBeDeleted=Suppression de {0} @@ -1061,11 +1064,11 @@ DefaultPolicyConstraint.Short.objectModification.wasModified={0} modifié(e) DefaultPolicyConstraint.Short.objectState.unnamed=État d'appariement : {0} DefaultPolicyConstraint.Short.objectState.named=État d'appariement : {0} (« {1} ») # {0} = before/after, {1} target/path, {2} rule name -DefaultPolicyConstraint.Short.assignmentState.unnamed=État correspondant : affectation de {1} ({0}) -DefaultPolicyConstraint.Short.assignmentState.named=État correspondant : affectation de {1} ({0}) (« {2} ») +DefaultPolicyConstraint.Short.assignmentState.unnamed=État correspondant : attribution de {1} ({0}) +DefaultPolicyConstraint.Short.assignmentState.named=État correspondant : attribution de {1} ({0}) (« {2} ») DefaultPolicyConstraint.Short.exclusion={0} exclut {1} -DefaultPolicyConstraint.Short.hasAssignment=L'affectation existe pour {0} ({1}) -DefaultPolicyConstraint.Short.hasNoAssignment=Aucune affectation n'existe pour {0} {1} ({2}) +DefaultPolicyConstraint.Short.hasAssignment=L'attribution existe pour {0} ({1}) +DefaultPolicyConstraint.Short.hasNoAssignment=Aucune attribution n'existe pour {0} {1} ({2}) DefaultPolicyConstraint.Short.multiplicityConstraint.min.object={0} nécessite au moins {1} attributaire(s) (« {2} ») DefaultPolicyConstraint.Short.multiplicityConstraint.max.object={0} nécessite au plus {1} attributaire(s) (« {2} ») DefaultPolicyConstraint.Short.multiplicityConstraint.min.target={0} nécessite au moins {1} attributaire(s) (« {2} ») @@ -1130,7 +1133,7 @@ relation.meta=méta relation.deputy=adjoint relation.approver=validateur relation.owner=propriétaire -relation.consent=consent +relation.consent=consentement AbstractCredentialType.forceChange=Changement obligatoire à la prochaine connexion PasswordType.value=Valeur AdminGuiConfigurationType.enableExperimentalFeature=Activer les fonctionnalités expérimentales de l'interface graphique @@ -1189,14 +1192,14 @@ PendingOperationExecutionStatusType.COMPLETED=Terminé PendingOperationTypeType.MANUAL=Manuel PendingOperationTypeType.RETRY=Réessayer UserType.roleMembershipRef=Role Membership -ObjectType.default=Défaut +ObjectType.default=Par défaut ObjectType.manager=Responsable ObjectType.meta=Méta ObjectType.deputy=Adjoint ObjectType.approver=Validateur ObjectType.owner=Propriétaire -ObjectType.consent=Consent -ObjectType.any=N'importe quel +ObjectType.consent=Consentement +ObjectType.any=N'importe lequel SearchBoxScopeType.ONE_LEVEL=Un niveau SearchBoxScopeType.SUBTREE=Sous-arbre Channel.LIVE_SYNC=Synchronisation en direct diff --git a/infra/schema/src/main/resources/localization/schema_hu.properties b/infra/schema/src/main/resources/localization/schema_hu.properties index 4bc51ed938a..aa730ea241e 100644 --- a/infra/schema/src/main/resources/localization/schema_hu.properties +++ b/infra/schema/src/main/resources/localization/schema_hu.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=Név FileConfigurationType.file=Fájl FullTextSearchConfigurationType.enabled=Engedélyezett FullTextSearchConfigurationType.indexed=Indexelt +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=Object type +FullTextSearchIndexedItemsConfigurationType.item=Elem FocusType.activation=Aktiválás FocusType.assignment=Assignments FocusType.inducement=Inducements diff --git a/infra/schema/src/main/resources/localization/schema_it.properties b/infra/schema/src/main/resources/localization/schema_it.properties index 04a65740d18..72c529308e3 100644 --- a/infra/schema/src/main/resources/localization/schema_it.properties +++ b/infra/schema/src/main/resources/localization/schema_it.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=Nome FileConfigurationType.file=File FullTextSearchConfigurationType.enabled=Abilitato FullTextSearchConfigurationType.indexed=Indicizzato +FullTextSearchIndexedItemsConfigurationType.details=Ricerca con testo completo di articoli indicizzati +FullTextSearchIndexedItemsConfigurationType.objectType=Tipo dell'oggetto +FullTextSearchIndexedItemsConfigurationType.item=Oggetto FocusType.activation=Attivazione FocusType.assignment=Assegnazioni FocusType.inducement=Inducements diff --git a/infra/schema/src/main/resources/localization/schema_ja.properties b/infra/schema/src/main/resources/localization/schema_ja.properties index f41d4df73d6..8ab0e2b16c7 100644 --- a/infra/schema/src/main/resources/localization/schema_ja.properties +++ b/infra/schema/src/main/resources/localization/schema_ja.properties @@ -86,7 +86,7 @@ ApprovalStageDefinitionType.additionalInformation=追加情報 ApprovalStageDefinitionType.automaticallyApproved=自動的に承認された ApprovalStageDefinitionType.automaticallyCompleted=自動的に完了された ApprovalStageDefinitionType.duration=期間 -ApprovalStageDefinitionType.timedActions=Timed actions +ApprovalStageDefinitionType.timedActions=時限式アクション AreaCategoryType.ADMINISTRATION=管理 AreaCategoryType.ORGANIZATION=組織 AreaCategoryType.GOVERNANCE=ガバナンス @@ -132,7 +132,7 @@ AuditEventStageType.REQUEST=リクエスト AuditEventType.ADD_OBJECT=オブジェクトの追加 AuditEventType.CREATE_SESSION=セッションの生成 AuditEventType.DELETE_OBJECT=オブジェクトの削除 -AuditEventType.EXECUTE_CHANGES_RAW=Execute changes raw +AuditEventType.EXECUTE_CHANGES_RAW=raw変更の実行 AuditEventType.GET_OBJECT=オブジェクトの取得 AuditEventType.MODIFY_OBJECT=オブジェクトの更新 AuditEventType.null=すべて @@ -142,7 +142,7 @@ AuditEventType.TERMINATE_SESSION=セッションの終了 AuditEventTypeType.ADD_OBJECT=オブジェクトの追加 AuditEventTypeType.CREATE_SESSION=セッションの生成 AuditEventTypeType.DELETE_OBJECT=オブジェクトの削除 -AuditEventTypeType.EXECUTE_CHANGES_RAW=Execute changes raw +AuditEventTypeType.EXECUTE_CHANGES_RAW=raw変更の実行 AuditEventTypeType.GET_OBJECT=オブジェクトの取得 AuditEventTypeType.MODIFY_OBJECT=オブジェクトの更新 AuditEventTypeType.null=すべて @@ -275,6 +275,9 @@ FileConfigurationType.name=名前 FileConfigurationType.file=ファイル FullTextSearchConfigurationType.enabled=有効 FullTextSearchConfigurationType.indexed=インデックス済み +FullTextSearchIndexedItemsConfigurationType.details=全文検索のインデックス項目 +FullTextSearchIndexedItemsConfigurationType.objectType=オブジェクトタイプ +FullTextSearchIndexedItemsConfigurationType.item=アイテム FocusType.activation=アクティベーション FocusType.assignment=アサイン FocusType.inducement=インデュースメント @@ -675,7 +678,7 @@ SyslogAppenderConfigurationType.port=ポート SyslogAppenderConfigurationType.facility=Facility SyslogAppenderConfigurationType.suffixPattern=接尾語パターン SyslogAppenderConfigurationType.stackTracePattern=スタックトレース・パターン -SyslogAppenderConfigurationType.throwableExcluded=Throwable excluded +SyslogAppenderConfigurationType.throwableExcluded=Throwableを除外する ThreadStopActionType.CLOSE=閉じる ThreadStopActionType.RESCHEDULE=リスケジュール ThreadStopActionType.RESTART=リスタート @@ -823,7 +826,7 @@ ResourceValidator.wrongItemName=”{0}”のスキーマ・ハンドリングで ResourceValidator.noItemNamespace=”{0}”のスキーマ・ハンドリングで属性またはアソシエーション”{1}”への名前空間がありません。 ResourceValidator.missingAssociationTargetKind=”{0}”のスキーマ・ハンドリングでアソシエーション”{1}”の"対象種別"プロパティが見つかりません。 ResourceValidator.missingAssociationTargetIntent=”{0}”のスキーマ・ハンドリングでアソシエーション”{1}”の"対象用途"プロパティが見つかりません。 -ResourceValidator.missingAssociationDirection=”{0}”のスキーマ・ハンドリングでアソシエーション”{1}”の"方針"プロパティが見つかりません。 +ResourceValidator.missingAssociationDirection=”{0}”のスキーマ・ハンドリングでアソシエーション”{1}”の"方向"プロパティが見つかりません。 ResourceValidator.missingAssociationAssociationAttribute=”{0}”のスキーマ・ハンドリングでアソシエーション”{1}”の"アソシエーション属性"プロパティが見つかりません。 ResourceValidator.missingAssociationValueAttribute=”{0}”のスキーマ・ハンドリングでアソシエーション”{1}”の"値属性"プロパティが見つかりません。 ResourceValidator.wrongMatchingRule="{0}"のスキーマ・ハンドリングで属性"{1}"の誤った一致ルール:{2} @@ -1118,7 +1121,7 @@ ResourceObjectAssociationType.ref=参照 ResourceObjectAssociationType.auxiliaryObjectClass=補助オブジェクトクラス ResourceObjectAssociationType.kind=種類 ResourceObjectAssociationType.intent=用途 -ResourceObjectAssociationType.direction=方針 +ResourceObjectAssociationType.direction=方向 ResourceObjectAssociationType.associationAttribute=アソシエーション属性 ResourceObjectAssociationType.valueAttribute=値属性 ResourceObjectAssociationType.shortcutAssociationAttribute=アソシエーション属性のショートカット diff --git a/infra/schema/src/main/resources/localization/schema_lt.properties b/infra/schema/src/main/resources/localization/schema_lt.properties index e4c913a03d8..c84af4ed660 100644 --- a/infra/schema/src/main/resources/localization/schema_lt.properties +++ b/infra/schema/src/main/resources/localization/schema_lt.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=Pavadinimas FileConfigurationType.file=Failas FullTextSearchConfigurationType.enabled=Įjungtas FullTextSearchConfigurationType.indexed=Indeksuotas +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=Objekto tipas +FullTextSearchIndexedItemsConfigurationType.item=Elementas FocusType.activation=Aktyvacija FocusType.assignment=Priskyrimai FocusType.inducement=Poveikiai diff --git a/infra/schema/src/main/resources/localization/schema_pl.properties b/infra/schema/src/main/resources/localization/schema_pl.properties index 40786ff04eb..96821b8acae 100644 --- a/infra/schema/src/main/resources/localization/schema_pl.properties +++ b/infra/schema/src/main/resources/localization/schema_pl.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=Nazwa FileConfigurationType.file=Plik FullTextSearchConfigurationType.enabled=Aktywny FullTextSearchConfigurationType.indexed=Indesowany +FullTextSearchIndexedItemsConfigurationType.details=Pełnotekstowe wyszukiwanie indeksowanych pozycji +FullTextSearchIndexedItemsConfigurationType.objectType=Typ obiektu +FullTextSearchIndexedItemsConfigurationType.item=Pozycja FocusType.activation=Aktywacja FocusType.assignment=Przypisania FocusType.inducement=Dziedziczenia diff --git a/infra/schema/src/main/resources/localization/schema_pt_BR.properties b/infra/schema/src/main/resources/localization/schema_pt_BR.properties index ce3079cdba0..5848900e152 100644 --- a/infra/schema/src/main/resources/localization/schema_pt_BR.properties +++ b/infra/schema/src/main/resources/localization/schema_pt_BR.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=Nome FileConfigurationType.file=Arquivo FullTextSearchConfigurationType.enabled=Habilitado FullTextSearchConfigurationType.indexed=Indexed +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=Tipo de objeto +FullTextSearchIndexedItemsConfigurationType.item=Item FocusType.activation=Ativação FocusType.assignment=Atribuicoes FocusType.inducement=Induzimentos diff --git a/infra/schema/src/main/resources/localization/schema_ru.properties b/infra/schema/src/main/resources/localization/schema_ru.properties index f9105786bbb..ca07bf79623 100644 --- a/infra/schema/src/main/resources/localization/schema_ru.properties +++ b/infra/schema/src/main/resources/localization/schema_ru.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=Название FileConfigurationType.file=Файл FullTextSearchConfigurationType.enabled=Доступные FullTextSearchConfigurationType.indexed=Indexed +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=Тип объекта +FullTextSearchIndexedItemsConfigurationType.item=Элемент FocusType.activation=Активация FocusType.assignment=Назначения FocusType.inducement=Инициирующие факторы diff --git a/infra/schema/src/main/resources/localization/schema_sk.properties b/infra/schema/src/main/resources/localization/schema_sk.properties index dab079ace60..0a3eab47629 100644 --- a/infra/schema/src/main/resources/localization/schema_sk.properties +++ b/infra/schema/src/main/resources/localization/schema_sk.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=Názov FileConfigurationType.file=Súbor FullTextSearchConfigurationType.enabled=Povolený FullTextSearchConfigurationType.indexed=Indexed +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=Typy objektu +FullTextSearchIndexedItemsConfigurationType.item=Položka FocusType.activation=Aktivácia FocusType.assignment=Priradenia FocusType.inducement=Stimuly diff --git a/infra/schema/src/main/resources/localization/schema_tr.properties b/infra/schema/src/main/resources/localization/schema_tr.properties index 476ab7b7624..dcbcbbfaeb7 100644 --- a/infra/schema/src/main/resources/localization/schema_tr.properties +++ b/infra/schema/src/main/resources/localization/schema_tr.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=İsim FileConfigurationType.file=Dosya FullTextSearchConfigurationType.enabled=Etkin FullTextSearchConfigurationType.indexed=Indexed +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=Nesne tipi +FullTextSearchIndexedItemsConfigurationType.item=Öğe FocusType.activation=Aktivasyon FocusType.assignment=Atamalar FocusType.inducement=Yönlendirmeler diff --git a/infra/schema/src/main/resources/localization/schema_zh_CN.properties b/infra/schema/src/main/resources/localization/schema_zh_CN.properties index 26d005b8154..c9aa1499551 100644 --- a/infra/schema/src/main/resources/localization/schema_zh_CN.properties +++ b/infra/schema/src/main/resources/localization/schema_zh_CN.properties @@ -275,6 +275,9 @@ FileConfigurationType.name=名称 FileConfigurationType.file=文件 FullTextSearchConfigurationType.enabled=已启用 FullTextSearchConfigurationType.indexed=Indexed +FullTextSearchIndexedItemsConfigurationType.details=Full text search indexed items +FullTextSearchIndexedItemsConfigurationType.objectType=对象类型 +FullTextSearchIndexedItemsConfigurationType.item=项 FocusType.activation=激活 FocusType.assignment=分配 FocusType.inducement=间接分配 diff --git a/infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd b/infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd index f97bbfbaa28..ce6e6468386 100755 --- a/infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd +++ b/infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd @@ -14977,6 +14977,8 @@ 3.6 + + FullTextSearchIndexedItemsConfigurationType.details @@ -14986,6 +14988,9 @@ To what object type(s) should this entry be applied. Empty list means "all object types". + + FullTextSearchIndexedItemsConfigurationType.objectType + @@ -14993,6 +14998,9 @@ What items to index for the given object type(s). + + FullTextSearchIndexedItemsConfigurationType.item + @@ -20796,9 +20804,17 @@ - Symbolic name for this view. It is not really used by the GUI code. It is mostly used for - diagnostics, logging and so on. It may be later used to detect whether a particular view is overriden, - e.g. if view defined in system configuraiton is overridden in the role. +

+ Symbolic name for this view. It is not really used by the GUI code. It is mostly used for + diagnostics, logging and so on. It may be later used to detect whether a particular view is overriden, + e.g. if view defined in system configuraiton is overridden in the role. +

+

+ If no name is specified for a view then midPoint will internally generate a name. This internal name + is based on object type and/or collection OID or other aspects of the view. The algorithm for name + generation may change and the results are not guaranteed to be completely unique. Therefore it is + strongly recommended to explictly name all the views in any non-trivial midPoint configuration. +

3.9 @@ -20816,7 +20832,7 @@
- + Specification of an explicit or implicit object collection that will be used to select objects in this view. diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestDeltaConverter.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestDeltaConverter.java index a1d7cffffc3..9dcb637def9 100644 --- a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestDeltaConverter.java +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestDeltaConverter.java @@ -24,6 +24,7 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.prism.polystring.PolyString; import com.evolveum.midpoint.prism.util.PrismAsserts; @@ -113,7 +114,7 @@ public void testPasswordChange() throws Exception { PrismProperty protectedStringProperty = user.findProperty(CREDENTIALS_PASSWORD_VALUE_PATH); PrismPropertyValue protectedStringPropertyValue = protectedStringProperty.getValue(); - assertTrue("protectedString not equivalent", protectedStringPropertyValue.equalsRealValue(protectedStringVal)); + assertTrue("protectedString not equivalent", protectedStringPropertyValue.equals(protectedStringVal, EquivalenceStrategy.REAL_VALUE)); objectDelta.assertDefinitions(); } @@ -338,7 +339,7 @@ public void testTaskExtensionDeleteDelta() throws Exception { PrismObject newTask = PrismTestUtil.parseObject( new File(TEST_DIR, "task-new.xml")); - ObjectDelta delta = oldTask.diff(newTask, true, true); + ObjectDelta delta = oldTask.diff(newTask, EquivalenceStrategy.LITERAL_IGNORE_METADATA); System.out.println("Delta:"); System.out.println(delta.debugDump()); diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestDiffEquals.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestDiffEquals.java index f88b9175e82..d7568dee6df 100644 --- a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestDiffEquals.java +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestDiffEquals.java @@ -19,6 +19,7 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.ChangeType; import com.evolveum.midpoint.prism.delta.ObjectDelta; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.util.PrismAsserts; import com.evolveum.midpoint.prism.util.PrismTestUtil; import com.evolveum.midpoint.prism.xml.XmlTypeConverter; @@ -506,7 +507,7 @@ public void diffRoles() throws Exception { PrismObject role1 = PrismTestUtil.parseObject(ROLE_1); PrismObject role2 = PrismTestUtil.parseObject(ROLE_2); - ObjectDelta delta = role1.diff(role2, true, true); + ObjectDelta delta = role1.diff(role2, EquivalenceStrategy.LITERAL_IGNORE_METADATA); assertFalse(delta.isEmpty()); } @@ -538,9 +539,9 @@ public void testDiffWithMetadata() { .end() .asPrismObject(); - ObjectDelta diffIgnoreMetadataNotLiteral = user1.diff(user2, true, false); - ObjectDelta diffWithMetadataAndLiteral = user1.diff(user2, false, true); - ObjectDelta diffWithMetadataNotLiteral = user1.diff(user2, false, false); + ObjectDelta diffIgnoreMetadataNotLiteral = user1.diff(user2, EquivalenceStrategy.IGNORE_METADATA); + ObjectDelta diffWithMetadataAndLiteral = user1.diff(user2, EquivalenceStrategy.LITERAL); + ObjectDelta diffWithMetadataNotLiteral = user1.diff(user2, EquivalenceStrategy.NOT_LITERAL); assertTrue("Diff ignoring metadata is not empty:\n" + diffIgnoreMetadataNotLiteral.debugDump(), diffIgnoreMetadataNotLiteral.isEmpty()); diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestExport.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestExport.java index f61bdb54112..f9ad158b3d9 100644 --- a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestExport.java +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestExport.java @@ -98,16 +98,16 @@ public void testExportShadow() throws Exception { Item intAttributeReparsed = shadowReparsed.findItem(ItemPath.create(ShadowType.F_ATTRIBUTES, INT_ATTRIBUTE_NAME)); assertNotNull(intAttributeReparsed); - assertFalse(intAttributeReparsed.getValue(0).isRaw()); + assertFalse(intAttributeReparsed.getAnyValue().isRaw()); Item stringAttributeReparsed = shadowReparsed.findItem(ItemPath.create(ShadowType.F_ATTRIBUTES, STRING_ATTRIBUTE_NAME)); assertNotNull(stringAttributeReparsed); - assertFalse(stringAttributeReparsed.getValue(0).isRaw()); + assertFalse(stringAttributeReparsed.getAnyValue().isRaw()); Item longExtensionReparsed = shadowReparsed.findItem(ItemPath.create(ShadowType.F_EXTENSION, SchemaTestConstants.EXTENSION_LONG_TYPE_ELEMENT)); assertNotNull(longExtensionReparsed); - assertFalse(longExtensionReparsed.getValue(0).isRaw()); + assertFalse(longExtensionReparsed.getAnyValue().isRaw()); Item doubleExtensionReparsed = shadowReparsed.findItem(ItemPath.create(ShadowType.F_EXTENSION, SchemaTestConstants.EXTENSION_DOUBLE_TYPE_ELEMENT)); assertNotNull(doubleExtensionReparsed); - assertFalse(doubleExtensionReparsed.getValue(0).isRaw()); + assertFalse(doubleExtensionReparsed.getAnyValue().isRaw()); } } diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestJaxbConstruction.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestJaxbConstruction.java index 2d13dfa319c..80df827a5aa 100644 --- a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestJaxbConstruction.java +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestJaxbConstruction.java @@ -155,7 +155,7 @@ public void testUserConstruction() throws JAXBException, SchemaException { PrismReference accountRef = user.findReference(UserType.F_LINK_REF); assertEquals("1/ Wrong accountRef values", 1, accountRef.getValues().size()); - PrismReferenceValue accountRefVal0 = accountRef.getValue(0); + PrismReferenceValue accountRefVal0 = accountRef.getAnyValue(); SearchFilterType prismFilter = accountRefVal0.getFilter(); assertNotNull("Filter have not passed", prismFilter); //assertTrue("Bad filter in reference", prismFilter instanceof EqualsFilter); @@ -255,7 +255,7 @@ public void testUserConstructionBeforeAdopt() throws Exception { assertEquals("Wrong accountRef values", 2, accountRef.getValues().size()); PrismAsserts.assertReferenceValues(accountRef, USER_ACCOUNT_REF_1_OID, USER_ACCOUNT_REF_2_OID); - PrismReferenceValue accountRefVal0 = accountRef.getValue(0); + PrismReferenceValue accountRefVal0 = accountRef.getAnyValue(); SearchFilterType prismFilter = accountRefVal0.getFilter(); assertNotNull("Filter have not passed", prismFilter); // assertTrue("Wrong filter in reference " , prismFilter instanceof EqualsFilter); diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestJaxbSanity.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestJaxbSanity.java index d8ca44b7b26..4d2f2d7939f 100644 --- a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestJaxbSanity.java +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestJaxbSanity.java @@ -29,6 +29,7 @@ import javax.xml.bind.JAXBException; import com.evolveum.midpoint.prism.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.impl.util.JaxbTestUtil; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; @@ -159,8 +160,8 @@ public void testUnmarshallAndEqualsUserPrism() throws Exception { PrismContainerValue as2ContVal = as2Type.asPrismContainerValue(); PrismContainer as2Cont = as2ContVal.getContainer(); assertTrue("Assignment not equals (ContainerValue)", as1ContVal.equals(as2ContVal)); - assertTrue("Assignment not equals (ContainerValue, ignoreMetadata)", as1ContVal.equals(as2ContVal,true)); - assertTrue("Assignment not equals (ContainerValue, not ignoreMetadata)", as1ContVal.equals(as2ContVal,false)); + assertTrue("Assignment not equals (ContainerValue, ignoreMetadata)", as1ContVal.equals(as2ContVal, EquivalenceStrategy.IGNORE_METADATA)); + assertTrue("Assignment not equals (ContainerValue, not ignoreMetadata)", as1ContVal.equals(as2ContVal, EquivalenceStrategy.NOT_LITERAL)); assertTrue("Assignment not equivalent (ContainerValue)", as1ContVal.equivalent(as2ContVal)); assertTrue("Assignment not equals (Container)", as1Cont.equals(as2Cont)); assertTrue("Assignment not equivalent (Container)", as1Cont.equivalent(as2Cont)); @@ -267,7 +268,7 @@ public void testUnmarshallAndEqualsResource() throws JAXBException, SchemaExcept PrismPropertyValue pv1 = getPrismContext().itemFactory().createPropertyValue(resource1Type.getConnectorConfiguration()); PrismPropertyValue pv2 = getPrismContext().itemFactory().createPropertyValue(resource2Type.getConnectorConfiguration()); - assertTrue("Real property values not equal",pv1.equalsRealValue(pv2)); + assertTrue("Real property values not equal",pv1.equals(pv2, EquivalenceStrategy.REAL_VALUE)); } @Test diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestParseDiffPatch.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestParseDiffPatch.java index 344c36a3b5b..8e2bf49ba37 100644 --- a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestParseDiffPatch.java +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestParseDiffPatch.java @@ -28,6 +28,7 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.prism.path.ItemName; import com.evolveum.midpoint.prism.polystring.PolyString; @@ -495,7 +496,7 @@ public void testResourceConstLiteral() throws Exception { // WHEN - ObjectDelta resourceDelta = resourceBefore.diff(resourceAfter, true, true); + ObjectDelta resourceDelta = resourceBefore.diff(resourceAfter, EquivalenceStrategy.LITERAL_IGNORE_METADATA); // THEN @@ -642,14 +643,14 @@ public void testResourceNsChange() throws SchemaException, SAXException, IOExcep public void testResourceNsChangeLiteral() throws SchemaException, SAXException, IOException, JAXBException { System.out.println("===[ testResourceNsChangeLiteral ]==="); - PrismObject resourceBefore = PrismTestUtil.parseObject(new File(TEST_DIR, "resource-before.xml")); - PrismObject resourceAfter = PrismTestUtil.parseObject(new File(TEST_DIR, "resource-after-ns-change.xml")); + PrismObject resourceBefore = PrismTestUtil.parseObject(RESOURCE_BEFORE_FILE); + PrismObject resourceAfter = PrismTestUtil.parseObject(RESOURCE_AFTER_NS_CHANGE_FILE); resourceBefore.checkConsistence(); resourceAfter.checkConsistence(); // WHEN - ObjectDelta resourceDelta = resourceBefore.diff(resourceAfter, true, true); + ObjectDelta resourceDelta = resourceBefore.diff(resourceAfter, EquivalenceStrategy.LITERAL_IGNORE_METADATA); // THEN @@ -680,7 +681,7 @@ public void testResourceNsFixUndeclaredPrefixes() throws SchemaException, SAXExc // WHEN String xmlBroken = getPrismContext().serializeObjectToString(resourceBroken, PrismContext.LANG_XML); - ObjectDelta resourceDelta = resourceBroken.diff(resourceFixed, true, true); + ObjectDelta resourceDelta = resourceBroken.diff(resourceFixed, EquivalenceStrategy.LITERAL_IGNORE_METADATA); // THEN @@ -922,7 +923,7 @@ public void testReplaceModelOperationContext() throws Exception { PrismObject changed = prismObject.clone(); ItemDeltaCollectionsUtil.applyTo(delta.getModifications(), changed); - Collection processedModifications = prismObject.diffModifications(changed, true, true); + Collection processedModifications = prismObject.diffModifications(changed, EquivalenceStrategy.LITERAL_IGNORE_METADATA); ItemDeltaCollectionsUtil.applyTo(processedModifications, prismObject); @@ -934,7 +935,7 @@ public void testDiffSameValues() throws Exception { PrismObject before = PrismTestUtil.parseObject(new File(TEST_DIR, "resource-white-before.xml")); PrismObject after = PrismTestUtil.parseObject(new File(TEST_DIR, "resource-white-after.xml")); - Collection differences = before.diffModifications(after, true, true); + Collection differences = before.diffModifications(after, EquivalenceStrategy.LITERAL_IGNORE_METADATA); assertEquals(1, differences.size()); System.out.println(differences.iterator().next().debugDump()); diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestParseLookupTable.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestParseLookupTable.java index 35e0129ee82..7aba7668b91 100644 --- a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestParseLookupTable.java +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestParseLookupTable.java @@ -86,12 +86,12 @@ private void assertTable(PrismObject table) { assertPropertyDefinition(table, "description", DOMUtil.XSD_STRING, 0, 1); PrismContainer tableContainer = table.findContainer(LookupTableType.F_ROW); assertEquals("wrong number of rows", 2, tableContainer.size()); - assertRow(tableContainer.getValue(0), + assertRow(tableContainer.getValues().get(0), "first key", "first value", PrismTestUtil.createPolyStringType("first label"), XmlTypeConverter.createXMLGregorianCalendar("2013-05-07T10:38:21.350+02:00")); - assertRow(tableContainer.getValue(1), + assertRow(tableContainer.getValues().get(1), "2 key", "2 value", PrismTestUtil.createPolyStringType("second ľábeľ", "second label"), diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestSchemaDelta.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestSchemaDelta.java index 23dae2222e3..9a47c3fb050 100644 --- a/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestSchemaDelta.java +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/TestSchemaDelta.java @@ -19,6 +19,7 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.schema.constants.SchemaConstants; import com.evolveum.midpoint.schema.util.ObjectTypeUtil; @@ -46,21 +47,18 @@ public class TestSchemaDelta extends AbstractSchemaTest { @Test - public void testAssignmentSameNullIdApplyToObject() throws Exception { - final String TEST_NAME = "testAssignmentSameNullIdApplyToObject"; + public void testAssignmentNullIdApplyToObject() throws Exception { + final String TEST_NAME = "testAssignmentNullIdApplyToObject"; displayTestTile(TEST_NAME); // GIVEN PrismObject user = PrismTestUtil.parseObject(USER_JACK_FILE); - //Delta - PrismContainerValue assignmentValue = getPrismContext().itemFactory().createContainerValue(); - // The value id is null - assignmentValue.setPropertyRealValue(AssignmentType.F_DESCRIPTION, "jamalalicha patlama paprtala", getPrismContext()); - - ObjectDelta userDelta = getPrismContext().deltaFactory().object() - .createModificationAddContainer(UserType.class, USER_JACK_OID, - UserType.F_ASSIGNMENT, assignmentValue); + AssignmentType a = new AssignmentType(getPrismContext()) // The value id is null + .description("jamalalicha patlama paprtala"); + ObjectDelta userDelta = getPrismContext().deltaFor(UserType.class) + .item(UserType.F_ASSIGNMENT).add(a) + .asObjectDeltaCast(USER_JACK_OID); // WHEN userDelta.applyTo(user); @@ -76,21 +74,18 @@ public void testAssignmentSameNullIdApplyToObject() throws Exception { } @Test - public void testAddInducementConstructionSameNullIdApplyToObject() throws Exception { - final String TEST_NAME = "testAddInducementConstructionSameNullIdApplyToObject"; + public void testAddInducementNullIdApplyToObject() throws Exception { + final String TEST_NAME = "testAddInducementNullIdApplyToObject"; displayTestTile(TEST_NAME); // GIVEN PrismObject role = PrismTestUtil.parseObject(ROLE_CONSTRUCTION_FILE); - //Delta - PrismContainerValue inducementValue = getPrismContext().itemFactory().createContainerValue(); - // The value id is null - inducementValue.setPropertyRealValue(AssignmentType.F_DESCRIPTION, "jamalalicha patlama paprtala", getPrismContext()); - - ObjectDelta roleDelta = getPrismContext().deltaFactory().object() - .createModificationAddContainer(RoleType.class, ROLE_CONSTRUCTION_OID, - RoleType.F_INDUCEMENT, inducementValue); + AssignmentType i = new AssignmentType(getPrismContext()) // The value id is null + .description("jamalalicha patlama paprtala"); + ObjectDelta roleDelta = getPrismContext().deltaFor(RoleType.class) + .item(RoleType.F_INDUCEMENT).add(i) + .asObjectDeltaCast(ROLE_CONSTRUCTION_OID); // WHEN roleDelta.applyTo(role); @@ -306,7 +301,36 @@ public void testDeleteUserAssignmentActivationSameNullIdApplyToObject() throws E assertEquals("Wrong activation administrativeStatus", ActivationStatusType.ENABLED, activation.getAdministrativeStatus()); } - // subtract of single-valued PCV from multivalued one + @Test + public void testAddAssignmentSameOidDifferentTargetType() throws Exception { + final String TEST_NAME = "testAddAssignmentSameOidDifferentTargetType"; + displayTestTile(TEST_NAME); + + // GIVEN + PrismObject user = new UserType(getPrismContext()) + .name("test") + .oid("oid1") + .beginAssignment() + .id(1L) + .targetRef("target-oid-1", RoleType.COMPLEX_TYPE) + .end() + .asPrismObject(); + + ObjectDelta userDelta = getPrismContext().deltaFor(UserType.class) + .item(UserType.F_ASSIGNMENT) + .add(new AssignmentType().id(2L).targetRef("target-oid-1", OrgType.COMPLEX_TYPE)) + .asObjectDeltaCast("oid1"); + + // WHEN + userDelta.applyTo(user); + + // THEN + System.out.println("User after delta application:"); + System.out.println(user.debugDump()); + assertEquals("Wrong # of assignments", 2, user.asObjectable().getAssignment().size()); + } + + // subtract of single-valued PCV from multivalued one @Test public void testSubtractAssignmentFromAddDelta() throws Exception { final String TEST_NAME = "testSubtractAssignmentFromAddDelta"; @@ -588,7 +612,7 @@ public void testObjectDeltaUnion() throws Exception { userDeltaUnion.applyTo(userWithUnion); display("userWithUnion after", userWithUnion); - ObjectDelta diff = userWithSeparateDeltas.diff(userWithUnion, false, true); // set to isLiteral = false after fixing MID-4688 + ObjectDelta diff = userWithSeparateDeltas.diff(userWithUnion, EquivalenceStrategy.LITERAL); // set to isLiteral = false after fixing MID-4688 display("diff", diff.debugDump()); assertTrue("Deltas have different effects:\n" + diff.debugDump(), diff.isEmpty()); } diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/parser/AbstractContainerValueParserTest.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/parser/AbstractContainerValueParserTest.java index 7c4a0c0d5f0..cd8591b4e12 100644 --- a/infra/schema/src/test/java/com/evolveum/midpoint/schema/parser/AbstractContainerValueParserTest.java +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/parser/AbstractContainerValueParserTest.java @@ -87,7 +87,7 @@ protected void processParsings(Class clazz, Class specificClass, if (isContainer()) { process("parseAnyData", - p -> ((PrismContainer) p.parseItemOrRealValue()).getValue(0), + p -> ((PrismContainer) p.parseItemOrRealValue()).getAnyValue(), serializer, serId); } } diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/parser/AbstractPrismValueParserTest.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/parser/AbstractPrismValueParserTest.java index f54b836a7cf..8e7065ea013 100644 --- a/infra/schema/src/test/java/com/evolveum/midpoint/schema/parser/AbstractPrismValueParserTest.java +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/parser/AbstractPrismValueParserTest.java @@ -18,6 +18,7 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.ItemDelta; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.*; import com.evolveum.midpoint.prism.util.PrismAsserts; import com.evolveum.midpoint.prism.xnode.XNode; @@ -163,7 +164,7 @@ protected void process(String desc, ParsingFunction parser, SerializingFuncti Collection deltas = value.diff(reparsed); assertTrue("Deltas not empty", deltas.isEmpty()); - assertTrue("Values not equal", value.equals(reparsed)); + assertTrue("Values not equal", value.equals(reparsed, EquivalenceStrategy.NOT_LITERAL)); } } diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/performance/AbstractSchemaPerformanceTest.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/performance/AbstractSchemaPerformanceTest.java new file mode 100644 index 00000000000..8130aedbcda --- /dev/null +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/performance/AbstractSchemaPerformanceTest.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.schema.performance; + +import com.evolveum.midpoint.prism.PrismObject; +import com.evolveum.midpoint.prism.util.PrismTestUtil; +import com.evolveum.midpoint.schema.MidPointPrismContextFactory; +import com.evolveum.midpoint.schema.constants.MidPointConstants; +import com.evolveum.midpoint.util.CheckedProducer; +import com.evolveum.midpoint.util.PrettyPrinter; +import com.evolveum.midpoint.util.exception.CommonException; +import com.evolveum.midpoint.util.exception.SchemaException; +import com.evolveum.midpoint.util.logging.Trace; +import com.evolveum.midpoint.util.logging.TraceManager; +import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType; +import org.jetbrains.annotations.NotNull; +import org.testng.annotations.BeforeSuite; +import org.xml.sax.SAXException; + +import java.io.File; +import java.io.IOException; + +import static com.evolveum.midpoint.prism.util.PrismTestUtil.getPrismContext; + +/** + * + */ +public class AbstractSchemaPerformanceTest { + + protected static final Trace LOGGER = TraceManager.getTrace(AbstractSchemaPerformanceTest.class); + + public static final File TEST_DIR = new File("src/test/resources/performance"); + public static final File USER_JACK_FILE = new File(TEST_DIR, "user-jack.xml"); + + public static final int DEFAULT_EXECUTION = 10000; + protected static final String NS_FOO = "http://www.example.com/foo"; + + @BeforeSuite + public void setup() throws SchemaException, SAXException, IOException { + PrettyPrinter.setDefaultNamespacePrefix(MidPointConstants.NS_MIDPOINT_PUBLIC_PREFIX); + PrismTestUtil.resetPrismContext(MidPointPrismContextFactory.FACTORY); + } + + protected int measure(String label, CheckedProducer producer) throws CommonException { + return measure(label, producer, DEFAULT_EXECUTION); + } + + protected int measure(String label, CheckedProducer producer, long executionTime) throws CommonException { + long until = System.currentTimeMillis() + executionTime; + int iteration = 0; + while (System.currentTimeMillis() < until) { + if (producer.get() == null) { + // just to make sure the result is used somehow (and not optimized away) + throw new IllegalStateException("null result from the producer"); + } + iteration++; + } + String message = label + ": " + iteration + " iterations in " + executionTime + " milliseconds (" + + ((double) executionTime) * 1000 / (double) iteration + " us per iteration)"; + System.out.println(message); + LOGGER.info(message); + return iteration; + } + + @NotNull + public PrismObject getJack() throws SchemaException, IOException { + return getPrismContext().parserFor(USER_JACK_FILE).parse(); + } +} diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/performance/TestBasicPerformance.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/performance/TestBasicPerformance.java new file mode 100644 index 00000000000..1f0b75f0d88 --- /dev/null +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/performance/TestBasicPerformance.java @@ -0,0 +1,233 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.schema.performance; + +import com.evolveum.midpoint.prism.PrismObject; +import com.evolveum.midpoint.prism.PrismObjectDefinition; +import com.evolveum.midpoint.prism.path.ItemPath; +import com.evolveum.midpoint.prism.polystring.PolyString; +import com.evolveum.midpoint.prism.schema.SchemaRegistry; +import com.evolveum.midpoint.prism.xnode.RootXNode; +import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType; +import com.evolveum.prism.xml.ns._public.types_3.PolyStringType; +import org.testng.annotations.Test; + +import static com.evolveum.midpoint.prism.util.PrismTestUtil.getPrismContext; + +/** + * + * + */ +public class TestBasicPerformance extends AbstractSchemaPerformanceTest { + + @Test + public void test010Dummy() throws Exception { + System.out.println("===[ test010Dummy ]==="); + + measure("currentTimeMillis", () -> System.currentTimeMillis()); + measure("long numbers addition", () -> System.currentTimeMillis() + 2000L); + } + + @Test + public void test100FindNameProperty() throws Exception { + System.out.println("===[ test100FindNameProperty ]==="); + + PrismObject jack = getJack(); + measure("findProperty(name)", () -> jack.findProperty(UserType.F_NAME)); + } + + @Test + public void test110FindNameItem() throws Exception { + System.out.println("===[ test110FindNameItem ]==="); + + PrismObject jack = getJack(); + measure("findItem(name)", () -> jack.findItem(UserType.F_NAME)); + } + + @Test + public void test120FindExtensionProperty() throws Exception { + System.out.println("===[ test120FindExtensionProperty ]==="); + + PrismObject jack = getJack(); + ItemPath bar23 = ItemPath.create(UserType.F_EXTENSION, "bar23"); + measure("findProperty(extension/bar23)", () -> jack.findProperty(bar23)); + } + + @Test + public void test130FindExtensionItem() throws Exception { + System.out.println("===[ test130FindExtensionItem ]==="); + + PrismObject jack = getJack(); + ItemPath bar23 = ItemPath.create(UserType.F_EXTENSION, "bar23"); + measure("findItem(extension/bar23)", () -> jack.findItem(bar23)); + } + + @Test + public void test200SetName() throws Exception { + System.out.println("===[ test200SetName ]==="); + + PrismObject jack = getJack(); + measure("setName(name)", () -> { + jack.asObjectable().setName(PolyStringType.fromOrig("jack_" + Math.random())); + return true; + }); + } + + @Test + public void test210SetNameViaProperty() throws Exception { + System.out.println("===[ test210SetNameViaProperty ]==="); + + PrismObject jack = getJack(); + measure("findProperty(name).setRealValue", () -> { + jack.findProperty(UserType.F_NAME).setRealValue(PolyString.fromOrig("jack_" + Math.random())); + return true; + }); + } + + @Test + public void test215SetNameViaPropertyUsingExistingValue() throws Exception { + System.out.println("===[ test215SetNameViaPropertyUsingExistingValue ]==="); + + PrismObject jack = getJack(); + PolyString realValue = PolyString.fromOrig("jack_" + Math.random()); + measure("findProperty(name).setRealValue(existing)", () -> { + jack.findProperty(UserType.F_NAME).setRealValue(realValue); + return true; + }); + } + + @Test + public void test220SetExtensionItemString() throws Exception { + System.out.println("===[ test220SetExtensionItemString ]==="); + + PrismObject jack = getJack(); + ItemPath bar23 = ItemPath.create(UserType.F_EXTENSION, "bar23"); + measure("findProperty(extension/bar23).setRealValue", () -> { + jack.findProperty(bar23).setRealValue("jack_" + Math.random()); + return 1; + }); + } + + @Test + public void test230SetExtensionItemPolyString() throws Exception { + System.out.println("===[ test230SetExtensionItemPolyString ]==="); + + PrismObject jack = getJack(); + ItemPath bar23 = ItemPath.create(UserType.F_EXTENSION, "bar23"); + measure("findProperty(extension/bar23).setRealValue(polystring)", () -> { + jack.findProperty(bar23).setRealValue(PolyString.fromOrig("jack_" + Math.random())); + return 1; + }); + } + + @Test + public void test300Clone() throws Exception { + System.out.println("===[ test300Clone ]==="); + + PrismObject jack = getJack(); + measure("jack.clone", () -> jack.clone()); + } + + @Test + public void test310ParseXml() throws Exception { + System.out.println("===[ test310ParseXml ]==="); + + PrismObject jack = getJack(); + String string = getPrismContext().xmlSerializer().serialize(jack); + measure("parse XML (" + string.length() + " chars)", () -> getPrismContext().parserFor(string).xml().parse()); + measure("parse XML to XNode (" + string.length() + " chars)", () -> getPrismContext().parserFor(string).xml().parseToXNode()); + } + + @Test + public void test320ParseJson() throws Exception { + System.out.println("===[ test320ParseJson ]==="); + + PrismObject jack = getJack(); + String string = getPrismContext().jsonSerializer().serialize(jack); + measure("parse JSON (" + string.length() + " chars)", () -> getPrismContext().parserFor(string).json().parse()); + measure("parse JSON to XNode (" + string.length() + " chars)", () -> getPrismContext().parserFor(string).json().parseToXNode()); + } + + @Test + public void test330ParseYaml() throws Exception { + System.out.println("===[ test330ParseYaml ]==="); + + PrismObject jack = getJack(); + String string = getPrismContext().yamlSerializer().serialize(jack); + measure("parse YAML (" + string.length() + " chars)", () -> getPrismContext().parserFor(string).yaml().parse()); + measure("parse YAML to XNode (" + string.length() + " chars)", () -> getPrismContext().parserFor(string).yaml().parse()); + } + + @Test + public void test340ParseXNode() throws Exception { + System.out.println("===[ test340ParseXNode ]==="); + + PrismObject jack = getJack(); + RootXNode xnode = getPrismContext().xnodeSerializer().serialize(jack); + measure("parse XNode", () -> getPrismContext().parserFor(xnode).parse()); + } + + @Test + public void test350SerializeToXml() throws Exception { + System.out.println("===[ test350SerializeToXml ]==="); + + PrismObject jack = getJack(); + measure("serialize to XML", () -> getPrismContext().xmlSerializer().serialize(jack)); + } + + @Test + public void test360SerializeToJson() throws Exception { + System.out.println("===[ test360SerializeToJson ]==="); + + PrismObject jack = getJack(); + measure("serialize to JSON", () -> getPrismContext().jsonSerializer().serialize(jack)); + } + + @Test + public void test370SerializeToYaml() throws Exception { + System.out.println("===[ test370SerializeToYaml ]==="); + + PrismObject jack = getJack(); + measure("serialize to YAML", () -> getPrismContext().yamlSerializer().serialize(jack)); + } + + @Test + public void test400FindNameDefinition() throws Exception { + System.out.println("===[ test400FindNameDefinition ]==="); + + SchemaRegistry schemaRegistry = getPrismContext().getSchemaRegistry(); + PrismObjectDefinition userDefinition = schemaRegistry.findObjectDefinitionByCompileTimeClass(UserType.class); + measure("userDefinition.findItemDefinition(UserType.F_NAME)", () -> userDefinition.findItemDefinition(UserType.F_NAME)); + } + + @Test + public void test410FindAdminGuiConfigurationDefinition() throws Exception { + System.out.println("===[ test410FindAdminGuiConfigurationDefinition ]==="); + + SchemaRegistry schemaRegistry = getPrismContext().getSchemaRegistry(); + PrismObjectDefinition userDefinition = schemaRegistry.findObjectDefinitionByCompileTimeClass(UserType.class); + measure("userDefinition.findItemDefinition(UserType.F_NAME)", () -> userDefinition.findItemDefinition(UserType.F_ADMIN_GUI_CONFIGURATION)); + } + + @Test + public void test420FindUserDefinition() throws Exception { + System.out.println("===[ test420FindUserDefinition ]==="); + + SchemaRegistry schemaRegistry = getPrismContext().getSchemaRegistry(); + measure("schemaRegistry.findObjectDefinitionByCompileTimeClass(UserType.class)", () -> schemaRegistry.findObjectDefinitionByCompileTimeClass(UserType.class)); + } + +} diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/performance/TestDeltaPerformance.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/performance/TestDeltaPerformance.java new file mode 100644 index 00000000000..c906023a39f --- /dev/null +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/performance/TestDeltaPerformance.java @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.schema.performance; + +import com.evolveum.midpoint.prism.PrismObject; +import com.evolveum.midpoint.prism.PrismPropertyDefinition; +import com.evolveum.midpoint.prism.delta.ObjectDelta; +import com.evolveum.midpoint.prism.path.ItemPath; +import com.evolveum.midpoint.util.DOMUtil; +import com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.CredentialsType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.PasswordType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType; +import org.testng.annotations.Test; + +import javax.xml.namespace.QName; + +import static com.evolveum.midpoint.prism.util.PrismTestUtil.getPrismContext; + +/** + * + * + */ +public class TestDeltaPerformance extends AbstractSchemaPerformanceTest { + + @Test + public void test100ApplyNameDelta() throws Exception { + System.out.println("===[ test100ApplyNameDelta ]==="); + + PrismObject jack = getJack(); + PrismObject temp = jack.clone(); + ObjectDelta delta = getPrismContext().deltaFor(UserType.class) + .item(UserType.F_NAME).replace("jjj") + .asObjectDeltaCast(temp.getOid()); + measure("delta.applyTo(jack)", () -> { delta.applyTo(temp); return true; }); + + PrismObject jack2 = jack.clone(); + delta.applyTo(jack2); + measure("jack2.diff(jack)", () -> jack2.diff(jack)); + } + + @Test + public void test102ApplyPasswordValueDelta() throws Exception { + System.out.println("===[ test102ApplyPasswordValueDelta ]==="); + + PrismObject jack = getJack(); + PrismObject temp = jack.clone(); + ObjectDelta delta = getPrismContext().deltaFor(UserType.class) + .item(UserType.F_CREDENTIALS, CredentialsType.F_PASSWORD, PasswordType.F_VALUE).replace("cleartext") + .asObjectDeltaCast(temp.getOid()); + measure("delta.applyTo(jack)", () -> { delta.applyTo(temp); return true; }); + PrismObject jack2 = jack.clone(); + delta.applyTo(jack2); + measure("jack2.diff(jack)", () -> jack2.diff(jack)); + } + + @Test + public void test104ApplyExtensionItemDelta() throws Exception { + System.out.println("===[ test104ApplyExtensionItemDelta ]==="); + + PrismObject jack = getJack(); + PrismObject temp = jack.clone(); + ObjectDelta delta = getPrismContext().deltaFor(UserType.class) + .item(ItemPath.create(UserType.F_EXTENSION, "bar23"), def("bar23")).replace("bbb") + .asObjectDeltaCast(temp.getOid()); + measure("delta.applyTo(jack)", () -> { delta.applyTo(temp); return true; }); + PrismObject jack2 = jack.clone(); + delta.applyTo(jack2); + measure("jack2.diff(jack)", () -> jack2.diff(jack)); + } + + @Test + public void test110ApplyDeltaWith5Modifications() throws Exception { + System.out.println("===[ test110ApplyDeltaWith5Modifications ]==="); + + PrismObject jack = getJack(); + PrismObject temp = jack.clone(); + ObjectDelta delta = getPrismContext().deltaFor(UserType.class) + .item(UserType.F_NAME).replace("jjj") + .item(UserType.F_HONORIFIC_SUFFIX).replace("sss") + .item(ItemPath.create(UserType.F_EXTENSION, "bar23"), def("bar23")).replace("bbb") + .item(UserType.F_CREDENTIALS, CredentialsType.F_PASSWORD, PasswordType.F_VALUE).replace("cleartext") + .item(UserType.F_ADMIN_GUI_CONFIGURATION).replace(new AdminGuiConfigurationType(getPrismContext())) + .asObjectDeltaCast(temp.getOid()); + measure("delta.applyTo(jack)", () -> { delta.applyTo(temp); return true; }); + PrismObject jack2 = jack.clone(); + delta.applyTo(jack2); + measure("jack2.diff(jack)", () -> jack2.diff(jack)); + } + + private PrismPropertyDefinition def(String name) { + return getPrismContext().definitionFactory().createPropertyDefinition(new QName(NS_FOO, name), DOMUtil.XSD_STRING); + } + + @Test + public void test120ApplyDeltaWith30Modifications() throws Exception { + System.out.println("===[ test120ApplyDeltaWith30Modifications ]==="); + + PrismObject jack = getJack(); + PrismObject temp = jack.clone(); + ObjectDelta delta = getPrismContext().deltaFor(UserType.class) + .item(ItemPath.create(UserType.F_EXTENSION, "bar0"), def("bar0")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar1"), def("bar1")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar2"), def("bar2")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar3"), def("bar3")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar4"), def("bar4")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar5"), def("bar5")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar6"), def("bar6")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar7"), def("bar7")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar8"), def("bar8")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar9"), def("bar9")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar10"), def("bar10")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar11"), def("bar11")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar12"), def("bar12")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar13"), def("bar13")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar14"), def("bar14")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar15"), def("bar15")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar16"), def("bar16")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar17"), def("bar17")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar18"), def("bar18")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar19"), def("bar19")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar20"), def("bar20")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar21"), def("bar21")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar22"), def("bar22")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar23"), def("bar23")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar24"), def("bar24")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar25"), def("bar25")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar26"), def("bar26")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar27"), def("bar27")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar28"), def("bar28")).replace("bbb") + .item(ItemPath.create(UserType.F_EXTENSION, "bar29"), def("bar29")).replace("bbb") + .asObjectDeltaCast(temp.getOid()); + measure("delta.applyTo(jack)", () -> { delta.applyTo(temp); return true; }); + PrismObject jack2 = jack.clone(); + delta.applyTo(jack2); + measure("jack2.diff(jack)", () -> jack2.diff(jack)); + } + +} diff --git a/infra/schema/src/test/java/com/evolveum/midpoint/schema/util/XsdTypeConverterTest.java b/infra/schema/src/test/java/com/evolveum/midpoint/schema/util/XsdTypeConverterTest.java index 8ec5738c3fa..04ce5f0e6d8 100644 --- a/infra/schema/src/test/java/com/evolveum/midpoint/schema/util/XsdTypeConverterTest.java +++ b/infra/schema/src/test/java/com/evolveum/midpoint/schema/util/XsdTypeConverterTest.java @@ -111,7 +111,7 @@ public void testAccountMarshall() throws JAXBException, SchemaException, IOExcep Document doc = DOMUtil.getDocument(); JAXBElement accountElement = - new JAXBElement<>(ObjectTypes.SHADOW.getQName(), + new JAXBElement<>(ObjectTypes.SHADOW.getElementName(), ShadowType.class, shadow); JaxbTestUtil.getInstance().marshalElementToDom(accountElement, doc); diff --git a/infra/schema/src/test/resources/performance/user-jack.xml b/infra/schema/src/test/resources/performance/user-jack.xml new file mode 100644 index 00000000000..7e762e759de --- /dev/null +++ b/infra/schema/src/test/resources/performance/user-jack.xml @@ -0,0 +1,154 @@ + + + + + jack + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius vestibulum gravida. Pellentesque neque lorem, lacinia vel tortor vel, ornare vestibulum purus. Morbi non maximus tellus, et vulputate massa. Morbi tristique massa at magna lobortis, id blandit augue dictum. Nam dapibus massa arcu, quis tincidunt mauris venenatis in. Vivamus sit amet turpis euismod, pulvinar quam a, porttitor sapien. Ut ex lacus, ultricies eget lectus sit amet, tincidunt aliquet nunc. Etiam nulla sapien, sodales eget iaculis eget, iaculis in erat. Sed dapibus laoreet metus, et ultrices neque iaculis eu. Suspendisse potenti. + Nunc eros ex, congue id elementum ac, egestas sed purus. Praesent egestas sem sapien, volutpat rutrum nisl hendrerit non. Pellentesque vestibulum fringilla metus eget luctus. Donec at sem in dolor consequat pulvinar. Nam bibendum vulputate nunc ac consequat. Aenean sollicitudin sodales libero, eget aliquet ante posuere vitae. Curabitur semper, ipsum quis varius facilisis, lorem velit gravida enim, non convallis est sapien vitae nisi. Phasellus tempor risus consectetur sapien bibendum, ultrices semper enim eleifend. Cras dignissim magna quis rhoncus placerat. Mauris rutrum lacus tortor, vitae placerat lacus volutpat non. Proin facilisis lacinia nisi nec lobortis. Vestibulum hendrerit leo purus. + Vivamus sit amet mattis ligula. Duis hendrerit luctus porttitor. Donec sollicitudin urna et volutpat pretium. Integer ac ex egestas nulla accumsan dignissim. Sed viverra ipsum lacus. Phasellus porta malesuada dui, sit amet ullamcorper odio bibendum ac. Morbi sagittis vestibulum odio in maximus. In eleifend quam sed venenatis vehicula. Nulla bibendum fermentum tempor. Sed tincidunt orci odio, a congue nisl eleifend pharetra. Integer tincidunt sapien urna, consectetur mattis dolor semper vitae. Nullam interdum erat id purus laoreet, vitae efficitur lacus semper. Sed molestie semper quam eget lacinia. Proin in placerat lectus. + Maecenas vel ligula nibh. Etiam posuere interdum velit sit amet luctus. Vivamus magna dui, tempor ac scelerisque et, pulvinar at felis. Donec faucibus nibh sit amet lacus placerat sodales. Curabitur in interdum dolor, ut vehicula diam. Quisque dignissim luctus urna sed consectetur. Sed lorem erat, tincidunt sed volutpat ut, porttitor in lectus. Integer feugiat turpis viverra lorem sollicitudin pharetra. Fusce faucibus arcu egestas, congue turpis non, tincidunt augue. Duis maximus, tellus dictum gravida varius, sapien purus lobortis mi, sit amet aliquam leo quam at justo. Aenean eget dolor urna. Integer nec magna non dui volutpat iaculis in eget velit. Fusce congue, nulla eu cursus euismod, augue augue sagittis mauris, sed porttitor odio mi quis ante. + Praesent volutpat orci ut nisl convallis, quis egestas velit dictum. Phasellus ac consectetur orci. Morbi suscipit elit congue auctor consequat. Nam finibus nisl leo, quis volutpat elit aliquet eget. Donec quis elit id dui eleifend commodo et vel dolor. Fusce at aliquam lorem, eu pretium est. Maecenas ullamcorper porttitor dictum. Nunc ac sapien vitae tortor interdum maximus sed lobortis nisi. Nulla a vestibulum tellus. Aenean ac pretium nulla. Duis diam magna, tempus quis enim posuere, iaculis pretium tellus. Suspendisse semper nibh felis, eu vehicula ipsum fermentum ac. Sed sed finibus diam. Quisque porttitor venenatis erat, elementum sagittis nibh. Donec suscipit purus ipsum, sed luctus felis convallis at. Vestibulum ac metus sed leo luctus hendrerit sed non turpis. + + BAR + 42 + raz + dva + tri + + openS3zam3 + + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + BAR + + + + + 42 + + + + + + enabled + + + + + + jsparrow + + + AccountObjectClass + + + + + captain + + Rum Supply System + + + + http://midpoint.evolveum.com/xml/ns/public/resource/instance/2f9b9299-5555-5555-5555-000000002222 + + + AccountObjectClass + + + + + This is third accountRef + + + + connectorType + >org.identityconnectors.ldap.LdapConnector + + + + + + enabled + + + loc + a@evo.com + + Jack Sparrow + Jack + Sparrow + Cpt. + Brethren of the Coast + Davie Jones' Locker + + + + + + + http://www.w3.org/2001/04/xmlenc#aes256-cbc" + + + HF6JRsNMeJt6alihT44CXKgpe0c= + + + blc5OXO2Z4vJW7o/XXhqZzg/rkwsIOwRBK7KLgMqwcrVcYpeZZOjxzgRgFiNw4IB + + + + + + + diff --git a/infra/util/pom.xml b/infra/util/pom.xml index 694f5a1df9d..ef7c1462926 100644 --- a/infra/util/pom.xml +++ b/infra/util/pom.xml @@ -102,6 +102,11 @@ testng test - + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/model/model-api/pom.xml b/model/model-api/pom.xml index c165e9cc3a3..aea95b3ce70 100644 --- a/model/model-api/pom.xml +++ b/model/model-api/pom.xml @@ -92,6 +92,10 @@ audit-api 4.0-SNAPSHOT + + commons-lang + commons-lang + com.evolveum.midpoint.tools test-ng diff --git a/model/model-api/src/main/java/com/evolveum/midpoint/model/api/ModelInteractionService.java b/model/model-api/src/main/java/com/evolveum/midpoint/model/api/ModelInteractionService.java index 9eef8f0d5d2..9056eb0c704 100644 --- a/model/model-api/src/main/java/com/evolveum/midpoint/model/api/ModelInteractionService.java +++ b/model/model-api/src/main/java/com/evolveum/midpoint/model/api/ModelInteractionService.java @@ -16,6 +16,7 @@ package com.evolveum.midpoint.model.api; import com.evolveum.midpoint.common.refinery.RefinedObjectClassDefinition; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.model.api.context.ModelContext; import com.evolveum.midpoint.model.api.util.MergeDeltas; import com.evolveum.midpoint.model.api.visualizer.Scene; @@ -28,10 +29,12 @@ import com.evolveum.midpoint.schema.ResourceShadowDiscriminator; import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.schema.statistics.ConnectorOperationalStatus; +import com.evolveum.midpoint.security.api.AuthorizationTransformer; import com.evolveum.midpoint.security.api.MidPointPrincipal; import com.evolveum.midpoint.security.enforcer.api.ItemSecurityConstraints; import com.evolveum.midpoint.task.api.Task; import com.evolveum.midpoint.util.DisplayableValue; +import com.evolveum.midpoint.util.annotation.Experimental; import com.evolveum.midpoint.util.exception.*; import com.evolveum.midpoint.xml.ns._public.common.api_types_3.ExecuteCredentialResetRequestType; import com.evolveum.midpoint.xml.ns._public.common.api_types_3.ExecuteCredentialResetResponseType; @@ -51,12 +54,12 @@ * services. It should only provide access to read-only data or provide a temporary (throw-away) previews * of data. It should not change the state of IDM repository, resources or tasks. * - * UNSTABLE: This is likely to change - * PRIVATE: This interface is not supposed to be used outside of midPoint + * EXPERIMENTAL/UNSTABLE: This is likely to change at any moment without a notice. Depend on this interface on your own risk. * * @author Radovan Semancik * */ +@Experimental public interface ModelInteractionService { String CLASS_NAME_WITH_DOT = ModelInteractionService.class.getName() + "."; @@ -245,14 +248,14 @@ ModelContext previewChanges( CredentialsPolicyType getCredentialsPolicy(PrismObject user, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException; /** - * Returns currently applicable admin GUI configuration. The implementation will do all steps necessary to construct - * applicable configuration, e.g. reading from system configuration, merging with user preferences, etc. + * Returns currently applicable user profile, compiled for efficient use in the user interface. + * Use profile contains configuration, customization and user preferences for the user interface. * Note: This operation bypasses the authorizations. It will always return the value regardless whether * the current user is authorized to read the underlying objects or not. However, it will always return only * values applicable for current user, therefore the authorization might be considered to be implicit in this case. */ @NotNull - AdminGuiConfigurationType getAdminGuiConfiguration(Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException; + CompiledUserProfile getCompiledUserProfile(Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException; SystemConfigurationType getSystemConfiguration(OperationResult parentResult) throws ObjectNotFoundException, SchemaException; @@ -378,4 +381,5 @@ TaskType submitTaskFromTemplate(String templateTaskOid, Map exten * This method is supposed to be very efficient, it should be using caching as much as possible. */ ArchetypeInteractionSpecification getInteractionSpecification(PrismObject object, OperationResult result) throws SchemaException, ConfigurationException; + } diff --git a/model/model-api/src/main/java/com/evolveum/midpoint/model/api/authentication/CompiledObjectCollectionView.java b/model/model-api/src/main/java/com/evolveum/midpoint/model/api/authentication/CompiledObjectCollectionView.java new file mode 100644 index 00000000000..0d45f82803c --- /dev/null +++ b/model/model-api/src/main/java/com/evolveum/midpoint/model/api/authentication/CompiledObjectCollectionView.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.model.api.authentication; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.namespace.QName; + +import org.jetbrains.annotations.NotNull; + +import com.evolveum.midpoint.prism.query.ObjectFilter; +import com.evolveum.midpoint.util.DebugDumpable; +import com.evolveum.midpoint.util.DebugUtil; +import com.evolveum.midpoint.util.QNameUtil; +import com.evolveum.midpoint.util.annotation.Experimental; +import com.evolveum.midpoint.xml.ns._public.common.common_3.CollectionSpecificationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.DisplayType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.DistinctSearchOptionType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiActionType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectColumnType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectListViewAdditionalPanelsType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.SearchBoxConfigurationType; + +/** + * @author semancik + * + */ +@Experimental +public class CompiledObjectCollectionView implements DebugDumpable, Serializable { + private static final long serialVersionUID = 1L; + + private final QName objectType; + private final String viewName; + + private List actions = new ArrayList<>(); + private CollectionSpecificationType collection; + private List columns = new ArrayList<>(); + private DisplayType display; + private GuiObjectListViewAdditionalPanelsType additionalPanels; + private DistinctSearchOptionType distinct; + private Boolean disableSorting; + private SearchBoxConfigurationType searchBoxConfiguration; + private ObjectFilter filter; + + // Only used to construct "default" view definition. May be not needed later on. + public CompiledObjectCollectionView() { + super(); + objectType = null; + viewName = null; + } + + public CompiledObjectCollectionView(QName objectType, String viewName) { + super(); + this.objectType = objectType; + this.viewName = viewName; + } + + public QName getObjectType() { + return objectType; + } + + public String getViewName() { + return viewName; + } + + @NotNull + public List getActions() { + return actions; + } + + public CollectionSpecificationType getCollection() { + return collection; + } + + public void setCollection(CollectionSpecificationType collection) { + this.collection = collection; + } + + /** + * Returns column definition list (already ordered). + * May return empty list if there is no definition. Which means that default columns should be used. + */ + public List getColumns() { + return columns; + } + + public DisplayType getDisplay() { + return display; + } + + public void setDisplay(DisplayType display) { + this.display = display; + } + + public GuiObjectListViewAdditionalPanelsType getAdditionalPanels() { + return additionalPanels; + } + + public void setAdditionalPanels(GuiObjectListViewAdditionalPanelsType additionalPanels) { + this.additionalPanels = additionalPanels; + } + + public DistinctSearchOptionType getDistinct() { + return distinct; + } + + public void setDistinct(DistinctSearchOptionType distinct) { + this.distinct = distinct; + } + + public Boolean isDisableSorting() { + return disableSorting; + } + + public Boolean getDisableSorting() { + return disableSorting; + } + + public void setDisableSorting(Boolean disableSorting) { + this.disableSorting = disableSorting; + } + + public SearchBoxConfigurationType getSearchBoxConfiguration() { + return searchBoxConfiguration; + } + + public void setSearchBoxConfiguration(SearchBoxConfigurationType searchBoxConfiguration) { + this.searchBoxConfiguration = searchBoxConfiguration; + } + + public ObjectFilter getFilter() { + return filter; + } + + public void setFilter(ObjectFilter filter) { + this.filter = filter; + } + + public boolean match(QName expectedObjectType, String expectedViewName) { + if (!QNameUtil.match(objectType, expectedObjectType)) { + return false; + } + if (expectedViewName == null) { + if (isAllObjectsView()) { + return true; + } else { + return false; + } + } + return expectedViewName.equals(viewName); + } + + public boolean match(QName expectedObjectType) { + return QNameUtil.match(objectType, expectedObjectType); + } + + + private boolean isAllObjectsView() { + return collection == null; + } + + @Override + public String debugDump(int indent) { + StringBuilder sb = DebugUtil.createTitleStringBuilderLn(CompiledObjectCollectionView.class, indent); + DebugUtil.debugDumpWithLabelLn(sb, "objectType", objectType, indent + 1); + DebugUtil.debugDumpWithLabelLn(sb, "viewName", viewName, indent + 1); + DebugUtil.debugDumpWithLabelLn(sb, "actions", actions, indent + 1); + DebugUtil.debugDumpWithLabelLn(sb, "columns", columns, indent + 1); + DebugUtil.debugDumpWithLabelToStringLn(sb, "display", display, indent + 1); + DebugUtil.debugDumpWithLabelToStringLn(sb, "additionalPanels", additionalPanels, indent + 1); + DebugUtil.debugDumpWithLabelToStringLn(sb, "distinct", distinct, indent + 1); + DebugUtil.debugDumpWithLabelLn(sb, "disableSorting", disableSorting, indent + 1); + DebugUtil.debugDumpWithLabelToStringLn(sb, "searchBoxConfiguration", searchBoxConfiguration, indent + 1); + DebugUtil.debugDumpWithLabel(sb, "filter", filter, indent + 1); + return sb.toString(); + } + +} diff --git a/model/model-api/src/main/java/com/evolveum/midpoint/model/api/authentication/CompiledUserProfile.java b/model/model-api/src/main/java/com/evolveum/midpoint/model/api/authentication/CompiledUserProfile.java new file mode 100644 index 00000000000..869c45a3a3d --- /dev/null +++ b/model/model-api/src/main/java/com/evolveum/midpoint/model/api/authentication/CompiledUserProfile.java @@ -0,0 +1,370 @@ +/** + * Copyright (c) 2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.model.api.authentication; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import java.util.function.BooleanSupplier; + +import javax.xml.namespace.QName; + +import org.apache.commons.lang.StringUtils; +import org.jetbrains.annotations.NotNull; + +import com.evolveum.midpoint.schema.constants.ObjectTypes; +import com.evolveum.midpoint.util.DebugDumpable; +import com.evolveum.midpoint.util.DebugUtil; +import com.evolveum.midpoint.util.QNameUtil; +import com.evolveum.midpoint.util.annotation.Experimental; +import com.evolveum.midpoint.xml.ns._public.common.common_3.AbstractObjectTypeConfigurationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationRoleManagementType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.DashboardLayoutType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.DashboardWidgetType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.FeedbackMessagesHookType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiExportSettingsType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectDetailsPageType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectDetailsSetType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectFormsType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.RichHyperlinkType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.SearchBoxConfigurationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.UserInterfaceElementVisibilityType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.UserInterfaceFeatureType; + +/** + * Compiled user profile. This class contains information about configuration and customization + * of individual parts of user interface and user preferences. This class contains pre-processed + * information in a form that is suitable to direct use by user interface code. The GUI should not + * be required to do any complex processing on this. + * + * This idea is to compile the profile just once, on login time. Therefore only the authentication + * code (UserProfileCompiler) should modify this object. It should be considered read-only for all other + * purposes. + * + * Later it may be split to interface and implementation parts. + * + * @since 4.0 + * @author Radovan Semancik + */ +@Experimental +public class CompiledUserProfile implements DebugDumpable, Serializable { + private static final long serialVersionUID = 1L; + + private String defaultTimezone; + private String preferredDataLanguage; + private Boolean enableExperimentalFeatures; + private List additionalMenuLink = new ArrayList<>(); + private List userDashboardLink = new ArrayList<>(); + private List objectCollectionViews = new ArrayList<>(); + private CompiledObjectCollectionView defaultObjectCollectionView = null; + private DashboardLayoutType userDashboard; + private GuiExportSettingsType defaultExportSettings; + private ObjectFormsType objectForms; + private GuiObjectDetailsSetType objectDetails; + private FeedbackMessagesHookType feedbackMessagesHook; + private AdminGuiConfigurationRoleManagementType roleManagement; + private List features = new ArrayList<>(); + + public String getDefaultTimezone() { + return defaultTimezone; + } + + public void setDefaultTimezone(String defaultTimezone) { + this.defaultTimezone = defaultTimezone; + } + + public String getPreferredDataLanguage() { + return preferredDataLanguage; + } + + public void setPreferredDataLanguage(String preferredDataLanguage) { + this.preferredDataLanguage = preferredDataLanguage; + } + + public Boolean isEnableExperimentalFeatures() { + return enableExperimentalFeatures; + } + + public void setEnableExperimentalFeatures(Boolean enableExperimentalFeatures) { + this.enableExperimentalFeatures = enableExperimentalFeatures; + } + + @NotNull + public List getAdditionalMenuLink() { + return additionalMenuLink; + } + + /** + * Very likely to change in the future (for "flexible dashboards" feature). + */ + @Experimental + @NotNull + public List getUserDashboardLink() { + return userDashboardLink; + } + + /** + * Very likely to change in the future (for "flexible dashboards" feature). + */ + @Experimental + public DashboardLayoutType getUserDashboard() { + return userDashboard; + } + + @Experimental + public void setUserDashboard(DashboardLayoutType userDashboard) { + this.userDashboard = userDashboard; + } + + /** + * Compiled information about all configured object list views. + */ + @NotNull + public List getObjectCollectionViews() { + return objectCollectionViews; + } + + /** + * Compiled information about object list view for a particular type. + * If viewName is null then it returns view definition for "all objects" view, + * e.g. "all users", "all roles". + */ + public CompiledObjectCollectionView findObjectCollectionView(@NotNull QName objectType, String viewName) { + for (CompiledObjectCollectionView objectCollectionView : objectCollectionViews) { + if (objectCollectionView.match(objectType, viewName)) { + return objectCollectionView; + } + } + return defaultObjectCollectionView; + } + + /** + * Find all views that are applicable for a particular object type. Returns views for all collections + * and archetypes that are applicable for that type. Ideal to be used in constructing menus. + */ + @NotNull + public List findAllApplicableObjectCollectionViews(@NotNull QName objectType) { + List applicableViews = new ArrayList<>(); + for (CompiledObjectCollectionView objectCollectionView : objectCollectionViews) { + if (objectCollectionView.match(objectType)) { + applicableViews.add(objectCollectionView); + } + } + return applicableViews; + } + + /** + * Find all views that are applicable for a particular object type. Returns views for all collections + * and archetypes that are applicable for that type. Ideal to be used in costructing menus. + */ + @NotNull + public List findAllApplicableObjectCollectionViews(Class compileTimeClass) { + return findAllApplicableObjectCollectionViews(ObjectTypes.getObjectType(compileTimeClass).getTypeQName()); + } + + public CompiledObjectCollectionView findObjectViewByViewName(Class compileTimeClass, String viewName){ + if (compileTimeClass == null || StringUtils.isEmpty(viewName)){ + return null; + } + List objectViews = findAllApplicableObjectCollectionViews(compileTimeClass); + if (objectViews == null) { + return null; + } + for (CompiledObjectCollectionView view : objectViews){ + if (viewName.equals(view.getViewName())){ + return view; + } + } + return null; + } + + /** + * Default list view setting should never be needed publicly. Always check setting for specific + * object type (and archetype). + */ + public CompiledObjectCollectionView getDefaultObjectCollectionView() { + return defaultObjectCollectionView; + } + + public void setDefaultObjectCollectionView(CompiledObjectCollectionView defaultObjectCollectionView) { + this.defaultObjectCollectionView = defaultObjectCollectionView; + } + + public GuiExportSettingsType getDefaultExportSettings() { + return defaultExportSettings; + } + + public void setDefaultExportSettings(GuiExportSettingsType defaultExportSettings) { + this.defaultExportSettings = defaultExportSettings; + } + + /** + * May change in the future. + */ + @Experimental + public ObjectFormsType getObjectForms() { + return objectForms; + } + + @Experimental + public void setObjectForms(ObjectFormsType objectForms) { + this.objectForms = objectForms; + } + + /** + * May change in the future. + */ + @Experimental + public GuiObjectDetailsSetType getObjectDetails() { + return objectDetails; + } + + @Experimental + public void setObjectDetails(GuiObjectDetailsSetType objectDetails) { + this.objectDetails = objectDetails; + } + + + public GuiObjectDetailsPageType findObjectDetailsConfiguration(Class compileTimeClass) { + if (objectDetails == null) { + return null; + } + return findObjectConfiguration(objectDetails.getObjectDetailsPage(), compileTimeClass); + } + + private T findObjectConfiguration( + List list, Class type) { + if (list == null) { + return null; + } + QName typeQName = ObjectTypes.getObjectType(type).getTypeQName(); + for (T item: list) { + if (QNameUtil.match(item.getType(), typeQName)) { + return item; + } + } + for (T item: list) { + if (item.getType() == null) { + return item; + } + } + return null; + } + + + public FeedbackMessagesHookType getFeedbackMessagesHook() { + return feedbackMessagesHook; + } + + public void setFeedbackMessagesHook(FeedbackMessagesHookType feedbackMessagesHook) { + this.feedbackMessagesHook = feedbackMessagesHook; + } + + public AdminGuiConfigurationRoleManagementType getRoleManagement() { + return roleManagement; + } + + public void setRoleManagement(AdminGuiConfigurationRoleManagementType roleManagement) { + this.roleManagement = roleManagement; + } + + public List getFeatures() { + return features; + } + + public UserInterfaceFeatureType findFeature(String identifier) { + return findFeature(features, identifier); + } + + public static T findFeature(List features, String identifier) { + for (T feature: features) { + if (feature.getIdentifier().equals(identifier)) { + return feature; + } + } + return null; + } + + public UserInterfaceElementVisibilityType getFeatureVisibility(String identifier) { + UserInterfaceFeatureType feature = findFeature(identifier); + if (feature == null) { + return UserInterfaceElementVisibilityType.AUTOMATIC; + } + UserInterfaceElementVisibilityType visibility = feature.getVisibility(); + if (visibility == null) { + return UserInterfaceElementVisibilityType.AUTOMATIC; + } + return visibility; + } + + public boolean isFeatureVisible(String identifier) { + return isFeatureVisible(identifier, null); + } + + public boolean isFeatureVisible(String identifier, BooleanSupplier automaticPredicate) { + UserInterfaceElementVisibilityType visibility = getFeatureVisibility(identifier); + return isVisible(visibility, automaticPredicate); + } + + public static boolean isVisible(UserInterfaceElementVisibilityType visibility, BooleanSupplier automaticPredicate) { + if (visibility == UserInterfaceElementVisibilityType.HIDDEN) { + return false; + } + if (visibility == UserInterfaceElementVisibilityType.VISIBLE) { + return true; + } + if (visibility == UserInterfaceElementVisibilityType.AUTOMATIC) { + if (automaticPredicate == null) { + return true; + } else { + return automaticPredicate.getAsBoolean(); + } + } + return false; + } + + @Experimental + public DashboardWidgetType findUserDashboardWidget(String widgetIdentifier) { + if (userDashboard == null) { + return null; + } + return findFeature(userDashboard.getWidget(), widgetIdentifier); + } + + // TODO: later: information about menu structure + + @Override + public String debugDump(int indent) { + StringBuilder sb = DebugUtil.createTitleStringBuilderLn(CompiledUserProfile.class, indent); + DebugUtil.debugDumpWithLabelLn(sb, "defaultTimezone", defaultTimezone, indent + 1); + DebugUtil.debugDumpWithLabelLn(sb, "preferredDataLanguage", preferredDataLanguage, indent + 1); + DebugUtil.debugDumpWithLabelLn(sb, "enableExperimentalFeatures", enableExperimentalFeatures, indent + 1); + DebugUtil.debugDumpWithLabelLn(sb, "additionalMenuLink", additionalMenuLink, indent + 1); + DebugUtil.debugDumpWithLabelLn(sb, "userDashboardLink", userDashboardLink, indent + 1); + DebugUtil.debugDumpWithLabelLn(sb, "objectCollectionViews", objectCollectionViews, indent + 1); + DebugUtil.debugDumpWithLabelLn(sb, "defaultObjectCollectionView", defaultObjectCollectionView, indent + 1); + DebugUtil.debugDumpWithLabelToStringLn(sb, "userDashboard", userDashboard, indent + 1); + DebugUtil.debugDumpWithLabelToStringLn(sb, "defaultExportSettings", defaultExportSettings, indent + 1); + DebugUtil.debugDumpWithLabelToStringLn(sb, "objectForms", objectForms, indent + 1); + DebugUtil.debugDumpWithLabelToStringLn(sb, "objectDetails", objectDetails, indent + 1); + DebugUtil.debugDumpWithLabelToStringLn(sb, "feedbackMessagesHook", feedbackMessagesHook, indent + 1); + DebugUtil.debugDumpWithLabelToStringLn(sb, "roleManagement", roleManagement, indent + 1); + DebugUtil.debugDumpWithLabel(sb, "features", features, indent + 1); + return sb.toString(); + } +} diff --git a/model/model-api/src/main/java/com/evolveum/midpoint/model/api/authentication/MidPointUserProfilePrincipal.java b/model/model-api/src/main/java/com/evolveum/midpoint/model/api/authentication/MidPointUserProfilePrincipal.java new file mode 100644 index 00000000000..2b894caf2a3 --- /dev/null +++ b/model/model-api/src/main/java/com/evolveum/midpoint/model/api/authentication/MidPointUserProfilePrincipal.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2010-2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.model.api.authentication; + +import java.util.ArrayList; +import java.util.Collection; + +import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType; + +import org.apache.commons.lang.Validate; +import org.jetbrains.annotations.NotNull; +import org.springframework.security.core.userdetails.UserDetails; + +import com.evolveum.midpoint.prism.delta.PrismValueDeltaSetTriple; +import com.evolveum.midpoint.security.api.MidPointPrincipal; +import com.evolveum.midpoint.util.DebugDumpable; +import com.evolveum.midpoint.util.DebugUtil; +import com.evolveum.midpoint.util.ShortDumpable; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType; +import com.evolveum.prism.xml.ns._public.types_3.PolyStringType; + +/** + * Principal that extends simple MidPointPrincipal with user interface concepts (user profile). + * + * @since 4.0 + * @author Radovan Semancik + */ +public class MidPointUserProfilePrincipal extends MidPointPrincipal { + private static final long serialVersionUID = 1L; + + private CompiledUserProfile compiledUserProfile; + + public MidPointUserProfilePrincipal(@NotNull UserType user) { + super(user); + } + + @NotNull + public CompiledUserProfile getCompiledUserProfile() { + if (compiledUserProfile == null) { + compiledUserProfile = new CompiledUserProfile(); + } + return compiledUserProfile; + } + + public void setCompiledUserProfile(CompiledUserProfile compiledUserProfile) { + this.compiledUserProfile = compiledUserProfile; + } + + /** + * Semi-shallow clone. + */ + public MidPointUserProfilePrincipal clone() { + MidPointUserProfilePrincipal clone = new MidPointUserProfilePrincipal(this.getUser()); + copyValues(clone); + return clone; + } + + protected void copyValues(MidPointUserProfilePrincipal clone) { + super.copyValues(clone); + // No need to clone user profile here. It is essentially read-only. + clone.compiledUserProfile = this.compiledUserProfile; + } + + @Override + protected void debugDumpInternal(StringBuilder sb, int indent) { + super.debugDumpInternal(sb, indent); + sb.append("\n"); + DebugUtil.debugDumpWithLabel(sb, "compiledUserProfile", compiledUserProfile, indent + 1); + } + +} diff --git a/model/model-api/src/main/java/com/evolveum/midpoint/model/api/authentication/UserProfileService.java b/model/model-api/src/main/java/com/evolveum/midpoint/model/api/authentication/UserProfileService.java new file mode 100644 index 00000000000..4184f959239 --- /dev/null +++ b/model/model-api/src/main/java/com/evolveum/midpoint/model/api/authentication/UserProfileService.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.model.api.authentication; + +import com.evolveum.midpoint.prism.PrismObject; +import com.evolveum.midpoint.schema.result.OperationResult; +import com.evolveum.midpoint.security.api.AuthorizationTransformer; +import com.evolveum.midpoint.security.api.MidPointPrincipal; +import com.evolveum.midpoint.security.api.MidPointPrincipalManager; +import com.evolveum.midpoint.util.exception.CommunicationException; +import com.evolveum.midpoint.util.exception.ConfigurationException; +import com.evolveum.midpoint.util.exception.ExpressionEvaluationException; +import com.evolveum.midpoint.util.exception.ObjectNotFoundException; +import com.evolveum.midpoint.util.exception.SchemaException; +import com.evolveum.midpoint.util.exception.SecurityViolationException; +import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType; + +/** + * @author semancik + * + */ +public interface UserProfileService extends MidPointPrincipalManager { + + @Override + MidPointUserProfilePrincipal getPrincipal(String username) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException; + + @Override + MidPointUserProfilePrincipal getPrincipalByOid(String oid) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException; + + @Override + MidPointUserProfilePrincipal getPrincipal(PrismObject user) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException; + + @Override + MidPointUserProfilePrincipal getPrincipal(PrismObject user, AuthorizationTransformer authorizationTransformer, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException; + + @Override + void updateUser(MidPointPrincipal principal); + +} diff --git a/model/model-api/src/main/java/com/evolveum/midpoint/model/api/util/DeputyUtils.java b/model/model-api/src/main/java/com/evolveum/midpoint/model/api/util/DeputyUtils.java index 825b03137cc..cec9c4ead4e 100644 --- a/model/model-api/src/main/java/com/evolveum/midpoint/model/api/util/DeputyUtils.java +++ b/model/model-api/src/main/java/com/evolveum/midpoint/model/api/util/DeputyUtils.java @@ -86,7 +86,7 @@ public static boolean limitationsAllow(List limit for (OtherPrivilegesLimitationType limitation : limitations) { @SuppressWarnings({ "unchecked", "raw" }) PrismContainer selector = limitation.asPrismContainerValue().findContainer(itemName); - if (selector == null || selector.isEmpty() || !selector.getValue().asContainerable().isAll()) { + if (selector == null || selector.isEmpty() || !selector.getRealValue().isAll()) { return false; } } diff --git a/model/model-common/src/main/java/com/evolveum/midpoint/model/common/stringpolicy/ValuePolicyProcessor.java b/model/model-common/src/main/java/com/evolveum/midpoint/model/common/stringpolicy/ValuePolicyProcessor.java index e0b9a66eb2c..aff54adb35b 100644 --- a/model/model-common/src/main/java/com/evolveum/midpoint/model/common/stringpolicy/ValuePolicyProcessor.java +++ b/model/model-common/src/main/java/com/evolveum/midpoint/model/common/stringpolicy/ValuePolicyProcessor.java @@ -160,7 +160,7 @@ public String generate(ItemPath path, ValuePolicyType pol } LOGGER.trace("Generator attempt {}: check failed", attempt); if (attempt == maxAttempts) { - ExpressionEvaluationException e = new ExpressionEvaluationException("Unable to generate value, maximum number of attempts exceeded"); + ExpressionEvaluationException e = new ExpressionEvaluationException("Unable to generate value, maximum number of attempts ("+maxAttempts+") exceeded"); result.recordFatalError(e); throw e; } diff --git a/model/model-common/src/test/java/com/evolveum/midpoint/model/common/mapping/TestMappingDynamicSimple.java b/model/model-common/src/test/java/com/evolveum/midpoint/model/common/mapping/TestMappingDynamicSimple.java index 7faf9aa5a15..2a2cdfe0362 100644 --- a/model/model-common/src/test/java/com/evolveum/midpoint/model/common/mapping/TestMappingDynamicSimple.java +++ b/model/model-common/src/test/java/com/evolveum/midpoint/model/common/mapping/TestMappingDynamicSimple.java @@ -1041,7 +1041,7 @@ public void testInboundMapping() throws Exception{ PrismObject account = PrismTestUtil.parseObject(new File(MappingTestEvaluator.TEST_DIR + "/account-inbound-mapping.xml")); Item oldItem = account.findItem(ItemPath.create(ShadowType.F_ATTRIBUTES, SchemaTestConstants.ICFS_NAME)); - ItemDelta delta = prismContext.deltaFactory().property().createModificationAddProperty(SchemaTestConstants.ICFS_NAME_PATH_PARTS, (PrismPropertyDefinition) oldItem.getDefinition(), ((PrismPropertyValue) oldItem.getValue(0)).getValue()); + ItemDelta delta = prismContext.deltaFactory().property().createModificationAddProperty(SchemaTestConstants.ICFS_NAME_PATH_PARTS, (PrismPropertyDefinition) oldItem.getDefinition(), ((PrismPropertyValue) oldItem.getAnyValue()).getValue()); PrismObject user = evaluator.getUserDefinition().instantiate(); diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/ModelWebService.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/ModelWebService.java index ef8fb845ae4..4cfe76cea01 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/ModelWebService.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/ModelWebService.java @@ -236,7 +236,7 @@ private List> parseScripts(ExecuteScriptsType parameters) throws // here comes MSL script decoding (however with a quick hack to allow passing XML as text here) String scriptsAsString = parameters.getMslScripts(); if (scriptsAsString.startsWith(" expressionType = (PrismProperty) prismContext.parserFor(scriptsAsString).xml().parseItem(); if (expressionType.size() != 1) { throw new IllegalArgumentException("Unexpected number of scripting expressions at input: " + expressionType.size() + " (expected 1)"); } diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelController.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelController.java index 22fd940fe16..381e2802f99 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelController.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelController.java @@ -21,6 +21,7 @@ import com.evolveum.midpoint.audit.api.AuditService; import com.evolveum.midpoint.certification.api.CertificationManager; import com.evolveum.midpoint.model.api.*; +import com.evolveum.midpoint.model.api.authentication.UserProfileService; import com.evolveum.midpoint.model.api.hooks.HookRegistry; import com.evolveum.midpoint.model.api.hooks.ReadHook; import com.evolveum.midpoint.model.common.SystemObjectCache; @@ -60,7 +61,6 @@ import com.evolveum.midpoint.schema.util.ShadowUtil; import com.evolveum.midpoint.security.api.AuthorizationConstants; import com.evolveum.midpoint.security.api.SecurityContextManager; -import com.evolveum.midpoint.security.api.UserProfileService; import com.evolveum.midpoint.security.enforcer.api.AuthorizationParameters; import com.evolveum.midpoint.security.enforcer.api.SecurityEnforcer; import com.evolveum.midpoint.task.api.Task; diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelInteractionServiceImpl.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelInteractionServiceImpl.java index 5e435fda873..8b47d61fd4c 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelInteractionServiceImpl.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelInteractionServiceImpl.java @@ -61,6 +61,9 @@ import com.evolveum.midpoint.model.api.ModelService; import com.evolveum.midpoint.model.api.ProgressListener; import com.evolveum.midpoint.model.api.RoleSelectionSpecification; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; +import com.evolveum.midpoint.model.api.authentication.MidPointUserProfilePrincipal; +import com.evolveum.midpoint.model.api.authentication.UserProfileService; import com.evolveum.midpoint.model.api.context.EvaluatedAssignment; import com.evolveum.midpoint.model.api.context.EvaluatedAssignmentTarget; import com.evolveum.midpoint.model.api.context.ModelContext; @@ -89,6 +92,7 @@ import com.evolveum.midpoint.model.impl.lens.projector.MappingEvaluator; import com.evolveum.midpoint.model.impl.lens.projector.Projector; import com.evolveum.midpoint.model.impl.security.SecurityHelper; +import com.evolveum.midpoint.model.impl.security.UserProfileCompiler; import com.evolveum.midpoint.model.impl.util.ModelImplUtils; import com.evolveum.midpoint.model.impl.visualizer.Visualizer; import com.evolveum.midpoint.prism.crypto.EncryptionException; @@ -109,7 +113,6 @@ import com.evolveum.midpoint.schema.util.ShadowUtil; import com.evolveum.midpoint.security.api.MidPointPrincipal; import com.evolveum.midpoint.security.api.SecurityContextManager; -import com.evolveum.midpoint.security.api.UserProfileService; import com.evolveum.midpoint.security.enforcer.api.ItemSecurityConstraints; import com.evolveum.midpoint.security.enforcer.api.ObjectSecurityConstraints; import com.evolveum.midpoint.security.enforcer.api.SecurityEnforcer; @@ -185,7 +188,8 @@ public class ModelInteractionServiceImpl implements ModelInteractionService { @Autowired private ActivationComputer activationComputer; @Autowired private Clock clock; @Autowired private HookRegistry hookRegistry; - @Autowired UserProfileService userProfileService; + @Autowired private UserProfileService userProfileService; + @Autowired private UserProfileCompiler userProfileCompiler; @Autowired private ExpressionFactory expressionFactory; @Autowired private OperationalDataManager metadataManager; @Autowired private Clockwork clockwork; @@ -298,7 +302,7 @@ public PrismObjectDefinition getEditObjectDefinition(P } RefinedObjectClassDefinition refinedObjectClassDefinition = getEditObjectClassDefinition(shadow, resource, phase, task, result); if (refinedObjectClassDefinition != null) { - prismContext.hacks().replaceDefinition(objectDefinition.getComplexTypeDefinition(), ShadowType.F_ATTRIBUTES, + objectDefinition.getComplexTypeDefinition().toMutable().replaceDefinition(ShadowType.F_ATTRIBUTES, refinedObjectClassDefinition.toResourceAttributeContainerDefinition()); } } @@ -745,12 +749,7 @@ public SecurityPolicyType getSecurityPolicy(PrismObject user, Task tas @NotNull @Override - public AdminGuiConfigurationType getAdminGuiConfiguration(Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException { - AdminGuiConfigurationType config = getAdminGuiConfigurationInternal(task, parentResult); - return config != null ? config : new AdminGuiConfigurationType(); - } - - public AdminGuiConfigurationType getAdminGuiConfigurationInternal(Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException { + public CompiledUserProfile getCompiledUserProfile(Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { MidPointPrincipal principal = null; try { principal = securityContextManager.getPrincipal(); @@ -758,14 +757,11 @@ public AdminGuiConfigurationType getAdminGuiConfigurationInternal(Task task, Ope LOGGER.warn("Security violation while getting principlal to get GUI config: {}", e.getMessage(), e); } - if (principal == null) { - PrismObject systemConfiguration = systemObjectCache.getSystemConfiguration(parentResult); - if (systemConfiguration == null) { - return null; - } - return systemConfiguration.asObjectable().getAdminGuiConfiguration(); + if (principal == null || !(principal instanceof MidPointUserProfilePrincipal)) { + // May be used for unathenticated user, error pages and so on + return userProfileCompiler.getGlobalCompiledUserProfile(task, parentResult); } else { - return principal.getAdminGuiConfiguration(); + return ((MidPointUserProfilePrincipal)principal).getCompiledUserProfile(); } } diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ObjectMerger.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ObjectMerger.java index b33564672c3..2760bf2b5d3 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ObjectMerger.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ObjectMerger.java @@ -215,7 +215,7 @@ public void visit(Visitable visitable) { Item item = (Item)visitable; ItemPath itemPath = item.getPath(); - if (itemPath == null || itemPath.isEmpty()) { + if (itemPath.isEmpty()) { return; } diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/SchemaTransformer.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/SchemaTransformer.java index aa77ec20d59..7620ea9f23b 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/SchemaTransformer.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/SchemaTransformer.java @@ -269,6 +269,10 @@ public void applySchemasAndSecurity(LensContext contex AuthorizationDecisionType assignmentDecision = securityConstraints.findItemDecision(SchemaConstants.PATH_ASSIGNMENT, ModelAuthorizationAction.AUTZ_ACTIONS_URLS_GET, phase); if (!AuthorizationDecisionType.ALLOW.equals(assignmentDecision)) { + if (LOGGER.isTraceEnabled()) { + LOGGER.trace("Logged in user isn't authorized to read (or get) assignment item of the object: {}", object); + } + result.recordWarning("Logged in user isn't authorized to read (or get) assignment item of the object: " + object); context.setEvaluatedAssignmentTriple(null); } diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/AssignmentPathSegmentImpl.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/AssignmentPathSegmentImpl.java index 94f463e5deb..d419de3e1de 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/AssignmentPathSegmentImpl.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/AssignmentPathSegmentImpl.java @@ -328,7 +328,7 @@ public AssignmentType getAssignmentNew() { if (assignmentIdi == null || assignmentIdi.getItemNew() == null || assignmentIdi.getItemNew().isEmpty()) { return null; } - return ((PrismContainer) assignmentIdi.getItemNew()).getValue().asContainerable(); + return ((PrismContainer) assignmentIdi.getItemNew()).getRealValue(); } @Override @@ -551,7 +551,7 @@ public void shortDump(StringBuilder sb) { sb.append("inducement "); } PrismContainer assignment = (PrismContainer) assignmentIdi.getAnyItem(); - AssignmentType assignmentType = assignment != null ? assignment.getValue().asContainerable() : null; + AssignmentType assignmentType = assignment != null ? assignment.getRealValue() : null; if (assignmentType != null) { sb.append("id:").append(assignmentType.getId()).append(" "); if (assignmentType.getConstruction() != null) { diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/ChangeExecutor.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/ChangeExecutor.java index 1caf2a53ff1..a49b1b8c1e8 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/ChangeExecutor.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/ChangeExecutor.java @@ -25,6 +25,7 @@ import com.evolveum.midpoint.common.Clock; import com.evolveum.midpoint.common.SynchronizationUtils; import com.evolveum.midpoint.prism.delta.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.prism.xnode.PrimitiveXNode; import com.evolveum.midpoint.prism.xnode.XNodeFactory; @@ -476,7 +477,7 @@ private void swallowIntoValues(Collection assignments, Assignmen for (AssignmentType assignment : assignments) { PrismContainerValue pcv = assignment.asPrismContainerValue(); PrismContainerValue pcvToFind = assignmentToFind.asPrismContainerValue(); - if (pcv.representsSameValue(pcvToFind, false) || pcv.equalsRealValue(pcvToFind)) { + if (pcv.representsSameValue(pcvToFind, false) || pcv.equals(pcvToFind, EquivalenceStrategy.REAL_VALUE)) { // TODO what if ID of the assignment being added is changed in repo? Hopefully it will be not. for (ItemDelta modification : modifications) { ItemPath newParentPath = modification.getParentPath().rest(2); // killing assignment + ID @@ -498,7 +499,7 @@ private void applyLastProvisioningTimestamp(LensContext objectToAdd = focusDelta.getObjectToAdd(); PrismContainer metadataContainer = objectToAdd.findOrCreateContainer(ObjectType.F_METADATA); - metadataContainer.getValue().asContainerable().setLastProvisioningTimestamp(clock.currentTimeXMLGregorianCalendar()); + metadataContainer.getRealValue().setLastProvisioningTimestamp(clock.currentTimeXMLGregorianCalendar()); } else if (focusDelta.isModify()) { @@ -997,7 +998,7 @@ private void removeExecutedItemDelta Iterator objectDeltaIterator = objectDelta.getModifications().iterator(); while (objectDeltaIterator.hasNext()) { ItemDelta d = objectDeltaIterator.next(); - if (executed.containsModification(d, true, true) || d.isEmpty()) { + if (executed.containsModification(d, EquivalenceStrategy.LITERAL_IGNORE_METADATA) || d.isEmpty()) { // todo why literal? objectDeltaIterator.remove(); } } diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/ClockworkAuthorizationHelper.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/ClockworkAuthorizationHelper.java index e498b5252c5..e263d8729c4 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/ClockworkAuthorizationHelper.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/ClockworkAuthorizationHelper.java @@ -132,7 +132,7 @@ private ObjectSecurityConstraints a // the same account in one operation object = elementContext.getObjectNew(); } - String operationUrl = ModelImplUtils.getOperationUrlFromDelta(primaryDeltaClone); + String deltaOperationUrl = ModelImplUtils.getOperationUrlFromDelta(primaryDeltaClone); ObjectSecurityConstraints securityConstraints = securityEnforcer.compileSecurityConstraints(object, ownerResolver, task, result); if (securityConstraints == null) { if (LOGGER.isTraceEnabled()) { @@ -145,10 +145,10 @@ private ObjectSecurityConstraints a // Process assignments/inducements first. If the assignments/inducements are allowed then we // have to ignore the assignment item in subsequent security checks if (object.canRepresent(FocusType.class)) { - processAssignment(context, elementContext, primaryDeltaClone, operationUrl, FocusType.F_ASSIGNMENT, object, ownerResolver, securityConstraints, task, result); + processAssignment(context, elementContext, primaryDeltaClone, deltaOperationUrl, FocusType.F_ASSIGNMENT, object, ownerResolver, securityConstraints, task, result); } if (object.canRepresent(AbstractRoleType.class)) { - processAssignment(context, elementContext, primaryDeltaClone, operationUrl, AbstractRoleType.F_INDUCEMENT, object, ownerResolver, securityConstraints, task, result); + processAssignment(context, elementContext, primaryDeltaClone, deltaOperationUrl, AbstractRoleType.F_INDUCEMENT, object, ownerResolver, securityConstraints, task, result); } } @@ -205,7 +205,7 @@ private ObjectSecurityConstraints a if (primaryDeltaClone != null && !primaryDeltaClone.isEmpty()) { // TODO: optimize, avoid evaluating the constraints twice - securityEnforcer.authorize(operationUrl, getRequestAuthorizationPhase(context) , AuthorizationParameters.Builder.buildObjectDelta(object, primaryDeltaClone), ownerResolver, task, result); + securityEnforcer.authorize(deltaOperationUrl, getRequestAuthorizationPhase(context) , AuthorizationParameters.Builder.buildObjectDelta(object, primaryDeltaClone), ownerResolver, task, result); } if (LOGGER.isTraceEnabled()) { @@ -225,7 +225,7 @@ private void processAssignment( LensContext context, LensElementContext elementContext, ObjectDelta primaryDeltaClone, - String operationUrl, + String deltaOperationUrl, ItemName assignmentElementQName, PrismObject object, OwnerResolver ownerResolver, @@ -240,7 +240,7 @@ private void processAssignment( } if (primaryDeltaClone.hasItemOrSubitemDelta(assignmentElementQName)) { - AccessDecision assignmentItemDecision = determineDecisionForAssignmentItems(securityConstraints, primaryDeltaClone, currentObject, operationUrl, getRequestAuthorizationPhase(context)); + AccessDecision assignmentItemDecision = determineDecisionForAssignmentItems(securityConstraints, primaryDeltaClone, currentObject, deltaOperationUrl, assignmentElementQName, getRequestAuthorizationPhase(context)); LOGGER.trace("Security decision for {} items: {}", assignmentElementQName.getLocalPart(), assignmentItemDecision); if (assignmentItemDecision == AccessDecision.ALLOW) { // Nothing to do, operation is allowed for all values @@ -252,7 +252,7 @@ private void processAssignment( } throw new AuthorizationException("Access denied"); } else { - AuthorizationDecisionType allItemsDecision = securityConstraints.findAllItemsDecision(operationUrl, getRequestAuthorizationPhase(context)); + AuthorizationDecisionType allItemsDecision = securityConstraints.findAllItemsDecision(deltaOperationUrl, getRequestAuthorizationPhase(context)); if (allItemsDecision == AuthorizationDecisionType.ALLOW) { // Nothing to do, operation is allowed for all values } else if (allItemsDecision == AuthorizationDecisionType.DENY) { @@ -263,14 +263,14 @@ private void processAssignment( } else { // No blank decision for assignment modification yet // process each assignment individually - authorizeAssignmentRequest(context, operationUrl, ModelAuthorizationAction.ASSIGN.getUrl(), + authorizeAssignmentRequest(context, deltaOperationUrl, ModelAuthorizationAction.ASSIGN.getUrl(), assignmentElementQName, object, ownerResolver, securityConstraints, PlusMinusZero.PLUS, true, task, result); if (!primaryDeltaClone.isAdd()) { // We want to allow unassignment even if there are policies. Otherwise we would not be able to get // rid of that assignment - authorizeAssignmentRequest(context, operationUrl, ModelAuthorizationAction.UNASSIGN.getUrl(), + authorizeAssignmentRequest(context, deltaOperationUrl, ModelAuthorizationAction.UNASSIGN.getUrl(), assignmentElementQName, object, ownerResolver, securityConstraints, PlusMinusZero.MINUS, false, task, result); } @@ -393,7 +393,7 @@ private void authorizeAssignmentRequ if (LOGGER.isDebugEnabled()) { LOGGER.debug("{} of target {} to {} denied", operationDesc, target, object); } - securityEnforcer.failAuthorization("with assignment", getRequestAuthorizationPhase(context), autzParams, result); + securityEnforcer.failAuthorization("with "+assignmentElementQName.getLocalPart(), getRequestAuthorizationPhase(context), autzParams, result); } } @@ -419,9 +419,9 @@ private List deterimneOrderConstraints(QName assignmentEle } private AccessDecision determineDecisionForAssignmentItems( - ObjectSecurityConstraints securityConstraints, ObjectDelta primaryDelta, PrismObject currentObject, String operationUrl, - AuthorizationPhaseType requestAuthorizationPhase) { - return securityEnforcer.determineSubitemDecision(securityConstraints, primaryDelta, currentObject, operationUrl, requestAuthorizationPhase, SchemaConstants.PATH_ASSIGNMENT); + ObjectSecurityConstraints securityConstraints, ObjectDelta primaryDelta, PrismObject currentObject, String deltaOperationUrl, + ItemName assignmentElementQName, AuthorizationPhaseType requestAuthorizationPhase) { + return securityEnforcer.determineSubitemDecision(securityConstraints, primaryDelta, currentObject, deltaOperationUrl, requestAuthorizationPhase, assignmentElementQName); } private AuthorizationPhaseType getRequestAuthorizationPhase(LensContext context) { diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/EvaluatedAssignmentImpl.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/EvaluatedAssignmentImpl.java index c247671f28d..8867ce01b27 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/EvaluatedAssignmentImpl.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/EvaluatedAssignmentImpl.java @@ -123,7 +123,7 @@ public AssignmentType getAssignmentType() { @Override public Long getAssignmentId() { Item, PrismContainerDefinition> any = assignmentIdi.getAnyItem(); - return any != null && !any.getValues().isEmpty() ? any.getValue(0).getId() : null; + return any != null && !any.getValues().isEmpty() ? any.getAnyValue().getId() : null; } @Override diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/ItemValueWithOrigin.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/ItemValueWithOrigin.java index c7c73edbc89..022e8da8be1 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/ItemValueWithOrigin.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/ItemValueWithOrigin.java @@ -26,6 +26,7 @@ import com.evolveum.midpoint.prism.PrismValue; import com.evolveum.midpoint.prism.delta.DeltaSetTriple; import com.evolveum.midpoint.prism.delta.PrismValueDeltaSetTriple; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.util.DebugDumpable; import com.evolveum.midpoint.util.DebugUtil; import com.evolveum.midpoint.util.exception.SchemaException; @@ -85,7 +86,7 @@ public boolean equalsRealValue(V pvalue, ValueMatcher valueMatcher) throw return false; } if (valueMatcher == null) { - return itemValue.equalsRealValue(pvalue); + return itemValue.equals(pvalue, EquivalenceStrategy.IGNORE_METADATA); } else { // this must be a property, otherwise there would be no matcher return valueMatcher.match(((PrismPropertyValue)itemValue).getValue(), diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/IvwoConsolidator.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/IvwoConsolidator.java index 7a77b71fb7e..a9fd91c1749 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/IvwoConsolidator.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/IvwoConsolidator.java @@ -24,6 +24,7 @@ import java.util.List; import com.evolveum.midpoint.prism.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import org.apache.commons.lang.mutable.MutableBoolean; import org.jetbrains.annotations.NotNull; @@ -526,7 +527,7 @@ private boolean hasValue(Item existingUserItem, V newValue) { if (valueMatcher != null && newValue instanceof PrismPropertyValue) { return valueMatcher.hasRealValue((PrismProperty)existingUserItem, (PrismPropertyValue)newValue); } else { - return existingUserItem.contains(newValue, true, comparator); + return existingUserItem.contains(newValue, EquivalenceStrategy.IGNORE_METADATA, comparator); } } diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/LensElementContext.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/LensElementContext.java index 73d2c58e4f0..ec936ea4961 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/LensElementContext.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/LensElementContext.java @@ -22,6 +22,7 @@ import com.evolveum.midpoint.prism.Objectable; import com.evolveum.midpoint.prism.delta.*; import com.evolveum.midpoint.prism.delta.builder.S_ItemEntry; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.util.ObjectDeltaObject; import com.evolveum.midpoint.schema.DeltaConvertor; import com.evolveum.midpoint.schema.result.OperationResult; @@ -282,7 +283,7 @@ public ObjectDelta swallowToDelta(ObjectDelta originalDelta, ItemDelta propDelta) thro secondaryDelta = getPrismContext().deltaFactory().object().create(getObjectTypeClass(), ChangeType.MODIFY); secondaryDelta.setOid(getOid()); setProjectionWaveSecondaryDelta(secondaryDelta); - } else if (secondaryDelta.containsModification(propDelta, true, true)) { + } else if (secondaryDelta.containsModification(propDelta, EquivalenceStrategy.LITERAL_IGNORE_METADATA)) { // todo why literal? return; } @@ -197,7 +198,7 @@ public void swallowToSecondaryDelta(ItemDelta propDelta) throws SchemaExcep secondaryDelta = getPrismContext().deltaFactory().object().create(getObjectTypeClass(), ChangeType.MODIFY); secondaryDelta.setOid(getOid()); setSecondaryDelta(secondaryDelta, 0); - } else if (secondaryDelta.containsModification(propDelta, true, true)) { + } else if (secondaryDelta.containsModification(propDelta, EquivalenceStrategy.LITERAL_IGNORE_METADATA)) { // todo why literal? return; } @@ -206,12 +207,12 @@ public void swallowToSecondaryDelta(ItemDelta propDelta) throws SchemaExcep public boolean alreadyHasDelta(ItemDelta itemDelta) { ObjectDelta primaryDelta = getPrimaryDelta(); - if (primaryDelta != null && primaryDelta.containsModification(itemDelta, true, true)) { + if (primaryDelta != null && primaryDelta.containsModification(itemDelta, EquivalenceStrategy.LITERAL_IGNORE_METADATA)) { // todo why literal? return true; } if (secondaryDeltas != null) { for (ObjectDelta waveSecondaryDelta: secondaryDeltas) { - if (waveSecondaryDelta != null && waveSecondaryDelta.containsModification(itemDelta, true, true)) { + if (waveSecondaryDelta != null && waveSecondaryDelta.containsModification(itemDelta, EquivalenceStrategy.LITERAL_IGNORE_METADATA)) { // todo why literal? return true; } } diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/LensUtil.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/LensUtil.java index 5eb253b8e72..85eb10f9da7 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/LensUtil.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/LensUtil.java @@ -202,7 +202,7 @@ private static V cloneAndApplyMetadata(V value, boolean i if (originMappingName != null) { //noinspection unchecked PrismContainer metadataContainer = ((PrismContainerValue) cloned).findOrCreateContainer(AssignmentType.F_METADATA); - metadataContainer.getOrCreateValue().asContainerable().setOriginMappingName(originMappingName); + metadataContainer.getValue().asContainerable().setOriginMappingName(originMappingName); } } return cloned; @@ -249,7 +249,7 @@ public static void moveTriggers(LensProjectionContext pro Iterator iterator = modifications.iterator(); while (iterator.hasNext()) { ItemDelta projModification = iterator.next(); - LOGGER.trace("MOD: {}\n{}", projModification.getPath(), projModification.debugDump()); + LOGGER.trace("MOD: {}\n{}", projModification.getPath(), projModification.debugDumpLazily()); if (projModification.getPath().equivalent(SchemaConstants.PATH_TRIGGER)) { focusCtx.swallowToProjectionWaveSecondaryDelta(projModification); iterator.remove(); diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/SmartAssignmentKey.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/SmartAssignmentKey.java index cb7f5716e85..acd2134e26e 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/SmartAssignmentKey.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/SmartAssignmentKey.java @@ -16,6 +16,7 @@ package com.evolveum.midpoint.model.impl.lens.projector; import com.evolveum.midpoint.prism.PrismContainerValue; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.util.logging.Trace; import com.evolveum.midpoint.util.logging.TraceManager; import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType; @@ -68,7 +69,7 @@ public boolean equals(Object obj) { } private boolean equalsAssignment(PrismContainerValue other) { - return assignmentCVal.match(other); + return assignmentCVal.equals(other, EquivalenceStrategy.IGNORE_METADATA); } @Override diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/credentials/CredentialPolicyEvaluator.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/credentials/CredentialPolicyEvaluator.java index f8859ba53b3..4c1c274a3d0 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/credentials/CredentialPolicyEvaluator.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/credentials/CredentialPolicyEvaluator.java @@ -511,7 +511,7 @@ private void addHistoryDeltas() throws SchemaException { // TODO: generalize for other credentials private int createAddHistoryDelta(PrismContainer oldCredentialContainer) throws SchemaException { - R oldCredentialContainerType = oldCredentialContainer.getValue().asContainerable(); + R oldCredentialContainerType = oldCredentialContainer.getRealValue(); MetadataType oldCredentialMetadata = oldCredentialContainerType.getMetadata(); PrismProperty oldValueProperty = oldCredentialContainer.findProperty(getCredentialRelativeValuePath()); diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/focus/InboundProcessor.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/focus/InboundProcessor.java index a7466cca9ad..9660385b0f0 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/focus/InboundProcessor.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/focus/InboundProcessor.java @@ -33,6 +33,7 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -863,9 +864,9 @@ private DeltaSetTriple minusValue: originTriples.getMinusSet()) { - if (minusValue.getItemValue().equalsRealValue(plusValue.getItemValue())) { + if (minusValue.getItemValue().equals(plusValue.getItemValue(), EquivalenceStrategy.REAL_VALUE)) { LOGGER.trace( - "Removing value {} from minus set -> moved to the zero, becuase the same value present in plus and minus set at the same time", + "Removing value {} from minus set -> moved to the zero, because the same value present in plus and minus set at the same time", minusValue.debugDumpLazily()); consolidatedMinusSet.remove(minusValue); consolidatedPlusSet.remove(plusValue); @@ -877,9 +878,9 @@ private DeltaSetTriple zeroValue: originTriples.getZeroSet()) { - if (zeroValue.getItemValue().equalsRealValue(plusValue.getItemValue())) { + if (zeroValue.getItemValue().equals(plusValue.getItemValue(), EquivalenceStrategy.REAL_VALUE)) { LOGGER.trace( - "Removing value {} from plus set -> moved to the zero, becuase the same value present in plus and minus set at the same time", + "Removing value {} from plus set -> moved to the zero, because the same value present in plus and minus set at the same time", zeroValue.debugDumpLazily()); consolidatedPlusSet.remove(plusValue); consolidated = true; @@ -905,9 +906,9 @@ private DeltaSetTriple minusValue : originTriples.getMinusSet()) { - if (minusValue.getItemValue().equalsRealValue(zeroValue.getItemValue())) { + if (minusValue.getItemValue().equals(zeroValue.getItemValue(), EquivalenceStrategy.REAL_VALUE)) { LOGGER.trace( - "Removing value {} from minus set -> moved to the zero, becuase the same value present in zero and minus set at the same time", + "Removing value {} from minus set -> moved to the zero, because the same value present in zero and minus set at the same time", minusValue.debugDumpLazily()); consolidatedMinusSet.remove(minusValue); consolidatedZeroSet.add(minusValue); @@ -919,9 +920,9 @@ private DeltaSetTriple plusValue : originTriples.getPlusSet()) { - if (plusValue.getItemValue().equalsRealValue(zeroValue.getItemValue())) { + if (plusValue.getItemValue().equals(zeroValue.getItemValue(), EquivalenceStrategy.REAL_VALUE)) { LOGGER.trace( - "Removing value {} from plus set -> moved to the zero, becuase the same value present in zero and plus set at the same time", + "Removing value {} from plus set -> moved to the zero, because the same value present in zero and plus set at the same time", plusValue.debugDumpLazily()); consolidatedPlusSet.remove(plusValue); consolidatedZeroSet.add(plusValue); @@ -948,9 +949,9 @@ private DeltaSetTriple plusValue : originTriples.getPlusSet()) { - if (plusValue.getItemValue().equalsRealValue(minusValue.getItemValue())) { + if (plusValue.getItemValue().equals(minusValue.getItemValue(), EquivalenceStrategy.REAL_VALUE)) { LOGGER.trace( - "Removing value {} from minus set -> moved to the zero, becuase the same value present in plus and minus set at the same time", + "Removing value {} from minus set -> moved to the zero, because the same value present in plus and minus set at the same time", plusValue.debugDumpLazily()); consolidatedPlusSet.remove(plusValue); consolidatedMinusSet.remove(minusValue); @@ -963,9 +964,9 @@ private DeltaSetTriple zeroValue : originTriples.getZeroSet()) { - if (zeroValue.getItemValue().equalsRealValue(minusValue.getItemValue())) { + if (zeroValue.getItemValue().equals(minusValue.getItemValue(), EquivalenceStrategy.REAL_VALUE)) { LOGGER.trace( - "Removing value {} from minus set -> moved to the zero, becuase the same value present in plus and minus set at the same time", + "Removing value {} from minus set -> moved to the zero, because the same value present in plus and minus set at the same time", zeroValue.debugDumpLazily()); consolidatedMinusSet.remove(minusValue); consolidatedZeroSet.add(zeroValue); @@ -997,7 +998,7 @@ private It boolean hasRange, boolean isDelete) throws SchemaException { ItemDelta outputFocusItemDelta = outputDefinition.createEmptyDelta(outputPath); - Item targetFocusItem = null; + Item targetFocusItem = null; if (focusNew != null) { targetFocusItem = focusNew.findItem(outputPath); } @@ -1023,7 +1024,7 @@ private It targetFocusItem = focusNew.findItem(originMapping.getOutputPath()); } V value = valueWithOrigin.getItemValue(); - if (targetFocusItem != null && targetFocusItem.hasValueIgnoringMetadata(value)) { + if (targetFocusItem != null && targetFocusItem.contains(value, EquivalenceStrategy.REAL_VALUE)) { continue; } @@ -1057,7 +1058,7 @@ private It for (ItemValueWithOrigin valueWithOrigin : consolidatedTriples.getMinusSet()) { V value = valueWithOrigin.getItemValue(); - if (targetFocusItem == null || targetFocusItem.hasValueIgnoringMetadata(value)) { + if (targetFocusItem == null || targetFocusItem.contains(value, EquivalenceStrategy.REAL_VALUE)) { if (!outputFocusItemDelta.isReplace()) { // This is not needed if we are going to // replace. In fact it might cause an error. diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/AuthenticationEvaluatorImpl.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/AuthenticationEvaluatorImpl.java index bf6aa3ce57b..bfdbd65882d 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/AuthenticationEvaluatorImpl.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/AuthenticationEvaluatorImpl.java @@ -41,6 +41,7 @@ import com.evolveum.midpoint.common.Clock; import com.evolveum.midpoint.model.api.AuthenticationEvaluator; +import com.evolveum.midpoint.model.api.authentication.UserProfileService; import com.evolveum.midpoint.model.api.context.AbstractAuthenticationContext; import com.evolveum.midpoint.prism.crypto.EncryptionException; import com.evolveum.midpoint.prism.crypto.Protector; diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/SpringAuthenticationInjectorInterceptor.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/SpringAuthenticationInjectorInterceptor.java index 4204fb0e4ff..983e24cc356 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/SpringAuthenticationInjectorInterceptor.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/SpringAuthenticationInjectorInterceptor.java @@ -38,12 +38,13 @@ import org.springframework.security.core.context.SecurityContextHolder; import com.evolveum.midpoint.common.ActivationComputer; +import com.evolveum.midpoint.model.api.authentication.UserProfileService; import com.evolveum.midpoint.schema.constants.SchemaConstants; import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.security.api.AuthorizationConstants; import com.evolveum.midpoint.security.api.ConnectionEnvironment; import com.evolveum.midpoint.security.api.MidPointPrincipal; -import com.evolveum.midpoint.security.api.UserProfileService; +import com.evolveum.midpoint.security.api.MidPointPrincipalManager; import com.evolveum.midpoint.security.enforcer.api.AuthorizationParameters; import com.evolveum.midpoint.security.enforcer.api.SecurityEnforcer; import com.evolveum.midpoint.task.api.Task; diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/UserProfileCompiler.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/UserProfileCompiler.java new file mode 100644 index 00000000000..d018e1cf5ff --- /dev/null +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/UserProfileCompiler.java @@ -0,0 +1,730 @@ +/** + * Copyright (c) 2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.model.impl.security; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; + +import javax.xml.namespace.QName; + +import com.evolveum.midpoint.prism.query.RefFilter; +import org.jetbrains.annotations.NotNull; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Component; + +import com.evolveum.midpoint.common.ActivationComputer; +import com.evolveum.midpoint.common.Clock; +import com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; +import com.evolveum.midpoint.model.api.authentication.MidPointUserProfilePrincipal; +import com.evolveum.midpoint.model.api.context.EvaluatedAssignment; +import com.evolveum.midpoint.model.api.context.EvaluatedAssignmentTarget; +import com.evolveum.midpoint.model.api.util.DeputyUtils; +import com.evolveum.midpoint.model.api.util.ModelUtils; +import com.evolveum.midpoint.model.common.SystemObjectCache; +import com.evolveum.midpoint.model.common.mapping.MappingFactory; +import com.evolveum.midpoint.model.impl.lens.AssignmentEvaluator; +import com.evolveum.midpoint.model.impl.lens.LensContext; +import com.evolveum.midpoint.model.impl.lens.LensContextPlaceholder; +import com.evolveum.midpoint.model.impl.lens.LensUtil; +import com.evolveum.midpoint.model.impl.lens.projector.MappingEvaluator; +import com.evolveum.midpoint.prism.PrismContainerDefinition; +import com.evolveum.midpoint.prism.PrismContainerValue; +import com.evolveum.midpoint.prism.PrismContext; +import com.evolveum.midpoint.prism.PrismObject; +import com.evolveum.midpoint.prism.delta.PlusMinusZero; +import com.evolveum.midpoint.prism.query.ObjectFilter; +import com.evolveum.midpoint.prism.util.ItemDeltaItem; +import com.evolveum.midpoint.prism.util.ObjectDeltaObject; +import com.evolveum.midpoint.repo.api.RepositoryService; +import com.evolveum.midpoint.repo.cache.RepositoryCache; +import com.evolveum.midpoint.repo.common.ObjectResolver; +import com.evolveum.midpoint.schema.RelationRegistry; +import com.evolveum.midpoint.schema.constants.ObjectTypes; +import com.evolveum.midpoint.schema.result.OperationResult; +import com.evolveum.midpoint.schema.util.FocusTypeUtil; +import com.evolveum.midpoint.schema.util.ObjectQueryUtil; +import com.evolveum.midpoint.security.api.Authorization; +import com.evolveum.midpoint.security.api.AuthorizationTransformer; +import com.evolveum.midpoint.security.api.DelegatorWithOtherPrivilegesLimitations; +import com.evolveum.midpoint.security.api.MidPointPrincipal; +import com.evolveum.midpoint.task.api.Task; +import com.evolveum.midpoint.util.QNameUtil; +import com.evolveum.midpoint.util.exception.CommunicationException; +import com.evolveum.midpoint.util.exception.ConfigurationException; +import com.evolveum.midpoint.util.exception.ExpressionEvaluationException; +import com.evolveum.midpoint.util.exception.ObjectNotFoundException; +import com.evolveum.midpoint.util.exception.PolicyViolationException; +import com.evolveum.midpoint.util.exception.SchemaException; +import com.evolveum.midpoint.util.exception.SecurityViolationException; +import com.evolveum.midpoint.util.logging.Trace; +import com.evolveum.midpoint.util.logging.TraceManager; +import com.evolveum.midpoint.xml.ns._public.common.common_3.AbstractObjectTypeConfigurationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationRoleManagementType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ArchetypeType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentHolderType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.CollectionSpecificationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.DashboardWidgetType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.DisplayType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.DistinctSearchOptionType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiActionType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectColumnType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectDetailsPageType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectDetailsSetType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectListViewAdditionalPanelsType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectListViewType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectListViewsType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectCollectionType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectFormType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectFormsType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectPolicyConfigurationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.OtherPrivilegesLimitationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.SearchBoxConfigurationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.UserInterfaceElementVisibilityType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.UserInterfaceFeatureType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType; +import com.evolveum.prism.xml.ns._public.query_3.SearchFilterType; + +/** + * Compiles user interface profile for a particular user. The profile contains essential information needed to efficiently render + * user interface pages for specified user. + * + * This methods in this component may be quite costly to invoke. Therefore it should NOT be invoked for every request. + * The methods are supposed to be invoked once (or several times) during user's session. The result of this method should be + * cached in web session (in principal). + * + * @author Radovan semancik + */ +@Component +public class UserProfileCompiler { + + private static final Trace LOGGER = TraceManager.getTrace(UserProfileCompiler.class); + + @Autowired private SecurityHelper securityHelper; + @Autowired private SystemObjectCache systemObjectCache; + @Autowired private RelationRegistry relationRegistry; + @Autowired private PrismContext prismContext; + @Autowired private MappingFactory mappingFactory; + @Autowired private MappingEvaluator mappingEvaluator; + @Autowired private ActivationComputer activationComputer; + @Autowired private Clock clock; + @Autowired @Qualifier("modelObjectResolver") private ObjectResolver objectResolver; + + @Autowired + @Qualifier("cacheRepositoryService") + private RepositoryService repositoryService; + + public void compileUserProfile(MidPointUserProfilePrincipal principal, PrismObject systemConfiguration, AuthorizationTransformer authorizationTransformer, Task task, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + + principal.setApplicableSecurityPolicy(securityHelper.locateSecurityPolicy(principal.getUser().asPrismObject(), systemConfiguration, task, result)); + + Collection authorizations = principal.getAuthorities(); + List adminGuiConfigurations = new ArrayList<>(); + collect(adminGuiConfigurations, principal, systemConfiguration, authorizationTransformer, task, result); + + CompiledUserProfile compiledUserProfile = compileUserProfile(adminGuiConfigurations, systemConfiguration, task, result); + principal.setCompiledUserProfile(compiledUserProfile); + } + + private void collect(List adminGuiConfigurations, MidPointUserProfilePrincipal principal, PrismObject systemConfiguration, AuthorizationTransformer authorizationTransformer, Task task, OperationResult result) throws SchemaException { + UserType userType = principal.getUser(); + LensContext lensContext = createAuthenticationLensContext(userType.asPrismObject(), systemConfiguration); + + Collection forcedAssignments = null; + try { + forcedAssignments = LensUtil.getForcedAssignments(lensContext.getFocusContext().getLifecycleModel(), + userType.getLifecycleState(), objectResolver, prismContext, task, result); + } catch (ObjectNotFoundException | CommunicationException | ConfigurationException | SecurityViolationException + | ExpressionEvaluationException e1) { + LOGGER.error("Forced assignments defined for lifecycle {} won't be evaluated", userType.getLifecycleState(), e1); + } + if (!userType.getAssignment().isEmpty() || forcedAssignments != null) { + + AssignmentEvaluator.Builder builder = + new AssignmentEvaluator.Builder() + .repository(repositoryService) + .focusOdo(new ObjectDeltaObject<>(userType.asPrismObject(), null, userType.asPrismObject())) + .channel(null) + .objectResolver(objectResolver) + .systemObjectCache(systemObjectCache) + .relationRegistry(relationRegistry) + .prismContext(prismContext) + .mappingFactory(mappingFactory) + .mappingEvaluator(mappingEvaluator) + .activationComputer(activationComputer) + .now(clock.currentTimeXMLGregorianCalendar()) + // We do need only authorizations + gui config. Therefore we not need to evaluate + // constructions and the like, so switching it off makes the evaluation run faster. + // It also avoids nasty problems with resources being down, + // resource schema not available, etc. + .loginMode(true) + // We do not have real lens context here. But the push methods in ModelExpressionThreadLocalHolder + // will need something to push on the stack. So give them context placeholder. + .lensContext(lensContext); + + AssignmentEvaluator assignmentEvaluator = builder.build(); + + evaluateAssignments(userType.getAssignment(), false, assignmentEvaluator, principal, authorizationTransformer, adminGuiConfigurations, task, result); + + evaluateAssignments(forcedAssignments, true, assignmentEvaluator, principal, authorizationTransformer, adminGuiConfigurations, task, result); + } + if (userType.getAdminGuiConfiguration() != null) { + // config from the user object should go last (to be applied as the last one) + adminGuiConfigurations.add(userType.getAdminGuiConfiguration()); + } + + } + + private void evaluateAssignments(Collection assignments, boolean virtual, AssignmentEvaluator assignmentEvaluator, MidPointPrincipal principal, AuthorizationTransformer authorizationTransformer, Collection adminGuiConfigurations, Task task, OperationResult result) { + UserType userType = principal.getUser(); + + Collection authorizations = principal.getAuthorities(); + + + try { + RepositoryCache.enter(); + for (AssignmentType assignmentType: assignments) { + try { + ItemDeltaItem,PrismContainerDefinition> assignmentIdi = new ItemDeltaItem<>(); + assignmentIdi.setItemOld(LensUtil.createAssignmentSingleValueContainerClone(assignmentType)); + assignmentIdi.recompute(); + EvaluatedAssignment assignment = assignmentEvaluator.evaluate(assignmentIdi, PlusMinusZero.ZERO, false, userType, userType.toString(), virtual, task, result); + if (assignment.isValid()) { + addAuthorizations(authorizations, assignment.getAuthorizations(), authorizationTransformer); + adminGuiConfigurations.addAll(assignment.getAdminGuiConfigurations()); + } + for (EvaluatedAssignmentTarget target : assignment.getRoles().getNonNegativeValues()) { + if (target.isValid() && target.getTarget() != null && target.getTarget().asObjectable() instanceof UserType + && DeputyUtils.isDelegationPath(target.getAssignmentPath(), relationRegistry)) { + List limitations = DeputyUtils.extractLimitations(target.getAssignmentPath()); + principal.addDelegatorWithOtherPrivilegesLimitations(new DelegatorWithOtherPrivilegesLimitations( + (UserType) target.getTarget().asObjectable(), limitations)); + } + } + } catch (SchemaException | ObjectNotFoundException | ExpressionEvaluationException | PolicyViolationException | SecurityViolationException | ConfigurationException | CommunicationException e) { + LOGGER.error("Error while processing assignment of {}: {}; assignment: {}", + userType, e.getMessage(), assignmentType, e); + } + } + } finally { + RepositoryCache.exit(); + } + } + + private LensContext createAuthenticationLensContext(PrismObject user, PrismObject systemConfiguration) throws SchemaException { + LensContext lensContext = new LensContextPlaceholder<>(user, prismContext); + if (systemConfiguration != null) { + ObjectPolicyConfigurationType policyConfigurationType = determineObjectPolicyConfiguration(user, systemConfiguration); + lensContext.getFocusContext().setObjectPolicyConfigurationType(policyConfigurationType); + } + return lensContext; + } + + private ObjectPolicyConfigurationType determineObjectPolicyConfiguration(PrismObject user, PrismObject systemConfiguration) throws SchemaException { + ObjectPolicyConfigurationType policyConfigurationType; + try { + policyConfigurationType = ModelUtils.determineObjectPolicyConfiguration(user, systemConfiguration.asObjectable()); + } catch (ConfigurationException e) { + throw new SchemaException(e.getMessage(), e); + } + if (LOGGER.isTraceEnabled()) { + LOGGER.trace("Selected policy configuration from subtypes {}:\n{}", + FocusTypeUtil.determineSubTypes(user), policyConfigurationType==null?null:policyConfigurationType.asPrismContainerValue().debugDump(1)); + } + + return policyConfigurationType; + } + + private void addAuthorizations(Collection targetCollection, Collection sourceCollection, AuthorizationTransformer authorizationTransformer) { + if (sourceCollection == null) { + return; + } + for (Authorization autz: sourceCollection) { + if (authorizationTransformer == null) { + targetCollection.add(autz); + } else { + Collection transformedAutzs = authorizationTransformer.transform(autz); + if (transformedAutzs != null) { + targetCollection.addAll(transformedAutzs); + } + } + } + } + + public CompiledUserProfile compileUserProfile(@NotNull List adminGuiConfigurations, + PrismObject systemConfiguration, Task task, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + + AdminGuiConfigurationType globalAdminGuiConfig = null; + if (systemConfiguration != null) { + globalAdminGuiConfig = systemConfiguration.asObjectable().getAdminGuiConfiguration(); + } + // if there's no admin config at all, return null (to preserve original behavior) + if (adminGuiConfigurations.isEmpty() && globalAdminGuiConfig == null) { + return null; + } + + CompiledUserProfile composite = new CompiledUserProfile(); + if (globalAdminGuiConfig != null) { + applyAdminGuiConfiguration(composite, globalAdminGuiConfig, task, result); + } + for (AdminGuiConfigurationType adminGuiConfiguration: adminGuiConfigurations) { + applyAdminGuiConfiguration(composite, adminGuiConfiguration, task, result); + } + return composite; + } + + private void applyAdminGuiConfiguration(CompiledUserProfile composite, AdminGuiConfigurationType adminGuiConfiguration, Task task, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + if (adminGuiConfiguration == null) { + return; + } + adminGuiConfiguration.getAdditionalMenuLink().forEach(additionalMenuLink -> composite.getAdditionalMenuLink().add(additionalMenuLink.clone())); + adminGuiConfiguration.getUserDashboardLink().forEach(userDashboardLink -> composite.getUserDashboardLink().add(userDashboardLink.clone())); + if (adminGuiConfiguration.getDefaultTimezone() != null) { + composite.setDefaultTimezone(adminGuiConfiguration.getDefaultTimezone()); + } + if (adminGuiConfiguration.getPreferredDataLanguage() != null) { + composite.setPreferredDataLanguage(adminGuiConfiguration.getPreferredDataLanguage()); + } + if (adminGuiConfiguration.isEnableExperimentalFeatures() != null) { + composite.setEnableExperimentalFeatures(adminGuiConfiguration.isEnableExperimentalFeatures()); + } + if (adminGuiConfiguration.getDefaultExportSettings() != null) { + composite.setDefaultExportSettings(adminGuiConfiguration.getDefaultExportSettings().clone()); + } + + applyViews(composite, adminGuiConfiguration.getObjectLists(), task, result); // Compatibility, deprecated + applyViews(composite, adminGuiConfiguration.getObjectCollectionViews(), task, result); + + if (adminGuiConfiguration.getObjectForms() != null) { + if (composite.getObjectForms() == null) { + composite.setObjectForms(adminGuiConfiguration.getObjectForms().clone()); + } else { + for (ObjectFormType objectForm: adminGuiConfiguration.getObjectForms().getObjectForm()) { + joinForms(composite.getObjectForms(), objectForm.clone()); + } + } + } + if (adminGuiConfiguration.getObjectDetails() != null) { + if (composite.getObjectDetails() == null) { + composite.setObjectDetails(adminGuiConfiguration.getObjectDetails().clone()); + } else { + for (GuiObjectDetailsPageType objectDetails: adminGuiConfiguration.getObjectDetails().getObjectDetailsPage()) { + joinObjectDetails(composite.getObjectDetails(), objectDetails); + } + } + } + if (adminGuiConfiguration.getUserDashboard() != null) { + if (composite.getUserDashboard() == null) { + composite.setUserDashboard(adminGuiConfiguration.getUserDashboard().clone()); + } else { + for (DashboardWidgetType widget: adminGuiConfiguration.getUserDashboard().getWidget()) { + mergeWidget(composite, widget); + } + } + } + for (UserInterfaceFeatureType feature: adminGuiConfiguration.getFeature()) { + mergeFeature(composite, feature.clone()); + } + + + if (adminGuiConfiguration.getFeedbackMessagesHook() != null) { + composite.setFeedbackMessagesHook(adminGuiConfiguration.getFeedbackMessagesHook().clone()); + } + + if (adminGuiConfiguration.getRoleManagement() != null && + adminGuiConfiguration.getRoleManagement().getAssignmentApprovalRequestLimit() != null) { + if (composite.getRoleManagement() != null && composite.getRoleManagement().getAssignmentApprovalRequestLimit() != null) { + // the greater value wins (so it is possible to give an exception to selected users) + Integer newValue = Math.max( + adminGuiConfiguration.getRoleManagement().getAssignmentApprovalRequestLimit(), + composite.getRoleManagement().getAssignmentApprovalRequestLimit()); + composite.getRoleManagement().setAssignmentApprovalRequestLimit(newValue); + } else { + if (composite.getRoleManagement() == null) { + composite.setRoleManagement(new AdminGuiConfigurationRoleManagementType()); + } + composite.getRoleManagement().setAssignmentApprovalRequestLimit( + adminGuiConfiguration.getRoleManagement().getAssignmentApprovalRequestLimit()); + } + } + } + + private void applyViews(CompiledUserProfile composite, GuiObjectListViewsType viewsType, Task task, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + if (viewsType == null) { + return; + } + + if (viewsType.getDefault() != null) { + if (composite.getDefaultObjectCollectionView() == null) { + composite.setDefaultObjectCollectionView(new CompiledObjectCollectionView()); + } + compileView(composite.getDefaultObjectCollectionView(), viewsType.getDefault(), task, result); + } + + for (GuiObjectListViewType objectCollectionView : viewsType.getObjectList()) { // Compatibility, legacy + applyView(composite, objectCollectionView, task, result); + } + + for (GuiObjectListViewType objectCollectionView : viewsType.getObjectCollectionView()) { + applyView(composite, objectCollectionView, task, result); + } + } + + private void applyView(CompiledUserProfile composite, GuiObjectListViewType objectListViewType, Task task, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + CompiledObjectCollectionView existingView = findOrCreateMatchingView(composite, objectListViewType); + compileView(existingView, objectListViewType, task, result); + } + + + private CompiledObjectCollectionView findOrCreateMatchingView(CompiledUserProfile composite, GuiObjectListViewType objectListViewType) { + QName objectType = objectListViewType.getType(); + String viewName = determineViewName(objectListViewType); + CompiledObjectCollectionView existingView = composite.findObjectCollectionView(objectType, viewName); + if (existingView == null) { + existingView = new CompiledObjectCollectionView(objectType, viewName); + composite.getObjectCollectionViews().add(existingView); + } + return existingView; + } + + private String determineViewName(GuiObjectListViewType objectListViewType) { + String viewName = objectListViewType.getName(); + if (viewName != null) { + return viewName; + } + CollectionSpecificationType collection = objectListViewType.getCollection(); + if (collection == null) { + return objectListViewType.getType().getLocalPart(); + } + ObjectReferenceType collectionRef = collection.getCollectionRef(); + if (collectionRef == null) { + return objectListViewType.getType().getLocalPart(); + } + return collectionRef.getOid(); + } + + private void compileView(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType, Task task, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + compileActions(existingView, objectListViewType); + compileAdditionalPanels(existingView, objectListViewType); + compileCollection(existingView, objectListViewType, task, result); + compileColumns(existingView, objectListViewType); + compileDisplay(existingView, objectListViewType); + compileDistinct(existingView, objectListViewType); + compileSorting(existingView, objectListViewType); + compileSearchBox(existingView, objectListViewType); + } + + private void compileActions(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType) { + List newActions = objectListViewType.getAction(); + for (GuiActionType newAction: newActions) { + // TODO: check for action duplication/override + existingView.getActions().add(newAction); // No need to clone, CompiledObjectCollectionView is not prism + } + + } + + private void compileAdditionalPanels(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType) { + GuiObjectListViewAdditionalPanelsType newAdditionalPanels = objectListViewType.getAdditionalPanels(); + if (newAdditionalPanels == null) { + return; + } + // TODO: later: merge additional panel definitions + existingView.setAdditionalPanels(newAdditionalPanels); + } + + private void compileCollection(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType, Task task, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + CollectionSpecificationType collectionSpec = objectListViewType.getCollection(); + if (collectionSpec == null) { + ObjectReferenceType collectionRef = objectListViewType.getCollectionRef(); + if (collectionRef == null) { + return; + } + // Legacy, deprecated + collectionSpec = new CollectionSpecificationType(); + collectionSpec.setCollectionRef(collectionRef.clone()); + } + if (existingView.getCollection() != null) { + LOGGER.debug("Redefining collection in view {}", existingView.getViewName()); + } + existingView.setCollection(collectionSpec); + + // Compute and apply filter + ObjectFilter filter = compileCollectionFilter(existingView, collectionSpec, task, result); + + // TODO: resolve (read) collection if needed + existingView.setFilter(filter); + } + + private ObjectFilter compileCollectionFilter(CompiledObjectCollectionView existingView, CollectionSpecificationType collectionSpec, Task task, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + ObjectReferenceType collectionRef = collectionSpec.getCollectionRef(); + + QName targetObjectType = existingView.getObjectType(); + Class targetTypeClass = ObjectType.class; + if (targetObjectType != null) { + targetTypeClass = ObjectTypes.getObjectTypeFromTypeQName(targetObjectType).getClassDefinition(); + } + QName collectionRefType = collectionRef.getType(); + + // TODO: support more cases + if (QNameUtil.match(ArchetypeType.COMPLEX_TYPE, collectionRefType)) { + RefFilter filter = null; + filter = (RefFilter) prismContext.queryFor(AssignmentHolderType.class) + .item(AssignmentHolderType.F_ARCHETYPE_REF).ref(collectionRef.getOid()) + .buildFilter(); + filter.setTargetTypeNullAsAny(true); + filter.setRelationNullAsAny(true); + return filter; + } + + if (QNameUtil.match(ObjectCollectionType.COMPLEX_TYPE, collectionRefType)) { + ObjectCollectionType objectCollectionType; + try { + objectCollectionType = objectResolver.resolve(collectionRef, ObjectCollectionType.class, null, "view "+existingView.getViewName(), task, result); + } catch (ObjectNotFoundException e) { + throw new ConfigurationException(e.getMessage(), e); + } + SearchFilterType collectionFilterType = objectCollectionType.getFilter(); + ObjectFilter collectionFilter = null; + if (collectionFilterType != null) { + collectionFilter = prismContext.getQueryConverter().parseFilter(collectionFilterType, targetTypeClass); + } + CollectionSpecificationType baseCollectionSpec = objectCollectionType.getBaseCollection(); + if (baseCollectionSpec == null) { + return collectionFilter; + } else { + ObjectFilter baseFilter = compileCollectionFilter(existingView, baseCollectionSpec, task, result); + return ObjectQueryUtil.filterAnd(baseFilter, collectionFilter, prismContext); + } + } + + // TODO + throw new UnsupportedOperationException("TODO"); + } + + private void compileColumns(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType) { + List newColumns = objectListViewType.getColumn(); + if (newColumns == null || newColumns.isEmpty()) { + return; + } + // Not very efficient algorithm. But must do for now. + List existingColumns = existingView.getColumns(); + existingColumns.addAll(newColumns); + List orderedList = orderCustomColumns(existingColumns); + existingColumns.clear(); + existingColumns.addAll(orderedList); + } + + private void compileDisplay(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType) { + DisplayType newDisplay = objectListViewType.getDisplay(); + if (newDisplay == null) { + return; + } + // TODO: later: merge display definitions (e.g. keep icon for user, but apply color change) + existingView.setDisplay(newDisplay); + } + + private void compileDistinct(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType) { + DistinctSearchOptionType newDistinct = objectListViewType.getDistinct(); + if (newDistinct == null) { + return; + } + existingView.setDistinct(newDistinct); + } + + private void compileSorting(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType) { + Boolean newDisableSorting = objectListViewType.isDisableSorting(); + if (newDisableSorting != null) { + existingView.setDisableSorting(newDisableSorting); + } + } + + private void compileSearchBox(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType) { + SearchBoxConfigurationType newSearchBoxConfig = objectListViewType.getSearchBoxConfiguration(); + if (newSearchBoxConfig == null) { + return; + } + // TODO: merge + existingView.setSearchBoxConfiguration(newSearchBoxConfig); + } + + private void joinForms(ObjectFormsType objectForms, ObjectFormType newForm) { + objectForms.getObjectForm().removeIf(currentForm -> isTheSameObjectForm(currentForm, newForm)); + objectForms.getObjectForm().add(newForm.clone()); + } + + private void joinObjectDetails(GuiObjectDetailsSetType objectDetailsSet, GuiObjectDetailsPageType newObjectDetails) { + objectDetailsSet.getObjectDetailsPage().removeIf(currentDetails -> isTheSameObjectType(currentDetails, newObjectDetails)); + objectDetailsSet.getObjectDetailsPage().add(newObjectDetails.clone()); + } + + private boolean isTheSameObjectType(AbstractObjectTypeConfigurationType oldConf, AbstractObjectTypeConfigurationType newConf) { + return QNameUtil.match(oldConf.getType(), newConf.getType()); + } + + private boolean isTheSameObjectForm(ObjectFormType oldForm, ObjectFormType newForm){ + if (!isTheSameObjectType(oldForm,newForm)) { + return false; + } + if (oldForm.isIncludeDefaultForms() != null && + newForm.isIncludeDefaultForms() != null){ + return true; + } + if (oldForm.getFormSpecification() == null && newForm.getFormSpecification() == null) { + String oldFormPanelUri = oldForm.getFormSpecification().getPanelUri(); + String newFormPanelUri = newForm.getFormSpecification().getPanelUri(); + if (oldFormPanelUri != null && oldFormPanelUri.equals(newFormPanelUri)) { + return true; + } + + String oldFormPanelClass = oldForm.getFormSpecification().getPanelClass(); + String newFormPanelClass = newForm.getFormSpecification().getPanelClass(); + if (oldFormPanelClass != null && oldFormPanelClass.equals(newFormPanelClass)) { + return true; + } + + String oldFormRefOid = oldForm.getFormSpecification().getFormRef() == null ? + null : oldForm.getFormSpecification().getFormRef().getOid(); + String newFormRefOid = newForm.getFormSpecification().getFormRef() == null ? + null : newForm.getFormSpecification().getFormRef().getOid(); + if (oldFormRefOid != null && oldFormRefOid.equals(newFormRefOid)) { + return true; + } + } + return false; + } + + private void mergeWidget(CompiledUserProfile composite, DashboardWidgetType newWidget) { + String newWidgetIdentifier = newWidget.getIdentifier(); + DashboardWidgetType compositeWidget = composite.findUserDashboardWidget(newWidgetIdentifier); + if (compositeWidget == null) { + composite.getUserDashboard().getWidget().add(newWidget.clone()); + } else { + mergeWidget(compositeWidget, newWidget); + } + } + + private void mergeWidget(DashboardWidgetType compositeWidget, DashboardWidgetType newWidget) { + mergeFeature(compositeWidget, newWidget, UserInterfaceElementVisibilityType.VACANT); + // merge other widget properties (in the future) + } + + private void mergeFeature(CompiledUserProfile composite, UserInterfaceFeatureType newFeature) { + String newIdentifier = newFeature.getIdentifier(); + UserInterfaceFeatureType compositeFeature = composite.findFeature(newIdentifier); + if (compositeFeature == null) { + composite.getFeatures().add(newFeature.clone()); + } else { + mergeFeature(compositeFeature, newFeature, UserInterfaceElementVisibilityType.AUTOMATIC); + } + } + + private void mergeFeature(T compositeFeature, T newFeature, UserInterfaceElementVisibilityType defaultVisibility) { + UserInterfaceElementVisibilityType newCompositeVisibility = mergeVisibility(compositeFeature.getVisibility(), newFeature.getVisibility(), defaultVisibility); + compositeFeature.setVisibility(newCompositeVisibility); + } + + private UserInterfaceElementVisibilityType mergeVisibility( + UserInterfaceElementVisibilityType compositeVisibility, UserInterfaceElementVisibilityType newVisibility, UserInterfaceElementVisibilityType defaultVisibility) { + if (compositeVisibility == null) { + compositeVisibility = defaultVisibility; + } + if (newVisibility == null) { + newVisibility = defaultVisibility; + } + if (compositeVisibility == UserInterfaceElementVisibilityType.HIDDEN || newVisibility == UserInterfaceElementVisibilityType.HIDDEN) { + return UserInterfaceElementVisibilityType.HIDDEN; + } + if (compositeVisibility == UserInterfaceElementVisibilityType.VISIBLE || newVisibility == UserInterfaceElementVisibilityType.VISIBLE) { + return UserInterfaceElementVisibilityType.VISIBLE; + } + if (compositeVisibility == UserInterfaceElementVisibilityType.AUTOMATIC || newVisibility == UserInterfaceElementVisibilityType.AUTOMATIC) { + return UserInterfaceElementVisibilityType.AUTOMATIC; + } + return UserInterfaceElementVisibilityType.VACANT; + } + + /* + the ordering algorithm is: the first level is occupied by + the column which previousColumn == null || "" || notExistingColumnNameValue. + Each next level contains columns which + previousColumn == columnNameFromPreviousLevel + */ + private List orderCustomColumns(List customColumns){ + if (customColumns == null || customColumns.size() == 0){ + return new ArrayList<>(); + } + List customColumnsList = new ArrayList<>(customColumns); + List previousColumnValues = new ArrayList<>(); + previousColumnValues.add(null); + previousColumnValues.add(""); + + Map columnRefsMap = new HashMap<>(); + for (GuiObjectColumnType column : customColumns){ + columnRefsMap.put(column.getName(), column.getPreviousColumn() == null ? "" : column.getPreviousColumn()); + } + + List temp = new ArrayList<> (); + int index = 0; + while (index < customColumns.size()){ + int sortFrom = index; + for (int i = index; i < customColumnsList.size(); i++){ + GuiObjectColumnType column = customColumnsList.get(i); + if (previousColumnValues.contains(column.getPreviousColumn()) || + !columnRefsMap.containsKey(column.getPreviousColumn())){ + Collections.swap(customColumnsList, index, i); + index++; + temp.add(column.getName()); + } + } + if (temp.size() == 0){ + temp.add(customColumnsList.get(index).getName()); + index++; + } + if (index - sortFrom > 1){ + customColumnsList.subList(sortFrom, index - 1) + .sort((o1, o2) -> String.CASE_INSENSITIVE_ORDER.compare(o1.getName(), o2.getName())); + } + previousColumnValues.clear(); + previousColumnValues.addAll(temp); + temp.clear(); + } + return customColumnsList; + } + + public CompiledUserProfile getGlobalCompiledUserProfile(Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + PrismObject systemConfiguration = systemObjectCache.getSystemConfiguration(parentResult); + if (systemConfiguration == null) { + return null; + } + List adminGuiConfigurations = new ArrayList<>(); + CompiledUserProfile compiledUserProfile = compileUserProfile(adminGuiConfigurations, systemConfiguration, task, parentResult); + // TODO: cache compiled profile + return compiledUserProfile; + } + + +} diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/UserProfileServiceImpl.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/UserProfileServiceImpl.java index 2e664504082..78c72d94096 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/UserProfileServiceImpl.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/UserProfileServiceImpl.java @@ -16,45 +16,47 @@ package com.evolveum.midpoint.model.impl.security; -import com.evolveum.midpoint.common.ActivationComputer; -import com.evolveum.midpoint.common.Clock; -import com.evolveum.midpoint.repo.cache.RepositoryCache; -import com.evolveum.midpoint.repo.common.ObjectResolver; -import com.evolveum.midpoint.model.api.context.EvaluatedAssignment; -import com.evolveum.midpoint.model.api.context.EvaluatedAssignmentTarget; -import com.evolveum.midpoint.model.api.util.DeputyUtils; +import java.util.Collection; +import java.util.List; + +import javax.naming.NamingException; +import javax.naming.directory.Attribute; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.MessageSource; +import org.springframework.context.MessageSourceAware; +import org.springframework.context.support.MessageSourceAccessor; +import org.springframework.ldap.core.DirContextAdapter; +import org.springframework.ldap.core.DirContextOperations; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.security.ldap.userdetails.UserDetailsContextMapper; +import org.springframework.stereotype.Service; + +import com.evolveum.midpoint.model.api.authentication.MidPointUserProfilePrincipal; +import com.evolveum.midpoint.model.api.authentication.UserProfileService; import com.evolveum.midpoint.model.api.util.ModelUtils; -import com.evolveum.midpoint.model.common.SystemObjectCache; -import com.evolveum.midpoint.model.common.mapping.MappingFactory; import com.evolveum.midpoint.model.impl.UserComputer; -import com.evolveum.midpoint.model.impl.lens.AssignmentEvaluator; -import com.evolveum.midpoint.model.impl.lens.LensContext; -import com.evolveum.midpoint.model.impl.lens.LensContextPlaceholder; -import com.evolveum.midpoint.model.impl.lens.LensUtil; -import com.evolveum.midpoint.model.impl.lens.projector.MappingEvaluator; -import com.evolveum.midpoint.prism.PrismContainerDefinition; -import com.evolveum.midpoint.prism.PrismContainerValue; import com.evolveum.midpoint.prism.PrismContext; import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.prism.delta.ObjectDelta; -import com.evolveum.midpoint.prism.delta.PlusMinusZero; import com.evolveum.midpoint.prism.polystring.PolyString; import com.evolveum.midpoint.prism.query.ObjectQuery; import com.evolveum.midpoint.prism.util.ItemDeltaItem; import com.evolveum.midpoint.prism.util.ObjectDeltaObject; import com.evolveum.midpoint.repo.api.RepositoryService; -import com.evolveum.midpoint.schema.RelationRegistry; +import com.evolveum.midpoint.repo.common.ObjectResolver; import com.evolveum.midpoint.schema.SearchResultList; import com.evolveum.midpoint.schema.constants.ObjectTypes; import com.evolveum.midpoint.schema.result.OperationResult; -import com.evolveum.midpoint.schema.util.AdminGuiConfigTypeUtil; -import com.evolveum.midpoint.schema.util.FocusTypeUtil; import com.evolveum.midpoint.schema.util.ObjectQueryUtil; -import com.evolveum.midpoint.security.api.Authorization; import com.evolveum.midpoint.security.api.AuthorizationTransformer; -import com.evolveum.midpoint.security.api.DelegatorWithOtherPrivilegesLimitations; import com.evolveum.midpoint.security.api.MidPointPrincipal; -import com.evolveum.midpoint.security.api.UserProfileService; +import com.evolveum.midpoint.security.api.MidPointPrincipalManager; import com.evolveum.midpoint.task.api.Task; import com.evolveum.midpoint.task.api.TaskManager; import com.evolveum.midpoint.util.exception.CommunicationException; @@ -62,35 +64,21 @@ import com.evolveum.midpoint.util.exception.ExpressionEvaluationException; import com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException; import com.evolveum.midpoint.util.exception.ObjectNotFoundException; -import com.evolveum.midpoint.util.exception.PolicyViolationException; import com.evolveum.midpoint.util.exception.SchemaException; import com.evolveum.midpoint.util.exception.SecurityViolationException; import com.evolveum.midpoint.util.exception.SystemException; import com.evolveum.midpoint.util.logging.Trace; import com.evolveum.midpoint.util.logging.TraceManager; -import com.evolveum.midpoint.xml.ns._public.common.common_3.*; - -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.context.MessageSource; -import org.springframework.context.MessageSourceAware; -import org.springframework.context.support.MessageSourceAccessor; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.ldap.userdetails.UserDetailsContextMapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.ldap.core.DirContextAdapter; -import org.springframework.ldap.core.DirContextOperations; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import javax.naming.NamingException; -import javax.naming.directory.Attribute; -import org.springframework.beans.factory.annotation.Value; +import com.evolveum.midpoint.xml.ns._public.common.common_3.AbstractRoleType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.LifecycleStateModelType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.SystemObjectsType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType; /** * @author lazyman @@ -106,14 +94,8 @@ public class UserProfileServiceImpl implements UserProfileService, UserDetailsSe private RepositoryService repositoryService; @Autowired @Qualifier("modelObjectResolver") private ObjectResolver objectResolver; - @Autowired private SystemObjectCache systemObjectCache; - @Autowired private RelationRegistry relationRegistry; - @Autowired private MappingFactory mappingFactory; - @Autowired private MappingEvaluator mappingEvaluator; - @Autowired private SecurityHelper securityHelper; + @Autowired private UserProfileCompiler userProfileCompiler; @Autowired private UserComputer userComputer; - @Autowired private ActivationComputer activationComputer; - @Autowired private Clock clock; @Autowired private PrismContext prismContext; @Autowired private TaskManager taskManager; @@ -128,7 +110,7 @@ public void setMessageSource(MessageSource messageSource) { } @Override - public MidPointPrincipal getPrincipal(String username) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + public MidPointUserProfilePrincipal getPrincipal(String username) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { OperationResult result = new OperationResult(OPERATION_GET_PRINCIPAL); PrismObject user; try { @@ -149,19 +131,19 @@ public MidPointPrincipal getPrincipal(String username) throws ObjectNotFoundExce } @Override - public MidPointPrincipal getPrincipalByOid(String oid) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + public MidPointUserProfilePrincipal getPrincipalByOid(String oid) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { OperationResult result = new OperationResult(OPERATION_GET_PRINCIPAL); return getPrincipal(getUserByOid(oid, result).asPrismObject()); } @Override - public MidPointPrincipal getPrincipal(PrismObject user) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + public MidPointUserProfilePrincipal getPrincipal(PrismObject user) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { OperationResult result = new OperationResult(OPERATION_GET_PRINCIPAL); return getPrincipal(user, null, result); } @Override - public MidPointPrincipal getPrincipal(PrismObject user, AuthorizationTransformer authorizationTransformer, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + public MidPointUserProfilePrincipal getPrincipal(PrismObject user, AuthorizationTransformer authorizationTransformer, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { if (user == null) { return null; } @@ -170,7 +152,7 @@ public MidPointPrincipal getPrincipal(PrismObject user, AuthorizationT LifecycleStateModelType lifecycleModel = getLifecycleModel(user, systemConfiguration); userComputer.recompute(user, lifecycleModel); - MidPointPrincipal principal = new MidPointPrincipal(user.asObjectable()); + MidPointUserProfilePrincipal principal = new MidPointUserProfilePrincipal(user.asObjectable()); initializePrincipalFromAssignments(principal, systemConfiguration, authorizationTransformer); return principal; } @@ -221,136 +203,10 @@ private PrismObject findByUsername(String username, OperationResult re return list.get(0); } - private void initializePrincipalFromAssignments(MidPointPrincipal principal, PrismObject systemConfiguration, AuthorizationTransformer authorizationTransformer) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { - UserType userType = principal.getUser(); - - List adminGuiConfigurations = new ArrayList<>(); - + private void initializePrincipalFromAssignments(MidPointUserProfilePrincipal principal, PrismObject systemConfiguration, AuthorizationTransformer authorizationTransformer) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { Task task = taskManager.createTaskInstance(UserProfileServiceImpl.class.getName() + ".initializePrincipalFromAssignments"); OperationResult result = task.getResult(); - - principal.setApplicableSecurityPolicy(securityHelper.locateSecurityPolicy(userType.asPrismObject(), systemConfiguration, task, result)); - - LensContext lensContext = createAuthenticationLensContext(userType.asPrismObject(), systemConfiguration); - Collection forcedAssignments = null; - try { - forcedAssignments = LensUtil.getForcedAssignments(lensContext.getFocusContext().getLifecycleModel(), - userType.getLifecycleState(), objectResolver, prismContext, task, result); - } catch (ObjectNotFoundException | CommunicationException | ConfigurationException | SecurityViolationException - | ExpressionEvaluationException e1) { - LOGGER.error("Forced assignments defined for lifecycle {} won't be evaluated", userType.getLifecycleState(), e1); - } - - if (!userType.getAssignment().isEmpty() || forcedAssignments != null) { - - AssignmentEvaluator.Builder builder = - new AssignmentEvaluator.Builder() - .repository(repositoryService) - .focusOdo(new ObjectDeltaObject<>(userType.asPrismObject(), null, userType.asPrismObject())) - .channel(null) - .objectResolver(objectResolver) - .systemObjectCache(systemObjectCache) - .relationRegistry(relationRegistry) - .prismContext(prismContext) - .mappingFactory(mappingFactory) - .mappingEvaluator(mappingEvaluator) - .activationComputer(activationComputer) - .now(clock.currentTimeXMLGregorianCalendar()) - // We do need only authorizations + gui config. Therefore we not need to evaluate - // constructions and the like, so switching it off makes the evaluation run faster. - // It also avoids nasty problems with resources being down, - // resource schema not available, etc. - .loginMode(true) - // We do not have real lens context here. But the push methods in ModelExpressionThreadLocalHolder - // will need something to push on the stack. So give them context placeholder. - .lensContext(lensContext); - - AssignmentEvaluator assignmentEvaluator = builder.build(); - evaluateAssignments(userType.getAssignment(), false, assignmentEvaluator, principal, authorizationTransformer, adminGuiConfigurations, task, result); - - evaluateAssignments(forcedAssignments, true, assignmentEvaluator, principal, authorizationTransformer, adminGuiConfigurations, task, result); - - } - if (userType.getAdminGuiConfiguration() != null) { - // config from the user object should go last (to be applied as the last one) - adminGuiConfigurations.add(userType.getAdminGuiConfiguration()); - } - principal.setAdminGuiConfiguration(AdminGuiConfigTypeUtil.compileAdminGuiConfiguration(adminGuiConfigurations, systemConfiguration)); - } - - private void evaluateAssignments(Collection assignments, boolean virtual, AssignmentEvaluator assignmentEvaluator, MidPointPrincipal principal, AuthorizationTransformer authorizationTransformer, Collection adminGuiConfigurations, Task task, OperationResult result) { - UserType userType = principal.getUser(); - - Collection authorizations = principal.getAuthorities(); - - - try { - RepositoryCache.enter(); - for (AssignmentType assignmentType: assignments) { - try { - ItemDeltaItem,PrismContainerDefinition> assignmentIdi = new ItemDeltaItem<>(); - assignmentIdi.setItemOld(LensUtil.createAssignmentSingleValueContainerClone(assignmentType)); - assignmentIdi.recompute(); - EvaluatedAssignment assignment = assignmentEvaluator.evaluate(assignmentIdi, PlusMinusZero.ZERO, false, userType, userType.toString(), virtual, task, result); - if (assignment.isValid()) { - addAuthorizations(authorizations, assignment.getAuthorizations(), authorizationTransformer); - adminGuiConfigurations.addAll(assignment.getAdminGuiConfigurations()); - } - for (EvaluatedAssignmentTarget target : assignment.getRoles().getNonNegativeValues()) { - if (target.isValid() && target.getTarget() != null && target.getTarget().asObjectable() instanceof UserType - && DeputyUtils.isDelegationPath(target.getAssignmentPath(), relationRegistry)) { - List limitations = DeputyUtils.extractLimitations(target.getAssignmentPath()); - principal.addDelegatorWithOtherPrivilegesLimitations(new DelegatorWithOtherPrivilegesLimitations( - (UserType) target.getTarget().asObjectable(), limitations)); - } - } - } catch (SchemaException | ObjectNotFoundException | ExpressionEvaluationException | PolicyViolationException | SecurityViolationException | ConfigurationException | CommunicationException e) { - LOGGER.error("Error while processing assignment of {}: {}; assignment: {}", - userType, e.getMessage(), assignmentType, e); - } - } - } finally { - RepositoryCache.exit(); - } - } - - private LensContext createAuthenticationLensContext(PrismObject user, PrismObject systemConfiguration) throws SchemaException { - LensContext lensContext = new LensContextPlaceholder<>(user, prismContext); - if (systemConfiguration != null) { - ObjectPolicyConfigurationType policyConfigurationType = determineObjectPolicyConfiguration(user, systemConfiguration); - lensContext.getFocusContext().setObjectPolicyConfigurationType(policyConfigurationType); - } - return lensContext; - } - - private ObjectPolicyConfigurationType determineObjectPolicyConfiguration(PrismObject user, PrismObject systemConfiguration) throws SchemaException { - ObjectPolicyConfigurationType policyConfigurationType; - try { - policyConfigurationType = ModelUtils.determineObjectPolicyConfiguration(user, systemConfiguration.asObjectable()); - } catch (ConfigurationException e) { - throw new SchemaException(e.getMessage(), e); - } - if (LOGGER.isTraceEnabled()) { - LOGGER.trace("Selected policy configuration from subtypes {}:\n{}", - FocusTypeUtil.determineSubTypes(user), policyConfigurationType==null?null:policyConfigurationType.asPrismContainerValue().debugDump(1)); - } - - return policyConfigurationType; - } - private void addAuthorizations(Collection targetCollection, Collection sourceCollection, AuthorizationTransformer authorizationTransformer) { - if (sourceCollection == null) { - return; - } - for (Authorization autz: sourceCollection) { - if (authorizationTransformer == null) { - targetCollection.add(autz); - } else { - Collection transformedAutzs = authorizationTransformer.transform(autz); - if (transformedAutzs != null) { - targetCollection.addAll(transformedAutzs); - } - } - } + userProfileCompiler.compileUserProfile(principal, systemConfiguration, authorizationTransformer, task, result); } private MidPointPrincipal save(MidPointPrincipal person, OperationResult result) throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException { diff --git a/model/model-impl/src/test/java/com/evolveum/midpoint/model/impl/security/TestAbstractAuthenticationEvaluator.java b/model/model-impl/src/test/java/com/evolveum/midpoint/model/impl/security/TestAbstractAuthenticationEvaluator.java index aad91bc9096..b54c3999107 100644 --- a/model/model-impl/src/test/java/com/evolveum/midpoint/model/impl/security/TestAbstractAuthenticationEvaluator.java +++ b/model/model-impl/src/test/java/com/evolveum/midpoint/model/impl/security/TestAbstractAuthenticationEvaluator.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2016-2017 Evolveum + * Copyright (c) 2016-2018 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +45,8 @@ import com.evolveum.midpoint.common.Clock; import com.evolveum.midpoint.model.api.AuthenticationEvaluator; +import com.evolveum.midpoint.model.api.authentication.MidPointUserProfilePrincipal; +import com.evolveum.midpoint.model.api.authentication.UserProfileService; import com.evolveum.midpoint.model.api.context.AbstractAuthenticationContext; import com.evolveum.midpoint.model.impl.AbstractInternalModelIntegrationTest; import com.evolveum.midpoint.prism.PrismObject; @@ -89,16 +91,12 @@ public abstract class TestAbstractAuthenticationEvaluator user) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + public MidPointUserProfilePrincipal getPrincipal(PrismObject user) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { return getPrincipal(user, null, null); } @Override - public MidPointPrincipal getPrincipal(PrismObject user, + public MidPointUserProfilePrincipal getPrincipal(PrismObject user, AuthorizationTransformer authorizationLimiter, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { - MidPointPrincipal principal = userProfileService.getPrincipal(user); + MidPointUserProfilePrincipal principal = userProfileService.getPrincipal(user); addFakeAuthorization(principal); return principal; } @Override - public MidPointPrincipal getPrincipal(String username) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { - MidPointPrincipal principal = userProfileService.getPrincipal(username); + public MidPointUserProfilePrincipal getPrincipal(String username) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + MidPointUserProfilePrincipal principal = userProfileService.getPrincipal(username); addFakeAuthorization(principal); return principal; } @Override - public MidPointPrincipal getPrincipalByOid(String oid) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { - MidPointPrincipal principal = userProfileService.getPrincipalByOid(oid); + public MidPointUserProfilePrincipal getPrincipalByOid(String oid) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { + MidPointUserProfilePrincipal principal = userProfileService.getPrincipalByOid(oid); addFakeAuthorization(principal); return principal; } diff --git a/model/model-intest/pom.xml b/model/model-intest/pom.xml index 5519713ab50..d84d982195b 100644 --- a/model/model-intest/pom.xml +++ b/model/model-intest/pom.xml @@ -375,6 +375,57 @@ + + maven-failsafe-plugin + + + testng-integration.xml + testng-db-specific.xml + + + + + + + + skipModelIntTest + + + skipModelIntTest + true + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + ${failsafe.version} + + true + + + + + + + skipModelUnitTest + + + skipModelUnitTest + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${surefire.version} + + true + + diff --git a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestArchetypes.java b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestArchetypes.java index 04741ff5627..0f927215804 100644 --- a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestArchetypes.java +++ b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestArchetypes.java @@ -24,10 +24,15 @@ import org.springframework.test.context.ContextConfiguration; import org.testng.annotations.Test; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.prism.PrismObject; +import com.evolveum.midpoint.prism.query.ObjectFilter; +import com.evolveum.midpoint.prism.query.ObjectQuery; import com.evolveum.midpoint.prism.util.PrismTestUtil; +import com.evolveum.midpoint.schema.SearchResultList; import com.evolveum.midpoint.schema.constants.SchemaConstants; import com.evolveum.midpoint.schema.result.OperationResult; +import com.evolveum.midpoint.schema.util.ObjectQueryUtil; import com.evolveum.midpoint.security.api.MidPointPrincipal; import com.evolveum.midpoint.task.api.Task; import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType; @@ -35,6 +40,7 @@ import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentPolicyEnforcementType; import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; import com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.RichHyperlinkType; import com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType; import com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowKindType; import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType; @@ -50,6 +56,8 @@ public class TestArchetypes extends AbstractInitializedModelIntegrationTest { public static final File TEST_DIR = new File("src/test/resources/archetypes"); public static final File SYSTEM_CONFIGURATION_ARCHETYPES_FILE = new File(TEST_DIR, "system-configuration-archetypes.xml"); + public static final String VIEW_ALL_EMPLOYEES_NAME = "All employees"; + public static final String VIEW_ACTIVE_EMPLOYEES_NAME = "Active employees"; public static final File ARCHETYPE_EMPLOYEE_FILE = new File(TEST_DIR, "archetype-employee.xml"); protected static final String ARCHETYPE_EMPLOYEE_OID = "7135e68c-ee53-11e8-8025-170b77da3fd6"; @@ -61,13 +69,21 @@ public class TestArchetypes extends AbstractInitializedModelIntegrationTest { public static final File ROLE_EMPLOYEE_BASE_FILE = new File(TEST_DIR, "role-employee-base.xml"); protected static final String ROLE_EMPLOYEE_BASE_OID = "e869d6c4-f6ef-11e8-b51f-df3e51bba129"; + + public static final File ROLE_USER_ADMINISTRATOR_FILE = new File(TEST_DIR, "role-user-administrator.xml"); + protected static final String ROLE_USER_ADMINISTRATOR_OID = "6ae02e34-f8b0-11e8-9c40-87e142b606fe"; + + public static final File COLLECTION_ACTIVE_EMPLOYEES_FILE = new File(TEST_DIR, "collection-active-employees.xml"); + protected static final String COLLECTION_ACTIVE_EMPLOYEES_OID = "f61bcb4a-f8ae-11e8-9f5c-c3e7f27ee878"; @Override public void initSystem(Task initTask, OperationResult initResult) throws Exception { super.initSystem(initTask, initResult); repoAddObjectFromFile(ROLE_EMPLOYEE_BASE_FILE, initResult); - repoAddObjectFromFile(ARCHETYPE_TEST_FILE, initResult); + repoAddObjectFromFile(ROLE_USER_ADMINISTRATOR_FILE, initResult); + repoAddObjectFromFile(ARCHETYPE_EMPLOYEE_FILE, initResult); + repoAddObjectFromFile(COLLECTION_ACTIVE_EMPLOYEES_FILE, initResult); addObject(SHADOW_GROUP_DUMMY_TESTERS_FILE, initTask, initResult); } @@ -78,8 +94,8 @@ protected File getSystemConfigurationFile() { } @Test - public void test050AddArchetypeEmployee() throws Exception { - final String TEST_NAME = "test050SetupJack"; + public void test050AddArchetypeTest() throws Exception { + final String TEST_NAME = "test050AddArchetypeTest"; displayTestTitle(TEST_NAME); Task task = createTask(TEST_NAME); @@ -87,14 +103,33 @@ public void test050AddArchetypeEmployee() throws Exception { // WHEN displayWhen(TEST_NAME); - addObject(ARCHETYPE_EMPLOYEE_FILE, task, result); + addObject(ARCHETYPE_TEST_FILE, task, result); // THEN displayThen(TEST_NAME); assertSuccess(result); - PrismObject archetypeEmployee = modelService.getObject(ArchetypeType.class, ARCHETYPE_EMPLOYEE_OID, null, task, result); - display("Archetype employee", archetypeEmployee); + PrismObject archetypeTest = modelService.getObject(ArchetypeType.class, ARCHETYPE_TEST_OID, null, task, result); + display("Archetype test", archetypeTest); + } + + @Test + public void test060AssignGuybrushUserAdministrator() throws Exception { + final String TEST_NAME = "test060AssignGuybrushUserAdministrator"; + displayTestTitle(TEST_NAME); + + Task task = createTask(TEST_NAME); + OperationResult result = task.getResult(); + + // WHEN + displayWhen(TEST_NAME); + assignRole(USER_GUYBRUSH_OID, ROLE_USER_ADMINISTRATOR_OID, task, result); + + // THEN + displayThen(TEST_NAME); + assertSuccess(result); + + // TODO: assert guybrush } @@ -134,11 +169,104 @@ public void test100AssignJackArchetypeEmployee() throws Exception { .assertPluralLabel(ARCHETYPE_EMPLOYEE_DISPLAY_PLURAL_LABEL); } + @Test + public void test102SearchEmployeeArchetypeRef() throws Exception { + final String TEST_NAME = "test102SearchEmployeeArchetypeRef"; + displayTestTitle(TEST_NAME); + + Task task = createTask(TEST_NAME); + OperationResult result = task.getResult(); + + ObjectQuery query = queryFor(UserType.class) + .item(UserType.F_ARCHETYPE_REF).ref(ARCHETYPE_EMPLOYEE_OID) + .build(); + + // WHEN + displayWhen(TEST_NAME); + + SearchResultList> searchResults = modelService.searchObjects(UserType.class, query, null, task, result); + + // THEN + displayThen(TEST_NAME); + assertSuccess(result); + display("Search results", searchResults); + assertEquals("Wrong number of search results", 1, searchResults.size()); + PrismObject foundUser = searchResults.get(0); + assertUser(foundUser, "found user") + .assertName(USER_JACK_USERNAME) + .assertOid(USER_JACK_OID) + .assignments() + .assertAssignments(1) + .assertArchetype(ARCHETYPE_EMPLOYEE_OID) + .end() + .assertArchetypeRef(ARCHETYPE_EMPLOYEE_OID) + .roleMembershipRefs() + .assertRoleMemberhipRefs(1) + .assertArchetype(ARCHETYPE_EMPLOYEE_OID) + .end() + .getObject(); + } + + @Test + public void test104GetGuybryshCompiledUserProfile() throws Exception { + final String TEST_NAME = "test104GetGuybryshCompiledUserProfile"; + displayTestTitle(TEST_NAME); + + // GIVEN + login(USER_GUYBRUSH_USERNAME); + + Task task = createTask(TEST_NAME); + OperationResult result = task.getResult(); + + // WHEN + CompiledUserProfile compiledUserProfile = modelInteractionService.getCompiledUserProfile(task, result); + + // THEN + assertSuccess(result); + + loginAdministrator(); + + ObjectFilter allEmployeesViewFilter = assertCompiledUserProfile(compiledUserProfile) + .assertAdditionalMenuLinks(0) + .assertUserDashboardLinks(0) + .assertObjectForms(2) + .assertUserDashboardWidgets(0) + .objectCollectionViews() + .assertViews(2) + .by() + .name(VIEW_ACTIVE_EMPLOYEES_NAME) + .find() + .assertName(VIEW_ACTIVE_EMPLOYEES_NAME) + .assertFilter() + .end() + .by() + .name(VIEW_ALL_EMPLOYEES_NAME) + .find() + .assertName(VIEW_ALL_EMPLOYEES_NAME) + .assertFilter() + .getFilter(); + + ObjectQuery viewQuery = prismContext.queryFactory().createQuery(allEmployeesViewFilter, null); + SearchResultList> searchResults = modelService.searchObjects(UserType.class, viewQuery, null, task, result); + + display("Search results", searchResults); + assertEquals("Wrong number of search results", 1, searchResults.size()); + PrismObject foundUser = searchResults.get(0); + assertUser(foundUser, "found user") + .assertName(USER_JACK_USERNAME) + .assertOid(USER_JACK_OID); + + } + + + @Test public void test109UnassignJackArchetypeEmployee() throws Exception { final String TEST_NAME = "test109UnassignJackArchetypeEmployee"; displayTestTitle(TEST_NAME); + loginAdministrator(); + Task task = createTask(TEST_NAME); OperationResult result = task.getResult(); @@ -274,19 +402,142 @@ public void test129UnassignJackArchetypeTest() throws Exception { assertSuccess(result); assertUserAfter(USER_JACK_OID) - .assignments() - .assertAssignments(0) - .end() - .assertNoArchetypeRef() - .roleMembershipRefs() - .assertRoleMemberhipRefs(0) - .end() - .links() - .assertNone(); + .assignments() + .assertAssignments(0) + .end() + .assertNoArchetypeRef() + .roleMembershipRefs() + .assertRoleMemberhipRefs(0) + .end() + .links() + .assertNone(); + } + + @Test + public void test200AssignJackBarbossaArchetypeEmployee() throws Exception { + final String TEST_NAME = "test200AssignJackBarbossaArchetypeEmployee"; + displayTestTitle(TEST_NAME); + + Task task = createTask(TEST_NAME); + OperationResult result = task.getResult(); + + // WHEN + displayWhen(TEST_NAME); + + assignArchetype(USER_JACK_OID, ARCHETYPE_EMPLOYEE_OID, task, result); + assignArchetype(USER_BARBOSSA_OID, ARCHETYPE_EMPLOYEE_OID, task, result); + + // THEN + displayThen(TEST_NAME); + assertSuccess(result); + + assertUserAfter(USER_JACK_OID) + .assertArchetypeRef(ARCHETYPE_EMPLOYEE_OID); + + assertUserAfter(USER_BARBOSSA_OID) + .assertArchetypeRef(ARCHETYPE_EMPLOYEE_OID); + } - // TODO: search by archetypeRef + @Test + public void test202GetGuybryshCompiledUserProfileActiveEmployeesView() throws Exception { + final String TEST_NAME = "test202GetGuybryshCompiledUserProfileActiveEmployeesView"; + displayTestTitle(TEST_NAME); + + // GIVEN + login(USER_GUYBRUSH_USERNAME); + + Task task = createTask(TEST_NAME); + OperationResult result = task.getResult(); + + // WHEN + CompiledUserProfile compiledUserProfile = modelInteractionService.getCompiledUserProfile(task, result); + + // THEN + assertSuccess(result); + + loginAdministrator(); + + ObjectFilter activeEmployeesViewFilter = assertCompiledUserProfile(compiledUserProfile) + .objectCollectionViews() + .assertViews(2) + .by() + .name(VIEW_ACTIVE_EMPLOYEES_NAME) + .find() + .assertName(VIEW_ACTIVE_EMPLOYEES_NAME) + .assertFilter() + .getFilter(); + + ObjectQuery viewQuery = prismContext.queryFactory().createQuery(activeEmployeesViewFilter, null); + SearchResultList> searchResults = modelService.searchObjects(UserType.class, viewQuery, null, task, result); + + display("Search results", searchResults); + assertEquals("Wrong number of search results", 2, searchResults.size()); + + } + @Test + public void test203DisableBarbossa() throws Exception { + final String TEST_NAME = "test203DisableBarbossa"; + displayTestTitle(TEST_NAME); + + Task task = createTask(TEST_NAME); + OperationResult result = task.getResult(); + + // WHEN + displayWhen(TEST_NAME); + + modifyUserReplace(USER_BARBOSSA_OID, ACTIVATION_ADMINISTRATIVE_STATUS_PATH, task, result, ActivationStatusType.DISABLED); + + // THEN + displayThen(TEST_NAME); + assertSuccess(result); + + assertUserAfter(USER_JACK_OID) + .assertArchetypeRef(ARCHETYPE_EMPLOYEE_OID); + + assertUserAfter(USER_BARBOSSA_OID) + .assertArchetypeRef(ARCHETYPE_EMPLOYEE_OID); + + } + + @Test + public void test205GetGuybryshCompiledUserProfileActiveEmployeesView() throws Exception { + final String TEST_NAME = "test205GetGuybryshCompiledUserProfileActiveEmployeesView"; + displayTestTitle(TEST_NAME); + + // GIVEN + login(USER_GUYBRUSH_USERNAME); + + Task task = createTask(TEST_NAME); + OperationResult result = task.getResult(); + + // WHEN + CompiledUserProfile compiledUserProfile = modelInteractionService.getCompiledUserProfile(task, result); + + // THEN + assertSuccess(result); + + loginAdministrator(); + + ObjectFilter activeEmployeesViewFilter = assertCompiledUserProfile(compiledUserProfile) + .objectCollectionViews() + .assertViews(2) + .by() + .name(VIEW_ACTIVE_EMPLOYEES_NAME) + .find() + .assertName(VIEW_ACTIVE_EMPLOYEES_NAME) + .assertFilter() + .getFilter(); + + ObjectQuery viewQuery = prismContext.queryFactory().createQuery(activeEmployeesViewFilter, null); + SearchResultList> searchResults = modelService.searchObjects(UserType.class, viewQuery, null, task, result); + + display("Search results", searchResults); + assertEquals("Wrong number of search results", 1, searchResults.size()); + + } + // TODO: object template in archetype // TODO: correct application of object template for new object (not yet stored) diff --git a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestPreviewChanges.java b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestPreviewChanges.java index fbf4f5c61aa..13ba2535369 100644 --- a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestPreviewChanges.java +++ b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestPreviewChanges.java @@ -18,6 +18,7 @@ import com.evolveum.icf.dummy.resource.DummyAccount; import com.evolveum.midpoint.common.refinery.RefinedObjectClassDefinition; import com.evolveum.midpoint.model.api.ModelExecuteOptions; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.model.api.context.*; import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.*; @@ -410,28 +411,32 @@ private void assertAddAccount(ModelContext modelContext, boolean expec } @Test - public void test130GetAdminGuiConfig() throws Exception { - final String TEST_NAME = "test130GetAdminGuiConfig"; + public void test130GetCompiledUserProfile() throws Exception { + final String TEST_NAME = "test130GetCompiledUserProfile"; displayTestTitle(TEST_NAME); // GIVEN Task task = createTask(TEST_NAME); OperationResult result = task.getResult(); - + // WHEN - AdminGuiConfigurationType adminGuiConfiguration = modelInteractionService.getAdminGuiConfiguration(task, result); + CompiledUserProfile compiledUserProfile = modelInteractionService.getCompiledUserProfile(task, result); // THEN - result.computeStatus(); - TestUtil.assertSuccess(result); + assertSuccess(result); - assertAdminGuiConfigurations(adminGuiConfiguration, 0, 1, 3, 1, 0); + assertCompiledUserProfile(compiledUserProfile) + .assertAdditionalMenuLinks(0) + .assertUserDashboardLinks(1) + .assertObjectForms(1) + .assertUserDashboardWidgets(0) + .assertObjectCollectionViews(3); - RichHyperlinkType link = adminGuiConfiguration.getUserDashboardLink().get(0); + RichHyperlinkType link = compiledUserProfile.getUserDashboardLink().get(0); assertEquals("Bad link label", "Foo", link.getLabel()); assertEquals("Bad link targetUrl", "/foo", link.getTargetUrl()); - assertEquals("Bad timezone targetUrl", "Jamaica", adminGuiConfiguration.getDefaultTimezone()); + assertEquals("Bad timezone targetUrl", "Jamaica", compiledUserProfile.getDefaultTimezone()); } @Test diff --git a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestResources.java b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestResources.java index f69a38cba20..7493e3534fe 100644 --- a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestResources.java +++ b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestResources.java @@ -30,6 +30,7 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemName; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.schema.constants.SchemaConstants; @@ -1052,7 +1053,7 @@ public void modifyConfigurationDiffExpressionRaw(final String TEST_NAME, Failabl String serializedModifiedResource = prismContext.serializerFor(PrismContext.LANG_XML).serialize(modifiedResource); assertNotNull(serializedModifiedResource); - ObjectDelta diffDelta = resourceBefore.diff(modifiedResource, true, true); + ObjectDelta diffDelta = resourceBefore.diff(modifiedResource, EquivalenceStrategy.LITERAL_IGNORE_METADATA); display("Diff delta", diffDelta); // WHEN diff --git a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/security/TestSecurityAdvanced.java b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/security/TestSecurityAdvanced.java index 77d0c618bad..5926fb7c0f9 100644 --- a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/security/TestSecurityAdvanced.java +++ b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/security/TestSecurityAdvanced.java @@ -112,6 +112,9 @@ public class TestSecurityAdvanced extends AbstractSecurityTest { protected static final File ROLE_READ_ROLE_MEMBERS_NONE_FILE = new File(TEST_DIR, "role-read-role-members-none.xml"); protected static final String ROLE_READ_ROLE_MEMBERS_NONE_OID = "9e93dfb2-3eff-11e7-b56b-1b0e35f837fc"; + protected static final File ROLE_ROLE_ADMINISTRATOR_FILE = new File(TEST_DIR, "role-role-administrator.xml"); + protected static final String ROLE_ROLE_ADMINISTRATOR_OID = "b63ee91e-020c-11e9-a7c2-df4b9f00f209"; + protected static final File ROLE_LIMITED_ROLE_ADMINISTRATOR_FILE = new File(TEST_DIR, "role-limited-role-administrator.xml"); protected static final String ROLE_LIMITED_ROLE_ADMINISTRATOR_OID = "ce67b472-e5a6-11e7-98c3-174355334559"; @@ -160,6 +163,7 @@ public void initSystem(Task initTask, OperationResult initResult) throws Excepti RESOURCE_DUMMY_VAULT_FILE, RESOURCE_DUMMY_VAULT_OID, initTask, initResult); repoAddObjectFromFile(ROLE_VAULT_DWELLER_FILE, initResult); + repoAddObjectFromFile(ROLE_ROLE_ADMINISTRATOR_FILE, initResult); repoAddObjectFromFile(ROLE_LIMITED_ROLE_ADMINISTRATOR_FILE, initResult); repoAddObjectFromFile(ROLE_LIMITED_READ_ROLE_ADMINISTRATOR_FILE, initResult); repoAddObjectFromFile(ROLE_MAXASSIGNEES_10_FILE, initResult); @@ -180,7 +184,7 @@ public void initSystem(Task initTask, OperationResult initResult) throws Excepti setDefaultObjectTemplate(UserType.COMPLEX_TYPE, USER_TEMPLATE_SECURITY_OID, initResult); } - protected static final int NUMBER_OF_IMPORTED_ROLES = 17; + protected static final int NUMBER_OF_IMPORTED_ROLES = 18; protected int getNumberOfRoles() { return super.getNumberOfRoles() + NUMBER_OF_IMPORTED_ROLES; @@ -305,7 +309,6 @@ public void test102AutzLechuckPersonaManagement() throws Exception { assertGetDeny(UserType.class, USER_JACK_OID); assertGetDeny(UserType.class, USER_GUYBRUSH_OID); assertGetAllow(UserType.class, USER_LECHUCK_OID); - display("HEREHERE"); assertGetAllow(UserType.class, USER_CHARLES_OID); // TODO: MID-3899 @@ -2376,10 +2379,78 @@ public void test264AutzJackLimitedReadRoleAdministrator() throws Exception { assertItemFlags(roleEmptyEditSchema, ItemPath.create(RoleType.F_INDUCEMENT, AssignmentType.F_CONSTRUCTION, ConstructionType.F_STRENGTH), true, true, true); + + assertAllow("induce role uninteresting to empty role", + (task, result) -> induceRole(RoleType.class, ROLE_EMPTY_OID, ROLE_UNINTERESTING_OID, task, result)); + + assertAllow("uninduce role uninteresting to empty role", + (task, result) -> uninduceRole(RoleType.class, ROLE_EMPTY_OID, ROLE_UNINTERESTING_OID, task, result)); + + assertGlobalStateUntouched(); + } + + /** + * MID-5005 + */ + @Test + public void test266AutzJackRoleAdministrator() throws Exception { + final String TEST_NAME = "test266AutzJackRoleAdministrator"; + displayTestTitle(TEST_NAME); + // GIVEN + cleanupAutzTest(USER_JACK_OID); + assignRole(USER_JACK_OID, ROLE_ROLE_ADMINISTRATOR_OID); + login(USER_JACK_USERNAME); + + // WHEN + displayWhen(TEST_NAME); + + assertGetAllow(UserType.class, USER_JACK_OID); + assertGetDeny(UserType.class, USER_JACK_OID, SelectorOptions.createCollection(GetOperationOptions.createRaw())); + assertGetDeny(UserType.class, USER_GUYBRUSH_OID); + assertGetDeny(UserType.class, USER_GUYBRUSH_OID, SelectorOptions.createCollection(GetOperationOptions.createRaw())); + assertReadDenyRaw(); + + assertSearch(UserType.class, null, 1); + assertSearch(UserType.class, createNameQuery(USER_JACK_USERNAME), 1); + assertSearchDeny(UserType.class, createNameQuery(USER_JACK_USERNAME), SelectorOptions.createCollection(GetOperationOptions.createRaw())); + assertSearch(UserType.class, createNameQuery(USER_GUYBRUSH_USERNAME), 0); + assertSearchDeny(UserType.class, createNameQuery(USER_GUYBRUSH_USERNAME), SelectorOptions.createCollection(GetOperationOptions.createRaw())); + + assertAddDeny(); + assertDeleteDeny(); + + assertAddAllow(ROLE_EXCLUSION_PIRATE_FILE); + + PrismObject roleExclusion = assertGetAllow(RoleType.class, ROLE_EXCLUSION_PIRATE_OID); + display("Exclusion role", roleExclusion); + assertExclusion(roleExclusion, ROLE_PIRATE_OID); + + assertAllow("assign role uninteresting to empty role", + (task, result) -> assignRole(RoleType.class, ROLE_EMPTY_OID, ROLE_UNINTERESTING_OID, task, result)); + + assertAllow("unassign role uninteresting to empty role", + (task, result) -> unassignRole(RoleType.class, ROLE_EMPTY_OID, ROLE_UNINTERESTING_OID, task, result)); + + PrismObject roleEmpty = assertGetAllow(RoleType.class, ROLE_EMPTY_OID); + display("Empty empty (1)", roleEmpty); + assertAssignments(roleEmpty, 0); + assertInducements(roleEmpty, 0); + + assertAllow("induce role uninteresting to empty role", + (task, result) -> induceRole(RoleType.class, ROLE_EMPTY_OID, ROLE_UNINTERESTING_OID, task, result)); + + assertAllow("uninduce role uninteresting to empty role", + (task, result) -> uninduceRole(RoleType.class, ROLE_EMPTY_OID, ROLE_UNINTERESTING_OID, task, result)); + + roleEmpty = assertGetAllow(RoleType.class, ROLE_EMPTY_OID); + display("Empty empty (2)", roleEmpty); + assertAssignments(roleEmpty, 0); + assertInducements(roleEmpty, 0); assertGlobalStateUntouched(); } + @Test public void test270AutzJackModifyPolicyException() throws Exception { diff --git a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/security/TestSecurityBasic.java b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/security/TestSecurityBasic.java index 1a3119e31c6..72533433d6a 100644 --- a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/security/TestSecurityBasic.java +++ b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/security/TestSecurityBasic.java @@ -450,6 +450,25 @@ public void test208AutzJackReadSomeRoles() throws Exception { assertGetAllow(RoleType.class, ROLE_BUSINESS_2_OID); assertGetAllow(RoleType.class, ROLE_BUSINESS_3_OID); + assertGlobalStateUntouched(); + } + + /** + * MID-5002 + */ + @Test + public void test209AutzJackSuperuserAndGuiAccessRole() throws Exception { + final String TEST_NAME = "test209AutzJackSuperuserAndGuiAccessRole"; + displayTestTitle(TEST_NAME); + // GIVEN + cleanupAutzTest(USER_JACK_OID); + assignRole(USER_JACK_OID, ROLE_SUPERUSER_OID); + assignRole(USER_JACK_OID, ROLE_APPROVER_OID); + login(USER_JACK_USERNAME); + + // WHEN + assertSuperuserAccess(NUMBER_OF_ALL_USERS); + assertGlobalStateUntouched(); } diff --git a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/security/TestSecurityPrincipal.java b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/security/TestSecurityPrincipal.java index 2c7d1bbed85..471b427cfb4 100644 --- a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/security/TestSecurityPrincipal.java +++ b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/security/TestSecurityPrincipal.java @@ -241,7 +241,12 @@ public void test100JackRolePirate() throws Exception { assertNotAuthorized(principal, AUTZ_LOOT_URL, null); assertNotAuthorized(principal, AUTZ_COMMAND_URL); - assertAdminGuiConfigurations(principal, 1, 2, 3, 2, 2); + assertCompiledUserProfile(principal) + .assertAdditionalMenuLinks(1) + .assertUserDashboardLinks(2) + .assertObjectCollectionViews(3) + .assertObjectForms(2) + .assertUserDashboardWidgets(2); } @Test @@ -267,7 +272,12 @@ public void test109JackUnassignRolePirate() throws Exception { assertNotAuthorized(principal, AUTZ_LOOT_URL); assertNotAuthorized(principal, AUTZ_COMMAND_URL); - assertAdminGuiConfigurations(principal, 0, 1, 3, 1, 0); + assertCompiledUserProfile(principal) + .assertAdditionalMenuLinks(0) + .assertUserDashboardLinks(1) + .assertObjectCollectionViews(3) + .assertObjectForms(1) + .assertUserDashboardWidgets(0); } @Test diff --git a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/sync/TestImportRecon.java b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/sync/TestImportRecon.java index 5abb05b2f6c..9694eb7c6eb 100644 --- a/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/sync/TestImportRecon.java +++ b/model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/sync/TestImportRecon.java @@ -1550,6 +1550,7 @@ public void test320ReconcileDummyAzureDeleteOtis() throws Exception { /** * Create account that will correlate to existing user. * See that it is linked and modified. + * MID-4997 */ @Test public void test330ReconcileDummyAzureAddAccountRapp() throws Exception { @@ -1621,6 +1622,8 @@ public void test330ReconcileDummyAzureAddAccountRapp() throws Exception { } assertNotNull("No clear text password", stringPassword); + assertTrue("Rapp's password is supposed to contain letter a: "+stringPassword, stringPassword.contains("a")); + PrismObject passwordPolicy = getObjectViaRepo(ValuePolicyType.class, PASSWORD_POLICY_LOWER_CASE_ALPHA_AZURE_OID); diff --git a/model/model-intest/src/test/resources/archetypes/collection-active-employees.xml b/model/model-intest/src/test/resources/archetypes/collection-active-employees.xml new file mode 100644 index 00000000000..3003f519e3b --- /dev/null +++ b/model/model-intest/src/test/resources/archetypes/collection-active-employees.xml @@ -0,0 +1,33 @@ + + + Active employees + UserType + + + activation/effectiveStatus + enabled + + + + + + diff --git a/model/model-intest/src/test/resources/archetypes/role-user-administrator.xml b/model/model-intest/src/test/resources/archetypes/role-user-administrator.xml new file mode 100644 index 00000000000..7213984410b --- /dev/null +++ b/model/model-intest/src/test/resources/archetypes/role-user-administrator.xml @@ -0,0 +1,91 @@ + + + + User administrator + Role for delegated administration of users. + + + self-read + + Allow to read all the properties of "self" object. I.e. every logged-in user can read + object that represent his own identity. + + http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#read + + self + + + + + self-shadow-read + + Allow to read all the properties of all the shadows that belong to "self" object. + I.e. every logged-in user can read all his accounts. + + http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#read + + ShadowType + + self + + + + + + assignment-target-read + + Authorization that allows to read all the object that are possible assignment targets. We want that + to display the targets in the selection windows. + Note that this authorization may be too broad for production use. Normally it should be limited to just + selected properties such as name and description. + + http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#read + + OrgType + + + ResourceType + + + RoleType + + + ServiceType + + + + + + + RoleType + true + + + + + Active employees + UserType + + + + + + + + diff --git a/model/model-intest/src/test/resources/archetypes/system-configuration-archetypes.xml b/model/model-intest/src/test/resources/archetypes/system-configuration-archetypes.xml index 712d2184ef1..26a5c2e781e 100644 --- a/model/model-intest/src/test/resources/archetypes/system-configuration-archetypes.xml +++ b/model/model-intest/src/test/resources/archetypes/system-configuration-archetypes.xml @@ -194,5 +194,22 @@ 30 + + + + ServiceType + true + + + + + All employees + UserType + + + + + + diff --git a/model/model-intest/src/test/resources/security/role-approver.xml b/model/model-intest/src/test/resources/security/role-approver.xml index ea219e89aa1..b22dfd7e8b9 100644 --- a/model/model-intest/src/test/resources/security/role-approver.xml +++ b/model/model-intest/src/test/resources/security/role-approver.xml @@ -34,6 +34,10 @@ http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#orgUnit http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#service + + gui services all + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#servicesAll + workitems-delegate diff --git a/model/model-intest/src/test/resources/security/role-role-administrator.xml b/model/model-intest/src/test/resources/security/role-role-administrator.xml new file mode 100644 index 00000000000..2a7c6d438a5 --- /dev/null +++ b/model/model-intest/src/test/resources/security/role-role-administrator.xml @@ -0,0 +1,53 @@ + + + Role Administrator + + self-read + http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#read + + self + + + + read roles + http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#read + + RoleType + + + + write roles + http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#add + http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#modify + http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#delete + + RoleType + + name + description + subtype + lifecycleState + requestable + delegable + inducement + assignment + + diff --git a/model/model-intest/src/test/resources/sync/password-policy-azure.xml b/model/model-intest/src/test/resources/sync/password-policy-azure.xml index 2b455dc8ef5..292427ec9ae 100644 --- a/model/model-intest/src/test/resources/sync/password-policy-azure.xml +++ b/model/model-intest/src/test/resources/sync/password-policy-azure.xml @@ -60,6 +60,14 @@ 1234567890 + + + + + + 100 \ No newline at end of file diff --git a/model/model-intest/testng-integration.xml b/model/model-intest/testng-integration.xml index 835f420ce05..4a68cf42241 100644 --- a/model/model-intest/testng-integration.xml +++ b/model/model-intest/testng-integration.xml @@ -15,7 +15,7 @@ ~ limitations under the License. --> - + diff --git a/model/model-test/src/main/java/com/evolveum/midpoint/model/test/AbstractModelIntegrationTest.java b/model/model-test/src/main/java/com/evolveum/midpoint/model/test/AbstractModelIntegrationTest.java index c309d36972b..d0b477b6fb7 100644 --- a/model/model-test/src/main/java/com/evolveum/midpoint/model/test/AbstractModelIntegrationTest.java +++ b/model/model-test/src/main/java/com/evolveum/midpoint/model/test/AbstractModelIntegrationTest.java @@ -95,6 +95,9 @@ import com.evolveum.midpoint.model.api.ModelInteractionService; import com.evolveum.midpoint.model.api.ModelService; import com.evolveum.midpoint.model.api.RoleSelectionSpecification; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; +import com.evolveum.midpoint.model.api.authentication.MidPointUserProfilePrincipal; +import com.evolveum.midpoint.model.api.authentication.UserProfileService; import com.evolveum.midpoint.model.api.context.ModelContext; import com.evolveum.midpoint.model.api.context.ModelElementContext; import com.evolveum.midpoint.model.api.context.ModelProjectionContext; @@ -104,6 +107,7 @@ import com.evolveum.midpoint.model.common.stringpolicy.UserValuePolicyOriginResolver; import com.evolveum.midpoint.model.common.stringpolicy.ValuePolicyProcessor; import com.evolveum.midpoint.model.test.asserter.ArchetypeInteractionSpecificationAsserter; +import com.evolveum.midpoint.model.test.asserter.CompiledUserProfileAsserter; import com.evolveum.midpoint.model.test.asserter.ModelContextAsserter; import com.evolveum.midpoint.notifications.api.NotificationManager; import com.evolveum.midpoint.notifications.api.transports.Message; @@ -136,7 +140,6 @@ import com.evolveum.midpoint.security.api.AuthorizationConstants; import com.evolveum.midpoint.security.api.MidPointPrincipal; import com.evolveum.midpoint.security.api.SecurityContextManager; -import com.evolveum.midpoint.security.api.UserProfileService; import com.evolveum.midpoint.security.enforcer.api.AuthorizationParameters; import com.evolveum.midpoint.security.enforcer.api.ItemSecurityConstraints; import com.evolveum.midpoint.security.enforcer.api.SecurityEnforcer; @@ -174,7 +177,6 @@ import com.evolveum.midpoint.xml.ns._public.common.common_3.AbstractRoleType; import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType; import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType; import com.evolveum.midpoint.xml.ns._public.common.common_3.ArchetypeType; import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentHolderType; import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentSelectorType; @@ -798,6 +800,18 @@ protected void unassignRole(String userOid, String roleOid, ActivationType activ PolicyViolationException, SecurityViolationException { modifyUserAssignment(userOid, roleOid, RoleType.COMPLEX_TYPE, null, task, null, activationType, false, result); } + + protected void unassignRole(Class focusClass, String focusOid, String roleOid, Task task, OperationResult result) throws ObjectNotFoundException, + SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, ObjectAlreadyExistsException, + PolicyViolationException, SecurityViolationException { + unassignRole(focusClass, focusOid, roleOid, (ActivationType) null, task, result); + } + + protected void unassignRole(Class focusClass, String focusOid, String roleOid, ActivationType activationType, Task task, OperationResult result) throws ObjectNotFoundException, + SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, ObjectAlreadyExistsException, + PolicyViolationException, SecurityViolationException { + modifyAssignmentHolderAssignment(focusClass, focusOid, roleOid, RoleType.COMPLEX_TYPE, null, task, null, activationType, false, result); + } protected void assignRole(Class focusClass, String focusOid, String roleOid, ActivationType activationType, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, ObjectAlreadyExistsException, @@ -1136,19 +1150,19 @@ protected void modifyUserAssignment(String userOid, String roleOid, QName refTyp modifyFocusAssignment(UserType.class, userOid, roleOid, refType, relation, task, modificationBlock, add, options, result); } - protected void modifyFocusAssignment(Class focusClass, String focusOid, String roleOid, QName refType, QName relation, Task task, + protected void modifyFocusAssignment(Class focusClass, String focusOid, String roleOid, QName refType, QName relation, Task task, Consumer modificationBlock, boolean add, OperationResult result) throws ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, ObjectAlreadyExistsException, PolicyViolationException, SecurityViolationException { modifyFocusAssignment(focusClass, focusOid, roleOid, refType, relation, task, modificationBlock, add, null, result); } - protected void modifyFocusAssignment(Class focusClass, String focusOid, String roleOid, QName refType, QName relation, Task task, + protected void modifyFocusAssignment(Class focusClass, String focusOid, String roleOid, QName refType, QName relation, Task task, Consumer modificationBlock, boolean add, ModelExecuteOptions options, OperationResult result) throws ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, ObjectAlreadyExistsException, PolicyViolationException, SecurityViolationException { modifyFocusAssignment(focusClass, focusOid, FocusType.F_ASSIGNMENT, roleOid, refType, relation, task, modificationBlock, add, options, result); } - protected void modifyFocusAssignment(Class focusClass, String focusOid, QName elementName, String roleOid, QName refType, QName relation, Task task, + protected void modifyFocusAssignment(Class focusClass, String focusOid, QName elementName, String roleOid, QName refType, QName relation, Task task, Consumer modificationBlock, boolean add, ModelExecuteOptions options, OperationResult result) throws ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, ObjectAlreadyExistsException, PolicyViolationException, SecurityViolationException { ObjectDelta focusDelta = createAssignmentFocusDelta(focusClass, focusOid, elementName, roleOid, refType, relation, modificationBlock, add); @@ -1279,7 +1293,7 @@ protected ContainerDelta createAssignmentM } - protected ContainerDelta createAssignmentModification(Class type, QName elementName, String roleOid, QName refType, QName relation, + protected ContainerDelta createAssignmentModification(Class type, QName elementName, String roleOid, QName refType, QName relation, Consumer modificationBlock, boolean add) throws SchemaException { ContainerDelta assignmentDelta = prismContext.deltaFactory().container().createDelta(ItemName.fromQName(elementName), getObjectDefinition(type)); PrismContainerValue cval = prismContext.itemFactory().createContainerValue(); @@ -1368,7 +1382,7 @@ protected ObjectDelta createAssignmentFocusDelta(Class< return createAssignmentFocusDelta(focusClass, focusOid, FocusType.F_ASSIGNMENT, roleOid, refType, relation, modificationBlock, add); } - protected ObjectDelta createAssignmentFocusDelta(Class focusClass, String focusOid, QName elementName, String roleOid, QName refType, QName relation, + protected ObjectDelta createAssignmentFocusDelta(Class focusClass, String focusOid, QName elementName, String roleOid, QName refType, QName relation, Consumer modificationBlock, boolean add) throws SchemaException { Collection> modifications = new ArrayList<>(); modifications.add((createAssignmentModification(focusClass, elementName, roleOid, refType, relation, modificationBlock, add))); @@ -4698,42 +4712,22 @@ protected void assertNoAuthorizations(MidPointPrincipal principal) { } } - protected AdminGuiConfigurationType assertAdminGuiConfigurations(MidPointPrincipal principal, int expectedMenuLinks, - int expectedDashboardLinks, int expectedObjectLists, int expectedObjectForms, int expecteduserDashboardWidgets) { - AdminGuiConfigurationType adminGuiConfiguration = principal.getAdminGuiConfiguration(); - display("Admin GUI config for "+principal.getUsername(), adminGuiConfiguration); - assertAdminGuiConfigurations(adminGuiConfiguration, - expectedMenuLinks, expectedDashboardLinks, expectedObjectLists, expectedObjectForms, expecteduserDashboardWidgets); - return adminGuiConfiguration; - } - - protected void assertAdminGuiConfigurations(AdminGuiConfigurationType adminGuiConfiguration, - int expectedMenuLinks, int expectedDashboardLinks, int expectedObjectLists, int expectedObjectForms, int expecteduserDashboardWidgets) { - assertNotNull("No admin GUI configuration", adminGuiConfiguration); - assertEquals("Wrong number of menu links in", - expectedMenuLinks, adminGuiConfiguration.getAdditionalMenuLink().size()); - assertEquals("Wrong number of menu links in", - expectedDashboardLinks, adminGuiConfiguration.getUserDashboardLink().size()); - if ( adminGuiConfiguration.getObjectLists() == null ) { - if (expectedObjectLists != 0) { - AssertJUnit.fail("Wrong number of object lists in user dashboard admin GUI configuration, expected " - + expectedObjectLists + " but there was none"); - } - } else { - assertEquals("Wrong number of object lists in admin GUI configuration", - expectedObjectLists, adminGuiConfiguration.getObjectLists().getObjectList().size()); - } - assertEquals("Wrong number of object forms in admin GUI configuration", - expectedObjectForms, adminGuiConfiguration.getObjectForms().getObjectForm().size()); - if ( adminGuiConfiguration.getUserDashboard() == null) { - if (expecteduserDashboardWidgets != 0) { - AssertJUnit.fail("Wrong number of widgets in user dashboard admin GUI configuration, expected " - + expecteduserDashboardWidgets + " but there was none"); - } - } else { - assertEquals("Wrong number of widgets in user dashboard admin GUI configuration", - expectedObjectForms, adminGuiConfiguration.getUserDashboard().getWidget().size()); + protected CompiledUserProfileAsserter assertCompiledUserProfile(MidPointPrincipal principal) { + if (!(principal instanceof MidPointUserProfilePrincipal)) { + fail("Expected MidPointUserProfilePrincipal, but got "+principal.getClass()); } + CompiledUserProfile compiledUserProfile = ((MidPointUserProfilePrincipal)principal).getCompiledUserProfile(); + CompiledUserProfileAsserter asserter = new CompiledUserProfileAsserter<>(compiledUserProfile, null, "in principal "+principal); + initializeAsserter(asserter); + asserter.display(); + return asserter; + } + + protected CompiledUserProfileAsserter assertCompiledUserProfile(CompiledUserProfile compiledUserProfile) { + CompiledUserProfileAsserter asserter = new CompiledUserProfileAsserter<>(compiledUserProfile, null, null); + initializeAsserter(asserter); + asserter.display(); + return asserter; } protected void createSecurityContext(MidPointPrincipal principal) { diff --git a/model/model-test/src/main/java/com/evolveum/midpoint/model/test/asserter/CompiledUserProfileAsserter.java b/model/model-test/src/main/java/com/evolveum/midpoint/model/test/asserter/CompiledUserProfileAsserter.java new file mode 100644 index 00000000000..2c0cca4073f --- /dev/null +++ b/model/model-test/src/main/java/com/evolveum/midpoint/model/test/asserter/CompiledUserProfileAsserter.java @@ -0,0 +1,110 @@ +/** + * Copyright (c) 2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.model.test.asserter; + +import static org.testng.AssertJUnit.assertEquals; +import static org.testng.AssertJUnit.assertNotNull; +import static org.testng.AssertJUnit.assertTrue; + +import org.testng.AssertJUnit; + +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; +import com.evolveum.midpoint.test.IntegrationTestTools; +import com.evolveum.midpoint.test.asserter.AbstractAsserter; + +/** + * @author semancik + * + */ +public class CompiledUserProfileAsserter extends AbstractAsserter { + + private final CompiledUserProfile compiledUserProfile; + + public CompiledUserProfileAsserter(CompiledUserProfile compiledUserProfile, RA returnAsserter, String details) { + super(returnAsserter, details); + this.compiledUserProfile = compiledUserProfile; + } + + CompiledUserProfile getCompiledUserProfile() { + assertNotNull("Null " + desc(), compiledUserProfile); + return compiledUserProfile; + } + + public CompiledUserProfileAsserter assertNull() { + AssertJUnit.assertNull("Unexpected " + desc(), compiledUserProfile); + return this; + } + + public CompiledUserProfileAsserter assertAdditionalMenuLinks(int expectedMenuLinks) { + assertEquals("Wrong number of additionalMenuLinks in " + desc(), expectedMenuLinks, getCompiledUserProfile().getAdditionalMenuLink().size()); + return this; + } + + public CompiledUserProfileAsserter assertUserDashboardLinks(int expectedLinks) { + assertEquals("Wrong number of userDashboardLinks in " + desc(), expectedLinks, getCompiledUserProfile().getUserDashboardLink().size()); + return this; + } + + public CompiledUserProfileAsserter assertObjectForms(int expectedForms) { + if (getCompiledUserProfile().getObjectForms() == null) { + assertTrue("Wrong number of object forms in " + desc() + "; exected " + expectedForms + " but was null", expectedForms == 0); + } else { + assertEquals("Wrong number of object forms in " + desc(), expectedForms, getCompiledUserProfile().getObjectForms().getObjectForm().size()); + } + return this; + } + + public CompiledUserProfileAsserter assertUserDashboardWidgets(int expectedWidgetws) { + if ( compiledUserProfile.getUserDashboard() == null) { + if (expectedWidgetws != 0) { + fail("Wrong number of widgets in user dashboard admin GUI configuration, expected " + + expectedWidgetws + " but there was none"); + } + } else { + assertEquals("Wrong number of user dashboard widgets in " + desc(), expectedWidgetws, getCompiledUserProfile().getUserDashboard().getWidget().size()); + } + return this; + } + + public CompiledUserProfileAsserter assertObjectCollectionViews(int expectedViews) { + assertEquals("Wrong number of object collection views in " + desc(), expectedViews, getCompiledUserProfile().getObjectCollectionViews().size()); + return this; + } + + public ObjectCollectionViewsAsserter> objectCollectionViews() { + ObjectCollectionViewsAsserter> asserter = new ObjectCollectionViewsAsserter<>(getCompiledUserProfile().getObjectCollectionViews(), this, desc()); + copySetupTo(asserter); + return asserter; + } + + // TODO: better asserter for views + + public CompiledUserProfileAsserter display() { + display(desc()); + return this; + } + + public CompiledUserProfileAsserter display(String message) { + IntegrationTestTools.display(message, compiledUserProfile); + return this; + } + + @Override + protected String desc() { + return descWithDetails("compiled user profile"); + } + +} diff --git a/model/model-test/src/main/java/com/evolveum/midpoint/model/test/asserter/ObjectCollectionViewAsserter.java b/model/model-test/src/main/java/com/evolveum/midpoint/model/test/asserter/ObjectCollectionViewAsserter.java new file mode 100644 index 00000000000..56ec294f600 --- /dev/null +++ b/model/model-test/src/main/java/com/evolveum/midpoint/model/test/asserter/ObjectCollectionViewAsserter.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.model.test.asserter; + +import static org.testng.AssertJUnit.assertEquals; +import static org.testng.AssertJUnit.assertNotNull; + +import com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView; +import com.evolveum.midpoint.prism.query.ObjectFilter; +import com.evolveum.midpoint.test.asserter.AbstractAsserter; + +/** + * @author semancik + * + */ +public class ObjectCollectionViewAsserter extends AbstractAsserter { + + private final CompiledObjectCollectionView view; + + public ObjectCollectionViewAsserter(CompiledObjectCollectionView view, RA returnAsserter, String desc) { + super(returnAsserter, desc); + this.view = view; + } + + public ObjectCollectionViewAsserter assertName(String expected) { + assertEquals("Wrong view name in "+desc(), expected, view.getViewName()); + return this; + } + + public ObjectCollectionViewAsserter assertFilter() { + assertNotNull("Null filter in "+desc(), view.getFilter()); + return this; + } + // TODO + + public ObjectFilter getFilter() { + return view.getFilter(); + } + + @Override + protected String desc() { + return descWithDetails(view); + } + +} diff --git a/model/model-test/src/main/java/com/evolveum/midpoint/model/test/asserter/ObjectCollectionViewFinder.java b/model/model-test/src/main/java/com/evolveum/midpoint/model/test/asserter/ObjectCollectionViewFinder.java new file mode 100644 index 00000000000..0a07e7da22c --- /dev/null +++ b/model/model-test/src/main/java/com/evolveum/midpoint/model/test/asserter/ObjectCollectionViewFinder.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.model.test.asserter; + +import static org.testng.AssertJUnit.assertEquals; + +import org.testng.AssertJUnit; + +import com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView; +import com.evolveum.midpoint.util.exception.ObjectNotFoundException; +import com.evolveum.midpoint.util.exception.SchemaException; + +/** + * @author semancik + * + */ +public class ObjectCollectionViewFinder { + + private final ObjectCollectionViewsAsserter viewsAsserter; + private String name; + + public ObjectCollectionViewFinder(ObjectCollectionViewsAsserter viewsAsserter) { + this.viewsAsserter = viewsAsserter; + } + + public ObjectCollectionViewFinder name(String name) { + this.name = name; + return this; + } + + public ObjectCollectionViewAsserter> find() throws ObjectNotFoundException, SchemaException { + CompiledObjectCollectionView found = null; + for (CompiledObjectCollectionView view: viewsAsserter.getViews()) { + if (matches(view)) { + if (found == null) { + found = view; + } else { + fail("Found more than one link that matches search criteria"); + } + } + } + if (found == null) { + fail("Found no link that matches search criteria"); + } + return viewsAsserter.forView(found); + } + + public ObjectCollectionViewsAsserter assertCount(int expectedCount) throws ObjectNotFoundException, SchemaException { + int foundCount = 0; + for (CompiledObjectCollectionView view: viewsAsserter.getViews()) { + if (matches(view)) { + foundCount++; + } + } + assertEquals("Wrong number of links for specified criteria in "+viewsAsserter.desc(), expectedCount, foundCount); + return viewsAsserter; + } + + private boolean matches(CompiledObjectCollectionView view) throws ObjectNotFoundException, SchemaException { + + if (name != null) { + if (!name.equals(view.getViewName())) { + return false; + } + } + + // TODO: more criteria + return true; + } + + protected void fail(String message) { + AssertJUnit.fail(message); + } + +} diff --git a/model/model-test/src/main/java/com/evolveum/midpoint/model/test/asserter/ObjectCollectionViewsAsserter.java b/model/model-test/src/main/java/com/evolveum/midpoint/model/test/asserter/ObjectCollectionViewsAsserter.java new file mode 100644 index 00000000000..915e86f17c8 --- /dev/null +++ b/model/model-test/src/main/java/com/evolveum/midpoint/model/test/asserter/ObjectCollectionViewsAsserter.java @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2018 Evolveum + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.evolveum.midpoint.model.test.asserter; + +import static org.testng.AssertJUnit.assertEquals; + +import java.util.List; + +import com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView; +import com.evolveum.midpoint.test.asserter.AbstractAsserter; + +/** + * @author semancik + * + */ +public class ObjectCollectionViewsAsserter extends AbstractAsserter { + + private final List objectCollectionViews; + + public ObjectCollectionViewsAsserter(List objectCollectionViews, RA returnAsserter, String desc) { + super(returnAsserter, desc); + this.objectCollectionViews = objectCollectionViews; + } + + ObjectCollectionViewAsserter> forView(CompiledObjectCollectionView view) { + ObjectCollectionViewAsserter> asserter = new ObjectCollectionViewAsserter<>(view, this, "view in "+desc()); + copySetupTo(asserter); + return asserter; + } + + public ObjectCollectionViewFinder by() { + return new ObjectCollectionViewFinder<>(this); + } + + public List getViews() { + return objectCollectionViews; + } + + public ObjectCollectionViewsAsserter assertViews(int expected) { + assertEquals("Wrong number of views in "+desc(), expected, getViews().size()); + return this; + } + + public ObjectCollectionViewAsserter> single() { + assertViews(1); + return forView(getViews().get(0)); + } + + @Override + protected String desc() { + return "object collection views of " + getDetails(); + } + +} diff --git a/model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/formatters/TextFormatter.java b/model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/formatters/TextFormatter.java index 60347a48cfb..18bb9620149 100644 --- a/model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/formatters/TextFormatter.java +++ b/model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/formatters/TextFormatter.java @@ -298,7 +298,7 @@ private void formatPrismReference(StringBuilder sb, String prefix, Item item, bo sb.append(formatReferenceValue(referenceValue, mightBeRemoved)); } } else if (item.size() == 1) { - sb.append(formatReferenceValue(((PrismReference) item).getValue(0), mightBeRemoved)); + sb.append(formatReferenceValue(((PrismReference) item).getAnyValue(), mightBeRemoved)); } sb.append("\n"); } @@ -315,7 +315,7 @@ private void formatPrismProperty(StringBuilder sb, String prefix, Item item) { sb.append(ValueDisplayUtil.toStringValue(propertyValue)); } } else if (item.size() == 1) { - sb.append(ValueDisplayUtil.toStringValue(((PrismProperty) item).getValue(0))); + sb.append(ValueDisplayUtil.toStringValue(((PrismProperty) item).getAnyValue())); } sb.append("\n"); } diff --git a/model/pom.xml b/model/pom.xml index 544755a2302..3b2745ac5ef 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -62,11 +62,30 @@ certification-api certification-impl + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.testng testng test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/model/report-impl/src/main/java/com/evolveum/midpoint/report/impl/ReportUtils.java b/model/report-impl/src/main/java/com/evolveum/midpoint/report/impl/ReportUtils.java index 5a4ce2883ea..d90a57f8ecb 100644 --- a/model/report-impl/src/main/java/com/evolveum/midpoint/report/impl/ReportUtils.java +++ b/model/report-impl/src/main/java/com/evolveum/midpoint/report/impl/ReportUtils.java @@ -691,7 +691,7 @@ public static Object getItemRealValue(PrismContainerValue containerValue, String if (item.size() > 1) { throw new IllegalStateException("More than one value in item " + item); } - PrismValue value = item.getValue(0); + PrismValue value = item.getAnyValue(); if (value == null) { return null; } diff --git a/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/assignments/AddAssignmentAspect.java b/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/assignments/AddAssignmentAspect.java index b88b9241ff5..617cdcd02a4 100644 --- a/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/assignments/AddAssignmentAspect.java +++ b/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/assignments/AddAssignmentAspect.java @@ -22,6 +22,7 @@ import com.evolveum.midpoint.prism.PrismContext; import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.prism.delta.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.task.api.Task; @@ -188,7 +189,7 @@ private List> getApprovalRequestsFromFocusModify private boolean existsEquivalentValue(PrismObject focusOld, PrismContainerValue assignmentValue) { FocusType focusType = (FocusType) focusOld.asObjectable(); for (AssignmentType existing : focusType.getAssignment()) { - if (existing.asPrismContainerValue().equalsRealValue(assignmentValue)) { + if (existing.asPrismContainerValue().equals(assignmentValue, EquivalenceStrategy.REAL_VALUE)) { return true; } } diff --git a/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/entitlements/AddAssociationAspect.java b/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/entitlements/AddAssociationAspect.java index f0ecbf645f5..e97dd54d1fe 100644 --- a/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/entitlements/AddAssociationAspect.java +++ b/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/entitlements/AddAssociationAspect.java @@ -16,6 +16,7 @@ package com.evolveum.midpoint.wf.impl.processors.primary.entitlements; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.repo.common.expression.ExpressionVariables; import com.evolveum.midpoint.model.api.context.ModelContext; import com.evolveum.midpoint.model.api.context.ModelProjectionContext; @@ -189,7 +190,7 @@ private AssociationAdditionType createItemToApprove(ShadowAssociationType a, Res private boolean existsEquivalentValue(PrismObject shadowOld, PrismContainerValue association) { ShadowType shadowType = shadowOld.asObjectable(); for (ShadowAssociationType existing : shadowType.getAssociation()) { - if (existing.asPrismContainerValue().equalsRealValue(association)) { // TODO better check + if (existing.asPrismContainerValue().equals(association, EquivalenceStrategy.REAL_VALUE)) { // TODO better check return true; } } diff --git a/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/policy/AssignmentPolicyAspectPart.java b/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/policy/AssignmentPolicyAspectPart.java index d58cf96433c..305991581a5 100644 --- a/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/policy/AssignmentPolicyAspectPart.java +++ b/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/policy/AssignmentPolicyAspectPart.java @@ -18,6 +18,7 @@ import com.evolveum.midpoint.common.LocalizationService; import com.evolveum.midpoint.model.api.ModelInteractionService; +import com.evolveum.midpoint.model.api.authentication.CompiledUserProfile; import com.evolveum.midpoint.model.api.context.EvaluatedAssignment; import com.evolveum.midpoint.model.api.context.EvaluatedPolicyRule; import com.evolveum.midpoint.model.api.context.EvaluatedPolicyRuleTrigger; @@ -41,8 +42,13 @@ import com.evolveum.midpoint.util.DebugUtil; import com.evolveum.midpoint.util.LocalizableMessage; import com.evolveum.midpoint.util.LocalizableMessageBuilder; +import com.evolveum.midpoint.util.exception.CommunicationException; +import com.evolveum.midpoint.util.exception.ConfigurationException; +import com.evolveum.midpoint.util.exception.ExpressionEvaluationException; import com.evolveum.midpoint.util.exception.ObjectNotFoundException; import com.evolveum.midpoint.util.exception.SchemaException; +import com.evolveum.midpoint.util.exception.SecurityViolationException; +import com.evolveum.midpoint.util.exception.SystemException; import com.evolveum.midpoint.util.logging.Trace; import com.evolveum.midpoint.util.logging.TraceManager; import com.evolveum.midpoint.wf.impl.processes.itemApproval.ApprovalSchemaHelper; @@ -114,7 +120,13 @@ void extractAssignmentBasedInstructions(ObjectTreeDeltas objectTreeDeltas, Pr } int instructionsAdded = instructions.size() - instructionsBefore; LOGGER.trace("Assignment-related approval instructions: {}", instructionsAdded); - AdminGuiConfigurationType adminGuiConfiguration = modelInteractionService.getAdminGuiConfiguration(ctx.taskFromModel, result); + CompiledUserProfile adminGuiConfiguration; + try { + adminGuiConfiguration = modelInteractionService.getCompiledUserProfile(ctx.taskFromModel, result); + } catch (CommunicationException | ConfigurationException | SecurityViolationException + | ExpressionEvaluationException e) { + throw new SystemException(e.getMessage(), e); + } Integer limit = adminGuiConfiguration.getRoleManagement() != null ? adminGuiConfiguration.getRoleManagement().getAssignmentApprovalRequestLimit() : null; LOGGER.trace("Allowed approval instructions: {}", limit); diff --git a/model/workflow-impl/src/test/java/com/evolveum/midpoint/wf/impl/policy/AbstractWfTestPolicy.java b/model/workflow-impl/src/test/java/com/evolveum/midpoint/wf/impl/policy/AbstractWfTestPolicy.java index 82963f05a93..b4054de681b 100644 --- a/model/workflow-impl/src/test/java/com/evolveum/midpoint/wf/impl/policy/AbstractWfTestPolicy.java +++ b/model/workflow-impl/src/test/java/com/evolveum/midpoint/wf/impl/policy/AbstractWfTestPolicy.java @@ -521,7 +521,13 @@ protected PrismReferenceValue prv(String oid) { protected PrismReference ref(List orts) { PrismReference rv = prismContext.itemFactory().createReference(new QName("dummy")); - orts.forEach(ort -> rv.add(ort.asReferenceValue().clone())); + orts.forEach(ort -> { + try { + rv.add(ort.asReferenceValue().clone()); + } catch (SchemaException e) { + throw new IllegalStateException(e); + } + }); return rv; } diff --git a/provisioning/pom.xml b/provisioning/pom.xml index d8a94b4349b..73ee2e2fca5 100644 --- a/provisioning/pom.xml +++ b/provisioning/pom.xml @@ -53,11 +53,30 @@ ucf-impl-connid ucf-impl-builtin + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.testng testng test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/EntitlementConverter.java b/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/EntitlementConverter.java index 3b02baccf2f..ffc192205a9 100644 --- a/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/EntitlementConverter.java +++ b/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/EntitlementConverter.java @@ -304,7 +304,10 @@ public boolean handle(PrismObject entitlementShadow) { private ObjectQuery createQuery(RefinedAssociationDefinition assocDefType, RefinedAttributeDefinition assocAttrDef, ResourceAttribute valueAttr) throws SchemaException{ MatchingRule matchingRule = matchingRuleRegistry.getMatchingRule(assocDefType.getResourceObjectAssociationType().getMatchingRule(), assocAttrDef.getTypeName()); - PrismPropertyValue converted = PrismUtil.convertPropertyValue(valueAttr.getValue(0), valueAttr.getDefinition(), assocAttrDef, prismContext); + if (valueAttr.size() > 1) { + throw new IllegalStateException("Attributes with more than 1 values are not supported here"); + } + PrismPropertyValue converted = PrismUtil.convertPropertyValue(valueAttr.getAnyValue(), valueAttr.getDefinition(), assocAttrDef, prismContext); TA normalizedRealValue = matchingRule.normalize(converted.getValue()); PrismPropertyValue normalized = prismContext.itemFactory().createPropertyValue(normalizedRealValue); LOGGER.trace("Converted entitlement filter value: {} ({}) def={}", normalized, normalized.getValue().getClass(), assocAttrDef); diff --git a/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ResourceObjectConverter.java b/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ResourceObjectConverter.java index 42b88ce7f01..c01b0669181 100644 --- a/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ResourceObjectConverter.java +++ b/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ResourceObjectConverter.java @@ -20,6 +20,7 @@ import com.evolveum.midpoint.common.refinery.*; import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.match.MatchingRule; import com.evolveum.midpoint.prism.match.MatchingRuleRegistry; import com.evolveum.midpoint.prism.path.ItemPath; @@ -988,14 +989,12 @@ private PropertyModificationOperation convertToReplace(PropertyDelta property } else { matchingRule = null; } - Comparator comparator = new Comparator>() { - @Override - public int compare(PrismPropertyValue o1, PrismPropertyValue o2) { - if (o1.equalsComplex(o2, true, false, matchingRule)) { - return 0; - } else { - return 1; - } + Comparator comparator = (Comparator>) (o1, o2) -> { + //noinspection unchecked + if (o1.equals(o2, EquivalenceStrategy.IGNORE_METADATA, matchingRule)) { + return 0; + } else { + return 1; } }; // add values that have to be added diff --git a/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ShadowCaretaker.java b/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ShadowCaretaker.java index 6baec6b1e4d..dff5f391e94 100644 --- a/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ShadowCaretaker.java +++ b/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ShadowCaretaker.java @@ -42,14 +42,10 @@ import com.evolveum.midpoint.provisioning.util.ProvisioningUtil; import com.evolveum.midpoint.schema.DeltaConvertor; import com.evolveum.midpoint.schema.constants.SchemaConstants; -import com.evolveum.midpoint.schema.processor.ObjectClassComplexTypeDefinition; import com.evolveum.midpoint.schema.processor.ResourceAttributeContainer; import com.evolveum.midpoint.schema.processor.ResourceAttributeContainerDefinition; import com.evolveum.midpoint.schema.processor.ResourceAttributeDefinition; -import com.evolveum.midpoint.schema.processor.ResourceObjectIdentification; -import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.schema.util.ShadowUtil; -import com.evolveum.midpoint.task.api.Task; import com.evolveum.midpoint.util.QNameUtil; import com.evolveum.midpoint.util.exception.CommunicationException; import com.evolveum.midpoint.util.exception.ConfigurationException; diff --git a/provisioning/ucf-impl-connid/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/ConnIdConvertor.java b/provisioning/ucf-impl-connid/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/ConnIdConvertor.java index a292055b33a..3396c7e44c5 100644 --- a/provisioning/ucf-impl-connid/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/ConnIdConvertor.java +++ b/provisioning/ucf-impl-connid/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/ConnIdConvertor.java @@ -18,7 +18,6 @@ import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.Collection; -import java.util.GregorianCalendar; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -29,8 +28,6 @@ import org.identityconnectors.common.security.GuardedString; import org.identityconnectors.framework.common.objects.Attribute; import org.identityconnectors.framework.common.objects.AttributeBuilder; -import org.identityconnectors.framework.common.objects.AttributeDelta; -import org.identityconnectors.framework.common.objects.AttributeDeltaBuilder; import org.identityconnectors.framework.common.objects.AttributeValueCompleteness; import org.identityconnectors.framework.common.objects.ConnectorObject; import org.identityconnectors.framework.common.objects.ObjectClass; diff --git a/repo/pom.xml b/repo/pom.xml index c04f8360a90..ccd2cd16e19 100644 --- a/repo/pom.xml +++ b/repo/pom.xml @@ -47,11 +47,30 @@ security-enforcer-api security-enforcer-impl + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.testng testng test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/repo/repo-sql-impl-test/pom.xml b/repo/repo-sql-impl-test/pom.xml index f8e7aa69258..1849b1512fc 100644 --- a/repo/repo-sql-impl-test/pom.xml +++ b/repo/repo-sql-impl-test/pom.xml @@ -197,6 +197,12 @@ 4.0-SNAPSHOT test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + @@ -208,6 +214,17 @@ maven-surefire-plugin + ${surefire.version} + + + testng-integration.xml + testng-db-specific.xml + + + + + maven-failsafe-plugin + ${failsafe.version} testng-integration.xml diff --git a/repo/repo-sql-impl-test/sql-procedures/mysql.sql b/repo/repo-sql-impl-test/sql-procedures/mysql.sql index 4770917fd5a..a839fab1451 100644 --- a/repo/repo-sql-impl-test/sql-procedures/mysql.sql +++ b/repo/repo-sql-impl-test/sql-procedures/mysql.sql @@ -64,6 +64,7 @@ DETERMINISTIC DELETE FROM m_role; DELETE FROM m_service_type; DELETE FROM m_service; + DELETE FROM m_archetype; DELETE FROM m_abstract_role; DELETE FROM m_system_configuration; DELETE FROM m_generic_object; diff --git a/repo/repo-sql-impl-test/sql-procedures/postgresql.sql b/repo/repo-sql-impl-test/sql-procedures/postgresql.sql index cd758450437..81abe86ccdd 100644 --- a/repo/repo-sql-impl-test/sql-procedures/postgresql.sql +++ b/repo/repo-sql-impl-test/sql-procedures/postgresql.sql @@ -57,6 +57,7 @@ BEGIN TRUNCATE TABLE m_role RESTART IDENTITY CASCADE; TRUNCATE TABLE m_service_type RESTART IDENTITY CASCADE; TRUNCATE TABLE m_service RESTART IDENTITY CASCADE; + TRUNCATE TABLE m_archetype RESTART IDENTITY CASCADE; TRUNCATE TABLE m_abstract_role RESTART IDENTITY CASCADE; TRUNCATE TABLE m_system_configuration RESTART IDENTITY CASCADE; TRUNCATE TABLE m_generic_object RESTART IDENTITY CASCADE; diff --git a/repo/repo-sql-impl-test/sql-procedures/sqlserver.sql b/repo/repo-sql-impl-test/sql-procedures/sqlserver.sql index ad217561680..9503cd4e50f 100644 --- a/repo/repo-sql-impl-test/sql-procedures/sqlserver.sql +++ b/repo/repo-sql-impl-test/sql-procedures/sqlserver.sql @@ -68,6 +68,7 @@ AS DELETE FROM m_role; DELETE FROM m_service_type; DELETE FROM m_service; + DELETE FROM m_archetype; DELETE FROM m_abstract_role; DELETE FROM m_system_configuration; DELETE FROM m_generic_object; diff --git a/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/AddGetObjectTest.java b/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/AddGetObjectTest.java index 5a97a014942..8955b8fcf64 100644 --- a/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/AddGetObjectTest.java +++ b/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/AddGetObjectTest.java @@ -53,6 +53,7 @@ import java.io.File; import java.util.*; +import static com.evolveum.midpoint.prism.util.PrismTestUtil.getPrismContext; import static org.testng.AssertJUnit.*; /** @@ -328,7 +329,9 @@ public void addGetFullAccount() throws Exception { ObjectDelta delta = fileAccount.diff(repoAccount); AssertJUnit.assertNotNull(delta); LOGGER.info("delta\n{}", new Object[]{delta.debugDump(3)}); - assertTrue(delta.isEmpty()); + if (!delta.isEmpty()) { + fail("delta is not empty: " + delta.debugDump()); + } ShadowType repoShadow = repoAccount.asObjectable(); AssertJUnit.assertNotNull(repoShadow.getSynchronizationSituation()); AssertJUnit.assertEquals(SynchronizationSituationType.LINKED, repoShadow.getSynchronizationSituation()); @@ -775,7 +778,7 @@ public void test300ContainerIds() throws Exception { public void test990AddResourceWithEmptyConnectorConfiguration() throws Exception { OperationResult result = new OperationResult("test990AddResourceWithEmptyConnectorConfiguration"); - PrismObject prismResource = PrismTestUtil.getPrismContext().getSchemaRegistry().findObjectDefinitionByCompileTimeClass(ResourceType.class).instantiate(); + PrismObject prismResource = getPrismContext().getSchemaRegistry().findObjectDefinitionByCompileTimeClass(ResourceType.class).instantiate(); PolyStringType name = new PolyStringType(); name.setOrig("Test Resource"); @@ -826,7 +829,7 @@ public void test400AddModifyTask() throws Exception { AssertJUnit.assertEquals(ROperationResultStatus.IN_PROGRESS, rTask.getStatus()); String xml = RUtil.getXmlFromByteArray(rTask.getFullObject(), true); - PrismObject obj = PrismTestUtil.parseObject(xml); + PrismObject obj = getPrismContext().parserFor(xml).language(SqlRepositoryServiceImpl.DATA_LANGUAGE).parse(); TaskType objType = obj.asObjectable(); AssertJUnit.assertNull(objType.getResult()); } finally { diff --git a/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/ModifyAssignmentTest.java b/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/ModifyAssignmentTest.java index 6f1a18fa8c0..25bd3cca13d 100644 --- a/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/ModifyAssignmentTest.java +++ b/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/ModifyAssignmentTest.java @@ -24,15 +24,9 @@ import com.evolveum.midpoint.prism.delta.ItemDelta; import com.evolveum.midpoint.prism.delta.ObjectDelta; import com.evolveum.midpoint.prism.util.PrismAsserts; -import com.evolveum.midpoint.prism.util.PrismTestUtil; -import com.evolveum.midpoint.schema.DeltaConvertor; import com.evolveum.midpoint.schema.MidPointPrismContextFactory; import com.evolveum.midpoint.schema.result.OperationResult; -import com.evolveum.midpoint.xml.ns._public.common.api_types_3.ObjectModificationType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.AbstractRoleType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.ConstructionType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.*; import org.hibernate.query.Query; import org.hibernate.Session; @@ -58,9 +52,11 @@ public class ModifyAssignmentTest extends BaseSQLRepoTest { private static final String ROLE_OID = "00000000-8888-6666-0000-100000000005"; - private static final String OLD_ASSIGNMENT_OID = "12345678-d34d-b33f-f00d-987987987988"; - private static final String NEW_ASSIGNMENT_OID = "12345678-d34d-b33f-f00d-987987987989"; - private static final String NEW_INDUCEMENT_OID = "12345678-d34d-b33f-f00d-987987987987"; + private static final String ORIGINAL_ASSIGNMENT_4_TARGET_OID = "12345678-d34d-b33f-f00d-987987987988"; + private static final String NEW_ASSIGNMENT_4_TARGET_OID = "12345678-d34d-b33f-f00d-987987987989"; + private static final String ORIGINAL_INDUCEMENT_5_TARGET_OID = "00000000-76e0-48e2-86d6-3d4f02d3e1a2"; + private static final String NEW_INDUCEMENT_5_TARGET_OID = "12345678-d34d-b33f-f00d-987987987987"; + private static final String MOVED_ASSIGNMENT_TARGET_OID = "ef2bc95b-76e0-48e2-86d6-3d4f02d3e333"; private static final String ROLE_A1_OID = "aaaa00aa-aa00-aa00-a0a0-000000000001"; private static final String ROLE_A2_OID = "aaaa00aa-aa00-aa00-a0a0-000000000002"; @@ -93,10 +89,15 @@ public void beforeClass() throws Exception { public void test010AddAssignment() throws Exception { //given - ObjectModificationType modification = PrismTestUtil.parseAtomicValue( - new File(TEST_DIR, "modify-add-assignment.xml"), ObjectModificationType.COMPLEX_TYPE); + AssignmentType assignment1 = new AssignmentType(prismContext) + .id(4L) + .targetRef(ORIGINAL_ASSIGNMENT_4_TARGET_OID, RoleType.COMPLEX_TYPE); + + ObjectDelta delta = deltaFor(RoleType.class) + .item(RoleType.F_ASSIGNMENT).add(assignment1) + .asObjectDeltaCast(ROLE_OID); + - ObjectDelta delta = DeltaConvertor.createObjectDelta(modification, RoleType.class, prismContext); OperationResult result = new OperationResult("add assignment"); // WHEN @@ -122,17 +123,22 @@ public void test010AddAssignment() throws Exception { assertNotNull(targetRef); assertEquals(1, targetRef.getValues().size()); PrismReferenceValue refValue = targetRef.getValue(); - assertEquals(OLD_ASSIGNMENT_OID, refValue.getOid()); + assertEquals(ORIGINAL_ASSIGNMENT_4_TARGET_OID, refValue.getOid()); assertEquals(RoleType.COMPLEX_TYPE, refValue.getTargetType()); } @Test public void test011AddInducement() throws Exception { //given - ObjectModificationType modification = PrismTestUtil.parseAtomicValue( - new File(TEST_DIR, "modify-add-inducement.xml"), ObjectModificationType.COMPLEX_TYPE); + AssignmentType inducement1 = new AssignmentType(prismContext) + .id(5L) + .beginConstruction() + .resourceRef(ORIGINAL_INDUCEMENT_5_TARGET_OID, ResourceType.COMPLEX_TYPE) + .end(); - ObjectDelta delta = DeltaConvertor.createObjectDelta(modification, RoleType.class, prismContext); + ObjectDelta delta = deltaFor(RoleType.class) + .item(RoleType.F_INDUCEMENT).add(inducement1) + .asObjectDeltaCast(ROLE_OID); OperationResult result = new OperationResult("add inducement"); @@ -164,10 +170,10 @@ public void test011AddInducement() throws Exception { public void test020ModifyAssignment() throws Exception { //given - ObjectModificationType modification = PrismTestUtil.parseAtomicValue( - new File(TEST_DIR, "modify-assignment.xml"), ObjectModificationType.COMPLEX_TYPE); - - ObjectDelta delta = DeltaConvertor.createObjectDelta(modification, RoleType.class, prismContext); + ObjectDelta delta = deltaFor(RoleType.class) + .item(RoleType.F_ASSIGNMENT, 4L, AssignmentType.F_TARGET_REF) + .replace(new ObjectReferenceType().oid(NEW_ASSIGNMENT_4_TARGET_OID).type(RoleType.COMPLEX_TYPE)) + .asObjectDeltaCast(ROLE_OID); OperationResult result = new OperationResult("modify assignment"); @@ -192,7 +198,7 @@ public void test020ModifyAssignment() throws Exception { assertNotNull(targetRef); assertEquals(1, targetRef.getValues().size()); PrismReferenceValue refValue = targetRef.getValue(); - assertEquals(NEW_ASSIGNMENT_OID, refValue.getOid()); + assertEquals(NEW_ASSIGNMENT_4_TARGET_OID, refValue.getOid()); assertEquals(RoleType.COMPLEX_TYPE, refValue.getTargetType()); } @@ -200,10 +206,10 @@ public void test020ModifyAssignment() throws Exception { public void test021ModifyInducement() throws Exception { //given - ObjectModificationType modification = PrismTestUtil.parseAtomicValue( - new File(TEST_DIR, "modify-inducement.xml"), ObjectModificationType.COMPLEX_TYPE); - - ObjectDelta delta = DeltaConvertor.createObjectDelta(modification, RoleType.class, prismContext); + ObjectDelta delta = deltaFor(RoleType.class) + .item(RoleType.F_INDUCEMENT, 5L, AssignmentType.F_TARGET_REF) + .replace(new ObjectReferenceType().oid(NEW_INDUCEMENT_5_TARGET_OID).type(RoleType.COMPLEX_TYPE)) + .asObjectDeltaCast(ROLE_OID); OperationResult result = new OperationResult("modify inducement"); @@ -228,7 +234,7 @@ public void test021ModifyInducement() throws Exception { assertNotNull(targetRef); assertEquals(1, targetRef.getValues().size()); PrismReferenceValue refValue = targetRef.getValue(); - assertEquals(NEW_INDUCEMENT_OID, refValue.getOid()); + assertEquals(NEW_INDUCEMENT_5_TARGET_OID, refValue.getOid()); assertEquals(RoleType.COMPLEX_TYPE, refValue.getTargetType()); PrismProperty accConstruction = value5.findProperty(AssignmentType.F_CONSTRUCTION); @@ -239,10 +245,9 @@ public void test021ModifyInducement() throws Exception { public void test030DeleteAssignment() throws Exception { //given - AssignmentType a = new AssignmentType(); - a.setId(4L); - ObjectDelta delta = prismContext.deltaFactory().object().createModificationDeleteContainer(RoleType.class, - "00000000-8888-6666-0000-100000000005", RoleType.F_ASSIGNMENT, a); + ObjectDelta delta = deltaFor(RoleType.class) + .item(RoleType.F_ASSIGNMENT).delete(new AssignmentType(prismContext).id(4L)) + .asObjectDeltaCast(ROLE_OID); OperationResult result = new OperationResult("delete assignment"); @@ -280,11 +285,13 @@ public void test030DeleteAssignment() throws Exception { public void test031DeleteInducement() throws Exception { //given - //when - ObjectModificationType modification = PrismTestUtil.parseAtomicValue( - new File(TEST_DIR, "modify-delete-inducement.xml"), ObjectModificationType.COMPLEX_TYPE); + AssignmentType i = new AssignmentType(prismContext) + .id(3L) + .targetRef(ORIGINAL_INDUCEMENT_5_TARGET_OID, OrgType.COMPLEX_TYPE); - ObjectDelta delta = DeltaConvertor.createObjectDelta(modification, RoleType.class, prismContext); + ObjectDelta delta = deltaFor(RoleType.class) + .item(RoleType.F_INDUCEMENT).delete(i) + .asObjectDeltaCast(ROLE_OID); OperationResult result = new OperationResult("delete inducement"); @@ -317,10 +324,16 @@ public void test031DeleteInducement() throws Exception { public void test040RenameAssignmentToInducement() throws Exception { //given - ObjectModificationType modification = PrismTestUtil.parseAtomicValue( - new File(TEST_DIR, "modify-delete-add-assignment.xml"), ObjectModificationType.COMPLEX_TYPE); + AssignmentType a = new AssignmentType(prismContext) + .id(1L) + .beginConstruction() + .resourceRef(MOVED_ASSIGNMENT_TARGET_OID, ResourceType.COMPLEX_TYPE) + .end(); - ObjectDelta delta = DeltaConvertor.createObjectDelta(modification, RoleType.class, prismContext); + ObjectDelta delta = deltaFor(RoleType.class) + .item(RoleType.F_ASSIGNMENT).delete(a.clone()) + .item(RoleType.F_INDUCEMENT).add(a.clone()) + .asObjectDeltaCast(ROLE_OID); OperationResult result = new OperationResult("delete add assignment"); diff --git a/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/ModifyTest.java b/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/ModifyTest.java index 9747dc92eb8..bed5dadc8c2 100644 --- a/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/ModifyTest.java +++ b/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/ModifyTest.java @@ -37,6 +37,7 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; import com.evolveum.midpoint.schema.SearchResultList; @@ -919,7 +920,7 @@ public void test200ReplaceAttributes() throws Exception { System.out.println("Reparsed:\n" + shadowReparsed.debugDump()); Item attr1Reparsed = shadowReparsed.findItem(ItemPath.create(ShadowType.F_ATTRIBUTES, ATTR1_QNAME)); assertNotNull(attr1Reparsed); - assertFalse("Reparsed attribute is raw", attr1Reparsed.getValue(0).isRaw()); + assertFalse("Reparsed attribute is raw", attr1Reparsed.getAnyValue().isRaw()); } private void assertAttribute(PrismObject shadow, String attrName, T... expectedValues) { @@ -956,7 +957,7 @@ public void test210ModifyObjectCollection() throws Exception { ItemDeltaCollectionsUtil.applyTo(deltas1, collection.asPrismObject()); PrismObject afterChange1 = repositoryService .getObject(ObjectCollectionType.class, collection.getOid(), null, result); - assertEquals("Objects differ after change 1", collection.asPrismObject(), afterChange1); + assertTrue("Objects differ after change 1", collection.asPrismObject().equals(afterChange1, EquivalenceStrategy.NOT_LITERAL)); ObjectFilter filter = prismContext.queryFor(UserType.class) .item(UserType.F_COST_CENTER).eq("100") @@ -978,7 +979,7 @@ public void test210ModifyObjectCollection() throws Exception { fromRepoWithoutFilter.asObjectable().setFilter(null); PrismObject expectedWithoutFilter = collection.asPrismObject().clone(); expectedWithoutFilter.asObjectable().setFilter(null); - assertEquals("Objects (without filter) differ after change 2", expectedWithoutFilter, fromRepoWithoutFilter); + assertTrue("Objects (without filter) differ after change 2", expectedWithoutFilter.equals(fromRepoWithoutFilter, EquivalenceStrategy.NOT_LITERAL)); SearchFilterType filterFromRepo = afterChange2.asObjectable().getFilter(); SearchFilterType filterExpected = collection.getFilter(); diff --git a/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/QueryInterpreter2Test.java b/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/QueryInterpreter2Test.java index 4afb06c8355..d7ebaf56b0f 100644 --- a/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/QueryInterpreter2Test.java +++ b/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/QueryInterpreter2Test.java @@ -5182,4 +5182,116 @@ public void test1410QueryOrderByNameOrigLimit20() throws Exception { } } + @Test + public void test1420QueryTasksForArchetypeRef() throws Exception { + Session session = open(); + + try { + ObjectQuery query = prismContext.queryFor(TaskType.class) + .item(AssignmentHolderType.F_ARCHETYPE_REF).ref("oid1") + .build(); + + String expected = "select\n" + + " t.oid,\n" + + " t.fullObject,\n" + + " t.stringsCount,\n" + + " t.longsCount,\n" + + " t.datesCount,\n" + + " t.referencesCount,\n" + + " t.polysCount,\n" + + " t.booleansCount\n" + + "from\n" + + " RTask t\n" + + " left join t.archetypeRef a\n" + + "where\n" + + " (\n" + + " a.targetOid = :targetOid and\n" + + " a.relation in (:relation)\n" + + " )"; + + String real = getInterpretedQuery2(session, TaskType.class, query); + assertEqualsIgnoreWhitespace(expected, real); + } finally { + close(session); + } + } + + @Test + public void test1430QuerySearchForFocusType() throws Exception { + Session session = open(); + + try { + String expected = "select\n" + + " f.oid,\n" + + " f.fullObject,\n" + + " f.stringsCount,\n" + + " f.longsCount,\n" + + " f.datesCount,\n" + + " f.referencesCount,\n" + + " f.polysCount,\n" + + " f.booleansCount\n" + + "from\n" + + " RFocus f"; + + String real = getInterpretedQuery2(session, FocusType.class, (ObjectQuery) null); + assertEqualsIgnoreWhitespace(expected, real); + } finally { + close(session); + } + } + + @Test + public void test1432QuerySearchForAssignmentHolderType() throws Exception { + Session session = open(); + + try { + String expected = "select\n" + + " o.oid,\n" + + " o.fullObject,\n" + + " o.stringsCount,\n" + + " o.longsCount,\n" + + " o.datesCount,\n" + + " o.referencesCount,\n" + + " o.polysCount,\n" + + " o.booleansCount\n" + + "from\n" + + " RObject o\n" + + "where\n" + + " o.objectTypeClass in (:objectTypeClass)"; + + RQueryImpl rQuery = (RQueryImpl) getInterpretedQuery2Whole(session, AssignmentHolderType.class, null, false, null); + String real = rQuery.getQuery().getQueryString(); + System.out.println("Query parameters:\n" + rQuery.getQuerySource().getParameters()); + + assertEqualsIgnoreWhitespace(expected, real); + + } finally { + close(session); + } + } + + @Test + public void test1434QuerySearchForObjectType() throws Exception { + Session session = open(); + + try { + String expected = "select\n" + + " o.oid,\n" + + " o.fullObject,\n" + + " o.stringsCount,\n" + + " o.longsCount,\n" + + " o.datesCount,\n" + + " o.referencesCount,\n" + + " o.polysCount,\n" + + " o.booleansCount\n" + + "from\n" + + " RObject o"; + + String real = getInterpretedQuery2(session, ObjectType.class, (ObjectQuery) null); + assertEqualsIgnoreWhitespace(expected, real); + } finally { + close(session); + } + } + } diff --git a/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/SearchTest.java b/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/SearchTest.java index a65c508331f..c92973a60b7 100644 --- a/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/SearchTest.java +++ b/repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/SearchTest.java @@ -56,6 +56,7 @@ public class SearchTest extends BaseSQLRepoTest { private static final Trace LOGGER = TraceManager.getTrace(SearchTest.class); private static final String DESCRIPTION_TO_FIND = "tralala"; + private static final String ARCHETYPE1_OID = "a71e48fe-f6e2-40f4-ab76-b4ad4a0918ad"; private String beforeConfigOid; @@ -995,4 +996,80 @@ public void testArchetype() throws SchemaException { assertTrue(result.isSuccess()); assertEquals("Should find 1 object", 1, collections.size()); } + + @Test + public void testSearchAssignmentHoldersByArchetypeRef() throws SchemaException { + ObjectQuery query = prismContext.queryFor(AssignmentHolderType.class) + .item(AssignmentHolderType.F_ARCHETYPE_REF).ref(ARCHETYPE1_OID) + .build(); + OperationResult result = new OperationResult("search"); + List> objects = repositoryService.searchObjects(AssignmentHolderType.class, query, null, result); + result.recomputeStatus(); + assertTrue(result.isSuccess()); + System.out.println("Objects found: " + objects); + assertEquals("Should find 3 objects", 3, objects.size()); + } + + @Test + public void testSearchObjectsByArchetypeRef() throws SchemaException { + ObjectQuery query = prismContext.queryFor(AssignmentHolderType.class) + .item(AssignmentHolderType.F_ARCHETYPE_REF).ref(ARCHETYPE1_OID) + .build(); + OperationResult result = new OperationResult("search"); + List> objects = repositoryService.searchObjects(ObjectType.class, query, null, result); + result.recomputeStatus(); + assertTrue(result.isSuccess()); + System.out.println("Objects found: " + objects); + assertEquals("Should find 3 objects", 3, objects.size()); + } + + @Test + public void testSearchUsersByArchetypeRef() throws SchemaException { + ObjectQuery query = prismContext.queryFor(UserType.class) + .item(AssignmentHolderType.F_ARCHETYPE_REF).ref(ARCHETYPE1_OID) + .build(); + OperationResult result = new OperationResult("search"); + List> objects = repositoryService.searchObjects(UserType.class, query, null, result); + result.recomputeStatus(); + assertTrue(result.isSuccess()); + System.out.println("Users found: " + objects); + assertEquals("Should find 2 objects", 2, objects.size()); + } + + @Test + public void testSearchTasksByArchetypeRef() throws SchemaException { + ObjectQuery query = prismContext.queryFor(TaskType.class) + .item(AssignmentHolderType.F_ARCHETYPE_REF).ref(ARCHETYPE1_OID) + .build(); + OperationResult result = new OperationResult("search"); + List> objects = repositoryService.searchObjects(TaskType.class, query, null, result); + result.recomputeStatus(); + assertTrue(result.isSuccess()); + System.out.println("Tasks found: " + objects); + assertEquals("Should find 1 object", 1, objects.size()); + } + + @Test + public void testSearchFocus() throws SchemaException { + OperationResult result = new OperationResult("search"); + List> objects = repositoryService.searchObjects(FocusType.class, null, null, result); + result.recomputeStatus(); + assertSuccess(result); + System.out.println("Objects found: " + objects); + for (PrismObject object : objects) { + assertTrue("returned object is not a FocusType: " + object, object.asObjectable() instanceof FocusType); + } + } + + @Test + public void testSearchAssignmentHolder() throws SchemaException { + OperationResult result = new OperationResult("search"); + List> objects = repositoryService.searchObjects(AssignmentHolderType.class, null, null, result); + result.recomputeStatus(); + assertSuccess(result); + System.out.println("Objects found: " + objects); + for (PrismObject object : objects) { + assertTrue("returned object is not a AssignmentHolderType: " + object, object.asObjectable() instanceof AssignmentHolderType); + } + } } diff --git a/repo/repo-sql-impl-test/src/test/resources/basic/objects.xml b/repo/repo-sql-impl-test/src/test/resources/basic/objects.xml index 91292f7ea3f..3f1096b4084 100644 --- a/repo/repo-sql-impl-test/src/test/resources/basic/objects.xml +++ b/repo/repo-sql-impl-test/src/test/resources/basic/objects.xml @@ -34,6 +34,7 @@ testLifecycleStatus somepolicysituation1 somepolicysituation2 + http://triggerUri @@ -165,6 +166,7 @@ u-000 + Test UserX00003 @@ -679,7 +681,8 @@ Definition of a live sychnronization task. It will poll changelog and pull in changes 91919191-76e0-59e2-86d6-3d4f02d3ffff - runnable + + runnable http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/live-sync/handler-3 recurring @@ -1711,7 +1714,7 @@ fl1 - + archetype1 diff --git a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-add-assignment.xml b/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-add-assignment.xml deleted file mode 100644 index b4da91a9dcf..00000000000 --- a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-add-assignment.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - 00000000-8888-6666-0000-100000000005 - - add - c:assignment - - - - - diff --git a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-add-inducement.xml b/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-add-inducement.xml deleted file mode 100644 index 7fbb1508ad2..00000000000 --- a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-add-inducement.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - 00000000-8888-6666-0000-100000000005 - - add - c:inducement - - 5 - - - - - - diff --git a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-assignment.xml b/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-assignment.xml deleted file mode 100644 index 2a9bde6d66c..00000000000 --- a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-assignment.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - 00000000-8888-6666-0000-100000000005 - - replace - c:assignment[4]/c:targetRef - - 12345678-d34d-b33f-f00d-987987987989 - c:RoleType - - - diff --git a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-delete-add-assignment.xml b/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-delete-add-assignment.xml deleted file mode 100644 index 432286acaa0..00000000000 --- a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-delete-add-assignment.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - 00000000-8888-6666-0000-100000000005 - - delete - c:assignment - - - - - - - - add - c:inducement - - - - - - - diff --git a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-delete-assignment.xml b/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-delete-assignment.xml deleted file mode 100644 index dffa9de4f9e..00000000000 --- a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-delete-assignment.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - 00000000-8888-6666-0000-100000000005 - - delete - c:assignment - - - - - diff --git a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-delete-inducement.xml b/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-delete-inducement.xml deleted file mode 100644 index 46392b6290d..00000000000 --- a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-delete-inducement.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - 00000000-8888-6666-0000-100000000005 - - delete - c:inducement - - - - - diff --git a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-inducement.xml b/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-inducement.xml deleted file mode 100644 index 310f2785e4c..00000000000 --- a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/modify-inducement.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - 00000000-8888-6666-0000-100000000005 - - add - c:inducement[5]/c:targetRef - - - - diff --git a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/role.xml b/repo/repo-sql-impl-test/src/test/resources/modify/assignment/role.xml index 3ee8c4841a5..4d334b9d005 100644 --- a/repo/repo-sql-impl-test/src/test/resources/modify/assignment/role.xml +++ b/repo/repo-sql-impl-test/src/test/resources/modify/assignment/role.xml @@ -21,7 +21,7 @@ Basic Role - LDAP - + diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SqlAuditServiceImpl.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SqlAuditServiceImpl.java index 3907291c21e..b287df4e822 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SqlAuditServiceImpl.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SqlAuditServiceImpl.java @@ -329,7 +329,7 @@ private PrismObject resolve(Session session, String oi PrismObject result; if (object != null) { String xml = RUtil.getXmlFromByteArray(object.getFullObject(), getConfiguration().isUseZip()); - result = getPrismContext().parserFor(xml).compat().parse(); + result = getPrismContext().parserFor(xml).language(SqlRepositoryServiceImpl.DATA_LANGUAGE).compat().parse(); } else if (defaultType != null) { result = getPrismContext().createObject(defaultType.getJaxbClass()); result.asObjectable().setName(PolyStringType.fromOrig(defaultName != null ? defaultName : oid)); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SqlRepositoryServiceImpl.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SqlRepositoryServiceImpl.java index 7887300f919..98ba827c5e5 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SqlRepositoryServiceImpl.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SqlRepositoryServiceImpl.java @@ -94,6 +94,9 @@ @Repository public class SqlRepositoryServiceImpl extends SqlBaseService implements RepositoryService { + // experimental (currently some tests fail when using JSON) + public static final String DATA_LANGUAGE = PrismContext.LANG_XML; + public static final String PERFORMANCE_LOG_NAME = SqlRepositoryServiceImpl.class.getName() + ".performance"; public static final String CONTENTION_LOG_NAME = SqlRepositoryServiceImpl.class.getName() + ".contention"; public static final int CONTENTION_LOG_DEBUG_THRESHOLD = 3; diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RAbstractRole.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RAbstractRole.java index 4037eaf0142..647924a9081 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RAbstractRole.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RAbstractRole.java @@ -188,7 +188,7 @@ public static void copyFromJAXB(AbstractRoleType ja RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RFocus.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyFocusInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setRequestable(jaxb.isRequestable()); repo.setDisplayName(RPolyString.copyFromJAXB(jaxb.getDisplayName())); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RAccessCertificationCampaign.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RAccessCertificationCampaign.java index 483acac72f3..6563eee9426 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RAccessCertificationCampaign.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RAccessCertificationCampaign.java @@ -199,7 +199,7 @@ public static void copyFromJAXB(AccessCertificationCampaignType jaxb, RAccessCer RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); repo.setDefinitionRef(RUtil.jaxbRefToEmbeddedRepoRef(jaxb.getDefinitionRef(), repositoryContext.relationRegistry)); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RAccessCertificationDefinition.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RAccessCertificationDefinition.java index c39bddd3e7d..d8f9b2fc8e3 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RAccessCertificationDefinition.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RAccessCertificationDefinition.java @@ -145,7 +145,7 @@ public static void copyFromJAXB(AccessCertificationDefinitionType jaxb, RAccessC RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); repo.setHandlerUri(jaxb.getHandlerUri()); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RCase.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RCase.java index e0c12e59650..5a211a84920 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RCase.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RCase.java @@ -131,7 +131,7 @@ public String toString() { // dynamically called public static void copyFromJAXB(CaseType jaxb, RCase repo, RepositoryContext context, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, context, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, context, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RConnector.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RConnector.java index 39d01eceab1..35ce971a284 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RConnector.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RConnector.java @@ -162,7 +162,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(ConnectorType jaxb, RConnector repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); repo.setConnectorBundle(jaxb.getConnectorBundle()); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RConnectorHost.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RConnectorHost.java index facc3130bd0..5b97ff3c114 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RConnectorHost.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RConnectorHost.java @@ -102,7 +102,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(ConnectorHostType jaxb, RConnectorHost repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); repo.setHostname(jaxb.getHostname()); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RFocus.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RFocus.java index 64376c86df9..be2e537cbc0 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RFocus.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RFocus.java @@ -22,23 +22,23 @@ import com.evolveum.midpoint.repo.sql.data.common.embedded.RPolyString; import com.evolveum.midpoint.repo.sql.data.common.other.RAssignmentOwner; import com.evolveum.midpoint.repo.sql.data.common.other.RReferenceOwner; -import com.evolveum.midpoint.repo.sql.query.definition.*; -import com.evolveum.midpoint.repo.sql.query2.definition.NotQueryable; +import com.evolveum.midpoint.repo.sql.query.definition.JaxbName; +import com.evolveum.midpoint.repo.sql.query.definition.QueryEntity; +import com.evolveum.midpoint.repo.sql.query.definition.VirtualCollection; +import com.evolveum.midpoint.repo.sql.query.definition.VirtualQueryParam; import com.evolveum.midpoint.repo.sql.util.DtoTranslationException; import com.evolveum.midpoint.repo.sql.util.IdGeneratorResult; import com.evolveum.midpoint.repo.sql.util.MidPointJoinedPersister; import com.evolveum.midpoint.repo.sql.util.RUtil; -import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType; import com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType; -import org.hibernate.annotations.*; import org.hibernate.annotations.ForeignKey; +import org.hibernate.annotations.*; -import javax.persistence.*; import javax.persistence.Entity; import javax.persistence.Index; import javax.persistence.Table; +import javax.persistence.*; import java.util.HashSet; -import java.util.Iterator; import java.util.Set; /** @@ -61,13 +61,10 @@ @Persister(impl = MidPointJoinedPersister.class) public abstract class RFocus extends RObject { - private Set> linkRef; - private Set> roleMembershipRef; - private Set> delegatedRef; - private Set> personaRef; - private Set assignments; - private RActivation activation; - private Set policySituation; + private Set> linkRef; // FocusType + private Set> personaRef; // FocusType + private RActivation activation; // FocusType + private Set policySituation; // ObjectType //photo private boolean hasPhoto; private Set jpegPhoto; @@ -92,28 +89,6 @@ public Set> getLinkRef() { return linkRef; } - @Where(clause = RObjectReference.REFERENCE_TYPE + "= 8") - @OneToMany(mappedBy = "owner", orphanRemoval = true) - @ForeignKey(name = "none") - @Cascade({org.hibernate.annotations.CascadeType.ALL}) - public Set> getRoleMembershipRef() { - if (roleMembershipRef == null) { - roleMembershipRef = new HashSet<>(); - } - return roleMembershipRef; - } - - @Where(clause = RObjectReference.REFERENCE_TYPE + "= 9") - @OneToMany(mappedBy = "owner", orphanRemoval = true) - @ForeignKey(name = "none") - @Cascade({org.hibernate.annotations.CascadeType.ALL}) - public Set> getDelegatedRef() { - if (delegatedRef == null) { - delegatedRef = new HashSet<>(); - } - return delegatedRef; - } - @Where(clause = RObjectReference.REFERENCE_TYPE + "= 10") @OneToMany(mappedBy = "owner", orphanRemoval = true) @ForeignKey(name = "none") @@ -125,42 +100,6 @@ public Set> getPersonaRef() { return personaRef; } - @Transient - protected Set getAssignments(RAssignmentOwner owner) { - Set assignments = getAssignments(); - Set wanted = new HashSet<>(); - if (assignments == null) { - return wanted; - } - - Iterator iterator = assignments.iterator(); - while (iterator.hasNext()) { - RAssignment ass = iterator.next(); - if (owner.equals(ass.getAssignmentOwner())) { - wanted.add(ass); - } - } - - return wanted; - } - - @Transient - public Set getAssignment() { - return getAssignments(RAssignmentOwner.FOCUS); - } - - @JaxbPath(itemPath = @JaxbName(localPart = "assignment")) - @OneToMany(mappedBy = RAssignment.F_OWNER, orphanRemoval = true) - @ForeignKey(name = "none") - @Cascade({org.hibernate.annotations.CascadeType.ALL}) - @NotQueryable // virtual definition is used instead - public Set getAssignments() { - if (assignments == null) { - assignments = new HashSet<>(); - } - return assignments; - } - @Embedded public RActivation getActivation() { return activation; @@ -242,22 +181,10 @@ public void setPolicySituation(Set policySituation) { this.policySituation = policySituation; } - public void setAssignments(Set assignments) { - this.assignments = assignments; - } - public void setLinkRef(Set> linkRef) { this.linkRef = linkRef; } - public void setRoleMembershipRef(Set> roleMembershipRef) { - this.roleMembershipRef = roleMembershipRef; - } - - public void setDelegatedRef(Set> delegatedRef) { - this.delegatedRef = delegatedRef; - } - public void setPersonaRef(Set> personaRef) { this.personaRef = personaRef; } @@ -274,9 +201,7 @@ public boolean equals(Object o) { RFocus other = (RFocus) o; - if (assignments != null ? !assignments.equals(other.assignments) : other.assignments != null) return false; if (linkRef != null ? !linkRef.equals(other.linkRef) : other.linkRef != null) return false; - if (roleMembershipRef != null ? !roleMembershipRef.equals(other.roleMembershipRef) : other.roleMembershipRef != null) return false; if (activation != null ? !activation.equals(other.activation) : other.activation != null) return false; if (policySituation != null ? !policySituation.equals(other.policySituation) : other.policySituation != null) return false; if (localityFocus != null ? !localityFocus.equals(other.localityFocus) : other.localityFocus != null) return false; @@ -289,7 +214,6 @@ public boolean equals(Object o) { other.preferredLanguage != null) return false; if (timezone != null ? !timezone.equals(other.timezone) : other.timezone != null) return false; - return true; } @@ -306,36 +230,18 @@ public int hashCode() { return result; } - // dynamically called - public static void copyFromJAXB(FocusType jaxb, RFocus repo, RepositoryContext repositoryContext, + public static void copyFocusInformationFromJAXB(FocusType jaxb, RFocus repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setLocalityFocus(RPolyString.copyFromJAXB(jaxb.getLocality())); repo.setCostCenter(jaxb.getCostCenter()); - repo.getLinkRef().addAll( RUtil.safeListReferenceToSet(jaxb.getLinkRef(), repo, RReferenceOwner.USER_ACCOUNT, repositoryContext.relationRegistry)); - - repo.getRoleMembershipRef().addAll( - RUtil.safeListReferenceToSet(jaxb.getRoleMembershipRef(), repo, RReferenceOwner.ROLE_MEMBER, repositoryContext.relationRegistry)); - - repo.getDelegatedRef().addAll( - RUtil.safeListReferenceToSet(jaxb.getDelegatedRef(), repo, RReferenceOwner.DELEGATED, repositoryContext.relationRegistry)); - repo.getPersonaRef().addAll( RUtil.safeListReferenceToSet(jaxb.getPersonaRef(), repo, RReferenceOwner.PERSONA, repositoryContext.relationRegistry)); - repo.setPolicySituation(RUtil.listToSet(jaxb.getPolicySituation())); - - for (AssignmentType assignment : jaxb.getAssignment()) { - RAssignment rAssignment = new RAssignment(repo, RAssignmentOwner.FOCUS); - RAssignment.fromJaxb(assignment, rAssignment, jaxb, repositoryContext, generatorResult); - - repo.getAssignments().add(rAssignment); - } - if (jaxb.getActivation() != null) { RActivation activation = new RActivation(); RActivation.fromJaxb(jaxb.getActivation(), activation, repositoryContext); @@ -350,6 +256,8 @@ public static void copyFromJAXB(FocusType jaxb, RFocus repo.getJpegPhoto().add(photo); repo.setHasPhoto(true); } + + repo.setPolicySituation(RUtil.listToSet(jaxb.getPolicySituation())); } @ColumnDefault("false") diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RForm.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RForm.java index 959a31a7cce..3101cc40aa4 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RForm.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RForm.java @@ -78,6 +78,6 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(FormType jaxb, RForm repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); } } diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RFunctionLibrary.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RFunctionLibrary.java index 2436c6db471..b7d69ada6d9 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RFunctionLibrary.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RFunctionLibrary.java @@ -79,7 +79,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(FunctionLibraryType jaxb, RFunctionLibrary repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); } } diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RGenericObject.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RGenericObject.java index 5b2d302c277..ce7c449fd54 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RGenericObject.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RGenericObject.java @@ -39,7 +39,7 @@ } ) @Persister(impl = MidPointJoinedPersister.class) -public class RGenericObject extends RObject { +public class RGenericObject extends RFocus { private RPolyString nameCopy; private String objectType; @@ -91,7 +91,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(GenericObjectType jaxb, RGenericObject repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyFocusInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); repo.setObjectType(jaxb.getObjectType()); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RLookupTable.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RLookupTable.java index afc93a90ff3..41bd54e7534 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RLookupTable.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RLookupTable.java @@ -60,7 +60,7 @@ public void setRows(Set rows) { // dynamically called public static void copyFromJAXB(LookupTableType jaxb, RLookupTable repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException, SchemaException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RNode.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RNode.java index 68ba35b4c56..7041d86eeea 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RNode.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RNode.java @@ -92,7 +92,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(NodeType jaxb, RNode repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyObjectInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); repo.setNodeIdentifier(jaxb.getNodeIdentifier()); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RObject.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RObject.java index a099cde34ee..67133873887 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RObject.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RObject.java @@ -34,6 +34,7 @@ import com.evolveum.midpoint.repo.sql.data.common.container.RTrigger; import com.evolveum.midpoint.repo.sql.data.common.embedded.REmbeddedReference; import com.evolveum.midpoint.repo.sql.data.common.embedded.RPolyString; +import com.evolveum.midpoint.repo.sql.data.common.other.RAssignmentOwner; import com.evolveum.midpoint.repo.sql.data.common.other.RObjectType; import com.evolveum.midpoint.repo.sql.data.common.other.RReferenceOwner; import com.evolveum.midpoint.repo.sql.data.common.type.RObjectExtensionType; @@ -53,9 +54,7 @@ import com.evolveum.midpoint.repo.sql.util.RUtil; import com.evolveum.midpoint.schema.GetOperationOptions; import com.evolveum.midpoint.schema.SelectorOptions; -import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.OperationExecutionType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.TriggerType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.*; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.Validate; import org.hibernate.annotations.*; @@ -69,10 +68,7 @@ import javax.persistence.Table; import javax.xml.datatype.XMLGregorianCalendar; import java.io.Serializable; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Set; +import java.util.*; /** * @author lazyman @@ -187,6 +183,12 @@ public abstract class RObject implements Metadata operationExecutions; + // AssignmentHolderType information + private Set> roleMembershipRef; // AssignmentHolderType + private Set> delegatedRef; // AssignmentHolderType + private Set> archetypeRef; // AssignmentHolderType + private Set assignments; // AssignmentHolderType + @Id @GeneratedValue(generator = "ObjectOidGenerator") @GenericGenerator(name = "ObjectOidGenerator", strategy = "com.evolveum.midpoint.repo.sql.util.ObjectOidGenerator") @@ -263,6 +265,76 @@ public Set> getCreateApproverRef() { return createApproverRef; } + @Where(clause = RObjectReference.REFERENCE_TYPE + "= 8") + @OneToMany(mappedBy = "owner", orphanRemoval = true) + @ForeignKey(name = "none") + @Cascade({org.hibernate.annotations.CascadeType.ALL}) + public Set> getRoleMembershipRef() { + if (roleMembershipRef == null) { + roleMembershipRef = new HashSet<>(); + } + return roleMembershipRef; + } + + @Where(clause = RObjectReference.REFERENCE_TYPE + "= 9") + @OneToMany(mappedBy = "owner", orphanRemoval = true) + @ForeignKey(name = "none") + @Cascade({org.hibernate.annotations.CascadeType.ALL}) + public Set> getDelegatedRef() { + if (delegatedRef == null) { + delegatedRef = new HashSet<>(); + } + return delegatedRef; + } + + @Where(clause = RObjectReference.REFERENCE_TYPE + "= 11") + @OneToMany(mappedBy = "owner", orphanRemoval = true) + @ForeignKey(name = "none") + @Cascade({org.hibernate.annotations.CascadeType.ALL}) + public Set> getArchetypeRef() { + if (archetypeRef == null) { + archetypeRef = new HashSet<>(); + } + return archetypeRef; + } + + @Transient + protected Set getAssignments(RAssignmentOwner owner) { + Set assignments = getAssignments(); + Set wanted = new HashSet<>(); + if (assignments == null) { + return wanted; + } + + Iterator iterator = assignments.iterator(); + while (iterator.hasNext()) { + RAssignment ass = iterator.next(); + if (owner.equals(ass.getAssignmentOwner())) { + wanted.add(ass); + } + } + + return wanted; + } + + @Transient + public Set getAssignment() { + return getAssignments(RAssignmentOwner.FOCUS); + } + + @JaxbPath(itemPath = @JaxbName(localPart = "assignment")) + @OneToMany(mappedBy = RAssignment.F_OWNER, orphanRemoval = true) + @ForeignKey(name = "none") + @Cascade({org.hibernate.annotations.CascadeType.ALL}) + @NotQueryable // virtual definition is used instead + public Set getAssignments() { + if (assignments == null) { + assignments = new HashSet<>(); + } + return assignments; + } + + @JaxbPath(itemPath = { @JaxbName(localPart = "metadata"), @JaxbName(localPart = "createChannel") }) public String getCreateChannel() { return createChannel; @@ -602,6 +674,22 @@ public void setOperationExecutions( this.operationExecutions = operationExecutions; } + public void setAssignments(Set assignments) { + this.assignments = assignments; + } + + public void setRoleMembershipRef(Set> roleMembershipRef) { + this.roleMembershipRef = roleMembershipRef; + } + + public void setDelegatedRef(Set> delegatedRef) { + this.delegatedRef = delegatedRef; + } + + public void setArchetypeRef(Set> archetypeRef) { + this.archetypeRef = archetypeRef; + } + @Override public boolean equals(Object o) { if (this == o) @@ -689,9 +777,31 @@ protected static void copyToJAXB(RObject repo, ObjectT } } - // dynamically called - public static void copyFromJAXB(ObjectType jaxb, RObject repo, RepositoryContext repositoryContext, - IdGeneratorResult generatorResult) + static void copyAssignmentHolderInformationFromJAXB(AssignmentHolderType jaxb, RObject repo, + RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { + + copyObjectInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); + + repo.getRoleMembershipRef().addAll( + RUtil.safeListReferenceToSet(jaxb.getRoleMembershipRef(), repo, RReferenceOwner.ROLE_MEMBER, repositoryContext.relationRegistry)); + + repo.getDelegatedRef().addAll( + RUtil.safeListReferenceToSet(jaxb.getDelegatedRef(), repo, RReferenceOwner.DELEGATED, repositoryContext.relationRegistry)); + + repo.getArchetypeRef().addAll( + RUtil.safeListReferenceToSet(jaxb.getArchetypeRef(), repo, RReferenceOwner.ARCHETYPE, repositoryContext.relationRegistry)); + + for (AssignmentType assignment : jaxb.getAssignment()) { + RAssignment rAssignment = new RAssignment(repo, RAssignmentOwner.FOCUS); + RAssignment.fromJaxb(assignment, rAssignment, jaxb, repositoryContext, generatorResult); + + repo.getAssignments().add(rAssignment); + } + } + + static void copyObjectInformationFromJAXB(ObjectType jaxb, RObject repo, + RepositoryContext repositoryContext, + IdGeneratorResult generatorResult) throws DtoTranslationException { Validate.notNull(jaxb, "JAXB object must not be null."); Validate.notNull(repo, "Repo object must not be null."); @@ -724,7 +834,7 @@ public static void copyFromJAXB(ObjectType jaxb, RObject< repo.setTenantRef(RUtil.jaxbRefToEmbeddedRepoRef(jaxb.getTenantRef(), repositoryContext.relationRegistry)); if (jaxb.getExtension() != null) { - copyFromJAXB(jaxb.getExtension().asPrismContainerValue(), repo, repositoryContext, RObjectExtensionType.EXTENSION, generatorResult); + copyExtensionOrAttributesFromJAXB(jaxb.getExtension().asPrismContainerValue(), repo, repositoryContext, RObjectExtensionType.EXTENSION, generatorResult); } repo.getTextInfoItems().addAll(RObjectTextInfo.createItemsSet(jaxb, repo, repositoryContext)); @@ -740,9 +850,8 @@ public String toString() { return RUtil.getDebugString(this); } - // dynamically called - public static void copyFromJAXB(PrismContainerValue containerValue, RObject repo, RepositoryContext repositoryContext, - RObjectExtensionType ownerType, IdGeneratorResult generatorResult) throws DtoTranslationException { + static void copyExtensionOrAttributesFromJAXB(PrismContainerValue containerValue, RObject repo, + RepositoryContext repositoryContext, RObjectExtensionType ownerType, IdGeneratorResult generatorResult) throws DtoTranslationException { RAnyConverter converter = new RAnyConverter(repositoryContext.prismContext, repositoryContext.extItemDictionary); Set> values = new HashSet<>(); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RObjectCollection.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RObjectCollection.java index 7f668aeea15..125a6a801fc 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RObjectCollection.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RObjectCollection.java @@ -79,7 +79,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(ObjectCollectionType jaxb, RObjectCollection repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); } } diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RObjectTemplate.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RObjectTemplate.java index fd9844aff52..e9157283ead 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RObjectTemplate.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RObjectTemplate.java @@ -119,7 +119,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(ObjectTemplateType jaxb, RObjectTemplate repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setType(RUtil.getRepoEnumValue(jaxb.asPrismObject().getElementName(), RObjectTemplateType.class)); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RReport.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RReport.java index dbdadf1ddab..f1fbbbf4b68 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RReport.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RReport.java @@ -120,7 +120,7 @@ public int hashCode() { public static void copyFromJAXB(ReportType jaxb, RReport repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); repo.setOrientation(RUtil.getRepoEnumValue(jaxb.getOrientation(), ROrientationType.class)); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RReportOutput.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RReportOutput.java index 586e2023595..2dc56e1d08f 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RReportOutput.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RReportOutput.java @@ -77,7 +77,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(ReportOutputType jaxb, RReportOutput repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); repo.setReportRef(RUtil.jaxbRefToEmbeddedRepoRef(jaxb.getReportRef(), repositoryContext.relationRegistry)); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RResource.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RResource.java index 29899eab303..02991cdbfcf 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RResource.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RResource.java @@ -149,7 +149,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(ResourceType jaxb, RResource repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); repo.setConnectorRef(RUtil.jaxbRefToEmbeddedRepoRef(jaxb.getConnectorRef(), repositoryContext.relationRegistry)); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RSecurityPolicy.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RSecurityPolicy.java index 06a92774071..8f2090a0958 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RSecurityPolicy.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RSecurityPolicy.java @@ -61,7 +61,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(SecurityPolicyType jaxb, RSecurityPolicy repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); } } diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RSequence.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RSequence.java index 658836585dd..ffa6ce0c33f 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RSequence.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RSequence.java @@ -80,7 +80,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(SequenceType jaxb, RSequence repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); } diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RShadow.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RShadow.java index f4197d5640f..02b7f3802ff 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RShadow.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RShadow.java @@ -262,7 +262,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(ShadowType jaxb, RShadow repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyObjectInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); repo.setObjectClass(RUtil.qnameToString(jaxb.getObjectClass())); @@ -291,7 +291,7 @@ public static void copyFromJAXB(ShadowType jaxb, RShadow< } if (jaxb.getAttributes() != null) { - copyFromJAXB(jaxb.getAttributes().asPrismContainerValue(), repo, repositoryContext, RObjectExtensionType.ATTRIBUTES, generatorResult); + copyExtensionOrAttributesFromJAXB(jaxb.getAttributes().asPrismContainerValue(), repo, repositoryContext, RObjectExtensionType.ATTRIBUTES, generatorResult); } repo.pendingOperationCount = jaxb.getPendingOperation().size(); } diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RSystemConfiguration.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RSystemConfiguration.java index b0f10be3f0f..334e595c736 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RSystemConfiguration.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RSystemConfiguration.java @@ -80,7 +80,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(SystemConfigurationType jaxb, RSystemConfiguration repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); } } diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RTask.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RTask.java index 324eca03d62..5ff4feda028 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RTask.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RTask.java @@ -16,7 +16,6 @@ package com.evolveum.midpoint.repo.sql.data.common; -import com.evolveum.midpoint.prism.PrismObjectDefinition; import com.evolveum.midpoint.repo.sql.data.RepositoryContext; import com.evolveum.midpoint.repo.sql.data.common.embedded.REmbeddedReference; import com.evolveum.midpoint.repo.sql.data.common.embedded.RPolyString; @@ -417,9 +416,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(TaskType jaxb, RTask repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); - - PrismObjectDefinition taskDefinition = jaxb.asPrismObject().getDefinition(); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); repo.setTaskIdentifier(jaxb.getTaskIdentifier()); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RUser.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RUser.java index c589810e901..33226066654 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RUser.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RUser.java @@ -246,7 +246,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(UserType jaxb, RUser repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RFocus.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyFocusInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); repo.setFullName(RPolyString.copyFromJAXB(jaxb.getFullName())); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RValuePolicy.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RValuePolicy.java index 985d892d89e..67155c0019f 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RValuePolicy.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RValuePolicy.java @@ -80,7 +80,7 @@ public int hashCode() { // dynamically called public static void copyFromJAXB(ValuePolicyType jaxb, RValuePolicy repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { - RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); + copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); } diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/container/RAccessCertificationCase.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/container/RAccessCertificationCase.java index 6faa85d5975..88d6867bcba 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/container/RAccessCertificationCase.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/container/RAccessCertificationCase.java @@ -18,6 +18,7 @@ import com.evolveum.midpoint.prism.PrismContainerValue; import com.evolveum.midpoint.prism.PrismContext; +import com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl; import com.evolveum.midpoint.repo.sql.data.RepositoryContext; import com.evolveum.midpoint.repo.sql.data.common.RAccessCertificationCampaign; import com.evolveum.midpoint.repo.sql.data.common.embedded.RActivation; @@ -356,7 +357,7 @@ private static RAccessCertificationCase toRepo(RAccessCertificationCase rCase, A PrismContainerValue cvalue = case1.asPrismContainerValue(); String xml; try { - xml = context.prismContext.xmlSerializer().serialize(cvalue, SchemaConstantsGenerated.C_VALUE); + xml = context.prismContext.serializerFor(SqlRepositoryServiceImpl.DATA_LANGUAGE).serialize(cvalue, SchemaConstantsGenerated.C_VALUE); } catch (SchemaException e) { throw new IllegalStateException("Couldn't serialize certification case to string", e); } @@ -376,7 +377,7 @@ public static AccessCertificationCaseType createJaxb(byte[] fullObject, PrismCon String xml = RUtil.getXmlFromByteArray(fullObject, false); LOGGER.trace("RAccessCertificationCase full object to be parsed\n{}", xml); try { - return prismContext.parserFor(xml).xml().compat().parseRealValue(AccessCertificationCaseType.class); + return prismContext.parserFor(xml).language(SqlRepositoryServiceImpl.DATA_LANGUAGE).compat().parseRealValue(AccessCertificationCaseType.class); } catch (SchemaException e) { LOGGER.debug("Couldn't parse certification case because of schema exception ({}):\nData: {}", e, xml); throw e; diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/enums/RShadowKind.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/enums/RShadowKind.java index 417e2db85d0..b3e8d8ed384 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/enums/RShadowKind.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/enums/RShadowKind.java @@ -27,7 +27,8 @@ public enum RShadowKind implements SchemaEnum { ACCOUNT(ShadowKindType.ACCOUNT), ENTITLEMENT(ShadowKindType.ENTITLEMENT), - GENERIC(ShadowKindType.GENERIC); + GENERIC(ShadowKindType.GENERIC), + UNKNOWN(ShadowKindType.UNKNOWN); private ShadowKindType kind; diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/other/RObjectType.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/other/RObjectType.java index f716d5ed4d1..4b0f56d2c79 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/other/RObjectType.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/other/RObjectType.java @@ -2,6 +2,8 @@ import com.evolveum.midpoint.repo.sql.data.common.*; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * @author lazyman @@ -26,6 +28,7 @@ public enum RObjectType { ORG(ROrg.class, OrgType.class), ABSTRACT_ROLE(RAbstractRole.class, AbstractRoleType.class), FOCUS(RFocus.class, FocusType.class), + ASSIGNMENT_HOLDER(RObject.class, AssignmentHolderType.class), SECURITY_POLICY(RSecurityPolicy.class, SecurityPolicyType.class), LOOKUP_TABLE(RLookupTable.class, LookupTableType.class), ACCESS_CERTIFICATION_DEFINITION(RAccessCertificationDefinition.class, AccessCertificationDefinitionType.class), @@ -54,6 +57,7 @@ public Class getJaxbClass() { return jaxbClass; } + @NotNull public static RObjectType getType(Class clazz) { for (RObjectType type : RObjectType.values()) { if (type.getClazz().equals(clazz)) { @@ -64,13 +68,23 @@ public static RObjectType getType(Class clazz) { throw new IllegalArgumentException("Couldn't find type for class '" + clazz + "'."); } + @NotNull public static RObjectType getByJaxbType(Class clazz) { + RObjectType type = getByJaxbTypeIfExists(clazz); + if (type != null) { + return type; + } else { + throw new IllegalArgumentException("Couldn't find type for class '" + clazz + "'."); + } + } + + @Nullable + public static RObjectType getByJaxbTypeIfExists(Class clazz) { for (RObjectType type : RObjectType.values()) { if (type.getJaxbClass().equals(clazz)) { return type; } } - - throw new IllegalArgumentException("Couldn't find type for class '" + clazz + "'."); + return null; } } diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/other/RReferenceOwner.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/other/RReferenceOwner.java index af734cd6052..58364794e03 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/other/RReferenceOwner.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/other/RReferenceOwner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2013 Evolveum + * Copyright (c) 2010-2018 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ package com.evolveum.midpoint.repo.sql.data.common.other; +import com.evolveum.midpoint.util.QNameUtil; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; import org.apache.commons.lang.Validate; @@ -53,7 +54,9 @@ public enum RReferenceOwner { DELEGATED(FocusType.class, FocusType.F_DELEGATED_REF), // 9 - PERSONA(FocusType.class, FocusType.F_PERSONA_REF); // 10 + PERSONA(FocusType.class, FocusType.F_PERSONA_REF), // 10 + + ARCHETYPE(AssignmentHolderType.class, AssignmentHolderType.F_ARCHETYPE_REF); // 11 private Class typeClass; private QName elementName; @@ -76,7 +79,7 @@ public static RReferenceOwner getOwnerByQName(Class typeCl Validate.notNull(qname, "QName must not be null"); for (RReferenceOwner owner : values()) { - if (qname.equals(owner.getElementName()) && owner.getTypeClass().isAssignableFrom(typeClass)) { + if (QNameUtil.match(qname, owner.getElementName()) && owner.getTypeClass().isAssignableFrom(typeClass)) { return owner; } } diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/BaseHelper.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/BaseHelper.java index e91795e50f9..216eb432cc1 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/BaseHelper.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/BaseHelper.java @@ -102,7 +102,7 @@ public Session beginTransaction(boolean readOnly) { session.setHibernateFlushMode(FlushMode.MANUAL); LOGGER.trace("Marking transaction as read only."); - session.doWork(connection -> connection.createStatement().execute("SET TRANSACTION READ ONLY")); + session.doWork(connection -> connection.createStatement().execute("SET TRANSACTION READ ONLY")); } return session; } @@ -135,6 +135,10 @@ void rollbackTransaction(Session session, Throwable ex, String message, Operatio } public void cleanupSessionAndResult(Session session, OperationResult result) { + if (session != null && session.getTransaction().isActive()) { + session.getTransaction().commit(); + } + if (session != null && session.isOpen()) { session.close(); } diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/ObjectRetriever.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/ObjectRetriever.java index ac8d56a49fa..d7def7c7fad 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/ObjectRetriever.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/ObjectRetriever.java @@ -513,7 +513,7 @@ private PrismObject updateLoadedObject(GetObjectResult try { // "Postel mode": be tolerant what you read. We need this to tolerate (custom) schema changes ParsingContext parsingContext = prismContext.createParsingContextForCompatibilityMode(); - prismObject = prismContext.parserFor(xml).context(parsingContext).parse(); + prismObject = prismContext.parserFor(xml).language(SqlRepositoryServiceImpl.DATA_LANGUAGE).context(parsingContext).parse(); if (parsingContext.hasWarnings()) { LOGGER.warn("Object {} parsed with {} warnings", ObjectTypeUtil.toShortString(prismObject), parsingContext.getWarnings().size()); // TODO enable if needed diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/ObjectUpdater.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/ObjectUpdater.java index 15d13b33886..f00f1950513 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/ObjectUpdater.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/ObjectUpdater.java @@ -18,6 +18,7 @@ import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.*; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.prism.util.CloneUtil; import com.evolveum.midpoint.repo.api.*; @@ -175,7 +176,7 @@ private String overwriteAddObjectAttempt(PrismObject o if (originalOid != null) { try { oldObject = objectRetriever.getObjectInternal(session, object.getCompileTimeClass(), originalOid, null, true, result); - ObjectDelta delta = oldObject.diff(object, false, true); + ObjectDelta delta = oldObject.diff(object, EquivalenceStrategy.LITERAL); modifications = delta.getModifications(); LOGGER.trace("overwriteAddObjectAttempt: originalOid={}, modifications={}", originalOid, modifications); @@ -247,7 +248,7 @@ public void updateFullObject(RObject object, PrismObject< savedObject.removeProperty(TaskType.F_RESULT); } - xml = prismContext.xmlSerializer().serialize(savedObject); + xml = prismContext.serializerFor(SqlRepositoryServiceImpl.DATA_LANGUAGE).serialize(savedObject); byte[] fullObject = RUtil.getByteArrayFromXml(xml, getConfiguration().isUseZip()); object.setFullObject(fullObject); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/modify/DeltaUpdaterUtils.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/modify/DeltaUpdaterUtils.java index 705f3f0a554..d5409515900 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/modify/DeltaUpdaterUtils.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/helpers/modify/DeltaUpdaterUtils.java @@ -19,6 +19,7 @@ import com.evolveum.midpoint.prism.Item; import com.evolveum.midpoint.prism.PrismContainerValue; import com.evolveum.midpoint.prism.PrismValue; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.repo.sql.data.common.RObject; import com.evolveum.midpoint.repo.sql.data.common.any.RAExtBase; @@ -70,7 +71,7 @@ private static PrismEntityPair findMatch(Collection> collecti Container pairContainer = (Container) pairObject; if (Objects.equals(c.getId(), pairContainer.getId()) - || pair.getPrism().equals(item.getPrism(), true)) { + || pair.getPrism().equals(item.getPrism(), EquivalenceStrategy.IGNORE_METADATA)) { //todo return item; } } else { diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query/definition/ClassDefinitionParser.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query/definition/ClassDefinitionParser.java index 1bdde704c2c..bdd949f8024 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query/definition/ClassDefinitionParser.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query/definition/ClassDefinitionParser.java @@ -46,7 +46,7 @@ public class ClassDefinitionParser { public EntityDefinition parseObjectTypeClass(Class type) { ObjectTypes objectType = ClassMapper.getObjectTypeForHQLType(type); - QName jaxbName = objectType.getQName(); + QName jaxbName = objectType.getElementName(); Class jaxbType = objectType.getClassDefinition(); EntityDefinition entityDefinition = new EntityDefinition(jaxbName, jaxbType, type.getSimpleName(), type); diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query2/QueryDefinitionRegistry2.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query2/QueryDefinitionRegistry2.java index 7bf759c8e3f..47b33cb7c76 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query2/QueryDefinitionRegistry2.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query2/QueryDefinitionRegistry2.java @@ -34,10 +34,7 @@ import com.evolveum.midpoint.util.QNameUtil; import com.evolveum.midpoint.util.logging.Trace; import com.evolveum.midpoint.util.logging.TraceManager; -import com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationCaseType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationWorkItemType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.CaseWorkItemType; -import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; +import com.evolveum.midpoint.xml.ns._public.common.common_3.*; import org.apache.commons.lang.Validate; import javax.xml.namespace.QName; diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query2/QueryEngine2.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query2/QueryEngine2.java index 306a60bb02e..660272071ed 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query2/QueryEngine2.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query2/QueryEngine2.java @@ -30,6 +30,7 @@ import com.evolveum.midpoint.util.DebugUtil; import com.evolveum.midpoint.util.logging.Trace; import com.evolveum.midpoint.util.logging.TraceManager; +import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentHolderType; import org.hibernate.query.Query; import org.hibernate.Session; @@ -59,6 +60,8 @@ public RQuery interpret(ObjectQuery query, Class type, Collection> options, boolean countingObjects, Session session) throws QueryException { + query = refineAssignmentHolderQuery(type, query); + QueryInterpreter2 interpreter = new QueryInterpreter2(repoConfiguration, extItemDictionary); RootHibernateQuery hibernateQuery = interpreter.interpret(query, type, options, prismContext, relationRegistry, countingObjects, session); Query hqlQuery = hibernateQuery.getAsHqlQuery(session); @@ -70,4 +73,19 @@ public RQuery interpret(ObjectQuery query, Class type, } return new RQueryImpl(hqlQuery, hibernateQuery); } + + /** + * Both ObjectType and AssignmentHolderType are mapped to RObject. So when searching for AssignmentHolderType it is not sufficient to + * query this table. This method hacks this situation a bit by introducing explicit type filter for AssignmentHolderType. + */ + private ObjectQuery refineAssignmentHolderQuery(Class type, ObjectQuery query) { + if (!type.equals(AssignmentHolderType.class)) { + return query; + } + if (query == null) { + query = prismContext.queryFactory().createQuery(); + } + query.setFilter(prismContext.queryFactory().createType(AssignmentHolderType.COMPLEX_TYPE, query.getFilter())); + return query; + } } diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query2/restriction/TypeRestriction.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query2/restriction/TypeRestriction.java index 331daad7391..046559894b2 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query2/restriction/TypeRestriction.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/query2/restriction/TypeRestriction.java @@ -28,9 +28,7 @@ import com.evolveum.midpoint.repo.sql.util.ClassMapper; import javax.xml.namespace.QName; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; +import java.util.Collection; /** * @author lazyman @@ -48,7 +46,7 @@ public Condition interpret() throws QueryException { String property = getBaseHqlEntity().getHqlPath() + "." + RObject.F_OBJECT_TYPE_CLASS; - Set values = getValues(filter.getType()); + Collection values = getValues(filter.getType()); Condition basedOnType; if (values.size() > 1) { @@ -67,26 +65,7 @@ public Condition interpret() throws QueryException { return hibernateQuery.createAnd(basedOnType, basedOnFilter); } - private Set getValues(QName typeQName) { - Set set = new HashSet<>(); - - RObjectType type = ClassMapper.getHQLTypeForQName(typeQName); - set.add(type); - - switch (type) { - case OBJECT: - set.addAll(Arrays.asList(RObjectType.values())); - break; - case FOCUS: - set.add(RObjectType.USER); - case ABSTRACT_ROLE: - set.add(RObjectType.ROLE); - set.add(RObjectType.ORG); - set.add(RObjectType.SERVICE); - break; - default: - } - - return set; + private Collection getValues(QName typeQName) { + return ClassMapper.getDescendantsForQName(typeQName); } } diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/util/ClassMapper.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/util/ClassMapper.java index 62541e0c8ee..10d4a152168 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/util/ClassMapper.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/util/ClassMapper.java @@ -24,14 +24,14 @@ import com.evolveum.midpoint.util.logging.TraceManager; import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; +import org.apache.commons.collections4.MultiValuedMap; +import org.apache.commons.collections4.multimap.HashSetValuedHashMap; import org.apache.commons.lang.Validate; import org.jetbrains.annotations.Contract; import javax.xml.namespace.QName; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; +import java.util.*; /** * @author lazyman @@ -41,6 +41,7 @@ public final class ClassMapper { private static final Trace LOGGER = TraceManager.getTrace(ClassMapper.class); private static final Map types = new HashMap<>(); + private static final MultiValuedMap descendants = new HashSetValuedHashMap<>(); private ClassMapper() { } @@ -64,6 +65,7 @@ private ClassMapper() { types.put(ObjectTypes.ORG, RObjectType.ORG); types.put(ObjectTypes.ABSTRACT_ROLE, RObjectType.ABSTRACT_ROLE); types.put(ObjectTypes.FOCUS_TYPE, RObjectType.FOCUS); + types.put(ObjectTypes.ASSIGNMENT_HOLDER_TYPE, RObjectType.ASSIGNMENT_HOLDER); types.put(ObjectTypes.SECURITY_POLICY, RObjectType.SECURITY_POLICY); types.put(ObjectTypes.LOOKUP_TABLE, RObjectType.LOOKUP_TABLE); types.put(ObjectTypes.ACCESS_CERTIFICATION_DEFINITION, RObjectType.ACCESS_CERTIFICATION_DEFINITION); @@ -84,6 +86,40 @@ private ClassMapper() { throw new IllegalStateException(message); } } + try { + computeDescendants(); + } catch (Throwable t) { + t.printStackTrace(); + throw t; + } + } + + private static void computeDescendants() { + descendants.clear(); + for (RObjectType rType : RObjectType.values()) { + for (RObjectType ancestor : getAncestors(rType)) { + descendants.put(ObjectTypes.getObjectType(ancestor.getJaxbClass()), rType); + } + } + } + + private static Collection getAncestors(RObjectType type) { + Set rv = new HashSet<>(); + Class jaxbClass = type.getJaxbClass(); + for (;;) { + RObjectType rType = RObjectType.getByJaxbTypeIfExists(jaxbClass); + if (rType != null) { + // this check is because of auxiliary classes like AbstractAccessCertificationDefinitionType + // that have no representation in RObjectType + rv.add(rType); + } + Class superclass = jaxbClass.getSuperclass(); + if (superclass == null || !ObjectType.class.isAssignableFrom(superclass)) { + return rv; + } + //noinspection unchecked + jaxbClass = (Class) superclass; + } } public static Class getHQLTypeClass(Class clazz) { @@ -173,4 +209,8 @@ public static QName getQNameForHQLType(RObjectType type) { public static Collection getKnownTypes() { return types.values(); } + + public static Collection getDescendantsForQName(QName typeName) { + return descendants.get(ObjectTypes.getObjectTypeFromTypeQName(typeName)); + } } diff --git a/repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/asserter/FocusAsserter.java b/repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/asserter/FocusAsserter.java index fb2d00caf81..d57ff1466da 100644 --- a/repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/asserter/FocusAsserter.java +++ b/repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/asserter/FocusAsserter.java @@ -194,7 +194,7 @@ public ShadowReferenceAsserter> singleLink() { return null; // not reached } assertEquals("Wrong number of links in " + desc(), 1, linkRef.size()); - ShadowReferenceAsserter> asserter = new ShadowReferenceAsserter<>(linkRef.getValue(0), null, this, "link in "+desc()); + ShadowReferenceAsserter> asserter = new ShadowReferenceAsserter<>(linkRef.getAnyValue(), null, this, "link in "+desc()); copySetupTo(asserter); return asserter; } diff --git a/repo/security-api/src/main/java/com/evolveum/midpoint/security/api/MidPointPrincipal.java b/repo/security-api/src/main/java/com/evolveum/midpoint/security/api/MidPointPrincipal.java index d5ac6ef126f..d0fd350f906 100644 --- a/repo/security-api/src/main/java/com/evolveum/midpoint/security/api/MidPointPrincipal.java +++ b/repo/security-api/src/main/java/com/evolveum/midpoint/security/api/MidPointPrincipal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2017 Evolveum + * Copyright (c) 2010-2018 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,8 +35,11 @@ import com.evolveum.prism.xml.ns._public.types_3.PolyStringType; /** - * @author semancik - * + * Simple midPoint principal. This principal should contain only the concepts that are + * essential for midPoint core to work. It should not contain user interface concepts + * (e.g. adminGuiConfig). For that see MidPointUserProfilePrincipal. + * + * @author Radovan Semancik */ public class MidPointPrincipal implements UserDetails, DebugDumpable, ShortDumpable { private static final long serialVersionUID = 8299738301872077768L; @@ -45,7 +48,6 @@ public class MidPointPrincipal implements UserDetails, DebugDumpable, ShortDump @NotNull private final UserType user; private Collection authorizations = new ArrayList<>(); private ActivationStatusType effectiveActivationStatus; - private AdminGuiConfigurationType adminGuiConfiguration; private SecurityPolicyType applicableSecurityPolicy; // TODO: or a set? @NotNull private final Collection delegatorWithOtherPrivilegesLimitationsCollection = new ArrayList<>(); @@ -192,14 +194,6 @@ public void setPreviousPrincipal(MidPointPrincipal previousPrincipal) { this.previousPrincipal = previousPrincipal; } - public AdminGuiConfigurationType getAdminGuiConfiguration() { - return adminGuiConfiguration; - } - - public void setAdminGuiConfiguration(AdminGuiConfigurationType adminGuiConfiguration) { - this.adminGuiConfiguration = adminGuiConfiguration; - } - public SecurityPolicyType getApplicableSecurityPolicy() { return applicableSecurityPolicy; } @@ -222,12 +216,15 @@ public void addDelegatorWithOtherPrivilegesLimitations(DelegatorWithOtherPrivile */ public MidPointPrincipal clone() { MidPointPrincipal clone = new MidPointPrincipal(this.user); - clone.adminGuiConfiguration = this.adminGuiConfiguration; + copyValues(clone); + return clone; + } + + protected void copyValues(MidPointPrincipal clone) { clone.applicableSecurityPolicy = this.applicableSecurityPolicy; clone.authorizations = cloneAuthorities(); clone.effectiveActivationStatus = this.effectiveActivationStatus; - clone.delegatorWithOtherPrivilegesLimitationsCollection.addAll(delegatorWithOtherPrivilegesLimitationsCollection); - return clone; + clone.delegatorWithOtherPrivilegesLimitationsCollection.addAll(this.delegatorWithOtherPrivilegesLimitationsCollection); } private Collection cloneAuthorities() { @@ -242,17 +239,22 @@ private Collection cloneAuthorities() { @Override public String debugDump(int indent) { StringBuilder sb = new StringBuilder(); - DebugUtil.debugDumpLabelLn(sb, "MidPointPrincipal", indent); + DebugUtil.debugDumpLabelLn(sb, this.getClass().getSimpleName(), indent); + debugDumpInternal(sb, indent); + return sb.toString(); + } + + protected void debugDumpInternal(StringBuilder sb, int indent) { DebugUtil.debugDumpWithLabelLn(sb, "User", user.asPrismObject(), indent + 1); DebugUtil.debugDumpWithLabelLn(sb, "Authorizations", authorizations, indent + 1); DebugUtil.debugDumpWithLabelLn(sb, "Delegators with other privilege limitations", delegatorWithOtherPrivilegesLimitationsCollection, indent + 1); DebugUtil.debugDumpWithLabel(sb, "Attorney", attorney==null?null:attorney.asPrismObject(), indent + 1); - return sb.toString(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("MidPointPrincipal("); + StringBuilder sb = new StringBuilder(); + sb.append(this.getClass().getSimpleName()).append("("); sb.append(user); if (attorney != null) { sb.append(" [").append(attorney).append("]"); diff --git a/repo/security-api/src/main/java/com/evolveum/midpoint/security/api/UserProfileService.java b/repo/security-api/src/main/java/com/evolveum/midpoint/security/api/MidPointPrincipalManager.java similarity index 83% rename from repo/security-api/src/main/java/com/evolveum/midpoint/security/api/UserProfileService.java rename to repo/security-api/src/main/java/com/evolveum/midpoint/security/api/MidPointPrincipalManager.java index 76b952c5587..d859c6bf988 100644 --- a/repo/security-api/src/main/java/com/evolveum/midpoint/security/api/UserProfileService.java +++ b/repo/security-api/src/main/java/com/evolveum/midpoint/security/api/MidPointPrincipalManager.java @@ -28,19 +28,19 @@ /** - * Service that exposes security functions for GUI and other spring-security-enabled authentication front-ends. - * - * This would be more appropriate in the security-impl. But we need it as low as this. - * Otherwise there is a dependency cycle (task->security->repo-common->task) - * Moving this to task yields better cohesion. So, it may in fact belong here. + * Service that exposes security functions for internal use inside midPoint and for other + * spring-security-enabled purposes. + * + * This is using simple MidPointPrincipal that is NOT GUI-enriched. Therefore it is NOT + * suitable for use in GUI. See UserProfileService for that purpose. * * @author lazyman * @author Igor Farinic * @author Radovan Semancik */ -public interface UserProfileService extends OwnerResolver { +public interface MidPointPrincipalManager extends OwnerResolver { - String DOT_CLASS = UserProfileService.class.getName() + "."; + String DOT_CLASS = MidPointPrincipalManager.class.getName() + "."; String OPERATION_GET_PRINCIPAL = DOT_CLASS + "getPrincipal"; String OPERATION_UPDATE_USER = DOT_CLASS + "updateUser"; diff --git a/repo/security-api/src/main/java/com/evolveum/midpoint/security/api/SecurityContextManager.java b/repo/security-api/src/main/java/com/evolveum/midpoint/security/api/SecurityContextManager.java index e02dc3bc102..e387b9eb6cb 100644 --- a/repo/security-api/src/main/java/com/evolveum/midpoint/security/api/SecurityContextManager.java +++ b/repo/security-api/src/main/java/com/evolveum/midpoint/security/api/SecurityContextManager.java @@ -69,9 +69,9 @@ default T runPrivilegedChecked(CheckedProducer producer) throws CommonExc // runPrivileged method is in SecurityEnforcer. It needs to be there because it works with authorizations. - UserProfileService getUserProfileService(); + MidPointPrincipalManager getUserProfileService(); - void setUserProfileService(UserProfileService userProfileService); + void setUserProfileService(MidPointPrincipalManager userProfileService); /** * Store connection information for later use within current thread. diff --git a/repo/security-enforcer-impl/src/main/java/com/evolveum/midpoint/security/enforcer/impl/SecurityEnforcerImpl.java b/repo/security-enforcer-impl/src/main/java/com/evolveum/midpoint/security/enforcer/impl/SecurityEnforcerImpl.java index 88466db137a..f45d24fc6fd 100644 --- a/repo/security-enforcer-impl/src/main/java/com/evolveum/midpoint/security/enforcer/impl/SecurityEnforcerImpl.java +++ b/repo/security-enforcer-impl/src/main/java/com/evolveum/midpoint/security/enforcer/impl/SecurityEnforcerImpl.java @@ -254,7 +254,7 @@ private AccessDecision isAuthorized } } - if (decision.equals(AccessDecision.ALLOW)) { + if (decision == AccessDecision.ALLOW) { // Still check allowedItems. We may still deny the operation. if (allowedItems.isAllItems()) { // This means all items are allowed. No need to check anything @@ -403,20 +403,20 @@ private Collection cval, ItemDecisionFunction itemDecitionFunction, boolean removingContainer, String decisionContextDesc) { + private AccessDecision determineContainerDecision(PrismContainerValue cval, ItemDecisionFunction itemDecisionFunction, boolean removingContainer, String decisionContextDesc) { List> items = cval.getItems(); // Note: cval.isEmpty() will also check for id. We do not care about that. if (items == null || items.isEmpty()) { // TODO: problem with empty containers such as - // orderConstraint in assignment. Skip all - // empty items ... for now. + // orderConstraint in assignment. Skip all + // empty items ... for now. logSubitemContainerDecision(null, decisionContextDesc, cval); return null; } AccessDecision decision = null; for (Item item: items) { ItemPath itemPath = item.getPath(); - AccessDecision itemDecision = itemDecitionFunction.decide(itemPath.namedSegmentsOnly(), removingContainer); + AccessDecision itemDecision = itemDecisionFunction.decide(itemPath.namedSegmentsOnly(), removingContainer); logSubitemDecision(itemDecision, decisionContextDesc, itemPath); if (itemDecision == null) { // null decision means: skip this @@ -427,7 +427,7 @@ private AccessDecision determineContainerDecision(PrismContainerValue cval, I List> subValues = (List)((PrismContainer)item).getValues(); AccessDecision containerDecision = null; for (PrismContainerValue subValue: subValues) { - AccessDecision subdecision = determineContainerDecision(subValue, itemDecitionFunction, removingContainer, decisionContextDesc); + AccessDecision subdecision = determineContainerDecision(subValue, itemDecisionFunction, removingContainer, decisionContextDesc); containerDecision = AccessDecision.combine(containerDecision, subdecision); // We do not want to break the loop immediately here. We want all the denied items to get logged } diff --git a/repo/security-impl/src/main/java/com/evolveum/midpoint/security/impl/SecurityContextManagerImpl.java b/repo/security-impl/src/main/java/com/evolveum/midpoint/security/impl/SecurityContextManagerImpl.java index b25bcac7a26..f1386fa49a7 100644 --- a/repo/security-impl/src/main/java/com/evolveum/midpoint/security/impl/SecurityContextManagerImpl.java +++ b/repo/security-impl/src/main/java/com/evolveum/midpoint/security/impl/SecurityContextManagerImpl.java @@ -34,7 +34,7 @@ import com.evolveum.midpoint.security.api.MidPointPrincipal; import com.evolveum.midpoint.security.api.SecurityContextManager; import com.evolveum.midpoint.security.api.SecurityUtil; -import com.evolveum.midpoint.security.api.UserProfileService; +import com.evolveum.midpoint.security.api.MidPointPrincipalManager; import com.evolveum.midpoint.util.Producer; import com.evolveum.midpoint.util.logging.Trace; import com.evolveum.midpoint.util.logging.TraceManager; @@ -50,16 +50,16 @@ public class SecurityContextManagerImpl implements SecurityContextManager { private static final transient Trace LOGGER = TraceManager.getTrace(SecurityContextManagerImpl.class); - private UserProfileService userProfileService = null; + private MidPointPrincipalManager userProfileService = null; private ThreadLocal connectionInformationThreadLocal = new ThreadLocal<>(); @Override - public UserProfileService getUserProfileService() { + public MidPointPrincipalManager getUserProfileService() { return userProfileService; } @Override - public void setUserProfileService(UserProfileService userProfileService) { + public void setUserProfileService(MidPointPrincipalManager userProfileService) { this.userProfileService = userProfileService; } diff --git a/repo/security-impl/src/test/java/com/evolveum/midpoint/security/impl/UserProfileServiceMock.java b/repo/security-impl/src/test/java/com/evolveum/midpoint/security/impl/MidPointPrincipalManagerMock.java similarity index 93% rename from repo/security-impl/src/test/java/com/evolveum/midpoint/security/impl/UserProfileServiceMock.java rename to repo/security-impl/src/test/java/com/evolveum/midpoint/security/impl/MidPointPrincipalManagerMock.java index e92dc634252..47d7bc46c8d 100644 --- a/repo/security-impl/src/test/java/com/evolveum/midpoint/security/impl/UserProfileServiceMock.java +++ b/repo/security-impl/src/test/java/com/evolveum/midpoint/security/impl/MidPointPrincipalManagerMock.java @@ -38,7 +38,7 @@ import com.evolveum.midpoint.security.api.Authorization; import com.evolveum.midpoint.security.api.AuthorizationTransformer; import com.evolveum.midpoint.security.api.MidPointPrincipal; -import com.evolveum.midpoint.security.api.UserProfileService; +import com.evolveum.midpoint.security.api.MidPointPrincipalManager; import com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException; import com.evolveum.midpoint.util.exception.ObjectNotFoundException; import com.evolveum.midpoint.util.exception.SchemaException; @@ -61,9 +61,9 @@ * @author semancik */ @Component -public class UserProfileServiceMock implements UserProfileService, UserDetailsService { +public class MidPointPrincipalManagerMock implements MidPointPrincipalManager, UserDetailsService { - private static final Trace LOGGER = TraceManager.getTrace(UserProfileServiceMock.class); + private static final Trace LOGGER = TraceManager.getTrace(MidPointPrincipalManagerMock.class); @Autowired(required = true) private transient RepositoryService repositoryService; @@ -165,13 +165,13 @@ private PrismObject findByUsername(String username, OperationResult re private void initializePrincipalFromAssignments(MidPointPrincipal principal, PrismObject systemConfiguration) { - OperationResult result = new OperationResult(UserProfileServiceMock.class.getName() + ".addAuthorizations"); + OperationResult result = new OperationResult(MidPointPrincipalManagerMock.class.getName() + ".addAuthorizations"); principal.setApplicableSecurityPolicy(locateSecurityPolicy(principal, systemConfiguration, result)); - if (systemConfiguration != null) { - principal.setAdminGuiConfiguration(systemConfiguration.asObjectable().getAdminGuiConfiguration()); - } +// if (systemConfiguration != null) { +// principal.setAdminGuiConfiguration(systemConfiguration.asObjectable().getAdminGuiConfiguration()); +// } AuthorizationType authorizationType = new AuthorizationType(); authorizationType.getAction().add("FAKE"); @@ -230,11 +230,11 @@ public PrismObject resolveOwner(P } PrismObject owner = null; if (object.canRepresent(ShadowType.class)) { - owner = repositoryService.searchShadowOwner(object.getOid(), null, new OperationResult(UserProfileServiceMock.class+".resolveOwner")); + owner = repositoryService.searchShadowOwner(object.getOid(), null, new OperationResult(MidPointPrincipalManagerMock.class+".resolveOwner")); } else if (object.canRepresent(AbstractRoleType.class)) { ObjectReferenceType ownerRef = ((AbstractRoleType)(object.asObjectable())).getOwnerRef(); if (ownerRef != null && ownerRef.getOid() != null && ownerRef.getType() != null) { - OperationResult result = new OperationResult(UserProfileService.class.getName() + ".resolveOwner"); + OperationResult result = new OperationResult(MidPointPrincipalManager.class.getName() + ".resolveOwner"); try { owner = (PrismObject) repositoryService.getObject(ObjectTypes.getObjectTypeFromTypeQName(ownerRef.getType()).getClassDefinition(), ownerRef.getOid(), null, result); diff --git a/repo/security-impl/src/test/java/com/evolveum/midpoint/security/impl/TestEmpty.java b/repo/security-impl/src/test/java/com/evolveum/midpoint/security/impl/TestEmpty.java index 785ccb6ebc0..0f8cf77a567 100644 --- a/repo/security-impl/src/test/java/com/evolveum/midpoint/security/impl/TestEmpty.java +++ b/repo/security-impl/src/test/java/com/evolveum/midpoint/security/impl/TestEmpty.java @@ -65,7 +65,7 @@ public class TestEmpty extends AbstractIntegrationTest { private static final Trace LOGGER = TraceManager.getTrace(TestEmpty.class); @Autowired(required=true) - private UserProfileServiceMock userProfileService; + private MidPointPrincipalManagerMock userProfileService; @Autowired(required = true) private Clock clock; diff --git a/repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/cluster/NodeRegistrar.java b/repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/cluster/NodeRegistrar.java index e6578a13efd..6c71614a791 100644 --- a/repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/cluster/NodeRegistrar.java +++ b/repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/cluster/NodeRegistrar.java @@ -21,6 +21,7 @@ import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.prism.delta.ItemDelta; import com.evolveum.midpoint.prism.delta.ObjectDelta; +import com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy; import com.evolveum.midpoint.prism.polystring.PolyString; import com.evolveum.midpoint.prism.query.ObjectQuery; import com.evolveum.midpoint.repo.api.RepositoryService; @@ -102,7 +103,7 @@ NodeType createOrUpdateNodeInRepo(OperationResult result) throws TaskManagerInit // copy all information that need to be preserved from the repository nodeToBe.setTaskExecutionLimitations(nodeInRepo.asObjectable().getTaskExecutionLimitations()); nodeToBe.setUrl(nodeInRepo.asObjectable().getUrl()); - ObjectDelta nodeDelta = nodeInRepo.diff(nodeToBe.asPrismObject(), false, true); + ObjectDelta nodeDelta = nodeInRepo.diff(nodeToBe.asPrismObject(), EquivalenceStrategy.LITERAL); LOGGER.debug("Applying delta to existing node object:\n{}", nodeDelta.debugDumpLazily()); try { getRepositoryService().modifyObject(NodeType.class, nodeInRepo.getOid(), nodeDelta.getModifications(), result); diff --git a/repo/task-quartz-impl/src/test/java/com/evolveum/midpoint/task/quartzimpl/TestWorkersManagement.java b/repo/task-quartz-impl/src/test/java/com/evolveum/midpoint/task/quartzimpl/TestWorkersManagement.java index 7abad172208..f99247cdd7e 100644 --- a/repo/task-quartz-impl/src/test/java/com/evolveum/midpoint/task/quartzimpl/TestWorkersManagement.java +++ b/repo/task-quartz-impl/src/test/java/com/evolveum/midpoint/task/quartzimpl/TestWorkersManagement.java @@ -400,7 +400,7 @@ public void test210PartitioningToWorkersSingleBucket() throws Exception { } } - @Test + @Test(enabled = false) // MID-5041 public void test220PartitioningToWorkersMoreBuckets() throws Exception { final String TEST_NAME = "test220PartitioningToWorkersMoreBuckets"; OperationResult result = createResult(TEST_NAME, LOGGER); diff --git a/samples/model-client-sample/pom.xml b/samples/model-client-sample/pom.xml index 10ce6a8412a..f3d95abee7a 100644 --- a/samples/model-client-sample/pom.xml +++ b/samples/model-client-sample/pom.xml @@ -25,6 +25,8 @@ 1.8 3.1.6 + 3.0.0-M2 + 3.0.0-M2 Evolveum @@ -162,9 +164,15 @@ - org.apache.maven.plugins maven-surefire-plugin - 2.20 + ${surefire.version} + + true + + + + maven-failsafe-plugin + ${failsafe.version} true @@ -245,6 +253,12 @@ 6.8.8 test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/samples/pom.xml b/samples/pom.xml index 7126b5f2193..c0fddd3780e 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -50,11 +50,30 @@ samples-test model-client-sample + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.testng testng test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/samples/samples-test/pom.xml b/samples/samples-test/pom.xml index c441c8764b0..081ba112d2d 100644 --- a/samples/samples-test/pom.xml +++ b/samples/samples-test/pom.xml @@ -54,6 +54,12 @@ alphabetical + + maven-failsafe-plugin + + alphabetical + + diff --git a/testing/conntest/pom.xml b/testing/conntest/pom.xml index 7dd32c716f5..03131277987 100644 --- a/testing/conntest/pom.xml +++ b/testing/conntest/pom.xml @@ -54,6 +54,12 @@ alphabetical + + maven-failsafe-plugin + + alphabetical + + @@ -257,7 +263,12 @@ maven-surefire-plugin false - -XX:MaxPermSize=256m + + + + maven-failsafe-plugin + + false diff --git a/testing/longtest/pom.xml b/testing/longtest/pom.xml index 95a09dcc98e..d33509d0e98 100644 --- a/testing/longtest/pom.xml +++ b/testing/longtest/pom.xml @@ -54,6 +54,12 @@ alphabetical + + maven-failsafe-plugin + + alphabetical + + @@ -252,9 +258,14 @@ maven-surefire-plugin + + false + + + + maven-failsafe-plugin false - -XX:MaxPermSize=256m diff --git a/testing/pom.xml b/testing/pom.xml index 28f7c28ee72..3b3e3bad854 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -38,6 +38,19 @@ ordinary build --> + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + @@ -80,5 +93,11 @@ testng test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/testing/rest/pom.xml b/testing/rest/pom.xml index de1260894de..8a6da5398aa 100644 --- a/testing/rest/pom.xml +++ b/testing/rest/pom.xml @@ -285,9 +285,14 @@ maven-surefire-plugin false - -XX:MaxPermSize=256m + + maven-failsafe-plugin + + false + + diff --git a/testing/sanity/pom.xml b/testing/sanity/pom.xml index b89de377559..cea39711c36 100644 --- a/testing/sanity/pom.xml +++ b/testing/sanity/pom.xml @@ -54,6 +54,12 @@ alphabetical + + maven-failsafe-plugin + + alphabetical + + diff --git a/testing/schrodingertest/pom.xml b/testing/schrodingertest/pom.xml index bda42b33858..64af87ea5ee 100644 --- a/testing/schrodingertest/pom.xml +++ b/testing/schrodingertest/pom.xml @@ -81,6 +81,12 @@ test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/testing/selenidetest/pom.xml b/testing/selenidetest/pom.xml index 79e1084ea76..5b8a9d4d5ff 100644 --- a/testing/selenidetest/pom.xml +++ b/testing/selenidetest/pom.xml @@ -117,7 +117,12 @@ maven-surefire-plugin false - -XX:MaxPermSize=256m + + + + maven-failsafe-plugin + + false diff --git a/testing/story/pom.xml b/testing/story/pom.xml index 3e81c1e89db..562cf1d961b 100644 --- a/testing/story/pom.xml +++ b/testing/story/pom.xml @@ -54,6 +54,12 @@ alphabetical + + maven-failsafe-plugin + + alphabetical + + @@ -319,9 +325,14 @@ maven-surefire-plugin false - -XX:MaxPermSize=256m + + maven-failsafe-plugin + + false + + diff --git a/testing/wstest/pom.xml b/testing/wstest/pom.xml index ae5b577a971..5c1f83f3b2b 100644 --- a/testing/wstest/pom.xml +++ b/testing/wstest/pom.xml @@ -162,9 +162,14 @@ maven-surefire-plugin false - -XX:MaxPermSize=256m + + maven-failsafe-plugin + + false + + diff --git a/tools/midpoint-war-layout/pom.xml b/tools/midpoint-war-layout/pom.xml index 9ae5479c7e2..39cbf65300c 100644 --- a/tools/midpoint-war-layout/pom.xml +++ b/tools/midpoint-war-layout/pom.xml @@ -36,5 +36,11 @@ org.springframework.boot spring-boot-loader-tools + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + \ No newline at end of file diff --git a/tools/ninja/pom.xml b/tools/ninja/pom.xml index 539c2be0c17..5b44efda630 100644 --- a/tools/ninja/pom.xml +++ b/tools/ninja/pom.xml @@ -223,6 +223,12 @@ + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + @@ -262,6 +268,15 @@ + + + org.apache.maven.plugins + maven-failsafe-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + diff --git a/tools/schema-dist-maven-plugin/pom.xml b/tools/schema-dist-maven-plugin/pom.xml index 179c13d27a4..62bea1ef07d 100644 --- a/tools/schema-dist-maven-plugin/pom.xml +++ b/tools/schema-dist-maven-plugin/pom.xml @@ -83,6 +83,12 @@ true + + maven-failsafe-plugin + + true + + diff --git a/tools/schrodinger/pom.xml b/tools/schrodinger/pom.xml index 079c22b7c6a..48d4cb49961 100644 --- a/tools/schrodinger/pom.xml +++ b/tools/schrodinger/pom.xml @@ -110,6 +110,12 @@ test + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/tools/test-ng/src/main/java/com/evolveum/midpoint/tools/testng/Retry.java b/tools/test-ng/src/main/java/com/evolveum/midpoint/tools/testng/Retry.java new file mode 100644 index 00000000000..06710bad452 --- /dev/null +++ b/tools/test-ng/src/main/java/com/evolveum/midpoint/tools/testng/Retry.java @@ -0,0 +1,39 @@ +package com.evolveum.midpoint.tools.testng; + +import org.testng.IRetryAnalyzer; +import org.testng.ITestResult; + +public class Retry implements IRetryAnalyzer { + private int retryCount = 0; + private int maxRetryCount = 0; + private String maxRetryCountEnv = System.getProperty("testsRetryCount"); + + private boolean initMaxRetry() { + if (maxRetryCountEnv == null) + return false; + + try { + maxRetryCount = Integer.parseInt(maxRetryCountEnv); + } catch (NumberFormatException e) { + System.out.println("Test retry FAILED, cannot parse retry count: "+e.getMessage()); + return false; + } + return true; + } + + public boolean retry(ITestResult result) { + if (isOneMoreRetryAvailable()) { + retryCount++; + System.out.println("Retry #" + retryCount + " for test: " + result.getMethod().getMethodName() + ", on thread: " + Thread.currentThread().getName()); + return true; + } + return false; + } + + public boolean isOneMoreRetryAvailable() { + if (!initMaxRetry()) + return false; + + return retryCount < maxRetryCount; + } +} \ No newline at end of file diff --git a/tools/test-ng/src/main/java/com/evolveum/midpoint/tools/testng/RetryListener.java b/tools/test-ng/src/main/java/com/evolveum/midpoint/tools/testng/RetryListener.java new file mode 100644 index 00000000000..db176842959 --- /dev/null +++ b/tools/test-ng/src/main/java/com/evolveum/midpoint/tools/testng/RetryListener.java @@ -0,0 +1,20 @@ +package com.evolveum.midpoint.tools.testng; + +import org.testng.IAnnotationTransformer; +import org.testng.IRetryAnalyzer; +import org.testng.annotations.ITestAnnotation; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; + +public class RetryListener implements IAnnotationTransformer { + public RetryListener() { + } + @Override + public void transform(ITestAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod) { + IRetryAnalyzer retry = annotation.getRetryAnalyzer(); + if (retry == null) { + annotation.setRetryAnalyzer(Retry.class); + } + } +} diff --git a/tools/test-ng/src/main/java/com/evolveum/midpoint/tools/testng/TestListener.java b/tools/test-ng/src/main/java/com/evolveum/midpoint/tools/testng/TestListener.java index 6c5b1eaa167..6bb715ac290 100644 --- a/tools/test-ng/src/main/java/com/evolveum/midpoint/tools/testng/TestListener.java +++ b/tools/test-ng/src/main/java/com/evolveum/midpoint/tools/testng/TestListener.java @@ -15,14 +15,14 @@ */ package com.evolveum.midpoint.tools.testng; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - import org.testng.ITestContext; import org.testng.ITestListener; import org.testng.ITestResult; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + public class TestListener implements ITestListener { private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS"); @@ -46,7 +46,18 @@ public void onTestFailedButWithinSuccessPercentage(ITestResult tr) { @Override public void onTestFailure(ITestResult tr) { + /* + if (tr.getMethod().getRetryAnalyzer() != null) { + Retry retryAnalyzer = (Retry) tr.getMethod().getRetryAnalyzer(); + if (retryAnalyzer.isOneMoreRetryAvailable()) { + print("Skipping test for retry "+tr); + tr.setStatus(ITestResult.SKIP); + return; + } + } + */ print("Failed test "+tr); + } @Override diff --git a/tools/xjc-plugin/pom.xml b/tools/xjc-plugin/pom.xml index db0c181dd7f..cc258aaedac 100644 --- a/tools/xjc-plugin/pom.xml +++ b/tools/xjc-plugin/pom.xml @@ -67,5 +67,11 @@ org.jetbrains annotations-java5 + + com.evolveum.midpoint.tools + test-ng + 4.0-SNAPSHOT + test + diff --git a/tools/xjc-plugin/testng-unit.xml b/tools/xjc-plugin/testng-unit.xml index 4c7e8e169f9..6da43dbec95 100644 --- a/tools/xjc-plugin/testng-unit.xml +++ b/tools/xjc-plugin/testng-unit.xml @@ -17,9 +17,4 @@ --> - - - - -