Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Jul 21, 2014
2 parents 596ff21 + fe73573 commit 2fb1bb9
Show file tree
Hide file tree
Showing 29 changed files with 239 additions and 118 deletions.
38 changes: 35 additions & 3 deletions build-system/pom.xml
Expand Up @@ -45,8 +45,8 @@
<commons.io.version>2.0.1</commons.io.version>
<commons.lang.version>2.6</commons.lang.version>
<commons.cli>1.2</commons.cli>
<cxf.version>2.7.6</cxf.version>
<cxf-xjc.version>2.4.0</cxf-xjc.version>
<cxf.version>3.0.1.e1</cxf.version>
<cxf-xjc.version>3.0.1</cxf-xjc.version>
<dbunit.version>2.4.7</dbunit.version>
<jaxb.version>2.2.7</jaxb.version>
<jaxb-xjc.version>2.2.7</jaxb-xjc.version>
Expand All @@ -70,6 +70,7 @@
<activiti-engine.version>5.15.1</activiti-engine.version>
<activiti-spring.version>5.15.1</activiti-spring.version>
<commons-email.version>1.3</commons-email.version>
<xmlsec.version>2.0.1</xmlsec.version>
<connid.version>1.4.0.0-SNAPSHOT</connid.version>
</properties>
<dependencyManagement>
Expand Down Expand Up @@ -267,14 +268,24 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-core</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-simple</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-api</artifactId>
<artifactId>cxf-rt-wsdl</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-tools-common</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -322,6 +333,21 @@
<artifactId>cxf-rt-ws-security</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf.xjc-utils</groupId>
<artifactId>cxf-xjc-runtime</artifactId>
<version>${cxf-xjc.version}</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.osgi.core</artifactId>
Expand Down Expand Up @@ -413,6 +439,12 @@
<artifactId>quartz</artifactId>
<version>${quartz.version}</version>
</dependency>
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>${xmlsec.version}</version>
</dependency>




Expand Down
Expand Up @@ -16,33 +16,35 @@

<wicket:panel xmlns:wicket="http://wicket.apache.org">
<div wicket:id="content">
<form wicket:id="mainForm" style="margin: 5px;">
<div style="border-bottom: 1px solid #000; padding-bottom: 5px">
<input type="text" wicket:id="searchText"/>
<table style="display: inline; margin-right: 30px;">
<tr>
<td>
<input type="checkbox" wicket:id="nameCheck" size="30"/>
<wicket:message key="userBrowserDialog.name"/>
</td>
<td><input type="checkbox" wicket:id="fullNameCheck"/>
<wicket:message key="userBrowserDialog.fullName"/>
</td>
</tr>
<tr>
<td>
<input type="checkbox" wicket:id="givenNameCheck"/>
<wicket:message key="userBrowserDialog.givenName"/>
</td>
<td>
<input type="checkbox" wicket:id="familyNameCheck"/>
<wicket:message key="userBrowserDialog.familyName"/>
</td>
</tr>
</table>
<a class="btn btn-sm btn-default" wicket:id="searchButton"/>
</div>

<form class="form-inline pull-right search-form" wicket:id="searchForm"
style="padding: 5px;">
<table style="display: inline; margin-right: 30px;">
<tr>
<td>
<input type="checkbox" wicket:id="nameCheck" size="30"/>
<wicket:message key="userBrowserDialog.name"/>
</td>
<td><input type="checkbox" wicket:id="fullNameCheck"/>
<wicket:message key="userBrowserDialog.fullName"/>
</td>
</tr>
<tr>
<td>
<input type="checkbox" wicket:id="givenNameCheck"/>
<wicket:message key="userBrowserDialog.givenName"/>
</td>
<td>
<input type="checkbox" wicket:id="familyNameCheck"/>
<wicket:message key="userBrowserDialog.familyName"/>
</td>
</tr>
</table>

<div wicket:id="basicSearch" />
</form>

<form class="clearfix" wicket:id="mainForm" style="margin: 5px;">
<div wicket:id="table"/>

<p align="right">
Expand Down
Expand Up @@ -27,7 +27,7 @@
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
import com.evolveum.midpoint.web.component.AjaxButton;
import com.evolveum.midpoint.web.component.AjaxSubmitButton;
import com.evolveum.midpoint.web.component.BasicSearchPanel;
import com.evolveum.midpoint.web.component.data.ObjectDataProvider;
import com.evolveum.midpoint.web.component.data.TablePanel;
import com.evolveum.midpoint.web.component.data.column.IconColumn;
Expand All @@ -50,7 +50,6 @@
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.*;

