Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Jan 25, 2019
2 parents b73271b + cf4bb72 commit cbd334e
Show file tree
Hide file tree
Showing 40 changed files with 977 additions and 293 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -11,6 +11,7 @@ rebel.xml
samples/model-client-sample-dotnet/ModelClientSample/ModelClientSample/bin
samples/model-client-sample-dotnet/ModelClientSample/ModelClientSample/obj
velocity.log
.java-version

dependency-reduced-pom.xml
/nb-configuration.xml
Expand Down
8 changes: 4 additions & 4 deletions build-system/pom.xml
Expand Up @@ -1545,8 +1545,8 @@
<midpoint.home>target/midpoint-home</midpoint.home>
<java.util.logging.config.file>${project.build.directory}/test-classes/logging.properties</java.util.logging.config.file>
</systemPropertyVariables>
<argLine>-Xms16g -Xmx16g</argLine>
<!--argLine>-Xms1024m -Xmx4096m</argLine-->
<!--argLine>-Xms16g -Xmx16g</argLine-->
<argLine>-Xms1024m -Xmx4096m</argLine>
<!--<argLine>-agentpath:/usr/local/yjp-11.0.10/bin/linux-x86-64/libyjpagent.so=alloceach=10,allocsizelimit=1048576,sampling,walltimespec=/home/lazyman/.yjp/config/.walltime,noj2ee,profileruipath=/usr/local/yjp-11.0.10/bin/yjp.sh,onexit=snapshot
-Xms512m -Xmx1024m -XX:MaxPermSize=192m</argLine> -->

Expand Down Expand Up @@ -1585,8 +1585,8 @@
<midpoint.home>target/midpoint-home</midpoint.home>
<java.util.logging.config.file>${project.build.directory}/test-classes/logging.properties</java.util.logging.config.file>
</systemPropertyVariables>
<!--argLine>-Xms1024m -Xmx4096m -Duser.language=en</argLine-->
<argLine>-Xms16g -Xmx16g -Duser.language=en</argLine>
<argLine>-Xms1024m -Xmx4096m -Duser.language=en</argLine>
<!--argLine>-Xms16g -Xmx16g -Duser.language=en</argLine-->
<suiteXmlFiles>
<suiteXmlFile>testng-integration.xml</suiteXmlFile>
</suiteXmlFiles>
Expand Down
Expand Up @@ -2176,7 +2176,7 @@ private void addCollectionsMenuItems(List<MenuItem> menu, QName type, Class<? ex
DisplayType viewDisplayType = objectView.getDisplay();

PageParameters pageParameters = new PageParameters();
pageParameters.add(PARAMETER_OBJECT_COLLECTION_NAME, objectView.getViewName());
pageParameters.add(PARAMETER_OBJECT_COLLECTION_NAME, objectView.getViewIdentifier());

MenuItem userViewMenu = new MenuItem(viewDisplayType != null && PolyStringUtils.isNotEmpty(viewDisplayType.getLabel())
? createStringResource(viewDisplayType.getLabel())
Expand All @@ -2188,7 +2188,7 @@ public boolean isMenuActive(WebPage page) {
PageParameters params = getPageParameters();
if (params != null && params.get(PARAMETER_OBJECT_COLLECTION_NAME) != null){
StringValue collectionName = params.get(PARAMETER_OBJECT_COLLECTION_NAME);
if (objectView.getViewName().equals(collectionName.toString())) {
if (objectView.getViewIdentifier().equals(collectionName.toString())) {
return true;
}
}
Expand Down
Expand Up @@ -24,7 +24,7 @@ <h3 class="box-title"><div wicket:id="treeTitle"/></h3>
<div class="cog" wicket:id="treeMenu" about="treeMenu"/>
</div>
</div>
<div wicket:id="treeContainer" class="box-body org-tree-container" style="flex: 100 1 auto;">
<div wicket:id="treeContainer" class="box-body org-tree-container" style="flex: 100 1 auto; max-height: 717px;">
<div wicket:id="tree"/>
</div>
</div>
Expand Down
Expand Up @@ -359,8 +359,8 @@ protected boolean processDeputyAssignments(boolean previewOnly) {
boolean isAnythingChanged = false;
for (AssignmentEditorDto dto : delegationsModel.getObject()) {
if (!UserDtoStatus.MODIFY.equals(dto.getStatus())) {
UserType user = dto.getDelegationOwner();
if (!previewOnly) {
UserType user = dto.getDelegationOwner();
saveDelegationToUser(user.asPrismObject(), dto);
}
isAnythingChanged = true;
Expand Down Expand Up @@ -401,6 +401,7 @@ protected void processAdditionalFocalObjectsForPreview(Map<PrismObject<UserType>
private void saveDelegationToUser(PrismObject<UserType> user, AssignmentEditorDto assignmentDto) {
OperationResult result = new OperationResult(OPERATION_SAVE);
try {
getPrismContext().adopt(user);
Collection<ObjectDelta<? extends ObjectType>> deltas = prepareDelegationDelta(user, assignmentDto);
getModelService().executeChanges(deltas, getOptions(false), createSimpleTask(OPERATION_SAVE), result);

Expand Down
Expand Up @@ -21,7 +21,7 @@
<!-- <div class="col-md-12 clearfix">
</div>-->
<div class="col-md-4">
<div style="height:100%; max-height:800px; padding-bottom:20px;" wicket:id="treePanel"/>
<div style="max-height:800px; padding-bottom:20px;" wicket:id="treePanel"/>
</div>
<div class="col-md-8">
<div class="box box-solid object-user-box org-managers-box" wicket:id="managerContainer">
Expand Down
Expand Up @@ -312,6 +312,10 @@ private void savePerformed(AjaxRequestTarget target, boolean approved) {
}
}
ObjectDelta delta = getWorkItemPanel().getDeltaFromForm();
if (delta != null) {
//noinspection unchecked
getPrismContext().adopt(delta);
}
try {
assumePowerOfAttorneyIfRequested(result);
getWorkflowService().completeWorkItem(dto.getWorkItemId(), approved, dto.getApproverComment(), delta, result);
Expand Down
Expand Up @@ -632,6 +632,16 @@ public static void assertEqualsPolyString(String message, String expectedOrig, P
expected.recompute(PrismTestUtil.getPrismContext().getDefaultPolyStringNormalizer());
assertEquals(message, expected, actual);
}

public static void assertEqualsPolyStringMulti(String message, Collection<PolyString> actual, String... expectedOrigs) {
List<PolyString> expectedPolystrings = new ArrayList<>(expectedOrigs.length);
for (String expectedOrig : expectedOrigs) {
PolyString expected = new PolyString(expectedOrig);
expected.recompute(PrismTestUtil.getPrismContext().getDefaultPolyStringNormalizer());
expectedPolystrings.add(expected);
}
assertEqualsCollectionUnordered(message, actual, expectedPolystrings);
}

public static void assertEqualsPolyString(String message, String expectedOrig, PolyStringType actual) {
if (expectedOrig == null && actual == null) {
Expand Down
156 changes: 98 additions & 58 deletions infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd
Expand Up @@ -12228,6 +12228,16 @@
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="populate" type="tns:PopulateType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Populate the assignment with specific properties, e.g activation status, validTo, validFrom.
</xsd:documentation>
<xsd:appinfo>
<a:since>4.0</a:since>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
Expand Down Expand Up @@ -15774,24 +15784,67 @@
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="identifier" type="xsd:anyURI" minOccurs="1" maxOccurs="1">
<!-- TODO: make this optional (autogenerate) -->
<xsd:element name="identifier" type="xsd:string" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
Widget identifier. The feature specifications that come
from different roles will be merged if they have the same identifier.
<p>
GUI feature identifier. E.g. idetifier for view or widget.
The feature specifications that come from different roles will be merged
if they have the same identifier. The identifier is also used for
diagnostics, e.g. used in the logfiles.
</p>
<p>
Although identifier type is defined as string, it is strongly recommended
to use URI for all customizations. The URI should be based on identifier
that you own (e.g. DNS domain). Using non-URI forms may still work, but
there is risk of conflicting with default midPoint configuration.
</p>
<p>
If no identifer is specified for a view then midPoint will internally generate a value for the identifier.
This internal identifier value is based on the GUI feature definition, e.g. object type and/or collection OID
or other aspects of the view. The algorithm for identifier generation may change and the results are not
guaranteed to be completely unique. Therefore it is strongly recommended to explictly set identifier for all
the UI features in any non-trivial midPoint configuration.
</p>
<p>
Identifier may not be needed at all in some cases (e.g. additionalPanels in views).
</p>
</xsd:documentation>
<xsd:appinfo>
<a:displayName>UserInterfaceFeatureType.identifier</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<!-- TODO: add DisplayType here (optional) -->
<xsd:element name="display" type="tns:DisplayType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
Display properties of the UI feature. It is used to display the link in the menu and so on.
Only some parts of display specification may be used. E.g. for views only label is used now.
E.g. the CSS properties are ignored.
</xsd:documentation>
<!-- This might be determined from the collection in future midPoint versions.
In fact the entire definition of a view may be just a reference to collection. -->
<xsd:appinfo>
<a:since>3.9</a:since>
<a:displayName>UserInterfaceFeatureType.display</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="visibility" type="tns:UserInterfaceElementVisibilityType"
minOccurs="0" maxOccurs="1" default="vacant">
minOccurs="0" maxOccurs="1" default="automatic">
<xsd:annotation>
<xsd:documentation>
Defines, whether this feature will be visible or it will be hidden.
<p>
Defines, whether this feature will be visible or it will be hidden.
</p>
<p>
The default (since 4.0) is 'automatic', which means that all defined
features will be visible if possible, unless explicitly hidden.
However, this can be changed, e.g. by setting default visibility
in the dashboard definition. Also, some hardcoded dashboards have
different defaults. E.g. the legacy 3.x end-user home page
has default visibility of "vacant".
</p>
</xsd:documentation>
<xsd:appinfo>
<a:displayName>UserInterfaceFeatureType.visibility</a:displayName>
Expand Down Expand Up @@ -20904,39 +20957,42 @@
<a:since>3.9</a:since>
</xsd:appinfo>
</xsd:annotation>
<!-- TODO: should be subtype of UserInterfaceFeatureType? -->
<xsd:sequence>
<xsd:element name="searchBoxConfiguration" type="tns:SearchBoxConfigurationType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:appinfo>
<a:displayName>GuiObjectListViewType.searchBoxConfiguration</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="distinct" type="tns:DistinctSearchOptionType" minOccurs="0" maxOccurs="1" default="auto">
<xsd:annotation>
<xsd:appinfo>
<a:displayName>GuiObjectListViewType.distinct</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="column" type="tns:GuiObjectColumnType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo>
<a:displayName>GuiObjectListViewType.column</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="disableSorting" type="xsd:boolean" default="false" minOccurs="0">
<xsd:annotation>
<xsd:appinfo>
<a:displayName>GuiObjectListViewType.disableSorting</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<!-- TODO: number of results per page (MID-1931) -->
<!-- TODO: later: export settings (GuiExportSettingsType) -->
</xsd:sequence>
<xsd:complexContent>
<xsd:extension base="tns:UserInterfaceFeatureType">
<xsd:sequence>
<xsd:element name="searchBoxConfiguration" type="tns:SearchBoxConfigurationType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:appinfo>
<a:displayName>GuiObjectListViewType.searchBoxConfiguration</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="distinct" type="tns:DistinctSearchOptionType" minOccurs="0" maxOccurs="1" default="auto">
<xsd:annotation>
<xsd:appinfo>
<a:displayName>GuiObjectListViewType.distinct</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="column" type="tns:GuiObjectColumnType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo>
<a:displayName>GuiObjectListViewType.column</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="disableSorting" type="xsd:boolean" default="false" minOccurs="0">
<xsd:annotation>
<xsd:appinfo>
<a:displayName>GuiObjectListViewType.disableSorting</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<!-- TODO: number of results per page (MID-1931) -->
<!-- TODO: later: export settings (GuiExportSettingsType) -->
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>

<xsd:complexType name="GuiObjectListViewType">
Expand All @@ -20963,15 +21019,13 @@
to refer to this view. It will also be used for diagnostics, logging and so on.
</p>
<p>
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.
DEPRECATED. Use identifier instead.
</p>
</xsd:documentation>
<xsd:appinfo>
<a:since>3.9</a:since>
<a:displayName>GuiObjectListViewType.name</a:displayName>
<a:deprecated>true</a:deprecated>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
Expand Down Expand Up @@ -21015,20 +21069,6 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="display" type="tns:DisplayType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
Display properties of the view. It is used to display the link in the menu and so on.
Only label is used now. E.g. the CSS properties are ignored.
</xsd:documentation>
<!-- This might be determined from the collection in future midPoint versions.
In fact the entire definition of a view may be just a reference to collection. -->
<xsd:appinfo>
<a:since>3.9</a:since>
<a:displayName>GuiObjectListViewType.display</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="action" type="tns:GuiActionType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
Expand Down

0 comments on commit cbd334e

Please sign in to comment.