Expand All @@ -62,6 +61,16 @@
*/
public class UserBrowserDialog extends ModalWindow {

private static final String ID_SEARCH_FORM = "searchForm";
private static final String ID_MAIN_FORM = "mainForm";
private static final String ID_CHECK_NAME = "nameCheck";
private static final String ID_CHECK_FULL_NAME = "fullNameCheck";
private static final String ID_CHECK_GIVEN_NAME = "givenNameCheck";
private static final String ID_CHECK_FAMILY_NAME = "familyNameCheck";
private static final String ID_BASIC_SEARCH = "basicSearch";
private static final String ID_BUTTON_CANCEL = "cancelButton";
private static final String ID_TABLE = "table";

private static final Trace LOGGER = TraceManager.getTrace(UserBrowserDialog.class);
private IModel<UserBrowserDto> model;
private boolean initialized;
Expand Down Expand Up @@ -102,44 +111,51 @@ protected void onBeforeRender() {
}

private void initLayout(WebMarkupContainer content) {
Form mainForm = new Form("mainForm");
Form mainForm = new Form(ID_MAIN_FORM);
content.add(mainForm);

TextField<String> search = new TextField<String>("searchText", new PropertyModel<String>(model, "searchText"));
mainForm.add(search);
Form searchForm = new Form(ID_SEARCH_FORM);
searchForm.setOutputMarkupId(true);
content.add(searchForm);

CheckBox nameCheck = new CheckBox("nameCheck", new PropertyModel<Boolean>(model, "name"));
mainForm.add(nameCheck);
CheckBox fullNameCheck = new CheckBox("fullNameCheck", new PropertyModel<Boolean>(model, "fullName"));
mainForm.add(fullNameCheck);
CheckBox givenNameCheck = new CheckBox("givenNameCheck", new PropertyModel<Boolean>(model, "givenName"));
mainForm.add(givenNameCheck);
CheckBox familyNameCheck = new CheckBox("familyNameCheck", new PropertyModel<Boolean>(model, "familyName"));
mainForm.add(familyNameCheck);
// TextField<String> search = new TextField<String>("searchText", new PropertyModel<String>(model, "searchText"));
// mainForm.add(search);

CheckBox nameCheck = new CheckBox(ID_CHECK_NAME, new PropertyModel<Boolean>(model, UserBrowserDto.F_NAME));
searchForm.add(nameCheck);
CheckBox fullNameCheck = new CheckBox(ID_CHECK_FULL_NAME, new PropertyModel<Boolean>(model, UserBrowserDto.F_FULL_NAME));
searchForm.add(fullNameCheck);
CheckBox givenNameCheck = new CheckBox(ID_CHECK_GIVEN_NAME, new PropertyModel<Boolean>(model, UserBrowserDto.F_GIVEN_NAME));
searchForm.add(givenNameCheck);
CheckBox familyNameCheck = new CheckBox(ID_CHECK_FAMILY_NAME, new PropertyModel<Boolean>(model, UserBrowserDto.F_FAMILY_NAME));
searchForm.add(familyNameCheck);

List<IColumn<SelectableBean<UserType>, String>> columns = initColumns();
TablePanel table = new TablePanel<SelectableBean<UserType>>("table",
new ObjectDataProvider(getPageBase(), UserType.class), columns);
table.setOutputMarkupId(true);
mainForm.add(table);
BasicSearchPanel<UserBrowserDto> basicSearch = new BasicSearchPanel<UserBrowserDto>(ID_BASIC_SEARCH) {

AjaxSubmitButton searchButton = new AjaxSubmitButton("searchButton",
createStringResource("userBrowserDialog.button.searchButton")) {
@Override
protected IModel<String> createSearchTextModel() {
return new PropertyModel<>(model, UserBrowserDto.F_SEARCH_TEXT);
}

@Override
protected void onError(AjaxRequestTarget target, Form<?> form) {
target.add(getPageBase().getFeedbackPanel());
protected void searchPerformed(AjaxRequestTarget target) {
UserBrowserDialog.this.searchPerformed(target);
}

@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
searchPerformed(target);
protected void clearSearchPerformed(AjaxRequestTarget target) {
UserBrowserDialog.this.clearSearchPerformed(target);
}
};
mainForm.add(searchButton);
searchForm.add(basicSearch);

List<IColumn<SelectableBean<UserType>, String>> columns = initColumns();
TablePanel table = new TablePanel<>(ID_TABLE,
new ObjectDataProvider(getPageBase(), UserType.class), columns);
table.setOutputMarkupId(true);
mainForm.add(table);

AjaxButton cancelButton = new AjaxButton("cancelButton",
AjaxButton cancelButton = new AjaxButton(ID_BUTTON_CANCEL,
createStringResource("userBrowserDialog.button.cancelButton")) {

@Override
Expand Down Expand Up @@ -176,7 +192,7 @@ public String getObject() {
}
});

IColumn column = new LinkColumn<SelectableBean<UserType>>(createStringResource("userBrowserDialog.name"), "name", "value.name") {
IColumn column = new LinkColumn<SelectableBean<UserType>>(createStringResource("userBrowserDialog.name"), UserBrowserDto.F_NAME, "value.name") {

@Override
public void onClick(AjaxRequestTarget target, IModel<SelectableBean<UserType>> rowModel) {
Expand All @@ -186,13 +202,13 @@ public void onClick(AjaxRequestTarget target, IModel<SelectableBean<UserType>> r
};
columns.add(column);

column = new PropertyColumn(createStringResource("userBrowserDialog.givenName"), "givenName", "value.givenName");
column = new PropertyColumn(createStringResource("userBrowserDialog.givenName"), UserBrowserDto.F_GIVEN_NAME, SelectableBean.F_VALUE + ".givenName");
columns.add(column);

column = new PropertyColumn(createStringResource("userBrowserDialog.familyName"), "familyName", "value.familyName");
column = new PropertyColumn(createStringResource("userBrowserDialog.familyName"), UserBrowserDto.F_FAMILY_NAME, SelectableBean.F_VALUE + ".familyName");
columns.add(column);

column = new PropertyColumn(createStringResource("userBrowserDialog.fullName"), "fullName", "value.fullName.orig");
column = new PropertyColumn(createStringResource("userBrowserDialog.fullName"), UserBrowserDto.F_FULL_NAME, SelectableBean.F_VALUE + ".fullName.orig");
columns.add(column);

column = new AbstractColumn<SelectableBean<UserType>, String>(createStringResource("userBrowserDialog.email")) {
Expand Down Expand Up @@ -275,6 +291,18 @@ private ObjectQuery createQuery() {
return query;
}

private void clearSearchPerformed(AjaxRequestTarget target){
model.setObject(new UserBrowserDto());

TablePanel panel = getTable();
DataTable table = panel.getDataTable();
ObjectDataProvider provider = (ObjectDataProvider) table.getDataProvider();
provider.setQuery(null);

target.add(getContent().get(ID_SEARCH_FORM));
target.add(panel);
}

private void cancelPerformed(AjaxRequestTarget target) {
close(target);
}
Expand Down
Expand Up @@ -23,6 +23,12 @@
*/
public class UserBrowserDto implements Serializable {

public static final String F_SEARCH_TEXT = "searchText";
public static final String F_NAME = "name";
public static final String F_FULL_NAME = "fullName";
public static final String F_GIVEN_NAME = "givenName";
public static final String F_FAMILY_NAME = "familyName";

private String searchText;
private boolean name = true;
private boolean fullName;
Expand Down
2 changes: 0 additions & 2 deletions infra/common/pom.xml
Expand Up @@ -57,7 +57,6 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>1.8.6</version>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
Expand All @@ -66,7 +65,6 @@
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>1.4.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.staxmate</groupId>
Expand Down
11 changes: 9 additions & 2 deletions infra/prism/pom.xml
Expand Up @@ -49,7 +49,15 @@
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-api</artifactId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-wsdl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-tools-common</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
Expand All @@ -58,7 +66,6 @@
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>1.4.5</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.codehaus.jackson</groupId> -->
Expand Down
Expand Up @@ -32,7 +32,7 @@
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;

import org.apache.cxf.common.WSDLConstants;
import org.apache.cxf.wsdl.WSDLConstants;
import org.apache.commons.lang.StringUtils;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
Expand Down
6 changes: 5 additions & 1 deletion infra/schema/pom.xml
Expand Up @@ -55,7 +55,7 @@
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-core</artifactId>
<artifactId>cxf-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
Expand All @@ -77,6 +77,10 @@
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf.xjc-utils</groupId>
<artifactId>cxf-xjc-runtime</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>org.apache.cxf</groupId>-->
<!--<artifactId>cxf-rt-transports-http-jetty</artifactId>-->
Expand Down
Expand Up @@ -24,6 +24,9 @@

<public publicId="http://midpoint.evolveum.com/xml/ns/public/model/model-3" uri="../xml/ns/public/model/model-3.wsdl" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/model/model-3" uri="../xml/ns/public/model/model-3.wsdl" />

<public publicId="http://midpoint.evolveum.com/xml/ns/public/common/fault-3" uri="../xml/ns/public/common/fault-3.wsdl" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/fault-3" uri="../xml/ns/public/common/fault-3.wsdl" />

<public publicId="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3" uri="../xml/ns/public/common/api-types-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3" uri="../xml/ns/public/common/api-types-3.xsd" />
Expand Down

0 comments on commit 2fb1bb9

Please sign in to comment.