You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2015/02/13 12:44:05 UTC
[01/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Repository: syncope
Updated Branches:
refs/heads/2_0_X 50a9236ed -> 2d1946362
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java b/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java
deleted file mode 100644
index f76570c..0000000
--- a/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.pages;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import org.apache.syncope.common.reqres.BulkAction;
-import org.apache.syncope.common.reqres.BulkActionResult;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.rest.BaseRestClient;
-import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.model.CompoundPropertyModel;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.model.ResourceModel;
-import org.springframework.beans.BeanUtils;
-
-public class BulkActionModalPage<T, S> extends BaseModalPage {
-
- private static final long serialVersionUID = 4114026480146090962L;
-
- public BulkActionModalPage(
- final ModalWindow window,
- final Collection<T> items,
- final List<IColumn<T, S>> columns,
- final Collection<ActionLink.ActionType> actions,
- final BaseRestClient bulkActionExecutor,
- final String idFieldName,
- final String pageId) {
-
- super();
-
- final SortableDataProvider<T, S> dataProvider = new SortableDataProvider<T, S>() {
-
- private static final long serialVersionUID = 5291903859908641954L;
-
- @Override
- public Iterator<? extends T> iterator(final long first, final long count) {
- return items.iterator();
- }
-
- @Override
- public long size() {
- return items.size();
- }
-
- @Override
- public IModel<T> model(final T object) {
- return new CompoundPropertyModel<T>(object);
- }
- };
-
- add(new AjaxFallbackDefaultDataTable<T, S>(
- "selectedObjects",
- new ArrayList<IColumn<T, S>>(columns.subList(1, columns.size() - 1)),
- dataProvider,
- Integer.MAX_VALUE).setVisible(items != null && !items.isEmpty()));
-
- @SuppressWarnings("rawtypes")
- final ActionLinksPanel actionPanel = new ActionLinksPanel("actions", new Model(), getPageReference());
- add(actionPanel);
-
- for (ActionLink.ActionType action : actions) {
- final BulkAction bulkAction = new BulkAction();
- for (T item : items) {
- try {
- bulkAction.getTargets().add(getTargetId(item, idFieldName).toString());
- } catch (Exception e) {
- LOG.error("Error retrieving item id {}", idFieldName, e);
- }
- }
-
- switch (action) {
- case DELETE:
- bulkAction.setOperation(BulkAction.Type.DELETE);
- break;
- case SUSPEND:
- bulkAction.setOperation(BulkAction.Type.SUSPEND);
- break;
- case REACTIVATE:
- bulkAction.setOperation(BulkAction.Type.REACTIVATE);
- break;
- case EXECUTE:
- bulkAction.setOperation(BulkAction.Type.EXECUTE);
- break;
- case DRYRUN:
- bulkAction.setOperation(BulkAction.Type.DRYRUN);
- break;
- default:
- LOG.error("Bulk action type not supported");
- }
-
- actionPanel.add(new ActionLink() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- try {
- final BulkActionResult res = (BulkActionResult) bulkActionExecutor.getClass().
- getMethod("bulkAction", BulkAction.class).invoke(bulkActionExecutor, bulkAction);
-
- setResponsePage(new BulkActionResultModalPage<T, S>(window, items, columns, res, idFieldName));
- } catch (Exception e) {
- error(getString(Constants.ERROR)
- + ": Operation " + bulkAction.getOperation() + " not supported");
- feedbackPanel.refresh(target);
- }
-
- }
- }, action, pageId, !items.isEmpty());
- }
-
- final Form<Void> form = new Form<Void>(FORM);
- add(form);
-
- final AjaxButton cancel =
- new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), getPageReference()) {
-
- private static final long serialVersionUID = -958724007591692537L;
-
- @Override
- protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
- window.close(target);
- }
- };
-
- cancel.setDefaultFormProcessing(false);
- form.add(cancel);
- }
-
- private Object getTargetId(final Object target, final String idFieldName)
- throws IllegalAccessException, InvocationTargetException {
-
- return BeanUtils.getPropertyDescriptor(target.getClass(), idFieldName).
- getReadMethod().invoke(target, new Object[0]);
- }
-}
[50/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 6f627ae..0e6f5c4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,7 +17,7 @@ language: java
jdk:
- openjdk7
# default install is mvn install --quiet -DskipTests=true
-install: mvn --show-version --quiet -P skipTests
+install: mvn --show-version --quiet -P all,skipTests
#invoker.streamLogs: we cannot access to log files through Travis web ui, so display everything in the console
script: mvn --show-version --quiet clean install -Dinvoker.streamLogs=true
notifications:
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/archetype/pom.xml
----------------------------------------------------------------------
diff --git a/archetype/pom.xml b/archetype/pom.xml
index 905e45b..94e7e0d 100644
--- a/archetype/pom.xml
+++ b/archetype/pom.xml
@@ -33,14 +33,6 @@ under the License.
<artifactId>syncope-archetype</artifactId>
<packaging>maven-archetype</packaging>
- <distributionManagement>
- <site>
- <id>syncope.website</id>
- <name>Apache Syncope website</name>
- <url>${site.deploymentBaseUrl}/${project.artifactId}</url>
- </site>
- </distributionManagement>
-
<build>
<extensions>
<extension>
@@ -121,6 +113,7 @@ under the License.
<resource>
<directory>src/main/resources</directory>
</resource>
+
<resource>
<directory>..</directory>
<targetPath>META-INF</targetPath>
@@ -131,56 +124,95 @@ under the License.
</resource>
<resource>
- <directory>../core/src/main/resources</directory>
+ <directory>../core/provisioning-java/src/main/resources</directory>
+ <excludes>
+ <exclude>*Context.xml</exclude>
+ </excludes>
+ <targetPath>${project.build.outputDirectory}/archetype-resources/core/src/main/resources</targetPath>
+ </resource>
+ <resource>
+ <directory>../core/persistence-jpa/src/main/resources</directory>
+ <excludes>
+ <exclude>*Context.xml</exclude>
+ <exclude>META-INF/spring-persistence.xml</exclude>
+ </excludes>
<targetPath>${project.build.outputDirectory}/archetype-resources/core/src/main/resources</targetPath>
+ </resource>
+ <resource>
+ <directory>../core/persistence-jpa/src/test/resources</directory>
<includes>
- <include>*.properties</include>
- <include>*.xml</include>
+ <include>persistence.properties</include>
</includes>
+ <targetPath>${project.build.outputDirectory}/archetype-resources/core/src/test/resources</targetPath>
+ </resource>
+ <resource>
+ <directory>../core/logic/src/main/resources</directory>
+ <targetPath>${project.build.outputDirectory}/archetype-resources/core/src/main/resources</targetPath>
+ <excludes>
+ <exclude>*Context.xml</exclude>
+ </excludes>
</resource>
<resource>
- <directory>../core/src/main/resources/META-INF</directory>
- <targetPath>${project.build.outputDirectory}/archetype-resources/core/src/main/resources/META-INF</targetPath>
+ <directory>../core/misc/src/main/resources</directory>
<includes>
- <include>spring-persistence.xml</include>
+ <include>security.properties</include>
</includes>
+ <targetPath>${project.build.outputDirectory}/archetype-resources/core/src/main/resources</targetPath>
</resource>
<resource>
- <directory>../core/src/main/webapp</directory>
- <targetPath>${project.build.outputDirectory}/archetype-resources/core/src/main/webapp</targetPath>
+ <directory>../fit/core-reference/src/main/resources</directory>
+ <targetPath>${project.build.outputDirectory}/archetype-resources/core/src/main/resources</targetPath>
+ <includes>
+ <include>coreContext.xml</include>
+ <include>log4j2.xml</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>../fit/core-reference/src/main/resources/all</directory>
+ <targetPath>${project.build.outputDirectory}/archetype-resources/core/src/main/resources</targetPath>
+ <includes>
+ <include>workflow.properties</include>
+ </includes>
</resource>
<resource>
- <directory>../core/src/test/resources</directory>
+ <directory>../fit/core-reference/src/main/webapp</directory>
<targetPath>${project.build.outputDirectory}/archetype-resources/core/src/test/resources</targetPath>
<includes>
- <include>*.properties</include>
- <include>content.xml</include>
- <include>*.csv</include>
<include>*.jsp</include>
</includes>
- <excludes>
- <exclude>rest.properties</exclude>
- </excludes>
</resource>
-
<resource>
- <directory>../console/src/main/resources</directory>
+ <directory>../fit/core-reference/src/main/webapp/WEB-INF</directory>
+ <targetPath>${project.build.outputDirectory}/archetype-resources/core/src/main/webapp/WEB-INF</targetPath>
+ </resource>
+
+ <resource>
+ <directory>../client/console/src/main/resources</directory>
<targetPath>${project.build.outputDirectory}/archetype-resources/console/src/main/resources</targetPath>
<includes>
- <include>*.*</include>
+ <include>consoleContext.xml</include>
+ <include>console.properties</include>
</includes>
</resource>
<resource>
- <directory>../console/src/main/webapp/WEB-INF</directory>
- <targetPath>${project.build.outputDirectory}/archetype-resources/console/src/main/webapp/WEB-INF</targetPath>
+ <directory>../fit/console-reference/src/main/resources</directory>
+ <targetPath>${project.build.outputDirectory}/archetype-resources/console/src/main/resources</targetPath>
+ <includes>
+ <include>log4j2.xml</include>
+ <include>oryx.debug.js-tokenValueMap.properties</include>
+ </includes>
</resource>
<resource>
- <directory>../console/src/test/resources</directory>
+ <directory>../fit/console-reference/src/main/resources</directory>
<targetPath>${project.build.outputDirectory}/archetype-resources/console/src/test/resources</targetPath>
<includes>
<include>console.properties</include>
</includes>
</resource>
+ <resource>
+ <directory>../fit/console-reference/src/main/webapp/WEB-INF</directory>
+ <targetPath>${project.build.outputDirectory}/archetype-resources/console/src/main/webapp/WEB-INF</targetPath>
+ </resource>
</resources>
</build>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/archetype/src/main/resources/archetype-resources/console/pom.xml
----------------------------------------------------------------------
diff --git a/archetype/src/main/resources/archetype-resources/console/pom.xml b/archetype/src/main/resources/archetype-resources/console/pom.xml
index 76b2fda..0344a40 100644
--- a/archetype/src/main/resources/archetype-resources/console/pom.xml
+++ b/archetype/src/main/resources/archetype-resources/console/pom.xml
@@ -27,85 +27,75 @@ under the License.
<version>${version}</version>
</parent>
- <name>Apache Syncope sample project console</name>
+ <name>Apache Syncope sample project - Console</name>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<packaging>war</packaging>
<dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ </dependency>
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-client</artifactId>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>javax.servlet.jsp-api</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-console</artifactId>
- <type>war</type>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
</dependency>
+
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-console</artifactId>
- <classifier>classes</classifier>
+ <groupId>org.apache.syncope.client</groupId>
+ <artifactId>syncope-client-console</artifactId>
</dependency>
-
- <!-- TEST -->
+
<dependency>
- <groupId>org.activiti</groupId>
- <artifactId>activiti-webapp-explorer2</artifactId>
- <type>war</type>
- <scope>test</scope>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-build-tools</artifactId>
- <type>war</type>
- <scope>test</scope>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
</dependency>
<dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <scope>test</scope>
+ <groupId>com.lmax</groupId>
+ <artifactId>disruptor</artifactId>
</dependency>
<dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>test</scope>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
- <groupId>net.tirasa.connid.bundles.soap</groupId>
- <artifactId>wssample</artifactId>
- <type>war</type>
- <scope>test</scope>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>provided</scope>
</dependency>
- <!-- /TEST -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>jquery-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>codemirror</artifactId>
+ </dependency>
</dependencies>
<build>
<finalName>syncope-console</finalName>
<plugins>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>set-bundles</id>
- <phase>process-test-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
@@ -116,30 +106,27 @@ under the License.
<phase>process-resources</phase>
<configuration>
<target>
- <unzip src="${settings.localRepository}/org/activiti/activiti-webapp-explorer2/${activiti.version}/activiti-webapp-explorer2-${activiti.version}.war"
- dest="${project.build.directory}/activiti-webapp-explorer2"/>
+ <unzip src="${settings.localRepository}/org/activiti/activiti-webapp-explorer2/${activiti.version}/activiti-webapp-explorer2-${activiti.version}.war" dest="${project.build.directory}/activiti-webapp-explorer2" />
- <mkdir dir="${activiti-modeler.directory}"/>
+ <mkdir dir="${activiti-modeler.directory}" />
- <mkdir dir="${activiti-modeler.directory}/editor"/>
+ <mkdir dir="${activiti-modeler.directory}/editor" />
<copy todir="${activiti-modeler.directory}/editor">
<fileset dir="${project.build.directory}/activiti-webapp-explorer2/editor">
- <exclude name="oryx.js"/>
+ <exclude name="oryx.js" />
</fileset>
</copy>
- <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/plugins.xml"
- todir="${activiti-modeler.directory}/editor"/>
- <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/stencilset.json"
- todir="${activiti-modeler.directory}/editor"/>
+ <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/plugins.xml" todir="${activiti-modeler.directory}/editor" />
+ <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/stencilset.json" todir="${activiti-modeler.directory}/editor" />
- <mkdir dir="${activiti-modeler.directory}/explorer"/>
+ <mkdir dir="${activiti-modeler.directory}/explorer" />
<copy todir="${activiti-modeler.directory}/explorer">
- <fileset dir="${project.build.directory}/activiti-webapp-explorer2/explorer"/>
+ <fileset dir="${project.build.directory}/activiti-webapp-explorer2/explorer" />
</copy>
- <mkdir dir="${activiti-modeler.directory}/libs"/>
+ <mkdir dir="${activiti-modeler.directory}/libs" />
<copy todir="${activiti-modeler.directory}/libs">
- <fileset dir="${project.build.directory}/activiti-webapp-explorer2/libs"/>
+ <fileset dir="${project.build.directory}/activiti-webapp-explorer2/libs" />
</copy>
</target>
</configuration>
@@ -147,33 +134,6 @@ under the License.
<goal>run</goal>
</goals>
</execution>
- <execution>
- <id>setupTestWebapp</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <unzip src="${basedir}/../core/target/syncope.war" dest="${cargo.run.dir}"/>
- <copy file="${project.build.directory}/test-classes/db.jsp" todir="${cargo.run.dir}"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>setupCSV</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <copy file="${project.build.directory}/test-classes/test.csv"
- todir="${test.csvdir.path}"
- overwrite="true"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
</executions>
</plugin>
@@ -185,7 +145,7 @@ under the License.
<phase>process-resources</phase>
<goals>
<goal>replace</goal>
- </goals>
+ </goals>
</execution>
</executions>
<configuration>
@@ -197,61 +157,13 @@ under the License.
</plugin>
<plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
<inherited>true</inherited>
<configuration>
- <container>
- <dependencies>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- </dependency>
- </dependencies>
- </container>
- <configuration>
- <type>standalone</type>
- <properties>
- <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port>
- <cargo.tomcat.ajp.port>${cargo.tomcat.ajp.port}</cargo.tomcat.ajp.port>
- <cargo.rmi.port>${cargo.rmi.port}</cargo.rmi.port>
-
- <cargo.jvmargs>-noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
- </properties>
- </configuration>
- <deployables>
- <deployable>
- <location>${cargo.run.dir}</location>
- <properties>
- <context>syncope</context>
- </properties>
- </deployable>
- <deployable>
- <location>${project.build.directory}/${project.build.finalName}.war</location>
- <properties>
- <context>syncope-console</context>
- </properties>
- </deployable>
- <deployable>
- <groupId>net.tirasa.connid.bundles.soap</groupId>
- <artifactId>wssample</artifactId>
- <type>war</type>
- <properties>
- <context>wssample</context>
- </properties>
- </deployable>
- <deployable>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-build-tools</artifactId>
- <type>war</type>
- <properties>
- <context>syncope-build-tools</context>
- </properties>
- </deployable>
- </deployables>
+ <failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
-
</plugins>
<resources>
@@ -266,25 +178,99 @@ under the License.
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
- <testResource>
- <directory>../core/src/test/resources</directory>
- <filtering>true</filtering>
- </testResource>
</testResources>
</build>
-
+
<profiles>
<profile>
<id>embedded</id>
<properties>
<conf.directory>${project.build.directory}/test-classes</conf.directory>
- <skipTests>true</skipTests>
</properties>
+ <dependencies>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
<build>
- <defaultGoal>clean verify cargo:run</defaultGoal>
+ <defaultGoal>clean verify cargo:run</defaultGoal>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <id>setupEmbeddedConf</id>
+ <phase>package</phase>
+ <configuration>
+ <target>
+ <copy file="../core/target/test-classes/persistence.properties"
+ todir="../core/target/syncope/WEB-INF/classes"
+ overwrite="true"/>
+ <copy file="../core/target/test-classes/db.jsp"
+ todir="../core/target/syncope"
+ overwrite="true"/>
+
+ <copy file="${project.build.directory}/test-classes/console.properties"
+ todir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes"
+ overwrite="true"/>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <container>
+ <dependencies>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ </dependency>
+ </dependencies>
+ </container>
+ <configuration>
+ <type>standalone</type>
+ <properties>
+ <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port>
+ <cargo.tomcat.ajp.port>${cargo.tomcat.ajp.port}</cargo.tomcat.ajp.port>
+ <cargo.rmi.port>${cargo.rmi.port}</cargo.rmi.port>
+
+ <cargo.jvmargs>-noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
+ </properties>
+ </configuration>
+ <deployables>
+ <deployable>
+ <location>../core/target/syncope</location>
+ <properties>
+ <context>syncope</context>
+ </properties>
+ </deployable>
+ <deployable>
+ <location>${project.build.directory}/${project.build.finalName}</location>
+ <properties>
+ <context>syncope-console</context>
+ </properties>
+ </deployable>
+ </deployables>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
- </profile>
+ </profile>
</profiles>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/archetype/src/main/resources/archetype-resources/core/pom.xml
----------------------------------------------------------------------
diff --git a/archetype/src/main/resources/archetype-resources/core/pom.xml b/archetype/src/main/resources/archetype-resources/core/pom.xml
index a7434c0..0dac78f 100644
--- a/archetype/src/main/resources/archetype-resources/core/pom.xml
+++ b/archetype/src/main/resources/archetype-resources/core/pom.xml
@@ -27,242 +27,114 @@ under the License.
<version>${version}</version>
</parent>
- <name>Apache Syncope sample project core</name>
+ <name>Apache Syncope sample project - Core</name>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<packaging>war</packaging>
<dependencies>
-
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ </dependency>
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-common</artifactId>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>javax.servlet.jsp-api</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-common</artifactId>
- <classifier>javadoc</classifier>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
</dependency>
+
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-core</artifactId>
- <type>war</type>
+ <groupId>org.apache.syncope.core</groupId>
+ <artifactId>syncope-core-rest-cxf</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-core</artifactId>
- <classifier>classes</classifier>
+ <groupId>org.apache.syncope.core</groupId>
+ <artifactId>syncope-core-workflow-java</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.syncope.core</groupId>
+ <artifactId>syncope-core-persistence-jpa</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.syncope.core</groupId>
+ <artifactId>syncope-core-workflow-activiti</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
</dependency>
-
- <!-- TEST -->
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-client</artifactId>
- <scope>test</scope>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-build-tools</artifactId>
- <type>war</type>
- <scope>test</scope>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
</dependency>
<dependency>
- <groupId>net.tirasa.connid.bundles.soap</groupId>
- <artifactId>wssample</artifactId>
- <type>war</type>
- <scope>test</scope>
+ <groupId>com.lmax</groupId>
+ <artifactId>disruptor</artifactId>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>test</scope>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <scope>test</scope>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>jquery</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>jquery-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>highlightjs</artifactId>
</dependency>
- <!-- /TEST -->
</dependencies>
<build>
<finalName>syncope</finalName>
<plugins>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>set-bundles</id>
- <phase>process-test-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
+ <artifactId>maven-war-plugin</artifactId>
<inherited>true</inherited>
<configuration>
- <systemPropertyVariables>
- <jaxrsContentType>${jaxrs.content.type}</jaxrsContentType>
- </systemPropertyVariables>
+ <failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
- <executions>
- <execution>
- <id>verify</id>
- <goals>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
</plugin>
-
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>setupTestWebapp</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <unzip src="${project.build.directory}/${project.build.finalName}.war" dest="${cargo.run.dir}"/>
- <copy file="${project.build.directory}/test-classes/db.jsp" todir="${cargo.run.dir}"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>setupCSV</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <copy file="${project.build.directory}/test-classes/test.csv"
- todir="${test.csvdir.path}"
- overwrite="true"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <container>
- <dependencies>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- </dependency>
- </dependencies>
- </container>
- <configuration>
- <type>standalone</type>
- <properties>
- <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port>
- <cargo.jvmargs>-noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
- </properties>
- </configuration>
- <deployables>
- <deployable>
- <location>${cargo.run.dir}</location>
- <properties>
- <context>syncope</context>
- </properties>
- </deployable>
- <deployable>
- <groupId>net.tirasa.connid.bundles.soap</groupId>
- <artifactId>wssample</artifactId>
- <type>war</type>
- <properties>
- <context>wssample</context>
- </properties>
- </deployable>
- <deployable>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-build-tools</artifactId>
- <type>war</type>
- <properties>
- <context>syncope-build-tools</context>
- </properties>
- </deployable>
- </deployables>
- </configuration>
- <executions>
- <execution>
- <id>start-container</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- <configuration>
- <wait>false</wait>
- </configuration>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa-maven-plugin</artifactId>
+ <artifactId>maven-dependency-plugin</artifactId>
<inherited>true</inherited>
- <dependencies>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <version>${h2.version}</version>
- </dependency>
- </dependencies>
- <configuration>
- <persistenceXmlFile>${project.basedir}/src/main/resources/META-INF/spring-persistence.xml</persistenceXmlFile>
- <includes>org/apache/syncope/core/persistence/beans/**/*.class</includes>
- <connectionDriverName>org.springframework.jdbc.datasource.DriverManagerDataSource</connectionDriverName>
- <connectionProperties>
- driverClassName=org.h2.Driver,
- url=jdbc:h2:mem:syncopedb
- username=sa,
- password=
- </connectionProperties>
- </configuration>
<executions>
<execution>
- <id>enhancer</id>
- <phase>process-classes</phase>
+ <id>set-bundles</id>
+ <phase>process-test-resources</phase>
<goals>
- <goal>enhance</goal>
+ <goal>copy</goal>
</goals>
</execution>
</executions>
</plugin>
-
</plugins>
<resources>
@@ -279,44 +151,5 @@ under the License.
</testResource>
</testResources>
</build>
-
- <profiles>
- <profile>
- <id>debug</id>
-
- <properties>
- <skipTests>true</skipTests>
- </properties>
-
- <build>
- <defaultGoal>clean verify cargo:run</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <configuration>
- <properties>
- <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
- -noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
- </properties>
- </configuration>
- </configuration>
- <executions>
- <execution>
- <id>start-container</id>
- <phase>none</phase>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/archetype/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/archetype/src/main/resources/archetype-resources/pom.xml b/archetype/src/main/resources/archetype-resources/pom.xml
new file mode 100644
index 0000000..6b2029c
--- /dev/null
+++ b/archetype/src/main/resources/archetype-resources/pom.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.syncope</groupId>
+ <artifactId>syncope</artifactId>
+ <version xmlns="">2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <syncope.version xmlns="">2.0.0-SNAPSHOT</syncope.version>
+ <secretKey>${secretKey}</secretKey>
+ <anonymousKey>${anonymousKey}</anonymousKey>
+ </properties>
+
+ <name>Apache Syncope sample project</name>
+ <groupId>${groupId}</groupId>
+ <artifactId>${artifactId}</artifactId>
+ <version>${version}</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.syncope.core</groupId>
+ <artifactId>syncope-core-rest-cxf</artifactId>
+ <version>${syncope.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.syncope.core</groupId>
+ <artifactId>syncope-core-workflow-java</artifactId>
+ <version>${syncope.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.syncope.core</groupId>
+ <artifactId>syncope-core-persistence-jpa</artifactId>
+ <version>${syncope.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.syncope.core</groupId>
+ <artifactId>syncope-core-workflow-activiti</artifactId>
+ <version>${syncope.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.syncope.client</groupId>
+ <artifactId>syncope-client-console</artifactId>
+ <version>${syncope.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+
+ <!-- Disable legal check for generated projects: see SYNCOPE-84 -->
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>ianal-maven-plugin</artifactId>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <goals>
+ <goal>verify-legal-files</goal>
+ </goals>
+ <phase>none</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>none</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <modules>
+ <module>core</module>
+ <module>console</module>
+ </modules>
+
+</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/archetype/src/main/resources/meta-pom.xml
----------------------------------------------------------------------
diff --git a/archetype/src/main/resources/meta-pom.xml b/archetype/src/main/resources/meta-pom.xml
index 692da02..4ce00b3 100644
--- a/archetype/src/main/resources/meta-pom.xml
+++ b/archetype/src/main/resources/meta-pom.xml
@@ -44,86 +44,37 @@ under the License.
<dependencyManagement>
<dependencies>
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-common</artifactId>
+ <groupId>org.apache.syncope.core</groupId>
+ <artifactId>syncope-core-rest-cxf</artifactId>
<version>${syncope.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-common</artifactId>
- <version>${syncope.version}</version>
- <classifier>javadoc</classifier>
</dependency>
-
- <dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-client</artifactId>
- <version>${syncope.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-build-tools</artifactId>
- <version>${syncope.version}</version>
- <type>war</type>
- <scope>test</scope>
- </dependency>
-
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-core</artifactId>
+ <groupId>org.apache.syncope.core</groupId>
+ <artifactId>syncope-core-workflow-java</artifactId>
<version>${syncope.version}</version>
- <type>war</type>
- </dependency>
+ </dependency>
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-core</artifactId>
+ <groupId>org.apache.syncope.core</groupId>
+ <artifactId>syncope-core-persistence-jpa</artifactId>
<version>${syncope.version}</version>
- <classifier>classes</classifier>
- <scope>provided</scope>
- </dependency>
-
+ </dependency>
+
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-console</artifactId>
+ <groupId>org.apache.syncope.core</groupId>
+ <artifactId>syncope-core-workflow-activiti</artifactId>
<version>${syncope.version}</version>
- <type>war</type>
- </dependency>
+ </dependency>
+
<dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-console</artifactId>
+ <groupId>org.apache.syncope.client</groupId>
+ <artifactId>syncope-client-console</artifactId>
<version>${syncope.version}</version>
- <classifier>classes</classifier>
- <scope>provided</scope>
- </dependency>
+ </dependency>
</dependencies>
</dependencyManagement>
<build>
- <pluginManagement>
- <plugins>
- <!-- Disable LICENSE / NOTICE inclusion: see SYNCOPE-84 -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <inherited>false</inherited>
- <configuration>
- <webResources>
- <resource>
- <directory>src/main/webapp</directory>
- <includes>
- <include>**/*.jsp</include>
- </includes>
- <filtering>true</filtering>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
-
<!-- Disable legal check for generated projects: see SYNCOPE-84 -->
<plugins>
<plugin>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/LICENSE
----------------------------------------------------------------------
diff --git a/build-tools/LICENSE b/build-tools/LICENSE
deleted file mode 100644
index 63afdc2..0000000
--- a/build-tools/LICENSE
+++ /dev/null
@@ -1,737 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
-
-==
-
-For ANTLR (http://www.antlr.org/):
-This is licensed under the BSD license.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted
-provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this list of
- conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of
- conditions and the following disclaimer in the documentation and/or other materials
- provided with the distribution.
- * Neither the name of the author nor the names of its contributors may be used to
- endorse or promote products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==
-
-For AOP Alliance (http://aopalliance.sourceforge.net/):
-This is Public Domain.
-
-==
-
-For ConnId (http://connid.tirasa.net/):
-This is licensed under CDDL 1.0.
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that
-creates or contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the
-Original Software, prior Modifications used by a
-Contributor (if any), and the Modifications made by that
-particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or
-(b) Modifications, or (c) the combination of files
-containing Original Software with files containing
-Modifications, in each case including portions thereof.
-
-1.4. "Executable" means the Covered Software in any form
-other than Source Code.
-
-1.5. "Initial Developer" means the individual or entity
-that first makes Original Software available under this
-License.
-
-1.6. "Larger Work" means a work which combines Covered
-Software or portions thereof with code not governed by the
-terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the
-maximum extent possible, whether at the time of the initial
-grant or subsequently acquired, any and all of the rights
-conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable
-form of any of the following:
-
-A. Any file that results from an addition to,
-deletion from or modification of the contents of a
-file containing Original Software or previous
-Modifications;
-
-B. Any new file that contains any part of the
-Original Software or previous Modification; or
-
-C. Any new file that is contributed or otherwise made
-available under the terms of this License.
-
-1.10. "Original Software" means the Source Code and
-Executable form of computer software code that is
-originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned
-or hereafter acquired, including without limitation,
-method, process, and apparatus claims, in any patent
-Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer
-software code in which modifications are made and (b)
-associated documentation included in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal
-entity exercising rights under, and complying with all of
-the terms of, this License. For legal entities, "You"
-includes any entity which controls, is controlled by, or is
-under common control with You. For purposes of this
-definition, "control" means (a) the power, direct or
-indirect, to cause the direction or management of such
-entity, whether by contract or otherwise, or (b) ownership
-of more than fifty percent (50%) of the outstanding shares
-or beneficial ownership of such entity.
-
-2. License Grants.
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and
-subject to third party intellectual property claims, the
-Initial Developer hereby grants You a world-wide,
-royalty-free, non-exclusive license:
-
-(a) under intellectual property rights (other than
-patent or trademark) Licensable by Initial Developer,
-to use, reproduce, modify, display, perform,
-sublicense and distribute the Original Software (or
-portions thereof), with or without Modifications,
-and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making,
-using or selling of Original Software, to make, have
-made, use, practice, sell, and offer for sale, and/or
-otherwise dispose of the Original Software (or
-portions thereof).
-
-(c) The licenses granted in Sections 2.1(a) and (b)
-are effective on the date Initial Developer first
-distributes or otherwise makes the Original Software
-available to a third party under the terms of this
-License.
-
-(d) Notwithstanding Section 2.1(b) above, no patent
-license is granted: (1) for code that You delete from
-the Original Software, or (2) for infringements
-caused by: (i) the modification of the Original
-Software, or (ii) the combination of the Original
-Software with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and
-subject to third party intellectual property claims, each
-Contributor hereby grants You a world-wide, royalty-free,
-non-exclusive license:
-
-(a) under intellectual property rights (other than
-patent or trademark) Licensable by Contributor to
-use, reproduce, modify, display, perform, sublicense
-and distribute the Modifications created by such
-Contributor (or portions thereof), either on an
-unmodified basis, with other Modifications, as
-Covered Software and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making,
-using, or selling of Modifications made by that
-Contributor either alone and/or in combination with
-its Contributor Version (or portions of such
-combination), to make, use, sell, offer for sale,
-have made, and/or otherwise dispose of: (1)
-Modifications made by that Contributor (or portions
-thereof); and (2) the combination of Modifications
-made by that Contributor with its Contributor Version
-(or portions of such combination).
-
-(c) The licenses granted in Sections 2.2(a) and
-2.2(b) are effective on the date Contributor first
-distributes or otherwise makes the Modifications
-available to a third party.
-
-(d) Notwithstanding Section 2.2(b) above, no patent
-license is granted: (1) for any code that Contributor
-has deleted from the Contributor Version; (2) for
-infringements caused by: (i) third party
-modifications of Contributor Version, or (ii) the
-combination of Modifications made by that Contributor
-with other software (except as part of the
-Contributor Version) or other devices; or (3) under
-Patent Claims infringed by Covered Software in the
-absence of Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make
-available in Executable form must also be made available in
-Source Code form and that Source Code form must be
-distributed only under the terms of this License. You must
-include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or
-otherwise make available. You must inform recipients of any
-such Covered Software in Executable form as to how they can
-obtain such Covered Software in Source Code form in a
-reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You
-contribute are governed by the terms of this License. You
-represent that You believe Your Modifications are Your
-original creation(s) and/or You have sufficient rights to
-grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications
-that identifies You as the Contributor of the Modification.
-You may not remove or alter any copyright, patent or
-trademark notices contained within the Covered Software, or
-any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered
-Software in Source Code form that alters or restricts the
-applicable version of this License or the recipients'
-rights hereunder. You may choose to offer, and to charge a
-fee for, warranty, support, indemnity or liability
-obligations to one or more recipients of Covered Software.
-However, you may do so only on Your own behalf, and not on
-behalf of the Initial Developer or any Contributor. You
-must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by
-You alone, and You hereby agree to indemnify the Initial
-Developer and every Contributor for any liability incurred
-by the Initial Developer or such Contributor as a result of
-warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered
-Software under the terms of this License or under the terms
-of a license of Your choice, which may contain terms
-different from this License, provided that You are in
-compliance with the terms of this License and that the
-license for the Executable form does not attempt to limit
-or alter the recipient's rights in the Source Code form
-from the rights set forth in this License. If You
-distribute the Covered Software in Executable form under a
-different license, You must make it absolutely clear that
-any terms which differ from this License are offered by You
-alone, not by the Initial Developer or Contributor. You
-hereby agree to indemnify the Initial Developer and every
-Contributor for any liability incurred by the Initial
-Developer or such Contributor as a result of any such terms
-You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software
-with other code not governed by the terms of this License
-and distribute the Larger Work as a single product. In such
-a case, You must make sure the requirements of this License
-are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and
-may publish revised and/or new versions of this License
-from time to time. Each version will be given a
-distinguishing version number. Except as provided in
-Section 4.3, no one other than the license steward has the
-right to modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise
-make the Covered Software available under the terms of the
-version of the License under which You originally received
-the Covered Software. If the Initial Developer includes a
-notice in the Original Software prohibiting it from being
-distributed or otherwise made available under any
-subsequent version of the License, You must distribute and
-make the Covered Software available under the terms of the
-version of the License under which You originally received
-the Covered Software. Otherwise, You may also choose to
-use, distribute or otherwise make the Covered Software
-available under the terms of any subsequent version of the
-License published by the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a
-new license for Your Original Software, You may create and
-use a modified version of this License if You: (a) rename
-the license and remove any references to the name of the
-license steward (except to note that the license differs
-from this License); and (b) otherwise make it clear that
-the license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
-BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
-PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY
-COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
-INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF
-ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
-DISCLAIMER.
-
-6. TERMINATION.
-
-6.1. This License and the rights granted hereunder will
-terminate automatically if You fail to comply with terms
-herein and fail to cure such breach within 30 days of
-becoming aware of the breach. Provisions which, by their
-nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding
-declaratory judgment actions) against Initial Developer or
-a Contributor (the Initial Developer or Contributor against
-whom You assert such claim is referred to as "Participant")
-alleging that the Participant Software (meaning the
-Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the
-Initial Developer) directly or indirectly infringes any
-patent, then any and all rights granted directly or
-indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant)
-and all Contributors under Sections 2.1 and/or 2.2 of this
-License shall, upon 60 days notice from Participant
-terminate prospectively and automatically at the expiration
-of such 60 day notice period, unless if within such 60 day
-period You withdraw Your claim with respect to the
-Participant Software against such Participant either
-unilaterally or pursuant to a written agreement with
-Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2
-above, all end user licenses that have been validly granted
-by You or any distributor hereunder prior to termination
-(excluding licenses granted to You by any distributor)
-shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
-INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
-LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
-CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
-STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
-INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
-APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
-NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
-CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
-APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is
-defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
-computer software" (as that term is defined at 48 C.F.R. $
-252.227-7014(a)(1)) and "commercial computer software
-documentation" as such terms are used in 48 C.F.R. 12.212 (Sept.
-1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
-through 227.7202-4 (June 1995), all U.S. Government End Users
-acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes,
-any other FAR, DFAR, or other clause or provision that addresses
-Government rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject
-matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the
-extent necessary to make it enforceable. This License shall be
-governed by the law of the jurisdiction specified in a notice
-contained within the Original Software (except to the extent
-applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation
-relating to this License shall be subject to the jurisdiction of
-the courts located in the jurisdiction and venue specified in a
-notice contained within the Original Software, with the losing
-party responsible for costs, including, without limitation, court
-costs and reasonable attorneys' fees and expenses. The
-application of the United Nations Convention on Contracts for the
-International Sale of Goods is expressly excluded. Any law or
-regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the
-United States export administration regulations (and the export
-control laws and regulation of any other countries) when You use,
-distribute or otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or
-indirectly, out of its utilization of rights under this License
-and You agree to work with Initial Developer and Contributors to
-distribute such responsibility on an equitable basis. Nothing
-herein is intended or shall be deemed to constitute any admission
-of liability.
-
-==
-
-For dom4j (http://dom4j.sourceforge.net/):
-This is licensed under BSD style license.
-
-Redistribution and use of this software and associated documentation
-("Software"), with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain copyright
- statements and notices. Redistributions must also contain a
- copy of this document.
-
-2. Redistributions in binary form must reproduce the
- above copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
-3. The name "DOM4J" must not be used to endorse or promote
- products derived from this Software without prior written
- permission of MetaStuff, Ltd. For written permission,
- please contact dom4j-info@metastuff.com.
-
-4. Products derived from this Software may not be called "DOM4J"
- nor may "DOM4J" appear in their names without prior written
- permission of MetaStuff, Ltd. DOM4J is a registered
- trademark of MetaStuff, Ltd.
-
-5. Due credit should be given to the DOM4J Project -
- http://dom4j.sourceforge.net
-
-THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==
-
-For Groovy (http://groovy.codehaus.org/):
-This is licensed under the AL 2.0, see above.
-
-==
-
-For Spring Framework (http://projects.spring.io/spring-framework/)
-and Spring Security (http://projects.spring.io/spring-security/):
-These are licensed under the AL 2.0, see above.
-
-==
-
-For Simple Logging Facade for Java - SLF4J (http://www.slf4j.org/):
-This is licensed under the MIT license.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-==
-
-For XPP3 (http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/):
-This is licensed under the Indiana University Extreme! Lab Software License, version 1.1.1.
-
-Indiana University Extreme! Lab Software License
-Version 1.1.1
-Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation and/or
-other materials provided with the distribution.
-3. The end-user documentation included with the redistribution, if any, must
-include the following acknowledgment:
-"This product includes software developed by the Indiana University Extreme! Lab
-(http://www.extreme.indiana.edu/)."
-Alternately, this acknowledgment may appear in the software itself, if and
-wherever such third-party acknowledgments normally appear.
-4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab" must not
-be used to endorse or promote products derived from this software without prior
-written permission. For written permission, please contact
-http://www.extreme.indiana.edu/.
-5. Products derived from this software may not use "Indiana Univeristy" name nor
-may "Indiana Univeristy" appear in their name, without prior written permission
-of the Indiana University.
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS,
-COPYRIGHT HOLDERS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/NOTICE
----------------------------------------------------------------------
diff --git a/build-tools/NOTICE b/build-tools/NOTICE
deleted file mode 100644
index 6d3619e..0000000
--- a/build-tools/NOTICE
+++ /dev/null
@@ -1,52 +0,0 @@
-Apache Syncope
-Copyright 2012-2015 The Apache Software Foundation
-
-This product includes software developed by:
-The Apache Software Foundation (http://www.apache.org/).
-
-The following copyright notice(s) were affixed to portions of this code
-with which this file is now or was at one time distributed.
-
-==
-
-This product includes software developed by the ANTLR Project.
-Copyright (c) 2012 Terence Parr and Sam Harwell
-All rights reserved.
-
-==
-
-This product includes software developed by the AOP Alliance (Java/J2EE AOP standards).
-
-==
-
-This product includes software developed by Tirasa (http://www.tirasa.net)
-Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved.
-Copyright 2011-2015 Tirasa S.r.l. All rights reserved.
-This software is included in binary form only.
-
-==
-
-This product includes software developed by the dom4j Project.
-Copyright 2001-2010 (C) MetaStuff, Ltd.
-All Rights Reserved.
-
-==
-
-This product includes software developed by the Groovy project.
-
-==
-
-This products includes software developed by SLF4J (http://www.slf4j.org)
-Copyright (c) 2004-2013 QOS.ch.
-
-==
-
-This product includes software developed by SpringSource
-Copyright (c) 2004-2015 SpringSource
-All rights reserved.
-
-==
-
-This product includes software developed by the Indiana University Extreme! Lab.
-Copyright (c) 2002 Extreme! Lab, Indiana University.
-All rights reserved.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/pom.xml
----------------------------------------------------------------------
diff --git a/build-tools/pom.xml b/build-tools/pom.xml
deleted file mode 100644
index 1ea51ce..0000000
--- a/build-tools/pom.xml
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- </parent>
-
- <name>Apache Syncope Build Tools</name>
- <description>Apache Syncope Build Tools</description>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-build-tools</artifactId>
- <packaging>war</packaging>
-
- <distributionManagement>
- <site>
- <id>syncope.website</id>
- <name>Apache Syncope website</name>
- <url>${site.deploymentBaseUrl}/${project.artifactId}</url>
- </site>
- </distributionManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.directory.server</groupId>
- <artifactId>apacheds-all</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-jdbc</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>net.tirasa.connid</groupId>
- <artifactId>connector-framework</artifactId>
- </dependency>
- <dependency>
- <groupId>net.tirasa.connid</groupId>
- <artifactId>connector-framework-internal</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-all</artifactId>
- </dependency>
-
- <dependency>
- <groupId>net.tirasa.connid.bundles.db</groupId>
- <artifactId>net.tirasa.connid.bundles.db.table</artifactId>
- <version>${connid.db.table.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.5.6</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.5.6</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- <version>1.5.6</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <webResources>
- <resource>
- <directory>src/main/webapp</directory>
- <includes>
- <include>WEB-INF/web.xml</include>
- </includes>
- <filtering>true</filtering>
- </resource>
- <resource>
- <directory>${project.build.outputDirectory}</directory>
- <includes>
- <include>META-INF/DEPENDENCIES*</include>
- </includes>
- </resource>
- <resource>
- <directory>${basedir}</directory>
- <targetPath>META-INF</targetPath>
- <includes>
- <include>LICENSE</include>
- <include>NOTICE</include>
- </includes>
- </resource>
- </webResources>
- <packagingExcludes>WEB-INF/classes/META-INF/LICENSE*,WEB-INF/classes/META-INF/NOTICE*,WEB-INF/classes/META-INF/DEPENDENCIES*</packagingExcludes>
- <archive>
- <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <container>
- <dependencies>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- </dependency>
- </dependencies>
- </container>
- <configuration>
- <properties>
- <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port>
- </properties>
- </configuration>
- <deployables>
- <deployable>
- <location>${project.build.directory}/syncope-build-tools-${project.version}.war</location>
- <properties>
- <context>syncope-build-tools</context>
- </properties>
- </deployable>
- </deployables>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <executions>
- <execution>
- <id>bundle-manifest</id>
- <phase>process-classes</phase>
- <goals>
- <goal>manifest</goal>
- </goals>
- <configuration>
- <instructions>
- <Bundle-Name>${project.name}</Bundle-Name>
- <Bundle-SymbolicName>org.apache.syncope.buildtools</Bundle-SymbolicName>
- <Bundle-Version>${project.version}</Bundle-Version>
- <Export-Package>
- org.apache.syncope.buildtools*;version=${project.version};-split-package:=merge-first
- </Export-Package>
- <Import-Package>
- javax.naming*,
- javax.servlet*,
- javax.sql,
- org.springframework*;version="[3,4)",
- org.apache.directory*;version="[0.9,2)";resolution:=optional,
- org.h2.tools;version="[1.3,2)";resolution:=optional,
- org.slf4j;resolution:=optional
- </Import-Package>
- </instructions>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
-
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- <resource>
- <directory>..</directory>
- <targetPath>META-INF</targetPath>
- <includes>
- <include>LICENSE</include>
- <include>NOTICE</include>
- </includes>
- </resource>
- </resources>
- </build>
-
-</project>
[47/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java
new file mode 100644
index 0000000..2bb802f
--- /dev/null
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.cli;
+
+import com.beust.jcommander.JCommander;
+import com.beust.jcommander.ParameterException;
+import org.apache.syncope.client.cli.commands.ConfigurationCommand;
+import org.apache.syncope.client.cli.commands.EntitlementCommand;
+import org.apache.syncope.client.cli.commands.LoggerCommand;
+import org.apache.syncope.client.cli.commands.NotificationCommand;
+import org.apache.syncope.client.cli.commands.PolicyCommand;
+import org.apache.syncope.client.cli.commands.ReportCommand;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SyncopeAdm {
+
+ private static final Logger LOG = LoggerFactory.getLogger(SyncopeAdm.class);
+
+ private static final String helpMessage = "Usage: Main [options]\n"
+ + " Options:\n"
+ + " logger --help \n"
+ + " config --help \n"
+ + " notification --help \n"
+ + " report --help \n"
+ + " policy --help \n"
+ + " entitlement --help \n";
+
+ private static final JCommander jcommander = new JCommander();
+
+ private static LoggerCommand loggerCommand;
+
+ private static ConfigurationCommand configurationCommand;
+
+ private static NotificationCommand notificationCommand;
+
+ private static ReportCommand reportCommand;
+
+ private static PolicyCommand policyCommand;
+
+ private static EntitlementCommand entitlementCommand;
+
+ public static void main(final String[] args) {
+ LOG.debug("Starting with args \n");
+
+ for (final String arg : args) {
+ LOG.debug("Arg: {}", arg);
+ }
+
+ instantiateCommands();
+
+ if (args.length == 0) {
+ System.out.println(helpMessage);
+ } else {
+ try {
+ jcommander.parse(args);
+ } catch (final ParameterException ioe) {
+ System.out.println(helpMessage);
+ LOG.error("Parameter exception", ioe);
+ }
+ executeCommand();
+ }
+
+ }
+
+ private static void instantiateCommands() {
+ LOG.debug("Init JCommander");
+ loggerCommand = new LoggerCommand();
+ jcommander.addCommand(loggerCommand);
+ LOG.debug("Added LoggerCommand");
+ configurationCommand = new ConfigurationCommand();
+ jcommander.addCommand(configurationCommand);
+ LOG.debug("Added ConfigurationCommand");
+ notificationCommand = new NotificationCommand();
+ jcommander.addCommand(notificationCommand);
+ LOG.debug("Added NotificationCommand");
+ reportCommand = new ReportCommand();
+ jcommander.addCommand(reportCommand);
+ LOG.debug("Added ReportCommand");
+ policyCommand = new PolicyCommand();
+ jcommander.addCommand(policyCommand);
+ LOG.debug("Added PolicyCommand");
+ entitlementCommand = new EntitlementCommand();
+ jcommander.addCommand(entitlementCommand);
+ LOG.debug("Added EntitlementCommand");
+ }
+
+ private static void executeCommand() {
+ final String command = jcommander.getParsedCommand();
+
+ LOG.debug("Called command {}", command);
+
+ if ("logger".equalsIgnoreCase(command)) {
+ loggerCommand.execute();
+ } else if ("config".equalsIgnoreCase(command)) {
+ configurationCommand.execute();
+ } else if ("notification".equalsIgnoreCase(command)) {
+ notificationCommand.execute();
+ } else if ("report".equalsIgnoreCase(command)) {
+ reportCommand.execute();
+ } else if ("policy".equalsIgnoreCase(command)) {
+ policyCommand.execute();
+ } else if ("entitlement".equalsIgnoreCase(command)) {
+ entitlementCommand.execute();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java
new file mode 100644
index 0000000..26ce276
--- /dev/null
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.cli;
+
+import java.util.ResourceBundle;
+import org.apache.syncope.client.lib.SyncopeClient;
+import org.apache.syncope.client.lib.SyncopeClientFactoryBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public final class SyncopeServices {
+
+ private static final Logger LOG = LoggerFactory.getLogger(SyncopeServices.class);
+
+ private final static ResourceBundle SYNCOPE_PROPS = ResourceBundle.getBundle("syncope");
+
+ private static final SyncopeClient CLIENT = new SyncopeClientFactoryBean()
+ .setAddress(SYNCOPE_PROPS.getString("syncope.rest.services"))
+ .create(SYNCOPE_PROPS.getString("syncope.user"), SYNCOPE_PROPS.getString("syncope.password"));
+
+ public static <T> T get(final Class<T> claz) {
+ LOG.debug("Creting service for {}", claz.getName());
+ return CLIENT.getService(claz);
+ }
+
+ private SyncopeServices() {
+ // private constructor for static utility class
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/src/main/java/org/apache/syncope/client/cli/commands/AbstractCommand.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/AbstractCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/AbstractCommand.java
new file mode 100644
index 0000000..a6753bf
--- /dev/null
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/AbstractCommand.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.cli.commands;
+
+import com.beust.jcommander.Parameter;
+
+public abstract class AbstractCommand {
+
+ @Parameter(names = {"-h", "--help"})
+ protected boolean help = false;
+
+ @Parameter(names = {"-l", "--list"})
+ protected boolean list = false;
+
+ protected abstract void execute();
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/src/main/java/org/apache/syncope/client/cli/commands/ConfigurationCommand.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/ConfigurationCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/ConfigurationCommand.java
new file mode 100644
index 0000000..4ca94d0
--- /dev/null
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/ConfigurationCommand.java
@@ -0,0 +1,209 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.cli.commands;
+
+import com.beust.jcommander.DynamicParameter;
+import com.beust.jcommander.Parameter;
+import com.beust.jcommander.Parameters;
+import java.io.IOException;
+import java.io.SequenceInputStream;
+import java.util.HashMap;
+import java.util.Map;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.cli.SyncopeServices;
+import org.apache.syncope.client.cli.util.XmlUtils;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.ConfTO;
+import org.apache.syncope.common.rest.api.service.ConfigurationService;
+import org.apache.syncope.common.rest.api.service.SyncopeService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xml.sax.SAXException;
+
+@Parameters(
+ commandNames = "config",
+ optionPrefixes = "-",
+ separators = "=",
+ commandDescription = "Apache Syncope configuration service")
+public class ConfigurationCommand extends AbstractCommand {
+
+ private static final Logger LOG = LoggerFactory.getLogger(ConfigurationCommand.class);
+
+ private static final String EXPORT_FILE_NAME = "/content.xml";
+
+ private final String helpMessage = "Usage: config [options]\n"
+ + " Options:\n"
+ + " -h, --help \n"
+ + " -l, --list \n"
+ + " -r, --read \n"
+ + " Syntax: -r={CONF-NAME} \n"
+ + " -u, --update \n"
+ + " Syntax: {CONF-NAME}={CONF-VALUE} \n"
+ + " -c, --create \n"
+ + " Syntax: {CONF-NAME}={CONF-VALUE} \n"
+ + " -d, --delete \n"
+ + " Syntax: -d={CONF-NAME}"
+ + " -v, --validators \n"
+ + " -mt, --mail-templates \n"
+ + " -e, --export \n"
+ + " Syntax: -e={WHERE-DIR} \n";
+
+ @Parameter(names = { "-r", "--read" })
+ public String confNameToRead;
+
+ @DynamicParameter(names = { "-u", "--update" })
+ private final Map<String, String> updateConf = new HashMap<String, String>();
+
+ @DynamicParameter(names = { "-c", "--create" })
+ private final Map<String, String> createConf = new HashMap<String, String>();
+
+ @Parameter(names = { "-d", "--delete" })
+ public String confNameToDelete;
+
+ @Parameter(names = { "-v", "--validators" })
+ public boolean validators = false;
+
+ @Parameter(names = { "-mt", "--mail-templates" })
+ public boolean mailTemplates = false;
+
+ @Parameter(names = { "-e", "--export" })
+ public String export;
+
+ @Override
+ public void execute() {
+ final SyncopeService syncopeService = SyncopeServices.get(SyncopeService.class);
+ final ConfigurationService configurationService = SyncopeServices.get(ConfigurationService.class);
+
+ LOG.debug("Logger service successfully created");
+
+ if (help) {
+ LOG.debug("- configuration help command");
+ System.out.println(helpMessage);
+ } else if (list) {
+ LOG.debug("- configuration list command");
+ try {
+ final ConfTO confTO = configurationService.list();
+ for (final AttrTO attrTO : confTO.getPlainAttrMap().values()) {
+ System.out.println(" - Conf " + attrTO.getSchema() + " has value(s) " + attrTO.getValues()
+ + " - readonly: " + attrTO.isReadonly());
+ }
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (StringUtils.isNotBlank(confNameToRead)) {
+ LOG.debug("- configuration read {} command", confNameToRead);
+ try {
+ final AttrTO attrTO = configurationService.read(confNameToRead);
+ System.out.println(" - Conf " + attrTO.getSchema() + " has value(s) " + attrTO.getValues()
+ + " - readonly: " + attrTO.isReadonly());
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (!updateConf.isEmpty()) {
+ LOG.debug("- configuration update command with params {}", updateConf);
+ try {
+ for (final Map.Entry<String, String> entrySet : updateConf.entrySet()) {
+ final AttrTO attrTO = configurationService.read(entrySet.getKey());
+ attrTO.getValues().clear();
+ attrTO.getValues().add(entrySet.getValue());
+ configurationService.set(entrySet.getKey(), attrTO);
+ System.out.println(" - Conf " + attrTO.getSchema() + " has value(s) " + attrTO.getValues()
+ + " - readonly: " + attrTO.isReadonly());
+ }
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (!createConf.isEmpty()) {
+ LOG.debug("- configuration create command with params {}", createConf);
+ try {
+ for (final Map.Entry<String, String> entrySet : createConf.entrySet()) {
+ final AttrTO attrTO = new AttrTO();
+ attrTO.setSchema(entrySet.getKey());
+ attrTO.getValues().add(entrySet.getValue());
+ configurationService.set(entrySet.getKey(), attrTO);
+ System.out.println(" - Conf " + attrTO.getSchema() + " created with value(s) " + attrTO.getValues()
+ + " - readonly: " + attrTO.isReadonly());
+ }
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (StringUtils.isNotBlank(confNameToDelete)) {
+ try {
+ LOG.debug("- configuration delete {} command", confNameToDelete);
+ configurationService.delete(confNameToDelete);
+ System.out.println(" - Conf " + confNameToDelete + " deleted!");
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (validators) {
+ LOG.debug("- configuration validators command");
+ try {
+ System.out.println("Conf validator class: ");
+ for (final String validator : syncopeService.info().getValidators()) {
+ System.out.println(" *** " + validator);
+ }
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (mailTemplates) {
+ LOG.debug("- configuration mailTemplates command");
+ try {
+ System.out.println("Conf mail template for:");
+ for (final String mailTemplate : syncopeService.info().getMailTemplates()) {
+ System.out.println(" *** " + mailTemplate);
+ }
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (StringUtils.isNotBlank(export)) {
+ LOG.debug("- configuration export command, directory where xml will be export: {}", export);
+
+ try {
+ XmlUtils.createXMLFile((SequenceInputStream) configurationService.export().getEntity(), export
+ + EXPORT_FILE_NAME);
+ System.out.println(" - " + export + EXPORT_FILE_NAME + " successfully created");
+ } catch (final IOException ex) {
+ LOG.error("Error creating content.xml file in {} directory", export, ex);
+ System.out.println(" - Error creating " + export + EXPORT_FILE_NAME + " " + ex.getMessage());
+ } catch (final ParserConfigurationException ex) {
+ LOG.error("Error creating content.xml file in {} directory", export, ex);
+ System.out.println(" - Error creating " + export + EXPORT_FILE_NAME + " " + ex.getMessage());
+ } catch (final SAXException ex) {
+ LOG.error("Error creating content.xml file in {} directory", export, ex);
+ System.out.println(" - Error creating " + export + EXPORT_FILE_NAME + " " + ex.getMessage());
+ } catch (final TransformerConfigurationException ex) {
+ LOG.error("Error creating content.xml file in {} directory", export, ex);
+ System.out.println(" - Error creating " + export + EXPORT_FILE_NAME + " " + ex.getMessage());
+ } catch (final TransformerException ex) {
+ LOG.error("Error creating content.xml file in {} directory", export, ex);
+ System.out.println(" - Error creating " + export + EXPORT_FILE_NAME + " " + ex.getMessage());
+ } catch (final SyncopeClientException ex) {
+ LOG.error("Error calling configuration service", ex);
+ System.out.println(" - Error calling configuration service " + ex.getMessage());
+ }
+ } else {
+ System.out.println(helpMessage);
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/src/main/java/org/apache/syncope/client/cli/commands/EntitlementCommand.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/EntitlementCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/EntitlementCommand.java
new file mode 100644
index 0000000..e0058ab
--- /dev/null
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/EntitlementCommand.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.cli.commands;
+
+import com.beust.jcommander.Parameter;
+import com.beust.jcommander.Parameters;
+import org.apache.syncope.client.cli.SyncopeServices;
+import org.apache.syncope.common.lib.wrap.EntitlementTO;
+import org.apache.syncope.common.rest.api.service.EntitlementService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Parameters(
+ commandNames = "entitlement",
+ optionPrefixes = "-",
+ separators = "=",
+ commandDescription = "Apache Syncope entitlement service")
+public class EntitlementCommand extends AbstractCommand {
+
+ private static final Logger LOG = LoggerFactory.getLogger(EntitlementCommand.class);
+
+ private final String helpMessage = "Usage: entitlement [options]\n"
+ + " Options:\n"
+ + " -h, --help \n"
+ + " -l, --list \n"
+ + " -lo, --list-own \n";
+
+ @Parameter(names = { "-lo", "--list-own" })
+ public boolean listOwn = false;
+
+ @Override
+ public void execute() {
+ final EntitlementService entitlementService = SyncopeServices.get(EntitlementService.class);
+ LOG.debug("Entitlement service successfully created");
+
+ if (help) {
+ LOG.debug("- entitlement help command");
+ System.out.println(helpMessage);
+ } else if (list) {
+ System.out.println("All entitlement:");
+ for (final EntitlementTO entitlementTO : entitlementService.getAllEntitlements()) {
+ System.out.println(" *** " + entitlementTO.getElement());
+ }
+ } else if (listOwn) {
+ System.out.println("All own entitlement:");
+ for (final EntitlementTO entitlementTO : entitlementService.getOwnEntitlements()) {
+ System.out.println(" *** " + entitlementTO.getElement());
+ }
+ } else {
+ System.out.println(helpMessage);
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/src/main/java/org/apache/syncope/client/cli/commands/LoggerCommand.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/LoggerCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/LoggerCommand.java
new file mode 100644
index 0000000..e5115d9
--- /dev/null
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/LoggerCommand.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.cli.commands;
+
+import com.beust.jcommander.DynamicParameter;
+import com.beust.jcommander.Parameter;
+import com.beust.jcommander.Parameters;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.cli.SyncopeServices;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.types.LoggerLevel;
+import org.apache.syncope.common.lib.types.LoggerType;
+import org.apache.syncope.common.rest.api.service.LoggerService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Parameters(
+ commandNames = "logger",
+ optionPrefixes = "-",
+ separators = "=",
+ commandDescription = "Apache Syncope logger service")
+public class LoggerCommand extends AbstractCommand {
+
+ private static final Logger LOG = LoggerFactory.getLogger(LoggerCommand.class);
+
+ private final String helpMessage = "Usage: logger [options]\n"
+ + " Options:\n"
+ + " -h, --help \n"
+ + " -l, --list \n"
+ + " -r, --read \n"
+ + " Syntax: -r={LOG-NAME} \n"
+ + " -u, --update \n"
+ + " Syntax: {LOG-NAME}={LOG-LEVEL} \n"
+ + " -ua, --update-all \n"
+ + " Syntax: -ua={LOG-LEVEL} \n"
+ + " -c, --create \n"
+ + " Syntax: {LOG-NAME}={LOG-LEVEL} \n"
+ + " -d, --delete \n"
+ + " Syntax: -d={LOG-NAME}";
+
+ @Parameter(names = { "-r", "--read" })
+ public String logNameToRead;
+
+ @DynamicParameter(names = { "-u", "--update" })
+ private final Map<String, String> updateLogs = new HashMap<String, String>();
+
+ @Parameter(names = { "-ua", "--update-all" })
+ public String logLevel;
+
+ @DynamicParameter(names = { "-c", "--create" })
+ private final Map<String, String> createLogs = new HashMap<String, String>();
+
+ @Parameter(names = { "-d", "--delete" })
+ public String logNameToDelete;
+
+ @Override
+ public void execute() {
+ final LoggerService loggerService = SyncopeServices.get(LoggerService.class);
+
+ LOG.debug("Logger service successfully created");
+
+ if (help) {
+ LOG.debug("- logger help command");
+ System.out.println(helpMessage);
+ } else if (list) {
+ LOG.debug("- logger list command");
+ try {
+ for (final LoggerTO loggerTO : loggerService.list(LoggerType.LOG)) {
+ System.out.println(" - " + loggerTO.getKey() + " -> " + loggerTO.getLevel());
+ }
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (StringUtils.isNotBlank(logNameToRead)) {
+ LOG.debug("- logger read {} command", logNameToRead);
+ try {
+ final LoggerTO loggerTO = loggerService.read(LoggerType.LOG, logNameToRead);
+ System.out.println(" - Logger " + loggerTO.getKey() + " with level -> " + loggerTO.getLevel());
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (!updateLogs.isEmpty()) {
+ LOG.debug("- logger update command with params {}", updateLogs);
+
+ for (final Map.Entry<String, String> log : updateLogs.entrySet()) {
+ final LoggerTO loggerTO = loggerService.read(LoggerType.LOG, log.getKey());
+ try {
+ loggerTO.setLevel(LoggerLevel.valueOf(log.getValue()));
+ loggerService.update(LoggerType.LOG, loggerTO.getKey(), loggerTO);
+ System.out.println(" - Logger " + loggerTO.getKey() + " new level -> " + loggerTO.getLevel());
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ } catch (final IllegalArgumentException ex) {
+ System.out.println(" - Error: " + log.getValue() + " isn't a valid logger level, try with:");
+ for (final LoggerLevel level : LoggerLevel.values()) {
+ System.out.println(" *** " + level.name());
+ }
+ }
+ }
+ } else if (StringUtils.isNotBlank(logLevel)) {
+ LOG.debug("- logger update all command with level {}", logLevel);
+ for (final LoggerTO loggerTO : loggerService.list(LoggerType.LOG)) {
+ try {
+ loggerTO.setLevel(LoggerLevel.valueOf(logLevel));
+ loggerService.update(LoggerType.LOG, loggerTO.getKey(), loggerTO);
+ System.out.println(" - Logger " + loggerTO.getKey() + " new level -> " + loggerTO.getLevel());
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ } catch (final IllegalArgumentException ex) {
+ System.out.println(" - Error: " + loggerTO.getLevel() + " isn't a valid logger level, try with:");
+ for (final LoggerLevel level : LoggerLevel.values()) {
+ System.out.println(" *** " + level.name());
+ }
+ }
+ }
+ } else if (!createLogs.isEmpty()) {
+ LOG.debug("- logger create command with params {}", createLogs);
+
+ for (final Map.Entry<String, String> entrySet : createLogs.entrySet()) {
+ final LoggerTO loggerTO = new LoggerTO();
+ try {
+ loggerTO.setKey(entrySet.getKey());
+ loggerTO.setLevel(LoggerLevel.valueOf(entrySet.getValue()));
+ loggerService.update(LoggerType.LOG, loggerTO.getKey(), loggerTO);
+ System.out.println(" - Logger " + loggerTO.getKey() + " created with level -> " + loggerTO.
+ getLevel());
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ } catch (final IllegalArgumentException ex) {
+ System.out.println(" - Error: " + loggerTO.getLevel() + " isn't a valid logger level, try with:");
+ for (final LoggerLevel level : LoggerLevel.values()) {
+ System.out.println(" *** " + level.name());
+ }
+ }
+ }
+ } else if (StringUtils.isNotBlank(logNameToDelete)) {
+ try {
+ LOG.debug("- logger delete {} command", logNameToDelete);
+ loggerService.delete(LoggerType.LOG, logNameToDelete);
+ System.out.println(" - Logger " + logNameToDelete + " deleted!");
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else {
+ System.out.println(helpMessage);
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/src/main/java/org/apache/syncope/client/cli/commands/NotificationCommand.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/NotificationCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/NotificationCommand.java
new file mode 100644
index 0000000..4e18996
--- /dev/null
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/NotificationCommand.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.cli.commands;
+
+import com.beust.jcommander.Parameter;
+import com.beust.jcommander.Parameters;
+import org.apache.syncope.client.cli.SyncopeServices;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.NotificationTO;
+import org.apache.syncope.common.rest.api.service.NotificationService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Parameters(
+ commandNames = "notification",
+ optionPrefixes = "-",
+ separators = "=",
+ commandDescription = "Apache Syncope notification service")
+public class NotificationCommand extends AbstractCommand {
+
+ private static final Logger LOG = LoggerFactory.getLogger(NotificationCommand.class);
+
+ private final String helpMessage = "Usage: notification [options]\n"
+ + " Options:\n"
+ + " -h, --help \n"
+ + " -l, --list \n"
+ + " -r, --read \n"
+ + " Syntax: -r={NOTIFICATION-ID} \n"
+ + " -d, --delete \n"
+ + " Syntax: -d={NOTIFICATION-ID}";
+
+ @Parameter(names = { "-r", "--read" })
+ public Long notificationIdToRead = -1L;
+
+ @Parameter(names = { "-d", "--delete" })
+ public Long notificationIdToDelete = -1L;
+
+ @Override
+ public void execute() {
+ final NotificationService notificationService = SyncopeServices.get(NotificationService.class);
+
+ LOG.debug("Notification service successfully created");
+
+ if (help) {
+ LOG.debug("- notification help command");
+ System.out.println(helpMessage);
+ } else if (list) {
+ LOG.debug("- notification list command");
+ try {
+ for (final NotificationTO notificationTO : notificationService.list()) {
+ System.out.println(notificationTO);
+ }
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (notificationIdToRead > -1L) {
+ LOG.debug("- notification read {} command", notificationIdToRead);
+ try {
+ System.out.println(notificationService.read(notificationIdToRead));
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (notificationIdToDelete > -1L) {
+ try {
+ LOG.debug("- notification delete {} command", notificationIdToDelete);
+ notificationService.delete(notificationIdToDelete);
+ System.out.println(" - Notification " + notificationIdToDelete + " deleted!");
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else {
+ System.out.println(helpMessage);
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/src/main/java/org/apache/syncope/client/cli/commands/PolicyCommand.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/PolicyCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/PolicyCommand.java
new file mode 100644
index 0000000..c2bcb5f
--- /dev/null
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/PolicyCommand.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.cli.commands;
+
+import com.beust.jcommander.Parameter;
+import com.beust.jcommander.Parameters;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.cli.SyncopeServices;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AbstractPolicyTO;
+import org.apache.syncope.common.lib.types.PolicyType;
+import org.apache.syncope.common.rest.api.service.PolicyService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Parameters(
+ commandNames = "policy",
+ optionPrefixes = "-",
+ separators = "=",
+ commandDescription = "Apache Syncope policy service")
+public class PolicyCommand extends AbstractCommand {
+
+ private static final Logger LOG = LoggerFactory.getLogger(PolicyCommand.class);
+
+ private final String helpMessage = "Usage: policy [options]\n"
+ + " Options:\n"
+ + " -h, --help \n"
+ + " -l, --list \n"
+ + " -ll, --list-policy \n"
+ + " Syntax: -ll={POLICY-TYPE} \n"
+ + " -r, --read \n"
+ + " Syntax: -r={POLICY-ID} \n"
+ + " -d, --delete \n"
+ + " Syntax: -d={POLICY-ID}";
+
+ @Parameter(names = { "-ll", "--list-policy" })
+ public String policyType;
+
+ @Parameter(names = { "-r", "--read" })
+ public Long policyIdToRead = -1L;
+
+ @Parameter(names = { "-d", "--delete" })
+ public Long policyIdToDelete = -1L;
+
+ @Override
+ public void execute() {
+ final PolicyService policyService = SyncopeServices.get(PolicyService.class);
+ LOG.debug("Policy service successfully created");
+
+ if (help) {
+ LOG.debug("- policy help command");
+ System.out.println(helpMessage);
+ } else if (list) {
+
+ } else if (StringUtils.isNotBlank(policyType)) {
+ LOG.debug("- policy list command for type {}", policyType);
+ try {
+ for (final AbstractPolicyTO policyTO : policyService.list(PolicyType.valueOf(policyType))) {
+ System.out.println(policyTO);
+ }
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ } catch (final IllegalArgumentException ex) {
+ System.out.println(" - Error: " + policyType + " isn't a valid policy type, try with:");
+ for (final PolicyType type : PolicyType.values()) {
+ System.out.println(" *** " + type.name() + ": " + type.getDescription());
+ }
+ }
+ } else if (policyIdToRead > -1L) {
+ LOG.debug("- policy read {} command", policyIdToRead);
+ try {
+ System.out.println(policyService.read(policyIdToRead));
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (policyIdToDelete > -1L) {
+ try {
+ LOG.debug("- policy delete {} command", policyIdToDelete);
+ policyService.delete(policyIdToDelete);
+ System.out.println(" - Report " + policyIdToDelete + " deleted!");
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else {
+ System.out.println(helpMessage);
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/src/main/java/org/apache/syncope/client/cli/commands/ReportCommand.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/ReportCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/ReportCommand.java
new file mode 100644
index 0000000..17f0e14
--- /dev/null
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/ReportCommand.java
@@ -0,0 +1,193 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.cli.commands;
+
+import com.beust.jcommander.Parameter;
+import com.beust.jcommander.Parameters;
+import java.io.IOException;
+import java.io.SequenceInputStream;
+import java.util.List;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import org.apache.syncope.client.cli.SyncopeServices;
+import org.apache.syncope.client.cli.util.XmlUtils;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.ReportExecTO;
+import org.apache.syncope.common.lib.to.ReportTO;
+import org.apache.syncope.common.lib.types.ReportExecExportFormat;
+import org.apache.syncope.common.lib.wrap.ReportletConfClass;
+import org.apache.syncope.common.rest.api.service.ReportService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xml.sax.SAXException;
+
+@Parameters(
+ commandNames = "report",
+ optionPrefixes = "-",
+ separators = "=",
+ commandDescription = "Apache Syncope report service")
+public class ReportCommand extends AbstractCommand {
+
+ private static final Logger LOG = LoggerFactory.getLogger(ReportCommand.class);
+
+ private final String helpMessage = "Usage: report [options]\n"
+ + " Options:\n"
+ + " -h, --help \n"
+ + " -l, --list \n"
+ + " -r, --read \n"
+ + " Syntax: -r={POLICY-ID} \n"
+ + " -d, --delete \n"
+ + " Syntax: -d={POLICY-ID} \n"
+ + " -e, --execute \n"
+ + " Syntax: -e={POLICY-ID} \n"
+ + " -re, --read-executecution \n"
+ + " Syntax: -re={EXECUTION-ID} \n"
+ + " -de, --delete-executecution \n"
+ + " Syntax: -de={EXECUTION-ID} \n"
+ + " -eer, --export-executecution-result \n"
+ + " Syntax: -eer={EXECUTION-ID} \n"
+ + " -rc, --reportlet-class";
+
+ @Parameter(names = { "-r", "--read" })
+ public Long reportIdToRead = -1L;
+
+ @Parameter(names = { "-d", "--delete" })
+ public Long reportIdToDelete = -1L;
+
+ @Parameter(names = { "-e", "--execute" })
+ public Long reportIdToExecute = -1L;
+
+ @Parameter(names = { "-re", "--read-execution" })
+ public Long executionIdToRead = -1L;
+
+ @Parameter(names = { "-de", "--delete-execution" })
+ public Long executionIdToDelete = -1L;
+
+ @Parameter(names = { "-eer", "--export-execution-result" })
+ public Long exportId = -1L;
+
+ @Parameter(names = { "-rc", "--reportlet-class" })
+ public boolean reportletClass = false;
+
+ @Override
+ public void execute() {
+ final ReportService reportService = SyncopeServices.get(ReportService.class);
+ LOG.debug("Report service successfully created");
+
+ if (help) {
+ LOG.debug("- report help command");
+ System.out.println(helpMessage);
+ } else if (list) {
+ LOG.debug("- report list command");
+ try {
+ for (final ReportTO reportTO : reportService.list().getResult()) {
+ System.out.println(reportTO);
+ }
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (reportIdToRead > -1L) {
+ LOG.debug("- report read {} command", reportIdToRead);
+ try {
+ System.out.println(reportService.read(reportIdToRead));
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (reportIdToDelete > -1L) {
+ try {
+ LOG.debug("- report delete {} command", reportIdToDelete);
+ reportService.delete(reportIdToDelete);
+ System.out.println(" - Report " + reportIdToDelete + " deleted!");
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (reportIdToExecute > -1L) {
+ try {
+ LOG.debug("- report execute {} command", reportIdToExecute);
+ reportService.execute(reportIdToExecute);
+ final List<ReportExecTO> executionList = reportService.read(reportIdToExecute).getExecutions();
+ final ReportExecTO lastExecution = executionList.get(executionList.size() - 1);
+ System.out.println(" - Report execution id: " + lastExecution.getKey());
+ System.out.println(" - Report execution status: " + lastExecution.getStatus());
+ System.out.println(" - Report execution start date: " + lastExecution.getStartDate());
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (executionIdToRead > -1L) {
+ try {
+ LOG.debug("- report execution read {} command", executionIdToRead);
+ ReportExecTO reportExecTO = reportService.readExecution(executionIdToRead);
+ System.out.println(" - Report execution id: " + reportExecTO.getKey());
+ System.out.println(" - Report execution status: " + reportExecTO.getStatus());
+ System.out.println(" - Report execution start date: " + reportExecTO.getStartDate());
+ System.out.println(" - Report execution end date: " + reportExecTO.getEndDate());
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (executionIdToDelete > -1L) {
+ try {
+ LOG.debug("- report execution delete {} command", executionIdToDelete);
+ reportService.deleteExecution(executionIdToDelete);
+ System.out.println(" - Report execution " + executionIdToDelete + "successfyllt deleted!");
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else if (exportId > -1L) {
+ LOG.debug("- report export command for report: {}", exportId);
+
+ try {
+ XmlUtils.createXMLFile((SequenceInputStream) reportService.exportExecutionResult(exportId,
+ ReportExecExportFormat.XML).getEntity(), "export_" + exportId + ".xml");
+ System.out.println(" - " + "export_" + exportId + " successfully created");
+ } catch (final IOException ex) {
+ LOG.error("Error creating xml file", ex);
+ System.out.println(" - Error creating " + "export_" + exportId + " " + ex.getMessage());
+ } catch (final ParserConfigurationException ex) {
+ LOG.error("Error creating xml file", ex);
+ System.out.println(" - Error creating " + "export_" + exportId + " " + ex.getMessage());
+ } catch (final SAXException ex) {
+ LOG.error("Error creating xml file", ex);
+ System.out.println(" - Error creating " + "export_" + exportId + " " + ex.getMessage());
+ } catch (final TransformerConfigurationException ex) {
+ LOG.error("Error creating xml file", ex);
+ System.out.println(" - Error creating " + "export_" + exportId + " " + ex.getMessage());
+ } catch (final TransformerException ex) {
+ LOG.error("Error creating xml file", ex);
+ System.out.println(" - Error creating export_" + exportId + " " + ex.getMessage());
+ } catch (final SyncopeClientException ex) {
+ LOG.error("Error calling configuration service", ex);
+ System.out.println(" - Error calling configuration service " + ex.getMessage());
+ }
+ } else if (reportletClass) {
+ try {
+ LOG.debug("- reportlet configuration class list command");
+ System.out.println("Reportlet conf classes");
+ for (final ReportletConfClass reportletConfClass : reportService.getReportletConfClasses()) {
+ System.out.println(" *** " + reportletConfClass.getElement());
+ }
+ } catch (final SyncopeClientException ex) {
+ System.out.println(" - Error: " + ex.getMessage());
+ }
+ } else {
+ System.out.println(helpMessage);
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/src/main/java/org/apache/syncope/client/cli/util/XmlUtils.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/util/XmlUtils.java b/client/cli/src/main/java/org/apache/syncope/client/cli/util/XmlUtils.java
new file mode 100644
index 0000000..fa228d5
--- /dev/null
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/util/XmlUtils.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.cli.util;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.SequenceInputStream;
+import java.io.StringReader;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import org.apache.cxf.helpers.IOUtils;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+public class XmlUtils {
+
+ public static void createXMLFile(final SequenceInputStream sis, final String filePath)
+ throws TransformerConfigurationException, TransformerException, SAXException, IOException,
+ ParserConfigurationException {
+
+ TransformerFactory.newInstance().newTransformer()
+ .transform(new DOMSource(DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(
+ new InputSource(new StringReader(IOUtils.toString(sis))))),
+ new StreamResult(new File(filePath)));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/src/main/java/org/apache/syncope/client/cli/validators/DebugLevelValidator.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/validators/DebugLevelValidator.java b/client/cli/src/main/java/org/apache/syncope/client/cli/validators/DebugLevelValidator.java
new file mode 100644
index 0000000..58c12f3
--- /dev/null
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/validators/DebugLevelValidator.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.cli.validators;
+
+import com.beust.jcommander.IParameterValidator;
+import com.beust.jcommander.ParameterException;
+
+public class DebugLevelValidator implements IParameterValidator {
+
+ @Override
+ public void validate(final String name, final String value) throws ParameterException {
+ if (!Levels.contains(value)) {
+ final StringBuilder exceptionMessage = new StringBuilder();
+ exceptionMessage.append("Parameter ")
+ .append(name)
+ .append(" should be :\n");
+ for (final Levels l : Levels.values()) {
+ exceptionMessage.append(l).append("\n");
+ }
+ System.out.println(">>>> " + exceptionMessage.toString());
+ }
+ }
+
+ private enum Levels {
+
+ OFF,
+ FATAL,
+ ERROR,
+ WARN,
+ INFO,
+ DEBUG,
+ TRACE,
+ ALL;
+
+ public static boolean contains(final String name) {
+ for (final Levels c : Levels.values()) {
+ if (c.name().equals(name)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/src/main/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/client/cli/src/main/resources/log4j2.xml b/client/cli/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..0688f6b
--- /dev/null
+++ b/client/cli/src/main/resources/log4j2.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<configuration status="WARN">
+
+ <appenders>
+
+ <RollingRandomAccessFile name="main" fileName="${log.directory}/cli.log"
+ filePattern="${log.directory}/cli-%d{yyyy-MM-dd}.log.gz"
+ immediateFlush="false" append="true">
+ <PatternLayout>
+ <pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern>
+ </PatternLayout>
+ <Policies>
+ <TimeBasedTriggeringPolicy/>
+ <SizeBasedTriggeringPolicy size="250 MB"/>
+ </Policies>
+ </RollingRandomAccessFile>
+
+ </appenders>
+
+ <loggers>
+
+ <asyncLogger name="com.beust" additivity="false" level="DEBUG">
+ <appender-ref ref="main"/>
+ </asyncLogger>
+
+ <asyncLogger name="org.apache.syncope.cli" additivity="false" level="DEBUG">
+ <appender-ref ref="main"/>
+ </asyncLogger>
+
+ <asyncLogger name="org.apache.syncope.client" additivity="false" level="OFF">
+ <appender-ref ref="main"/>
+ </asyncLogger>
+
+ <root level="DEBUG">
+ <appender-ref ref="main"/>
+ </root>
+
+ </loggers>
+
+</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/src/main/resources/syncope.properties
----------------------------------------------------------------------
diff --git a/client/cli/src/main/resources/syncope.properties b/client/cli/src/main/resources/syncope.properties
new file mode 100644
index 0000000..9f84a72
--- /dev/null
+++ b/client/cli/src/main/resources/syncope.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+syncope.rest.services=http://localhost:9080/syncope/rest/
+syncope.user=admin
+syncope.password=password
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/pom.xml
----------------------------------------------------------------------
diff --git a/client/console/pom.xml b/client/console/pom.xml
new file mode 100644
index 0000000..35185f1
--- /dev/null
+++ b/client/console/pom.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.syncope</groupId>
+ <artifactId>syncope-client</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>Apache Syncope Client Console</name>
+ <description>Apache Syncope Client Console</description>
+ <groupId>org.apache.syncope.client</groupId>
+ <artifactId>syncope-client-console</artifactId>
+ <packaging>jar</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket</artifactId>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket-extensions</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket-datetime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket-spring</artifactId>
+ <!-- exclude spring framework that wicket pulls in -->
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket-auth-roles</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.syncope.client</groupId>
+ <artifactId>syncope-client-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/BinaryPreview.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/BinaryPreview.java b/client/console/src/main/java/org/apache/syncope/client/console/BinaryPreview.java
new file mode 100644
index 0000000..c499d60
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/BinaryPreview.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface BinaryPreview {
+
+ public String[] mimeTypes() default {};
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/ExtensionPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/ExtensionPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/ExtensionPanel.java
new file mode 100644
index 0000000..5574926
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/ExtensionPanel.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface ExtensionPanel {
+
+ public String value();
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/SyncopeApplication.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeApplication.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeApplication.java
new file mode 100644
index 0000000..ac44d43
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeApplication.java
@@ -0,0 +1,306 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console;
+
+import java.io.Serializable;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.XMLRolesReader;
+import org.apache.syncope.client.console.pages.Configuration;
+import org.apache.syncope.client.console.pages.InfoModalPage;
+import org.apache.syncope.client.console.pages.Login;
+import org.apache.syncope.client.console.pages.Logout;
+import org.apache.syncope.client.console.pages.Reports;
+import org.apache.syncope.client.console.pages.Resources;
+import org.apache.syncope.client.console.pages.Roles;
+import org.apache.syncope.client.console.pages.Schema;
+import org.apache.syncope.client.console.pages.Tasks;
+import org.apache.syncope.client.console.pages.Todo;
+import org.apache.syncope.client.console.pages.UserSelfModalPage;
+import org.apache.syncope.client.console.pages.Users;
+import org.apache.syncope.client.console.pages.WelcomePage;
+import org.apache.syncope.client.console.resources.FilesystemResource;
+import org.apache.syncope.client.console.resources.WorkflowDefGETResource;
+import org.apache.syncope.client.console.resources.WorkflowDefPUTResource;
+import org.apache.syncope.client.console.rest.UserSelfRestClient;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.RestartResponseAtInterceptPageException;
+import org.apache.wicket.Session;
+import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authorization.IUnauthorizedComponentInstantiationListener;
+import org.apache.wicket.authorization.UnauthorizedInstantiationException;
+import org.apache.wicket.authroles.authorization.strategies.role.IRoleCheckingStrategy;
+import org.apache.wicket.authroles.authorization.strategies.role.RoleAuthorizationStrategy;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.request.Request;
+import org.apache.wicket.request.Response;
+import org.apache.wicket.request.resource.ContextRelativeResource;
+import org.apache.wicket.request.resource.IResource;
+import org.apache.wicket.request.resource.ResourceReference;
+import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ * SyncopeApplication class.
+ */
+public class SyncopeApplication
+ extends WebApplication
+ implements IUnauthorizedComponentInstantiationListener, IRoleCheckingStrategy, Serializable {
+
+ private static final long serialVersionUID = -2920378752291913495L;
+
+ public static final String IMG_PREFIX = "/img/menu/";
+
+ public static final String IMG_NOTSEL = "notsel/";
+
+ private static final String ACTIVITI_MODELER_CONTEXT = "activiti-modeler";
+
+ private static final int EDIT_PROFILE_WIN_HEIGHT = 550;
+
+ private static final int EDIT_PROFILE_WIN_WIDTH = 800;
+
+ @Override
+ protected void init() {
+ super.init();
+
+ getComponentInstantiationListeners().add(new SpringComponentInjector(this));
+
+ getResourceSettings().setThrowExceptionOnMissingResource(true);
+
+ getSecuritySettings().setAuthorizationStrategy(new RoleAuthorizationStrategy(this));
+ getSecuritySettings().setUnauthorizedComponentInstantiationListener(this);
+
+ getMarkupSettings().setStripWicketTags(true);
+ getMarkupSettings().setCompressWhitespace(true);
+
+ getRequestCycleListeners().add(new SyncopeRequestCycleListener());
+
+ final String activitiModelerDirectory = WebApplicationContextUtils.getWebApplicationContext(
+ WebApplication.get().getServletContext()).getBean("activitiModelerDirectory", String.class);
+ mountResource("/" + ACTIVITI_MODELER_CONTEXT, new ResourceReference(ACTIVITI_MODELER_CONTEXT) {
+
+ private static final long serialVersionUID = -128426276529456602L;
+
+ @Override
+ public IResource getResource() {
+ return new FilesystemResource(ACTIVITI_MODELER_CONTEXT, activitiModelerDirectory);
+ }
+
+ });
+ mountResource("/workflowDefGET", new ResourceReference("workflowDefGET") {
+
+ private static final long serialVersionUID = -128426276529456602L;
+
+ @Override
+ public IResource getResource() {
+ return new WorkflowDefGETResource();
+ }
+ });
+ mountResource("/workflowDefPUT", new ResourceReference("workflowDefPUT") {
+
+ private static final long serialVersionUID = -128426276529456602L;
+
+ @Override
+ public IResource getResource() {
+ return new WorkflowDefPUTResource();
+ }
+ });
+ }
+
+ public void setupNavigationPanel(final WebPage page, final XMLRolesReader xmlRolesReader, final boolean notsel) {
+ final ModalWindow infoModal = new ModalWindow("infoModal");
+ page.add(infoModal);
+ infoModal.setInitialWidth(350);
+ infoModal.setInitialHeight(300);
+ infoModal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ infoModal.setCookieName("infoModal");
+ infoModal.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new InfoModalPage();
+ }
+ });
+
+ final AjaxLink<Page> infoLink = new AjaxLink<Page>("infoLink") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ infoModal.show(target);
+ }
+ };
+ page.add(infoLink);
+
+ BookmarkablePageLink<Page> schemaLink = new BookmarkablePageLink<>("schema", Schema.class);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ schemaLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Schema", "list"));
+ page.add(schemaLink);
+ schemaLink.add(new Image("schemaIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : StringUtils.EMPTY) + "schema" + Constants.PNG_EXT)));
+
+ BookmarkablePageLink<Page> usersLink = new BookmarkablePageLink<>("users", Users.class);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ usersLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Users", "list"));
+ page.add(usersLink);
+ usersLink.add(new Image("usersIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : StringUtils.EMPTY) + "users" + Constants.PNG_EXT)));
+
+ BookmarkablePageLink<Page> rolesLink = new BookmarkablePageLink<>("roles", Roles.class);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ rolesLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Roles", "list"));
+ page.add(rolesLink);
+ rolesLink.add(new Image("rolesIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : StringUtils.EMPTY) + "roles" + Constants.PNG_EXT)));
+
+ BookmarkablePageLink<Page> resourcesLink = new BookmarkablePageLink<>("resources", Resources.class);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ resourcesLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Resources", "list"));
+ page.add(resourcesLink);
+ resourcesLink.add(new Image("resourcesIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : StringUtils.EMPTY) + "resources" + Constants.PNG_EXT)));
+
+ BookmarkablePageLink<Page> todoLink = new BookmarkablePageLink<>("todo", Todo.class);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ todoLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Approval", "list"));
+ page.add(todoLink);
+ todoLink.add(new Image("todoIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : StringUtils.EMPTY) + "todo" + Constants.PNG_EXT)));
+
+ BookmarkablePageLink<Page> reportLink = new BookmarkablePageLink<>("reports", Reports.class);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ reportLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Reports", "list"));
+ page.add(reportLink);
+ reportLink.add(new Image("reportsIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : StringUtils.EMPTY) + "reports" + Constants.PNG_EXT)));
+
+ BookmarkablePageLink<Page> configurationLink = new BookmarkablePageLink<>("configuration",
+ Configuration.class);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ configurationLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Configuration", "list"));
+ page.add(configurationLink);
+ configurationLink.add(new Image("configurationIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : StringUtils.EMPTY) + "configuration" + Constants.PNG_EXT)));
+
+ BookmarkablePageLink<Page> taskLink = new BookmarkablePageLink<>("tasks", Tasks.class);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ taskLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Tasks", "list"));
+ page.add(taskLink);
+ taskLink.add(new Image("tasksIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : StringUtils.EMPTY) + "tasks" + Constants.PNG_EXT)));
+
+ page.add(new BookmarkablePageLink<Page>("logout", Logout.class));
+ }
+
+ public void setupEditProfileModal(final WebPage page, final UserSelfRestClient userSelfRestClient) {
+ // Modal window for editing user profile
+ final ModalWindow editProfileModalWin = new ModalWindow("editProfileModal");
+ editProfileModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editProfileModalWin.setInitialHeight(EDIT_PROFILE_WIN_HEIGHT);
+ editProfileModalWin.setInitialWidth(EDIT_PROFILE_WIN_WIDTH);
+ editProfileModalWin.setCookieName("edit-profile-modal");
+ page.add(editProfileModalWin);
+
+ final AjaxLink<Page> editProfileLink = new AjaxLink<Page>("editProfileLink") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ final UserTO userTO;
+ if (SyncopeSession.get().isAuthenticated()) {
+ try {
+ userTO = userSelfRestClient.read();
+ } catch (Exception e) {
+ throw new WicketRuntimeException(e);
+ }
+ } else {
+ userTO = new UserTO();
+ }
+
+ editProfileModalWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new UserSelfModalPage(page.getPageReference(), editProfileModalWin, userTO);
+ }
+ });
+
+ editProfileModalWin.show(target);
+ }
+ };
+
+ editProfileLink.add(new Label("username", SyncopeSession.get().getUsername()));
+
+ if ("admin".equals(SyncopeSession.get().getUsername())) {
+ editProfileLink.setEnabled(false);
+ }
+
+ page.add(editProfileLink);
+ }
+
+ @Override
+ public Session newSession(final Request request, final Response response) {
+ return new SyncopeSession(request);
+ }
+
+ @Override
+ public Class<? extends Page> getHomePage() {
+ return SyncopeSession.get().isAuthenticated() ? WelcomePage.class : Login.class;
+ }
+
+ @Override
+ public void onUnauthorizedInstantiation(final Component component) {
+ SyncopeSession.get().invalidate();
+
+ if (component instanceof Page) {
+ throw new UnauthorizedInstantiationException(component.getClass());
+ }
+
+ throw new RestartResponseAtInterceptPageException(Login.class);
+ }
+
+ @Override
+ public boolean hasAnyRole(final org.apache.wicket.authroles.authorization.strategies.role.Roles roles) {
+ return SyncopeSession.get().hasAnyRole(roles);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/SyncopeRequestCycleListener.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeRequestCycleListener.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeRequestCycleListener.java
new file mode 100644
index 0000000..8b27260
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeRequestCycleListener.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console;
+
+import java.security.AccessControlException;
+import javax.ws.rs.BadRequestException;
+import javax.xml.ws.WebServiceException;
+import org.apache.syncope.client.console.pages.ErrorPage;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.wicket.Page;
+import org.apache.wicket.authorization.UnauthorizedInstantiationException;
+import org.apache.wicket.core.request.handler.PageProvider;
+import org.apache.wicket.core.request.handler.RenderPageRequestHandler;
+import org.apache.wicket.markup.html.pages.ExceptionErrorPage;
+import org.apache.wicket.model.StringResourceModel;
+import org.apache.wicket.protocol.http.PageExpiredException;
+import org.apache.wicket.request.IRequestHandler;
+import org.apache.wicket.request.cycle.AbstractRequestCycleListener;
+import org.apache.wicket.request.cycle.RequestCycle;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SyncopeRequestCycleListener extends AbstractRequestCycleListener {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(SyncopeRequestCycleListener.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IRequestHandler onException(final RequestCycle cycle, final Exception e) {
+ LOG.error("Exception found", e);
+
+ PageParameters errorParameters = new PageParameters();
+ errorParameters.add("errorTitle", new StringResourceModel("alert", null).getString());
+
+ final Page errorPage;
+ if (e instanceof UnauthorizedInstantiationException) {
+ errorParameters.add("errorMessage",
+ new StringResourceModel("unauthorizedInstantiationException", null).getString());
+
+ errorPage = new ErrorPage(errorParameters);
+ } else if (e.getCause() instanceof AccessControlException) {
+ errorParameters.add("errorMessage", new StringResourceModel("accessControlException", null).getString());
+
+ errorPage = new ErrorPage(errorParameters);
+ } else if (e instanceof PageExpiredException || !(SyncopeSession.get()).isAuthenticated()) {
+ errorParameters.add("errorMessage", new StringResourceModel("pageExpiredException", null).getString());
+
+ errorPage = new ErrorPage(errorParameters);
+ } else if (e.getCause() instanceof BadRequestException || e.getCause() instanceof WebServiceException
+ || e.getCause() instanceof SyncopeClientException) {
+
+ errorParameters.add("errorMessage", new StringResourceModel("restClientException", null).getString());
+
+ errorPage = new ErrorPage(errorParameters);
+ } else {
+ // redirect to default Wicket error page
+ errorPage = new ExceptionErrorPage(e, null);
+ }
+
+ return new RenderPageRequestHandler(new PageProvider(errorPage));
+ }
+}
[03/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/ActionTableCheckGroup.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/ActionTableCheckGroup.java b/console/src/main/java/org/apache/syncope/console/commons/ActionTableCheckGroup.java
deleted file mode 100644
index 54730e3..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/ActionTableCheckGroup.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import java.util.Collection;
-import org.apache.wicket.markup.html.form.CheckGroup;
-import org.apache.wicket.model.IModel;
-
-public class ActionTableCheckGroup<T> extends CheckGroup<T> {
-
- private static final long serialVersionUID = 1288270558573401394L;
-
- public ActionTableCheckGroup(final String id, final Collection<T> collection) {
- super(id, collection);
- }
-
- public ActionTableCheckGroup(final String id, final IModel<Collection<T>> model) {
- super(id, model);
- }
-
- public boolean isCheckable(final T element) {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/AttrLayoutType.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/AttrLayoutType.java b/console/src/main/java/org/apache/syncope/console/commons/AttrLayoutType.java
deleted file mode 100644
index 3e5f9db..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/AttrLayoutType.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.syncope.common.types.AttributableType;
-
-public enum AttrLayoutType {
-
- ADMIN_USER("admin.user.layout", Mode.ADMIN, AttributableType.USER),
- SELF_USER("self.user.layout", Mode.SELF, AttributableType.USER),
- ADMIN_ROLE("admin.role.layout", Mode.ADMIN, AttributableType.ROLE),
- SELF_ROLE("self.role.layout", Mode.SELF, AttributableType.ROLE),
- ADMIN_MEMBERSHIP("admin.membership.layout", Mode.ADMIN, AttributableType.MEMBERSHIP),
- SELF_MEMBERSHIP("self.membership.layout", Mode.SELF, AttributableType.MEMBERSHIP);
-
- private final String confKey;
-
- private final Mode mode;
-
- private final AttributableType attrType;
-
- AttrLayoutType(final String confKey, final Mode mode, final AttributableType attrType) {
- this.confKey = confKey;
- this.mode = mode;
- this.attrType = attrType;
- }
-
- public String getConfKey() {
- return confKey;
- }
-
- public Mode getMode() {
- return mode;
- }
-
- public AttributableType getAttrType() {
- return attrType;
- }
-
- public static List<String> confKeys() {
- List<String> confKeys = new ArrayList<String>();
- for (AttrLayoutType value : values()) {
- confKeys.add(value.getConfKey());
- }
-
- return confKeys;
- }
-
- public static AttrLayoutType valueOf(final Mode mode, final AttributableType attrType) {
- AttrLayoutType result = null;
- if (mode == Mode.ADMIN) {
- switch (attrType) {
- case USER:
- result = ADMIN_USER;
- break;
-
- case MEMBERSHIP:
- result = ADMIN_MEMBERSHIP;
- break;
-
- case ROLE:
- result = ADMIN_ROLE;
- break;
-
- default:
- }
- } else if (mode == Mode.SELF) {
- switch (attrType) {
- case USER:
- result = SELF_USER;
- break;
-
- case MEMBERSHIP:
- result = SELF_MEMBERSHIP;
- break;
-
- case ROLE:
- result = SELF_ROLE;
- break;
-
- default:
- }
- }
-
- return result;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/AttributableDataProvider.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/AttributableDataProvider.java b/console/src/main/java/org/apache/syncope/console/commons/AttributableDataProvider.java
deleted file mode 100644
index 66062d0..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/AttributableDataProvider.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import org.apache.syncope.common.to.AbstractAttributableTO;
-import org.apache.syncope.console.rest.AbstractSubjectRestClient;
-import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
-import org.apache.wicket.model.CompoundPropertyModel;
-import org.apache.wicket.model.IModel;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AttributableDataProvider extends SortableDataProvider<AbstractAttributableTO, String> {
-
- private static final long serialVersionUID = 6267494272884913376L;
-
- private static final Logger LOG = LoggerFactory.getLogger(AttributableDataProvider.class);
-
- private final SortableAttributableProviderComparator comparator;
-
- private String fiql = null;
-
- private final int paginatorRows;
-
- private final boolean filtered;
-
- private final AbstractSubjectRestClient restClient;
-
- public AttributableDataProvider(final AbstractSubjectRestClient restClient,
- final int paginatorRows, final boolean filtered) {
-
- super();
-
- this.restClient = restClient;
- this.filtered = filtered;
- this.paginatorRows = paginatorRows;
-
- // default sorting
- setSort("id", SortOrder.ASCENDING);
-
- this.comparator = new SortableAttributableProviderComparator(this);
- }
-
- public void setFIQL(final String fiql) {
- this.fiql = fiql;
- }
-
- @Override
- public Iterator<? extends AbstractAttributableTO> iterator(final long first, final long count) {
- List<? extends AbstractAttributableTO> result;
-
- final int page = ((int) first / paginatorRows);
-
- if (filtered) {
- result = fiql == null
- ? Collections.<AbstractAttributableTO>emptyList()
- : restClient.search(fiql, (page < 0 ? 0 : page) + 1, paginatorRows, getSort());
- } else {
- result = restClient.list((page < 0 ? 0 : page) + 1, paginatorRows, getSort());
- }
-
- Collections.sort(result, comparator);
- return result.iterator();
- }
-
- @Override
- public long size() {
- long result;
-
- if (filtered) {
- result = fiql == null
- ? 0
- : restClient.searchCount(fiql);
- } else {
- result = restClient.count();
- }
-
- return result;
- }
-
- @Override
- public IModel<AbstractAttributableTO> model(final AbstractAttributableTO object) {
- return new CompoundPropertyModel<AbstractAttributableTO>(object);
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/CloseOnESCBehavior.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/CloseOnESCBehavior.java b/console/src/main/java/org/apache/syncope/console/commons/CloseOnESCBehavior.java
deleted file mode 100644
index 4055408..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/CloseOnESCBehavior.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import org.apache.wicket.Component;
-import org.apache.wicket.ajax.AjaxEventBehavior;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.attributes.AjaxCallListener;
-import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-
-public class CloseOnESCBehavior extends AjaxEventBehavior {
-
- private static final long serialVersionUID = 5826308247642534260L;
-
- public CloseOnESCBehavior(String event) {
- super(event);
- }
-
- @Override
- protected void onEvent(final AjaxRequestTarget target) {
- ModalWindow.closeCurrent(target);
- }
-
- @Override
- protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
- super.updateAjaxAttributes(attributes);
-
- attributes.getAjaxCallListeners().add(new AjaxCallListener() {
- private static final long serialVersionUID = 7160235486520935153L;
-
- @Override
- public CharSequence getPrecondition(final Component aComponent) {
- return " if(Wicket.Event.keyCode(attrs.event) != 27){return false;}";
- }
- });
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/ConnIdAttribute.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/ConnIdAttribute.java b/console/src/main/java/org/apache/syncope/console/commons/ConnIdAttribute.java
deleted file mode 100644
index d0e275b..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/ConnIdAttribute.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-public final class ConnIdAttribute {
-
- public static final String ENABLE = "__ENABLE__";
-
- public static final String NAME = "__NAME__";
-
- public static final String UID = "__UID__";
-
- public static final String PASSWORD = "__PASSWORD__";
-
- private ConnIdAttribute() {
- // private constructor for static utility class
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/ConnIdSpecialAttributeName.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/ConnIdSpecialAttributeName.java b/console/src/main/java/org/apache/syncope/console/commons/ConnIdSpecialAttributeName.java
deleted file mode 100644
index 4207b2b..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/ConnIdSpecialAttributeName.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-public final class ConnIdSpecialAttributeName {
-
- public static final String ENABLE = "__ENABLE__";
-
- public static final String NAME = "__NAME__";
-
- public static final String UID = "__UID__";
-
- public static final String PASSWORD = "__PASSWORD__";
-
- private ConnIdSpecialAttributeName() {
- // private constructor for static utility class
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/Constants.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/Constants.java b/console/src/main/java/org/apache/syncope/console/commons/Constants.java
deleted file mode 100644
index 92f8d77..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/Constants.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-public final class Constants {
-
- public static final String ON_CLICK = "onclick";
-
- public static final String ON_CHANGE = "onchange";
-
- public static final String ON_BLUR = "onblur";
-
- public static final String PNG_EXT = ".png";
-
- public static final String FEEDBACK = "feedback";
-
- public static final String OPERATION_SUCCEEDED = "operation_succeeded";
-
- public static final String OPERATION_ERROR = "operation_error";
-
- public static final String SEARCH_ERROR = "search_error";
-
- public static final String ERROR = "error";
-
- public static final String PARAM_PASSWORD_RESET_TOKEN = "pwdResetToken";
-
- public static final String PREF_USERS_DETAILS_VIEW = "users.details.view";
-
- public static final String PREF_USERS_ATTRIBUTES_VIEW = "users.attributes.view";
-
- public static final String PREF_USERS_DERIVED_ATTRIBUTES_VIEW = "users.derived.attributes.view";
-
- public static final String PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW = "users.virtual.attributes.view";
-
- public static final String PREF_CONF_SCHEMA_PAGINATOR_ROWS = "conf.schema.paginator.rows";
-
- public static final String PREF_USER_SCHEMA_PAGINATOR_ROWS = "user.schema.paginator.rows";
-
- public static final String PREF_USER_DER_SCHEMA_PAGINATOR_ROWS = "user.derived.schema.paginator.rows";
-
- public static final String PREF_USER_VIR_SCHEMA_PAGINATOR_ROWS = "user.virtual.schema.paginator.rows";
-
- public static final String PREF_ROLE_SCHEMA_PAGINATOR_ROWS = "role.schema.paginator.rows";
-
- public static final String PREF_ROLE_DER_SCHEMA_PAGINATOR_ROWS = "role.derived.schema.paginator.rows";
-
- public static final String PREF_ROLE_VIR_SCHEMA_PAGINATOR_ROWS = "role.virtual.schema.paginator.rows";
-
- public static final String PREF_MEMBERSHIP_SCHEMA_PAGINATOR_ROWS = "membership.schema.paginator.rows";
-
- public static final String PREF_MEMBERSHIP_DER_SCHEMA_PAGINATOR_ROWS = "membership.derived.aschema.paginator.rows";
-
- public static final String PREF_MEMBERSHIP_VIR_SCHEMA_PAGINATOR_ROWS = "membership.virtual.aschema.paginator.rows";
-
- public static final String PREF_USERS_PAGINATOR_ROWS = "users.paginator.rows";
-
- public static final String PREF_RESOURCES_PAGINATOR_ROWS = "resources.paginator.rows";
-
- public static final String PREF_CONNECTORS_PAGINATOR_ROWS = "connectors.paginator.rows";
-
- public static final String PREF_NOTIFICATION_PAGINATOR_ROWS = "notification.paginator.rows";
-
- public static final String PREF_PROPAGATION_TASKS_PAGINATOR_ROWS = "proagationtasks.paginator.rows";
-
- public static final String PREF_NOTIFICATION_TASKS_PAGINATOR_ROWS = "notificationtasks.paginator.rows";
-
- public static final String PREF_SCHED_TASKS_PAGINATOR_ROWS = "schedtasks.paginator.rows";
-
- public static final String PREF_SYNC_TASKS_PAGINATOR_ROWS = "synctasks.paginator.rows";
-
- public static final String PREF_TODO_PAGINATOR_ROWS = "todo.paginator.rows";
-
- public static final String PREF_REPORT_PAGINATOR_ROWS = "report.paginator.rows";
-
- public static final String PAGEPARAM_CREATE = "CREATE";
-
- public static final String PAGEPARAM_CURRENT_PAGE = "_current_page";
-
- public static final String PREF_POLICY_PAGINATOR_ROWS = "policy.paginator.rows";
-
- /**
- * ConnId's GuardedString is not in the classpath.
- */
- public static final String GUARDED_STRING = "org.identityconnectors.common.security.GuardedString";
-
- /**
- * ConnId's GuardedByteArray is not in the classpath.
- */
- public static final String GUARDED_BYTE_ARRAY = "org.identityconnectors.common.security.GuardedByteArray";
-
- private Constants() {
- // private constructor for static utility class
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/DateFormatROModel.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/DateFormatROModel.java b/console/src/main/java/org/apache/syncope/console/commons/DateFormatROModel.java
deleted file mode 100644
index 070e551..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/DateFormatROModel.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import java.util.Date;
-import org.apache.syncope.console.SyncopeSession;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.PropertyModel;
-
-public class DateFormatROModel implements IModel<String> {
-
- private static final long serialVersionUID = 6677274580927636121L;
-
- private final PropertyModel model;
-
- public DateFormatROModel(final PropertyModel model) {
- this.model = model;
- }
-
- @Override
- public String getObject() {
- return model.getObject() == null
- ? ""
- : SyncopeSession.get().getDateFormat().format((Date) model.getObject());
- }
-
- @Override
- public void setObject(final String object) {
- }
-
- @Override
- public void detach() {
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/HttpResourceStream.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/HttpResourceStream.java b/console/src/main/java/org/apache/syncope/console/commons/HttpResourceStream.java
deleted file mode 100644
index d2aa9e0..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/HttpResourceStream.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.wicket.util.lang.Bytes;
-import org.apache.wicket.util.resource.AbstractResourceStream;
-import org.apache.wicket.util.resource.IFixedLocationResourceStream;
-import org.apache.wicket.util.resource.ResourceStreamNotFoundException;
-
-public class HttpResourceStream extends AbstractResourceStream implements IFixedLocationResourceStream {
-
- private static final long serialVersionUID = 5811207817876330189L;
-
- private transient InputStream inputStream;
-
- private String contentType;
-
- private String location;
-
- private String filename;
-
- public HttpResourceStream(final Response response) {
- super();
-
- Object entity = response.getEntity();
- if (response.getStatusInfo().getStatusCode() == Response.Status.OK.getStatusCode()
- && (entity instanceof InputStream)) {
-
- this.inputStream = (InputStream) entity;
- this.contentType = response.getHeaderString(HttpHeaders.CONTENT_TYPE);
- this.location = response.getLocation() == null ? null : response.getLocation().toASCIIString();
- String contentDisposition = response.getHeaderString(HttpHeaders.CONTENT_DISPOSITION);
- if (StringUtils.isNotBlank(contentDisposition)) {
- String[] splitted = contentDisposition.split("=");
- if (splitted != null && splitted.length > 1) {
- this.filename = splitted[1].trim();
- }
- }
- }
- }
-
- @Override
- public InputStream getInputStream()
- throws ResourceStreamNotFoundException {
-
- return inputStream == null
- ? new ByteArrayInputStream(new byte[0])
- : inputStream;
- }
-
- @Override
- public Bytes length() {
- return inputStream == null
- ? Bytes.bytes(0)
- : null;
- }
-
- @Override
- public void close() throws IOException {
- // No need for explict closing
- }
-
- @Override
- public String locationAsString() {
- return location;
- }
-
- @Override
- public String getContentType() {
- return contentType == null
- ? MediaType.APPLICATION_OCTET_STREAM
- : contentType;
- }
-
- public String getFilename() {
- return filename;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/JexlHelpUtil.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/JexlHelpUtil.java b/console/src/main/java/org/apache/syncope/console/commons/JexlHelpUtil.java
deleted file mode 100644
index 6dadaee..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/JexlHelpUtil.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.link.ExternalLink;
-
-public final class JexlHelpUtil {
-
- private static final String JEXL_SYNTAX_URL = "http://commons.apache.org/jexl/reference/syntax.html";
-
- private JexlHelpUtil() {
- // private constructor for static utility class
- }
-
- public static WebMarkupContainer getJexlHelpWebContainer(final String wicketId) {
- final WebMarkupContainer jexlHelp = new WebMarkupContainer(wicketId);
- jexlHelp.setVisible(false);
- jexlHelp.setOutputMarkupPlaceholderTag(true);
- jexlHelp.setOutputMarkupId(true);
- jexlHelp.add(new ExternalLink("jexlLink", JEXL_SYNTAX_URL));
- return jexlHelp;
- }
-
- public static AjaxLink<Void> getAjaxLink(final WebMarkupContainer wmc, final String wicketId) {
- AjaxLink<Void> questionMarkJexlHelp = new AjaxLink<Void>(wicketId) {
-
- private static final long serialVersionUID = -1838017408000591382L;
-
- private boolean toogle = false;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- // using bitwise inversion as suggested by
- // http://pmd.sourceforge.net/pmd-4.2.5/rules/controversial.html#BooleanInversion
- toogle ^= true;
- wmc.setVisible(toogle);
- target.add(wmc);
- }
- };
- return questionMarkJexlHelp;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/MapChoiceRenderer.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/MapChoiceRenderer.java b/console/src/main/java/org/apache/syncope/console/commons/MapChoiceRenderer.java
deleted file mode 100644
index c41b916..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/MapChoiceRenderer.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import java.util.Map;
-import org.apache.wicket.markup.html.form.IChoiceRenderer;
-
-public class MapChoiceRenderer<T, K> implements IChoiceRenderer<T> {
-
- private static final long serialVersionUID = -7452881117778186644L;
-
- private final Map<T, K> map;
-
- public MapChoiceRenderer(final Map<T, K> map) {
- this.map = map;
- }
-
- @Override
- public Object getDisplayValue(final T key) {
- return map.get(key);
- }
-
- @Override
- public String getIdValue(final T key, final int index) {
- return key.toString();
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/Mode.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/Mode.java b/console/src/main/java/org/apache/syncope/console/commons/Mode.java
deleted file mode 100644
index 8bb6f4f..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/Mode.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-public enum Mode {
-
- ADMIN,
- SELF,
- TEMPLATE;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/PreferenceManager.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/PreferenceManager.java b/console/src/main/java/org/apache/syncope/console/commons/PreferenceManager.java
deleted file mode 100644
index f9bbaa2..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/PreferenceManager.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.core.type.TypeReference;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import org.apache.commons.lang3.math.NumberUtils;
-import org.apache.wicket.request.Request;
-import org.apache.wicket.request.Response;
-import org.apache.wicket.util.cookies.CookieDefaults;
-import org.apache.wicket.util.cookies.CookieUtils;
-import org.apache.wicket.util.crypt.Base64;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.util.StringUtils;
-
-public class PreferenceManager {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(PreferenceManager.class);
-
- private static final String PREFMAN_KEY = "prefMan";
-
- private static final int ONE_YEAR_TIME = 60 * 60 * 24 * 365;
-
- private static final TypeReference<Map<String, String>> MAP_TYPE_REF = new TypeReference<Map<String, String>>() {
- };
-
- private static final List<Integer> PAGINATOR_CHOICES = Arrays.asList(new Integer[] { 10, 25, 50 });
-
- private final ObjectMapper mapper;
-
- private final CookieUtils cookieUtils;
-
- public PreferenceManager() {
- this.mapper = new ObjectMapper();
-
- CookieDefaults cookieDefaults = new CookieDefaults();
- cookieDefaults.setMaxAge(ONE_YEAR_TIME);
- this.cookieUtils = new CookieUtils(cookieDefaults);
- }
-
- public List<Integer> getPaginatorChoices() {
- return PAGINATOR_CHOICES;
- }
-
- private Map<String, String> getPrefs(final String value) {
- Map<String, String> prefs;
- try {
- if (StringUtils.hasText(value)) {
- prefs = mapper.readValue(value, MAP_TYPE_REF);
- } else {
- throw new Exception("Invalid cookie value '" + value + "'");
- }
- } catch (Exception e) {
- LOG.debug("No preferences found", e);
- prefs = new HashMap<String, String>();
- }
-
- return prefs;
- }
-
- private String setPrefs(final Map<String, String> prefs) throws IOException {
- StringWriter writer = new StringWriter();
- mapper.writeValue(writer, prefs);
-
- return writer.toString();
- }
-
- public String get(final Request request, final String key) {
- String result = null;
-
- String prefString = cookieUtils.load(PREFMAN_KEY);
- if (prefString != null) {
- final Map<String, String> prefs = getPrefs(new String(Base64.decodeBase64(prefString.getBytes())));
- result = prefs.get(key);
- }
-
- return result;
- }
-
- public Integer getPaginatorRows(final Request request, final String key) {
- Integer result = getPaginatorChoices().get(0);
-
- String value = get(request, key);
- if (value != null) {
- result = NumberUtils.toInt(value, 10);
- }
-
- return result;
- }
-
- public List<String> getList(final Request request, final String key) {
- final List<String> result = new ArrayList<String>();
-
- final String compound = get(request, key);
-
- if (StringUtils.hasText(compound)) {
- String[] items = compound.split(";");
- result.addAll(Arrays.asList(items));
- }
-
- return result;
- }
-
- public void set(final Request request, final Response response, final Map<String, List<String>> prefs) {
- String prefString = cookieUtils.load(PREFMAN_KEY);
-
- final Map<String, String> current = new HashMap<String, String>();
- if (prefString != null) {
- current.putAll(getPrefs(new String(Base64.decodeBase64(prefString.getBytes()))));
- }
-
- // after retrieved previous setting in order to overwrite the key ...
- for (Entry<String, List<String>> entry : prefs.entrySet()) {
- current.put(entry.getKey(), StringUtils.collectionToDelimitedString(entry.getValue(), ";"));
- }
-
- try {
- cookieUtils.save(PREFMAN_KEY, new String(Base64.encodeBase64(setPrefs(current).getBytes())));
- } catch (IOException e) {
- LOG.error("Could not save {} info: {}", getClass().getSimpleName(), current, e);
- }
- }
-
- public void set(final Request request, final Response response, final String key, final String value) {
- String prefString = cookieUtils.load(PREFMAN_KEY);
-
- final Map<String, String> current = new HashMap<String, String>();
- if (prefString != null) {
- current.putAll(getPrefs(new String(Base64.decodeBase64(prefString.getBytes()))));
- }
-
- // after retrieved previous setting in order to overwrite the key ...
- current.put(key, value);
-
- try {
- cookieUtils.save(PREFMAN_KEY, new String(Base64.encodeBase64(setPrefs(current).getBytes())));
- } catch (IOException e) {
- LOG.error("Could not save {} info: {}", getClass().getSimpleName(), current, e);
- }
- }
-
- public void setList(final Request request, final Response response, final String key, final List<String> values) {
- set(request, response, key, StringUtils.collectionToDelimitedString(values, ";"));
- }
-
- public void setList(final Request request, final Response response, final Map<String, List<String>> prefs) {
- set(request, response, prefs);
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/RoleTreeBuilder.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/RoleTreeBuilder.java b/console/src/main/java/org/apache/syncope/console/commons/RoleTreeBuilder.java
deleted file mode 100644
index f827e64..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/RoleTreeBuilder.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeModel;
-import org.apache.syncope.common.to.RoleTO;
-import org.apache.syncope.console.rest.RoleRestClient;
-import org.springframework.beans.factory.annotation.Autowired;
-
-public class RoleTreeBuilder {
-
- @Autowired
- private RoleRestClient restClient;
-
- private final RoleTOComparator comparator = new RoleTOComparator();
-
- private List<RoleTO> allRoles;
-
- private List<RoleTO> getChildRoles(final long parentRoleId, final List<RoleTO> roles) {
- List<RoleTO> result = new ArrayList<RoleTO>();
- for (RoleTO role : roles) {
- if (role.getParent() == parentRoleId) {
- result.add(role);
- }
- }
-
- Collections.sort(result, comparator);
- return result;
- }
-
- private void populateSubtree(final DefaultMutableTreeNode subRoot, final List<RoleTO> roles) {
- RoleTO role = (RoleTO) subRoot.getUserObject();
-
- DefaultMutableTreeNode child;
- for (RoleTO subRoleTO : getChildRoles(role.getId(), roles)) {
- child = new DefaultMutableTreeNode(subRoleTO);
- subRoot.add(child);
- populateSubtree(child, roles);
- }
- }
-
- public List<RoleTO> getAllRoles() {
- return this.allRoles;
- }
-
- public TreeModel build() {
- this.allRoles = this.restClient.list();
- return build(this.allRoles);
- }
-
- public TreeModel build(final List<RoleTO> roles) {
- DefaultMutableTreeNode fakeroot = new DefaultMutableTreeNode(new FakeRootRoleTO());
-
- populateSubtree(fakeroot, roles);
-
- return new DefaultTreeModel(fakeroot);
- }
-
- private static class RoleTOComparator implements Comparator<RoleTO>, Serializable {
-
- private static final long serialVersionUID = 7085057398406518811L;
-
- @Override
- public int compare(final RoleTO r1, final RoleTO r2) {
- if (r1.getId() < r2.getId()) {
- return -1;
- }
- if (r1.getId() == r2.getId()) {
- return 0;
- }
-
- return 1;
- }
- }
-
- private static class FakeRootRoleTO extends RoleTO {
-
- private static final long serialVersionUID = 4839183625773925488L;
-
- public FakeRootRoleTO() {
- super();
-
- setId(0);
- setName("");
- setParent(-1);
- }
-
- @Override
- public String getDisplayName() {
- return "";
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/RoleUtils.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/RoleUtils.java b/console/src/main/java/org/apache/syncope/console/commons/RoleUtils.java
deleted file mode 100644
index 8624824..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/RoleUtils.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import org.apache.syncope.common.to.RoleTO;
-
-public class RoleUtils {
-
- public static RoleTO findRole(final RoleTreeBuilder roleTreeBuilder, final long roleId) {
- RoleTO found = null;
- if (roleTreeBuilder.getAllRoles() != null) {
- for (RoleTO roleTO : roleTreeBuilder.getAllRoles()) {
- if (roleTO.getId() == roleId) {
- found = roleTO;
- }
- }
- }
- return found;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/SchemaModalPageFactory.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/SchemaModalPageFactory.java b/console/src/main/java/org/apache/syncope/console/commons/SchemaModalPageFactory.java
deleted file mode 100644
index 429fd40..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/SchemaModalPageFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import org.apache.syncope.common.types.AttributableType;
-import org.apache.syncope.common.types.SchemaType;
-import org.apache.syncope.console.pages.AbstractSchemaModalPage;
-import org.apache.syncope.console.pages.DerSchemaModalPage;
-import org.apache.syncope.console.pages.PlainSchemaModalPage;
-import org.apache.syncope.console.pages.VirSchemaModalPage;
-
-public final class SchemaModalPageFactory {
-
- private static final long serialVersionUID = -3533177688264693505L;
-
- private SchemaModalPageFactory() {
- // empty constructor for static utility class
- }
-
- @SuppressWarnings("unchecked")
- public static <T extends AbstractSchemaModalPage> T getSchemaModalPage(
- final AttributableType entity, final SchemaType schemaType) {
-
- T page;
-
- switch (schemaType) {
- case DERIVED:
- page = (T) new DerSchemaModalPage(entity);
- break;
-
- case VIRTUAL:
- page = (T) new VirSchemaModalPage(entity);
- break;
-
- default:
- page = (T) new PlainSchemaModalPage(entity);
- break;
- }
-
- return page;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/SelectChoiceRenderer.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/SelectChoiceRenderer.java b/console/src/main/java/org/apache/syncope/console/commons/SelectChoiceRenderer.java
deleted file mode 100644
index 4d26f62..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/SelectChoiceRenderer.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import org.apache.wicket.markup.html.form.IChoiceRenderer;
-
-public class SelectChoiceRenderer<T> implements IChoiceRenderer<T> {
-
- private static final long serialVersionUID = -3242441544405909243L;
-
- @Override
- public Object getDisplayValue(T obj) {
- if (obj instanceof SelectOption) {
- return ((SelectOption) obj).getDisplayValue();
- } else {
- return obj.toString();
- }
- }
-
- @Override
- public String getIdValue(T obj, int i) {
- return obj.toString();
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/SelectOption.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/SelectOption.java b/console/src/main/java/org/apache/syncope/console/commons/SelectOption.java
deleted file mode 100644
index 15d03a8..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/SelectOption.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import java.io.Serializable;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-
-public class SelectOption implements Serializable {
-
- private static final long serialVersionUID = 2961127533930849828L;
-
- private String displayValue;
-
- private String keyValue;
-
- public SelectOption(final String displayValue, final String keyValue) {
- this.displayValue = displayValue;
- this.keyValue = keyValue;
- }
-
- public String getDisplayValue() {
- return displayValue;
- }
-
- public void setDisplayValue(final String displayValue) {
- this.displayValue = displayValue;
- }
-
- public String getKeyValue() {
- return keyValue;
- }
-
- public void setKeyValue(final String keyValue) {
- this.keyValue = keyValue;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == null || !(obj instanceof SelectOption)) {
- return false;
- }
-
- return (keyValue == null && ((SelectOption) obj).keyValue == null) || keyValue != null
- && keyValue.equals(((SelectOption) obj).keyValue);
- }
-
- @Override
- public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
- }
-
- @Override
- public String toString() {
- return keyValue;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/SortableAttributableProviderComparator.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/SortableAttributableProviderComparator.java b/console/src/main/java/org/apache/syncope/console/commons/SortableAttributableProviderComparator.java
deleted file mode 100644
index 2d9552e..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/SortableAttributableProviderComparator.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.apache.syncope.common.to.AbstractAttributableTO;
-import org.apache.syncope.common.to.AttributeTO;
-import org.apache.syncope.common.types.SchemaType;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
-import org.apache.wicket.model.AbstractReadOnlyModel;
-
-public class SortableAttributableProviderComparator extends SortableDataProviderComparator<AbstractAttributableTO> {
-
- private static final long serialVersionUID = 1775967163571699258L;
-
- private static final Set<String> INLINE_PROPS = new HashSet<String>(Arrays.asList(
- new String[]{"id", "status", "token", "username"}));
-
- public SortableAttributableProviderComparator(final SortableDataProvider<AbstractAttributableTO, String> provider) {
- super(provider);
- }
-
- @Override
- public int compare(final AbstractAttributableTO attributable1, AbstractAttributableTO attributable2) {
- if (INLINE_PROPS.contains(provider.getSort().getProperty())) {
- return super.compare(attributable1, attributable2);
- }
-
- return super.compare(new AttrModel(attributable1), new AttrModel(attributable2));
- }
-
- @SuppressWarnings("rawtypes")
- private class AttrModel extends AbstractReadOnlyModel<Comparable> {
-
- private static final long serialVersionUID = -7856686374020091808L;
-
- private final Map<String, AttributeTO> attrs;
-
- private final Map<String, AttributeTO> derAttrs;
-
- private final Map<String, AttributeTO> virAttrs;
-
- public AttrModel(final AbstractAttributableTO attributableTO) {
- super();
-
- this.attrs = attributableTO.getAttrMap();
- this.derAttrs = attributableTO.getDerAttrMap();
- this.virAttrs = attributableTO.getVirAttrMap();
- }
-
- /**
- * @see UserAttrColumn constructor
- */
- @Override
- public Comparable getObject() {
- int hashPos = provider.getSort().getProperty().indexOf('#');
-
- SchemaType schemaType = null;
- final String schema;
- if (hashPos == -1) {
- schema = provider.getSort().getProperty();
- } else {
- String[] splitted = provider.getSort().getProperty().split("#");
- try {
- schemaType = SchemaType.valueOf(splitted[0]);
- } catch (IllegalArgumentException e) {
- // this should never happen
- }
- schema = provider.getSort().getProperty().substring(hashPos + 1);
- }
-
-
- final AttributeTO attr;
- if (schemaType == null) {
- attr = this.attrs.get(schema);
- } else {
- switch (schemaType) {
- case NORMAL:
- default:
- attr = this.attrs.get(schema);
- break;
-
- case DERIVED:
- attr = this.derAttrs.get(schema);
- break;
-
- case VIRTUAL:
- attr = this.virAttrs.get(schema);
- break;
- }
- }
-
- Comparable result = null;
-
- List<String> values = attr == null ? null : attr.getValues();
- if (values != null && !values.isEmpty()) {
- result = values.iterator().next();
- }
-
- return result;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/SortableDataProviderComparator.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/SortableDataProviderComparator.java b/console/src/main/java/org/apache/syncope/console/commons/SortableDataProviderComparator.java
deleted file mode 100644
index b773afb..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/SortableDataProviderComparator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import java.io.Serializable;
-import java.util.Comparator;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.PropertyModel;
-
-public class SortableDataProviderComparator<T extends Object> implements Comparator<T>, Serializable {
-
- private static final long serialVersionUID = -8897687699977460543L;
-
- protected final SortableDataProvider<T, String> provider;
-
- public SortableDataProviderComparator(final SortableDataProvider<T, String> provider) {
- this.provider = provider;
- }
-
- @SuppressWarnings({"unchecked", "rawtypes"})
- protected int compare(final IModel<Comparable> model1, final IModel<Comparable> model2) {
- int result;
-
- if (model1.getObject() == null && model2.getObject() == null) {
- result = 0;
- } else if (model1.getObject() == null) {
- result = 1;
- } else if (model2.getObject() == null) {
- result = -1;
- } else {
- result = model1.getObject().compareTo(model2.getObject());
- }
-
- result = provider.getSort().isAscending()
- ? result
- : -result;
-
- return result;
- }
-
- @SuppressWarnings("rawtypes")
- @Override
- public int compare(final T object1, final T object2) {
- IModel<Comparable> model1 = new PropertyModel<Comparable>(object1, provider.getSort().getProperty());
- IModel<Comparable> model2 = new PropertyModel<Comparable>(object2, provider.getSort().getProperty());
-
- return compare(model1, model2);
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java b/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java
deleted file mode 100644
index 69cf4ec..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/XMLRolesReader.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons;
-
-import java.util.HashMap;
-import java.util.Map;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.apache.commons.lang3.tuple.Pair;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * XMLRolesReader singleton class.
- */
-public class XMLRolesReader {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(XMLRolesReader.class);
-
- private String authorizations;
-
- private Map<Pair<String, String>, String> authMap;
-
- public void setAuthorizations(final String authorizations) {
- this.authorizations = authorizations;
- }
-
- private void init() {
- authMap = new HashMap<Pair<String, String>, String>();
-
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
- try {
- DocumentBuilder db = dbf.newDocumentBuilder();
- Document doc = db.parse(getClass().getResource("/" + authorizations).openStream());
- doc.getDocumentElement().normalize();
-
- Node authNode = null;
- NodeList root = doc.getChildNodes();
- for (int i = 0; i < root.getLength() && authNode == null; i++) {
- if ("auth".equals(root.item(i).getNodeName())) {
- authNode = root.item(i);
- }
- }
- if (authNode == null) {
- throw new IllegalArgumentException("Could not find root <auth> node");
- }
-
- NodeList pages = authNode.getChildNodes();
- for (int i = 0; i < pages.getLength(); i++) {
- if ("page".equals(pages.item(i).getNodeName())) {
- String page = pages.item(i).getAttributes().getNamedItem("id").getTextContent();
-
- NodeList actions = pages.item(i).getChildNodes();
- for (int j = 0; j < actions.getLength(); j++) {
- if ("action".equals(actions.item(j).getNodeName())) {
- String action = actions.item(j).getAttributes().getNamedItem("id").getTextContent();
-
- NodeList entitlements = actions.item(j).getChildNodes();
- for (int k = 0; k < entitlements.getLength(); k++) {
- if ("entitlement".equals(entitlements.item(k).getNodeName())) {
- String entitlement = entitlements.item(k).getTextContent();
- authMap.put(new ImmutablePair<String, String>(page, action), entitlement);
- }
- }
- }
- }
- }
- }
- } catch (Exception e) {
- LOG.error("While initializing parsing of {}", authorizations, e);
- }
- }
-
- /**
- * Get entitlement required for page / action.
- *
- * @param pageId page
- * @param actionId action
- * @return entitlement required
- */
- public String getEntitlement(final String pageId, final String actionId) {
- synchronized (this) {
- if (authMap == null) {
- init();
- }
- }
-
- Pair<String, String> key = new ImmutablePair<String, String>(pageId, actionId);
- return authMap.containsKey(key)
- ? authMap.get(key)
- : StringUtils.EMPTY;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/status/AbstractStatusBeanProvider.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/status/AbstractStatusBeanProvider.java b/console/src/main/java/org/apache/syncope/console/commons/status/AbstractStatusBeanProvider.java
deleted file mode 100644
index e533dc1..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/status/AbstractStatusBeanProvider.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons.status;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import org.apache.syncope.console.commons.SortableDataProviderComparator;
-import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
-import org.apache.wicket.model.AbstractReadOnlyModel;
-import org.apache.wicket.model.IModel;
-
-public abstract class AbstractStatusBeanProvider extends SortableDataProvider<StatusBean, String> {
-
- private static final long serialVersionUID = 4287357360778016173L;
-
- private SortableDataProviderComparator<StatusBean> comparator;
-
- public AbstractStatusBeanProvider(final String sort) {
- //Default sorting
- setSort(sort, SortOrder.ASCENDING);
- comparator = new SortableDataProviderComparator<StatusBean>(this);
- }
-
- @Override
- public Iterator<StatusBean> iterator(final long first, final long count) {
- List<StatusBean> list = getStatusBeans();
- Collections.sort(list, comparator);
- return list.subList((int) first, (int) first + (int) count).iterator();
- }
-
- @Override
- public long size() {
- return getStatusBeans().size();
- }
-
- @Override
- public IModel<StatusBean> model(final StatusBean resource) {
- return new AbstractReadOnlyModel<StatusBean>() {
-
- private static final long serialVersionUID = -7802635613997243712L;
-
- @Override
- public StatusBean getObject() {
- return resource;
- }
- };
- }
-
- public abstract List<StatusBean> getStatusBeans();
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/status/ConnObjectWrapper.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/status/ConnObjectWrapper.java b/console/src/main/java/org/apache/syncope/console/commons/status/ConnObjectWrapper.java
deleted file mode 100644
index 540fd62..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/status/ConnObjectWrapper.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons.status;
-
-import java.io.Serializable;
-import org.apache.syncope.common.to.AbstractAttributableTO;
-import org.apache.syncope.common.to.ConnObjectTO;
-
-public class ConnObjectWrapper implements Serializable {
-
- private static final long serialVersionUID = 9083721948999924299L;
-
- private final AbstractAttributableTO attributable;
-
- private final String resourceName;
-
- private final ConnObjectTO connObjectTO;
-
- public ConnObjectWrapper(final AbstractAttributableTO attributable, final String resourceName,
- final ConnObjectTO connObjectTO) {
-
- this.attributable = attributable;
- this.resourceName = resourceName;
- this.connObjectTO = connObjectTO;
- }
-
- public AbstractAttributableTO getAttributable() {
- return attributable;
- }
-
- public String getResourceName() {
- return resourceName;
- }
-
- public ConnObjectTO getConnObjectTO() {
- return connObjectTO;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/status/Status.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/status/Status.java b/console/src/main/java/org/apache/syncope/console/commons/status/Status.java
deleted file mode 100644
index 762de4e..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/status/Status.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons.status;
-
-public enum Status {
-
- NOT_YET_SUBMITTED(""),
- CREATED("created"),
- ACTIVE("active"),
- SUSPENDED("inactive"),
- UNDEFINED("undefined"),
- OBJECT_NOT_FOUND("objectnotfound");
-
- public boolean isActive() {
- return this == ACTIVE;
- }
-
- private Status(final String name) {
- this.name = name;
- }
-
- private final String name;
-
- @Override
- public String toString() {
- return name;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/status/StatusBean.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/status/StatusBean.java b/console/src/main/java/org/apache/syncope/console/commons/status/StatusBean.java
deleted file mode 100644
index fea7480..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/status/StatusBean.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons.status;
-
-import java.io.Serializable;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import org.apache.syncope.common.to.AbstractAttributableTO;
-import org.apache.syncope.common.to.RoleTO;
-import org.apache.syncope.common.to.UserTO;
-
-public class StatusBean implements Serializable {
-
- private static final long serialVersionUID = -5207260204921071129L;
-
- private final Long attributableId;
-
- private final String attributableName;
-
- private final String resourceName;
-
- private String accountLink = null;
-
- private Status status = Status.OBJECT_NOT_FOUND;
-
- private boolean linked = true;
-
- public StatusBean(final AbstractAttributableTO attributable, String resourceName) {
- this.attributableId = attributable.getId();
- this.attributableName = attributable instanceof UserTO
- ? ((UserTO) attributable).getUsername() : ((RoleTO) attributable).getName();
- this.resourceName = resourceName;
- }
-
- public String getAccountLink() {
- return accountLink;
- }
-
- public void setAccountLink(final String accountLink) {
- this.accountLink = accountLink;
- }
-
- public String getResourceName() {
- return resourceName;
- }
-
- public Status getStatus() {
- return status;
- }
-
- public void setStatus(final Status status) {
- this.status = status;
- }
-
- public Long getAttributableId() {
- return attributableId;
- }
-
- public String getAttributableName() {
- return attributableName;
- }
-
- public boolean isLinked() {
- return linked;
- }
-
- public void setLinked(boolean linked) {
- this.linked = linked;
- }
-
- @Override
- public String toString() {
- return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
- }
-
- @Override
- public boolean equals(final Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
- }
-
- @Override
- public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
- }
-}
[48/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/resources/org/apache/syncope/pmd.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/org/apache/syncope/pmd.xml b/build-tools/src/main/resources/org/apache/syncope/pmd.xml
deleted file mode 100644
index 1073dce..0000000
--- a/build-tools/src/main/resources/org/apache/syncope/pmd.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
-
--->
-<ruleset name="Syncope"
- xmlns="http://pmd.sf.net/ruleset/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
- xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
-
- <rule ref="rulesets/basic.xml"/>
- <rule ref="rulesets/naming.xml">
- <exclude name="ShortVariable"/>
- <exclude name="LongVariable"/>
- </rule>
- <rule ref="rulesets/unusedcode.xml"/>
- <rule ref="rulesets/design.xml"/>
- <rule ref="rulesets/imports.xml"/>
- <rule ref="rulesets/strings.xml">
- <exclude name="AvoidDuplicateLiterals"/>
- </rule>
- <rule ref="rulesets/codesize.xml"/>
- <rule ref="rulesets/javabeans.xml">
- <exclude name="BeanMembersShouldSerialize"/>
- </rule>
- <rule ref="rulesets/coupling.xml"/>
- <rule ref="rulesets/controversial.xml">
- <exclude name="NullAssignment"/>
- <exclude name="DataflowAnomalyAnalysis"/>
- </rule>
- <rule ref="rulesets/strictexception.xml"/>
- <rule ref="rulesets/typeresolution.xml"/>
-
-</ruleset>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/resources/testdb.sql
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/testdb.sql b/build-tools/src/main/resources/testdb.sql
deleted file mode 100644
index ff4dd47..0000000
--- a/build-tools/src/main/resources/testdb.sql
+++ /dev/null
@@ -1,46 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership. The ASF licenses this file
--- to you 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.
-ALTER USER sa SET PASSWORD '${testdb.password}';
-
-DROP TABLE test IF EXISTS;
-CREATE TABLE test (
-id VARCHAR(50) PRIMARY KEY,
-password VARCHAR(255) NOT NULL,
-status VARCHAR(5));
-
-INSERT INTO test VALUES ('testuser1', 'password', 'false');
-
--- this table must be created in order to provide a specific test for issueSYNCOPE68
-DROP TABLE test2 IF EXISTS;
-CREATE TABLE test2 (
-id VARCHAR(50) PRIMARY KEY,
-password VARCHAR(255) NOT NULL,
-status VARCHAR(5));
-
-INSERT INTO test2 VALUES ('testuser2', 'password321', 'false');
-INSERT INTO test2 VALUES ('rossini', 'password321', 'true');
-INSERT INTO test2 VALUES ('verdi', 'password321', 'true');
-
--- this table is for issueSYNCOPE230
-DROP TABLE testsync IF EXISTS;
-CREATE TABLE TESTSYNC (
-id NUMBER(10) PRIMARY KEY,
-username VARCHAR(80),
-surname VARCHAR(80),
-email VARCHAR(80));
-
-INSERT INTO testsync VALUES (965, 'issuesyncope230', 'Surname', 'syncope230@syncope.apache.org');
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/webapp/WEB-INF/glassfish-web.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/webapp/WEB-INF/glassfish-web.xml b/build-tools/src/main/webapp/WEB-INF/glassfish-web.xml
deleted file mode 100644
index f2a4332..0000000
--- a/build-tools/src/main/webapp/WEB-INF/glassfish-web.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
-
--->
-<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD
-GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
-<glassfish-web-app>
- <class-loader delegate="false"/>
-</glassfish-web-app>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/webapp/WEB-INF/web.xml b/build-tools/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 2a0b4ba..0000000
--- a/build-tools/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
--->
-<web-app xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
- version="3.0">
-
- <context-param>
- <param-name>testds.port</param-name>
- <param-value>${testds.port}</param-value>
- </context-param>
- <context-param>
- <param-name>testdb.webport</param-name>
- <param-value>${testdb.webport}</param-value>
- </context-param>
- <context-param>
- <param-name>testconnectorserver.port</param-name>
- <param-value>${testconnectorserver.port}</param-value>
- </context-param>
- <context-param>
- <param-name>testconnectorserver.key</param-name>
- <param-value>${testconnectorserver.key}</param-value>
- </context-param>
- <context-param>
- <param-name>testconnectorserver.soap.bundle</param-name>
- <param-value>net.tirasa.connid.bundles.soap-${connid.soap.version}.jar</param-value>
- </context-param>
- <context-param>
- <param-name>testconnectorserver.db.bundle</param-name>
- <param-value>net.tirasa.connid.bundles.db.table-${connid.db.table.version}.jar</param-value>
- </context-param>
- <context-param>
- <param-name>testconnectorserver.csvdir.bundle</param-name>
- <param-value>net.tirasa.connid.bundles.csvdir-${connid.csvdir.version}.jar</param-value>
- </context-param>
- <context-param>
- <param-name>testconnectorserver.ldap.bundle</param-name>
- <param-value>net.tirasa.connid.bundles.ldap-${connid.ldap.version}.jar</param-value>
- </context-param>
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>classpath*:/*Context.xml</param-value>
- </context-param>
-
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
- <listener>
- <listener-class>org.apache.syncope.buildtools.ApacheDSStartStopListener</listener-class>
- </listener>
- <listener>
- <listener-class>org.apache.syncope.buildtools.H2StartStopListener</listener-class>
- </listener>
- <listener>
- <listener-class>org.apache.syncope.buildtools.ConnIdStartStopListener</listener-class>
- </listener>
- <servlet>
- <servlet-name>ApacheDSRootDseServlet</servlet-name>
- <servlet-class>org.apache.syncope.buildtools.ApacheDSRootDseServlet</servlet-class>
- </servlet>
- <servlet>
- <servlet-name>ServiceTimeoutServlet</servlet-name>
- <servlet-class>org.apache.syncope.buildtools.ServiceTimeoutServlet</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>ApacheDSRootDseServlet</servlet-name>
- <url-pattern>/apacheDS</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>ServiceTimeoutServlet</servlet-name>
- <url-pattern>/services/*</url-pattern>
- </servlet-mapping>
-</web-app>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/webapp/WEB-INF/weblogic.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/webapp/WEB-INF/weblogic.xml b/build-tools/src/main/webapp/WEB-INF/weblogic.xml
deleted file mode 100644
index 3d429a5..0000000
--- a/build-tools/src/main/webapp/WEB-INF/weblogic.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
--->
-<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app
- http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
-
- <context-root>syncope-build-tools</context-root>
-
- <container-descriptor>
- <prefer-application-packages>
- <package-name>org.slf4j.*</package-name>
- </prefer-application-packages>
- </container-descriptor>
-
-</weblogic-web-app>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/pom.xml
----------------------------------------------------------------------
diff --git a/cli/pom.xml b/cli/pom.xml
deleted file mode 100644
index 43a2861..0000000
--- a/cli/pom.xml
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- </parent>
-
- <name>Apache Syncope Command Line Interface</name>
- <description>Apache Syncope Command Line Interface</description>
-
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-cli</artifactId>
- <packaging>jar</packaging>
-
- <distributionManagement>
- <site>
- <id>syncope.website</id>
- <name>Apache Syncope website</name>
- <url>${site.deploymentBaseUrl}/${project.artifactId}</url>
- </site>
- </distributionManagement>
-
- <properties>
- <log.directory>/tmp</log.directory>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.beust</groupId>
- <artifactId>jcommander</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-client</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- </dependency>
- <dependency>
- <groupId>com.lmax</groupId>
- <artifactId>disruptor</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
-
- <defaultGoal>package</defaultGoal>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>2.3</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <createDependencyReducedPom>false</createDependencyReducedPom>
- <transformers>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
- <manifestEntries>
- <Main-Class>org.apache.syncope.cli.SyncopeAdm</Main-Class>
- </manifestEntries>
- </transformer>
- <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
- <resource>messages.properties</resource>
- <file>src/main/resources/messages.properties</file>
- </transformer>
- <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
- <resource>messages_it_IT.properties</resource>
- <file>src/main/resources/messages_it_IT.properties</file>
- </transformer>
- <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
- <resource>META-INF/spring.handlers</resource>
- </transformer>
- <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
- <resource>META-INF/spring.schemas</resource>
- </transformer>
- <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
- <resource>META-INF/cxf/bus-extensions.txt</resource>
- </transformer>
- <transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
- <resource>META-INF/wsdl.plugin.xml</resource>
- </transformer>
- </transformers>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
-
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- <targetPath>${project.build.directory}/classes</targetPath>
- <includes>
- <include>log4j2.xml</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- <targetPath>${project.build.directory}/classes</targetPath>
- <includes>
- <include>syncope.properties</include>
- </includes>
- </resource>
- <resource>
- <directory>..</directory>
- <targetPath>META-INF</targetPath>
- <includes>
- <include>LICENSE</include>
- <include>NOTICE</include>
- </includes>
- </resource>
- </resources>
-
- </build>
-
- <profiles>
- <profile>
- <id>apache-release</id>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/src/main/java/org/apache/syncope/cli/SyncopeAdm.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/syncope/cli/SyncopeAdm.java b/cli/src/main/java/org/apache/syncope/cli/SyncopeAdm.java
deleted file mode 100644
index bcfa748..0000000
--- a/cli/src/main/java/org/apache/syncope/cli/SyncopeAdm.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.cli;
-
-import com.beust.jcommander.JCommander;
-import com.beust.jcommander.ParameterException;
-import org.apache.syncope.cli.commands.ConfigurationCommand;
-import org.apache.syncope.cli.commands.EntitlementCommand;
-import org.apache.syncope.cli.commands.LoggerCommand;
-import org.apache.syncope.cli.commands.NotificationCommand;
-import org.apache.syncope.cli.commands.PolicyCommand;
-import org.apache.syncope.cli.commands.ReportCommand;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SyncopeAdm {
-
- private static final Logger LOG = LoggerFactory.getLogger(SyncopeAdm.class);
-
- private static final String helpMessage = "Usage: Main [options]\n"
- + " Options:\n"
- + " logger --help \n"
- + " config --help \n"
- + " notification --help \n"
- + " report --help \n"
- + " policy --help \n"
- + " entitlement --help \n";
-
- private static final JCommander jcommander = new JCommander();
-
- private static LoggerCommand loggerCommand;
-
- private static ConfigurationCommand configurationCommand;
-
- private static NotificationCommand notificationCommand;
-
- private static ReportCommand reportCommand;
-
- private static PolicyCommand policyCommand;
-
- private static EntitlementCommand entitlementCommand;
-
- public static void main(final String[] args) {
- LOG.debug("Starting with args \n");
-
- for (final String arg : args) {
- LOG.debug("Arg: {}", arg);
- }
-
- instantiateCommands();
-
- if (args.length == 0) {
- System.out.println(helpMessage);
- } else {
- try {
- jcommander.parse(args);
- } catch (final ParameterException ioe) {
- System.out.println(helpMessage);
- LOG.error("Parameter exception", ioe);
- }
- executeCommand();
- }
-
- }
-
- private static void instantiateCommands() {
- LOG.debug("Init JCommander");
- loggerCommand = new LoggerCommand();
- jcommander.addCommand(loggerCommand);
- LOG.debug("Added LoggerCommand");
- configurationCommand = new ConfigurationCommand();
- jcommander.addCommand(configurationCommand);
- LOG.debug("Added ConfigurationCommand");
- notificationCommand = new NotificationCommand();
- jcommander.addCommand(notificationCommand);
- LOG.debug("Added NotificationCommand");
- reportCommand = new ReportCommand();
- jcommander.addCommand(reportCommand);
- LOG.debug("Added ReportCommand");
- policyCommand = new PolicyCommand();
- jcommander.addCommand(policyCommand);
- LOG.debug("Added PolicyCommand");
- entitlementCommand = new EntitlementCommand();
- jcommander.addCommand(entitlementCommand);
- LOG.debug("Added EntitlementCommand");
- }
-
- private static void executeCommand() {
- final String command = jcommander.getParsedCommand();
-
- LOG.debug("Called command {}", command);
-
- if ("logger".equalsIgnoreCase(command)) {
- loggerCommand.execute();
- } else if ("config".equalsIgnoreCase(command)) {
- configurationCommand.execute();
- } else if ("notification".equalsIgnoreCase(command)) {
- notificationCommand.execute();
- } else if ("report".equalsIgnoreCase(command)) {
- reportCommand.execute();
- } else if ("policy".equalsIgnoreCase(command)) {
- policyCommand.execute();
- } else if ("entitlement".equalsIgnoreCase(command)) {
- entitlementCommand.execute();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/src/main/java/org/apache/syncope/cli/SyncopeServices.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/syncope/cli/SyncopeServices.java b/cli/src/main/java/org/apache/syncope/cli/SyncopeServices.java
deleted file mode 100644
index 978b7df..0000000
--- a/cli/src/main/java/org/apache/syncope/cli/SyncopeServices.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.cli;
-
-import java.util.ResourceBundle;
-import org.apache.syncope.client.SyncopeClient;
-import org.apache.syncope.client.SyncopeClientFactoryBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class SyncopeServices {
-
- private static final Logger LOG = LoggerFactory.getLogger(SyncopeServices.class);
-
- private final static ResourceBundle SYNCOPE_PROPS = ResourceBundle.getBundle("syncope");
-
- private static final SyncopeClient CLIENT = new SyncopeClientFactoryBean()
- .setAddress(SYNCOPE_PROPS.getString("syncope.rest.services"))
- .create(SYNCOPE_PROPS.getString("syncope.user"), SYNCOPE_PROPS.getString("syncope.password"));
-
- public static Object get(final Class<?> claz) {
- LOG.debug("Creting service for {}", claz.getName());
- return CLIENT.getService(claz);
- }
-
- private SyncopeServices() {
- // private constructor for static utility class
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/src/main/java/org/apache/syncope/cli/commands/AbstractCommand.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/syncope/cli/commands/AbstractCommand.java b/cli/src/main/java/org/apache/syncope/cli/commands/AbstractCommand.java
deleted file mode 100644
index e7cddd4..0000000
--- a/cli/src/main/java/org/apache/syncope/cli/commands/AbstractCommand.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.cli.commands;
-
-import com.beust.jcommander.Parameter;
-
-public abstract class AbstractCommand {
-
- @Parameter(names = {"-h", "--help"})
- protected boolean help = false;
-
- @Parameter(names = {"-l", "--list"})
- protected boolean list = false;
-
- protected abstract void execute();
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/src/main/java/org/apache/syncope/cli/commands/ConfigurationCommand.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/syncope/cli/commands/ConfigurationCommand.java b/cli/src/main/java/org/apache/syncope/cli/commands/ConfigurationCommand.java
deleted file mode 100644
index 5aea462..0000000
--- a/cli/src/main/java/org/apache/syncope/cli/commands/ConfigurationCommand.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.cli.commands;
-
-import com.beust.jcommander.DynamicParameter;
-import com.beust.jcommander.Parameter;
-import com.beust.jcommander.Parameters;
-import java.io.IOException;
-import java.io.SequenceInputStream;
-import java.util.HashMap;
-import java.util.Map;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.cli.SyncopeServices;
-import org.apache.syncope.cli.util.XmlUtils;
-import org.apache.syncope.common.SyncopeClientException;
-import org.apache.syncope.common.services.ConfigurationService;
-import org.apache.syncope.common.to.AttributeTO;
-import org.apache.syncope.common.to.ConfTO;
-import org.apache.syncope.common.wrap.MailTemplate;
-import org.apache.syncope.common.wrap.Validator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xml.sax.SAXException;
-
-@Parameters(
- commandNames = "config",
- optionPrefixes = "-",
- separators = "=",
- commandDescription = "Apache Syncope configuration service")
-public class ConfigurationCommand extends AbstractCommand {
-
- private static final Logger LOG = LoggerFactory.getLogger(ConfigurationCommand.class);
-
- private static final Class SYNCOPE_CONFIGURATION_CLASS = ConfigurationService.class;
-
- private static final String EXPORT_FILE_NAME = "/content.xml";
-
- private final String helpMessage = "Usage: config [options]\n"
- + " Options:\n"
- + " -h, --help \n"
- + " -l, --list \n"
- + " -r, --read \n"
- + " Syntax: -r={CONF-NAME} \n"
- + " -u, --update \n"
- + " Syntax: {CONF-NAME}={CONF-VALUE} \n"
- + " -c, --create \n"
- + " Syntax: {CONF-NAME}={CONF-VALUE} \n"
- + " -d, --delete \n"
- + " Syntax: -d={CONF-NAME}"
- + " -v, --validators \n"
- + " -mt, --mail-templates \n"
- + " -e, --export \n"
- + " Syntax: -e={WHERE-DIR} \n";
-
- @Parameter(names = {"-r", "--read"})
- public String confNameToRead;
-
- @DynamicParameter(names = {"-u", "--update"})
- private final Map<String, String> updateConf = new HashMap<String, String>();
-
- @DynamicParameter(names = {"-c", "--create"})
- private final Map<String, String> createConf = new HashMap<String, String>();
-
- @Parameter(names = {"-d", "--delete"})
- public String confNameToDelete;
-
- @Parameter(names = {"-v", "--validators"})
- public boolean validators = false;
-
- @Parameter(names = {"-mt", "--mail-templates"})
- public boolean mailTemplates = false;
-
- @Parameter(names = {"-e", "--export"})
- public String export;
-
- @Override
- public void execute() {
- final ConfigurationService configurationService = ((ConfigurationService) SyncopeServices.
- get(SYNCOPE_CONFIGURATION_CLASS));
-
- LOG.debug("Logger service successfully created");
-
- if (help) {
- LOG.debug("- configuration help command");
- System.out.println(helpMessage);
- } else if (list) {
- LOG.debug("- configuration list command");
- try {
- final ConfTO confTO = configurationService.list();
- for (final AttributeTO attrTO : confTO.getAttrMap().values()) {
- System.out.println(" - Conf " + attrTO.getSchema() + " has value(s) " + attrTO.getValues()
- + " - readonly: " + attrTO.isReadonly());
- }
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (StringUtils.isNotBlank(confNameToRead)) {
- LOG.debug("- configuration read {} command", confNameToRead);
- try {
- final AttributeTO attrTO = configurationService.read(confNameToRead);
- System.out.println(" - Conf " + attrTO.getSchema() + " has value(s) " + attrTO.getValues()
- + " - readonly: " + attrTO.isReadonly());
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (!updateConf.isEmpty()) {
- LOG.debug("- configuration update command with params {}", updateConf);
- try {
- for (final Map.Entry<String, String> entrySet : updateConf.entrySet()) {
- final AttributeTO attrTO = configurationService.read(entrySet.getKey());
- attrTO.getValues().clear();
- attrTO.getValues().add(entrySet.getValue());
- configurationService.set(entrySet.getKey(), attrTO);
- System.out.println(" - Conf " + attrTO.getSchema() + " has value(s) " + attrTO.getValues()
- + " - readonly: " + attrTO.isReadonly());
- }
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (!createConf.isEmpty()) {
- LOG.debug("- configuration create command with params {}", createConf);
- try {
- for (final Map.Entry<String, String> entrySet : createConf.entrySet()) {
- final AttributeTO attrTO = new AttributeTO();
- attrTO.setSchema(entrySet.getKey());
- attrTO.getValues().add(entrySet.getValue());
- configurationService.set(entrySet.getKey(), attrTO);
- System.out.println(" - Conf " + attrTO.getSchema() + " created with value(s) " + attrTO.getValues()
- + " - readonly: " + attrTO.isReadonly());
- }
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (StringUtils.isNotBlank(confNameToDelete)) {
- try {
- LOG.debug("- configuration delete {} command", confNameToDelete);
- configurationService.delete(confNameToDelete);
- System.out.println(" - Conf " + confNameToDelete + " deleted!");
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (validators) {
- LOG.debug("- configuration validators command");
- try {
- System.out.println("Conf validator class: ");
- for (final Validator validator : configurationService.getValidators()) {
- System.out.println(" *** " + validator.getElement());
- }
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (mailTemplates) {
- LOG.debug("- configuration mailTemplates command");
- try {
- System.out.println("Conf mail template for:");
- for (final MailTemplate mailTemplate : configurationService.getMailTemplates()) {
- System.out.println(" *** " + mailTemplate.getElement());
- }
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (StringUtils.isNotBlank(export)) {
- LOG.debug("- configuration export command, directory where xml will be export: {}", export);
-
- try {
- XmlUtils.createXMLFile((SequenceInputStream) configurationService.export().getEntity(), export
- + EXPORT_FILE_NAME);
- System.out.println(" - " + export + EXPORT_FILE_NAME + " successfully created");
- } catch (final IOException ex) {
- LOG.error("Error creating content.xml file in {} directory", export, ex);
- System.out.println(" - Error creating " + export + EXPORT_FILE_NAME + " " + ex.getMessage());
- } catch (final ParserConfigurationException ex) {
- LOG.error("Error creating content.xml file in {} directory", export, ex);
- System.out.println(" - Error creating " + export + EXPORT_FILE_NAME + " " + ex.getMessage());
- } catch (final SAXException ex) {
- LOG.error("Error creating content.xml file in {} directory", export, ex);
- System.out.println(" - Error creating " + export + EXPORT_FILE_NAME + " " + ex.getMessage());
- } catch (final TransformerConfigurationException ex) {
- LOG.error("Error creating content.xml file in {} directory", export, ex);
- System.out.println(" - Error creating " + export + EXPORT_FILE_NAME + " " + ex.getMessage());
- } catch (final TransformerException ex) {
- LOG.error("Error creating content.xml file in {} directory", export, ex);
- System.out.println(" - Error creating " + export + EXPORT_FILE_NAME + " " + ex.getMessage());
- } catch (final SyncopeClientException ex) {
- LOG.error("Error calling configuration service", ex);
- System.out.println(" - Error calling configuration service " + ex.getMessage());
- }
- } else {
- System.out.println(helpMessage);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/src/main/java/org/apache/syncope/cli/commands/EntitlementCommand.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/syncope/cli/commands/EntitlementCommand.java b/cli/src/main/java/org/apache/syncope/cli/commands/EntitlementCommand.java
deleted file mode 100644
index c63dbcb..0000000
--- a/cli/src/main/java/org/apache/syncope/cli/commands/EntitlementCommand.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.cli.commands;
-
-import com.beust.jcommander.Parameter;
-import com.beust.jcommander.Parameters;
-import org.apache.syncope.cli.SyncopeServices;
-import org.apache.syncope.common.services.EntitlementService;
-import org.apache.syncope.common.wrap.EntitlementTO;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@Parameters(
- commandNames = "entitlement",
- optionPrefixes = "-",
- separators = "=",
- commandDescription = "Apache Syncope entitlement service")
-public class EntitlementCommand extends AbstractCommand {
-
- private static final Logger LOG = LoggerFactory.getLogger(EntitlementCommand.class);
-
- private static final Class SYNCOPE_ENTITLEMENT_CLASS = EntitlementService.class;
-
- private final String helpMessage = "Usage: entitlement [options]\n"
- + " Options:\n"
- + " -h, --help \n"
- + " -l, --list \n"
- + " -lo, --list-own \n";
-
- @Parameter(names = {"-lo", "--list-own"})
- public boolean listOwn = false;
-
- @Override
- public void execute() {
- final EntitlementService entitlementService = (EntitlementService) SyncopeServices.
- get(SYNCOPE_ENTITLEMENT_CLASS);
- LOG.debug("Entitlement service successfully created");
-
- if (help) {
- LOG.debug("- entitlement help command");
- System.out.println(helpMessage);
- } else if (list) {
- System.out.println("All entitlement:");
- for (final EntitlementTO entitlementTO : entitlementService.getAllEntitlements()) {
- System.out.println(" *** " + entitlementTO.getElement());
- }
- } else if (listOwn) {
- System.out.println("All own entitlement:");
- for (final EntitlementTO entitlementTO : entitlementService.getOwnEntitlements()) {
- System.out.println(" *** " + entitlementTO.getElement());
- }
- } else {
- System.out.println(helpMessage);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/src/main/java/org/apache/syncope/cli/commands/LoggerCommand.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/syncope/cli/commands/LoggerCommand.java b/cli/src/main/java/org/apache/syncope/cli/commands/LoggerCommand.java
deleted file mode 100644
index f6007dd..0000000
--- a/cli/src/main/java/org/apache/syncope/cli/commands/LoggerCommand.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.cli.commands;
-
-import com.beust.jcommander.DynamicParameter;
-import com.beust.jcommander.Parameter;
-import com.beust.jcommander.Parameters;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.cli.SyncopeServices;
-import org.apache.syncope.common.SyncopeClientException;
-import org.apache.syncope.common.services.LoggerService;
-import org.apache.syncope.common.to.LoggerTO;
-import org.apache.syncope.common.types.LoggerLevel;
-import org.apache.syncope.common.types.LoggerType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@Parameters(
- commandNames = "logger",
- optionPrefixes = "-",
- separators = "=",
- commandDescription = "Apache Syncope logger service")
-public class LoggerCommand extends AbstractCommand {
-
- private static final Logger LOG = LoggerFactory.getLogger(LoggerCommand.class);
-
- private static final Class SYNCOPE_LOGGER_CLASS = LoggerService.class;
-
- private final String helpMessage = "Usage: logger [options]\n"
- + " Options:\n"
- + " -h, --help \n"
- + " -l, --list \n"
- + " -r, --read \n"
- + " Syntax: -r={LOG-NAME} \n"
- + " -u, --update \n"
- + " Syntax: {LOG-NAME}={LOG-LEVEL} \n"
- + " -ua, --update-all \n"
- + " Syntax: -ua={LOG-LEVEL} \n"
- + " -c, --create \n"
- + " Syntax: {LOG-NAME}={LOG-LEVEL} \n"
- + " -d, --delete \n"
- + " Syntax: -d={LOG-NAME}";
-
- @Parameter(names = {"-r", "--read"})
- public String logNameToRead;
-
- @DynamicParameter(names = {"-u", "--update"})
- private final Map<String, String> updateLogs = new HashMap<String, String>();
-
- @Parameter(names = {"-ua", "--update-all"})
- public String logLevel;
-
- @DynamicParameter(names = {"-c", "--create"})
- private final Map<String, String> createLogs = new HashMap<String, String>();
-
- @Parameter(names = {"-d", "--delete"})
- public String logNameToDelete;
-
- @Override
- public void execute() {
- final LoggerService loggerService = ((LoggerService) SyncopeServices.get(SYNCOPE_LOGGER_CLASS));
-
- LOG.debug("Logger service successfully created");
-
- if (help) {
- LOG.debug("- logger help command");
- System.out.println(helpMessage);
- } else if (list) {
- LOG.debug("- logger list command");
- try {
- for (final LoggerTO loggerTO : loggerService.list(LoggerType.LOG)) {
- System.out.println(" - " + loggerTO.getName() + " -> " + loggerTO.getLevel());
- }
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (StringUtils.isNotBlank(logNameToRead)) {
- LOG.debug("- logger read {} command", logNameToRead);
- try {
- final LoggerTO loggerTO = loggerService.read(LoggerType.LOG, logNameToRead);
- System.out.println(" - Logger " + loggerTO.getName() + " with level -> " + loggerTO.getLevel());
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (!updateLogs.isEmpty()) {
- LOG.debug("- logger update command with params {}", updateLogs);
-
- for (final Map.Entry<String, String> log : updateLogs.entrySet()) {
- final LoggerTO loggerTO = loggerService.read(LoggerType.LOG, log.getKey());
- try {
- loggerTO.setLevel(LoggerLevel.valueOf(log.getValue()));
- loggerService.update(LoggerType.LOG, loggerTO.getName(), loggerTO);
- System.out.println(" - Logger " + loggerTO.getName() + " new level -> " + loggerTO.getLevel());
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- } catch (final IllegalArgumentException ex) {
- System.out.println(" - Error: " + log.getValue() + " isn't a valid logger level, try with:");
- for (final LoggerLevel level : LoggerLevel.values()) {
- System.out.println(" *** " + level.name());
- }
- }
- }
- } else if (StringUtils.isNotBlank(logLevel)) {
- LOG.debug("- logger update all command with level {}", logLevel);
- for (final LoggerTO loggerTO : loggerService.list(LoggerType.LOG)) {
- try {
- loggerTO.setLevel(LoggerLevel.valueOf(logLevel));
- loggerService.update(LoggerType.LOG, loggerTO.getName(), loggerTO);
- System.out.println(" - Logger " + loggerTO.getName() + " new level -> " + loggerTO.getLevel());
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- } catch (final IllegalArgumentException ex) {
- System.out.println(" - Error: " + loggerTO.getLevel() + " isn't a valid logger level, try with:");
- for (final LoggerLevel level : LoggerLevel.values()) {
- System.out.println(" *** " + level.name());
- }
- }
- }
- } else if (!createLogs.isEmpty()) {
- LOG.debug("- logger create command with params {}", createLogs);
-
- for (final Map.Entry<String, String> entrySet : createLogs.entrySet()) {
- final LoggerTO loggerTO = new LoggerTO();
- try {
- loggerTO.setName(entrySet.getKey());
- loggerTO.setLevel(LoggerLevel.valueOf(entrySet.getValue()));
- loggerService.update(LoggerType.LOG, loggerTO.getName(), loggerTO);
- System.out.println(" - Logger " + loggerTO.getName() + " created with level -> " + loggerTO.
- getLevel());
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- } catch (final IllegalArgumentException ex) {
- System.out.println(" - Error: " + loggerTO.getLevel() + " isn't a valid logger level, try with:");
- for (final LoggerLevel level : LoggerLevel.values()) {
- System.out.println(" *** " + level.name());
- }
- }
- }
- } else if (StringUtils.isNotBlank(logNameToDelete)) {
- try {
- LOG.debug("- logger delete {} command", logNameToDelete);
- loggerService.delete(LoggerType.LOG, logNameToDelete);
- System.out.println(" - Logger " + logNameToDelete + " deleted!");
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else {
- System.out.println(helpMessage);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/src/main/java/org/apache/syncope/cli/commands/NotificationCommand.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/syncope/cli/commands/NotificationCommand.java b/cli/src/main/java/org/apache/syncope/cli/commands/NotificationCommand.java
deleted file mode 100644
index fdc0d37..0000000
--- a/cli/src/main/java/org/apache/syncope/cli/commands/NotificationCommand.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.cli.commands;
-
-import com.beust.jcommander.Parameter;
-import com.beust.jcommander.Parameters;
-import org.apache.syncope.cli.SyncopeServices;
-import org.apache.syncope.common.SyncopeClientException;
-import org.apache.syncope.common.services.NotificationService;
-import org.apache.syncope.common.to.NotificationTO;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@Parameters(
- commandNames = "notification",
- optionPrefixes = "-",
- separators = "=",
- commandDescription = "Apache Syncope notification service")
-public class NotificationCommand extends AbstractCommand {
-
- private static final Logger LOG = LoggerFactory.getLogger(NotificationCommand.class);
-
- private static final Class SYNCOPE_NOTIFICATION_CLASS = NotificationService.class;
-
- private final String helpMessage = "Usage: notification [options]\n"
- + " Options:\n"
- + " -h, --help \n"
- + " -l, --list \n"
- + " -r, --read \n"
- + " Syntax: -r={NOTIFICATION-ID} \n"
- + " -d, --delete \n"
- + " Syntax: -d={NOTIFICATION-ID}";
-
- @Parameter(names = {"-r", "--read"})
- public Long notificationIdToRead = -1L;
-
- @Parameter(names = {"-d", "--delete"})
- public Long notificationIdToDelete = -1L;
-
- @Override
- public void execute() {
- final NotificationService notificationService = ((NotificationService) SyncopeServices.get(
- SYNCOPE_NOTIFICATION_CLASS));
-
- LOG.debug("Notification service successfully created");
-
- if (help) {
- LOG.debug("- notification help command");
- System.out.println(helpMessage);
- } else if (list) {
- LOG.debug("- notification list command");
- try {
- for (final NotificationTO notificationTO : notificationService.list()) {
- System.out.println(notificationTO);
- }
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (notificationIdToRead > -1L) {
- LOG.debug("- notification read {} command", notificationIdToRead);
- try {
- System.out.println(notificationService.read(notificationIdToRead));
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (notificationIdToDelete > -1L) {
- try {
- LOG.debug("- notification delete {} command", notificationIdToDelete);
- notificationService.delete(notificationIdToDelete);
- System.out.println(" - Notification " + notificationIdToDelete + " deleted!");
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else {
- System.out.println(helpMessage);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/src/main/java/org/apache/syncope/cli/commands/PolicyCommand.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/syncope/cli/commands/PolicyCommand.java b/cli/src/main/java/org/apache/syncope/cli/commands/PolicyCommand.java
deleted file mode 100644
index d1574eb..0000000
--- a/cli/src/main/java/org/apache/syncope/cli/commands/PolicyCommand.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.cli.commands;
-
-import com.beust.jcommander.Parameter;
-import com.beust.jcommander.Parameters;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.cli.SyncopeServices;
-import org.apache.syncope.common.SyncopeClientException;
-import org.apache.syncope.common.services.PolicyService;
-import org.apache.syncope.common.to.AbstractPolicyTO;
-import org.apache.syncope.common.types.PolicyType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@Parameters(
- commandNames = "policy",
- optionPrefixes = "-",
- separators = "=",
- commandDescription = "Apache Syncope policy service")
-public class PolicyCommand extends AbstractCommand {
-
- private static final Logger LOG = LoggerFactory.getLogger(PolicyCommand.class);
-
- private static final Class SYNCOPE_POLICY_CLASS = PolicyService.class;
-
- private final String helpMessage = "Usage: policy [options]\n"
- + " Options:\n"
- + " -h, --help \n"
- + " -l, --list \n"
- + " -ll, --list-policy \n"
- + " Syntax: -ll={POLICY-TYPE} \n"
- + " -r, --read \n"
- + " Syntax: -r={POLICY-ID} \n"
- + " -d, --delete \n"
- + " Syntax: -d={POLICY-ID}";
-
- @Parameter(names = {"-ll", "--list-policy"})
- public String policyType;
-
- @Parameter(names = {"-r", "--read"})
- public Long policyIdToRead = -1L;
-
- @Parameter(names = {"-d", "--delete"})
- public Long policyIdToDelete = -1L;
-
- @Override
- public void execute() {
- final PolicyService policyService = (PolicyService) SyncopeServices.get(SYNCOPE_POLICY_CLASS);
- LOG.debug("Policy service successfully created");
-
- if (help) {
- LOG.debug("- policy help command");
- System.out.println(helpMessage);
- } else if (list) {
-
- } else if (StringUtils.isNotBlank(policyType)) {
- LOG.debug("- policy list command for type {}", policyType);
- try {
- for (final AbstractPolicyTO policyTO : policyService.list(PolicyType.valueOf(policyType))) {
- System.out.println(policyTO);
- }
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- } catch (final IllegalArgumentException ex) {
- System.out.println(" - Error: " + policyType + " isn't a valid policy type, try with:");
- for (final PolicyType type : PolicyType.values()) {
- System.out.println(" *** " + type.name() + ": " + type.getDescription());
- }
- }
- } else if (policyIdToRead > -1L) {
- LOG.debug("- policy read {} command", policyIdToRead);
- try {
- System.out.println(policyService.read(policyIdToRead));
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (policyIdToDelete > -1L) {
- try {
- LOG.debug("- policy delete {} command", policyIdToDelete);
- policyService.delete(policyIdToDelete);
- System.out.println(" - Report " + policyIdToDelete + " deleted!");
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else {
- System.out.println(helpMessage);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/src/main/java/org/apache/syncope/cli/commands/ReportCommand.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/syncope/cli/commands/ReportCommand.java b/cli/src/main/java/org/apache/syncope/cli/commands/ReportCommand.java
deleted file mode 100644
index 721503b..0000000
--- a/cli/src/main/java/org/apache/syncope/cli/commands/ReportCommand.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.cli.commands;
-
-import com.beust.jcommander.Parameter;
-import com.beust.jcommander.Parameters;
-import java.io.IOException;
-import java.io.SequenceInputStream;
-import java.util.List;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import org.apache.syncope.cli.SyncopeServices;
-import org.apache.syncope.cli.util.XmlUtils;
-import org.apache.syncope.common.SyncopeClientException;
-import org.apache.syncope.common.services.ReportService;
-import org.apache.syncope.common.to.ReportExecTO;
-import org.apache.syncope.common.to.ReportTO;
-import org.apache.syncope.common.types.ReportExecExportFormat;
-import org.apache.syncope.common.wrap.ReportletConfClass;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xml.sax.SAXException;
-
-@Parameters(
- commandNames = "report",
- optionPrefixes = "-",
- separators = "=",
- commandDescription = "Apache Syncope report service")
-public class ReportCommand extends AbstractCommand {
-
- private static final Logger LOG = LoggerFactory.getLogger(ReportCommand.class);
-
- private static final Class SYNCOPE_REPORT_CLASS = ReportService.class;
-
- private final String helpMessage = "Usage: report [options]\n"
- + " Options:\n"
- + " -h, --help \n"
- + " -l, --list \n"
- + " -r, --read \n"
- + " Syntax: -r={POLICY-ID} \n"
- + " -d, --delete \n"
- + " Syntax: -d={POLICY-ID} \n"
- + " -e, --execute \n"
- + " Syntax: -e={POLICY-ID} \n"
- + " -re, --read-executecution \n"
- + " Syntax: -re={EXECUTION-ID} \n"
- + " -de, --delete-executecution \n"
- + " Syntax: -de={EXECUTION-ID} \n"
- + " -eer, --export-executecution-result \n"
- + " Syntax: -eer={EXECUTION-ID} \n"
- + " -rc, --reportlet-class";
-
- @Parameter(names = {"-r", "--read"})
- public Long reportIdToRead = -1L;
-
- @Parameter(names = {"-d", "--delete"})
- public Long reportIdToDelete = -1L;
-
- @Parameter(names = {"-e", "--execute"})
- public Long reportIdToExecute = -1L;
-
- @Parameter(names = {"-re", "--read-execution"})
- public Long executionIdToRead = -1L;
-
- @Parameter(names = {"-de", "--delete-execution"})
- public Long executionIdToDelete = -1L;
-
- @Parameter(names = {"-eer", "--export-execution-result"})
- public Long exportId = -1L;
-
- @Parameter(names = {"-rc", "--reportlet-class"})
- public boolean reportletClass = false;
-
- @Override
- public void execute() {
- final ReportService reportService = (ReportService) SyncopeServices.get(SYNCOPE_REPORT_CLASS);
- LOG.debug("Report service successfully created");
-
- if (help) {
- LOG.debug("- report help command");
- System.out.println(helpMessage);
- } else if (list) {
- LOG.debug("- report list command");
- try {
- for (final ReportTO reportTO : reportService.list().getResult()) {
- System.out.println(reportTO);
- }
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (reportIdToRead > -1L) {
- LOG.debug("- report read {} command", reportIdToRead);
- try {
- System.out.println(reportService.read(reportIdToRead));
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (reportIdToDelete > -1L) {
- try {
- LOG.debug("- report delete {} command", reportIdToDelete);
- reportService.delete(reportIdToDelete);
- System.out.println(" - Report " + reportIdToDelete + " deleted!");
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (reportIdToExecute > -1L) {
- try {
- LOG.debug("- report execute {} command", reportIdToExecute);
- reportService.execute(reportIdToExecute);
- final List<ReportExecTO> executionList = reportService.read(reportIdToExecute).getExecutions();
- final ReportExecTO lastExecution = executionList.get(executionList.size() - 1);
- System.out.println(" - Report execution id: " + lastExecution.getId());
- System.out.println(" - Report execution status: " + lastExecution.getStatus());
- System.out.println(" - Report execution start date: " + lastExecution.getStartDate());
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (executionIdToRead > -1L) {
- try {
- LOG.debug("- report execution read {} command", executionIdToRead);
- ReportExecTO reportExecTO = reportService.readExecution(executionIdToRead);
- System.out.println(" - Report execution id: " + reportExecTO.getId());
- System.out.println(" - Report execution status: " + reportExecTO.getStatus());
- System.out.println(" - Report execution start date: " + reportExecTO.getStartDate());
- System.out.println(" - Report execution end date: " + reportExecTO.getEndDate());
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (executionIdToDelete > -1L) {
- try {
- LOG.debug("- report execution delete {} command", executionIdToDelete);
- reportService.deleteExecution(executionIdToDelete);
- System.out.println(" - Report execution " + executionIdToDelete + "successfyllt deleted!");
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else if (exportId > -1L) {
- LOG.debug("- report export command for report: {}", exportId);
-
- try {
- XmlUtils.createXMLFile((SequenceInputStream) reportService.exportExecutionResult(exportId,
- ReportExecExportFormat.XML).getEntity(), "export_" + exportId + ".xml");
- System.out.println(" - " + "export_" + exportId + " successfully created");
- } catch (final IOException ex) {
- LOG.error("Error creating xml file", ex);
- System.out.println(" - Error creating " + "export_" + exportId + " " + ex.getMessage());
- } catch (final ParserConfigurationException ex) {
- LOG.error("Error creating xml file", ex);
- System.out.println(" - Error creating " + "export_" + exportId + " " + ex.getMessage());
- } catch (final SAXException ex) {
- LOG.error("Error creating xml file", ex);
- System.out.println(" - Error creating " + "export_" + exportId + " " + ex.getMessage());
- } catch (final TransformerConfigurationException ex) {
- LOG.error("Error creating xml file", ex);
- System.out.println(" - Error creating " + "export_" + exportId + " " + ex.getMessage());
- } catch (final TransformerException ex) {
- LOG.error("Error creating xml file", ex);
- System.out.println(" - Error creating export_" + exportId + " " + ex.getMessage());
- } catch (final SyncopeClientException ex) {
- LOG.error("Error calling configuration service", ex);
- System.out.println(" - Error calling configuration service " + ex.getMessage());
- }
- } else if (reportletClass) {
- try {
- LOG.debug("- reportlet configuration class list command");
- System.out.println("Reportlet conf classes");
- for (final ReportletConfClass reportletConfClass : reportService.getReportletConfClasses()) {
- System.out.println(" *** " + reportletConfClass.getElement());
- }
- } catch (final SyncopeClientException ex) {
- System.out.println(" - Error: " + ex.getMessage());
- }
- } else {
- System.out.println(helpMessage);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/src/main/java/org/apache/syncope/cli/util/XmlUtils.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/syncope/cli/util/XmlUtils.java b/cli/src/main/java/org/apache/syncope/cli/util/XmlUtils.java
deleted file mode 100644
index 6a8b2e8..0000000
--- a/cli/src/main/java/org/apache/syncope/cli/util/XmlUtils.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.cli.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.SequenceInputStream;
-import java.io.StringReader;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import org.apache.cxf.helpers.IOUtils;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-public class XmlUtils {
-
- public static void createXMLFile(SequenceInputStream sis, String filePath)
- throws TransformerConfigurationException, TransformerException, SAXException, IOException,
- ParserConfigurationException {
- TransformerFactory.newInstance().newTransformer()
- .transform(new DOMSource(DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(
- new InputSource(new StringReader(IOUtils.toString(sis))))),
- new StreamResult(new File(filePath)));
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/src/main/java/org/apache/syncope/cli/validators/DebugLevelValidator.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/syncope/cli/validators/DebugLevelValidator.java b/cli/src/main/java/org/apache/syncope/cli/validators/DebugLevelValidator.java
deleted file mode 100644
index ce2389b..0000000
--- a/cli/src/main/java/org/apache/syncope/cli/validators/DebugLevelValidator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.cli.validators;
-
-import com.beust.jcommander.IParameterValidator;
-import com.beust.jcommander.ParameterException;
-
-public class DebugLevelValidator implements IParameterValidator {
-
- @Override
- public void validate(final String name, final String value) throws ParameterException {
- if (!Levels.contains(value)) {
- final StringBuilder exceptionMessage = new StringBuilder();
- exceptionMessage.append("Parameter ")
- .append(name)
- .append(" should be :\n");
- for (final Levels l : Levels.values()) {
- exceptionMessage.append(l).append("\n");
- }
- System.out.println(">>>> " + exceptionMessage.toString());
- }
- }
-
- private enum Levels {
-
- OFF,
- FATAL,
- ERROR,
- WARN,
- INFO,
- DEBUG,
- TRACE,
- ALL;
-
- public static boolean contains(final String name) {
- for (final Levels c : Levels.values()) {
- if (c.name().equals(name)) {
- return true;
- }
- }
- return false;
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/src/main/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/cli/src/main/resources/log4j2.xml b/cli/src/main/resources/log4j2.xml
deleted file mode 100644
index 0688f6b..0000000
--- a/cli/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
--->
-<configuration status="WARN">
-
- <appenders>
-
- <RollingRandomAccessFile name="main" fileName="${log.directory}/cli.log"
- filePattern="${log.directory}/cli-%d{yyyy-MM-dd}.log.gz"
- immediateFlush="false" append="true">
- <PatternLayout>
- <pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern>
- </PatternLayout>
- <Policies>
- <TimeBasedTriggeringPolicy/>
- <SizeBasedTriggeringPolicy size="250 MB"/>
- </Policies>
- </RollingRandomAccessFile>
-
- </appenders>
-
- <loggers>
-
- <asyncLogger name="com.beust" additivity="false" level="DEBUG">
- <appender-ref ref="main"/>
- </asyncLogger>
-
- <asyncLogger name="org.apache.syncope.cli" additivity="false" level="DEBUG">
- <appender-ref ref="main"/>
- </asyncLogger>
-
- <asyncLogger name="org.apache.syncope.client" additivity="false" level="OFF">
- <appender-ref ref="main"/>
- </asyncLogger>
-
- <root level="DEBUG">
- <appender-ref ref="main"/>
- </root>
-
- </loggers>
-
-</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/cli/src/main/resources/syncope.properties
----------------------------------------------------------------------
diff --git a/cli/src/main/resources/syncope.properties b/cli/src/main/resources/syncope.properties
deleted file mode 100644
index 9f84a72..0000000
--- a/cli/src/main/resources/syncope.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you 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.
-syncope.rest.services=http://localhost:9080/syncope/rest/
-syncope.user=admin
-syncope.password=password
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/cli/pom.xml
----------------------------------------------------------------------
diff --git a/client/cli/pom.xml b/client/cli/pom.xml
new file mode 100644
index 0000000..2bb050d
--- /dev/null
+++ b/client/cli/pom.xml
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.syncope</groupId>
+ <artifactId>syncope-client</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>Apache Syncope Client CLI</name>
+ <description>Apache Syncope Client CLI</description>
+
+ <groupId>org.apache.syncope</groupId>
+ <artifactId>syncope-client-cli</artifactId>
+ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.beust</groupId>
+ <artifactId>jcommander</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.syncope.client</groupId>
+ <artifactId>syncope-client-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.lmax</groupId>
+ <artifactId>disruptor</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+
+ <defaultGoal>package</defaultGoal>
+
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>
+ project.properties['log.directory'] = System.getProperty("java.io.tmpdir")
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <createDependencyReducedPom>false</createDependencyReducedPom>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+ <manifestEntries>
+ <Main-Class>org.apache.syncope.cli.SyncopeAdm</Main-Class>
+ </manifestEntries>
+ </transformer>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+ <resource>messages.properties</resource>
+ <file>src/main/resources/messages.properties</file>
+ </transformer>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+ <resource>messages_it_IT.properties</resource>
+ <file>src/main/resources/messages_it_IT.properties</file>
+ </transformer>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+ <resource>META-INF/spring.handlers</resource>
+ </transformer>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+ <resource>META-INF/spring.schemas</resource>
+ </transformer>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+ <resource>META-INF/cxf/bus-extensions.txt</resource>
+ </transformer>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
+ <resource>META-INF/wsdl.plugin.xml</resource>
+ </transformer>
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+
+ <resource>
+ <directory>../..</directory>
+ <targetPath>META-INF</targetPath>
+ <includes>
+ <include>LICENSE</include>
+ <include>NOTICE</include>
+ </includes>
+ </resource>
+ </resources>
+
+ </build>
+
+ <profiles>
+ <profile>
+ <id>apache-release</id>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
[07/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/ReportTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/ReportTO.java b/common/src/main/java/org/apache/syncope/common/to/ReportTO.java
deleted file mode 100644
index 191de26..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/ReportTO.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.report.AbstractReportletConf;
-
-@XmlRootElement(name = "report")
-@XmlType
-public class ReportTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = 5274568072084814410L;
-
- private long id;
-
- private String name;
-
- private List<AbstractReportletConf> reportletConfs = new ArrayList<AbstractReportletConf>();
-
- private String cronExpression;
-
- private List<ReportExecTO> executions = new ArrayList<ReportExecTO>();
-
- private String latestExecStatus;
-
- private Date lastExec;
-
- private Date nextExec;
-
- private Date startDate;
-
- private Date endDate;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- @XmlElementWrapper(name = "reportletConfs")
- @XmlElement(name = "reportletConf")
- @JsonProperty("reportletConfs")
- public List<AbstractReportletConf> getReportletConfs() {
- return reportletConfs;
- }
-
- public String getCronExpression() {
- return cronExpression;
- }
-
- public void setCronExpression(final String cronExpression) {
- this.cronExpression = cronExpression;
- }
-
- @XmlElementWrapper(name = "executions")
- @XmlElement(name = "execution")
- @JsonProperty("executions")
- public List<ReportExecTO> getExecutions() {
- return executions;
- }
-
- public String getLatestExecStatus() {
- return latestExecStatus;
- }
-
- public void setLatestExecStatus(final String latestExecStatus) {
- this.latestExecStatus = latestExecStatus;
- }
-
- public Date getLastExec() {
- return lastExec == null
- ? null
- : new Date(lastExec.getTime());
- }
-
- public void setLastExec(final Date lastExec) {
- if (lastExec != null) {
- this.lastExec = new Date(lastExec.getTime());
- }
- }
-
- public Date getNextExec() {
- return nextExec == null
- ? null
- : new Date(nextExec.getTime());
- }
-
- public void setNextExec(final Date nextExec) {
- if (nextExec != null) {
- this.nextExec = new Date(nextExec.getTime());
- }
- }
-
- public Date getStartDate() {
- return startDate == null
- ? null
- : new Date(startDate.getTime());
- }
-
- public void setStartDate(final Date startDate) {
- if (startDate != null) {
- this.startDate = new Date(startDate.getTime());
- }
- }
-
- public Date getEndDate() {
- return endDate == null
- ? null
- : new Date(endDate.getTime());
- }
-
- public void setEndDate(final Date endDate) {
- if (endDate != null) {
- this.endDate = new Date(endDate.getTime());
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java b/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java
deleted file mode 100644
index 676aa76..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.types.ConnConfProperty;
-import org.apache.syncope.common.types.PropagationMode;
-import org.apache.syncope.common.types.TraceLevel;
-
-@XmlRootElement(name = "resource")
-@XmlType
-public class ResourceTO extends AbstractSysInfoTO {
-
- private static final long serialVersionUID = -9193551354041698963L;
-
- /**
- * The resource identifier is the name.
- */
- private String name;
-
- /**
- * The resource type is identified by the associated connector.
- */
- private Long connectorId;
-
- /**
- * Convenience information: display name for the connector id.
- */
- private String connectorDisplayName;
-
- private MappingTO umapping;
-
- private MappingTO rmapping;
-
- private boolean propagationPrimary;
-
- private int propagationPriority;
-
- private boolean randomPwdIfNotProvided;
-
- private PropagationMode propagationMode;
-
- private boolean enforceMandatoryCondition;
-
- private TraceLevel createTraceLevel;
-
- private TraceLevel updateTraceLevel;
-
- private TraceLevel deleteTraceLevel;
-
- private TraceLevel syncTraceLevel;
-
- private Long passwordPolicy;
-
- private Long accountPolicy;
-
- private Long syncPolicy;
-
- private Set<ConnConfProperty> connConfProperties;
-
- private String usyncToken;
-
- private String rsyncToken;
-
- private List<String> propagationActionsClassNames = new ArrayList<String>();
-
- public ResourceTO() {
- super();
-
- connConfProperties = new HashSet<ConnConfProperty>();
- propagationMode = PropagationMode.TWO_PHASES;
- propagationPriority = 0;
-
- createTraceLevel = TraceLevel.ALL;
- updateTraceLevel = TraceLevel.ALL;
- deleteTraceLevel = TraceLevel.ALL;
- syncTraceLevel = TraceLevel.ALL;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public boolean isEnforceMandatoryCondition() {
- return enforceMandatoryCondition;
- }
-
- public void setEnforceMandatoryCondition(boolean enforceMandatoryCondition) {
- this.enforceMandatoryCondition = enforceMandatoryCondition;
- }
-
- public Long getConnectorId() {
- return connectorId;
- }
-
- public void setConnectorId(Long connectorId) {
- this.connectorId = connectorId;
- }
-
- public String getConnectorDisplayName() {
- return connectorDisplayName;
- }
-
- public void setConnectorDisplayName(String connectorDisplayName) {
- this.connectorDisplayName = connectorDisplayName;
- }
-
- public MappingTO getUmapping() {
- return umapping;
- }
-
- public void setUmapping(MappingTO umapping) {
- this.umapping = umapping;
- }
-
- public MappingTO getRmapping() {
- return rmapping;
- }
-
- public void setRmapping(MappingTO rmapping) {
- this.rmapping = rmapping;
- }
-
- public boolean isPropagationPrimary() {
- return propagationPrimary;
- }
-
- public void setPropagationPrimary(boolean propagationPrimary) {
- this.propagationPrimary = propagationPrimary;
- }
-
- public int getPropagationPriority() {
- return propagationPriority;
- }
-
- public void setPropagationPriority(int propagationPriority) {
- this.propagationPriority = propagationPriority;
- }
-
- public boolean isRandomPwdIfNotProvided() {
- return randomPwdIfNotProvided;
- }
-
- public void setRandomPwdIfNotProvided(boolean randomPwdIfNotProvided) {
- this.randomPwdIfNotProvided = randomPwdIfNotProvided;
- }
-
- public PropagationMode getPropagationMode() {
- return propagationMode;
- }
-
- public void setPropagationMode(PropagationMode propagationMode) {
- this.propagationMode = propagationMode;
- }
-
- public TraceLevel getCreateTraceLevel() {
- return createTraceLevel;
- }
-
- public void setCreateTraceLevel(TraceLevel createTraceLevel) {
- this.createTraceLevel = createTraceLevel;
- }
-
- public TraceLevel getDeleteTraceLevel() {
- return deleteTraceLevel;
- }
-
- public void setDeleteTraceLevel(TraceLevel deleteTraceLevel) {
- this.deleteTraceLevel = deleteTraceLevel;
- }
-
- public TraceLevel getUpdateTraceLevel() {
- return updateTraceLevel;
- }
-
- public void setUpdateTraceLevel(TraceLevel updateTraceLevel) {
- this.updateTraceLevel = updateTraceLevel;
- }
-
- public Long getPasswordPolicy() {
- return passwordPolicy;
- }
-
- public void setPasswordPolicy(Long passwordPolicy) {
- this.passwordPolicy = passwordPolicy;
- }
-
- public Long getAccountPolicy() {
- return accountPolicy;
- }
-
- public void setAccountPolicy(Long accountPolicy) {
- this.accountPolicy = accountPolicy;
- }
-
- public Long getSyncPolicy() {
- return syncPolicy;
- }
-
- public void setSyncPolicy(Long syncPolicy) {
- this.syncPolicy = syncPolicy;
- }
-
- @XmlElementWrapper(name = "connConfProperties")
- @XmlElement(name = "property")
- @JsonProperty("connConfProperties")
- public Set<ConnConfProperty> getConnConfProperties() {
- return connConfProperties;
- }
-
- public TraceLevel getSyncTraceLevel() {
- return syncTraceLevel;
- }
-
- public void setSyncTraceLevel(final TraceLevel syncTraceLevel) {
- this.syncTraceLevel = syncTraceLevel;
- }
-
- public String getUsyncToken() {
- return usyncToken;
- }
-
- public void setUsyncToken(final String syncToken) {
- this.usyncToken = syncToken;
- }
-
- public String getRsyncToken() {
- return rsyncToken;
- }
-
- public void setRsyncToken(final String syncToken) {
- this.rsyncToken = syncToken;
- }
-
- @XmlElementWrapper(name = "propagationActionsClassNames")
- @XmlElement(name = "propagationActionsClassName")
- @JsonProperty("propagationActionsClassNames")
- public List<String> getPropagationActionsClassNames() {
- return propagationActionsClassNames;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/RoleTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/RoleTO.java b/common/src/main/java/org/apache/syncope/common/to/RoleTO.java
deleted file mode 100644
index 245ea07..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/RoleTO.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "role")
-@XmlType
-@JsonIgnoreProperties({ "displayName" })
-public class RoleTO extends AbstractSubjectTO {
-
- private static final long serialVersionUID = -7785920258290147542L;
-
- private String name;
-
- private long parent;
-
- private Long userOwner;
-
- private Long roleOwner;
-
- private boolean inheritOwner;
-
- private boolean inheritTemplates;
-
- private boolean inheritAttrs;
-
- private boolean inheritDerAttrs;
-
- private boolean inheritVirAttrs;
-
- private boolean inheritPasswordPolicy;
-
- private boolean inheritAccountPolicy;
-
- private final List<String> entitlements = new ArrayList<String>();
-
- private List<String> rAttrTemplates = new ArrayList<String>();
-
- private List<String> rDerAttrTemplates = new ArrayList<String>();
-
- private List<String> rVirAttrTemplates = new ArrayList<String>();
-
- private List<String> mAttrTemplates = new ArrayList<String>();
-
- private List<String> mDerAttrTemplates = new ArrayList<String>();
-
- private List<String> mVirAttrTemplates = new ArrayList<String>();
-
- private Long passwordPolicy;
-
- private Long accountPolicy;
-
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- public long getParent() {
- return parent;
- }
-
- public void setParent(final long parent) {
- this.parent = parent;
- }
-
- public Long getUserOwner() {
- return userOwner;
- }
-
- public void setUserOwner(final Long userOwner) {
- this.userOwner = userOwner;
- }
-
- public Long getRoleOwner() {
- return roleOwner;
- }
-
- public void setRoleOwner(final Long roleOwner) {
- this.roleOwner = roleOwner;
- }
-
- public boolean isInheritOwner() {
- return inheritOwner;
- }
-
- public void setInheritOwner(final boolean inheritOwner) {
- this.inheritOwner = inheritOwner;
- }
-
- public boolean isInheritTemplates() {
- return inheritTemplates;
- }
-
- public void setInheritTemplates(boolean inheritTemplates) {
- this.inheritTemplates = inheritTemplates;
- }
-
- public boolean isInheritAttrs() {
- return inheritAttrs;
- }
-
- public void setInheritAttrs(final boolean inheritAttrs) {
- this.inheritAttrs = inheritAttrs;
- }
-
- public boolean isInheritDerAttrs() {
- return inheritDerAttrs;
- }
-
- public void setInheritDerAttrs(final boolean inheritDerAttrs) {
- this.inheritDerAttrs = inheritDerAttrs;
- }
-
- public boolean isInheritVirAttrs() {
- return inheritVirAttrs;
- }
-
- public void setInheritVirAttrs(final boolean inheritVirAttrs) {
- this.inheritVirAttrs = inheritVirAttrs;
- }
-
- @XmlElementWrapper(name = "entitlements")
- @XmlElement(name = "entitlement")
- @JsonProperty("entitlements")
- public List<String> getEntitlements() {
- return entitlements;
- }
-
- @XmlElementWrapper(name = "rAttrTemplates")
- @XmlElement(name = "rAttrTemplate")
- @JsonProperty("rAttrTemplates")
- public List<String> getRAttrTemplates() {
- return rAttrTemplates;
- }
-
- @XmlElementWrapper(name = "rDerAttrTemplates")
- @XmlElement(name = "rDerAttrTemplate")
- @JsonProperty("rDerAttrTemplates")
- public List<String> getRDerAttrTemplates() {
- return rDerAttrTemplates;
- }
-
- @XmlElementWrapper(name = "rVirAttrTemplates")
- @XmlElement(name = "rVirAttrTemplate")
- @JsonProperty("rVirAttrTemplates")
- public List<String> getRVirAttrTemplates() {
- return rVirAttrTemplates;
- }
-
- @XmlElementWrapper(name = "mAttrTemplates")
- @XmlElement(name = "mAttrTemplate")
- @JsonProperty("mAttrTemplates")
- public List<String> getMAttrTemplates() {
- return mAttrTemplates;
- }
-
- @XmlElementWrapper(name = "mDerAttrTemplates")
- @XmlElement(name = "mDerAttrTemplate")
- @JsonProperty("mDerAttrTemplates")
- public List<String> getMDerAttrTemplates() {
- return mDerAttrTemplates;
- }
-
- @XmlElementWrapper(name = "mVirAttrTemplates")
- @XmlElement(name = "mVirAttrTemplate")
- @JsonProperty("mVirAttrTemplates")
- public List<String> getMVirAttrTemplates() {
- return mVirAttrTemplates;
- }
-
- public Long getPasswordPolicy() {
- return passwordPolicy;
- }
-
- public void setPasswordPolicy(final Long passwordPolicy) {
- this.passwordPolicy = passwordPolicy;
- }
-
- public boolean isInheritPasswordPolicy() {
- return inheritPasswordPolicy;
- }
-
- /**
- * Specify if password policy must be inherited. In this case eventual passwordPolicy occurrence will be ignored.
- *
- * @param inheritPasswordPolicy 'true' to inherit policy, false otherwise.
- */
- public void setInheritPasswordPolicy(final boolean inheritPasswordPolicy) {
- this.inheritPasswordPolicy = inheritPasswordPolicy;
- }
-
- public Long getAccountPolicy() {
- return accountPolicy;
- }
-
- public void setAccountPolicy(final Long accountPolicy) {
- this.accountPolicy = accountPolicy;
- }
-
- public boolean isInheritAccountPolicy() {
- return inheritAccountPolicy;
- }
-
- /**
- * Specify if account policy must be inherited. In this case eventual accountPolicy occurrence will be ignored.
- *
- * @param inheritAccountPolicy 'true' to inherit policy, false otherwise.
- */
- public void setInheritAccountPolicy(final boolean inheritAccountPolicy) {
- this.inheritAccountPolicy = inheritAccountPolicy;
- }
-
- public String getDisplayName() {
- return getId() + " " + getName();
- }
-
- public static long fromDisplayName(final String displayName) {
- long result = 0;
- if (displayName != null && !displayName.isEmpty() && displayName.indexOf(' ') != -1) {
- try {
- result = Long.valueOf(displayName.split(" ")[0]);
- } catch (NumberFormatException e) {
- // just to avoid PMD warning about "empty catch block"
- result = 0;
- }
- }
-
- return result;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/RouteTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/RouteTO.java b/common/src/main/java/org/apache/syncope/common/to/RouteTO.java
deleted file mode 100644
index 9b6f25f..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/RouteTO.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.types.SubjectType;
-
-@XmlRootElement(name = "route")
-@XmlType
-public class RouteTO extends AbstractBaseBean {
-
- private Long id;
-
- private String name;
-
- private String routeContent;
-
- private SubjectType subject;
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
- public SubjectType getSubject() {
- return subject;
- }
-
- public void setSubject(SubjectType subject) {
- this.subject = subject;
- }
-
- public String getRouteContent() {
- return routeContent;
- }
-
- public void setRouteContent(final String routeContent) {
- this.routeContent = routeContent;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/SchedTaskTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/SchedTaskTO.java b/common/src/main/java/org/apache/syncope/common/to/SchedTaskTO.java
deleted file mode 100644
index 8f189fb..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/SchedTaskTO.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import java.util.Date;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "schedTask")
-@XmlType
-@XmlSeeAlso(AbstractSyncTaskTO.class)
-public class SchedTaskTO extends AbstractTaskTO {
-
- private static final long serialVersionUID = -5722284116974636425L;
-
- private String cronExpression;
-
- private String jobClassName;
-
- private String name;
-
- private String description;
-
- private Date lastExec;
-
- private Date nextExec;
-
- public String getCronExpression() {
- return cronExpression;
- }
-
- public void setCronExpression(String cronExpression) {
- this.cronExpression = cronExpression;
- }
-
- public String getJobClassName() {
- return jobClassName;
- }
-
- public void setJobClassName(String jobClassName) {
- this.jobClassName = jobClassName;
- }
-
- public Date getLastExec() {
- return lastExec == null
- ? null
- : new Date(lastExec.getTime());
- }
-
- public void setLastExec(Date lastExec) {
- if (lastExec != null) {
- this.lastExec = new Date(lastExec.getTime());
- }
- }
-
- public Date getNextExec() {
- return nextExec == null
- ? null
- : new Date(nextExec.getTime());
- }
-
- public void setNextExec(Date nextExec) {
- if (nextExec != null) {
- this.nextExec = new Date(nextExec.getTime());
- }
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/SchemaTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/SchemaTO.java b/common/src/main/java/org/apache/syncope/common/to/SchemaTO.java
deleted file mode 100644
index d937f50..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/SchemaTO.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.common.types.AttributeSchemaType;
-import org.apache.syncope.common.types.CipherAlgorithm;
-
-@XmlRootElement(name = "schema")
-@XmlType
-public class SchemaTO extends AbstractSchemaTO {
-
- private static final long serialVersionUID = -8133983392476990308L;
-
- private AttributeSchemaType type = AttributeSchemaType.String;
-
- private String mandatoryCondition;
-
- private boolean multivalue;
-
- private boolean uniqueConstraint;
-
- private boolean readonly;
-
- private String conversionPattern;
-
- private String validatorClass;
-
- private String enumerationValues;
-
- private String enumerationKeys;
-
- private String secretKey;
-
- private CipherAlgorithm cipherAlgorithm;
-
- private String mimeType;
-
- public String getConversionPattern() {
- return conversionPattern;
- }
-
- public void setConversionPattern(final String conversionPattern) {
- this.conversionPattern = conversionPattern;
- }
-
- public String getMandatoryCondition() {
- return StringUtils.isNotBlank(mandatoryCondition)
- ? mandatoryCondition
- : "false";
- }
-
- public void setMandatoryCondition(final String mandatoryCondition) {
- this.mandatoryCondition = mandatoryCondition;
- }
-
- public boolean isMultivalue() {
- return multivalue;
- }
-
- public void setMultivalue(final boolean multivalue) {
- this.multivalue = multivalue;
- }
-
- public boolean isUniqueConstraint() {
- return uniqueConstraint;
- }
-
- public void setUniqueConstraint(final boolean uniqueConstraint) {
- this.uniqueConstraint = uniqueConstraint;
- }
-
- public boolean isReadonly() {
- return readonly;
- }
-
- public void setReadonly(final boolean readonly) {
- this.readonly = readonly;
- }
-
- public AttributeSchemaType getType() {
- return type;
- }
-
- public void setType(final AttributeSchemaType type) {
- this.type = type;
- }
-
- public String getValidatorClass() {
- return validatorClass;
- }
-
- public void setValidatorClass(final String validatorClass) {
- this.validatorClass = validatorClass;
- }
-
- public String getEnumerationValues() {
- return enumerationValues;
- }
-
- public void setEnumerationValues(final String enumerationValues) {
- this.enumerationValues = enumerationValues;
- }
-
- public String getEnumerationKeys() {
- return enumerationKeys;
- }
-
- public void setEnumerationKeys(final String enumerationKeys) {
- this.enumerationKeys = enumerationKeys;
- }
-
- public String getSecretKey() {
- return secretKey;
- }
-
- public void setSecretKey(final String secretKey) {
- this.secretKey = secretKey;
- }
-
- public CipherAlgorithm getCipherAlgorithm() {
- return cipherAlgorithm;
- }
-
- public void setCipherAlgorithm(final CipherAlgorithm cipherAlgorithm) {
- this.cipherAlgorithm = cipherAlgorithm;
- }
-
- public String getMimeType() {
- return mimeType;
- }
-
- public void setMimeType(final String mimeType) {
- this.mimeType = mimeType;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/SecurityQuestionTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/SecurityQuestionTO.java b/common/src/main/java/org/apache/syncope/common/to/SecurityQuestionTO.java
deleted file mode 100644
index a209851..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/SecurityQuestionTO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlRootElement(name = "securityQuestion")
-@XmlType
-public class SecurityQuestionTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = 5969810939993556530L;
-
- private long id;
-
- private String content;
-
- public long getId() {
- return id;
- }
-
- public void setId(final long id) {
- this.id = id;
- }
-
- public String getContent() {
- return content;
- }
-
- public void setContent(final String content) {
- this.content = content;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/SyncPolicyTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/SyncPolicyTO.java b/common/src/main/java/org/apache/syncope/common/to/SyncPolicyTO.java
deleted file mode 100644
index f5f1a9a..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/SyncPolicyTO.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.types.PolicyType;
-import org.apache.syncope.common.types.SyncPolicySpec;
-
-@XmlRootElement(name = "syncPolicy")
-@XmlType
-public class SyncPolicyTO extends AbstractPolicyTO {
-
- private static final long serialVersionUID = 993024634238024242L;
-
- private SyncPolicySpec specification;
-
- public SyncPolicyTO() {
- this(false);
- }
-
- public SyncPolicyTO(boolean global) {
- super();
-
- PolicyType type = global
- ? PolicyType.GLOBAL_SYNC
- : PolicyType.SYNC;
- setType(type);
- }
-
- public void setSpecification(final SyncPolicySpec specification) {
- this.specification = specification;
- }
-
- public SyncPolicySpec getSpecification() {
- return specification;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/SyncTaskTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/SyncTaskTO.java b/common/src/main/java/org/apache/syncope/common/to/SyncTaskTO.java
deleted file mode 100644
index 67f3e44..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/SyncTaskTO.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "syncTask")
-@XmlType
-public class SyncTaskTO extends AbstractSyncTaskTO {
-
- private static final long serialVersionUID = -2143537546915809017L;
-
- private UserTO userTemplate;
-
- private RoleTO roleTemplate;
-
- private boolean fullReconciliation;
-
- public UserTO getUserTemplate() {
- return userTemplate;
- }
-
- public void setUserTemplate(UserTO userTemplate) {
- this.userTemplate = userTemplate;
- }
-
- public RoleTO getRoleTemplate() {
- return roleTemplate;
- }
-
- public void setRoleTemplate(RoleTO roleTemplate) {
- this.roleTemplate = roleTemplate;
- }
-
- public boolean isFullReconciliation() {
- return fullReconciliation;
- }
-
- public void setFullReconciliation(boolean fullReconciliation) {
- this.fullReconciliation = fullReconciliation;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/TaskExecTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/TaskExecTO.java b/common/src/main/java/org/apache/syncope/common/to/TaskExecTO.java
deleted file mode 100644
index a242bc2..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/TaskExecTO.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "taskExec")
-@XmlType
-public class TaskExecTO extends AbstractExecTO {
-
- private static final long serialVersionUID = -5401795154606268973L;
-
- private long task;
-
- public long getTask() {
- return task;
- }
-
- public void setTask(final long task) {
- this.task = task;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/UserTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/UserTO.java b/common/src/main/java/org/apache/syncope/common/to/UserTO.java
deleted file mode 100644
index 54b75f7..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/UserTO.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-@XmlRootElement(name = "user")
-@XmlType
-public class UserTO extends AbstractSubjectTO {
-
- private static final long serialVersionUID = 7791304495192615740L;
-
- private String password;
-
- private final List<MembershipTO> memberships = new ArrayList<MembershipTO>();
-
- private String status;
-
- private String token;
-
- private Date tokenExpireTime;
-
- private String username;
-
- private Date lastLoginDate;
-
- private Date changePwdDate;
-
- private Integer failedLogins;
-
- private Long securityQuestion;
-
- private String securityAnswer;
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(final String password) {
- this.password = password;
- }
-
- @XmlElementWrapper(name = "memberships")
- @XmlElement(name = "membership")
- @JsonProperty("memberships")
- public List<MembershipTO> getMemberships() {
- return memberships;
- }
-
- @JsonIgnore
- public Map<Long, MembershipTO> getMembershipMap() {
- Map<Long, MembershipTO> result;
-
- if (getMemberships() == null) {
- result = Collections.emptyMap();
- } else {
- result = new HashMap<Long, MembershipTO>(getMemberships().size());
- for (MembershipTO membership : getMemberships()) {
- result.put(membership.getRoleId(), membership);
- }
- result = Collections.unmodifiableMap(result);
- }
-
- return result;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(final String status) {
- this.status = status;
- }
-
- public String getToken() {
- return token;
- }
-
- public void setToken(final String token) {
- this.token = token;
- }
-
- public Date getTokenExpireTime() {
- return tokenExpireTime == null
- ? null
- : new Date(tokenExpireTime.getTime());
- }
-
- public void setTokenExpireTime(final Date tokenExpireTime) {
- if (tokenExpireTime != null) {
- this.tokenExpireTime = new Date(tokenExpireTime.getTime());
- }
- }
-
- public String getUsername() {
- return username;
- }
-
- public void setUsername(final String username) {
- this.username = username;
- }
-
- public Date getChangePwdDate() {
- return changePwdDate;
- }
-
- public Integer getFailedLogins() {
- return failedLogins;
- }
-
- public Date getLastLoginDate() {
- return lastLoginDate;
- }
-
- public void setChangePwdDate(final Date changePwdDate) {
- this.changePwdDate = changePwdDate;
- }
-
- public void setFailedLogins(final Integer failedLogins) {
- this.failedLogins = failedLogins;
- }
-
- public void setLastLoginDate(final Date lastLoginDate) {
- this.lastLoginDate = lastLoginDate;
- }
-
- public Long getSecurityQuestion() {
- return securityQuestion;
- }
-
- public void setSecurityQuestion(final Long securityQuestion) {
- this.securityQuestion = securityQuestion;
- }
-
- public String getSecurityAnswer() {
- return securityAnswer;
- }
-
- public void setSecurityAnswer(final String securityAnswer) {
- this.securityAnswer = securityAnswer;
- }
-
- @Override
- public String toString() {
- return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) {
-
- @Override
- protected boolean accept(final Field f) {
- return super.accept(f) && !f.getName().equals("password");
- }
- }.toString();
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/VirSchemaTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/VirSchemaTO.java b/common/src/main/java/org/apache/syncope/common/to/VirSchemaTO.java
deleted file mode 100644
index f7d0af6..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/VirSchemaTO.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "virtualSchema")
-public class VirSchemaTO extends AbstractSchemaTO {
-
- private static final long serialVersionUID = -8198557479659701343L;
-
- private boolean readonly;
-
- public boolean isReadonly() {
- return readonly;
- }
-
- public void setReadonly(final boolean readonly) {
- this.readonly = readonly;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java b/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java
deleted file mode 100644
index 94d3dc8..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.types.WorkflowFormPropertyType;
-
-@XmlRootElement(name = "workflowFormProperty")
-@XmlType
-public class WorkflowFormPropertyTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = 9139969592634304261L;
-
- private String id;
-
- private String name;
-
- private WorkflowFormPropertyType type;
-
- private String value;
-
- private boolean readable;
-
- private boolean writable;
-
- private boolean required;
-
- private String datePattern;
-
- private Map<String, String> enumValues = new HashMap<String, String>();
-
- public String getId() {
- return id;
- }
-
- public void setId(final String id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- public boolean isReadable() {
- return readable;
- }
-
- public void setReadable(final boolean readable) {
- this.readable = readable;
- }
-
- public boolean isRequired() {
- return required;
- }
-
- public void setRequired(final boolean required) {
- this.required = required;
- }
-
- public WorkflowFormPropertyType getType() {
- return type;
- }
-
- public void setType(final WorkflowFormPropertyType type) {
- this.type = type;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(final String value) {
- this.value = value;
- }
-
- public boolean isWritable() {
- return writable;
- }
-
- public void setWritable(final boolean writable) {
- this.writable = writable;
- }
-
- public String getDatePattern() {
- return datePattern;
- }
-
- public void setDatePattern(final String datePattern) {
- this.datePattern = datePattern;
- }
-
- public Map<String, String> getEnumValues() {
- return enumValues;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/WorkflowFormTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/WorkflowFormTO.java b/common/src/main/java/org/apache/syncope/common/to/WorkflowFormTO.java
deleted file mode 100644
index 26d023b..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/WorkflowFormTO.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlRootElement(name = "workflowForm")
-@XmlType
-public class WorkflowFormTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = -7044543391316529128L;
-
- private long userId;
-
- private String taskId;
-
- private String key;
-
- private String description;
-
- private Date createTime;
-
- private Date dueDate;
-
- private String owner;
-
- private final List<WorkflowFormPropertyTO> properties;
-
- public WorkflowFormTO() {
- properties = new ArrayList<WorkflowFormPropertyTO>();
- }
-
- public long getUserId() {
- return userId;
- }
-
- public void setUserId(long userId) {
- this.userId = userId;
- }
-
- public String getTaskId() {
- return taskId;
- }
-
- public void setTaskId(String taskId) {
- this.taskId = taskId;
- }
-
- public String getKey() {
- return key;
- }
-
- public void setKey(String key) {
- this.key = key;
- }
-
- public Date getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime(Date createTime) {
- this.createTime = createTime;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getDueDate() {
- return dueDate;
- }
-
- public void setDueDate(Date dueDate) {
- this.dueDate = dueDate;
- }
-
- public String getOwner() {
- return owner;
- }
-
- public void setOwner(String owner) {
- this.owner = owner;
- }
-
- @XmlElementWrapper(name = "workflowFormProperties")
- @XmlElement(name = "workflowFormProperty")
- @JsonProperty("workflowFormProperties")
- public List<WorkflowFormPropertyTO> getProperties() {
- return properties;
- }
-
- public boolean addProperty(final WorkflowFormPropertyTO property) {
- return properties.contains(property)
- ? true
- : properties.add(property);
- }
-
- public boolean removeProperty(final WorkflowFormPropertyTO property) {
- return properties.remove(property);
- }
-
- public void setProperties(final Collection<WorkflowFormPropertyTO> properties) {
- if (this.properties != properties) {
- this.properties.clear();
- if (properties != null) {
- this.properties.addAll(properties);
- }
- }
- }
-
- @JsonIgnore
- public Map<String, WorkflowFormPropertyTO> getPropertyMap() {
- Map<String, WorkflowFormPropertyTO> result;
-
- if (getProperties() == null) {
- result = Collections.emptyMap();
- } else {
- result = new HashMap<String, WorkflowFormPropertyTO>();
- for (WorkflowFormPropertyTO prop : getProperties()) {
- result.put(prop.getId(), prop);
- }
- result = Collections.unmodifiableMap(result);
- }
-
- return result;
- }
-
- @JsonIgnore
- public Map<String, String> getPropertiesForSubmit() {
- Map<String, String> props = new HashMap<String, String>();
- for (WorkflowFormPropertyTO prop : getProperties()) {
- if (prop.isWritable()) {
- props.put(prop.getId(), prop.getValue());
- }
- }
-
- return props;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/package-info.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/package-info.java b/common/src/main/java/org/apache/syncope/common/to/package-info.java
deleted file mode 100644
index ce838a0..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
-package org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlSchema;
-import org.apache.syncope.common.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/AbstractPolicySpec.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/AbstractPolicySpec.java b/common/src/main/java/org/apache/syncope/common/types/AbstractPolicySpec.java
deleted file mode 100644
index 24b153b..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/AbstractPolicySpec.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import org.apache.syncope.common.AbstractBaseBean;
-
-public abstract class AbstractPolicySpec extends AbstractBaseBean {
-
- private static final long serialVersionUID = 2740439904103716653L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java b/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java
deleted file mode 100644
index 8142936..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.annotation.SchemaList;
-
-@XmlType
-public class AccountPolicySpec extends AbstractPolicySpec {
-
- private static final long serialVersionUID = 3259256974414758406L;
-
- /**
- * Minimum length.
- */
- private int maxLength;
-
- /**
- * Maximum length.
- */
- private int minLength;
-
- /**
- * Pattern (regular expression) that must match.
- */
- private String pattern;
-
- /**
- * Substrings not permitted.
- */
- private List<String> wordsNotPermitted;
-
- /**
- * User attribute values not permitted.
- */
- @SchemaList
- private List<String> schemasNotPermitted;
-
- /**
- * Substrings not permitted as prefix.
- */
- private List<String> prefixesNotPermitted;
-
- /**
- * Substrings not permitted as suffix.
- */
- private List<String> suffixesNotPermitted;
-
- /**
- * Specify if one or more lowercase characters are permitted.
- */
- private boolean allUpperCase;
-
- /**
- * Specify if one or more uppercase characters are permitted.
- */
- private boolean allLowerCase;
-
- /**
- * Specify if, when reached the maximum allowed number of subsequent login failures, user shall be suspended.
- */
- private boolean propagateSuspension;
-
- /**
- * Number of permitted login retries.
- * 0 disabled; >0 enabled.
- * If the number of subsequent failed logins will be greater then this value
- * the account will be suspended (lock-out).
- */
- private int permittedLoginRetries;
-
- public boolean isAllLowerCase() {
- return allLowerCase;
- }
-
- public void setAllLowerCase(final boolean allLowerCase) {
- this.allLowerCase = allLowerCase;
- }
-
- public boolean isAllUpperCase() {
- return allUpperCase;
- }
-
- public void setAllUpperCase(final boolean allUpperCase) {
- this.allUpperCase = allUpperCase;
- }
-
- public int getMaxLength() {
- return maxLength;
- }
-
- public void setMaxLength(final int maxLength) {
- this.maxLength = maxLength;
- }
-
- public int getMinLength() {
- return minLength;
- }
-
- public void setMinLength(final int minLength) {
- this.minLength = minLength;
- }
-
- public String getPattern() {
- return pattern;
- }
-
- public void setPattern(final String pattern) {
- this.pattern = pattern;
- }
-
- @XmlElementWrapper(name = "prefixesNotPermitted")
- @XmlElement(name = "prefix")
- @JsonProperty("prefixesNotPermitted")
- public List<String> getPrefixesNotPermitted() {
- if (prefixesNotPermitted == null) {
- prefixesNotPermitted = new ArrayList<String>();
- }
- return prefixesNotPermitted;
- }
-
- @XmlElementWrapper(name = "schemasNotPermitted")
- @XmlElement(name = "schema")
- @JsonProperty("schemasNotPermitted")
- public List<String> getSchemasNotPermitted() {
- if (schemasNotPermitted == null) {
- schemasNotPermitted = new ArrayList<String>();
- }
- return schemasNotPermitted;
- }
-
- @XmlElementWrapper(name = "suffixesNotPermitted")
- @XmlElement(name = "suffix")
- @JsonProperty("suffixesNotPermitted")
- public List<String> getSuffixesNotPermitted() {
- if (suffixesNotPermitted == null) {
- suffixesNotPermitted = new ArrayList<String>();
- }
- return suffixesNotPermitted;
- }
-
- @XmlElementWrapper(name = "wordsNotPermitted")
- @XmlElement(name = "word")
- @JsonProperty("wordsNotPermitted")
- public List<String> getWordsNotPermitted() {
- if (wordsNotPermitted == null) {
- wordsNotPermitted = new ArrayList<String>();
- }
- return wordsNotPermitted;
- }
-
- public boolean isPropagateSuspension() {
- return propagateSuspension;
- }
-
- public void setPropagateSuspension(final boolean propagateSuspension) {
- this.propagateSuspension = propagateSuspension;
- }
-
- public int getPermittedLoginRetries() {
- return permittedLoginRetries;
- }
-
- public void setPermittedLoginRetries(final int permittedLoginRetries) {
- this.permittedLoginRetries = permittedLoginRetries;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/AttributableType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/AttributableType.java b/common/src/main/java/org/apache/syncope/common/types/AttributableType.java
deleted file mode 100644
index c6ad5f8..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/AttributableType.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum AttributableType {
-
- USER,
- ROLE,
- MEMBERSHIP,
- CONFIGURATION;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/AttributeSchemaType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/AttributeSchemaType.java b/common/src/main/java/org/apache/syncope/common/types/AttributeSchemaType.java
deleted file mode 100644
index 47b1529..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/AttributeSchemaType.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import java.util.Date;
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum AttributeSchemaType {
-
- String(String.class),
- Long(Long.class),
- Double(Double.class),
- Boolean(Boolean.class),
- Date(Date.class),
- Enum(Enum.class),
- Encrypted(byte[].class),
- Binary(byte[].class);
-
- final private Class<?> type;
-
- AttributeSchemaType(final Class<?> type) {
- this.type = type;
- }
-
- public Class<?> getType() {
- return type;
- }
-
- public boolean isConversionPatternNeeded() {
- return this == AttributeSchemaType.Date
- || this == AttributeSchemaType.Double
- || this == AttributeSchemaType.Long;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/AuditElements.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/AuditElements.java b/common/src/main/java/org/apache/syncope/common/types/AuditElements.java
deleted file mode 100644
index decf23d..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/AuditElements.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import java.io.Serializable;
-import javax.xml.bind.annotation.XmlEnum;
-import org.apache.commons.lang3.StringUtils;
-
-public final class AuditElements implements Serializable {
-
- private static final long serialVersionUID = -4385059255522273254L;
-
- private AuditElements() {
- }
-
- @XmlEnum
- public enum EventCategoryType {
-
- REST(StringUtils.EMPTY),
- TASK(StringUtils.EMPTY),
- PROPAGATION("PropagationTask"),
- SYNCHRONIZATION("SyncTask"),
- PUSH("PushTask"),
- CUSTOM(StringUtils.EMPTY);
-
- private final String value;
-
- EventCategoryType(final String value) {
- this.value = value;
- }
-
- @Override
- public String toString() {
- return value;
- }
- }
-
- @XmlEnum
- public enum Result {
-
- SUCCESS,
- FAILURE
-
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java b/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java
deleted file mode 100644
index 69e2811..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.text.ParseException;
-import java.util.Map;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.to.EventCategoryTO;
-import org.apache.syncope.common.types.AuditElements.Result;
-import org.apache.syncope.common.util.LoggerEventUtils;
-
-public class AuditLoggerName extends AbstractBaseBean {
-
- private static final long serialVersionUID = -647989486671786839L;
-
- private final AuditElements.EventCategoryType type;
-
- private final String category;
-
- private final String subcategory;
-
- private final String event;
-
- private final Result result;
-
- @JsonCreator
- public AuditLoggerName(
- @JsonProperty("type") final AuditElements.EventCategoryType type,
- @JsonProperty("category") final String category,
- @JsonProperty("subcategory") final String subcategory,
- @JsonProperty("event") final String event,
- @JsonProperty("result") final Result result)
- throws IllegalArgumentException {
-
- this.type = type == null ? AuditElements.EventCategoryType.CUSTOM : type;
- this.category = category;
- this.subcategory = subcategory;
- this.event = event;
- this.result = result == null ? Result.SUCCESS : result;
- }
-
- public AuditElements.EventCategoryType getType() {
- return type;
- }
-
- public String getEvent() {
- return event;
- }
-
- public String getCategory() {
- return category;
- }
-
- public Result getResult() {
- return result;
- }
-
- public String getSubcategory() {
- return subcategory;
- }
-
- public String toLoggerName() {
- return new StringBuilder().append(
- LoggerType.AUDIT.getPrefix()).append('.').append(
- LoggerEventUtils.buildEvent(type, category, subcategory, event, result)).toString();
- }
-
- @SuppressWarnings("unchecked")
- public static AuditLoggerName fromLoggerName(final String loggerName)
- throws IllegalArgumentException, ParseException {
-
- if (StringUtils.isBlank(loggerName)) {
- throw new IllegalArgumentException("Null value not permitted");
- }
-
- if (!loggerName.startsWith(LoggerType.AUDIT.getPrefix())) {
- throw new ParseException("Audit logger name must start with " + LoggerType.AUDIT.getPrefix(), 0);
- }
-
- final Map.Entry<EventCategoryTO, Result> eventCategory = LoggerEventUtils.parseEventCategory(
- loggerName.replaceAll(LoggerType.AUDIT.getPrefix() + ".", ""));
-
- return new AuditLoggerName(
- eventCategory.getKey().getType(),
- eventCategory.getKey().getCategory(),
- eventCategory.getKey().getSubcategory(),
- eventCategory.getKey().getEvents().isEmpty()
- ? StringUtils.EMPTY : eventCategory.getKey().getEvents().iterator().next(),
- eventCategory.getValue());
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/CipherAlgorithm.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/CipherAlgorithm.java b/common/src/main/java/org/apache/syncope/common/types/CipherAlgorithm.java
deleted file mode 100644
index 6d50b8a..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/CipherAlgorithm.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum CipherAlgorithm {
-
- SHA("SHA-1", false),
- SHA1("SHA-1", false),
- SHA256("SHA-256", false),
- SHA512("SHA-512", false),
- AES("AES", true),
- SMD5("S-MD5", false),
- SSHA("S-SHA-1", false),
- SSHA1("S-SHA-1", false),
- SSHA256("S-SHA-256", false),
- SSHA512("S-SHA-512", false),
- BCRYPT("BCRYPT", false);
-
- final private String algorithm;
-
- final private boolean invertible;
-
- CipherAlgorithm(final String algorithm, final boolean invertible) {
- this.algorithm = algorithm;
- this.invertible = invertible;
- }
-
- public String getAlgorithm() {
- return algorithm;
- }
-
- public boolean isInvertible() {
- return invertible;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/ClientExceptionType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/ClientExceptionType.java b/common/src/main/java/org/apache/syncope/common/types/ClientExceptionType.java
deleted file mode 100644
index 4113ff9..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/ClientExceptionType.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.ws.rs.core.Response;
-
-public enum ClientExceptionType {
-
- AssociatedResources(Response.Status.BAD_REQUEST),
- Composite(Response.Status.BAD_REQUEST),
- ConcurrentModification(Response.Status.PRECONDITION_FAILED),
- DataIntegrityViolation(Response.Status.BAD_REQUEST),
- EntityExists(Response.Status.CONFLICT),
- GenericPersistence(Response.Status.BAD_REQUEST),
- InvalidSecurityAnswer(Response.Status.BAD_REQUEST),
- InvalidLogger(Response.Status.BAD_REQUEST),
- InvalidConnInstance(Response.Status.BAD_REQUEST),
- InvalidConnIdConf(Response.Status.BAD_REQUEST),
- InvalidPolicy(Response.Status.BAD_REQUEST),
- InvalidSyncopeConf(Response.Status.BAD_REQUEST),
- InvalidSyncopeRole(Response.Status.BAD_REQUEST),
- InvalidReportExec(Response.Status.BAD_REQUEST),
- InvalidRoles(Response.Status.BAD_REQUEST),
- InvalidSchemaDefinition(Response.Status.BAD_REQUEST),
- InvalidSearchExpression(Response.Status.BAD_REQUEST),
- InvalidPageOrSize(Response.Status.BAD_REQUEST),
- InvalidPropagationTaskExecReport(Response.Status.BAD_REQUEST),
- InvalidUSchema(Response.Status.BAD_REQUEST),
- InvalidUDerSchema(Response.Status.BAD_REQUEST),
- InvalidUVirSchema(Response.Status.BAD_REQUEST),
- InvalidRSchema(Response.Status.BAD_REQUEST),
- InvalidRDerSchema(Response.Status.BAD_REQUEST),
- InvalidRVirSchema(Response.Status.BAD_REQUEST),
- InvalidMSchema(Response.Status.BAD_REQUEST),
- InvalidMDerSchema(Response.Status.BAD_REQUEST),
- InvalidMVirSchema(Response.Status.BAD_REQUEST),
- InvalidCSchema(Response.Status.BAD_REQUEST),
- InvalidSchemaMapping(Response.Status.BAD_REQUEST),
- InvalidSyncopeUser(Response.Status.BAD_REQUEST),
- InvalidExternalResource(Response.Status.BAD_REQUEST),
- InvalidNotification(Response.Status.BAD_REQUEST),
- InvalidPropagationTask(Response.Status.BAD_REQUEST),
- InvalidSchedTask(Response.Status.BAD_REQUEST),
- InvalidSyncTask(Response.Status.BAD_REQUEST),
- InvalidPushTask(Response.Status.BAD_REQUEST),
- InvalidValues(Response.Status.BAD_REQUEST),
- NotFound(Response.Status.NOT_FOUND),
- RejectedUserCreate(Response.Status.BAD_REQUEST),
- RequiredValuesMissing(Response.Status.BAD_REQUEST),
- RESTValidation(Response.Status.BAD_REQUEST),
- RoleOwnership(Response.Status.BAD_REQUEST),
- Scheduling(Response.Status.BAD_REQUEST),
- UnauthorizedRole(Response.Status.UNAUTHORIZED),
- Unauthorized(Response.Status.UNAUTHORIZED),
- Unknown(Response.Status.BAD_REQUEST),
- Workflow(Response.Status.BAD_REQUEST);
-
- private final Response.Status responseStatus;
-
- private ClientExceptionType(final Response.Status responseStatus) {
- this.responseStatus = responseStatus;
- }
-
- public static ClientExceptionType fromHeaderValue(final String exceptionTypeHeaderValue) {
- ClientExceptionType result = null;
- for (ClientExceptionType type : values()) {
- if (exceptionTypeHeaderValue.equals(type.getHeaderValue())) {
- result = type;
- }
- }
-
- if (result == null) {
- throw new IllegalArgumentException("Unexpected header value: " + exceptionTypeHeaderValue);
- }
-
- return result;
- }
-
- public String getHeaderValue() {
- return name();
- }
-
- public String getInfoHeaderValue(final String value) {
- return getHeaderValue() + ":" + value;
- }
-
- public Response.Status getResponseStatus() {
- return responseStatus;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/ConflictResolutionAction.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/ConflictResolutionAction.java b/common/src/main/java/org/apache/syncope/common/types/ConflictResolutionAction.java
deleted file mode 100644
index 4195360..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/ConflictResolutionAction.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum ConflictResolutionAction {
-
- // ignore sync
- IGNORE,
- // sync first matcgh
- FIRSTMATCH,
- // sync last match
- LASTMATCH,
- // sync all
- ALL;
-
- public static ConflictResolutionAction fromString(final String value) {
- return ConflictResolutionAction.valueOf(value.toUpperCase());
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/ConnConfPropSchema.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/ConnConfPropSchema.java b/common/src/main/java/org/apache/syncope/common/types/ConnConfPropSchema.java
deleted file mode 100644
index 1a6930e..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/ConnConfPropSchema.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlRootElement
-@XmlType
-public class ConnConfPropSchema extends AbstractBaseBean implements Comparable<ConnConfPropSchema> {
-
- private static final long serialVersionUID = -1976365781005801296L;
-
- private String name;
-
- private String displayName;
-
- private String helpMessage;
-
- private String type;
-
- private boolean required;
-
- private int order;
-
- private boolean confidential;
-
- private final List<Object> defaultValues = new ArrayList<Object>();
-
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- public boolean isRequired() {
- return required;
- }
-
- public void setRequired(final boolean required) {
- this.required = required;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(final String type) {
- this.type = type;
- }
-
- public String getDisplayName() {
- return displayName;
- }
-
- public void setDisplayName(final String displayName) {
- this.displayName = displayName;
- }
-
- public String getHelpMessage() {
- return helpMessage;
- }
-
- public void setHelpMessage(final String helpMessage) {
- this.helpMessage = helpMessage;
- }
-
- public int getOrder() {
- return order;
- }
-
- public void setOrder(final int order) {
- this.order = order;
- }
-
- public boolean isConfidential() {
- return confidential;
- }
-
- public void setConfidential(final boolean confidential) {
- this.confidential = confidential;
- }
-
- @XmlElementWrapper(name = "defaultValues")
- @XmlElement(name = "defaultValue")
- @JsonProperty("defaultValues")
- public List<Object> getDefaultValues() {
- return defaultValues;
- }
-
- @Override
- public int compareTo(final ConnConfPropSchema connConfPropSchema) {
- if (this.getOrder() > connConfPropSchema.getOrder()) {
- return 1;
- } else if (this.getOrder() < connConfPropSchema.getOrder()) {
- return -1;
- } else {
- return 0;
- }
- }
-}
[33/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/SchedTasks.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchedTasks.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchedTasks.java
new file mode 100644
index 0000000..205bfa5
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchedTasks.java
@@ -0,0 +1,286 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.SchedTaskModalPage;
+import org.apache.syncope.client.console.pages.Tasks;
+import org.apache.syncope.client.console.pages.Tasks.TasksProvider;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+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.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.StringResourceModel;
+import org.apache.wicket.request.http.WebResponse;
+
+public class SchedTasks extends AbstractTasks {
+
+ private static final long serialVersionUID = 525486152284253354L;
+
+ private int paginatorRows;
+
+ private WebMarkupContainer container;
+
+ private ModalWindow window;
+
+ private AjaxDataTablePanel<AbstractTaskTO, String> table;
+
+ public SchedTasks(final String id, final PageReference pageRef) {
+ super(id, pageRef);
+
+ container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+ add(container);
+
+ window = new ModalWindow("taskWin");
+ window.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ window.setInitialHeight(WIN_HEIGHT);
+ window.setInitialWidth(WIN_WIDTH);
+ window.setCookieName(VIEW_TASK_WIN_COOKIE_NAME);
+ add(window);
+
+ ((Tasks) pageRef.getPage()).setWindowClosedCallback(window, container);
+
+ paginatorRows = prefMan.getPaginatorRows(getWebRequest(), Constants.PREF_SCHED_TASKS_PAGINATOR_ROWS);
+
+ table = Tasks.updateTaskTable(
+ getColumns(),
+ new TasksProvider<SchedTaskTO>(restClient, paginatorRows, getId(), SchedTaskTO.class),
+ container,
+ 0,
+ pageRef,
+ restClient);
+
+ container.add(table);
+
+ @SuppressWarnings("rawtypes")
+ Form paginatorForm = new Form("PaginatorForm");
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this, "paginatorRows"),
+ prefMan.getPaginatorChoices());
+
+ rowsChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ prefMan.set(getWebRequest(), (WebResponse) getResponse(), Constants.PREF_SCHED_TASKS_PAGINATOR_ROWS,
+ String.valueOf(paginatorRows));
+
+ table = Tasks.updateTaskTable(
+ getColumns(),
+ new TasksProvider<SchedTaskTO>(restClient, paginatorRows, getId(), SchedTaskTO.class),
+ container,
+ table == null ? 0 : (int) table.getCurrentPage(),
+ pageRef,
+ restClient);
+
+ target.add(container);
+ }
+ });
+
+ paginatorForm.add(rowsChooser);
+ add(paginatorForm);
+
+ AjaxLink createLink = new ClearIndicatingAjaxLink("createLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new SchedTaskModalPage(window, new SchedTaskTO(), pageRef);
+ }
+ });
+
+ window.show(target);
+ }
+ };
+
+ MetaDataRoleAuthorizationStrategy.authorize(
+ createLink, RENDER, xmlRolesReader.getEntitlement(TASKS, "create"));
+
+ add(createLink);
+ }
+
+ private List<IColumn<AbstractTaskTO, String>> getColumns() {
+ final List<IColumn<AbstractTaskTO, String>> columns = new ArrayList<IColumn<AbstractTaskTO, String>>();
+
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("key", this, null), "key", "key"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("name", this, null), "name", "name"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("description", this, null), "description", "description"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("class", this, null), "jobClassName", "jobClassName"));
+ columns.add(new DatePropertyColumn<AbstractTaskTO>(
+ new StringResourceModel("lastExec", this, null), "lastExec", "lastExec"));
+ columns.add(new DatePropertyColumn<AbstractTaskTO>(
+ new StringResourceModel("nextExec", this, null), "nextExec", "nextExec"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("latestExecStatus", this, null), "latestExecStatus", "latestExecStatus"));
+
+ columns.add(new ActionColumn<AbstractTaskTO, String>(new StringResourceModel("actions", this, null, "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public ActionLinksPanel getActions(final String componentId, final IModel<AbstractTaskTO> model) {
+
+ final SchedTaskTO taskTO = (SchedTaskTO) model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, pageRef);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new SchedTaskModalPage(window, taskTO, pageRef);
+ }
+ });
+
+ window.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.startExecution(taskTO.getKey(), false);
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ target.add(container);
+ }
+ }, ActionLink.ActionType.EXECUTE, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.startExecution(taskTO.getKey(), true);
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ target.add(container);
+ }
+ }, ActionLink.ActionType.DRYRUN, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.delete(taskTO.getKey(), SchedTaskTO.class);
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+ target.add(container);
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, TASKS);
+
+ return panel;
+ }
+
+ @Override
+ public Component getHeader(final String componentId) {
+ @SuppressWarnings("rawtypes")
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(), pageRef);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (target != null) {
+ target.add(table);
+ }
+ }
+ }, ActionLink.ActionType.RELOAD, TASKS, "list");
+
+ return panel;
+ }
+ });
+ return columns;
+ }
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ if (event.getPayload() instanceof AbstractSearchResultPanel.EventDataWrapper) {
+ ((AbstractSearchResultPanel.EventDataWrapper) event.getPayload()).getTarget().add(container);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/SearchClause.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SearchClause.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SearchClause.java
new file mode 100644
index 0000000..488a2cf
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SearchClause.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.io.Serializable;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+public class SearchClause implements Serializable {
+
+ private static final long serialVersionUID = 2010794463096110104L;
+
+ public enum Operator {
+
+ AND,
+ OR;
+
+ }
+
+ public enum Type {
+
+ ATTRIBUTE,
+ MEMBERSHIP,
+ RESOURCE,
+ ENTITLEMENT;
+
+ }
+
+ public enum Comparator {
+
+ IS_NULL,
+ IS_NOT_NULL,
+ EQUALS,
+ NOT_EQUALS,
+ GREATER_OR_EQUALS,
+ GREATER_THAN,
+ LESS_OR_EQUALS,
+ LESS_THAN;
+
+ }
+
+ private Operator operator;
+
+ private Type type;
+
+ private String property;
+
+ private Comparator comparator;
+
+ private String value;
+
+ public SearchClause() {
+ setOperator(SearchClause.Operator.AND);
+ setComparator(SearchClause.Comparator.EQUALS);
+ }
+
+ public Operator getOperator() {
+ return operator;
+ }
+
+ public void setOperator(final Operator operator) {
+ this.operator = operator;
+ }
+
+ public Type getType() {
+ return type;
+ }
+
+ public void setType(final Type type) {
+ this.type = type;
+ }
+
+ public String getProperty() {
+ return property;
+ }
+
+ public void setProperty(final String property) {
+ this.property = property;
+ }
+
+ public Comparator getComparator() {
+ return comparator;
+ }
+
+ public void setComparator(final Comparator comparator) {
+ this.comparator = comparator;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(final String value) {
+ this.value = value;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ return EqualsBuilder.reflectionEquals(this, obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return HashCodeBuilder.reflectionHashCode(this);
+ }
+
+ @Override
+ public String toString() {
+ return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/SearchView.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SearchView.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SearchView.java
new file mode 100644
index 0000000..b432d82
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SearchView.java
@@ -0,0 +1,461 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.PropertyModel;
+
+public class SearchView extends ListView<SearchClause> {
+
+ private static final long serialVersionUID = -527351923968737757L;
+
+ private final WebMarkupContainer searchFormContainer;
+
+ private final boolean required;
+
+ private final IModel<List<SearchClause.Type>> types;
+
+ private final IModel<List<String>> anames;
+
+ private final IModel<List<String>> dnames;
+
+ private final IModel<List<String>> roleNames;
+
+ private final IModel<List<String>> resourceNames;
+
+ private final IModel<List<String>> entitlements;
+
+ public SearchView(final String id, final List<? extends SearchClause> list,
+ final WebMarkupContainer searchFormContainer,
+ final boolean required,
+ final IModel<List<SearchClause.Type>> types,
+ final IModel<List<String>> anames,
+ final IModel<List<String>> dnames,
+ final IModel<List<String>> roleNames,
+ final IModel<List<String>> resourceNames,
+ final IModel<List<String>> entitlements) {
+
+ super(id, list);
+
+ this.searchFormContainer = searchFormContainer;
+ this.required = required;
+ this.types = types;
+ this.anames = anames;
+ this.dnames = dnames;
+ this.roleNames = roleNames;
+ this.resourceNames = resourceNames;
+ this.entitlements = entitlements;
+ }
+
+ @Override
+ protected void populateItem(final ListItem<SearchClause> item) {
+ final SearchClause searchClause = item.getModelObject();
+
+ final DropDownChoice<SearchClause.Operator> operator = new DropDownChoice<SearchClause.Operator>("operator",
+ new PropertyModel<SearchClause.Operator>(searchClause, "operator"),
+ Arrays.asList(SearchClause.Operator.values()));
+ operator.setOutputMarkupPlaceholderTag(true);
+ operator.setNullValid(false);
+ operator.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ }
+ });
+ item.add(operator);
+ if (item.getIndex() == 0) {
+ operator.setVisible(false);
+ }
+
+ final DropDownChoice<SearchClause.Type> type = new DropDownChoice<SearchClause.Type>("type",
+ new PropertyModel<SearchClause.Type>(searchClause, "type"), types);
+ type.setOutputMarkupId(true);
+ type.setRequired(required);
+ type.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ target.add(searchFormContainer);
+ }
+ });
+ item.add(type);
+
+ @SuppressWarnings("unchecked")
+ final DropDownChoice<String> property = new DropDownChoice<String>("property",
+ new PropertyModel<String>(searchClause, "property"), (IModel) null);
+ property.setOutputMarkupId(true);
+ property.setRequired(required);
+ property.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ }
+ });
+ item.add(property);
+
+ final TextField<String> value = new TextField<String>("value",
+ new PropertyModel<String>(searchClause, "value"));
+ value.setOutputMarkupId(true);
+ value.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ }
+ });
+ item.add(value);
+
+ final DropDownChoice<SearchClause.Comparator> comparator =
+ new DropDownChoice<SearchClause.Comparator>("comparator",
+ new PropertyModel<SearchClause.Comparator>(searchClause, "comparator"),
+ Collections.<SearchClause.Comparator>emptyList());
+ comparator.setOutputMarkupId(true);
+ comparator.setNullValid(false);
+ comparator.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ if (type.getModelObject() == SearchClause.Type.ATTRIBUTE) {
+ if (comparator.getModelObject() == SearchClause.Comparator.IS_NULL
+ || comparator.getModelObject() == SearchClause.Comparator.IS_NOT_NULL) {
+
+ value.setModelObject(null);
+ value.setEnabled(false);
+ } else {
+ value.setEnabled(true);
+ }
+ target.add(value);
+ }
+ }
+ });
+ comparator.setRequired(required);
+ item.add(comparator);
+
+ AjaxLink<Void> drop = new IndicatingAjaxLink<Void>("drop") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ SearchView.this.getModel().getObject().remove(item.getModelObject());
+ target.add(searchFormContainer);
+ }
+ };
+ item.add(drop);
+ if (item.getIndex() == 0) {
+ drop.setVisible(false);
+ drop.setEnabled(false);
+ } else {
+ drop.setVisible(true);
+ drop.setEnabled(true);
+ }
+
+ final AjaxLink<Void> add = new IndicatingAjaxLink<Void>("add") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ SearchClause clause = new SearchClause();
+ SearchView.this.getModel().getObject().add(clause);
+ target.add(searchFormContainer);
+ }
+ };
+ item.add(add);
+
+ if (searchClause == null || searchClause.getType() == null) {
+ property.setChoices(Collections.<String>emptyList());
+ } else {
+ switch (searchClause.getType()) {
+ case ATTRIBUTE:
+ final List<String> names = new ArrayList<String>(dnames.getObject());
+ if (anames.getObject() != null && !anames.getObject().isEmpty()) {
+ names.addAll(anames.getObject());
+ }
+ Collections.sort(names);
+ property.setChoices(names);
+
+ comparator.setChoices(new LoadableDetachableModel<List<SearchClause.Comparator>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<SearchClause.Comparator> load() {
+ return Arrays.asList(SearchClause.Comparator.values());
+ }
+ });
+ comparator.setChoiceRenderer(new IChoiceRenderer<SearchClause.Comparator>() {
+
+ private static final long serialVersionUID = -9086043750227867686L;
+
+ @Override
+ public Object getDisplayValue(final SearchClause.Comparator object) {
+ String display;
+
+ switch (object) {
+ case IS_NULL:
+ display = "NULL";
+ break;
+
+ case IS_NOT_NULL:
+ display = "NOT NULL";
+ break;
+
+ case EQUALS:
+ display = "==";
+ break;
+
+ case NOT_EQUALS:
+ display = "!=";
+ break;
+
+ case LESS_THAN:
+ display = "<";
+ break;
+
+ case LESS_OR_EQUALS:
+ display = "<=";
+ break;
+
+ case GREATER_THAN:
+ display = ">";
+ break;
+
+ case GREATER_OR_EQUALS:
+ display = ">=";
+ break;
+
+ default:
+ display = StringUtils.EMPTY;
+ }
+
+ return display;
+ }
+
+ @Override
+ public String getIdValue(final SearchClause.Comparator object, int index) {
+ return getDisplayValue(object).toString();
+ }
+ });
+ if (!comparator.isEnabled()) {
+ comparator.setEnabled(true);
+ comparator.setRequired(true);
+ }
+
+ if (!value.isEnabled()) {
+ value.setEnabled(true);
+ }
+ break;
+
+ case MEMBERSHIP:
+ property.setChoices(roleNames);
+ property.setChoiceRenderer(new IChoiceRenderer<String>() {
+
+ private static final long serialVersionUID = -4288397951948436434L;
+
+ @Override
+ public Object getDisplayValue(final String object) {
+ return object;
+ }
+
+ @Override
+ public String getIdValue(final String object, final int index) {
+ return object;
+ }
+ });
+
+ comparator.setChoices(new LoadableDetachableModel<List<SearchClause.Comparator>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<SearchClause.Comparator> load() {
+ List<SearchClause.Comparator> comparators = new ArrayList<SearchClause.Comparator>();
+ comparators.add(SearchClause.Comparator.EQUALS);
+ comparators.add(SearchClause.Comparator.NOT_EQUALS);
+ return comparators;
+ }
+ });
+ comparator.setChoiceRenderer(new IChoiceRenderer<SearchClause.Comparator>() {
+
+ private static final long serialVersionUID = -9086043750227867686L;
+
+ @Override
+ public Object getDisplayValue(final SearchClause.Comparator object) {
+ String display;
+
+ switch (object) {
+ case EQUALS:
+ display = "IN";
+ break;
+
+ case NOT_EQUALS:
+ display = "NOT IN";
+ break;
+
+ default:
+ display = StringUtils.EMPTY;
+ }
+
+ return display;
+ }
+
+ @Override
+ public String getIdValue(final SearchClause.Comparator object, final int index) {
+ return getDisplayValue(object).toString();
+ }
+ });
+
+ value.setEnabled(false);
+ value.setModelObject("");
+
+ break;
+
+ case RESOURCE:
+ property.setChoices(resourceNames);
+
+ comparator.setChoices(new LoadableDetachableModel<List<SearchClause.Comparator>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<SearchClause.Comparator> load() {
+ List<SearchClause.Comparator> comparators = new ArrayList<SearchClause.Comparator>();
+ comparators.add(SearchClause.Comparator.EQUALS);
+ comparators.add(SearchClause.Comparator.NOT_EQUALS);
+ return comparators;
+ }
+ });
+ comparator.setChoiceRenderer(new IChoiceRenderer<SearchClause.Comparator>() {
+
+ private static final long serialVersionUID = -9086043750227867686L;
+
+ @Override
+ public Object getDisplayValue(final SearchClause.Comparator object) {
+ String display;
+
+ switch (object) {
+ case EQUALS:
+ display = "HAS";
+ break;
+
+ case NOT_EQUALS:
+ display = "HAS NOT";
+ break;
+
+ default:
+ display = StringUtils.EMPTY;
+ }
+
+ return display;
+ }
+
+ @Override
+ public String getIdValue(final SearchClause.Comparator object, final int index) {
+ return getDisplayValue(object).toString();
+ }
+ });
+
+ value.setEnabled(false);
+ value.setModelObject("");
+
+ break;
+
+ case ENTITLEMENT:
+ property.setChoices(entitlements);
+
+ comparator.setChoices(new LoadableDetachableModel<List<SearchClause.Comparator>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<SearchClause.Comparator> load() {
+ List<SearchClause.Comparator> comparators = new ArrayList<SearchClause.Comparator>();
+ comparators.add(SearchClause.Comparator.EQUALS);
+ comparators.add(SearchClause.Comparator.NOT_EQUALS);
+ return comparators;
+ }
+ });
+ comparator.setChoiceRenderer(new IChoiceRenderer<SearchClause.Comparator>() {
+
+ private static final long serialVersionUID = -9086043750227867686L;
+
+ @Override
+ public Object getDisplayValue(final SearchClause.Comparator object) {
+ String display;
+
+ switch (object) {
+ case EQUALS:
+ display = "HAS";
+ break;
+
+ case NOT_EQUALS:
+ display = "HAS NOT";
+ break;
+
+ default:
+ display = StringUtils.EMPTY;
+ }
+
+ return display;
+ }
+
+ @Override
+ public String getIdValue(final SearchClause.Comparator object, final int index) {
+ return getDisplayValue(object).toString();
+ }
+ });
+
+ value.setEnabled(false);
+ value.setModelObject("");
+
+ break;
+
+ default:
+ property.setChoices(Collections.<String>emptyList());
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionPanel.java
new file mode 100644
index 0000000..8658cf6
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionPanel.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.TreeMap;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.rest.SecurityQuestionRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.SecurityQuestionTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class SecurityQuestionPanel extends Panel {
+
+ private static final long serialVersionUID = -790642213865180146L;
+
+ private final Map<Long, String> questions = new TreeMap<Long, String>();
+
+ @SpringBean
+ private SecurityQuestionRestClient restClient;
+
+ public SecurityQuestionPanel(final String id, final UserTO userTO) {
+ super(id);
+ setOutputMarkupId(true);
+
+ for (SecurityQuestionTO secQues : restClient.list()) {
+ questions.put(secQues.getKey(), secQues.getContent());
+ }
+
+ final AjaxTextFieldPanel securityAnswer = new AjaxTextFieldPanel("securityAnswer", "securityAnswer",
+ new PropertyModel<String>(userTO, "securityAnswer"));
+ securityAnswer.getField().setOutputMarkupId(true);
+ securityAnswer.setEnabled(false);
+ add(securityAnswer);
+
+ final AjaxDropDownChoicePanel<Long> securityQuestion =
+ new AjaxDropDownChoicePanel<>("securityQuestion", "securityQuestion",
+ new PropertyModel<Long>(userTO, "securityQuestion"));
+ ((DropDownChoice) securityQuestion.getField()).setNullValid(true);
+ securityQuestion.setChoices(new ArrayList<>(questions.keySet()));
+ securityQuestion.setStyleSheet("ui-widget-content ui-corner-all long_dynamicsize");
+ securityQuestion.getField().setOutputMarkupId(true);
+ securityQuestion.setChoiceRenderer(new IChoiceRenderer<Long>() {
+
+ private static final long serialVersionUID = 2693996850376268294L;
+
+ @Override
+ public Object getDisplayValue(final Long object) {
+ return questions.get(object);
+ }
+
+ @Override
+ public String getIdValue(final Long object, final int index) {
+ return questions.get(object);
+ }
+ });
+ securityQuestion.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ if (securityQuestion.getModelObject() == null) {
+ securityAnswer.setModelObject(null);
+ } else {
+ securityAnswer.setEnabled(true);
+ }
+ target.add(SecurityQuestionPanel.this);
+ }
+ });
+ add(securityQuestion);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/SelectOnlyUserSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SelectOnlyUserSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SelectOnlyUserSearchResultPanel.java
new file mode 100644
index 0000000..a55db53
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SelectOnlyUserSearchResultPanel.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.client.console.pages.DisplayAttributesModalPage;
+import org.apache.syncope.client.console.rest.UserRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+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.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
+
+public class SelectOnlyUserSearchResultPanel extends UserSearchResultPanel {
+
+ private static final long serialVersionUID = 2146781496050131930L;
+
+ private final PageReference pageRef;
+
+ private final ModalWindow window;
+
+ public <T extends AbstractAttributableTO> SelectOnlyUserSearchResultPanel(final String id, final boolean filtered,
+ final String fiql, final PageReference pageRef, final ModalWindow window, final UserRestClient restClient) {
+
+ super(id, filtered, fiql, pageRef, restClient);
+
+ this.pageRef = pageRef;
+ this.window = window;
+ }
+
+ @Override
+ protected List<IColumn<AbstractAttributableTO, String>> getColumns() {
+ final List<IColumn<AbstractAttributableTO, String>> columns =
+ new ArrayList<IColumn<AbstractAttributableTO, String>>();
+ for (String name : DisplayAttributesModalPage.DEFAULT_SELECTION) {
+ columns.add(new PropertyColumn<AbstractAttributableTO, String>(new ResourceModel(name, name), name, name));
+ }
+
+ columns.add(new AbstractColumn<AbstractAttributableTO, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = 8263694778917279290L;
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<AbstractAttributableTO>> cellItem,
+ final String componentId, final IModel<AbstractAttributableTO> rowModel) {
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, rowModel, pageRef);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ send(pageRef.getPage(), Broadcast.BREADTH,
+ new RoleDetailsPanel.UserOwnerSelectPayload(rowModel.getObject().getKey()));
+ window.close(target);
+ }
+ }, ActionLink.ActionType.SELECT, "Users");
+
+ cellItem.add(panel);
+ }
+ });
+
+ return columns;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/SelectedEventsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SelectedEventsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SelectedEventsPanel.java
new file mode 100644
index 0000000..96c8d77
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SelectedEventsPanel.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.List;
+import java.util.Set;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.markup.html.form.ListMultipleChoice;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.util.ListModel;
+
+public class SelectedEventsPanel extends Panel {
+
+ private static final long serialVersionUID = -4832450230348213500L;
+
+ private final WebMarkupContainer selectionContainer;
+
+ private ListMultipleChoice<String> selectedEvents;
+
+ private final IModel<List<String>> model;
+
+ public SelectedEventsPanel(final String id, final IModel<List<String>> model) {
+ super(id);
+
+ this.model = model;
+
+ selectionContainer = new WebMarkupContainer("selectionContainer");
+ selectionContainer.setOutputMarkupId(true);
+ add(selectionContainer);
+
+ selectedEvents = new ListMultipleChoice<String>("selectedEvents", new ListModel<String>(), model) {
+
+ private static final long serialVersionUID = 1226677544225737338L;
+
+ @Override
+ protected void onComponentTag(final ComponentTag tag) {
+ super.onComponentTag(tag);
+ tag.remove("size");
+ tag.remove("multiple");
+ tag.put("size", 5);
+ }
+ };
+
+ selectedEvents.setMaxRows(5);
+ selectedEvents.setChoiceRenderer(new IChoiceRenderer<String>() {
+
+ private static final long serialVersionUID = -4288397951948436434L;
+
+ @Override
+ public Object getDisplayValue(final String object) {
+ return object;
+ }
+
+ @Override
+ public String getIdValue(final String object, final int index) {
+ return object;
+ }
+ });
+
+ selectedEvents.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -151291731388673682L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ send(SelectedEventsPanel.this.getPage(),
+ Broadcast.BREADTH,
+ new InspectSelectedEvent(target, selectedEvents.getModelValue()));
+ }
+ });
+
+ selectionContainer.add(selectedEvents);
+ }
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ if (event.getPayload() instanceof EventSelectionChanged) {
+ final EventSelectionChanged eventSelectionChanged = (EventSelectionChanged) event.getPayload();
+
+ for (String toBeRemoved : eventSelectionChanged.getToBeRemoved()) {
+ model.getObject().remove(toBeRemoved);
+ }
+
+ for (String toBeAdded : eventSelectionChanged.getToBeAdded()) {
+ if (!model.getObject().contains(toBeAdded)) {
+ model.getObject().add(toBeAdded);
+ }
+ }
+
+ eventSelectionChanged.getTarget().add(selectionContainer);
+ }
+ }
+
+ public static class InspectSelectedEvent {
+
+ private final AjaxRequestTarget target;
+
+ private final String event;
+
+ public InspectSelectedEvent(final AjaxRequestTarget target, final String event) {
+ this.target = target;
+ this.event = event;
+ }
+
+ public AjaxRequestTarget getTarget() {
+ return target;
+ }
+
+ public String getEvent() {
+ return event;
+ }
+ }
+
+ public static class EventSelectionChanged {
+
+ private final AjaxRequestTarget target;
+
+ private final Set<String> toBeRemoved;
+
+ private final Set<String> toBeAdded;
+
+ public EventSelectionChanged(
+ final AjaxRequestTarget target,
+ final Set<String> toBeAdded,
+ final Set<String> toBeRemoved) {
+ this.target = target;
+ this.toBeAdded = toBeAdded;
+ this.toBeRemoved = toBeRemoved;
+ }
+
+ public AjaxRequestTarget getTarget() {
+ return target;
+ }
+
+ public Set<String> getToBeRemoved() {
+ return toBeRemoved;
+ }
+
+ public Set<String> getToBeAdded() {
+ return toBeAdded;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/StatusPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/StatusPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/StatusPanel.java
new file mode 100644
index 0000000..4faea4e
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/StatusPanel.java
@@ -0,0 +1,263 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.status.ConnObjectWrapper;
+import org.apache.syncope.client.console.commons.status.Status;
+import org.apache.syncope.client.console.commons.status.StatusBean;
+import org.apache.syncope.client.console.commons.status.StatusUtils;
+import org.apache.syncope.client.console.pages.ConnObjectModalPage;
+import org.apache.syncope.client.console.rest.RoleRestClient;
+import org.apache.syncope.client.console.rest.UserRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.list.AltListView;
+import org.apache.syncope.common.lib.mod.StatusMod;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.AbstractSubjectTO;
+import org.apache.syncope.common.lib.to.ConnObjectTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.IHeaderContributor;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Check;
+import org.apache.wicket.markup.html.form.CheckGroup;
+import org.apache.wicket.markup.html.form.CheckGroupSelector;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class StatusPanel extends Panel implements IHeaderContributor {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(StatusPanel.class);
+
+ private static final long serialVersionUID = -4064294905566247728L;
+
+ public static final String IMG_STATUES = "../statuses/";
+
+ private static final int CONNOBJECT_WIN_HEIGHT = 400;
+
+ private static final int CONNOBJECT_WIN_WIDTH = 600;
+
+ @SpringBean
+ private UserRestClient userRestClient;
+
+ @SpringBean
+ private RoleRestClient roleRestClient;
+
+ private final ModalWindow connObjectWin;
+
+ private final List<ConnObjectWrapper> connObjects;
+
+ private final Map<String, StatusBean> initialStatusBeanMap;
+
+ private final CheckGroup<StatusBean> checkGroup;
+
+ private final ListView<StatusBean> statusBeansListView;
+
+ private final StatusUtils statusUtils;
+
+ public <T extends AbstractAttributableTO> StatusPanel(
+ final String id,
+ final AbstractSubjectTO subject,
+ final List<StatusBean> selectedResources,
+ final PageReference pageref) {
+
+ super(id);
+
+ connObjectWin = new ModalWindow("connObjectWin");
+ connObjectWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ connObjectWin.setInitialHeight(CONNOBJECT_WIN_HEIGHT);
+ connObjectWin.setInitialWidth(CONNOBJECT_WIN_WIDTH);
+ connObjectWin.setCookieName("connobject-modal");
+ add(connObjectWin);
+
+ statusUtils = new StatusUtils(subject instanceof RoleTO ? roleRestClient : userRestClient);
+
+ connObjects = statusUtils.getConnectorObjects(subject);
+
+ final List<StatusBean> statusBeans = new ArrayList<>(connObjects.size() + 1);
+ initialStatusBeanMap = new LinkedHashMap<>(connObjects.size() + 1);
+
+ final StatusBean syncope = new StatusBean(subject, "syncope");
+
+ if (subject instanceof UserTO) {
+ syncope.setAccountLink(((UserTO) subject).getUsername());
+
+ Status syncopeStatus = Status.UNDEFINED;
+ if (((UserTO) subject).getStatus() != null) {
+ try {
+ syncopeStatus = Status.valueOf(((UserTO) subject).getStatus().toUpperCase());
+ } catch (IllegalArgumentException e) {
+ LOG.warn("Unexpected status found: {}", ((UserTO) subject).getStatus(), e);
+ }
+ }
+ syncope.setStatus(syncopeStatus);
+ } else if (subject instanceof RoleTO) {
+ syncope.setAccountLink(((RoleTO) subject).getDisplayName());
+ syncope.setStatus(Status.ACTIVE);
+ }
+
+ statusBeans.add(syncope);
+ initialStatusBeanMap.put(syncope.getResourceName(), syncope);
+
+ for (ConnObjectWrapper entry : connObjects) {
+ final StatusBean statusBean = statusUtils.getStatusBean(
+ entry.getAttributable(),
+ entry.getResourceName(),
+ entry.getConnObjectTO(),
+ subject instanceof RoleTO);
+
+ initialStatusBeanMap.put(entry.getResourceName(), statusBean);
+ statusBeans.add(statusBean);
+ }
+
+ checkGroup = new CheckGroup<>("group", selectedResources);
+ checkGroup.setOutputMarkupId(true);
+ checkGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {
+
+ private static final long serialVersionUID = -151291731388673682L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ // ignore
+ }
+ });
+ add(checkGroup);
+
+ CheckGroupSelector groupSelector = new CheckGroupSelector("groupselector", checkGroup);
+ if (subject instanceof RoleTO) {
+ groupSelector.setVisible(false);
+ }
+ add(groupSelector);
+
+ statusBeansListView = new AltListView<StatusBean>("resources", statusBeans) {
+
+ private static final long serialVersionUID = 4949588177564901031L;
+
+ @Override
+ protected void populateItem(final ListItem<StatusBean> item) {
+ item.add(statusUtils.getStatusImage("icon", item.getModelObject().getStatus()));
+
+ final Check<StatusBean> check = new Check<StatusBean>("check", item.getModel(), checkGroup);
+ if (subject instanceof RoleTO) {
+ check.setVisible(false);
+ }
+ item.add(check);
+
+ item.add(new Label("resource", new ResourceModel(item.getModelObject().getResourceName(), item
+ .getModelObject().getResourceName())));
+
+ if (StringUtils.isNotBlank(item.getModelObject().getAccountLink())) {
+ item.add(new Label("accountLink", new ResourceModel(item.getModelObject().getAccountLink(),
+ item.getModelObject().getAccountLink())));
+ } else {
+ item.add(new Label("accountLink", ""));
+ }
+
+ final ConnObjectTO connObjectTO = statusUtils.getConnObjectTO(
+ item.getModelObject().getAttributableId(),
+ item.getModelObject().getResourceName(),
+ connObjects);
+
+ if (pageref == null || connObjectTO == null) {
+ item.add(new Label("connObject", new Model<String>()));
+ } else {
+ final ActionLinksPanel connObject = new ActionLinksPanel("connObject", new Model(), pageref);
+
+ connObject.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ connObjectWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ConnObjectModalPage(connObjectTO);
+ }
+ });
+
+ connObjectWin.show(target);
+ }
+ }, ActionLink.ActionType.SEARCH, "Resources", "getConnectorObject");
+
+ item.add(connObject);
+ }
+ }
+ };
+ statusBeansListView.setReuseItems(true);
+ checkGroup.add(statusBeansListView);
+ }
+
+ public StatusMod getStatusMod() {
+ StatusMod result = new StatusMod();
+
+ Collection<StatusBean> statusBeans = checkGroup.getModel().getObject();
+ if (statusBeans != null && !statusBeans.isEmpty()) {
+ result = StatusUtils.buildStatusMod(statusBeans);
+ }
+
+ return result;
+ }
+
+ public List<StatusBean> getStatusBeans() {
+ return statusBeansListView.getModelObject();
+ }
+
+ public Map<String, StatusBean> getInitialStatusBeanMap() {
+ return initialStatusBeanMap;
+ }
+
+ public void updateStatusBeans(final List<StatusBean> statusBeans) {
+ statusBeansListView.removeAll();
+ statusBeansListView.getModelObject().clear();
+ statusBeansListView.getModelObject().addAll(statusBeans);
+
+ for (StatusBean statusBean : statusBeans) {
+ if (!checkGroup.getModelObject().contains(statusBean)
+ && statusBean.getStatus() == Status.NOT_YET_SUBMITTED) {
+
+ checkGroup.getModelObject().add(statusBean);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/SyncTasksPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SyncTasksPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SyncTasksPanel.java
new file mode 100644
index 0000000..f520391
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SyncTasksPanel.java
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.RoleTemplateModalPage;
+import org.apache.syncope.client.console.pages.SyncTaskModalPage;
+import org.apache.syncope.client.console.pages.UserTemplateModalPage;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.SyncTaskTO;
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+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.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.StringResourceModel;
+
+public class SyncTasksPanel extends AbstractProvisioningTasksPanel<SyncTaskTO> {
+
+ private static final long serialVersionUID = 53189199346016099L;
+
+ public SyncTasksPanel(final String id, final PageReference pageRef) {
+ super(id, pageRef, SyncTaskTO.class);
+ initTasksTable();
+ }
+
+ @Override
+ protected List<IColumn<AbstractTaskTO, String>> getColumns() {
+ final List<IColumn<AbstractTaskTO, String>> syncTaskscolumns = new ArrayList<>();
+
+ syncTaskscolumns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("key", this, null), "key", "key"));
+ syncTaskscolumns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("name", this, null), "name", "name"));
+ syncTaskscolumns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("description", this, null), "description", "description"));
+ syncTaskscolumns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("resourceName", this, null), "resource", "resource"));
+ syncTaskscolumns.add(new DatePropertyColumn<AbstractTaskTO>(
+ new StringResourceModel("lastExec", this, null), "lastExec", "lastExec"));
+ syncTaskscolumns.add(new DatePropertyColumn<AbstractTaskTO>(
+ new StringResourceModel("nextExec", this, null), "nextExec", "nextExec"));
+ syncTaskscolumns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("latestExecStatus", this, null), "latestExecStatus", "latestExecStatus"));
+
+ syncTaskscolumns.add(
+ new ActionColumn<AbstractTaskTO, String>(new StringResourceModel("actions", this, null, "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public ActionLinksPanel getActions(final String componentId, final IModel<AbstractTaskTO> model) {
+
+ final SyncTaskTO taskTO = (SyncTaskTO) model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, pageRef);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new SyncTaskModalPage(window, taskTO, pageRef);
+ }
+ });
+
+ window.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new UserTemplateModalPage(pageRef, window, taskTO);
+ }
+ });
+
+ window.show(target);
+ }
+ }, ActionLink.ActionType.USER_TEMPLATE, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new RoleTemplateModalPage(pageRef, window, taskTO);
+ }
+ });
+
+ window.show(target);
+ }
+ }, ActionLink.ActionType.ROLE_TEMPLATE, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.startExecution(taskTO.getKey(), false);
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+
+ target.add(container);
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ }
+ }, ActionLink.ActionType.EXECUTE, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.startExecution(taskTO.getKey(), true);
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+
+ target.add(container);
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ }
+ }, ActionLink.ActionType.DRYRUN, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.delete(taskTO.getKey(), SyncTaskTO.class);
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+ target.add(container);
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, TASKS);
+
+ return panel;
+ }
+
+ @Override
+ public Component getHeader(final String componentId) {
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(), pageRef);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (target != null) {
+ target.add(table);
+ }
+ }
+ }, ActionLink.ActionType.RELOAD, TASKS, "list");
+
+ return panel;
+ }
+ });
+
+ return syncTaskscolumns;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDetailsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDetailsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDetailsPanel.java
new file mode 100644
index 0000000..18e2066
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDetailsPanel.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import org.apache.syncope.client.console.commons.JexlHelpUtil;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPasswordFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.Component;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.behavior.Behavior;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.PasswordTextField;
+import org.apache.wicket.markup.html.form.validation.EqualPasswordInputValidator;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+
+public class UserDetailsPanel extends Panel {
+
+ private static final long serialVersionUID = 6592027822510220463L;
+
+ public UserDetailsPanel(final String id, final UserTO userTO, final Form form, final boolean resetPassword,
+ final boolean templateMode) {
+
+ super(id);
+
+ // ------------------------
+ // Username
+ // ------------------------
+ final FieldPanel<String> username = new AjaxTextFieldPanel("username", "username",
+ new PropertyModel<String>(userTO, "username"));
+
+ final WebMarkupContainer jexlHelp = JexlHelpUtil.getJexlHelpWebContainer("usernameJexlHelp");
+
+ final AjaxLink<?> questionMarkJexlHelp = JexlHelpUtil.getAjaxLink(jexlHelp, "usernameQuestionMarkJexlHelp");
+ add(questionMarkJexlHelp);
+ questionMarkJexlHelp.add(jexlHelp);
+
+ if (!templateMode) {
+ username.addRequiredLabel();
+ questionMarkJexlHelp.setVisible(false);
+ }
+ add(username);
+ // ------------------------
+
+ // ------------------------
+ // Password
+ // ------------------------
+ final WebMarkupContainer pwdJexlHelp = JexlHelpUtil.getJexlHelpWebContainer("pwdJexlHelp");
+
+ final AjaxLink<?> pwdQuestionMarkJexlHelp = JexlHelpUtil.getAjaxLink(pwdJexlHelp, "pwdQuestionMarkJexlHelp");
+ add(pwdQuestionMarkJexlHelp);
+ pwdQuestionMarkJexlHelp.add(pwdJexlHelp);
+
+ FieldPanel<String> password;
+ Label confirmPasswordLabel = new Label("confirmPasswordLabel", new ResourceModel("confirmPassword"));
+ FieldPanel<String> confirmPassword;
+ if (templateMode) {
+ password = new AjaxTextFieldPanel("password", "password", new PropertyModel<String>(userTO, "password"));
+
+ confirmPasswordLabel.setVisible(false);
+ confirmPassword = new AjaxTextFieldPanel("confirmPassword", "confirmPassword", new Model<String>());
+ confirmPassword.setEnabled(false);
+ confirmPassword.setVisible(false);
+ } else {
+ pwdQuestionMarkJexlHelp.setVisible(false);
+
+ password = new AjaxPasswordFieldPanel("password", "password",
+ new PropertyModel<String>(userTO, "password"));
+ ((PasswordTextField) password.getField()).setResetPassword(resetPassword);
+
+ confirmPassword = new AjaxPasswordFieldPanel("confirmPassword", "confirmPassword", new Model<String>());
+ if (!resetPassword) {
+ confirmPassword.getField().setModelObject(userTO.getPassword());
+ }
+ ((PasswordTextField) confirmPassword.getField()).setResetPassword(resetPassword);
+
+ form.add(new EqualPasswordInputValidator(password.getField(), confirmPassword.getField()));
+ }
+ add(password);
+ add(confirmPasswordLabel);
+ add(confirmPassword);
+
+ final WebMarkupContainer mandatoryPassword = new WebMarkupContainer("mandatory_pwd");
+ mandatoryPassword.add(new Behavior() {
+
+ private static final long serialVersionUID = 1469628524240283489L;
+
+ @Override
+ public void onComponentTag(final Component component, final ComponentTag tag) {
+ if (userTO.getKey() > 0) {
+ tag.put("style", "display:none;");
+ }
+ }
+ });
+
+ add(mandatoryPassword);
+ // ------------------------
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchPanel.java
new file mode 100644
index 0000000..2ca1b94
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchPanel.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.client.console.rest.RoleRestClient;
+import org.apache.syncope.client.lib.SyncopeClient;
+import org.apache.syncope.common.lib.search.SyncopeFiqlSearchConditionBuilder;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class UserSearchPanel extends AbstractSearchPanel {
+
+ private static final long serialVersionUID = -1769527800450203738L;
+
+ @SpringBean
+ private RoleRestClient roleRestClient;
+
+ public static class Builder implements Serializable {
+
+ private static final long serialVersionUID = 6308997285778809578L;
+
+ private String id;
+
+ private String fiql = null;
+
+ private boolean required = true;
+
+ public Builder(final String id) {
+ this.id = id;
+ }
+
+ public Builder fiql(final String fiql) {
+ this.fiql = fiql;
+ return this;
+ }
+
+ public Builder required(final boolean required) {
+ this.required = required;
+ return this;
+ }
+
+ public UserSearchPanel build() {
+ return new UserSearchPanel(this);
+ }
+ }
+
+ private UserSearchPanel(final Builder builder) {
+ super(builder.id, AttributableType.USER, builder.fiql, builder.required);
+ }
+
+ @Override
+ protected void populate() {
+ super.populate();
+
+ this.types = new LoadableDetachableModel<List<SearchClause.Type>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<SearchClause.Type> load() {
+ List<SearchClause.Type> result = new ArrayList<SearchClause.Type>();
+ result.add(SearchClause.Type.ATTRIBUTE);
+ result.add(SearchClause.Type.MEMBERSHIP);
+ result.add(SearchClause.Type.RESOURCE);
+ return result;
+ }
+ };
+
+ this.roleNames = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ List<RoleTO> roleTOs = roleRestClient.list();
+
+ List<String> result = new ArrayList<String>(roleTOs.size());
+ for (RoleTO role : roleTOs) {
+ result.add(role.getDisplayName());
+ }
+
+ return result;
+ }
+ };
+ }
+
+ @Override
+ protected SyncopeFiqlSearchConditionBuilder getSearchConditionBuilder() {
+ return SyncopeClient.getUserSearchConditionBuilder();
+ }
+
+}
[46/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/SyncopeSession.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeSession.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeSession.java
new file mode 100644
index 0000000..fc7f7b9
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeSession.java
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console;
+
+import java.text.DateFormat;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import javax.ws.rs.core.EntityTag;
+import javax.ws.rs.core.MediaType;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.syncope.client.lib.SyncopeClient;
+import org.apache.syncope.client.lib.SyncopeClientFactoryBean;
+import org.apache.syncope.common.lib.to.SyncopeTO;
+import org.apache.syncope.common.rest.api.service.SyncopeService;
+import org.apache.wicket.Session;
+import org.apache.wicket.authroles.authorization.strategies.role.Roles;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.protocol.http.WebSession;
+import org.apache.wicket.request.Request;
+import org.springframework.context.ApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ * Custom Syncope Session class.
+ */
+public class SyncopeSession extends WebSession {
+
+ private static final long serialVersionUID = 7743446298924805872L;
+
+ public static final List<Locale> SUPPORTED_LOCALES = Arrays.asList(new Locale[] {
+ Locale.ENGLISH, Locale.ITALIAN, new Locale("pt", "BR") });
+
+ private String username;
+
+ private String password;
+
+ private String version;
+
+ private Roles roles = new Roles();
+
+ private final SyncopeClientFactoryBean clientFactory;
+
+ private final String anonymousUser;
+
+ private final String anonymousKey;
+
+ private final SyncopeTO syncopeTO;
+
+ private final Map<Integer, SyncopeClient> clients =
+ Collections.synchronizedMap(new HashMap<Integer, SyncopeClient>());
+
+ public static SyncopeSession get() {
+ return (SyncopeSession) Session.get();
+ }
+
+ public SyncopeSession(final Request request) {
+ super(request);
+
+ final ApplicationContext ctx = WebApplicationContextUtils.
+ getWebApplicationContext(WebApplication.get().getServletContext());
+
+ clientFactory = ctx.getBean(SyncopeClientFactoryBean.class).
+ setContentType(SyncopeClientFactoryBean.ContentType.JSON);
+ anonymousUser = ctx.getBean("anonymousUser", String.class);
+ anonymousKey = ctx.getBean("anonymousKey", String.class);
+
+ syncopeTO = clientFactory.create(anonymousUser, anonymousKey).getService(SyncopeService.class).info();
+ }
+
+ public SyncopeTO getSyncopeTO() {
+ return syncopeTO;
+ }
+
+ public void resetClients() {
+ clients.clear();
+ }
+
+ public <T> T getService(final Class<T> service) {
+ return getService(service, this.username, this.password);
+ }
+
+ public <T> T getService(final String etag, final Class<T> service) {
+ T serviceInstance = getService(service, this.username, this.password);
+ WebClient.client(serviceInstance).match(new EntityTag(etag), false);
+
+ return serviceInstance;
+ }
+
+ public <T> void resetClient(final Class<T> service) {
+ T serviceInstance = getService(service, this.username, this.password);
+ WebClient.client(serviceInstance).reset();
+ }
+
+ public <T> T getService(final MediaType mediaType, final Class<T> serviceClass) {
+ T service;
+
+ synchronized (clientFactory) {
+ SyncopeClientFactoryBean.ContentType preType = clientFactory.getContentType();
+
+ clientFactory.setContentType(SyncopeClientFactoryBean.ContentType.fromString(mediaType.toString()));
+ service = clientFactory.create(username, password).getService(serviceClass);
+ clientFactory.setContentType(preType);
+ }
+
+ return service;
+ }
+
+ public <T> T getAnonymousService(final Class<T> serviceClass) {
+ return getService(serviceClass, this.anonymousUser, this.anonymousKey);
+ }
+
+ public <T> T getService(final Class<T> serviceClass, final String username, final String password) {
+ final int clientKey = new HashCodeBuilder().append(username).append(password).toHashCode();
+
+ if (!clients.containsKey(clientKey)) {
+ clients.put(clientKey, clientFactory.create(username, password));
+ }
+
+ return clients.get(clientKey).getService(serviceClass);
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(final String username) {
+ this.username = username;
+ }
+
+ public void setPassword(final String password) {
+ this.password = password;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(final String version) {
+ this.version = version;
+ }
+
+ public void setEntitlements(final String[] entitlements) {
+ String[] defensiveCopy = entitlements.clone();
+ roles = new Roles(defensiveCopy);
+ }
+
+ public Roles getEntitlements() {
+ return roles;
+ }
+
+ public boolean isAuthenticated() {
+ return getUsername() != null;
+ }
+
+ public boolean hasAnyRole(final Roles roles) {
+ return this.roles.hasAnyRole(roles);
+ }
+
+ public DateFormat getDateFormat() {
+ final Locale locale = getLocale() == null ? Locale.ENGLISH : getLocale();
+
+ return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/ActionTableCheckGroup.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/ActionTableCheckGroup.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/ActionTableCheckGroup.java
new file mode 100644
index 0000000..453e0c0
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/ActionTableCheckGroup.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import java.util.Collection;
+import org.apache.wicket.markup.html.form.CheckGroup;
+import org.apache.wicket.model.IModel;
+
+public class ActionTableCheckGroup<T> extends CheckGroup<T> {
+
+ private static final long serialVersionUID = 1288270558573401394L;
+
+ public ActionTableCheckGroup(final String id, final Collection<T> collection) {
+ super(id, collection);
+ }
+
+ public ActionTableCheckGroup(final String id, final IModel<Collection<T>> model) {
+ super(id, model);
+ }
+
+ public boolean isCheckable(final T element) {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/AttrLayoutType.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/AttrLayoutType.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/AttrLayoutType.java
new file mode 100644
index 0000000..87cc062
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/AttrLayoutType.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.common.lib.types.AttributableType;
+
+public enum AttrLayoutType {
+
+ ADMIN_USER("admin.user.layout", Mode.ADMIN, AttributableType.USER),
+ SELF_USER("self.user.layout", Mode.SELF, AttributableType.USER),
+ ADMIN_ROLE("admin.role.layout", Mode.ADMIN, AttributableType.ROLE),
+ SELF_ROLE("self.role.layout", Mode.SELF, AttributableType.ROLE),
+ ADMIN_MEMBERSHIP("admin.membership.layout", Mode.ADMIN, AttributableType.MEMBERSHIP),
+ SELF_MEMBERSHIP("self.membership.layout", Mode.SELF, AttributableType.MEMBERSHIP);
+
+ private final String confKey;
+
+ private final Mode mode;
+
+ private final AttributableType attrType;
+
+ AttrLayoutType(final String confKey, final Mode mode, final AttributableType attrType) {
+ this.confKey = confKey;
+ this.mode = mode;
+ this.attrType = attrType;
+ }
+
+ public String getConfKey() {
+ return confKey;
+ }
+
+ public Mode getMode() {
+ return mode;
+ }
+
+ public AttributableType getAttrType() {
+ return attrType;
+ }
+
+ public static List<String> confKeys() {
+ List<String> confKeys = new ArrayList<String>();
+ for (AttrLayoutType value : values()) {
+ confKeys.add(value.getConfKey());
+ }
+
+ return confKeys;
+ }
+
+ public static AttrLayoutType valueOf(final Mode mode, final AttributableType attrType) {
+ AttrLayoutType result = null;
+ if (mode == Mode.ADMIN) {
+ switch (attrType) {
+ case USER:
+ result = ADMIN_USER;
+ break;
+
+ case MEMBERSHIP:
+ result = ADMIN_MEMBERSHIP;
+ break;
+
+ case ROLE:
+ result = ADMIN_ROLE;
+ break;
+
+ default:
+ }
+ } else if (mode == Mode.SELF) {
+ switch (attrType) {
+ case USER:
+ result = SELF_USER;
+ break;
+
+ case MEMBERSHIP:
+ result = SELF_MEMBERSHIP;
+ break;
+
+ case ROLE:
+ result = SELF_ROLE;
+ break;
+
+ default:
+ }
+ }
+
+ return result;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/AttributableDataProvider.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/AttributableDataProvider.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/AttributableDataProvider.java
new file mode 100644
index 0000000..91a797e
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/AttributableDataProvider.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.rest.AbstractSubjectRestClient;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+
+public class AttributableDataProvider extends SortableDataProvider<AbstractAttributableTO, String> {
+
+ private static final long serialVersionUID = 6267494272884913376L;
+
+ private final SortableAttributableProviderComparator comparator;
+
+ private String fiql = null;
+
+ private final int paginatorRows;
+
+ private final boolean filtered;
+
+ private final AbstractSubjectRestClient restClient;
+
+ public AttributableDataProvider(final AbstractSubjectRestClient restClient,
+ final int paginatorRows, final boolean filtered) {
+
+ super();
+
+ this.restClient = restClient;
+ this.filtered = filtered;
+ this.paginatorRows = paginatorRows;
+
+ // default sorting
+ setSort("key", SortOrder.ASCENDING);
+
+ this.comparator = new SortableAttributableProviderComparator(this);
+ }
+
+ public void setFIQL(final String fiql) {
+ this.fiql = fiql;
+ }
+
+ @Override
+ public Iterator<? extends AbstractAttributableTO> iterator(final long first, final long count) {
+ List<? extends AbstractAttributableTO> result;
+
+ final int page = ((int) first / paginatorRows);
+
+ if (filtered) {
+ result = fiql == null
+ ? Collections.<AbstractAttributableTO>emptyList()
+ : restClient.search(fiql, (page < 0 ? 0 : page) + 1, paginatorRows, getSort());
+ } else {
+ result = restClient.list((page < 0 ? 0 : page) + 1, paginatorRows, getSort());
+ }
+
+ Collections.sort(result, comparator);
+ return result.iterator();
+ }
+
+ @Override
+ public long size() {
+ long result;
+
+ if (filtered) {
+ result = fiql == null
+ ? 0
+ : restClient.searchCount(fiql);
+ } else {
+ result = restClient.count();
+ }
+
+ return result;
+ }
+
+ @Override
+ public IModel<AbstractAttributableTO> model(final AbstractAttributableTO object) {
+ return new CompoundPropertyModel<>(object);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/CloseOnESCBehavior.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/CloseOnESCBehavior.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/CloseOnESCBehavior.java
new file mode 100644
index 0000000..2e62431
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/CloseOnESCBehavior.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxEventBehavior;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.attributes.AjaxCallListener;
+import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+
+public class CloseOnESCBehavior extends AjaxEventBehavior {
+
+ private static final long serialVersionUID = 5826308247642534260L;
+
+ public CloseOnESCBehavior(String event) {
+ super(event);
+ }
+
+ @Override
+ protected void onEvent(final AjaxRequestTarget target) {
+ ModalWindow.closeCurrent(target);
+ }
+
+ @Override
+ protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
+ super.updateAjaxAttributes(attributes);
+
+ attributes.getAjaxCallListeners().add(new AjaxCallListener() {
+
+ private static final long serialVersionUID = 7160235486520935153L;
+
+ @Override
+ public CharSequence getPrecondition(final Component aComponent) {
+ return " if(Wicket.Event.keyCode(attrs.event) != 27){return false;}";
+ }
+ });
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/ConnIdSpecialAttributeName.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/ConnIdSpecialAttributeName.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/ConnIdSpecialAttributeName.java
new file mode 100644
index 0000000..3533172
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/ConnIdSpecialAttributeName.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+public final class ConnIdSpecialAttributeName {
+
+ public static final String ENABLE = "__ENABLE__";
+
+ public static final String NAME = "__NAME__";
+
+ public static final String UID = "__UID__";
+
+ public static final String PASSWORD = "__PASSWORD__";
+
+ private ConnIdSpecialAttributeName() {
+ // private constructor for static utility class
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
new file mode 100644
index 0000000..8f06874
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+public final class Constants {
+
+ public static final String ON_CLICK = "onclick";
+
+ public static final String ON_CHANGE = "onchange";
+
+ public static final String ON_BLUR = "onblur";
+
+ public static final String PNG_EXT = ".png";
+
+ public static final String FEEDBACK = "feedback";
+
+ public static final String OPERATION_SUCCEEDED = "operation_succeeded";
+
+ public static final String OPERATION_ERROR = "operation_error";
+
+ public static final String SEARCH_ERROR = "search_error";
+
+ public static final String ERROR = "error";
+
+ public static final String PARAM_PASSWORD_RESET_TOKEN = "pwdResetToken";
+
+ public static final String PREF_USERS_DETAILS_VIEW = "users.details.view";
+
+ public static final String PREF_USERS_ATTRIBUTES_VIEW = "users.attributes.view";
+
+ public static final String PREF_USERS_DERIVED_ATTRIBUTES_VIEW = "users.derived.attributes.view";
+
+ public static final String PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW = "users.virtual.attributes.view";
+
+ public static final String PREF_CONF_SCHEMA_PAGINATOR_ROWS = "conf.schema.paginator.rows";
+
+ public static final String PREF_USER_SCHEMA_PAGINATOR_ROWS = "user.schema.paginator.rows";
+
+ public static final String PREF_USER_DER_SCHEMA_PAGINATOR_ROWS = "user.derived.schema.paginator.rows";
+
+ public static final String PREF_USER_VIR_SCHEMA_PAGINATOR_ROWS = "user.virtual.schema.paginator.rows";
+
+ public static final String PREF_ROLE_SCHEMA_PAGINATOR_ROWS = "role.schema.paginator.rows";
+
+ public static final String PREF_ROLE_DER_SCHEMA_PAGINATOR_ROWS = "role.derived.schema.paginator.rows";
+
+ public static final String PREF_ROLE_VIR_SCHEMA_PAGINATOR_ROWS = "role.virtual.schema.paginator.rows";
+
+ public static final String PREF_MEMBERSHIP_SCHEMA_PAGINATOR_ROWS = "membership.schema.paginator.rows";
+
+ public static final String PREF_MEMBERSHIP_DER_SCHEMA_PAGINATOR_ROWS = "membership.derived.aschema.paginator.rows";
+
+ public static final String PREF_MEMBERSHIP_VIR_SCHEMA_PAGINATOR_ROWS = "membership.virtual.aschema.paginator.rows";
+
+ public static final String PREF_USERS_PAGINATOR_ROWS = "users.paginator.rows";
+
+ public static final String PREF_RESOURCES_PAGINATOR_ROWS = "resources.paginator.rows";
+
+ public static final String PREF_CONNECTORS_PAGINATOR_ROWS = "connectors.paginator.rows";
+
+ public static final String PREF_NOTIFICATION_PAGINATOR_ROWS = "notification.paginator.rows";
+
+ public static final String PREF_PROPAGATION_TASKS_PAGINATOR_ROWS = "proagationtasks.paginator.rows";
+
+ public static final String PREF_NOTIFICATION_TASKS_PAGINATOR_ROWS = "notificationtasks.paginator.rows";
+
+ public static final String PREF_SCHED_TASKS_PAGINATOR_ROWS = "schedtasks.paginator.rows";
+
+ public static final String PREF_SYNC_TASKS_PAGINATOR_ROWS = "synctasks.paginator.rows";
+
+ public static final String PREF_TODO_PAGINATOR_ROWS = "todo.paginator.rows";
+
+ public static final String PREF_REPORT_PAGINATOR_ROWS = "report.paginator.rows";
+
+ public static final String PAGEPARAM_CREATE = "CREATE";
+
+ public static final String PAGEPARAM_CURRENT_PAGE = "_current_page";
+
+ public static final String PREF_POLICY_PAGINATOR_ROWS = "policy.paginator.rows";
+
+ /**
+ * ConnId's GuardedString is not in the classpath.
+ */
+ public static final String GUARDED_STRING = "org.identityconnectors.common.security.GuardedString";
+
+ /**
+ * ConnId's GuardedByteArray is not in the classpath.
+ */
+ public static final String GUARDED_BYTE_ARRAY = "org.identityconnectors.common.security.GuardedByteArray";
+
+ private Constants() {
+ // private constructor for static utility class
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/DateFormatROModel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/DateFormatROModel.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/DateFormatROModel.java
new file mode 100644
index 0000000..e72b7d0
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/DateFormatROModel.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import java.util.Date;
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.PropertyModel;
+
+public class DateFormatROModel implements IModel<String> {
+
+ private static final long serialVersionUID = 6677274580927636121L;
+
+ private final PropertyModel model;
+
+ public DateFormatROModel(final PropertyModel model) {
+ this.model = model;
+ }
+
+ @Override
+ public String getObject() {
+ return model.getObject() == null
+ ? ""
+ : SyncopeSession.get().getDateFormat().format((Date) model.getObject());
+ }
+
+ @Override
+ public void setObject(final String object) {
+ }
+
+ @Override
+ public void detach() {
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/HttpResourceStream.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/HttpResourceStream.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/HttpResourceStream.java
new file mode 100644
index 0000000..feeba85
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/HttpResourceStream.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.wicket.util.lang.Bytes;
+import org.apache.wicket.util.resource.AbstractResourceStream;
+import org.apache.wicket.util.resource.IFixedLocationResourceStream;
+import org.apache.wicket.util.resource.ResourceStreamNotFoundException;
+
+public class HttpResourceStream extends AbstractResourceStream implements IFixedLocationResourceStream {
+
+ private static final long serialVersionUID = 5811207817876330189L;
+
+ private transient InputStream inputStream;
+
+ private String contentType;
+
+ private String location;
+
+ private String filename;
+
+ public HttpResourceStream(final Response response) {
+ super();
+
+ Object entity = response.getEntity();
+ if (response.getStatusInfo().getStatusCode() == Response.Status.OK.getStatusCode()
+ && (entity instanceof InputStream)) {
+
+ this.inputStream = (InputStream) entity;
+ this.contentType = response.getHeaderString(HttpHeaders.CONTENT_TYPE);
+ this.location = response.getLocation() == null ? null : response.getLocation().toASCIIString();
+ String contentDisposition = response.getHeaderString(HttpHeaders.CONTENT_DISPOSITION);
+ if (StringUtils.isNotBlank(contentDisposition)) {
+ String[] splitted = contentDisposition.split("=");
+ if (splitted != null && splitted.length > 1) {
+ this.filename = splitted[1].trim();
+ }
+ }
+ }
+ }
+
+ @Override
+ public InputStream getInputStream()
+ throws ResourceStreamNotFoundException {
+
+ return inputStream == null
+ ? new ByteArrayInputStream(new byte[0])
+ : inputStream;
+ }
+
+ @Override
+ public Bytes length() {
+ return inputStream == null
+ ? Bytes.bytes(0)
+ : null;
+ }
+
+ @Override
+ public void close() throws IOException {
+ // No need for explict closing
+ }
+
+ @Override
+ public String locationAsString() {
+ return location;
+ }
+
+ @Override
+ public String getContentType() {
+ return contentType == null
+ ? MediaType.APPLICATION_OCTET_STREAM
+ : contentType;
+ }
+
+ public String getFilename() {
+ return filename;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/JexlHelpUtil.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/JexlHelpUtil.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/JexlHelpUtil.java
new file mode 100644
index 0000000..5cfd3ce
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/JexlHelpUtil.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.link.ExternalLink;
+
+public final class JexlHelpUtil {
+
+ private static final String JEXL_SYNTAX_URL = "http://commons.apache.org/jexl/reference/syntax.html";
+
+ private JexlHelpUtil() {
+ // private constructor for static utility class
+ }
+
+ public static WebMarkupContainer getJexlHelpWebContainer(final String wicketId) {
+ final WebMarkupContainer jexlHelp = new WebMarkupContainer(wicketId);
+ jexlHelp.setVisible(false);
+ jexlHelp.setOutputMarkupPlaceholderTag(true);
+ jexlHelp.setOutputMarkupId(true);
+ jexlHelp.add(new ExternalLink("jexlLink", JEXL_SYNTAX_URL));
+ return jexlHelp;
+ }
+
+ public static AjaxLink<Void> getAjaxLink(final WebMarkupContainer wmc, final String wicketId) {
+ AjaxLink<Void> questionMarkJexlHelp = new AjaxLink<Void>(wicketId) {
+
+ private static final long serialVersionUID = -1838017408000591382L;
+
+ private boolean toogle = false;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ // using bitwise inversion as suggested by
+ // http://pmd.sourceforge.net/pmd-4.2.5/rules/controversial.html#BooleanInversion
+ toogle ^= true;
+ wmc.setVisible(toogle);
+ target.add(wmc);
+ }
+ };
+ return questionMarkJexlHelp;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/MapChoiceRenderer.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/MapChoiceRenderer.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/MapChoiceRenderer.java
new file mode 100644
index 0000000..118db6d
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/MapChoiceRenderer.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import java.util.Map;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+
+public class MapChoiceRenderer<T, K> implements IChoiceRenderer<T> {
+
+ private static final long serialVersionUID = -7452881117778186644L;
+
+ private final Map<T, K> map;
+
+ public MapChoiceRenderer(final Map<T, K> map) {
+ this.map = map;
+ }
+
+ @Override
+ public Object getDisplayValue(final T key) {
+ return map.get(key);
+ }
+
+ @Override
+ public String getIdValue(final T key, final int index) {
+ return key.toString();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/Mode.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/Mode.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/Mode.java
new file mode 100644
index 0000000..27dad64
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/Mode.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+public enum Mode {
+
+ ADMIN,
+ SELF,
+ TEMPLATE;
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/PreferenceManager.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/PreferenceManager.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/PreferenceManager.java
new file mode 100644
index 0000000..c9b27fc
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/PreferenceManager.java
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.core.type.TypeReference;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import org.apache.commons.lang3.math.NumberUtils;
+import org.apache.wicket.request.Request;
+import org.apache.wicket.request.Response;
+import org.apache.wicket.util.cookies.CookieDefaults;
+import org.apache.wicket.util.cookies.CookieUtils;
+import org.apache.wicket.util.crypt.Base64;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.StringUtils;
+
+public class PreferenceManager {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(PreferenceManager.class);
+
+ private static final String PREFMAN_KEY = "prefMan";
+
+ private static final int ONE_YEAR_TIME = 60 * 60 * 24 * 365;
+
+ private static final TypeReference<Map<String, String>> MAP_TYPE_REF = new TypeReference<Map<String, String>>() {
+ };
+
+ private static final List<Integer> PAGINATOR_CHOICES = Arrays.asList(new Integer[] { 10, 25, 50 });
+
+ private final ObjectMapper mapper;
+
+ private final CookieUtils cookieUtils;
+
+ public PreferenceManager() {
+ this.mapper = new ObjectMapper();
+
+ CookieDefaults cookieDefaults = new CookieDefaults();
+ cookieDefaults.setMaxAge(ONE_YEAR_TIME);
+ this.cookieUtils = new CookieUtils(cookieDefaults);
+ }
+
+ public List<Integer> getPaginatorChoices() {
+ return PAGINATOR_CHOICES;
+ }
+
+ private Map<String, String> getPrefs(final String value) {
+ Map<String, String> prefs;
+ try {
+ if (StringUtils.hasText(value)) {
+ prefs = mapper.readValue(value, MAP_TYPE_REF);
+ } else {
+ throw new Exception("Invalid cookie value '" + value + "'");
+ }
+ } catch (Exception e) {
+ LOG.debug("No preferences found", e);
+ prefs = new HashMap<String, String>();
+ }
+
+ return prefs;
+ }
+
+ private String setPrefs(final Map<String, String> prefs) throws IOException {
+ StringWriter writer = new StringWriter();
+ mapper.writeValue(writer, prefs);
+
+ return writer.toString();
+ }
+
+ public String get(final Request request, final String key) {
+ String result = null;
+
+ String prefString = cookieUtils.load(PREFMAN_KEY);
+ if (prefString != null) {
+ final Map<String, String> prefs = getPrefs(new String(Base64.decodeBase64(prefString.getBytes())));
+ result = prefs.get(key);
+ }
+
+ return result;
+ }
+
+ public Integer getPaginatorRows(final Request request, final String key) {
+ Integer result = getPaginatorChoices().get(0);
+
+ String value = get(request, key);
+ if (value != null) {
+ result = NumberUtils.toInt(value, 10);
+ }
+
+ return result;
+ }
+
+ public List<String> getList(final Request request, final String key) {
+ final List<String> result = new ArrayList<String>();
+
+ final String compound = get(request, key);
+
+ if (StringUtils.hasText(compound)) {
+ String[] items = compound.split(";");
+ result.addAll(Arrays.asList(items));
+ }
+
+ return result;
+ }
+
+ public void set(final Request request, final Response response, final Map<String, List<String>> prefs) {
+ String prefString = cookieUtils.load(PREFMAN_KEY);
+
+ final Map<String, String> current = new HashMap<String, String>();
+ if (prefString != null) {
+ current.putAll(getPrefs(new String(Base64.decodeBase64(prefString.getBytes()))));
+ }
+
+ // after retrieved previous setting in order to overwrite the key ...
+ for (Entry<String, List<String>> entry : prefs.entrySet()) {
+ current.put(entry.getKey(), StringUtils.collectionToDelimitedString(entry.getValue(), ";"));
+ }
+
+ try {
+ cookieUtils.save(PREFMAN_KEY, new String(Base64.encodeBase64(setPrefs(current).getBytes())));
+ } catch (IOException e) {
+ LOG.error("Could not save {} info: {}", getClass().getSimpleName(), current, e);
+ }
+ }
+
+ public void set(final Request request, final Response response, final String key, final String value) {
+ String prefString = cookieUtils.load(PREFMAN_KEY);
+
+ final Map<String, String> current = new HashMap<String, String>();
+ if (prefString != null) {
+ current.putAll(getPrefs(new String(Base64.decodeBase64(prefString.getBytes()))));
+ }
+
+ // after retrieved previous setting in order to overwrite the key ...
+ current.put(key, value);
+
+ try {
+ cookieUtils.save(PREFMAN_KEY, new String(Base64.encodeBase64(setPrefs(current).getBytes())));
+ } catch (IOException e) {
+ LOG.error("Could not save {} info: {}", getClass().getSimpleName(), current, e);
+ }
+ }
+
+ public void setList(final Request request, final Response response, final String key, final List<String> values) {
+ set(request, response, key, StringUtils.collectionToDelimitedString(values, ";"));
+ }
+
+ public void setList(final Request request, final Response response, final Map<String, List<String>> prefs) {
+ set(request, response, prefs);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/PreviewUtil.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/PreviewUtil.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/PreviewUtil.java
new file mode 100644
index 0000000..98e47c0
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/PreviewUtil.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import java.lang.reflect.InvocationTargetException;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.init.ImplementationClassNamesLoader;
+import org.apache.syncope.client.console.wicket.markup.html.form.preview.AbstractBinaryPreviewer;
+import org.apache.wicket.Component;
+import org.apache.wicket.util.crypt.Base64;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.ClassUtils;
+
+@org.springframework.stereotype.Component
+public class PreviewUtil {
+
+ @Autowired
+ private ImplementationClassNamesLoader implementationClassNamesLoader;
+
+ public Component getPreviewer(final String mimeType, final String file)
+ throws InstantiationException, IllegalAccessException, InvocationTargetException {
+
+ final Class<? extends AbstractBinaryPreviewer> previewer = StringUtils.isBlank(file)
+ ? null
+ : implementationClassNamesLoader.getPreviewerClass(mimeType);
+
+ return previewer == null
+ ? null
+ : ClassUtils.getConstructorIfAvailable(previewer, String.class, String.class, byte[].class).
+ newInstance(new Object[] { "previewer", mimeType, Base64.decodeBase64(file) }).
+ preview();
+ }
+
+ public Component getPreviewer(final String mimeType, final byte[] file)
+ throws InstantiationException, IllegalAccessException, InvocationTargetException {
+
+ final Class<? extends AbstractBinaryPreviewer> previewer =
+ implementationClassNamesLoader.getPreviewerClass(mimeType);
+
+ return previewer == null
+ ? null
+ : ClassUtils.getConstructorIfAvailable(previewer, String.class, String.class, byte[].class).
+ newInstance(new Object[] { "previewer", mimeType, file }).
+ preview();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/RoleTreeBuilder.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/RoleTreeBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/RoleTreeBuilder.java
new file mode 100644
index 0000000..c6ab6e4
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/RoleTreeBuilder.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreeModel;
+import org.apache.syncope.client.console.rest.RoleRestClient;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class RoleTreeBuilder {
+
+ @Autowired
+ private RoleRestClient restClient;
+
+ private final RoleTOComparator comparator = new RoleTOComparator();
+
+ private List<RoleTO> allRoles;
+
+ private List<RoleTO> getChildRoles(final long parentRoleId, final List<RoleTO> roles) {
+ List<RoleTO> result = new ArrayList<RoleTO>();
+ for (RoleTO role : roles) {
+ if (role.getParent() == parentRoleId) {
+ result.add(role);
+ }
+ }
+
+ Collections.sort(result, comparator);
+ return result;
+ }
+
+ private void populateSubtree(final DefaultMutableTreeNode subRoot, final List<RoleTO> roles) {
+ RoleTO role = (RoleTO) subRoot.getUserObject();
+
+ DefaultMutableTreeNode child;
+ for (RoleTO subRoleTO : getChildRoles(role.getKey(), roles)) {
+ child = new DefaultMutableTreeNode(subRoleTO);
+ subRoot.add(child);
+ populateSubtree(child, roles);
+ }
+ }
+
+ public List<RoleTO> getAllRoles() {
+ return this.allRoles;
+ }
+
+ public TreeModel build() {
+ this.allRoles = this.restClient.list();
+ return build(this.allRoles);
+ }
+
+ public TreeModel build(final List<RoleTO> roles) {
+ DefaultMutableTreeNode fakeroot = new DefaultMutableTreeNode(new FakeRootRoleTO());
+
+ populateSubtree(fakeroot, roles);
+
+ return new DefaultTreeModel(fakeroot);
+ }
+
+ private static class RoleTOComparator implements Comparator<RoleTO>, Serializable {
+
+ private static final long serialVersionUID = 7085057398406518811L;
+
+ @Override
+ public int compare(final RoleTO r1, final RoleTO r2) {
+ if (r1.getKey() < r2.getKey()) {
+ return -1;
+ }
+ if (r1.getKey() == r2.getKey()) {
+ return 0;
+ }
+
+ return 1;
+ }
+ }
+
+ private static class FakeRootRoleTO extends RoleTO {
+
+ private static final long serialVersionUID = 4839183625773925488L;
+
+ public FakeRootRoleTO() {
+ super();
+
+ setKey(0);
+ setName("");
+ setParent(-1);
+ }
+
+ @Override
+ public String getDisplayName() {
+ return "";
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/RoleUtils.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/RoleUtils.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/RoleUtils.java
new file mode 100644
index 0000000..27e062b
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/RoleUtils.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import org.apache.syncope.common.lib.to.RoleTO;
+
+public class RoleUtils {
+
+ public static RoleTO findRole(final RoleTreeBuilder roleTreeBuilder, final long roleKey) {
+ RoleTO found = null;
+ if (roleTreeBuilder.getAllRoles() != null) {
+ for (RoleTO roleTO : roleTreeBuilder.getAllRoles()) {
+ if (roleTO.getKey()== roleKey) {
+ found = roleTO;
+ }
+ }
+ }
+ return found;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/SchemaModalPageFactory.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/SchemaModalPageFactory.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/SchemaModalPageFactory.java
new file mode 100644
index 0000000..38a60fa
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/SchemaModalPageFactory.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import org.apache.syncope.client.console.pages.AbstractSchemaModalPage;
+import org.apache.syncope.client.console.pages.DerSchemaModalPage;
+import org.apache.syncope.client.console.pages.PlainSchemaModalPage;
+import org.apache.syncope.client.console.pages.VirSchemaModalPage;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.SchemaType;
+
+public final class SchemaModalPageFactory {
+
+ private static final long serialVersionUID = -3533177688264693505L;
+
+ private SchemaModalPageFactory() {
+ // empty constructor for static utility class
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T extends AbstractSchemaModalPage> T getSchemaModalPage(
+ final AttributableType entity, final SchemaType schemaType) {
+
+ T page;
+
+ switch (schemaType) {
+ case DERIVED:
+ page = (T) new DerSchemaModalPage(entity);
+ break;
+
+ case VIRTUAL:
+ page = (T) new VirSchemaModalPage(entity);
+ break;
+
+ default:
+ page = (T) new PlainSchemaModalPage(entity);
+ break;
+ }
+
+ return page;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/SelectChoiceRenderer.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/SelectChoiceRenderer.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/SelectChoiceRenderer.java
new file mode 100644
index 0000000..7b9164d
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/SelectChoiceRenderer.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+
+public class SelectChoiceRenderer<T> implements IChoiceRenderer<T> {
+
+ private static final long serialVersionUID = -3242441544405909243L;
+
+ @Override
+ public Object getDisplayValue(T obj) {
+ if (obj instanceof SelectOption) {
+ return ((SelectOption) obj).getDisplayValue();
+ } else {
+ return obj.toString();
+ }
+ }
+
+ @Override
+ public String getIdValue(T obj, int i) {
+ return obj.toString();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/SelectOption.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/SelectOption.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/SelectOption.java
new file mode 100644
index 0000000..839df70
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/SelectOption.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import java.io.Serializable;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+
+public class SelectOption implements Serializable {
+
+ private static final long serialVersionUID = 2961127533930849828L;
+
+ private String displayValue;
+
+ private String keyValue;
+
+ public SelectOption(final String displayValue, final String keyValue) {
+ this.displayValue = displayValue;
+ this.keyValue = keyValue;
+ }
+
+ public String getDisplayValue() {
+ return displayValue;
+ }
+
+ public void setDisplayValue(final String displayValue) {
+ this.displayValue = displayValue;
+ }
+
+ public String getKeyValue() {
+ return keyValue;
+ }
+
+ public void setKeyValue(final String keyValue) {
+ this.keyValue = keyValue;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == null || !(obj instanceof SelectOption)) {
+ return false;
+ }
+
+ return (keyValue == null && ((SelectOption) obj).keyValue == null) || keyValue != null
+ && keyValue.equals(((SelectOption) obj).keyValue);
+ }
+
+ @Override
+ public int hashCode() {
+ return HashCodeBuilder.reflectionHashCode(this);
+ }
+
+ @Override
+ public String toString() {
+ return keyValue;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/SortableAttributableProviderComparator.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/SortableAttributableProviderComparator.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/SortableAttributableProviderComparator.java
new file mode 100644
index 0000000..e82b9bb
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/SortableAttributableProviderComparator.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+
+public class SortableAttributableProviderComparator extends SortableDataProviderComparator<AbstractAttributableTO> {
+
+ private static final long serialVersionUID = 1775967163571699258L;
+
+ private static final Set<String> INLINE_PROPS = new HashSet<>(Arrays.asList(
+ new String[] { "key", "status", "token", "username" }));
+
+ public SortableAttributableProviderComparator(final SortableDataProvider<AbstractAttributableTO, String> provider) {
+ super(provider);
+ }
+
+ @Override
+ public int compare(final AbstractAttributableTO attributable1, AbstractAttributableTO attributable2) {
+ if (INLINE_PROPS.contains(provider.getSort().getProperty())) {
+ return super.compare(attributable1, attributable2);
+ }
+
+ return super.compare(new AttrModel(attributable1), new AttrModel(attributable2));
+ }
+
+ @SuppressWarnings("rawtypes")
+ private class AttrModel extends AbstractReadOnlyModel<Comparable> {
+
+ private static final long serialVersionUID = -7856686374020091808L;
+
+ private final Map<String, AttrTO> attrs;
+
+ private final Map<String, AttrTO> derAttrs;
+
+ private final Map<String, AttrTO> virAttrs;
+
+ public AttrModel(final AbstractAttributableTO attributableTO) {
+ super();
+
+ this.attrs = attributableTO.getPlainAttrMap();
+ this.derAttrs = attributableTO.getDerAttrMap();
+ this.virAttrs = attributableTO.getVirAttrMap();
+ }
+
+ /**
+ * @see UserAttrColumn constructor
+ */
+ @Override
+ public Comparable getObject() {
+ int hashPos = provider.getSort().getProperty().indexOf('#');
+
+ SchemaType schemaType = null;
+ final String schema;
+ if (hashPos == -1) {
+ schema = provider.getSort().getProperty();
+ } else {
+ String[] splitted = provider.getSort().getProperty().split("#");
+ try {
+ schemaType = SchemaType.valueOf(splitted[0]);
+ } catch (IllegalArgumentException e) {
+ // this should never happen
+ }
+ schema = provider.getSort().getProperty().substring(hashPos + 1);
+ }
+
+ final AttrTO attr;
+ if (schemaType == null) {
+ attr = this.attrs.get(schema);
+ } else {
+ switch (schemaType) {
+ case PLAIN:
+ default:
+ attr = this.attrs.get(schema);
+ break;
+
+ case DERIVED:
+ attr = this.derAttrs.get(schema);
+ break;
+
+ case VIRTUAL:
+ attr = this.virAttrs.get(schema);
+ break;
+ }
+ }
+
+ Comparable result = null;
+
+ List<String> values = attr == null ? null : attr.getValues();
+ if (values != null && !values.isEmpty()) {
+ result = values.iterator().next();
+ }
+
+ return result;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/SortableDataProviderComparator.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/SortableDataProviderComparator.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/SortableDataProviderComparator.java
new file mode 100644
index 0000000..bc4357d
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/SortableDataProviderComparator.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import java.io.Serializable;
+import java.util.Comparator;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.PropertyModel;
+
+public class SortableDataProviderComparator<T> implements Comparator<T>, Serializable {
+
+ private static final long serialVersionUID = -8897687699977460543L;
+
+ protected final SortableDataProvider<T, String> provider;
+
+ public SortableDataProviderComparator(final SortableDataProvider<T, String> provider) {
+ this.provider = provider;
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ protected int compare(final IModel<Comparable> model1, final IModel<Comparable> model2) {
+ int result;
+
+ if (model1.getObject() == null && model2.getObject() == null) {
+ result = 0;
+ } else if (model1.getObject() == null) {
+ result = 1;
+ } else if (model2.getObject() == null) {
+ result = -1;
+ } else {
+ result = model1.getObject().compareTo(model2.getObject());
+ }
+
+ result = provider.getSort().isAscending()
+ ? result
+ : -result;
+
+ return result;
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ public int compare(final T object1, final T object2) {
+ IModel<Comparable> model1 = new PropertyModel<>(object1, provider.getSort().getProperty());
+ IModel<Comparable> model2 = new PropertyModel<>(object2, provider.getSort().getProperty());
+
+ return compare(model1, model2);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/XMLRolesReader.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/XMLRolesReader.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/XMLRolesReader.java
new file mode 100644
index 0000000..3a0b446
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/XMLRolesReader.java
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * XMLRolesReader singleton class.
+ */
+public class XMLRolesReader {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(XMLRolesReader.class);
+
+ private String authorizations;
+
+ private Map<Pair<String, String>, String> authMap;
+
+ public void setAuthorizations(final String authorizations) {
+ this.authorizations = authorizations;
+ }
+
+ private void init() {
+ authMap = new HashMap<Pair<String, String>, String>();
+
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setNamespaceAware(true);
+ try {
+ DocumentBuilder db = dbf.newDocumentBuilder();
+ Document doc = db.parse(getClass().getResource("/" + authorizations).openStream());
+ doc.getDocumentElement().normalize();
+
+ Node authNode = null;
+ NodeList root = doc.getChildNodes();
+ for (int i = 0; i < root.getLength() && authNode == null; i++) {
+ if ("auth".equals(root.item(i).getNodeName())) {
+ authNode = root.item(i);
+ }
+ }
+ if (authNode == null) {
+ throw new IllegalArgumentException("Could not find root <auth> node");
+ }
+
+ NodeList pages = authNode.getChildNodes();
+ for (int i = 0; i < pages.getLength(); i++) {
+ if ("page".equals(pages.item(i).getNodeName())) {
+ String page = pages.item(i).getAttributes().getNamedItem("id").getTextContent();
+
+ NodeList actions = pages.item(i).getChildNodes();
+ for (int j = 0; j < actions.getLength(); j++) {
+ if ("action".equals(actions.item(j).getNodeName())) {
+ String action = actions.item(j).getAttributes().getNamedItem("id").getTextContent();
+
+ NodeList entitlements = actions.item(j).getChildNodes();
+ for (int k = 0; k < entitlements.getLength(); k++) {
+ if ("entitlement".equals(entitlements.item(k).getNodeName())) {
+ String entitlement = entitlements.item(k).getTextContent();
+ authMap.put(new ImmutablePair<String, String>(page, action), entitlement);
+ }
+ }
+ }
+ }
+ }
+ }
+ } catch (Exception e) {
+ LOG.error("While initializing parsing of {}", authorizations, e);
+ }
+ }
+
+ /**
+ * Get entitlement required for page / action.
+ *
+ * @param pageId page
+ * @param actionId action
+ * @return entitlement required
+ */
+ public String getEntitlement(final String pageId, final String actionId) {
+ synchronized (this) {
+ if (authMap == null) {
+ init();
+ }
+ }
+
+ Pair<String, String> key = new ImmutablePair<String, String>(pageId, actionId);
+ return authMap.containsKey(key)
+ ? authMap.get(key)
+ : StringUtils.EMPTY;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/status/AbstractStatusBeanProvider.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/AbstractStatusBeanProvider.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/AbstractStatusBeanProvider.java
new file mode 100644
index 0000000..c10f55c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/AbstractStatusBeanProvider.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons.status;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+import org.apache.wicket.model.IModel;
+
+public abstract class AbstractStatusBeanProvider extends SortableDataProvider<StatusBean, String> {
+
+ private static final long serialVersionUID = 4287357360778016173L;
+
+ private SortableDataProviderComparator<StatusBean> comparator;
+
+ public AbstractStatusBeanProvider(final String sort) {
+ //Default sorting
+ setSort(sort, SortOrder.ASCENDING);
+ comparator = new SortableDataProviderComparator<StatusBean>(this);
+ }
+
+ @Override
+ public Iterator<StatusBean> iterator(final long first, final long count) {
+ List<StatusBean> list = getStatusBeans();
+ Collections.sort(list, comparator);
+ return list.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return getStatusBeans().size();
+ }
+
+ @Override
+ public IModel<StatusBean> model(final StatusBean resource) {
+ return new AbstractReadOnlyModel<StatusBean>() {
+
+ private static final long serialVersionUID = -7802635613997243712L;
+
+ @Override
+ public StatusBean getObject() {
+ return resource;
+ }
+ };
+ }
+
+ public abstract List<StatusBean> getStatusBeans();
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/status/ConnObjectWrapper.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/ConnObjectWrapper.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/ConnObjectWrapper.java
new file mode 100644
index 0000000..be038db
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/ConnObjectWrapper.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons.status;
+
+import java.io.Serializable;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.ConnObjectTO;
+
+public class ConnObjectWrapper implements Serializable {
+
+ private static final long serialVersionUID = 9083721948999924299L;
+
+ private final AbstractAttributableTO attributable;
+
+ private final String resourceName;
+
+ private final ConnObjectTO connObjectTO;
+
+ public ConnObjectWrapper(final AbstractAttributableTO attributable, final String resourceName,
+ final ConnObjectTO connObjectTO) {
+
+ this.attributable = attributable;
+ this.resourceName = resourceName;
+ this.connObjectTO = connObjectTO;
+ }
+
+ public AbstractAttributableTO getAttributable() {
+ return attributable;
+ }
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public ConnObjectTO getConnObjectTO() {
+ return connObjectTO;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/status/Status.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/Status.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/Status.java
new file mode 100644
index 0000000..7198c2c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/Status.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons.status;
+
+public enum Status {
+
+ NOT_YET_SUBMITTED(""),
+ CREATED("created"),
+ ACTIVE("active"),
+ SUSPENDED("inactive"),
+ UNDEFINED("undefined"),
+ OBJECT_NOT_FOUND("objectnotfound");
+
+ public boolean isActive() {
+ return this == ACTIVE;
+ }
+
+ private Status(final String name) {
+ this.name = name;
+ }
+
+ private final String name;
+
+ @Override
+ public String toString() {
+ return name;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java
new file mode 100644
index 0000000..96ddd14
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons.status;
+
+import java.io.Serializable;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+
+public class StatusBean implements Serializable {
+
+ private static final long serialVersionUID = -5207260204921071129L;
+
+ private final Long attributableKey;
+
+ private final String attributableName;
+
+ private final String resourceName;
+
+ private String accountLink = null;
+
+ private Status status = Status.OBJECT_NOT_FOUND;
+
+ private boolean linked = true;
+
+ public StatusBean(final AbstractAttributableTO attributable, String resourceName) {
+ this.attributableKey = attributable.getKey();
+ this.attributableName = attributable instanceof UserTO
+ ? ((UserTO) attributable).getUsername() : ((RoleTO) attributable).getName();
+ this.resourceName = resourceName;
+ }
+
+ public String getAccountLink() {
+ return accountLink;
+ }
+
+ public void setAccountLink(final String accountLink) {
+ this.accountLink = accountLink;
+ }
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public Status getStatus() {
+ return status;
+ }
+
+ public void setStatus(final Status status) {
+ this.status = status;
+ }
+
+ public Long getAttributableId() {
+ return attributableKey;
+ }
+
+ public String getAttributableName() {
+ return attributableName;
+ }
+
+ public boolean isLinked() {
+ return linked;
+ }
+
+ public void setLinked(boolean linked) {
+ this.linked = linked;
+ }
+
+ @Override
+ public String toString() {
+ return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ return EqualsBuilder.reflectionEquals(this, obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return HashCodeBuilder.reflectionHashCode(this);
+ }
+}
[23/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources_pt_BR.properties
new file mode 100644
index 0000000..a631352
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources_pt_BR.properties
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Recursos
+edit=Alterar
+delete=Excluir
+create-resource=Criar
+propagationPriority=Prioridade de propaga\u00e7\u00e3o
+propagationPrimary=Propaga\u00e7\u00e3o prim\u00e1ria
+
+tab2=Conectores
+displayName=Mostar
+version=Vers\u00e3o
+bundleName=Nome do Pacote
+create-connector=Criar
+delete_error=Opera\u00e7\u00e3o n\u00e3o permitida\: o conector que voc\u00ea est\u00e1 tentando excluir est\u00e1 conectado a um recurso
+connector=Conector
+reloadConnectors=Carregar Conector
+confirmReloadConnectors=Esta requis\u00e7\u00e3o \u00e9 potencialmente perigosa para opera\u00e7\u00f5es em execu\u00e7\u00e3o, prosseguir?
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage.html
new file mode 100644
index 0000000..647a311
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage.html
@@ -0,0 +1,226 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style>
+ div#propagation {
+ font-size: 8px;
+ height: auto;
+ margin-top: 3px;
+ text-align: left;
+ }
+
+ div#status {
+ float: left;
+ height: 25px;
+ margin-top: 3px;
+ text-align: center;
+ width: 8%;
+ }
+
+ div.assignment {
+ border: 1px solid #DDDDDD;
+ display: inline-table;
+ margin-bottom: 20px;
+ width: 100%;
+ }
+
+ div.assignments {
+ color: #555555;
+ display: inline-table;
+ margin-top: 20px;
+ width: 100%;
+ }
+
+ div.header {
+ display: inline-table;
+ margin: 5px;
+ width: 98%;
+ }
+
+ div.profile div#row{
+ display: inline-table;
+ width:100%;
+ vertical-align: middle;
+ }
+
+ div.profile {
+ background-color: #EEEEEE;
+ color: #555555;
+ display: inline-table;
+ margin: 0px 5px 5px 5px;
+ width: 98%;
+ }
+
+ div#name {
+ border-bottom: 1px solid #DDDDDD;
+ display: table-cell;
+ height: 15px;
+ width: 220px;
+ padding: 0px 5px 0px 5px;
+ vertical-align: middle;
+ }
+
+ div#value {
+ border-bottom: 1px solid #DDDDDD;
+ border-left: 1px solid #DDDDDD;
+ display: table-cell;
+ height: 15px;
+ width: 38%;
+ padding: 0px 5px 0px 5px;
+ overflow: hidden;
+ vertical-align: middle;
+ }
+
+ div#resource {
+ display: table-cell;
+ width: 220px;
+ height: 30px;
+ padding: 10px 0px 5px 0px;
+ }
+
+ div#resource img{
+ width: 12px;
+ height: 12px;
+ position: relative;
+ left: 3px;
+ top: 1px;
+ opacity: 1;
+ }
+
+ div#attrhead {
+ display: table-cell;
+ border-left: 1px solid #DDDDDD;
+ width: 38%;
+ height: 30px;
+ padding: 3px 0px 5px 0px;
+ text-align: center;
+ vertical-align: middle;
+ font-size: 11px;
+ }
+ </style>
+ </wicket:head>
+ <wicket:extend>
+
+ <wicket:fragment wicket:id="propagationResultFrag">
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <wicket:message key="operationResult"/> <span wicket:id="info"/>
+ </p>
+
+ <div class="assignments">
+ <div wicket:id="resources" class="assignment">
+
+ <span wicket:id="attrhead">[Attributes head]</span>
+
+ <div class="profile">
+ <span wicket:id="attrs">
+ <div id="row">
+ <div id="name">
+ <span wicket:id="attrName">[Attribute name]</span>
+ </div>
+ <div id="value">
+ <span wicket:id="beforeValue">[Before value]</span>
+ </div>
+ <div id="value">
+ <span wicket:id="afterValue">[After value]</span>
+ </div>
+ </div>
+ </span>
+ </div>
+ </div>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="userSelfResultFrag">
+ <p><wicket:message key="selfResult"/></p>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="remoteStatusFrag">
+ <img wicket:id="status"/>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="attrValueFrag">
+ <span wicket:id="value">[After value]</span>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="attrHeadFrag">
+ <div class="header alt">
+ <div id="resource">
+ <div>
+ <span wicket:id="resource">[resource name]</span>
+ <a wicket:id="showFailureWindow" href="#">
+ <img wicket:id="icon"/>
+ </a>
+
+ <div id="propagation">
+ <wicket:message key="propresult">[propagation result message]</wicket:message>
+
+ <span wicket:id="propagation">[propagation result]</span>
+ </div>
+
+ <div wicket:id="failureWindow"></div>
+
+ </div>
+ </div>
+
+ <div id="attrhead">
+ <wicket:message key="before">[before]</wicket:message>
+ </div>
+
+ <div id="attrhead">
+ <wicket:message key="after">[after]</wicket:message>
+ </div>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="emptyAttrHeadFrag">
+ <div class="header alt">
+ <div id="resource">
+ <div>
+ <span wicket:id="resource">[resource name]</span>
+ <a wicket:id="showFailureWindow" href="#">
+ <img wicket:id="icon"/>
+ </a>
+
+ <div id="propagation">
+ <wicket:message key="propresult">[propagation result message]</wicket:message>
+
+ <span wicket:id="propagation">[propagation result]</span>
+ <div wicket:id="failureWindow"></div>
+
+ </div>
+
+ </div>
+ </div>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="emptyFrag">
+ </wicket:fragment>
+
+ <div wicket:id="container" id="users-contain" class="ui-widget" style="margin:30px; width:inherit">
+
+ <span wicket:id="resultFrag"/>
+
+ <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="close">
+ <wicket:message key="close"/>
+ </a>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage.properties
new file mode 100644
index 0000000..3ee25f8
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+operationResult=Operation result for
+close=Close
+selfResult=Your request has been registered: depending on configuration, approval might be required.
+__NAME__=Account Link
+__UID__=Account Id
+__PASSWORD__=Password
+__ENABLE__=Enabled
+propresult=Propagation:
+before=Before propagation
+after=After propagation
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage_it.properties
new file mode 100644
index 0000000..92ee70e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage_it.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+operationResult=Risultato dell'operazione per
+close=Chiudi
+selfResult=La sua richiesta \u00e8 stata presa in carico: se la configurazione lo prevede, sar\u00e0 necessaria l'approvazione.
+__NAME__=Account Link
+__UID__=Account Id
+__PASSWORD__=Password
+__ENABLE__=Abilitato
+propresult=Propagazione:
+before=Prima della propagazione
+after=Dopo la propagazione
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage_pt_BR.properties
new file mode 100644
index 0000000..319d1c9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModalPage_pt_BR.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+operationResult=Resultado de opera\u00E7\u00E3o para\:
+close=Fechar
+selfResult=Sua requis\u00E7\u00E3o foi registrada e ser\u00E1 encaminhada ao administrador respons\u00E1vel. Obrigado
+__NAME__=Link de conta
+__UID__=Identificador de Conta
+__PASSWORD__=Senha
+__ENABLE__=Habilitado
+propresult=Propaga\u00E7\u00E3o
+before=Antes da Propaga\u00E7\u00E3o
+after=Depois da Propaga\u00E7\u00E3o
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage.html
new file mode 100644
index 0000000..6406807
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage.html
@@ -0,0 +1,52 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div style="margin: 5px;">
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <wicket:message key="title"/> <span wicket:id="displayName"/>
+ </p>
+ <form wicket:id="roleForm">
+ <div id="tabs">
+ <div style="display: block; clear: both">
+ <ul>
+ <li><a href="#details"><span><wicket:message key="details"/></span></a></li>
+ <li><a href="#templates"><span><wicket:message key="templates"/></span></a></li>
+ <li><a href="#plainAttrs"><span><wicket:message key="plainAttrs"/></span></a></li>
+ <li><a href="#derAttrs"><span><wicket:message key="derAttrs"/></span></a></li>
+ <li><a href="#virAttrs"><span><wicket:message key="virAttrs"/></span></a></li>
+ <li><a href="#resources"><span><wicket:message key="resources"/></span></a></li>
+ <li><a href="#entitlements"><span><wicket:message key="entitlements"/></span></a></li>
+ <li><a href="#security"><span><wicket:message key="security"/></span></a></li>
+ </ul>
+ </div>
+ <div wicket:id="rolePanel"></div>
+ </div>
+ <div style="bottom:0;margin:10px">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="submit"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage.properties
new file mode 100644
index 0000000..a24551c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage.properties
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=All form fields are required.
+title=Role
+details=Details
+plainAttrs=Plain attributes
+tab3=Derived attributes
+tab4=Virtual attributes
+resources=Resources
+entitlements=Entitlements
+security=Security
+add=+
+drop=-
+error=Generic error occurred during the operation
+firstResourcesList=Role's resources
+secondResourcesList=Available resources
+firstEntitlementsList=Role's entitlements
+secondEntitlementsList=Available entitlements
+derAttrs=Derived Attributes
+derAttrToRemove=Delete
+derAttrName=Name
+derAttrValue=Derived value
+
+virAttrs=Virtual Attributes
+virAttrToRemove=Delete
+virAttrName=Name
+virAttrValue=Virtual value
+
+addAttributeBtn=Add
+
+inheritPlainAttrs=Inherit plain attributes
+inheritDerAttrs=Inherit derived attributes
+inheritVirAttrs=Inherit virtual attributes
+templates=Templates
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage_it.properties
new file mode 100644
index 0000000..c97fe6f
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage_it.properties
@@ -0,0 +1,50 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=All form fields are required.
+title=Ruolo
+details=Dettagli
+plainAttrs=Attributi normali
+tab3=Attributi derivati
+tab4=Attributi virtuali
+resources=Risorse
+entitlements=Entitlement
+security=Sicurezza
+add=+
+drop=-
+error=Errore generico durante l'operazione
+firstResourcesList=Risorse ruolo
+secondResourcesList=Risorse disponibili
+firstResourcesList=Risorse ruolo
+secondResourcesList=Risorse disponibili
+derAttrs=Attributi derivati
+derAttrToRemove=Elimina
+derAttrName=Nome
+derAttrValue=Valore derivato
+
+virAttrs=Attributi virtuali
+virAttrToRemove=Elimina
+virAttrName=Nome
+virAttrValue=Valore virtuale
+
+addAttributeBtn=Aggiungi
+
+inheritPlainAttrs=Eredita attributi normali
+inheritDerAttrs=Eredita attributi derivati
+inheritVirAttrs=Eredita attributi virtuali
+templates=Modelo
+secondEntitlementsList=Entitlement disponibili
+firstEntitlementsList=Entitlement ruolo
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage_pt_BR.properties
new file mode 100644
index 0000000..5bff4ed
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleModalPage_pt_BR.properties
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=Todos os campos s\u00e3o obrigat\u00f3rios
+title=Fun\u00e7\u00e3o
+details=Detalhes
+plainAttrs=Atributos Normal
+tab3=Atributos Derivados
+tab4=Atributos Virtuais
+resources=Recursos
+entitlements=Direitos
+security=Seguran\u00e7a
+add=+
+drop=-
+error=Um erro gen\u00e9rico ocorreu durante a opera\u00e7\u00e3o
+firstResourcesList=Recursos de fun\u00e7\u00f5es
+secondResourcesList=Recursos dispon\u00edveis
+firstEntitlementsList=Direitos de fun\u00e7\u00f5es
+secondEntitlementsList=Direitos dispon\u00edveis
+derAttrs=Atributos derivados
+derAttrToRemove=Exluir
+derAttrName=Nome
+derAttrValue=Valor Derivado
+
+virAttrs=Atributos Virtuais
+virAttrToRemove=Excluir
+virAttrName=Nome
+virAttrValue=Valor Virtual
+
+addAttributeBtn=Adicionar
+
+inheritPlainAttrs=Atributos Herdados Normal
+inheritDerAttrs=Atributos Derivados Herdados
+inheritVirAttrs=Atributos Virtuais Herdados
+templates=Modelli
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleSelectModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleSelectModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleSelectModalPage.html
new file mode 100644
index 0000000..9e9ef59
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RoleSelectModalPage.html
@@ -0,0 +1,22 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:extend>
+ <div wicket:id="treeTable"
+ style="width: 100%;display:block;margin:auto;" class="roleTable role-tree"/>
+</wicket:extend>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles.html
new file mode 100644
index 0000000..f8981a9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles.html
@@ -0,0 +1,80 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style>
+ div.role-tree div.wicket-tree-table a {
+ color:black;
+ }
+ </style>
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $("#roletabs").tabs();
+ });
+ </script>
+ </wicket:head>
+ <wicket:extend>
+ <div id="roletabs">
+ <ul>
+ <li class="tabs-selected">
+ <a href="#tabs-tree">
+ <span><wicket:message key="tabs-tree"/>
+ </span>
+ </a>
+ </li>
+ <li>
+ <a href="#tabs-search">
+ <span><wicket:message key="tabs-search"/>
+ </span>
+ </a>
+ </li>
+ </ul>
+
+ <div id="tabs-tree" >
+ <div wicket:id="roleTabsContainer">
+ <span wicket:id="treePanel"></span>
+ <span wicket:id="summaryPanel"></span>
+ </div>
+ <div wicket:id="editRoleWin">[Show modal window for create/editing role]</div>
+ </div>
+
+ <div id="tabs-search">
+ <div>
+ <form wicket:id="searchForm">
+ <span wicket:id="searchPanel">searchPanel</span>
+
+ <br/>
+ <a wicket:id="search"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
+ <img src="img/search.png" alt="search"/>
+ <wicket:message key="search"/>
+ </a>
+ </form>
+ </div>
+
+ <div id="users-contain" class="ui-widget" style="width:auto">
+ <span wicket:id="searchResult">[search result]</span>
+ </div>
+ </div>
+
+ </div>
+
+ <wicket:child/>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles.properties
new file mode 100644
index 0000000..bfe9385
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tabs-tree=Tree
+tabs-search=Search
+search=Search
+create_user=Create new user
+search_results_title=Search results
+search_noResults=No matches found.
+reset=Reset
+showingFrom=Showing
+showingTo=to
+showingOf=of
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles_it.properties
new file mode 100644
index 0000000..76e69f7
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles_it.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tabs-tree=Albero
+tabs-search=Ricerca
+search=Cerca
+create_user=Crea nuovo utente
+search_results_title=Risultati ricerca:
+search_noResults=Nessuna corrispondenza trovata.
+reset=Reset
+showingFrom=Risultati da
+showingTo=a
+showingOf=di
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles_pt_BR.properties
new file mode 100644
index 0000000..8d80401
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Roles_pt_BR.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tabs-tree=\u00C1rvore
+tabs-search=Buscar
+search=Buscar
+create_user=Criar novo usu\u00E1rio
+search_results_title=Resultados da busca
+search_noResults=N\u00E3o foram encontrados resultados
+reset=Resetar
+showingFrom=Mostrando
+showingTo=para
+showingOf=de
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage.html
new file mode 100644
index 0000000..a237c27
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage.html
@@ -0,0 +1,49 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <link rel="stylesheet" type="text/css" href="webjars/codemirror/${codemirror.version}/lib/codemirror.css"/>
+
+ <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/lib/codemirror.js"></script>
+ <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/mode/xml/xml.js"></script>
+ <script type="text/javascript">
+ function updateTextArea(editor) {
+ document.getElementById("routeDefForm").elements["routeContent"].value = editor.getValue();
+ }
+ </script>
+ </wicket:head>
+ <wicket:extend>
+ <form wicket:id="routeDefForm" id="routeDefForm">
+ <textarea wicket:id="routeContent" id="routeContent" name="routeContent" style="width: 100%; height: 350px;">
+ </textarea>
+ <div style="margin: 10px;">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"
+ onclick=""/>
+ </div>
+ </form>
+ <script>
+ window.onload = function(){
+ var editor = CodeMirror.fromTextArea(document.getElementById("routeContent"),{lineNumbers: true});
+ editor.on("change", updateTextArea);
+ }
+ </script>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage.properties
new file mode 100644
index 0000000..8ac2655
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Edit route
+id=id
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage_it.properties
new file mode 100644
index 0000000..44663f7
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage_it.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Modifica le rotte
+id=id
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage_pt_BR.properties
new file mode 100644
index 0000000..a6395a0
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RouteModalPage_pt_BR.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Editar rotas
+id=id
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage.html
new file mode 100644
index 0000000..2d25618
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage.html
@@ -0,0 +1,136 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div style="margin: 5px;">
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+ <form wicket:id="form">
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#profile"><span><wicket:message key="profile"/></span></a></li>
+ <li><a href="#crontab"><span><wicket:message key="crontab"/></span></a></li>
+ <li><a href="#executions"><span><wicket:message key="executions"/></span></a></li>
+ </ul>
+ <div id="profile">
+ <div id="users-contain" class="ui-widget">
+ <span wicket:id="profile">
+ <div id="formtable">
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <span wicket:id="idLabel">[Id]</span>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="key">[key]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="name"><wicket:message key="name"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="name">[name]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="description"><wicket:message key="description"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="description">[description]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="jobClassName"><wicket:message key="class"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="jobClassName">[jobClassName]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="lastExec"><wicket:message key="lastExec"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="lastExec">[lastExec]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="nextExec"><wicket:message key="nextExec"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="nextExec">[nextExec]</span>
+ </div>
+ </div>
+ </div>
+
+ <script type="text/javascript">
+ $(function () {
+ $('#formtable div.tablerow:even').addClass("alt");
+ });
+ </script>
+ </span>
+ </div>
+ </div>
+ <div id="crontab">
+ <span wicket:id="crontab">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <label for="cron"><wicket:message key="cron"/></label>
+ </div>
+ <div class="tablerow">
+ <input type="text" id="seconds" class="text ui-widget-content ui-corner-all" wicket:id="seconds" style="width: 50px;float: left" />
+ <input type="text" id="minutes" class="text ui-widget-content ui-corner-all" wicket:id="minutes" style="width: 50px;float: left" />
+ <input type="text" id="hours" class="text ui-widget-content ui-corner-all" wicket:id="hours" style="width: 50px;float: left" />
+ <input type="text" id="daysOfMonth" class="text ui-widget-content ui-corner-all" wicket:id="daysOfMonth" style="width: 50px;float: left" />
+ <input type="text" id="months" class="text ui-widget-content ui-corner-all" wicket:id="months" style="width: 50px;float: left" />
+ <input type="text" id="daysOfWeek" class="text ui-widget-content ui-corner-all" wicket:id="daysOfWeek" style="width: 50px" />
+ </div>
+ <div class="tablerow alt">
+ <label for="cronExpression"><wicket:message key="templates"/></label>
+ </div>
+ <div class="tablerow">
+ <select class="text ui-widget-content ui-corner-all" wicket:id="cronTemplateChooser" style="width: 250px"/>
+ </div>
+ </div>
+ </span>
+ </div>
+ <div id="executions" class="ui-widget">
+ <span wicket:id="executionContainer" id="executionContainer">
+ <table class="ui-widget ui-widget-content"
+ wicket:id="executionsTable" style="width: 100%"/>
+ </span>
+ </div>
+ </div>
+ <div style="margin: 20px 10px 0">
+ <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="apply"/>
+ <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ <div wicket:id="taskExecMessageWin"/>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage.properties
new file mode 100644
index 0000000..3e0f41c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage.properties
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Profile
+crontab=Schedule
+executions=Executions
+title=Task
+class=Class
+name=Name
+description=Description
+lastExec=Last Execution
+nextExec=Next Execution
+cron=Schedule (seconds, minutes, hours, days of month, months, days of week)
+templates=Remove task from scheduler / Use a template to schedule
+apply=Save
+startDate=Start date
+endDate=End date
+status=Status
+message=Message
+taskExecutions=Task executions
+delete=Delete
+showMessage=Show
+chooseForTemplate=Use A Template
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage_it.properties
new file mode 100644
index 0000000..fefc847
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage_it.properties
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Profilo
+crontab=Schedule
+executions=Esecuzioni
+title=Task
+class=Classe
+name=Nome
+description=Descrizione
+lastExec=Ultima Esecuzione
+nextExec=Prossima Esecuzione
+cron=Schedule (secondi, minuti, ore, giorni del mese, mesi, giorni della settimana)
+templates=Rimuovi task dallo scheduler / Utilizza un template per schedulare
+apply=Salva
+startDate=Data di avvio
+endDate=Data di conclusione
+status=Stato
+message=Messaggio
+taskExecutions=Esecuzione del task
+delete=Rimozione
+showMessage=Mostra
+chooseForTemplate=Usa Un Template
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage_pt_BR.properties
new file mode 100644
index 0000000..36738b8
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SchedTaskModalPage_pt_BR.properties
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Perfil
+crontab=Agenda
+executions=Execu\u00E7\u00F5es
+title=Tarefa
+class=Classe
+name=Nome
+description=Descri\u00E7\u00E3o
+lastExec=\u00DAltima execu\u00E7\u00E3o
+nextExec=Pr\u00F3xima Execu\u00E7\u00E3o
+cron=Agendar (segundos, minutos, horas, dias do m\u00EAs, meses, dias da semana)
+templates=Remover tarefa do agendamento / Usar template para agendar
+apply=Salvar
+startDate=Data de In\u00EDcio
+endDate=Data de Conclus\u00E3o
+status=Estatus
+message=Mensagem
+taskExecutions=Execu\u00E7\u00E3o de Tarefas
+delete=Excluir
+showMessage=Mostrar
+chooseForTemplate=Usar um template
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema$SchemaTypePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema$SchemaTypePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema$SchemaTypePanel.html
new file mode 100644
index 0000000..acc761e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema$SchemaTypePanel.html
@@ -0,0 +1,41 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div wicket:id="schemaWrapContainer" id="users-contain" class="ui-widget">
+ <span wicket:id="schemaContainer">
+ <table class="ui-widget ui-widget-content table-hover" wicket:id="datatable"/>
+ </span>
+
+ <span style="float:right">
+ <form wicket:id="paginatorForm" style="display:inline">
+ <label><wicket:message key="displayRows"/></label>
+ <select class="text ui-widget-content ui-corner-all" wicket:id="rowsChooser"/>
+ </form>
+ </span>
+ </div>
+
+ <div wicket:id="editSchemaWin">[Show modal window for editing schema]</div>
+
+ <a wicket:id="createSchemaLink"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
+ <wicket:message key="create"/>
+ </a>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema.html
new file mode 100644
index 0000000..de6d1e2
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema.html
@@ -0,0 +1,59 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style type="text/css">
+ .true {
+ background-image: url(../../img/ok.png);
+ background-position: center center;
+ background-repeat: no-repeat;
+ height: 18px;
+ width: 65px;
+ }
+ .false {
+ width: 65px;
+ }
+ </style>
+ </wicket:head>
+ <wicket:extend>
+
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#cschema"><wicket:message key="configuration"/></a></li>
+ <li><a href="#uschema"><wicket:message key="user"/></a></li>
+ <li><a href="#mschema"><wicket:message key="membership"/></a></li>
+ <li><a href="#rschema"><wicket:message key="role"/></a></li>
+ </ul>
+
+ <div id="cschema">
+ <div wicket:id="configurationTabs"/>
+ </div>
+ <div id="uschema">
+ <div wicket:id="userTabs"/>
+ </div>
+ <div id="mschema">
+ <div wicket:id="membershipTabs"/>
+ </div>
+ <div id="rschema">
+ <div wicket:id="roleTabs"/>
+ </div>
+ </div>
+
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema.properties
new file mode 100644
index 0000000..e103028
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema.properties
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+user=User
+role=Role
+membership=Membership
+required_alert=All fields are required
+mandatory=Mandatory
+multivalue=Multivalue
+type=Type
+validatorClass=Validator class
+conversionPattern=Conversion pattern
+edit=Edit
+delete=Delete
+attributes=Attributes
+expression=Expression
+plain=Plain
+derived=Derived
+virtual=Virtual
+mandatoryCondition=Mandatory
+uniqueConstraint=Unique
+readonly=Read-only
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema_it.properties
new file mode 100644
index 0000000..b95da78
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema_it.properties
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+user=Utente
+role=Ruolo
+membership=Membership
+required_alert=Tutti i campi sono richiesti.
+mandatory=Obbligatorio
+multivalue=Multivalore
+type=Tipo
+validatorClass=Validator class
+conversionPattern=Pattern di conversione
+edit=Modifica
+delete=Rimuovi
+attributes=Attributi
+expression=Expression
+plain=Normali
+derived=Derivati
+virtual=Virtuali
+mandatoryCondition=Obbligatorio
+uniqueConstraint=Univoco
+readonly=Sola lettura
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema_pt_BR.properties
new file mode 100644
index 0000000..994d485
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schema_pt_BR.properties
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+user=Usu\u00e1rio
+role=Fun\u00e7\u00e3o
+membership=Membro
+required_alert=Todos os campos s\u00e3o requeridos
+mandatory=Obrigat\u00f3rio
+multivalue=Multivalorado
+type=Tipo
+validatorClass=classe de Valida\u00e7\u00e3o
+conversionPattern=Padr\u00e3o de Convers\u00e3o
+edit=Editar
+delete=Remover
+attributes=Atributos
+expression=Express\u00e3o
+plain=Normal
+derived=Derivado
+virtual=Virtual
+mandatoryCondition=Mandat\u00f3rio
+uniqueConstraint=\u00danico
+readonly=Apenas leitura
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage.html
new file mode 100644
index 0000000..fe4fad4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage.html
@@ -0,0 +1,46 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div>
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+ <form wicket:id="form">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="content"><wicket:message key="content"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="content">[content]</span>
+ </div>
+ </div>
+ </div>
+
+ <div style="margin: 20px 10px 0">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage.properties
new file mode 100644
index 0000000..3f7ab40
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Security question
+content=Text
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage_it.properties
new file mode 100644
index 0000000..6324e64
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage_it.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Domanda di sicurezza
+content=Testo
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage_pt_BR.properties
new file mode 100644
index 0000000..511b4ad
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SecurityQuestionModalPage_pt_BR.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Pergunta de seguran\u00e7a
+content=Texto
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage.html
new file mode 100644
index 0000000..fc9b0a5
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage.html
@@ -0,0 +1,205 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div style="margin: 5px;">
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+
+ <form wicket:id="form">
+
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#profile"><span><wicket:message key="profile"/></span></a></li>
+ <li><a href="#crontab"><span><wicket:message key="crontab"/></span></a></li>
+ <li><a href="#executions"><span><wicket:message key="executions"/></span></a></li>
+ </ul>
+ <div id="profile">
+ <div class="ui-widget">
+ <span wicket:id="profile">
+ <div id="formtable">
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <span wicket:id="idLabel">[Id]</span>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="key">[key]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="name"><wicket:message key="name"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="name">[name]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="description"><wicket:message key="description"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="description">[description]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="resource"><wicket:message key="resourceName"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="resource">[resource]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="lastExec"><wicket:message key="lastExec"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="lastExec">[lastExec]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="nextExec"><wicket:message key="nextExec"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="nextExec">[nextExec]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="actionsClassNames"><wicket:message key="actionsClasses"/></label>
+ </div>
+ <span wicket:id="syncActionsClassNames">
+ <span wicket:id="actionsClasses">
+ <select class="text ui-widget-content ui-corner-all" wicket:id="actionsClass"/>
+ <a wicket:id="drop"><img src="img/minus-icon.png" alt="remove icon" class="drop_button"/></a>
+ <a wicket:id="add"><img src="img/plus-icon.png" alt="add icon" class="add_button"/></a>
+ <br/>
+ </span>
+ <a wicket:id="first"><img src="img/plus-icon.png" alt="add icon" class="add_button"/></a>
+ </span>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="performCreate"><wicket:message key="creates"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="performCreate">[performCreate]</span>
+ </div>
+ </div>
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="performUpdate"><wicket:message key="updates"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="performUpdate">[performUpdate]</span>
+ </div>
+ </div>
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="performDelete"><wicket:message key="deletes"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="performDelete">[performDelete]</span>
+ </div>
+ </div>
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="syncStatus"><wicket:message key="syncStatus"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="syncStatus">[syncStatus]</span>
+ </div>
+ </div>
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="fullReconciliation"><wicket:message key="fullReconciliation"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="fullReconciliation">[fullReconciliation]</span>
+ </div>
+ </div>
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="matchingRule"><wicket:message key="matchingRule"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="matchingRule">[matchingRule]</span>
+ </div>
+ </div>
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="unmatchingRule"><wicket:message key="unmatchingRule"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="unmatchingRule">[unmatchingRule]</span>
+ </div>
+ </div>
+ <wicket:child/>
+ </div>
+ </span>
+ </div>
+ </div>
+ <div id="crontab">
+ <span wicket:id="crontab">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <label for="cron"><wicket:message key="cron"/></label>
+ </div>
+ <div class="tablerow">
+ <input type="text" id="seconds" class="text ui-widget-content ui-corner-all" wicket:id="seconds" style="width: 50px;float: left" />
+ <input type="text" id="minutes" class="text ui-widget-content ui-corner-all" wicket:id="minutes" style="width: 50px;float: left" />
+ <input type="text" id="hours" class="text ui-widget-content ui-corner-all" wicket:id="hours" style="width: 50px;float: left" />
+ <input type="text" id="daysOfMonth" class="text ui-widget-content ui-corner-all" wicket:id="daysOfMonth" style="width: 50px;float: left" />
+ <input type="text" id="months" class="text ui-widget-content ui-corner-all" wicket:id="months" style="width: 50px;float: left" />
+ <input type="text" id="daysOfWeek" class="text ui-widget-content ui-corner-all" wicket:id="daysOfWeek" style="width: 50px" />
+ </div>
+ <div class="tablerow alt">
+ <label for="cronExpression"><wicket:message key="templates"/></label>
+ </div>
+ <div class="tablerow">
+ <select class="text ui-widget-content ui-corner-all" wicket:id="cronTemplateChooser" style="width: 250px"/>
+ </div>
+ </div>
+ </span>
+ </div>
+ <div id="executions" class="ui-widget">
+ <span wicket:id="executionContainer" id="executionContainer">
+ <table class="ui-widget ui-widget-content"
+ wicket:id="executionsTable" style="width: 100%"/>
+ </span>
+ </div>
+ </div>
+ <div style="margin: 20px 10px 0">
+ <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="apply"/>
+ <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ <div wicket:id="taskExecMessageWin"/>
+ </wicket:extend>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage.properties
new file mode 100644
index 0000000..4fa0321
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage.properties
@@ -0,0 +1,43 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Profile
+crontab=Schedule
+executions=Executions
+title=Task
+resourceName=Resource Name
+name=Name
+description=Description
+lastExec=Last Execution
+nextExec=Next Execution
+cron=Schedule (seconds, minutes, hours, days of month, months, days of week)
+templates=Remove task from scheduler / Use a template to schedule
+apply=Save
+startDate=Start date
+endDate=End date
+status=Status
+message=Message
+delete=Delete
+showMessage=Show
+chooseForTemplate=Use A Template
+creates=Allow create operations
+deletes=Allow delete operations
+updates=Allow update operations
+syncStatus=Allow status synchronization
+fullReconciliation=Full reconciliation
+actionsClasses=Actions classes
+matchingRule=Matching Rule
+unmatchingRule=Unmatching Rule
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage_it.properties
new file mode 100644
index 0000000..0ec6d67
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage_it.properties
@@ -0,0 +1,44 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Profilo
+crontab=Schedule
+executions=Esecuzioni
+title=Task
+resourceName=Nome Risorsa
+name=Nome
+description=Descrizione
+lastExec=Ultima Esecuzione
+nextExec=Prossima Esecuzione
+cron=Schedule (secondi, minuti, ore, giorni del mese, mesi, giorni della settimana)
+templates=Rimuovi task dallo scheduler / Utilizza un template per schedulare
+apply=Salva
+startDate=Data di avvio
+endDate=Data di conclusione
+status=Stato
+message=Messaggio
+delete=Rimozione
+showMessage=Mostra
+chooseForTemplate=Usa Un Template
+creates=Consenti operazioni di creazione
+deletes=Consenti operazioni di rimozione
+updates=Consenti operazioni di modifica
+syncStatus=Consenti sincronizzazione di stato
+fullReconciliation=Riconciliazione totale
+actionsClasses=Classi azioni
+syncStatus=Sincronizza stato utente
+matchingRule=Regola di corrispondenza
+unmatchingRule=Regola di non corrispondenza
[05/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java b/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java
deleted file mode 100644
index 44427cc..0000000
--- a/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java
+++ /dev/null
@@ -1,508 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.util;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.apache.commons.lang3.SerializationUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.common.mod.AbstractAttributableMod;
-import org.apache.syncope.common.mod.AbstractSubjectMod;
-import org.apache.syncope.common.mod.AttributeMod;
-import org.apache.syncope.common.mod.MembershipMod;
-import org.apache.syncope.common.mod.ReferenceMod;
-import org.apache.syncope.common.mod.RoleMod;
-import org.apache.syncope.common.mod.UserMod;
-import org.apache.syncope.common.to.AbstractAttributableTO;
-import org.apache.syncope.common.to.AbstractSubjectTO;
-import org.apache.syncope.common.to.AttributeTO;
-import org.apache.syncope.common.to.MembershipTO;
-import org.apache.syncope.common.to.RoleTO;
-import org.apache.syncope.common.to.UserTO;
-
-/**
- * Utility class for manipulating classes extending AbstractAttributableTO and AbstractAttributableMod.
- *
- * @see AbstractAttributableTO
- * @see AbstractAttributableMod
- */
-public final class AttributableOperations {
-
- private AttributableOperations() {
- // empty constructor for static utility classes
- }
-
- private static void populate(final Map<String, AttributeTO> updatedAttrs,
- final Map<String, AttributeTO> originalAttrs, final AbstractAttributableMod result) {
-
- populate(updatedAttrs, originalAttrs, result, false);
- }
-
- private static void populate(final Map<String, AttributeTO> updatedAttrs,
- final Map<String, AttributeTO> originalAttrs, final AbstractAttributableMod result,
- final boolean virtuals) {
-
- for (Map.Entry<String, AttributeTO> entry : updatedAttrs.entrySet()) {
- AttributeMod mod = new AttributeMod();
- mod.setSchema(entry.getKey());
-
- Set<String> updatedValues = new HashSet<String>(entry.getValue().getValues());
-
- Set<String> originalValues = originalAttrs.containsKey(entry.getKey())
- ? new HashSet<String>(originalAttrs.get(entry.getKey()).getValues())
- : Collections.<String>emptySet();
-
- if (!originalAttrs.containsKey(entry.getKey())) {
- // SYNCOPE-459: take care of user virtual attributes without any value
- updatedValues.remove("");
- mod.getValuesToBeAdded().addAll(new ArrayList<String>(updatedValues));
-
- if (virtuals) {
- result.getVirAttrsToUpdate().add(mod);
- } else {
- result.getAttrsToUpdate().add(mod);
- }
- } else if (!updatedValues.equals(originalValues)) {
- // avoid unwanted inputs
- updatedValues.remove("");
- if (!entry.getValue().isReadonly()) {
- mod.getValuesToBeAdded().addAll(updatedValues);
-
- if (!mod.isEmpty()) {
- if (virtuals) {
- result.getVirAttrsToRemove().add(mod.getSchema());
- } else {
- result.getAttrsToRemove().add(mod.getSchema());
- }
- }
- }
-
- mod.getValuesToBeRemoved().addAll(originalValues);
-
- if (!mod.isEmpty()) {
- if (virtuals) {
- result.getVirAttrsToUpdate().add(mod);
- } else {
- result.getAttrsToUpdate().add(mod);
- }
- }
- }
- }
- }
-
- private static void diff(
- final AbstractAttributableTO updated,
- final AbstractAttributableTO original,
- final AbstractAttributableMod result,
- final boolean incremental) {
-
- // 1. check same id
- if (updated.getId() != original.getId()) {
- throw new IllegalArgumentException("AttributableTO's id must be the same");
- }
- result.setId(updated.getId());
-
- // 2. attributes
- Map<String, AttributeTO> updatedAttrs = new HashMap<String, AttributeTO>(updated.getAttrMap());
- Map<String, AttributeTO> originalAttrs = new HashMap<String, AttributeTO>(original.getAttrMap());
-
- Set<String> originalAttrNames = new HashSet<String>(originalAttrs.keySet());
- originalAttrNames.removeAll(updatedAttrs.keySet());
-
- if (!incremental) {
- result.getAttrsToRemove().clear();
- result.getAttrsToRemove().addAll(originalAttrNames);
- }
-
- Set<String> emptyUpdatedAttrs = new HashSet<String>();
- for (Map.Entry<String, AttributeTO> entry : updatedAttrs.entrySet()) {
- if (entry.getValue().getValues() == null || entry.getValue().getValues().isEmpty()) {
-
- emptyUpdatedAttrs.add(entry.getKey());
- }
- }
- for (String emptyUpdatedAttr : emptyUpdatedAttrs) {
- updatedAttrs.remove(emptyUpdatedAttr);
- result.getAttrsToRemove().add(emptyUpdatedAttr);
- }
-
- populate(updatedAttrs, originalAttrs, result);
-
- // 3. derived attributes
- updatedAttrs = updated.getDerAttrMap();
- originalAttrs = original.getDerAttrMap();
-
- originalAttrNames = new HashSet<String>(originalAttrs.keySet());
- originalAttrNames.removeAll(updatedAttrs.keySet());
-
- if (!incremental) {
- result.getDerAttrsToRemove().clear();
- result.getDerAttrsToRemove().addAll(originalAttrNames);
- }
-
- Set<String> updatedAttrNames = new HashSet<String>(updatedAttrs.keySet());
- updatedAttrNames.removeAll(originalAttrs.keySet());
- result.getDerAttrsToAdd().clear();
- result.getDerAttrsToAdd().addAll(updatedAttrNames);
-
- // 4. virtual attributes
- updatedAttrs = updated.getVirAttrMap();
- originalAttrs = original.getVirAttrMap();
-
- originalAttrNames = new HashSet<String>(originalAttrs.keySet());
- originalAttrNames.removeAll(updatedAttrs.keySet());
-
- if (!incremental) {
- result.getVirAttrsToRemove().clear();
- result.getVirAttrsToRemove().addAll(originalAttrNames);
- }
-
- populate(updatedAttrs, originalAttrs, result, true);
-
- // 5. resources
- if (original instanceof AbstractSubjectTO && updated instanceof AbstractSubjectTO
- && result instanceof AbstractSubjectMod) {
-
- Set<String> updatedRes = new HashSet<String>(((AbstractSubjectTO) updated).getResources());
- Set<String> originalRes = new HashSet<String>(((AbstractSubjectTO) original).getResources());
-
- updatedRes.removeAll(originalRes);
- ((AbstractSubjectMod) result).getResourcesToAdd().clear();
- ((AbstractSubjectMod) result).getResourcesToAdd().addAll(updatedRes);
-
- originalRes.removeAll(((AbstractSubjectTO) updated).getResources());
-
- if (!incremental) {
- ((AbstractSubjectMod) result).getResourcesToRemove().clear();
- ((AbstractSubjectMod) result).getResourcesToRemove().addAll(originalRes);
- }
- }
- }
-
- /**
- * Calculate modifications needed by first in order to be equal to second.
- *
- * @param updated updated UserTO
- * @param original original UserTO
- * @return UserMod containing differences
- */
- public static UserMod diff(final UserTO updated, final UserTO original) {
- return diff(updated, original, false);
- }
-
- /**
- * Calculate modifications needed by first in order to be equal to second.
- *
- * @param updated updated UserTO
- * @param original original UserTO
- * @param incremental perform incremental diff (without removing existing info)
- * @return UserMod containing differences
- */
- public static UserMod diff(final UserTO updated, final UserTO original, final boolean incremental) {
- UserMod result = new UserMod();
-
- diff(updated, original, result, incremental);
-
- // 1. password
- if (updated.getPassword() != null && (original.getPassword() == null
- || !original.getPassword().equals(updated.getPassword()))) {
-
- result.setPassword(updated.getPassword());
- }
-
- // 2. username
- if (original.getUsername() != null && !original.getUsername().equals(updated.getUsername())) {
- result.setUsername(updated.getUsername());
- }
-
- // 3. security question / answer
- if (updated.getSecurityQuestion() == null) {
- result.setSecurityQuestion(null);
- result.setSecurityAnswer(null);
- } else if (!updated.getSecurityQuestion().equals(original.getSecurityQuestion())
- || StringUtils.isNotBlank(updated.getSecurityAnswer())) {
-
- result.setSecurityQuestion(updated.getSecurityQuestion());
- result.setSecurityAnswer(updated.getSecurityAnswer());
- }
-
- // 4. memberships
- Map<Long, MembershipTO> updatedMembs = updated.getMembershipMap();
- Map<Long, MembershipTO> originalMembs = original.getMembershipMap();
-
- for (Map.Entry<Long, MembershipTO> entry : updatedMembs.entrySet()) {
- MembershipMod membMod = new MembershipMod();
- membMod.setRole(entry.getValue().getRoleId());
-
- if (originalMembs.containsKey(entry.getKey())) {
- // if memberships are actually same, just make the isEmpty() call below succeed
- if (entry.getValue().equals(originalMembs.get(entry.getKey()))) {
- membMod.setRole(0);
- } else {
- diff(entry.getValue(), originalMembs.get(entry.getKey()), membMod, false);
- }
- } else {
- for (AttributeTO attr : entry.getValue().getAttrs()) {
- AttributeMod attrMod = new AttributeMod();
- attrMod.setSchema(attr.getSchema());
- attrMod.getValuesToBeAdded().addAll(attr.getValues());
-
- if (!attrMod.isEmpty()) {
- membMod.getAttrsToUpdate().add(attrMod);
- membMod.getAttrsToRemove().add(attrMod.getSchema());
- }
- }
- for (AttributeTO attr : entry.getValue().getDerAttrs()) {
- membMod.getDerAttrsToAdd().add(attr.getSchema());
- }
- for (AttributeTO attr : entry.getValue().getVirAttrs()) {
- AttributeMod attrMod = new AttributeMod();
- attrMod.setSchema(attr.getSchema());
- attrMod.getValuesToBeAdded().addAll(attr.getValues());
-
- if (!attrMod.isEmpty()) {
- membMod.getVirAttrsToUpdate().add(attrMod);
- membMod.getAttrsToRemove().add(attrMod.getSchema());
- }
- }
- }
-
- if (!membMod.isEmpty()) {
- result.getMembershipsToAdd().add(membMod);
- }
- }
-
- if (!incremental) {
- Set<Long> originalRoles = new HashSet<Long>(originalMembs.keySet());
- originalRoles.removeAll(updatedMembs.keySet());
- for (Long roleId : originalRoles) {
- result.getMembershipsToRemove().add(originalMembs.get(roleId).getId());
- }
- }
-
- return result;
- }
-
- /**
- * Calculate modifications needed by first in order to be equal to second.
- *
- * @param updated updated RoleTO
- * @param original original RoleTO
- * @return RoleMod containing differences
- */
- public static RoleMod diff(final RoleTO updated, final RoleTO original) {
- return diff(updated, original, false);
- }
-
- /**
- * Calculate modifications needed by first in order to be equal to second.
- *
- * @param updated updated RoleTO
- * @param original original RoleTO
- * @param incremental perform incremental diff (without removing existing info)
- * @return RoleMod containing differences
- */
- public static RoleMod diff(final RoleTO updated, final RoleTO original, final boolean incremental) {
- RoleMod result = new RoleMod();
-
- diff(updated, original, result, incremental);
-
- // 1. inheritance
- result.setInheritOwner(updated.isInheritOwner());
- result.setInheritTemplates(updated.isInheritTemplates());
- result.setInheritAccountPolicy(updated.isInheritAccountPolicy());
- result.setInheritPasswordPolicy(updated.isInheritPasswordPolicy());
- result.setInheritAttributes(updated.isInheritAttrs());
- result.setInheritDerAttrs(updated.isInheritDerAttrs());
- result.setInheritVirAttrs(updated.isInheritVirAttrs());
-
- // 2. policies
- result.setAccountPolicy(new ReferenceMod(updated.getAccountPolicy()));
- result.setPasswordPolicy(new ReferenceMod(updated.getPasswordPolicy()));
-
- // 3. name
- if (!original.getName().equals(updated.getName())) {
- result.setName(updated.getName());
- }
-
- // 4. entitlements
- Set<String> updatedEnts = new HashSet<String>(updated.getEntitlements());
- Set<String> originalEnts = new HashSet<String>(original.getEntitlements());
- if (updatedEnts.equals(originalEnts)) {
- result.setModEntitlements(false);
- result.getEntitlements().clear();
- } else {
- result.setModEntitlements(true);
- result.getEntitlements().addAll(updated.getEntitlements());
- }
-
- // 5. templates
- Set<String> updatedTemplates = new HashSet<String>(updated.getRAttrTemplates());
- Set<String> originalTemplates = new HashSet<String>(original.getRAttrTemplates());
- if (updatedTemplates.equals(originalTemplates)) {
- result.setModRAttrTemplates(false);
- result.getRAttrTemplates().clear();
- } else {
- result.setModRAttrTemplates(true);
- result.getRAttrTemplates().addAll(updated.getRAttrTemplates());
- }
- updatedTemplates = new HashSet<String>(updated.getRDerAttrTemplates());
- originalTemplates = new HashSet<String>(original.getRDerAttrTemplates());
- if (updatedTemplates.equals(originalTemplates)) {
- result.setModRDerAttrTemplates(false);
- result.getRDerAttrTemplates().clear();
- } else {
- result.setModRDerAttrTemplates(true);
- result.getRDerAttrTemplates().addAll(updated.getRDerAttrTemplates());
- }
- updatedTemplates = new HashSet<String>(updated.getRVirAttrTemplates());
- originalTemplates = new HashSet<String>(original.getRVirAttrTemplates());
- if (updatedTemplates.equals(originalTemplates)) {
- result.setModRVirAttrTemplates(false);
- result.getRVirAttrTemplates().clear();
- } else {
- result.setModRVirAttrTemplates(true);
- result.getRVirAttrTemplates().addAll(updated.getRVirAttrTemplates());
- }
- updatedTemplates = new HashSet<String>(updated.getMAttrTemplates());
- originalTemplates = new HashSet<String>(original.getMAttrTemplates());
- if (updatedTemplates.equals(originalTemplates)) {
- result.setModMAttrTemplates(false);
- result.getMAttrTemplates().clear();
- } else {
- result.setModMAttrTemplates(true);
- result.getMAttrTemplates().addAll(updated.getMAttrTemplates());
- }
- updatedTemplates = new HashSet<String>(updated.getMDerAttrTemplates());
- originalTemplates = new HashSet<String>(original.getMDerAttrTemplates());
- if (updatedTemplates.equals(originalTemplates)) {
- result.setModMDerAttrTemplates(false);
- result.getMDerAttrTemplates().clear();
- } else {
- result.setModMDerAttrTemplates(true);
- result.getMDerAttrTemplates().addAll(updated.getMDerAttrTemplates());
- }
- updatedTemplates = new HashSet<String>(updated.getMVirAttrTemplates());
- originalTemplates = new HashSet<String>(original.getMVirAttrTemplates());
- if (updatedTemplates.equals(originalTemplates)) {
- result.setModMVirAttrTemplates(false);
- result.getMVirAttrTemplates().clear();
- } else {
- result.setModMVirAttrTemplates(true);
- result.getMVirAttrTemplates().addAll(updated.getMVirAttrTemplates());
- }
-
- // 6. owner
- result.setUserOwner(new ReferenceMod(updated.getUserOwner()));
- result.setRoleOwner(new ReferenceMod(updated.getRoleOwner()));
-
- return result;
- }
-
- private static List<AttributeTO> getUpdateValues(final Map<String, AttributeTO> attrs,
- final Set<String> attrsToBeRemoved, final Set<AttributeMod> attrsToBeUpdated) {
-
- Map<String, AttributeTO> rwattrs = new HashMap<String, AttributeTO>(attrs);
- for (String attrName : attrsToBeRemoved) {
- rwattrs.remove(attrName);
- }
- for (AttributeMod attrMod : attrsToBeUpdated) {
- if (rwattrs.containsKey(attrMod.getSchema())) {
- AttributeTO attrTO = rwattrs.get(attrMod.getSchema());
- attrTO.getValues().removeAll(attrMod.getValuesToBeRemoved());
- attrTO.getValues().addAll(attrMod.getValuesToBeAdded());
- } else {
- AttributeTO attrTO = new AttributeTO();
- attrTO.setSchema(attrMod.getSchema());
- attrTO.getValues().addAll(attrMod.getValuesToBeAdded());
-
- rwattrs.put(attrMod.getSchema(), attrTO);
- }
- }
-
- return new ArrayList<AttributeTO>(rwattrs.values());
- }
-
- private static <T extends AbstractAttributableTO, K extends AbstractAttributableMod> void apply(final T to,
- final K mod, final T result) {
-
- // 1. attributes
- result.getAttrs().addAll(getUpdateValues(to.getAttrMap(),
- mod.getAttrsToRemove(), mod.getAttrsToUpdate()));
-
- // 2. derived attributes
- Map<String, AttributeTO> attrs = to.getDerAttrMap();
- for (String attrName : mod.getDerAttrsToRemove()) {
- attrs.remove(attrName);
- }
- for (String attrName : mod.getDerAttrsToAdd()) {
- AttributeTO attrTO = new AttributeTO();
- attrTO.setSchema(attrName);
-
- attrs.put(attrName, attrTO);
- }
- result.getDerAttrs().addAll(attrs.values());
-
- // 3. virtual attributes
- result.getVirAttrs().addAll(getUpdateValues(to.getVirAttrMap(),
- mod.getVirAttrsToRemove(), mod.getVirAttrsToUpdate()));
-
- // 4. resources
- if (result instanceof AbstractSubjectTO && mod instanceof AbstractSubjectMod) {
- ((AbstractSubjectTO) result).getResources().removeAll(((AbstractSubjectMod) mod).getResourcesToRemove());
- ((AbstractSubjectTO) result).getResources().addAll(((AbstractSubjectMod) mod).getResourcesToAdd());
- }
- }
-
- public static UserTO apply(final UserTO userTO, final UserMod userMod) {
- // 1. check same id
- if (userTO.getId() != userMod.getId()) {
- throw new IllegalArgumentException("UserTO and UserMod ids must be the same");
- }
-
- UserTO result = SerializationUtils.clone(userTO);
- apply(userTO, userMod, result);
-
- // 1. password
- result.setPassword(userMod.getPassword());
-
- // 2. username
- if (userMod.getUsername() != null) {
- result.setUsername(userMod.getUsername());
- }
- // 3. memberships
- Map<Long, MembershipTO> membs = result.getMembershipMap();
- for (Long membId : userMod.getMembershipsToRemove()) {
- result.getMemberships().remove(membs.get(membId));
- }
- for (MembershipMod membMod : userMod.getMembershipsToAdd()) {
- MembershipTO membTO = new MembershipTO();
- membTO.setRoleId(membMod.getRole());
-
- apply(membTO, membMod, membTO);
- }
-
- return result;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/util/BeanUtils.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/util/BeanUtils.java b/common/src/main/java/org/apache/syncope/common/util/BeanUtils.java
deleted file mode 100644
index eb25ae1..0000000
--- a/common/src/main/java/org/apache/syncope/common/util/BeanUtils.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.util;
-
-import static org.springframework.beans.BeanUtils.getPropertyDescriptor;
-import static org.springframework.beans.BeanUtils.getPropertyDescriptors;
-
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.FatalBeanException;
-import org.springframework.util.Assert;
-import org.springframework.util.ClassUtils;
-
-/**
- * Overrides Spring's BeanUtils not using collection setters but instead getters + addAll() / putAll(),
- * in a JAXB friendly way.
- *
- * Refer to <a href="https://issues.apache.org/jira/browse/SYNCOPE-246">SYNCOPE-246</a> for more information.
- *
- * @see org.springframework.beans.BeanUtils
- */
-public final class BeanUtils {
-
- private BeanUtils() {
- // Empty private constructor for static utility classes
- }
-
- /**
- * Copy the property values of the given source bean into the target bean.
- * <p>
- * Note: The source and target classes do not have to match or even be derived
- * from each other, as long as the properties match. Any bean properties that the
- * source bean exposes but the target bean does not will silently be ignored.
- * </p><p>
- * This is just a convenience method. For more complex transfer needs,
- * consider using a full BeanWrapper.
- * </p>
- * @param source the source bean
- * @param target the target bean
- * @throws BeansException if the copying failed
- * @see org.springframework.beans.BeanWrapper
- */
- public static void copyProperties(final Object source, final Object target) throws BeansException {
- copyProperties(source, target, null, (String[]) null);
- }
-
- /**
- * Copy the property values of the given source bean into the given target bean,
- * only setting properties defined in the given "editable" class (or interface).
- * <p>
- * Note: The source and target classes do not have to match or even be derived
- * from each other, as long as the properties match. Any bean properties that the
- * source bean exposes but the target bean does not will silently be ignored.
- * </p><p>
- * This is just a convenience method. For more complex transfer needs,
- * consider using a full BeanWrapper.
- * </p>
- *
- * @param source the source bean
- * @param target the target bean
- * @param editable the class (or interface) to restrict property setting to
- * @throws BeansException if the copying failed
- * @see org.springframework.beans.BeanWrapper
- */
- public static void copyProperties(final Object source, final Object target, final Class<?> editable)
- throws BeansException {
-
- copyProperties(source, target, editable, (String[]) null);
- }
-
- /**
- * Copy the property values of the given source bean into the given target bean,
- * ignoring the given "ignoreProperties".
- * <p>
- * Note: The source and target classes do not have to match or even be derived
- * from each other, as long as the properties match. Any bean properties that the
- * source bean exposes but the target bean does not will silently be ignored.
- * </p><p>
- * This is just a convenience method. For more complex transfer needs,
- * consider using a full BeanWrapper.
- * </p>
- *
- * @param source the source bean
- * @param target the target bean
- * @param ignoreProperties array of property names to ignore
- * @throws BeansException if the copying failed
- * @see org.springframework.beans.BeanWrapper
- */
- public static void copyProperties(final Object source, final Object target, final String... ignoreProperties)
- throws BeansException {
-
- copyProperties(source, target, null, ignoreProperties);
- }
-
- /**
- * Copy the property values of the given source bean into the given target bean.
- * <p>
- * Note: The source and target classes do not have to match or even be derived
- * from each other, as long as the properties match. Any bean properties that the
- * source bean exposes but the target bean does not will silently be ignored.
- * </p>
- *
- * @param source the source bean
- * @param target the target bean
- * @param editable the class (or interface) to restrict property setting to
- * @param ignoreProperties array of property names to ignore
- * @throws BeansException if the copying failed
- * @see org.springframework.beans.BeanWrapper
- */
- @SuppressWarnings("unchecked")
- private static void copyProperties(final Object source, final Object target, final Class<?> editable,
- final String... ignoreProperties) throws BeansException {
-
- Assert.notNull(source, "Source must not be null");
- Assert.notNull(target, "Target must not be null");
-
- Class<?> actualEditable = target.getClass();
- if (editable != null) {
- if (!editable.isInstance(target)) {
- throw new IllegalArgumentException("Target class [" + target.getClass().getName()
- + "] not assignable to Editable class [" + editable.getName() + "]");
- }
- actualEditable = editable;
- }
- PropertyDescriptor[] targetPds = getPropertyDescriptors(actualEditable);
- List<String> ignoreList = (ignoreProperties == null)
- ? Collections.<String>emptyList() : Arrays.asList(ignoreProperties);
-
- for (PropertyDescriptor targetPd : targetPds) {
- if (ignoreProperties == null || (!ignoreList.contains(targetPd.getName()))) {
- PropertyDescriptor sourcePd = getPropertyDescriptor(source.getClass(), targetPd.getName());
- if (sourcePd != null) {
- Method readMethod = sourcePd.getReadMethod();
- if (readMethod != null) {
- Method writeMethod = targetPd.getWriteMethod();
-
- try {
- // Diverts from Spring's BeanUtils: if no write method is found and property is collection,
- // try to use addAll() / putAll().
- if (writeMethod == null) {
- Object value = readMethod.invoke(source);
- Method targetReadMethod = targetPd.getReadMethod();
- if (targetReadMethod != null) {
- if (!Modifier.isPublic(targetReadMethod.getDeclaringClass().getModifiers())) {
- targetReadMethod.setAccessible(true);
- }
- Object destValue = targetReadMethod.invoke(target);
-
- if (value instanceof Collection && destValue instanceof Collection) {
- ((Collection) destValue).clear();
- ((Collection) destValue).addAll((Collection) value);
- } else if (value instanceof Map && destValue instanceof Map) {
- ((Map) destValue).clear();
- ((Map) destValue).putAll((Map) value);
- }
- }
- } else if (ClassUtils.isAssignable(
- writeMethod.getParameterTypes()[0], readMethod.getReturnType())) {
-
- if (!Modifier.isPublic(readMethod.getDeclaringClass().getModifiers())) {
- readMethod.setAccessible(true);
- }
- Object value = readMethod.invoke(source);
- if (!Modifier.isPublic(writeMethod.getDeclaringClass().getModifiers())) {
- writeMethod.setAccessible(true);
- }
- writeMethod.invoke(target, value);
- }
- } catch (Throwable ex) {
- throw new FatalBeanException(
- "Could not copy property '" + targetPd.getName() + "' from source to target", ex);
- }
- }
- }
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/util/CollectionWrapper.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/util/CollectionWrapper.java b/common/src/main/java/org/apache/syncope/common/util/CollectionWrapper.java
deleted file mode 100644
index e95f9c3..0000000
--- a/common/src/main/java/org/apache/syncope/common/util/CollectionWrapper.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import org.apache.syncope.common.wrap.AbstractWrappable;
-import org.apache.syncope.common.to.LoggerTO;
-import org.apache.syncope.common.types.AuditLoggerName;
-import org.apache.syncope.common.types.LoggerLevel;
-
-public final class CollectionWrapper {
-
- private CollectionWrapper() {
- // empty constructor for static utility class
- }
-
- public static <E, T extends AbstractWrappable<E>> List<T> wrap(final E element, final Class<T> reference) {
- return Collections.singletonList(AbstractWrappable.getInstance(reference, element));
- }
-
- public static <E, T extends AbstractWrappable<E>> List<T> wrap(
- final Collection<E> collection, final Class<T> reference) {
-
- List<T> response = new ArrayList<T>();
- for (E element : collection) {
- response.add(AbstractWrappable.getInstance(reference, element));
- }
- return response;
- }
-
- public static <T extends AbstractWrappable<String>> List<String> unwrap(final Collection<T> collection) {
- List<String> response = new ArrayList<String>();
- for (T item : collection) {
- response.add(item.getElement());
- }
- return response;
- }
-
- public static List<AuditLoggerName> wrapLogger(final Collection<LoggerTO> logger) {
- List<AuditLoggerName> respons = new ArrayList<AuditLoggerName>();
- for (LoggerTO l : logger) {
- try {
- respons.add(AuditLoggerName.fromLoggerName(l.getName()));
- } catch (Exception ignore) {
- // ignore
- }
- }
- return respons;
- }
-
- public static List<LoggerTO> unwrapLogger(final Collection<AuditLoggerName> auditNames) {
- List<LoggerTO> respons = new ArrayList<LoggerTO>();
- for (AuditLoggerName l : auditNames) {
- LoggerTO loggerTO = new LoggerTO();
- loggerTO.setName(l.toLoggerName());
- loggerTO.setLevel(LoggerLevel.DEBUG);
- respons.add(loggerTO);
- }
- return respons;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/util/LoggerEventUtils.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/util/LoggerEventUtils.java b/common/src/main/java/org/apache/syncope/common/util/LoggerEventUtils.java
deleted file mode 100644
index b416dae..0000000
--- a/common/src/main/java/org/apache/syncope/common/util/LoggerEventUtils.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.util;
-
-import java.util.AbstractMap;
-import java.util.Map;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.common.to.EventCategoryTO;
-import org.apache.syncope.common.types.AuditElements;
-import org.apache.syncope.common.types.AuditElements.EventCategoryType;
-import org.apache.syncope.common.types.AuditElements.Result;
-
-public class LoggerEventUtils {
-
- public static Map.Entry<EventCategoryTO, Result> parseEventCategory(final String event) {
- final EventCategoryTO eventCategoryTO = new EventCategoryTO();
-
- Result condition = null;
-
- if (StringUtils.isNotEmpty(event)) {
- final String[] elements = event.substring(1, event.length() - 1).split("\\]:\\[");
-
- if (elements.length == 1) {
- eventCategoryTO.setType(EventCategoryType.CUSTOM);
- condition = Result.SUCCESS;
- eventCategoryTO.getEvents().add(event);
- } else {
- EventCategoryType type;
-
- if (EventCategoryType.PROPAGATION.toString().equals(elements[0])) {
- type = EventCategoryType.PROPAGATION;
- } else if (EventCategoryType.SYNCHRONIZATION.toString().equals(elements[0])) {
- type = EventCategoryType.SYNCHRONIZATION;
- } else if (EventCategoryType.PUSH.toString().equals(elements[0])) {
- type = EventCategoryType.PUSH;
- } else {
- try {
- type = EventCategoryType.valueOf(elements[0]);
- } catch (Exception e) {
- type = EventCategoryType.CUSTOM;
- }
- }
-
- eventCategoryTO.setType(type);
-
- eventCategoryTO.setCategory(StringUtils.isNotEmpty(elements[1]) ? elements[1] : null);
-
- eventCategoryTO.setSubcategory(StringUtils.isNotEmpty(elements[2]) ? elements[2] : null);
-
- if (elements.length > 3 && StringUtils.isNotEmpty(elements[3])) {
- eventCategoryTO.getEvents().add(elements[3]);
- }
-
- if (elements.length > 4) {
- condition = Result.valueOf(elements[4].toUpperCase());
- }
- }
- }
-
- return new AbstractMap.SimpleEntry< EventCategoryTO, Result>(eventCategoryTO, condition);
- }
-
- /**
- * Build event string with the following syntax [type]:[category]:[subcategory]:[event]:[maybe result value cond].
- *
- * @param type event type.
- * @param category event category.
- * @param subcategory event subcategory.
- * @param event event.
- * @param resultValueCondition result value condition.
- * @return event string.
- */
- public static String buildEvent(
- final AuditElements.EventCategoryType type,
- final String category,
- final String subcategory,
- final String event,
- final AuditElements.Result resultValueCondition) {
-
- final StringBuilder eventBuilder = new StringBuilder();
-
- eventBuilder.append('[');
- if (type != null) {
- if (StringUtils.isNotBlank(type.toString())) {
- eventBuilder.append(type.toString());
- } else {
- eventBuilder.append(type.name());
- }
- }
- eventBuilder.append(']');
-
- eventBuilder.append(":");
-
- eventBuilder.append('[');
- if (StringUtils.isNotBlank(category)) {
- eventBuilder.append(category);
- }
- eventBuilder.append(']');
-
- eventBuilder.append(":");
-
- eventBuilder.append('[');
- if (StringUtils.isNotBlank(subcategory)) {
- eventBuilder.append(subcategory);
- }
- eventBuilder.append(']');
-
- eventBuilder.append(":");
-
- eventBuilder.append('[');
- if (StringUtils.isNotBlank(event)) {
- eventBuilder.append(event);
- }
- eventBuilder.append(']');
-
- if (resultValueCondition != null) {
- eventBuilder.append(":");
-
- eventBuilder.append('[');
- eventBuilder.append(resultValueCondition);
- eventBuilder.append(']');
- }
-
- return eventBuilder.toString();
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/wrap/AbstractWrappable.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/wrap/AbstractWrappable.java b/common/src/main/java/org/apache/syncope/common/wrap/AbstractWrappable.java
deleted file mode 100644
index da52a8f..0000000
--- a/common/src/main/java/org/apache/syncope/common/wrap/AbstractWrappable.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.wrap;
-
-import org.apache.syncope.common.AbstractBaseBean;
-
-public abstract class AbstractWrappable<E> extends AbstractBaseBean {
-
- private static final long serialVersionUID = 1712808704911635170L;
-
- private E element;
-
- public static <E, T extends AbstractWrappable<E>> T getInstance(final Class<T> reference, final E element) {
- try {
- T instance = reference.newInstance();
- instance.setElement(element);
- return instance;
- } catch (Exception e) {
- throw new IllegalArgumentException("Could not instantiate " + reference.getName(), e);
- }
- }
-
- public E getElement() {
- return element;
- }
-
- public void setElement(final E element) {
- this.element = element;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/wrap/CorrelationRuleClass.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/wrap/CorrelationRuleClass.java b/common/src/main/java/org/apache/syncope/common/wrap/CorrelationRuleClass.java
deleted file mode 100644
index 11d99ff..0000000
--- a/common/src/main/java/org/apache/syncope/common/wrap/CorrelationRuleClass.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.wrap;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "correlationRuleClass")
-@XmlType
-public class CorrelationRuleClass extends AbstractWrappable<String> {
-
- private static final long serialVersionUID = -6715106427060816725L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/wrap/EntitlementTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/wrap/EntitlementTO.java b/common/src/main/java/org/apache/syncope/common/wrap/EntitlementTO.java
deleted file mode 100644
index 5cde09d..0000000
--- a/common/src/main/java/org/apache/syncope/common/wrap/EntitlementTO.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.wrap;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "entitlement")
-@XmlType
-public class EntitlementTO extends AbstractWrappable<String> {
-
- private static final long serialVersionUID = 7133614577172038452L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/wrap/JobClass.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/wrap/JobClass.java b/common/src/main/java/org/apache/syncope/common/wrap/JobClass.java
deleted file mode 100644
index 340b400..0000000
--- a/common/src/main/java/org/apache/syncope/common/wrap/JobClass.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.wrap;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "jobClass")
-@XmlType
-public class JobClass extends AbstractWrappable<String> {
-
- private static final long serialVersionUID = -1953799905627918822L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/wrap/MailTemplate.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/wrap/MailTemplate.java b/common/src/main/java/org/apache/syncope/common/wrap/MailTemplate.java
deleted file mode 100644
index 7763488..0000000
--- a/common/src/main/java/org/apache/syncope/common/wrap/MailTemplate.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.wrap;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "mailTemplate")
-@XmlType
-public class MailTemplate extends AbstractWrappable<String> {
-
- private static final long serialVersionUID = 7232619557172031478L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/wrap/PropagationActionClass.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/wrap/PropagationActionClass.java b/common/src/main/java/org/apache/syncope/common/wrap/PropagationActionClass.java
deleted file mode 100644
index 89628bf..0000000
--- a/common/src/main/java/org/apache/syncope/common/wrap/PropagationActionClass.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.wrap;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "propagationActionClass")
-@XmlType
-public class PropagationActionClass extends AbstractWrappable<String> {
-
- private static final long serialVersionUID = 2187654394121198308L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/wrap/PushActionClass.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/wrap/PushActionClass.java b/common/src/main/java/org/apache/syncope/common/wrap/PushActionClass.java
deleted file mode 100644
index 1f7b782..0000000
--- a/common/src/main/java/org/apache/syncope/common/wrap/PushActionClass.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.wrap;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "pushActionClass")
-@XmlType
-public class PushActionClass extends AbstractWrappable<String> {
-
- private static final long serialVersionUID = 1669581609310071906L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/wrap/ReportletConfClass.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/wrap/ReportletConfClass.java b/common/src/main/java/org/apache/syncope/common/wrap/ReportletConfClass.java
deleted file mode 100644
index 4328e69..0000000
--- a/common/src/main/java/org/apache/syncope/common/wrap/ReportletConfClass.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.wrap;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "reportletConfClass")
-@XmlType
-public class ReportletConfClass extends AbstractWrappable<String> {
-
- private static final long serialVersionUID = 1343357929074360450L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/wrap/ResourceName.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/wrap/ResourceName.java b/common/src/main/java/org/apache/syncope/common/wrap/ResourceName.java
deleted file mode 100644
index 58eda4e..0000000
--- a/common/src/main/java/org/apache/syncope/common/wrap/ResourceName.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.wrap;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "resourceName")
-@XmlType
-public class ResourceName extends AbstractWrappable<String> {
-
- private static final long serialVersionUID = -175720097924079573L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/wrap/SubjectId.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/wrap/SubjectId.java b/common/src/main/java/org/apache/syncope/common/wrap/SubjectId.java
deleted file mode 100644
index 760e4bd..0000000
--- a/common/src/main/java/org/apache/syncope/common/wrap/SubjectId.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.wrap;
-
-public class SubjectId extends AbstractWrappable<Long> {
-
- private static final long serialVersionUID = -8664228651057889297L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/wrap/SyncActionClass.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/wrap/SyncActionClass.java b/common/src/main/java/org/apache/syncope/common/wrap/SyncActionClass.java
deleted file mode 100644
index 48ff9bb..0000000
--- a/common/src/main/java/org/apache/syncope/common/wrap/SyncActionClass.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.wrap;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "syncActionClass")
-@XmlType
-public class SyncActionClass extends AbstractWrappable<String> {
-
- private static final long serialVersionUID = 1669581609310071905L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/wrap/Validator.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/wrap/Validator.java b/common/src/main/java/org/apache/syncope/common/wrap/Validator.java
deleted file mode 100644
index 39c2c5e..0000000
--- a/common/src/main/java/org/apache/syncope/common/wrap/Validator.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.wrap;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "validator")
-@XmlType
-public class Validator extends AbstractWrappable<String> {
-
- private static final long serialVersionUID = 7233619557177034453L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/wrap/package-info.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/wrap/package-info.java b/common/src/main/java/org/apache/syncope/common/wrap/package-info.java
deleted file mode 100644
index a70f6eb..0000000
--- a/common/src/main/java/org/apache/syncope/common/wrap/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
-package org.apache.syncope.common.wrap;
-
-import javax.xml.bind.annotation.XmlSchema;
-import org.apache.syncope.common.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/test/java/org/apache/syncope/common/JSONTest.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/syncope/common/JSONTest.java b/common/src/test/java/org/apache/syncope/common/JSONTest.java
deleted file mode 100644
index 5029b06..0000000
--- a/common/src/test/java/org/apache/syncope/common/JSONTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common;
-
-import static org.junit.Assert.assertEquals;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.io.IOException;
-import java.io.StringWriter;
-import org.apache.syncope.common.report.UserReportletConf;
-import org.apache.syncope.common.to.ReportTO;
-import org.apache.syncope.common.to.WorkflowFormPropertyTO;
-import org.junit.Test;
-
-public class JSONTest {
-
- @Test
- public void map() throws IOException {
- WorkflowFormPropertyTO prop = new WorkflowFormPropertyTO();
- prop.getEnumValues().put("key1", "value1");
- prop.getEnumValues().put("key2", "value2");
-
- ObjectMapper mapper = new ObjectMapper();
-
- StringWriter writer = new StringWriter();
- mapper.writeValue(writer, prop);
-
- WorkflowFormPropertyTO unserializedProp = mapper.readValue(writer.toString(), WorkflowFormPropertyTO.class);
- assertEquals(prop, unserializedProp);
- }
-
- @Test
- public void reportletConfImplementations() throws IOException {
- ReportTO report = new ReportTO();
- report.setName("testReportForCreate");
- report.getReportletConfs().add(new UserReportletConf("first"));
- report.getReportletConfs().add(new UserReportletConf("second"));
-
- ObjectMapper mapper = new ObjectMapper();
-
- StringWriter writer = new StringWriter();
- mapper.writeValue(writer, report);
-
- ReportTO actual = mapper.readValue(writer.toString(), ReportTO.class);
- assertEquals(report, actual);
- }
-}
[17/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/AttributableOperations.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/AttributableOperations.java b/common/lib/src/main/java/org/apache/syncope/common/lib/AttributableOperations.java
new file mode 100644
index 0000000..1c53db6
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/AttributableOperations.java
@@ -0,0 +1,508 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.apache.commons.lang3.SerializationUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.common.lib.mod.AbstractAttributableMod;
+import org.apache.syncope.common.lib.mod.AbstractSubjectMod;
+import org.apache.syncope.common.lib.mod.AttrMod;
+import org.apache.syncope.common.lib.mod.MembershipMod;
+import org.apache.syncope.common.lib.mod.ReferenceMod;
+import org.apache.syncope.common.lib.mod.RoleMod;
+import org.apache.syncope.common.lib.mod.UserMod;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.AbstractSubjectTO;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.MembershipTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+
+/**
+ * Utility class for manipulating classes extending AbstractAttributableTO and AbstractAttributableMod.
+ *
+ * @see AbstractAttributableTO
+ * @see AbstractAttributableMod
+ */
+public final class AttributableOperations {
+
+ private AttributableOperations() {
+ // empty constructor for static utility classes
+ }
+
+ private static void populate(final Map<String, AttrTO> updatedAttrs,
+ final Map<String, AttrTO> originalAttrs, final AbstractAttributableMod result) {
+
+ populate(updatedAttrs, originalAttrs, result, false);
+ }
+
+ private static void populate(final Map<String, AttrTO> updatedAttrs,
+ final Map<String, AttrTO> originalAttrs, final AbstractAttributableMod result,
+ final boolean virtuals) {
+
+ for (Map.Entry<String, AttrTO> entry : updatedAttrs.entrySet()) {
+ AttrMod mod = new AttrMod();
+ mod.setSchema(entry.getKey());
+
+ Set<String> updatedValues = new HashSet<String>(entry.getValue().getValues());
+
+ Set<String> originalValues = originalAttrs.containsKey(entry.getKey())
+ ? new HashSet<String>(originalAttrs.get(entry.getKey()).getValues())
+ : Collections.<String>emptySet();
+
+ if (!originalAttrs.containsKey(entry.getKey())) {
+ // SYNCOPE-459: take care of user virtual attributes without any value
+ updatedValues.remove("");
+ mod.getValuesToBeAdded().addAll(new ArrayList<String>(updatedValues));
+
+ if (virtuals) {
+ result.getVirAttrsToUpdate().add(mod);
+ } else {
+ result.getPlainAttrsToUpdate().add(mod);
+ }
+ } else if (!updatedValues.equals(originalValues)) {
+ // avoid unwanted inputs
+ updatedValues.remove("");
+ if (!entry.getValue().isReadonly()) {
+ mod.getValuesToBeAdded().addAll(updatedValues);
+
+ if (!mod.isEmpty()) {
+ if (virtuals) {
+ result.getVirAttrsToRemove().add(mod.getSchema());
+ } else {
+ result.getPlainAttrsToRemove().add(mod.getSchema());
+ }
+ }
+ }
+
+ mod.getValuesToBeRemoved().addAll(originalValues);
+
+ if (!mod.isEmpty()) {
+ if (virtuals) {
+ result.getVirAttrsToUpdate().add(mod);
+ } else {
+ result.getPlainAttrsToUpdate().add(mod);
+ }
+ }
+ }
+ }
+ }
+
+ private static void diff(
+ final AbstractAttributableTO updated,
+ final AbstractAttributableTO original,
+ final AbstractAttributableMod result,
+ final boolean incremental) {
+
+ // 1. check same id
+ if (updated.getKey() != original.getKey()) {
+ throw new IllegalArgumentException("AttributableTO's id must be the same");
+ }
+ result.setKey(updated.getKey());
+
+ // 2. attributes
+ Map<String, AttrTO> updatedAttrs = new HashMap<>(updated.getPlainAttrMap());
+ Map<String, AttrTO> originalAttrs = new HashMap<>(original.getPlainAttrMap());
+
+ Set<String> originalAttrNames = new HashSet<>(originalAttrs.keySet());
+ originalAttrNames.removeAll(updatedAttrs.keySet());
+
+ if (!incremental) {
+ result.getPlainAttrsToRemove().clear();
+ result.getPlainAttrsToRemove().addAll(originalAttrNames);
+ }
+
+ Set<String> emptyUpdatedAttrs = new HashSet<>();
+ for (Map.Entry<String, AttrTO> entry : updatedAttrs.entrySet()) {
+ if (entry.getValue().getValues() == null || entry.getValue().getValues().isEmpty()) {
+
+ emptyUpdatedAttrs.add(entry.getKey());
+ }
+ }
+ for (String emptyUpdatedAttr : emptyUpdatedAttrs) {
+ updatedAttrs.remove(emptyUpdatedAttr);
+ result.getPlainAttrsToRemove().add(emptyUpdatedAttr);
+ }
+
+ populate(updatedAttrs, originalAttrs, result);
+
+ // 3. derived attributes
+ updatedAttrs = updated.getDerAttrMap();
+ originalAttrs = original.getDerAttrMap();
+
+ originalAttrNames = new HashSet<>(originalAttrs.keySet());
+ originalAttrNames.removeAll(updatedAttrs.keySet());
+
+ if (!incremental) {
+ result.getDerAttrsToRemove().clear();
+ result.getDerAttrsToRemove().addAll(originalAttrNames);
+ }
+
+ Set<String> updatedAttrNames = new HashSet<>(updatedAttrs.keySet());
+ updatedAttrNames.removeAll(originalAttrs.keySet());
+ result.getDerAttrsToAdd().clear();
+ result.getDerAttrsToAdd().addAll(updatedAttrNames);
+
+ // 4. virtual attributes
+ updatedAttrs = updated.getVirAttrMap();
+ originalAttrs = original.getVirAttrMap();
+
+ originalAttrNames = new HashSet<>(originalAttrs.keySet());
+ originalAttrNames.removeAll(updatedAttrs.keySet());
+
+ if (!incremental) {
+ result.getVirAttrsToRemove().clear();
+ result.getVirAttrsToRemove().addAll(originalAttrNames);
+ }
+
+ populate(updatedAttrs, originalAttrs, result, true);
+
+ // 5. resources
+ if (original instanceof AbstractSubjectTO && updated instanceof AbstractSubjectTO
+ && result instanceof AbstractSubjectMod) {
+
+ Set<String> updatedRes = new HashSet<>(((AbstractSubjectTO) updated).getResources());
+ Set<String> originalRes = new HashSet<>(((AbstractSubjectTO) original).getResources());
+
+ updatedRes.removeAll(originalRes);
+ ((AbstractSubjectMod) result).getResourcesToAdd().clear();
+ ((AbstractSubjectMod) result).getResourcesToAdd().addAll(updatedRes);
+
+ originalRes.removeAll(((AbstractSubjectTO) updated).getResources());
+
+ if (!incremental) {
+ ((AbstractSubjectMod) result).getResourcesToRemove().clear();
+ ((AbstractSubjectMod) result).getResourcesToRemove().addAll(originalRes);
+ }
+ }
+ }
+
+ /**
+ * Calculate modifications needed by first in order to be equal to second.
+ *
+ * @param updated updated UserTO
+ * @param original original UserTO
+ * @return UserMod containing differences
+ */
+ public static UserMod diff(final UserTO updated, final UserTO original) {
+ return diff(updated, original, false);
+ }
+
+ /**
+ * Calculate modifications needed by first in order to be equal to second.
+ *
+ * @param updated updated UserTO
+ * @param original original UserTO
+ * @param incremental perform incremental diff (without removing existing info)
+ * @return UserMod containing differences
+ */
+ public static UserMod diff(final UserTO updated, final UserTO original, final boolean incremental) {
+ UserMod result = new UserMod();
+
+ diff(updated, original, result, incremental);
+
+ // 1. password
+ if (updated.getPassword() != null && (original.getPassword() == null
+ || !original.getPassword().equals(updated.getPassword()))) {
+
+ result.setPassword(updated.getPassword());
+ }
+
+ // 2. username
+ if (original.getUsername() != null && !original.getUsername().equals(updated.getUsername())) {
+ result.setUsername(updated.getUsername());
+ }
+
+ // 3. security question / answer
+ if (updated.getSecurityQuestion() == null) {
+ result.setSecurityQuestion(null);
+ result.setSecurityAnswer(null);
+ } else if (!updated.getSecurityQuestion().equals(original.getSecurityQuestion())
+ || StringUtils.isNotBlank(updated.getSecurityAnswer())) {
+
+ result.setSecurityQuestion(updated.getSecurityQuestion());
+ result.setSecurityAnswer(updated.getSecurityAnswer());
+ }
+
+ // 4. memberships
+ Map<Long, MembershipTO> updatedMembs = updated.getMembershipMap();
+ Map<Long, MembershipTO> originalMembs = original.getMembershipMap();
+
+ for (Map.Entry<Long, MembershipTO> entry : updatedMembs.entrySet()) {
+ MembershipMod membMod = new MembershipMod();
+ membMod.setRole(entry.getValue().getRoleId());
+
+ if (originalMembs.containsKey(entry.getKey())) {
+ // if memberships are actually same, just make the isEmpty() call below succeed
+ if (entry.getValue().equals(originalMembs.get(entry.getKey()))) {
+ membMod.setRole(0);
+ } else {
+ diff(entry.getValue(), originalMembs.get(entry.getKey()), membMod, false);
+ }
+ } else {
+ for (AttrTO attr : entry.getValue().getPlainAttrs()) {
+ AttrMod attrMod = new AttrMod();
+ attrMod.setSchema(attr.getSchema());
+ attrMod.getValuesToBeAdded().addAll(attr.getValues());
+
+ if (!attrMod.isEmpty()) {
+ membMod.getPlainAttrsToUpdate().add(attrMod);
+ membMod.getPlainAttrsToRemove().add(attrMod.getSchema());
+ }
+ }
+ for (AttrTO attr : entry.getValue().getDerAttrs()) {
+ membMod.getDerAttrsToAdd().add(attr.getSchema());
+ }
+ for (AttrTO attr : entry.getValue().getVirAttrs()) {
+ AttrMod attrMod = new AttrMod();
+ attrMod.setSchema(attr.getSchema());
+ attrMod.getValuesToBeAdded().addAll(attr.getValues());
+
+ if (!attrMod.isEmpty()) {
+ membMod.getVirAttrsToUpdate().add(attrMod);
+ membMod.getPlainAttrsToRemove().add(attrMod.getSchema());
+ }
+ }
+ }
+
+ if (!membMod.isEmpty()) {
+ result.getMembershipsToAdd().add(membMod);
+ }
+ }
+
+ if (!incremental) {
+ Set<Long> originalRoles = new HashSet<>(originalMembs.keySet());
+ originalRoles.removeAll(updatedMembs.keySet());
+ for (Long roleId : originalRoles) {
+ result.getMembershipsToRemove().add(originalMembs.get(roleId).getKey());
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Calculate modifications needed by first in order to be equal to second.
+ *
+ * @param updated updated RoleTO
+ * @param original original RoleTO
+ * @return RoleMod containing differences
+ */
+ public static RoleMod diff(final RoleTO updated, final RoleTO original) {
+ return diff(updated, original, false);
+ }
+
+ /**
+ * Calculate modifications needed by first in order to be equal to second.
+ *
+ * @param updated updated RoleTO
+ * @param original original RoleTO
+ * @param incremental perform incremental diff (without removing existing info)
+ * @return RoleMod containing differences
+ */
+ public static RoleMod diff(final RoleTO updated, final RoleTO original, final boolean incremental) {
+ RoleMod result = new RoleMod();
+
+ diff(updated, original, result, incremental);
+
+ // 1. inheritance
+ result.setInheritOwner(updated.isInheritOwner());
+ result.setInheritTemplates(updated.isInheritTemplates());
+ result.setInheritAccountPolicy(updated.isInheritAccountPolicy());
+ result.setInheritPasswordPolicy(updated.isInheritPasswordPolicy());
+ result.setInheritPlainAttrs(updated.isInheritPlainAttrs());
+ result.setInheritDerAttrs(updated.isInheritDerAttrs());
+ result.setInheritVirAttrs(updated.isInheritVirAttrs());
+
+ // 2. policies
+ result.setAccountPolicy(new ReferenceMod(updated.getAccountPolicy()));
+ result.setPasswordPolicy(new ReferenceMod(updated.getPasswordPolicy()));
+
+ // 3. name
+ if (!original.getName().equals(updated.getName())) {
+ result.setName(updated.getName());
+ }
+
+ // 4. entitlements
+ Set<String> updatedEnts = new HashSet<>(updated.getEntitlements());
+ Set<String> originalEnts = new HashSet<>(original.getEntitlements());
+ if (updatedEnts.equals(originalEnts)) {
+ result.setModEntitlements(false);
+ result.getEntitlements().clear();
+ } else {
+ result.setModEntitlements(true);
+ result.getEntitlements().addAll(updated.getEntitlements());
+ }
+
+ // 5. templates
+ Set<String> updatedTemplates = new HashSet<>(updated.getRPlainAttrTemplates());
+ Set<String> originalTemplates = new HashSet<>(original.getRPlainAttrTemplates());
+ if (updatedTemplates.equals(originalTemplates)) {
+ result.setModRAttrTemplates(false);
+ result.getRPlainAttrTemplates().clear();
+ } else {
+ result.setModRAttrTemplates(true);
+ result.getRPlainAttrTemplates().addAll(updated.getRPlainAttrTemplates());
+ }
+ updatedTemplates = new HashSet<>(updated.getRDerAttrTemplates());
+ originalTemplates = new HashSet<>(original.getRDerAttrTemplates());
+ if (updatedTemplates.equals(originalTemplates)) {
+ result.setModRDerAttrTemplates(false);
+ result.getRDerAttrTemplates().clear();
+ } else {
+ result.setModRDerAttrTemplates(true);
+ result.getRDerAttrTemplates().addAll(updated.getRDerAttrTemplates());
+ }
+ updatedTemplates = new HashSet<>(updated.getRVirAttrTemplates());
+ originalTemplates = new HashSet<>(original.getRVirAttrTemplates());
+ if (updatedTemplates.equals(originalTemplates)) {
+ result.setModRVirAttrTemplates(false);
+ result.getRVirAttrTemplates().clear();
+ } else {
+ result.setModRVirAttrTemplates(true);
+ result.getRVirAttrTemplates().addAll(updated.getRVirAttrTemplates());
+ }
+ updatedTemplates = new HashSet<>(updated.getMPlainAttrTemplates());
+ originalTemplates = new HashSet<>(original.getMPlainAttrTemplates());
+ if (updatedTemplates.equals(originalTemplates)) {
+ result.setModMAttrTemplates(false);
+ result.getMPlainAttrTemplates().clear();
+ } else {
+ result.setModMAttrTemplates(true);
+ result.getMPlainAttrTemplates().addAll(updated.getMPlainAttrTemplates());
+ }
+ updatedTemplates = new HashSet<>(updated.getMDerAttrTemplates());
+ originalTemplates = new HashSet<>(original.getMDerAttrTemplates());
+ if (updatedTemplates.equals(originalTemplates)) {
+ result.setModMDerAttrTemplates(false);
+ result.getMDerAttrTemplates().clear();
+ } else {
+ result.setModMDerAttrTemplates(true);
+ result.getMDerAttrTemplates().addAll(updated.getMDerAttrTemplates());
+ }
+ updatedTemplates = new HashSet<>(updated.getMVirAttrTemplates());
+ originalTemplates = new HashSet<>(original.getMVirAttrTemplates());
+ if (updatedTemplates.equals(originalTemplates)) {
+ result.setModMVirAttrTemplates(false);
+ result.getMVirAttrTemplates().clear();
+ } else {
+ result.setModMVirAttrTemplates(true);
+ result.getMVirAttrTemplates().addAll(updated.getMVirAttrTemplates());
+ }
+
+ // 6. owner
+ result.setUserOwner(new ReferenceMod(updated.getUserOwner()));
+ result.setRoleOwner(new ReferenceMod(updated.getRoleOwner()));
+
+ return result;
+ }
+
+ private static List<AttrTO> getUpdateValues(final Map<String, AttrTO> attrs,
+ final Set<String> attrsToBeRemoved, final Set<AttrMod> attrsToBeUpdated) {
+
+ Map<String, AttrTO> rwattrs = new HashMap<>(attrs);
+ for (String attrName : attrsToBeRemoved) {
+ rwattrs.remove(attrName);
+ }
+ for (AttrMod attrMod : attrsToBeUpdated) {
+ if (rwattrs.containsKey(attrMod.getSchema())) {
+ AttrTO attrTO = rwattrs.get(attrMod.getSchema());
+ attrTO.getValues().removeAll(attrMod.getValuesToBeRemoved());
+ attrTO.getValues().addAll(attrMod.getValuesToBeAdded());
+ } else {
+ AttrTO attrTO = new AttrTO();
+ attrTO.setSchema(attrMod.getSchema());
+ attrTO.getValues().addAll(attrMod.getValuesToBeAdded());
+
+ rwattrs.put(attrMod.getSchema(), attrTO);
+ }
+ }
+
+ return new ArrayList<>(rwattrs.values());
+ }
+
+ private static <T extends AbstractAttributableTO, K extends AbstractAttributableMod> void apply(final T to,
+ final K mod, final T result) {
+
+ // 1. attributes
+ result.getPlainAttrs().addAll(getUpdateValues(to.getPlainAttrMap(),
+ mod.getPlainAttrsToRemove(), mod.getPlainAttrsToUpdate()));
+
+ // 2. derived attributes
+ Map<String, AttrTO> attrs = to.getDerAttrMap();
+ for (String attrName : mod.getDerAttrsToRemove()) {
+ attrs.remove(attrName);
+ }
+ for (String attrName : mod.getDerAttrsToAdd()) {
+ AttrTO attrTO = new AttrTO();
+ attrTO.setSchema(attrName);
+
+ attrs.put(attrName, attrTO);
+ }
+ result.getDerAttrs().addAll(attrs.values());
+
+ // 3. virtual attributes
+ result.getVirAttrs().addAll(getUpdateValues(to.getVirAttrMap(),
+ mod.getVirAttrsToRemove(), mod.getVirAttrsToUpdate()));
+
+ // 4. resources
+ if (result instanceof AbstractSubjectTO && mod instanceof AbstractSubjectMod) {
+ ((AbstractSubjectTO) result).getResources().removeAll(((AbstractSubjectMod) mod).getResourcesToRemove());
+ ((AbstractSubjectTO) result).getResources().addAll(((AbstractSubjectMod) mod).getResourcesToAdd());
+ }
+ }
+
+ public static UserTO apply(final UserTO userTO, final UserMod userMod) {
+ // 1. check same id
+ if (userTO.getKey() != userMod.getKey()) {
+ throw new IllegalArgumentException("UserTO and UserMod ids must be the same");
+ }
+
+ UserTO result = SerializationUtils.clone(userTO);
+ apply(userTO, userMod, result);
+
+ // 1. password
+ result.setPassword(userMod.getPassword());
+
+ // 2. username
+ if (userMod.getUsername() != null) {
+ result.setUsername(userMod.getUsername());
+ }
+ // 3. memberships
+ Map<Long, MembershipTO> membs = result.getMembershipMap();
+ for (Long membId : userMod.getMembershipsToRemove()) {
+ result.getMemberships().remove(membs.get(membId));
+ }
+ for (MembershipMod membMod : userMod.getMembershipsToAdd()) {
+ MembershipTO membTO = new MembershipTO();
+ membTO.setRoleId(membMod.getRole());
+
+ apply(membTO, membMod, membTO);
+ }
+
+ return result;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeClientCompositeException.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeClientCompositeException.java b/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeClientCompositeException.java
new file mode 100644
index 0000000..7322cc8
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeClientCompositeException.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import org.apache.syncope.common.lib.types.ClientExceptionType;
+
+public class SyncopeClientCompositeException extends SyncopeClientException {
+
+ private static final long serialVersionUID = 7882118041134372129L;
+
+ private final Set<SyncopeClientException> exceptions = new HashSet<>();
+
+ protected SyncopeClientCompositeException() {
+ super(ClientExceptionType.Composite);
+ }
+
+ public boolean hasExceptions() {
+ return !exceptions.isEmpty();
+ }
+
+ public boolean hasException(final ClientExceptionType exceptionType) {
+ return getException(exceptionType) != null;
+ }
+
+ public SyncopeClientException getException(final ClientExceptionType exceptionType) {
+ boolean found = false;
+ SyncopeClientException syncopeClientException = null;
+ for (Iterator<SyncopeClientException> itor = exceptions.iterator(); itor.hasNext() && !found;) {
+ syncopeClientException = itor.next();
+ if (syncopeClientException.getType().equals(exceptionType)) {
+ found = true;
+ }
+ }
+
+ return found
+ ? syncopeClientException
+ : null;
+ }
+
+ public Set<SyncopeClientException> getExceptions() {
+ return exceptions;
+ }
+
+ public boolean addException(final SyncopeClientException exception) {
+ if (exception.getType() == null) {
+ throw new IllegalArgumentException(exception + " does not have the right "
+ + ClientExceptionType.class.getName() + " set");
+ }
+
+ return exceptions.add(exception);
+ }
+
+ @Override
+ public String getMessage() {
+ StringBuilder message = new StringBuilder();
+
+ message.append("{");
+ Iterator<SyncopeClientException> iter = getExceptions().iterator();
+ while (iter.hasNext()) {
+ SyncopeClientException e = iter.next();
+ message.append("[");
+ message.append(e.getMessage());
+ message.append("]");
+ if (iter.hasNext()) {
+ message.append(", ");
+ }
+ }
+ message.append("}");
+
+ return message.toString();
+ }
+
+ @Override
+ public String getLocalizedMessage() {
+ return getMessage();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeClientException.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeClientException.java b/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeClientException.java
new file mode 100644
index 0000000..2243835
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeClientException.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.common.lib.types.ClientExceptionType;
+
+public class SyncopeClientException extends RuntimeException {
+
+ private static final long serialVersionUID = 3380920886511913475L;
+
+ private ClientExceptionType type;
+
+ private final List<String> elements = new ArrayList<>();
+
+ public static SyncopeClientException build(final ClientExceptionType type) {
+ if (type == ClientExceptionType.Composite) {
+ throw new IllegalArgumentException("Composite exceptions must be obtained via buildComposite()");
+ }
+ return new SyncopeClientException(type);
+ }
+
+ public static SyncopeClientCompositeException buildComposite() {
+ return new SyncopeClientCompositeException();
+ }
+
+ protected SyncopeClientException(final ClientExceptionType type) {
+ super();
+ setType(type);
+ }
+
+ public boolean isComposite() {
+ return getType() == ClientExceptionType.Composite;
+ }
+
+ public SyncopeClientCompositeException asComposite() {
+ if (!isComposite()) {
+ throw new IllegalArgumentException("This is not a composite exception");
+ }
+
+ return (SyncopeClientCompositeException) this;
+ }
+
+ public ClientExceptionType getType() {
+ return type;
+ }
+
+ public final void setType(final ClientExceptionType type) {
+ this.type = type;
+ }
+
+ public List<String> getElements() {
+ return elements;
+ }
+
+ public boolean isEmpty() {
+ return elements.isEmpty();
+ }
+
+ public int size() {
+ return elements.size();
+ }
+
+ @Override
+ public String getMessage() {
+ StringBuilder message = new StringBuilder();
+
+ message.append(getType());
+ message.append(" ");
+ message.append(getElements());
+
+ return message.toString();
+ }
+
+ @Override
+ public String getLocalizedMessage() {
+ return getMessage();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java b/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
new file mode 100644
index 0000000..817b00d
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib;
+
+import java.util.regex.Pattern;
+
+public class SyncopeConstants {
+
+ public static final String NAMESPACE = "http://syncope.apache.org/2.0";
+
+ public static final String UNAUTHENTICATED = "unauthenticated";
+
+ public static final String ANONYMOUS_ENTITLEMENT = "anonymous";
+
+ public static final String ENUM_VALUES_SEPARATOR = ";";
+
+ public static final String[] DATE_PATTERNS = {
+ "yyyy-MM-dd'T'HH:mm:ssZ",
+ "EEE, dd MMM yyyy HH:mm:ss z",
+ "yyyy-MM-dd'T'HH:mm:ssz",
+ "yyyy-MM-dd HH:mm:ss",
+ "yyyy-MM-dd HH:mm:ss.S", // explicitly added to import date into MySql repository
+ "yyyy-MM-dd" };
+
+ public static final String DEFAULT_DATE_PATTERN = "yyyy-MM-dd'T'HH:mm:ssZ";
+
+ public static final String DEFAULT_ENCODING = "UTF-8";
+
+ public static final String ROOT_LOGGER = "ROOT";
+
+ public static final Pattern EMAIL_PATTERN = Pattern.compile(
+ "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*"
+ + "@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
+ Pattern.CASE_INSENSITIVE);
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/ClassList.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/ClassList.java b/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/ClassList.java
new file mode 100644
index 0000000..07528ea
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/ClassList.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.annotation;
+
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Retention(RUNTIME)
+public @interface ClassList {
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/FormAttributeField.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/FormAttributeField.java b/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/FormAttributeField.java
new file mode 100644
index 0000000..2c1c980
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/FormAttributeField.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import org.apache.syncope.common.lib.types.IntMappingType;
+
+@Target({ ElementType.FIELD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface FormAttributeField {
+
+ boolean userSearch() default false;
+
+ boolean roleSearch() default false;
+
+ IntMappingType schema() default IntMappingType.UserPlainSchema;
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/SchemaList.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/SchemaList.java b/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/SchemaList.java
new file mode 100644
index 0000000..7469731
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/annotation/SchemaList.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.annotation;
+
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Retention(RUNTIME)
+public @interface SchemaList {
+
+ boolean extended() default false;
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractAttributableMod.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractAttributableMod.java b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractAttributableMod.java
new file mode 100644
index 0000000..aa5d442
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractAttributableMod.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.mod;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.HashSet;
+import java.util.Set;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+/**
+ * Abstract base class for objects that can have attributes removed, added or updated.
+ *
+ * Attributes can be regular attributes, derived attributes, virtual attributes and resources.
+ */
+@XmlType
+public abstract class AbstractAttributableMod extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 3241118574016303198L;
+
+ protected long key;
+
+ protected final Set<AttrMod> plainAttrsToUpdate = new HashSet<>();
+
+ protected final Set<String> plainAttrsToRemove = new HashSet<>();
+
+ protected final Set<String> derAttrsToAdd = new HashSet<>();
+
+ protected final Set<String> derAttrsToRemove = new HashSet<>();
+
+ protected final Set<AttrMod> virAttrsToUpdate = new HashSet<>();
+
+ protected final Set<String> virAttrsToRemove = new HashSet<>();
+
+ public long getKey() {
+ return key;
+ }
+
+ public void setKey(final long key) {
+ this.key = key;
+ }
+
+ @XmlElementWrapper(name = "plainAttrsToRemove")
+ @XmlElement(name = "attribute")
+ @JsonProperty("plainAttrsToRemove")
+ public Set<String> getPlainAttrsToRemove() {
+ return plainAttrsToRemove;
+ }
+
+ @XmlElementWrapper(name = "plainAttrsToUpdate")
+ @XmlElement(name = "attributeMod")
+ @JsonProperty("plainAttrsToUpdate")
+ public Set<AttrMod> getPlainAttrsToUpdate() {
+ return plainAttrsToUpdate;
+ }
+
+ @XmlElementWrapper(name = "derAttrsToAdd")
+ @XmlElement(name = "attribute")
+ @JsonProperty("derAttrsToAdd")
+ public Set<String> getDerAttrsToAdd() {
+ return derAttrsToAdd;
+ }
+
+ @XmlElementWrapper(name = "derAttrsToRemove")
+ @XmlElement(name = "attribute")
+ @JsonProperty("derAttrsToRemove")
+ public Set<String> getDerAttrsToRemove() {
+ return derAttrsToRemove;
+ }
+
+ @XmlElementWrapper(name = "virAttrsToRemove")
+ @XmlElement(name = "attribute")
+ @JsonProperty("virAttrsToRemove")
+ public Set<String> getVirAttrsToRemove() {
+ return virAttrsToRemove;
+ }
+
+ @XmlElementWrapper(name = "virAttrsToUpdate")
+ @XmlElement(name = "attribute")
+ @JsonProperty("virAttrsToUpdate")
+ public Set<AttrMod> getVirAttrsToUpdate() {
+ return virAttrsToUpdate;
+ }
+
+ /**
+ * @return true is all backing Sets are empty.
+ */
+ public boolean isEmpty() {
+ return plainAttrsToUpdate.isEmpty() && plainAttrsToRemove.isEmpty()
+ && derAttrsToAdd.isEmpty() && derAttrsToRemove.isEmpty()
+ && virAttrsToUpdate.isEmpty() && virAttrsToRemove.isEmpty();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractSubjectMod.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractSubjectMod.java b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractSubjectMod.java
new file mode 100644
index 0000000..96e2a64
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AbstractSubjectMod.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.mod;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.HashSet;
+import java.util.Set;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType
+public abstract class AbstractSubjectMod extends AbstractAttributableMod {
+
+ private static final long serialVersionUID = -6404459635536484024L;
+
+ protected final Set<String> resourcesToAdd = new HashSet<>();
+
+ protected final Set<String> resourcesToRemove = new HashSet<>();
+
+ @XmlElementWrapper(name = "resourcesToAdd")
+ @XmlElement(name = "resource")
+ @JsonProperty("resourcesToAdd")
+ public Set<String> getResourcesToAdd() {
+ return resourcesToAdd;
+ }
+
+ @XmlElementWrapper(name = "resourcesToRemove")
+ @XmlElement(name = "resource")
+ @JsonProperty("resourcesToRemove")
+ public Set<String> getResourcesToRemove() {
+ return resourcesToRemove;
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return super.isEmpty() && resourcesToAdd.isEmpty() && resourcesToRemove.isEmpty();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AttrMod.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AttrMod.java b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AttrMod.java
new file mode 100644
index 0000000..b0cee5b
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/AttrMod.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.mod;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlRootElement
+@XmlType
+public class AttrMod extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -913573979137431406L;
+
+ private String schema;
+
+ private List<String> valuesToBeAdded;
+
+ private List<String> valuesToBeRemoved;
+
+ public AttrMod() {
+ super();
+
+ valuesToBeAdded = new ArrayList<>();
+ valuesToBeRemoved = new ArrayList<>();
+ }
+
+ public String getSchema() {
+ return schema;
+ }
+
+ public void setSchema(final String schema) {
+ this.schema = schema;
+ }
+
+ @XmlElementWrapper(name = "valuesToBeAdded")
+ @XmlElement(name = "value")
+ @JsonProperty("valuesToBeAdded")
+ public List<String> getValuesToBeAdded() {
+ return valuesToBeAdded;
+ }
+
+ @XmlElementWrapper(name = "valuesToBeRemoved")
+ @XmlElement(name = "value")
+ @JsonProperty("valuesToBeRemoved")
+ public List<String> getValuesToBeRemoved() {
+ return valuesToBeRemoved;
+ }
+
+ @JsonIgnore
+ public boolean isEmpty() {
+ return valuesToBeAdded.isEmpty() && valuesToBeRemoved.isEmpty();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/mod/MembershipMod.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/mod/MembershipMod.java b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/MembershipMod.java
new file mode 100644
index 0000000..bdcfcbf
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/MembershipMod.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.mod;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement
+@XmlType
+public class MembershipMod extends AbstractAttributableMod {
+
+ private static final long serialVersionUID = 2511869129977331525L;
+
+ private long role;
+
+ public long getRole() {
+ return role;
+ }
+
+ public void setRole(final long role) {
+ this.role = role;
+ }
+
+ @JsonIgnore
+ @Override
+ public boolean isEmpty() {
+ return super.isEmpty() && role == 0;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/mod/ReferenceMod.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/mod/ReferenceMod.java b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/ReferenceMod.java
new file mode 100644
index 0000000..e8356c2
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/ReferenceMod.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.mod;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+/**
+ * This class is used to specify the willing to modify an external reference id. Use 'null' ReferenceMod to keep the
+ * current reference id; use a ReferenceMod with a null id to try to reset the reference id; use a ReferenceMod with a
+ * not null id to specify a new reference id.
+ */
+@XmlRootElement(name = "referenceMod")
+@XmlType
+public class ReferenceMod extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -4188817853738067677L;
+
+ private Long key;
+
+ public ReferenceMod() {
+ this.key = null;
+ }
+
+ public ReferenceMod(final Long key) {
+ this.key = key;
+ }
+
+ public Long getKey() {
+ return key;
+ }
+
+ public void setKey(final Long key) {
+ this.key = key;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/mod/ResourceAssociationMod.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/mod/ResourceAssociationMod.java b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/ResourceAssociationMod.java
new file mode 100644
index 0000000..6312349
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/ResourceAssociationMod.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.mod;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.wrap.ResourceName;
+
+/**
+ * This class is used to specify the willing to create associations between user and external references.
+ * Password can be provided if required by an assign or provisioning operation.
+ *
+ * @see org.apache.syncope.common.types.ResourceAssociationActionType
+ */
+@XmlRootElement(name = "resourceAssociationMod")
+@XmlType
+public class ResourceAssociationMod extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -4188817853738067678L;
+
+ /**
+ * Target external resources.
+ */
+ private final List<ResourceName> targetResources = new ArrayList<ResourceName>();
+
+ /**
+ * Indicate the willing to change password on target external resources.
+ */
+ private boolean changePwd;
+
+ /**
+ * Indicate the new password to be provisioned on target external resources.
+ */
+ private String password;
+
+ @XmlElementWrapper(name = "resources")
+ @XmlElement(name = "resource")
+ @JsonProperty("resources")
+ public List<ResourceName> getTargetResources() {
+ return targetResources;
+ }
+
+ public boolean isChangePwd() {
+ return changePwd;
+ }
+
+ public void setChangePwd(boolean changePwd) {
+ this.changePwd = changePwd;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/mod/RoleMod.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/mod/RoleMod.java b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/RoleMod.java
new file mode 100644
index 0000000..b1b8f4f
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/RoleMod.java
@@ -0,0 +1,300 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.mod;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "roleMod")
+@XmlType
+public class RoleMod extends AbstractSubjectMod {
+
+ private static final long serialVersionUID = 7455805264680210747L;
+
+ private String name;
+
+ private ReferenceMod userOwner;
+
+ private ReferenceMod roleOwner;
+
+ private Boolean inheritOwner;
+
+ private Boolean inheritTemplates;
+
+ private Boolean inheritPlainAttrs;
+
+ private Boolean inheritDerAttrs;
+
+ private Boolean inheritVirAttrs;
+
+ private Boolean inheritAccountPolicy;
+
+ private Boolean inheritPasswordPolicy;
+
+ private boolean modEntitlements;
+
+ private final List<String> entitlements = new ArrayList<>();
+
+ private boolean modRAttrTemplates;
+
+ private final List<String> rPlainAttrTemplates = new ArrayList<>();
+
+ private boolean modRDerAttrTemplates;
+
+ private final List<String> rDerAttrTemplates = new ArrayList<>();
+
+ private boolean modRVirAttrTemplates;
+
+ private final List<String> rVirAttrTemplates = new ArrayList<>();
+
+ private boolean modMAttrTemplates;
+
+ private final List<String> mPlainAttrTemplates = new ArrayList<>();
+
+ private boolean modMDerAttrTemplates;
+
+ private final List<String> mDerAttrTemplates = new ArrayList<>();
+
+ private boolean modMVirAttrTemplates;
+
+ private final List<String> mVirAttrTemplates = new ArrayList<>();
+
+ private ReferenceMod passwordPolicy;
+
+ private ReferenceMod accountPolicy;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public ReferenceMod getUserOwner() {
+ return userOwner;
+ }
+
+ public void setUserOwner(final ReferenceMod userOwner) {
+ this.userOwner = userOwner;
+ }
+
+ public ReferenceMod getRoleOwner() {
+ return roleOwner;
+ }
+
+ public void setRoleOwner(final ReferenceMod roleOwner) {
+ this.roleOwner = roleOwner;
+ }
+
+ public Boolean getInheritOwner() {
+ return inheritOwner;
+ }
+
+ public void setInheritOwner(final Boolean inheritOwner) {
+ this.inheritOwner = inheritOwner;
+ }
+
+ public Boolean getInheritTemplates() {
+ return inheritTemplates;
+ }
+
+ public void setInheritTemplates(final Boolean inheritTemplates) {
+ this.inheritTemplates = inheritTemplates;
+ }
+
+ public Boolean getInheritPlainAttrs() {
+ return inheritPlainAttrs;
+ }
+
+ public void setInheritPlainAttrs(final Boolean inheritAttrs) {
+ this.inheritPlainAttrs = inheritAttrs;
+ }
+
+ public Boolean getInheritDerAttrs() {
+ return inheritDerAttrs;
+ }
+
+ public void setInheritDerAttrs(final Boolean inheritDerAttrs) {
+ this.inheritDerAttrs = inheritDerAttrs;
+ }
+
+ public Boolean getInheritVirAttrs() {
+ return inheritVirAttrs;
+ }
+
+ public void setInheritVirAttrs(final Boolean inheritVirAttrs) {
+ this.inheritVirAttrs = inheritVirAttrs;
+ }
+
+ public boolean isModEntitlements() {
+ return modEntitlements;
+ }
+
+ public void setModEntitlements(final boolean modEntitlements) {
+ this.modEntitlements = modEntitlements;
+ }
+
+ @XmlElementWrapper(name = "entitlements")
+ @XmlElement(name = "entitlement")
+ @JsonProperty("entitlements")
+ public List<String> getEntitlements() {
+ return entitlements;
+ }
+
+ public boolean isModRAttrTemplates() {
+ return modRAttrTemplates;
+ }
+
+ public void setModRAttrTemplates(final boolean modRAttrTemplates) {
+ this.modRAttrTemplates = modRAttrTemplates;
+ }
+
+ @XmlElementWrapper(name = "rPlainAttrTemplates")
+ @XmlElement(name = "rAttrTemplate")
+ @JsonProperty("rPlainAttrTemplates")
+ public List<String> getRPlainAttrTemplates() {
+ return rPlainAttrTemplates;
+ }
+
+ public boolean isModRDerAttrTemplates() {
+ return modRDerAttrTemplates;
+ }
+
+ public void setModRDerAttrTemplates(final boolean modRDerAttrTemplates) {
+ this.modRDerAttrTemplates = modRDerAttrTemplates;
+ }
+
+ @XmlElementWrapper(name = "rDerAttrTemplates")
+ @XmlElement(name = "rDerAttrTemplate")
+ @JsonProperty("rDerAttrTemplates")
+ public List<String> getRDerAttrTemplates() {
+ return rDerAttrTemplates;
+ }
+
+ public boolean isModRVirAttrTemplates() {
+ return modRVirAttrTemplates;
+ }
+
+ public void setModRVirAttrTemplates(final boolean modRVirAttrTemplates) {
+ this.modRVirAttrTemplates = modRVirAttrTemplates;
+ }
+
+ @XmlElementWrapper(name = "rVirAttrTemplates")
+ @XmlElement(name = "rVirAttrTemplate")
+ @JsonProperty("rVirAttrTemplates")
+ public List<String> getRVirAttrTemplates() {
+ return rVirAttrTemplates;
+ }
+
+ public boolean isModMAttrTemplates() {
+ return modMAttrTemplates;
+ }
+
+ public void setModMAttrTemplates(final boolean modMAttrTemplates) {
+ this.modMAttrTemplates = modMAttrTemplates;
+ }
+
+ @XmlElementWrapper(name = "mPlainAttrTemplates")
+ @XmlElement(name = "mAttrTemplate")
+ @JsonProperty("mPlainAttrTemplates")
+ public List<String> getMPlainAttrTemplates() {
+ return mPlainAttrTemplates;
+ }
+
+ public boolean isModMDerAttrTemplates() {
+ return modMDerAttrTemplates;
+ }
+
+ public void setModMDerAttrTemplates(final boolean modMDerAttrTemplates) {
+ this.modMDerAttrTemplates = modMDerAttrTemplates;
+ }
+
+ @XmlElementWrapper(name = "mDerAttrTemplates")
+ @XmlElement(name = "mDerAttrTemplate")
+ @JsonProperty("mDerAttrTemplates")
+ public List<String> getMDerAttrTemplates() {
+ return mDerAttrTemplates;
+ }
+
+ public boolean isModMVirAttrTemplates() {
+ return modMVirAttrTemplates;
+ }
+
+ public void setModMVirAttrTemplates(final boolean modMVirAttrTemplates) {
+ this.modMVirAttrTemplates = modMVirAttrTemplates;
+ }
+
+ @XmlElementWrapper(name = "mVirAttrTemplates")
+ @XmlElement(name = "mVirAttrTemplate")
+ @JsonProperty("mVirAttrTemplates")
+ public List<String> getMVirAttrTemplates() {
+ return mVirAttrTemplates;
+ }
+
+ public ReferenceMod getPasswordPolicy() {
+ return passwordPolicy;
+ }
+
+ public void setPasswordPolicy(final ReferenceMod passwordPolicy) {
+ this.passwordPolicy = passwordPolicy;
+ }
+
+ public Boolean getInheritPasswordPolicy() {
+ return inheritPasswordPolicy;
+ }
+
+ public void setInheritPasswordPolicy(final Boolean inheritPasswordPolicy) {
+ this.inheritPasswordPolicy = inheritPasswordPolicy;
+ }
+
+ public ReferenceMod getAccountPolicy() {
+ return accountPolicy;
+ }
+
+ public void setAccountPolicy(final ReferenceMod accountPolicy) {
+ this.accountPolicy = accountPolicy;
+ }
+
+ public Boolean getInheritAccountPolicy() {
+ return inheritAccountPolicy;
+ }
+
+ public void setInheritAccountPolicy(final Boolean inheritAccountPolicy) {
+ this.inheritAccountPolicy = inheritAccountPolicy;
+ }
+
+ @JsonIgnore
+ @Override
+ public boolean isEmpty() {
+ return super.isEmpty() && name == null && userOwner == null && roleOwner == null
+ && inheritTemplates == null && inheritOwner == null
+ && inheritAccountPolicy == null && inheritPasswordPolicy == null
+ && inheritPlainAttrs == null && inheritDerAttrs == null && inheritVirAttrs == null
+ && accountPolicy == null && passwordPolicy == null && entitlements.isEmpty()
+ && rPlainAttrTemplates.isEmpty() && rDerAttrTemplates.isEmpty() && rVirAttrTemplates.isEmpty()
+ && mPlainAttrTemplates.isEmpty() && mDerAttrTemplates.isEmpty() && mVirAttrTemplates.isEmpty();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/mod/StatusMod.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/mod/StatusMod.java b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/StatusMod.java
new file mode 100644
index 0000000..57ea366
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/StatusMod.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.mod;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlRootElement(name = "statusMod")
+@XmlType
+public class StatusMod extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 3230910033784302656L;
+
+ @XmlEnum
+ @XmlType(name = "statusModType")
+ public enum ModType {
+
+ ACTIVATE,
+ SUSPEND,
+ REACTIVATE;
+
+ }
+
+ /**
+ * Key of user to for which status update is requested.
+ */
+ private long key;
+
+ private ModType type;
+
+ /**
+ * Update token (if required).
+ */
+ private String token;
+
+ /**
+ * Whether update should be performed on internal storage.
+ */
+ private boolean onSyncope = true;
+
+ /**
+ * External resources for which update is needed to be propagated.
+ */
+ private final List<String> resourceNames = new ArrayList<>();
+
+ public long getKey() {
+ return key;
+ }
+
+ public void setKey(long key) {
+ this.key = key;
+ }
+
+ public ModType getType() {
+ return type;
+ }
+
+ public void setType(final ModType type) {
+ this.type = type;
+ }
+
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(final String token) {
+ this.token = token;
+ }
+
+ public boolean isOnSyncope() {
+ return onSyncope;
+ }
+
+ public void setOnSyncope(final boolean onSyncope) {
+ this.onSyncope = onSyncope;
+ }
+
+ @XmlElementWrapper(name = "resources")
+ @XmlElement(name = "resource")
+ @JsonProperty("resources")
+ public List<String> getResourceNames() {
+ return resourceNames;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/mod/UserMod.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/mod/UserMod.java b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/UserMod.java
new file mode 100644
index 0000000..0f421be
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/UserMod.java
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.mod;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.HashSet;
+import java.util.Set;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "userMod")
+@XmlType
+public class UserMod extends AbstractSubjectMod {
+
+ private static final long serialVersionUID = 3081848906558106204L;
+
+ private String password;
+
+ private String username;
+
+ private final Set<MembershipMod> membershipsToAdd;
+
+ private final Set<Long> membershipsToRemove;
+
+ private StatusMod pwdPropRequest;
+
+ private Long securityQuestion;
+
+ private String securityAnswer;
+
+ public UserMod() {
+ super();
+
+ membershipsToAdd = new HashSet<>();
+ membershipsToRemove = new HashSet<>();
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(final String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(final String password) {
+ this.password = password;
+ }
+
+ @XmlElementWrapper(name = "membershipsToAdd")
+ @XmlElement(name = "membership")
+ @JsonProperty("membershipsToAdd")
+ public Set<MembershipMod> getMembershipsToAdd() {
+ return membershipsToAdd;
+ }
+
+ @XmlElementWrapper(name = "membershipsToRemove")
+ @XmlElement(name = "membership")
+ @JsonProperty("membershipsToRemove")
+ public Set<Long> getMembershipsToRemove() {
+ return membershipsToRemove;
+ }
+
+ public StatusMod getPwdPropRequest() {
+ return pwdPropRequest;
+ }
+
+ public void setPwdPropRequest(final StatusMod pwdPropRequest) {
+ this.pwdPropRequest = pwdPropRequest;
+ }
+
+ public Long getSecurityQuestion() {
+ return securityQuestion;
+ }
+
+ public void setSecurityQuestion(final Long securityQuestion) {
+ this.securityQuestion = securityQuestion;
+ }
+
+ public String getSecurityAnswer() {
+ return securityAnswer;
+ }
+
+ public void setSecurityAnswer(final String securityAnswer) {
+ this.securityAnswer = securityAnswer;
+ }
+
+ @JsonIgnore
+ @Override
+ public boolean isEmpty() {
+ return super.isEmpty()
+ && password == null
+ && username == null
+ && membershipsToAdd.isEmpty()
+ && membershipsToRemove.isEmpty()
+ && pwdPropRequest == null
+ && securityQuestion == null
+ && securityAnswer == null;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/mod/package-info.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/mod/package-info.java b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/package-info.java
new file mode 100644
index 0000000..866b275
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib.mod;
+
+import javax.xml.bind.annotation.XmlSchema;
+import org.apache.syncope.common.lib.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java b/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java
new file mode 100644
index 0000000..8eac5d5
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib;
+
+import javax.xml.bind.annotation.XmlSchema;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/report/AbstractReportletConf.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/report/AbstractReportletConf.java b/common/lib/src/main/java/org/apache/syncope/common/lib/report/AbstractReportletConf.java
new file mode 100644
index 0000000..0082591
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/report/AbstractReportletConf.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.report;
+
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlType
+@XmlSeeAlso({ StaticReportletConf.class, UserReportletConf.class, RoleReportletConf.class })
+public abstract class AbstractReportletConf extends AbstractBaseBean implements ReportletConf {
+
+ private static final long serialVersionUID = -6130008602014516608L;
+
+ private String name;
+
+ public AbstractReportletConf() {
+ this(StringUtils.EMPTY);
+ setName(getClass().getName());
+ }
+
+ public AbstractReportletConf(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public final String getName() {
+ return name;
+ }
+
+ public final void setName(final String name) {
+ this.name = name;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/report/ReportletConf.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/report/ReportletConf.java b/common/lib/src/main/java/org/apache/syncope/common/lib/report/ReportletConf.java
new file mode 100644
index 0000000..57bcf52
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/report/ReportletConf.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.report;
+
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+
+@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
+public interface ReportletConf {
+
+ /**
+ * Give name of related reportlet instance.
+ *
+ * @return name of this reportlet instance
+ */
+ String getName();
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/report/RoleReportletConf.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/report/RoleReportletConf.java b/common/lib/src/main/java/org/apache/syncope/common/lib/report/RoleReportletConf.java
new file mode 100644
index 0000000..9f73d3d
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/report/RoleReportletConf.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.report;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.annotation.FormAttributeField;
+import org.apache.syncope.common.lib.types.IntMappingType;
+
+@XmlRootElement(name = "roleReportletConf")
+@XmlType
+public class RoleReportletConf extends AbstractReportletConf {
+
+ private static final long serialVersionUID = -8488503068032439699L;
+
+ @XmlEnum
+ @XmlType(name = "roleReportletConfFeature")
+ public enum Feature {
+
+ key,
+ name,
+ roleOwner,
+ userOwner,
+ entitlements,
+ users,
+ resources
+
+ }
+
+ @FormAttributeField(userSearch = true)
+ private String matchingCond;
+
+ @FormAttributeField(schema = IntMappingType.RolePlainSchema)
+ private final List<String> plainAttrs = new ArrayList<>();
+
+ @FormAttributeField(schema = IntMappingType.RoleDerivedSchema)
+ private final List<String> derAttrs = new ArrayList<>();
+
+ @FormAttributeField(schema = IntMappingType.RoleVirtualSchema)
+ private final List<String> virAttrs = new ArrayList<>();
+
+ private final List<Feature> features = new ArrayList<>();
+
+ public RoleReportletConf() {
+ super();
+ }
+
+ public RoleReportletConf(final String name) {
+ super(name);
+ }
+
+ @XmlElementWrapper(name = "plainAttributes")
+ @XmlElement(name = "plainAttribute")
+ @JsonProperty("plainAttributes")
+ public List<String> getPlainAttrs() {
+ return plainAttrs;
+ }
+
+ @XmlElementWrapper(name = "derivedAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("derivedAttributes")
+ public List<String> getDerAttrs() {
+ return derAttrs;
+ }
+
+ @XmlElementWrapper(name = "virtualAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("virtualAttributes")
+ public List<String> getVirAttrs() {
+ return virAttrs;
+ }
+
+ @XmlElementWrapper(name = "features")
+ @XmlElement(name = "feature")
+ @JsonProperty("features")
+ public List<Feature> getFeatures() {
+ return features;
+ }
+
+ public String getMatchingCond() {
+ return matchingCond;
+ }
+
+ public void setMatchingCond(final String matchingCond) {
+ this.matchingCond = matchingCond;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/report/StaticReportletConf.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/report/StaticReportletConf.java b/common/lib/src/main/java/org/apache/syncope/common/lib/report/StaticReportletConf.java
new file mode 100644
index 0000000..9160089
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/report/StaticReportletConf.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.report;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.types.TraceLevel;
+
+@XmlRootElement(name = "staticReportletConf")
+@XmlType
+public class StaticReportletConf extends AbstractReportletConf {
+
+ private static final long serialVersionUID = -4814950086361753689L;
+
+ private String stringField;
+
+ private Long longField;
+
+ private Double doubleField;
+
+ private Date dateField;
+
+ private TraceLevel traceLevel;
+
+ private final List<String> listField = new ArrayList<String>();
+
+ public StaticReportletConf() {
+ super();
+ }
+
+ public StaticReportletConf(final String name) {
+ super(name);
+ }
+
+ public Date getDateField() {
+ return dateField == null
+ ? null
+ : new Date(dateField.getTime());
+ }
+
+ public void setDateField(Date dateField) {
+ this.dateField = dateField == null
+ ? null
+ : new Date(dateField.getTime());
+ }
+
+ public Double getDoubleField() {
+ return doubleField;
+ }
+
+ public void setDoubleField(Double doubleField) {
+ this.doubleField = doubleField;
+ }
+
+ @XmlElementWrapper(name = "listField")
+ @XmlElement(name = "field")
+ @JsonProperty("listField")
+ public List<String> getListField() {
+ return listField;
+ }
+
+ public Long getLongField() {
+ return longField;
+ }
+
+ public void setLongField(Long longField) {
+ this.longField = longField;
+ }
+
+ public String getStringField() {
+ return stringField;
+ }
+
+ public void setStringField(String stringField) {
+ this.stringField = stringField;
+ }
+
+ public TraceLevel getTraceLevel() {
+ return traceLevel;
+ }
+
+ public void setTraceLevel(TraceLevel traceLevel) {
+ this.traceLevel = traceLevel;
+ }
+}
[27/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/MIMETypes
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/MIMETypes b/client/console/src/main/resources/MIMETypes
new file mode 100644
index 0000000..9571823
--- /dev/null
+++ b/client/console/src/main/resources/MIMETypes
@@ -0,0 +1,671 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+x-world/x-3dmf
+x-world/x-3dmf
+application/octet-stream
+application/x-authorware-bin
+application/x-authorware-map
+application/x-authorware-seg
+text/vnd.abc
+text/html
+video/animaflex
+application/postscript
+audio/aiff
+audio/x-aiff
+audio/aiff
+audio/x-aiff
+audio/aiff
+audio/x-aiff
+application/x-aim
+text/x-audiosoft-intra
+application/x-navi-animation
+application/x-nokia-9000-communicator-add-on-software
+application/mime
+application/octet-stream
+application/arj
+application/octet-stream
+image/x-jg
+video/x-ms-asf
+text/x-asm
+text/asp
+application/x-mplayer2
+video/x-ms-asf
+video/x-ms-asf-plugin
+audio/basic
+audio/x-au
+application/x-troff-msvideo
+video/avi
+video/msvideo
+video/x-msvideo
+video/avs-video
+application/x-bcpio
+application/mac-binary
+application/macbinary
+application/octet-stream
+application/x-binary
+application/x-macbinary
+image/bmp
+image/bmp
+image/x-windows-bmp
+application/book
+application/book
+application/x-bzip2
+application/x-bsh
+application/x-bzip
+application/x-bzip2
+text/plain
+text/x-c
+text/plain
+application/vnd.ms-pki.seccat
+text/plain
+text/x-c
+application/clariscad
+application/x-cocoa
+application/cdf
+application/x-cdf
+application/x-netcdf
+application/pkix-cert
+application/x-x509-ca-cert
+application/x-chat
+application/x-chat
+application/java
+application/java-byte-code
+application/x-java-class
+application/octet-stream
+text/plain
+text/plain
+application/x-cpio
+text/x-c
+application/mac-compactpro
+application/x-compactpro
+application/x-cpt
+application/pkcs-crl
+application/pkix-crl
+application/pkix-cert
+application/x-x509-ca-cert
+application/x-x509-user-cert
+application/x-csh
+text/x-script.csh
+application/x-pointplus
+text/css
+text/plain
+application/x-director
+application/x-deepv
+text/plain
+application/x-x509-ca-cert
+video/x-dv
+application/x-director
+video/dl
+video/x-dl
+application/msword
+application/msword
+application/commonground
+application/drafting
+application/octet-stream
+video/x-dv
+application/x-dvi
+drawing/x-dwf (old)
+model/vnd.dwf
+application/acad
+image/vnd.dwg
+image/x-dwg
+application/dxf
+image/vnd.dwg
+image/x-dwg
+application/x-director
+text/x-script.elisp
+application/x-bytecode.elisp (compiled elisp)
+application/x-elc
+application/x-envoy
+application/postscript
+application/x-esrehber
+text/x-setext
+application/envoy
+application/x-envoy
+application/octet-stream
+text/plain
+text/x-fortran
+text/x-fortran
+text/plain
+text/x-fortran
+application/vnd.fdf
+application/fractals
+image/fif
+video/fli
+video/x-fli
+image/florian
+text/vnd.fmi.flexstor
+video/x-atomic3d-feature
+text/plain
+text/x-fortran
+image/vnd.fpx
+image/vnd.net-fpx
+application/freeloader
+audio/make
+text/plain
+image/g3fax
+image/gif
+video/gl
+video/x-gl
+audio/x-gsm
+audio/x-gsm
+application/x-gsp
+application/x-gss
+application/x-gtar
+application/x-compressed
+application/x-gzip
+application/x-gzip
+multipart/x-gzip
+text/plain
+text/x-h
+application/x-hdf
+application/x-helpfile
+application/vnd.hp-hpgl
+text/plain
+text/x-h
+text/x-script
+application/hlp
+application/x-helpfile
+application/x-winhelp
+application/vnd.hp-hpgl
+application/vnd.hp-hpgl
+application/binhex
+application/binhex4
+application/mac-binhex
+application/mac-binhex40
+application/x-binhex40
+application/x-mac-binhex40
+application/hta
+text/x-component
+text/html
+text/html
+text/html
+text/webviewhtml
+text/html
+x-conference/x-cooltalk
+image/x-icon
+text/plain
+image/ief
+image/ief
+application/iges
+model/iges
+application/iges
+model/iges
+application/x-ima
+application/x-httpd-imap
+application/inf
+application/x-internett-signup
+application/x-ip2
+video/x-isvideo
+audio/it
+application/x-inventor
+i-world/i-vrml
+application/x-livescreen
+audio/x-jam
+text/plain
+text/x-java-source
+text/plain
+text/x-java-source
+application/x-java-commerce
+image/jpeg
+image/pjpeg
+image/jpeg
+image/jpeg
+image/pjpeg
+image/jpeg
+image/pjpeg
+image/jpeg
+image/pjpeg
+image/x-jps
+application/x-javascript
+application/javascript
+application/ecmascript
+text/javascript
+text/ecmascript
+image/jutvision
+audio/midi
+music/x-karaoke
+application/x-ksh
+text/x-script.ksh
+audio/nspaudio
+audio/x-nspaudio
+audio/x-liveaudio
+application/x-latex
+application/lha
+application/octet-stream
+application/x-lha
+application/octet-stream
+text/plain
+audio/nspaudio
+audio/x-nspaudio
+text/plain
+application/x-lisp
+text/x-script.lisp
+text/plain
+text/x-la-asf
+application/x-latex
+application/octet-stream
+application/x-lzh
+application/lzx
+application/octet-stream
+application/x-lzx
+text/plain
+text/x-m
+video/mpeg
+audio/mpeg
+video/mpeg
+audio/x-mpequrl
+application/x-troff-man
+application/x-navimap
+text/plain
+application/mbedlet
+application/x-magic-cap-package-1.0
+application/mcad
+application/x-mathcad
+image/vasa
+text/mcf
+application/netmc
+application/x-troff-me
+message/rfc822
+message/rfc822
+application/x-midi
+audio/midi
+audio/x-mid
+audio/x-midi
+music/crescendo
+x-music/x-midi
+application/x-midi
+audio/midi
+audio/x-mid
+audio/x-midi
+music/crescendo
+x-music/x-midi
+application/x-frame
+application/x-mif
+message/rfc822
+www/mime
+audio/x-vnd.audioexplosion.mjuicemediafile
+video/x-motion-jpeg
+application/base64
+application/x-meme
+application/base64
+audio/mod
+audio/x-mod
+video/quicktime
+video/quicktime
+video/x-sgi-movie
+audio/mpeg
+audio/x-mpeg
+video/mpeg
+video/x-mpeg
+video/x-mpeq2a
+audio/mpeg3
+audio/x-mpeg-3
+video/mpeg
+video/x-mpeg
+audio/mpeg
+video/mpeg
+application/x-project
+video/mpeg
+video/mpeg
+audio/mpeg
+video/mpeg
+audio/mpeg
+application/vnd.ms-project
+application/x-project
+application/x-project
+application/x-project
+application/marc
+application/x-troff-ms
+video/x-sgi-movie
+audio/make
+application/x-vnd.audioexplosion.mzz
+image/naplps
+image/naplps
+application/x-netcdf
+application/vnd.nokia.configuration-message
+image/x-niff
+image/x-niff
+application/x-mix-transfer
+application/x-conference
+application/x-navidoc
+application/octet-stream
+application/oda
+application/x-omc
+application/x-omcdatamaker
+application/x-omcregerator
+text/x-pascal
+application/pkcs10
+application/x-pkcs10
+application/pkcs-12
+application/x-pkcs12
+application/x-pkcs7-signature
+application/pkcs7-mime
+application/x-pkcs7-mime
+application/pkcs7-mime
+application/x-pkcs7-mime
+application/x-pkcs7-certreqresp
+application/pkcs7-signature
+application/pro_eng
+text/pascal
+image/x-portable-bitmap
+application/vnd.hp-pcl
+application/x-pcl
+image/x-pict
+image/x-pcx
+chemical/x-pdb
+application/pdf
+audio/make
+audio/make.my.funk
+image/x-portable-graymap
+image/x-portable-greymap
+image/pict
+image/pict
+application/x-newton-compatible-pkg
+application/vnd.ms-pki.pko
+text/plain
+text/x-script.perl
+application/x-pixclscript
+image/x-xpixmap
+text/x-script.perl-module
+application/x-pagemaker
+application/x-pagemaker
+image/png
+application/x-portable-anymap
+image/x-portable-anymap
+application/mspowerpoint
+application/vnd.ms-powerpoint
+model/x-pov
+application/vnd.ms-powerpoint
+image/x-portable-pixmap
+application/mspowerpoint
+application/vnd.ms-powerpoint
+application/mspowerpoint
+application/powerpoint
+application/vnd.ms-powerpoint
+application/x-mspowerpoint
+application/mspowerpoint
+application/x-freelance
+application/pro_eng
+application/postscript
+application/octet-stream
+paleovu/x-pv
+application/vnd.ms-powerpoint
+text/x-script.phyton
+application/x-bytecode.python
+audio/vnd.qcelp
+x-world/x-3dmf
+x-world/x-3dmf
+image/x-quicktime
+video/quicktime
+video/x-qtc
+image/x-quicktime
+image/x-quicktime
+audio/x-pn-realaudio
+audio/x-pn-realaudio-plugin
+audio/x-realaudio
+audio/x-pn-realaudio
+application/x-cmu-raster
+image/cmu-raster
+image/x-cmu-raster
+image/cmu-raster
+text/x-script.rexx
+image/vnd.rn-realflash
+image/x-rgb
+application/vnd.rn-realmedia
+audio/x-pn-realaudio
+audio/mid
+audio/x-pn-realaudio
+audio/x-pn-realaudio
+audio/x-pn-realaudio-plugin
+application/ringing-tones
+application/vnd.nokia.ringing-tone
+application/vnd.rn-realplayer
+application/x-troff
+image/vnd.rn-realpix
+audio/x-pn-realaudio-plugin
+text/richtext
+text/vnd.rn-realtext
+application/rtf
+application/x-rtf
+text/richtext
+application/rtf
+text/richtext
+video/vnd.rn-realvideo
+text/x-asm
+audio/s3m
+application/octet-stream
+application/x-tbook
+application/x-lotusscreencam
+text/x-script.guile
+text/x-script.scheme
+video/x-scm
+text/plain
+application/sdp
+application/x-sdp
+application/sounder
+application/sea
+application/x-sea
+application/set
+text/sgml
+text/x-sgml
+text/sgml
+text/x-sgml
+application/x-bsh
+application/x-sh
+application/x-shar
+text/x-script.sh
+application/x-bsh
+application/x-shar
+text/html
+text/x-server-parsed-html
+audio/x-psid
+application/x-sit
+application/x-stuffit
+application/x-koan
+application/x-koan
+application/x-koan
+application/x-koan
+application/x-seelogo
+application/smil
+application/smil
+audio/basic
+audio/x-adpcm
+application/solids
+application/x-pkcs7-certificates
+text/x-speech
+application/futuresplash
+application/x-sprite
+application/x-sprite
+application/x-wais-source
+text/x-server-parsed-html
+application/streamingmedia
+application/vnd.ms-pki.certstore
+application/step
+application/sla
+application/vnd.ms-pki.stl
+application/x-navistyle
+application/step
+application/x-sv4cpio
+application/x-sv4crc
+image/vnd.dwg
+image/x-dwg
+application/x-world
+x-world/x-svr
+application/x-shockwave-flash
+application/x-troff
+text/x-speech
+application/x-tar
+application/toolbook
+application/x-tbook
+application/x-tcl
+text/x-script.tcl
+text/x-script.tcsh
+application/x-tex
+application/x-texinfo
+application/x-texinfo
+application/plain
+text/plain
+application/gnutar
+application/x-compressed
+image/tiff
+image/x-tiff
+image/tiff
+image/x-tiff
+application/x-troff
+audio/tsp-audio
+application/dsptype
+audio/tsplayer
+text/tab-separated-values
+image/florian
+text/plain
+text/x-uil
+text/uri-list
+text/uri-list
+application/i-deas
+text/uri-list
+text/uri-list
+application/x-ustar
+multipart/x-ustar
+application/octet-stream
+text/x-uuencode
+text/x-uuencode
+application/x-cdlink
+text/x-vcalendar
+application/vda
+video/vdo
+application/groupwise
+video/vivo
+video/vnd.vivo
+video/vivo
+video/vnd.vivo
+application/vocaltec-media-desc
+application/vocaltec-media-file
+audio/voc
+audio/x-voc
+video/vosaic
+audio/voxware
+audio/x-twinvq-plugin
+audio/x-twinvq
+audio/x-twinvq-plugin
+application/x-vrml
+model/vrml
+x-world/x-vrml
+x-world/x-vrt
+application/x-visio
+application/x-visio
+application/x-visio
+application/wordperfect6.0
+application/wordperfect6.1
+application/msword
+audio/wav
+audio/x-wav
+application/x-qpro
+image/vnd.wap.wbmp
+application/vnd.xara
+application/msword
+application/x-123
+windows/metafile
+text/vnd.wap.wml
+application/vnd.wap.wmlc
+text/vnd.wap.wmlscript
+application/vnd.wap.wmlscriptc
+application/msword
+application/wordperfect
+application/wordperfect
+application/wordperfect6.0
+application/wordperfect
+application/wordperfect
+application/x-wpwin
+application/x-lotus
+application/mswrite
+application/x-wri
+application/x-world
+model/vrml
+x-world/x-vrml
+model/vrml
+x-world/x-vrml
+text/scriplet
+application/x-wais-source
+application/x-wintalk
+image/x-xbitmap
+image/x-xbm
+image/xbm
+video/x-amt-demorun
+xgl/drawing
+image/vnd.xiff
+application/excel
+application/excel
+application/x-excel
+application/x-msexcel
+application/excel
+application/vnd.ms-excel
+application/x-excel
+application/excel
+application/vnd.ms-excel
+application/x-excel
+application/excel
+application/x-excel
+application/excel
+application/x-excel
+application/excel
+application/vnd.ms-excel
+application/x-excel
+application/excel
+application/vnd.ms-excel
+application/x-excel
+application/excel
+application/vnd.ms-excel
+application/x-excel
+application/x-msexcel
+application/excel
+application/x-excel
+application/excel
+application/x-excel
+application/excel
+application/vnd.ms-excel
+application/x-excel
+application/x-msexcel
+audio/xm
+application/xml
+text/xml
+xgl/movie
+application/x-vnd.ls-xpix
+image/x-xpixmap
+image/xpm
+image/png
+video/x-amt-showrun
+image/x-xwd
+image/x-xwindowdump
+chemical/x-pdb
+application/x-compress
+application/x-compressed
+application/x-compressed
+application/x-zip-compressed
+application/zip
+multipart/x-zip
+application/octet-stream
+text/x-script.zsh
+application/vnd.oasis.opendocument.text
+application/vnd.oasis.opendocument.graphics
+application/vnd.oasis.opendocument.presentation
+application/vnd.oasis.opendocument.spreadsheet
+application/vnd.oasis.opendocument.chart
+application/vnd.oasis.opendocument.formula
+application/vnd.oasis.opendocument.database
+application/vnd.oasis.opendocument.image
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/authorizations.xml
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/authorizations.xml b/client/console/src/main/resources/authorizations.xml
new file mode 100644
index 0000000..4610abf
--- /dev/null
+++ b/client/console/src/main/resources/authorizations.xml
@@ -0,0 +1,333 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<auth>
+ <page id="Schema">
+ <action id="list">
+ <entitlement>SCHEMA_LIST</entitlement>
+ </action>
+
+ <action id="create">
+ <entitlement>SCHEMA_CREATE</entitlement>
+ </action>
+
+ <action id="read">
+ <entitlement>SCHEMA_READ</entitlement>
+ </action>
+
+ <action id="update">
+ <entitlement>SCHEMA_UPDATE</entitlement>
+ </action>
+
+ <action id="delete">
+ <entitlement>SCHEMA_DELETE</entitlement>
+ </action>
+ </page>
+
+ <page id="Users">
+ <action id="list">
+ <entitlement>USER_LIST</entitlement>
+ </action>
+
+ <action id="create">
+ <entitlement>USER_CREATE</entitlement>
+ </action>
+
+ <action id="read">
+ <entitlement>USER_READ</entitlement>
+ </action>
+
+ <action id="update">
+ <entitlement>USER_UPDATE</entitlement>
+ </action>
+
+ <action id="delete">
+ <entitlement>USER_DELETE</entitlement>
+ </action>
+
+ <action id="changeView">
+ <entitlement>USER_VIEW</entitlement>
+ </action>
+ </page>
+
+ <page id="Roles">
+ <action id="list">
+ <entitlement>ROLE_LIST</entitlement>
+ </action>
+
+ <action id="create">
+ <entitlement>ROLE_CREATE</entitlement>
+ </action>
+
+ <action id="read">
+ <entitlement>ROLE_READ</entitlement>
+ </action>
+
+ <action id="update">
+ <entitlement>ROLE_UPDATE</entitlement>
+ </action>
+
+ <action id="delete">
+ <entitlement>ROLE_DELETE</entitlement>
+ </action>
+ </page>
+
+ <page id="Resources">
+ <action id="list">
+ <entitlement>RESOURCE_LIST</entitlement>
+ </action>
+
+ <action id="create">
+ <entitlement>RESOURCE_CREATE</entitlement>
+ </action>
+
+ <action id="read">
+ <entitlement>RESOURCE_READ</entitlement>
+ </action>
+
+ <action id="update">
+ <entitlement>RESOURCE_UPDATE</entitlement>
+ </action>
+
+ <action id="delete">
+ <entitlement>RESOURCE_DELETE</entitlement>
+ </action>
+
+ <action id="getConnectorObject">
+ <entitlement>RESOURCE_GETCONNECTOROBJECT</entitlement>
+ </action>
+ </page>
+
+ <page id="Reports">
+ <action id="list">
+ <entitlement>REPORT_LIST</entitlement>
+ </action>
+
+ <action id="create">
+ <entitlement>REPORT_CREATE</entitlement>
+ </action>
+
+ <action id="read">
+ <entitlement>REPORT_READ</entitlement>
+ </action>
+
+ <action id="update">
+ <entitlement>REPORT_UPDATE</entitlement>
+ </action>
+
+ <action id="delete">
+ <entitlement>REPORT_DELETE</entitlement>
+ </action>
+
+ <action id="execute">
+ <entitlement>REPORT_EXECUTE</entitlement>
+ </action>
+ </page>
+
+ <page id="Audit">
+ <action id="list">
+ <entitlement>AUDIT_LIST</entitlement>
+ </action>
+
+ <action id="enable">
+ <entitlement>AUDIT_ENABLE</entitlement>
+ </action>
+
+ <action id="disable">
+ <entitlement>AUDIT_DISABLE</entitlement>
+ </action>
+ </page>
+
+ <page id="Connectors">
+ <action id="list">
+ <entitlement>CONNECTOR_LIST</entitlement>
+ </action>
+
+ <action id="create">
+ <entitlement>CONNECTOR_CREATE</entitlement>
+ </action>
+
+ <action id="read">
+ <entitlement>CONNECTOR_READ</entitlement>
+ </action>
+
+ <action id="update">
+ <entitlement>CONNECTOR_UPDATE</entitlement>
+ </action>
+
+ <action id="delete">
+ <entitlement>CONNECTOR_DELETE</entitlement>
+ </action>
+
+ <action id="reload">
+ <entitlement>CONNECTOR_RELOAD</entitlement>
+ </action>
+
+ </page>
+
+ <page id="Approval">
+ <action id="list">
+ <entitlement>WORKFLOW_FORM_LIST</entitlement>
+ </action>
+ <action id="read">
+ <entitlement>WORKFLOW_FORM_READ</entitlement>
+ </action>
+ <action id="claim">
+ <entitlement>WORKFLOW_FORM_CLAIM</entitlement>
+ </action>
+ <action id="submit">
+ <entitlement>WORKFLOW_FORM_SUBMIT</entitlement>
+ </action>
+ </page>
+
+ <page id="Configuration">
+ <action id="list">
+ <entitlement>CONFIGURATION_LIST</entitlement>
+ </action>
+
+ <action id="export">
+ <entitlement>CONFIGURATION_EXPORT</entitlement>
+ </action>
+
+ <action id="set">
+ <entitlement>CONFIGURATION_SET</entitlement>
+ </action>
+
+ <action id="delete">
+ <entitlement>CONFIGURATION_DELETE</entitlement>
+ </action>
+
+ <action id="logList">
+ <entitlement>LOG_LIST</entitlement>
+ </action>
+
+ <action id="logSetLevel">
+ <entitlement>LOG_SET_LEVEL</entitlement>
+ </action>
+
+ <action id="logDelete">
+ <entitlement>LOG_DELETE</entitlement>
+ </action>
+
+ <action id="workflowDefRead">
+ <entitlement>WORKFLOW_DEF_READ</entitlement>
+ </action>
+
+ <action id="workflowDefUpdate">
+ <entitlement>WORKFLOW_DEF_UPDATE</entitlement>
+ </action>
+ </page>
+
+ <page id="Notification">
+ <action id="list">
+ <entitlement>NOTIFICATION_LIST</entitlement>
+ </action>
+
+ <action id="create">
+ <entitlement>NOTIFICATION_CREATE</entitlement>
+ </action>
+
+ <action id="read">
+ <entitlement>NOTIFICATION_READ</entitlement>
+ </action>
+
+ <action id="update">
+ <entitlement>NOTIFICATION_UPDATE</entitlement>
+ </action>
+
+ <action id="delete">
+ <entitlement>NOTIFICATION_DELETE</entitlement>
+ </action>
+ </page>
+
+ <page id="SecurityQuestion">
+ <action id="create">
+ <entitlement>SECURITY_QUESTION_CREATE</entitlement>
+ </action>
+
+ <action id="update">
+ <entitlement>SECURITY_QUESTION_UPDATE</entitlement>
+ </action>
+
+ <action id="delete">
+ <entitlement>SECURITY_QUESTION_DELETE</entitlement>
+ </action>
+ </page>
+
+ <page id="Tasks">
+ <action id="list">
+ <entitlement>TASK_LIST</entitlement>
+ </action>
+
+ <action id="execute">
+ <entitlement>TASK_EXECUTE</entitlement>
+ </action>
+
+ <action id="read">
+ <entitlement>TASK_READ</entitlement>
+ </action>
+
+ <action id="delete">
+ <entitlement>TASK_DELETE</entitlement>
+ </action>
+
+ <action id="create">
+ <entitlement>TASK_CREATE</entitlement>
+ </action>
+
+ <action id="update">
+ <entitlement>TASK_UPDATE</entitlement>
+ </action>
+ </page>
+
+ <page id="Policies">
+ <action id="list">
+ <entitlement>POLICY_LIST</entitlement>
+ </action>
+
+ <action id="read">
+ <entitlement>POLICY_READ</entitlement>
+ </action>
+
+ <action id="delete">
+ <entitlement>POLICY_DELETE</entitlement>
+ </action>
+
+ <action id="create">
+ <entitlement>POLICY_CREATE</entitlement>
+ </action>
+
+ <action id="update">
+ <entitlement>POLICY_UPDATE</entitlement>
+ </action>
+ </page>
+ <page id="CamelRoutes">
+ <action id="list">
+ <entitlement>ROUTE_LIST</entitlement>
+ </action>
+
+ <action id="read">
+ <entitlement>ROUTE_READ</entitlement>
+ </action>
+
+ <action id="update">
+ <entitlement>ROUTE_UPDATE</entitlement>
+ </action>
+ </page>
+</auth>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/console.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/console.properties b/client/console/src/main/resources/console.properties
new file mode 100644
index 0000000..3f2667b
--- /dev/null
+++ b/client/console/src/main/resources/console.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+console.directory=${conf.directory}
+scheme=http
+host=localhost
+port=8080
+rootPath=/syncope/rest/
+activitiModelerDirectory=${activiti-modeler.directory}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/consoleContext.xml
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/consoleContext.xml b/client/console/src/main/resources/consoleContext.xml
new file mode 100644
index 0000000..fbab64b
--- /dev/null
+++ b/client/console/src/main/resources/consoleContext.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd">
+
+ <context:component-scan base-package="org.apache.syncope.client.console"/>
+
+ <bean id="confDirectoryPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="order" value="1"/>
+ <property name="location" value="file:${console.directory}/console.properties"/>
+ <property name="ignoreResourceNotFound" value="true"/>
+ <property name="ignoreUnresolvablePlaceholders" value="true"/>
+ </bean>
+ <bean id="classpathPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="location" value="classpath:console.properties"/>
+ </bean>
+
+ <bean id="version" class="java.lang.String">
+ <constructor-arg value="${syncope.version}"/>
+ </bean>
+
+ <bean id="site" class="java.lang.String">
+ <constructor-arg value="${project.parent.url}"/>
+ </bean>
+
+ <bean id="license" class="java.lang.String">
+ <constructor-arg value="${licenseUrl}"/>
+ </bean>
+
+ <bean id="anonymousUser" class="java.lang.String">
+ <constructor-arg value="${anonymousUser}"/>
+ </bean>
+ <bean id="anonymousKey" class="java.lang.String">
+ <constructor-arg value="${anonymousKey}"/>
+ </bean>
+
+ <bean id="activitiModelerDirectory" class="java.lang.String">
+ <constructor-arg value="${activitiModelerDirectory}"/>
+ </bean>
+
+ <bean id="syncopeApplication" class="org.apache.syncope.client.console.SyncopeApplication"/>
+
+ <bean id="preferenceManager" class="org.apache.syncope.client.console.commons.PreferenceManager"/>
+
+ <bean id="xmlRolesReader" class="org.apache.syncope.client.console.commons.XMLRolesReader" scope="singleton">
+ <property name="authorizations" value="authorizations.xml"/>
+ </bean>
+
+ <bean id="roleTreeBuilder" class="org.apache.syncope.client.console.commons.RoleTreeBuilder"/>
+
+ <bean id="syncopeClientFactory" class="org.apache.syncope.client.lib.SyncopeClientFactoryBean">
+ <property name="address" value="${scheme}://${host}:${port}/${rootPath}"/>
+ </bean>
+
+</beans>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeApplication.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeApplication.properties b/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeApplication.properties
new file mode 100644
index 0000000..83cb198
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeApplication.properties
@@ -0,0 +1,55 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+users=Users
+roles=Roles
+configuration=Configuration
+resources=Resources
+connectors=Connectors
+reports=Reports
+tasks=Tasks
+logout=Logout
+schema=Schema
+operation_succeeded=Operation executed successfully
+operation_error=Error occurred during the requested operation
+alert=Alert:
+confirmDelete=Do you really want to delete the selected item(s)?
+confirmUnlink=Do you really want to remove the link between the selected item(s) and the resource?
+confirmUnassign=Do you really want to remove the assignment between the selected item(s) and the resource?
+confirmDeprovision=Do you really want to de-provision the selected item(s)?
+confirmProvision=Do you really want to provision the selected item(s)?
+
+
+unauthorizedInstantiationException=Missing authorization.
+accessControlException=Missing authorization while contacting Syncope core.
+restClientException=Error while contacting Syncope core.
+pageExpiredException=Session expired: please login again.
+
+dropDownChoiceField.nullValid=Choose one
+todo=TODO
+DateTimeField$HoursValidator=Hour value must be in range (1, 12)
+error=Error
+generic_error=An error occurred during the operation
+id=Id
+name=Name
+palette.available=Available
+palette.selected=Selected
+jexl_info=This field expects a JEXL expression, for example:
+jexl_ex1=surname + ',' + firstname
+jexl_ex2='new.' + surname
+jexl_syntax_url=Full JEXL reference
+create=Create
+key=Key
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeApplication_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeApplication_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeApplication_it.properties
new file mode 100644
index 0000000..96edcee
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeApplication_it.properties
@@ -0,0 +1,54 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+users=Utenti
+roles=Ruoli
+configuration=Configurazione
+resources=Risorse
+connectors=Connettori
+reports=Rapporti
+logout=Logout
+schema=Schema
+tasks=Task
+operation_succeeded=Operazione eseguita con successo
+operation_error=Attenzione si \u00e8 verificato un errore durante l'esecuzione dell'operazione richiesta
+alert=Attenzione:
+confirmDelete=Vuoi davvero procedere con la cancellazione?
+confirmUnlink=Vuoi davvero procedere rimuovendo il link con la risorsa?
+confirmUnassign=Vuoi davvero procedere rimuovendo l'assegnamento sulla risorsa?
+confirmDeprovision=Vuoi davvero procedere con il de-provisioning?
+confirmProvision=Vuoi davvero procedere con il provisioning?
+
+unauthorizedInstantiationException=Autorizzazione mancante.
+accessControlException=Autorizzazione mancante durante la comunicazione con Syncope core.
+restClientException=Errore durante la comunicazione con Syncope core.
+pageExpiredException=Sessione scaduta: eseguire di nuovo l'accesso.
+
+dropDownChoiceField.nullValid=Seleziona
+todo=TODO
+DateTimeField$HoursValidator=L'ora deve essere nell'intervallo (1,12)
+error=Errore
+generic_error=Si \u00e8 verificato un errore durante l'operazione
+id=Id
+name=Nome
+palette.available=Opzioni
+palette.selected=Selezione
+jexl_info=In questo campo possono essere inserite espressioni di tipo JEXL, per esempio:
+jexl_ex1=surname + ',' + firstname
+jexl_ex2='new.' + surname
+jexl_syntax_url=Sintassi JEXL completa
+create=Crea
+key=Chiave
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeApplication_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeApplication_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeApplication_pt_BR.properties
new file mode 100644
index 0000000..a7e2880
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeApplication_pt_BR.properties
@@ -0,0 +1,54 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+users=Usu\u00e1rios
+roles=Fun\u00e7\u00f5es
+configuration=Configura\u00e7\u00f5es
+resources=Recursos
+connectors=Conectores
+reports=Relat\u00f3rios
+tasks=Tarefas
+logout=Sair
+schema=Esquemas
+operation_succeeded=Opera\u00e7\u00e3o executada com sucesso
+operation_error=Um erro ocorreu ao executar esta opera\u00e7\u00e3o
+alert=Alerta:
+confirmDelete=Voc\u00ea realmente deseja apagar este item(s) selecionado?
+confirmUnlink=Voc\u00ea realmente deseja apagar o v\u00ednculo entre o item e de recursos?
+confirmUnassign=Voc\u00ea realmente deseja apagar a atribui\u00e7\u00e3o entre o item e de recursos?
+confirmDeprovision=Voc\u00ea realmente de-provision item?
+confirmProvision=Voc\u00ea realmente provision item?
+
+unauthorizedInstantiationException=Falta de autoriza\u00e7\u00e3o para concluir.
+accessControlException=Falta de autoriza\u00e7\u00e3o ao comunicar-se com o Syncope core.
+restClientException=Erro ao comunicar-se com o Syncope core.
+pageExpiredException=Sess\u00e3o encerrada, favor logar-se novamente.
+
+dropDownChoiceField.nullValid=Escolha um
+todo=A fazer
+DateTimeField$HoursValidator=O seu valor precisa estar entre (1, 12)
+error=Erro
+generic_error=Um erro ocorreu durante a opera\u00e7\u00e3o
+id=Id
+name=Nome
+palette.available=Dispon\u00ed\u00advel
+palette.selected=Selecionado
+jexl_info=Este campo \u00e9 designado a uma express\u00e3o do tipo JEXL, por exemplo\:
+jexl_ex1=sobrenome + ',' + nome
+jexl_ex2='novo.' + sobrenome
+jexl_syntax_url=Refer\u00eancia JEXL completa
+create=Criar
+key=Chave
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage.html
new file mode 100644
index 0000000..0c43c4b
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage.html
@@ -0,0 +1,122 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <link rel="stylesheet" type="text/css" href="css/bulk.css" media="all"/>
+ <style>
+ #dataTableSpan{
+ display: block;
+ clear: both;
+ float: none;
+ margin: 10px;
+ padding-top: 10px;
+ }
+
+ #dataTableSpan table{
+ width: 100%;
+ }
+
+ form#pwdMgtForm {
+ border: 1px solid #AAAAAA;
+ margin:10px;
+ }
+
+ div#changepwd {
+ display: inline-row;
+ margin-top: 5px;
+ }
+
+ div#changepwd div{
+ display: table-cell;
+ }
+
+ div#changepwd div#label{
+ padding-left: 5px;
+ vertical-align: middle;
+ font-family: Verdana,Arial,sans-serif;
+ }
+
+ div#password {
+ display: inline-row;
+ margin: 5px;
+ }
+
+ div#continue {
+ display: inline-row;
+ margin: 5px;
+ }
+
+ div#continue div{
+ display: table-cell;
+ }
+
+ div#cancelBtmForm {
+ padding-left: 5px;
+ }
+ </style>
+ </wicket:head>
+ <wicket:extend>
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <wicket:message key="title"/> <span wicket:id="displayName"/>
+ </p>
+ <span wicket:id="resourceDatatable" id="dataTableSpan">[resources]</span>
+
+ <span wicket:id="pwdMgtFields">[password management]</span>
+
+ <wicket:fragment wicket:id="pwdMgtFragment">
+ <div wicket:id="pwdMgt">
+ <form wicket:id="pwdMgtForm" id="pwdMgtForm">
+ <div id="changepwd">
+ <div id="value">
+ <span wicket:id="changepwd">[changepwd]</span>
+ </div>
+ <div id="label">
+ <label wicket:id="changePwdLabel">[Change password]</label>
+ </div>
+ </div>
+
+ <div id="password">
+ <input type="password" wicket:id="password" id="password" size="25" style="width: 180px" title="password"/>
+ </div>
+
+ <div id="password">
+ <input type="password" wicket:id="confirm" id="confirm" size="25" style="width: 180px" title="confirm"/>
+ </div>
+
+ <div id="continue">
+ <div id="continueBtmForm">
+ <input type="button" wicket:id="continue" id="continue"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"/>
+ </div>
+
+ <div id="cancelBtmForm">
+ <input type="button" wicket:id="cancel" id="cancel"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"/>
+ </div>
+ </div>
+ </form>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="emptyFragment">
+ </wicket:fragment>
+
+ <wicket:child />
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage.properties
new file mode 100644
index 0000000..0f1fcdc
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Global Status
+changePwdLabel=Password propagation
+passwordMismatch=Password mismatch
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_it.properties
new file mode 100644
index 0000000..e5619e2
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_it.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Stato Globale
+changePwdLabel=Propagazione password
+passwordMismatch=Password non corrispondenti
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_pt_BR.properties
new file mode 100644
index 0000000..36d86e8
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_pt_BR.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Estatus Global
+changePwdLabel=Password propagation
+passwordMismatch=Password mismatch
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ActivitiModelerPopupPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ActivitiModelerPopupPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ActivitiModelerPopupPage.html
new file mode 100644
index 0000000..789538f
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ActivitiModelerPopupPage.html
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:b3mn="http://b3mn.org/2007/b3mn"
+ xmlns:ext="http://b3mn.org/2007/ext"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:atom="http://b3mn.org/2007/atom+xhtml">
+ <head profile="http://purl.org/NET/erdf/profile">
+ <title>Apache Syncope / Activiti Modeler</title>
+ <!-- libraries -->
+ <script src="activiti-modeler/libs/prototype-1.5.1.js" type="text/javascript"></script>
+ <script src="activiti-modeler/libs/path_parser.js" type="text/javascript"></script>
+ <script src="activiti-modeler/libs/ext-2.0.2/adapter/ext/ext-base.js" type="text/javascript"></script>
+ <script src="activiti-modeler/libs/ext-2.0.2/ext-all-debug.js" type="text/javascript"></script>
+ <script src="activiti-modeler/libs/ext-2.0.2/color-field.js" type="text/javascript"></script>
+ <link rel="Stylesheet" media="screen" href="activiti-modeler/libs/ext-2.0.2/resources/css/ext-all.css" type="text/css"></link>
+ <link rel="Stylesheet" media="screen" href="activiti-modeler/libs/ext-2.0.2/resources/css/xtheme-darkgray.css" type="text/css"></link>
+ <link rel="Stylesheet" media="screen" href="activiti-modeler/editor/css/theme_norm.css" type="text/css"></link>
+ <link rel="Stylesheet" media="screen" href="activiti-modeler/editor/css/theme_norm_signavio.css" type="text/css"></link>
+ <link rel="Stylesheet" media="screen" href="activiti-modeler/explorer/src/css/xtheme-smoky.css" type="text/css"></link>
+ <link rel="Stylesheet" media="screen" href="activiti-modeler/explorer/src/css/custom-style.css" type="text/css"></link>
+ <!-- oryx editor -->
+ <!-- language files -->
+ <script src="activiti-modeler/editor/i18n/translation_en_us.js" type="text/javascript"></script>
+ <script src="activiti-modeler/editor/i18n/translation_signavio_en_us.js" type="text/javascript"></script>
+ <script src="activiti-modeler/libs/utils.js" type="text/javascript"></script>
+ <script src="activiti-modeler/editor/oryx.debug.js" type="text/javascript"></script>
+ <!-- erdf schemas -->
+ <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/"></link>
+ <link rel="schema.dcTerms" href="http://purl.org/dc/terms/"></link>
+ <link rel="schema.b3mn" href="http://b3mn.org"></link>
+ <link rel="schema.oryx" href="http://oryx-editor.org/"></link>
+ <link rel="schema.raziel" href="http://raziel.org/"></link>
+
+ <script type="text/javascript">
+ window.onunload = refreshParent;
+ function refreshParent() {
+ if (window.opener.location.toString().indexOf('#workflow') === -1) {
+ window.opener.location = window.opener.location + "#workflow";
+ }
+ window.opener.location.reload();
+ }
+ </script>
+ </head>
+ <body style="overflow:hidden;">
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage.html
new file mode 100644
index 0000000..be1a4b0
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage.html
@@ -0,0 +1,52 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+ <div style="margin: 5px;">
+ <form wicket:id="form">
+ <div id="formtable">
+ <div class="tablerow" wicket:id="propView">
+ <div class="tablecolumn_label medium_dynamicsize">
+ <span wicket:id="key">[key]</span>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="value">[value]</span>
+
+ </div>
+ </div>
+ </div>
+
+ <div style="margin: 20px 0">
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="userDetails"/>
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"/>
+ <input type="button"
+ accept=""class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+
+ </form>
+ <div wicket:id="editUserWin">[Show modal window for editing user under approval]</div>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage.properties
new file mode 100644
index 0000000..547f13f
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Approval form
+userDetails=User details
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage_it.properties
new file mode 100644
index 0000000..a2a7134
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage_it.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Form di approvazione
+userDetails=Dettagli utente
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage_pt_BR.properties
new file mode 100644
index 0000000..954d365
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ApprovalModalPage_pt_BR.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Formul\u00E1rio de Aprova\u00E7\u00E3o
+userDetails=Detalhes do Usu\u00E1rio
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html
new file mode 100644
index 0000000..57fc8d3
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html
@@ -0,0 +1,56 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <head>
+ <title></title>
+
+ <link rel="stylesheet" type="text/css" href="webjars/jquery-ui/${jquery-ui.version}/themes/base/minified/jquery-ui.min.css" media="all"/>
+ <link rel="stylesheet" type="text/css" href="css/style.css" media="all"/>
+ <link rel="stylesheet" type="text/css" href="css/fieldstyle.css" media="all"/>
+
+ <script type="text/javascript" src="webjars/jquery-ui/${jquery-ui.version}/ui/minified/jquery-ui.min.js"></script>
+
+ <script type="text/javascript">
+ $(function() {
+ $("#tabs").tabs();
+ });
+
+ var notificationShownTimes = 0;
+
+ function showNotification(componentId, messagecount) {
+ notificationShownTimes++;
+ timeout = 1700 + (messagecount * 500) + notificationShownTimes * 200;
+ $('div#' + componentId).fadeTo('normal', 1.0);
+ setTimeout("$('div#" + componentId + "').fadeOut('normal')", timeout);
+ }
+ </script>
+
+ <style type="text/css">
+ table.palette td.header {
+ background:url("images/ui-bg_glass_75_e6e6e6_1x400.png")
+ repeat-x scroll 50% 50% #E6E6E6 !important;
+ }
+ </style>
+ </head>
+ <body onload="setTimeout('window.focus();', 0);">
+ <div wicket:id="feedback"/>
+
+ <wicket:child />
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.properties
new file mode 100644
index 0000000..bf07514
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+submit=Save
+add=Add
+remove=Delete
+cancel=Cancel
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_it.properties
new file mode 100644
index 0000000..9973e99
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_it.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+submit=Salva
+add=Aggiungi
+remove=Elimina
+cancel=Annulla
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_pt_BR.properties
new file mode 100644
index 0000000..bf17b75
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_pt_BR.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+submit=Salvar
+add=Adicionar
+remove=Remover
+cancel=Cancelar
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
new file mode 100644
index 0000000..1b274a9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
@@ -0,0 +1,145 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <meta http-equiv="Content-Script-Type" content="text/javascript"/>
+
+ <title>Apache Syncope</title>
+
+ <link rel="shortcut icon" href="img/favicon.png" type="image/png"/>
+
+ <style type="text/css">
+ div.wicket-modal div.w_caption {
+ height: 16px !important;
+ }
+ </style>
+ <link rel="stylesheet" type="text/css" href="webjars/jquery-ui/${jquery-ui.version}/themes/base/minified/jquery-ui.min.css" media="all"/>
+ <link rel="stylesheet" type="text/css" href="css/style.css" media="all"/>
+ <link rel="stylesheet" type="text/css" href="css/fieldstyle.css" />
+
+ <script type="text/javascript" src="webjars/jquery-ui/${jquery-ui.version}/ui/minified/jquery-ui.min.js"></script>
+
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $("#tabs").tabs();
+ });
+
+ /** Add rollover effect to tables supporting Ajax events */
+ $(document).on('mouseover mouseout', 'table.ui-widget.ui-widget-content.table-hover tbody tr',
+ function(event) {
+ if (event.type == 'mouseover') {
+ $(this).addClass('selectedRow');
+ } else if (event.type == 'mouseout') {
+ $(this).removeClass('selectedRow');
+ }
+ });
+
+ var notificationShownTimes = 0;
+
+ function showNotification(componentId, messagecount) {
+ notificationShownTimes++;
+ timeout = 1700 + (messagecount * 500) + notificationShownTimes * 200;
+ $('div#' + componentId).fadeTo('normal', 1.0);
+ setTimeout("$('div#" + componentId + "').fadeOut('normal')", timeout);
+ }
+ </script>
+ </head>
+ <body>
+ <div id="navigationPane">
+ <ul>
+ <li style="position: absolute; left: 0px; top: 10px;width:240px;">
+ <img src="img/logo.png" alt="logo"/><br />
+ </li>
+ <li><span>
+ <a href="#" wicket:id="todo"><img wicket:id="todoIcon" alt="TODO" width="80" height="80" /><br />
+ <wicket:message key="todo"/>
+ </a>
+ </span>
+ </li>
+ <li><span>
+ <a href="#" wicket:id="schema"><img wicket:id="schemaIcon" alt="Schema" width="80" height="80" /><br />
+ <wicket:message key="schema"/>
+ </a>
+ </span>
+ </li>
+ <li><span>
+ <a href="#" wicket:id="users"><img wicket:id="usersIcon" alt="Users" width="80" height="80" /><br />
+ <wicket:message key="users"/>
+ </a>
+ </span>
+ </li>
+ <li><span>
+ <a href="#" wicket:id="roles"><img wicket:id="rolesIcon" alt="Roles" width="80" height="80" /><br />
+ <wicket:message key="roles"/>
+ </a>
+ </span>
+ </li>
+ <li><span>
+ <a href="#" wicket:id="resources"><img wicket:id="resourcesIcon" alt="Resources" width="80" height="80" /><br />
+ <wicket:message key="resources"/>
+ </a>
+ </span>
+ </li>
+ <li><span>
+ <a href="#" wicket:id="tasks"><img wicket:id="tasksIcon" alt="Tasks" width="80" height="80" /><br />
+ <wicket:message key="tasks"/>
+ </a>
+ </span>
+ </li>
+ <li><span>
+ <a href="#" wicket:id="reports"><img wicket:id="reportsIcon" alt="Reports" width="80" height="80" /><br />
+ <wicket:message key="reports"/>
+ </a>
+ </span>
+ </li>
+ <li><span>
+ <a href="#" wicket:id="configuration"><img wicket:id="configurationIcon" alt="Configuration" width="80" height="80" /><br />
+ <wicket:message key="configuration"/>
+ </a></span>
+ </li>
+ <li style="float:right;width:auto;text-align:right;">
+ <a href="#" wicket:id="logout"><img src="img/menu/logout.png" alt="Logout" width="80" height="80" /><br /></a>
+ <div style="display: table-row;">
+ <div id="username" style="padding-right: 5px;width: 100px;cursor: pointer;display: table-cell;">
+ <a href="#" wicket:id="editProfileLink">
+ <span wicket:id="username" style="color: #B9CFB3;font-family: monospace;"/>
+ </a>
+ </div>
+ <div>
+ <div wicket:id="infoModal"/>
+ <a wicket:id="infoLink" style="vertical-align: middle;"><img src="img/info.png" alt="info" style="padding-right: 10px;"/></a>
+ </div>
+ </div>
+ </li>
+ </ul>
+ <div wicket:id="editProfileModal"></div>
+ </div>
+
+ <div wicket:id="feedback"/>
+
+ <wicket:child />
+
+ <div id="veil" style="display:none;position:absolute;top:0;left:0;z-index:99999;background-color:black;width:100%;height:20000px;color:white;opacity:0.3;filter:alpha(opacity=30);">
+ <img src="img/busy.gif" style="position:absolute;top:300px;left:50%;margin-left:-75px;width:150px;"/>
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties
new file mode 100644
index 0000000..c40d8a5
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+displayRows=Rows to display:
+home=Home
+version=VERSION
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_it.properties
new file mode 100644
index 0000000..8560ce7
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_it.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+displayRows=Righe per pagina:
+home=Home
+version=VERSIONE
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties
new file mode 100644
index 0000000..97349d4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+displayRows=Linhas para mostrar\:
+home=In\u00EDcio
+version=VERS\u00C3O
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePopupPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePopupPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePopupPage.html
new file mode 100644
index 0000000..fea606c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePopupPage.html
@@ -0,0 +1,51 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <head>
+ <title></title>
+
+ <link rel="stylesheet" type="text/css" href="webjars/jquery-ui/${jquery-ui.version}/themes/base/minified/jquery-ui.min.css" media="all"/>
+ <link rel="stylesheet" type="text/css" href="css/jquery-ui.css" media="all"/>
+ <link rel="stylesheet" type="text/css" href="css/style.css" media="all"/>
+ <link rel="stylesheet" type="text/css" href="css/fieldstyle.css" media="all"/>
+
+ <style type="text/css">
+ table.palette td.header {
+ background:url("images/ui-bg_glass_75_e6e6e6_1x400.png")
+ repeat-x scroll 50% 50% #E6E6E6 !important;
+ }
+ </style>
+
+ <script type="text/javascript">
+ var notificationShownTimes = 0;
+
+ function showNotification(componentId, messagecount) {
+ notificationShownTimes++;
+ timeout = 1700 + (messagecount * 500) + notificationShownTimes * 200;
+ $('div#' + componentId).fadeTo('normal', 1.0);
+ setTimeout("$('div#" + componentId + "').fadeOut('normal')", timeout);
+ }
+ </script>
+ </head>
+ <body onload="setTimeout('window.focus();', 0);">
+ <div wicket:id="feedback"/>
+
+ <wicket:child />
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage.html
new file mode 100644
index 0000000..9e5d497
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage.html
@@ -0,0 +1,45 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <link rel="stylesheet" type="text/css" href="css/bulk.css" media="all"/>
+ </wicket:head>
+ <wicket:extend>
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+
+ <div id="selectedObjects">
+ <table class="ui-widget ui-widget-content table-hover pageRowElement" wicket:id="selectedObjects">[DataTable]</table>
+
+ <div id="actionRow" class="pageRowElement">
+ <div id="actions">
+ <div id="actionPanel" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
+ <span wicket:id="actions">[Actions]</span>
+ </div>
+
+ <div id="cancelBtmForm">
+ <form wicket:id="form">
+ <input type="button" wicket:id="cancel" id="cancel"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"/>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage.properties
new file mode 100644
index 0000000..bd28d80
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Bulk action
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage_it.properties
new file mode 100644
index 0000000..3989422
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage_it.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Operazioni di gruppo
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage_pt_BR.properties
new file mode 100644
index 0000000..ec07d02
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionModalPage_pt_BR.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=A\u00E7\u00E3o Composta
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage.html
new file mode 100644
index 0000000..16dd256
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage.html
@@ -0,0 +1,57 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:head>
+ <link rel="stylesheet" type="text/css" href="css/bulk.css" media="all"/>
+</wicket:head>
+<wicket:extend>
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+
+<div id="selectedObjects">
+ <table class="ui-widget ui-widget-content table-hover pageRowElement" wicket:id="selectedObjects">[DataTable]</table>
+
+ <div id="actionRow" class="pageRowElement">
+ <div id="actions">
+ <div id="cancelBtmForm" style="padding: 0px">
+ <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="close">
+ <wicket:message key="close"/>
+ </a>
+ </div>
+ </div>
+ </div>
+</div>
+</wicket:extend>
\ No newline at end of file
[22/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage_pt_BR.properties
new file mode 100644
index 0000000..b790e58
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/SyncTaskModalPage_pt_BR.properties
@@ -0,0 +1,43 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Perfil
+crontab=Agenda
+executions=Execu\u00e7\u00f5es
+title=Tarefas
+resourceName=Nome de Recursos
+name=Nome
+description=Descri\u00e7\u00e3o
+lastExec=\u00daltima Execu\u00e7\u00e3o
+nextExec=Pr\u00f3xima Execu\u00e7\u00e3o
+cron=Agenda (segundos, minutos, horas, dias do m\u00eas, meses, dias da semana)
+templates=Remover tarefa agendada / usar template para agendar
+apply=Salvar
+startDate=Data de In\u00edcio
+endDate=Data Final
+status=Estatus
+message=Mensagem
+delete=Excluir
+showMessage=Mostrar
+chooseForTemplate=Usar um template
+creates=Permitir opera\u00e7\u00f5es de cria\u00e7\u00e3o
+deletes=Permitir opera\u00e7\u00f5es de remo\u00e7\u00e3o
+updates=Permitir a edi\u00e7\u00e3o
+syncStatus=Permitir a sincroniza\u00e7\u00e3o de status
+fullReconciliation=Reconcilia\u00e7\u00e3o completa
+actionsClasses=Classes de a\u00e7\u00f5es
+matchingRule=Regra de correspond\u00eancia
+unmatchingRule=Regra de non correspond\u00eancia
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks.html
new file mode 100644
index 0000000..7df418a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks.html
@@ -0,0 +1,46 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:extend>
+
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#tabs-1"><span><wicket:message key="tab1"/></span></a></li>
+ <li><a href="#tabs-2"><span><wicket:message key="tab2"/></span></a></li>
+ <li><a href="#tabs-3"><span><wicket:message key="tab3"/></span></a></li>
+ <li><a href="#tabs-4"><span><wicket:message key="tab4"/></span></a></li>
+ <li><a href="#tabs-5"><span><wicket:message key="tab5"/></span></a></li>
+ </ul>
+ <div id="tabs-1">
+ <span wicket:id="propagation">[propagation tasks]</span>
+ </div>
+ <div id="tabs-2">
+ <span wicket:id="notification">[notification tasks]</span>
+ </div>
+ <div id="tabs-3">
+ <span wicket:id="sched">[scheduled tasks]</span>
+ </div>
+ <div id="tabs-4">
+ <span wicket:id="sync">[synchronization tasks]</span>
+ </div>
+ <div id="tabs-5">
+ <span wicket:id="push">[push tasks]</span>
+ </div>
+ </div>
+
+</wicket:extend>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks.properties
new file mode 100644
index 0000000..6dcc9f7
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Propagation Tasks
+tab2=Notification tasks
+tab3=Scheduled Tasks
+tab4=Synchronization Tasks
+tab5=Push Tasks
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks_it.properties
new file mode 100644
index 0000000..2c050e1
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks_it.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Task di propagazione
+tab2=Task di notifica
+tab3=Task programmabili
+tab4=Task di sincronizzazione
+tab5=Task di push
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks_pt_BR.properties
new file mode 100644
index 0000000..638934a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Tasks_pt_BR.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Propaga\u00e7\u00e3o de Tarefas
+tab2=Tarefas de Notifica\u00e7\u00e3o
+tab3=Tarefas Agendadas
+tab4=Sincroniza\u00e7\u00e3o de Tarefas
+tab5=Push de Tarefas
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo.html
new file mode 100644
index 0000000..e18efa0
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo.html
@@ -0,0 +1,45 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#tabs-1"><span><wicket:message key="approvals"/></span></a></li>
+ </ul>
+ <div id="tabs-1">
+
+ <div id="users-contain" class="ui-widget" style="width:inherit;">
+ <span wicket:id="approvalContainer">
+ <table class="ui-widget ui-widget-content table-hover"
+ wicket:id="approvalTable"/>
+ </span>
+ <span style="float:right">
+ <form wicket:id="paginatorForm" style="display:inline">
+ <label><wicket:message key="displayRows"/></label>
+ <select class="text ui-widget-content ui-corner-all"
+ wicket:id="rowsChooser"/>
+ </form>
+ </span>
+ </div>
+
+ <div wicket:id="editApprovalWin">[Show modal window for editing approval]</div>
+ </div>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo.properties
new file mode 100644
index 0000000..2e4442a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo.properties
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+taskId=Task
+key=Key
+description=Description
+createTime=Create time
+dueDate=Due date
+owner=Owner
+claim=Claim
+manage=Manage
+approvals=Approvals
+delete=Delete
+type=Type
+username=User
+new_user=New user
+creationDate = Creation date
+claimDate = Claim date
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo_it.properties
new file mode 100644
index 0000000..df4fba8
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo_it.properties
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+taskId=Task
+key=Chiave
+description=Descrizione
+createTime=Data di creazione
+dueDate=Scadenza
+owner=Esecutore
+claim=Richiedi
+manage=Gestisci
+approvals=Approvazioni
+delete=Rimuovi
+type=Tipo
+username=Utente
+new_user=Nuovo utente
+creationDate = Data creazione
+claimDate = Data rivendicazione
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo_pt_BR.properties
new file mode 100644
index 0000000..fb255fb
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Todo_pt_BR.properties
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+taskId=Tarefa
+key=Chave
+description=Descri\u00e7\u00e3o
+createTime=Tempo de Cria\u00e7\u00e3o
+dueDate=Data acordada
+owner=Propriet\u00e1rio
+claim=Requerimento
+manage=Ger\u00eancia
+approvals=Aprova\u00e7\u00e3o
+delete=Excluir
+type=Tipo
+username=Usu\u00e1rio
+new_user=Novo Usu\u00e1rio
+creationDate = Data de cria\u00e7\u00e3o
+claimDate = Data de reivindica\u00e7\u00e3o
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage.html
new file mode 100644
index 0000000..991f726
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage.html
@@ -0,0 +1,97 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+
+ <span wicket:id="userModalFrag"/>
+
+ <wicket:fragment wicket:id="userModalEditFrag">
+
+ <div style="margin: 5px;">
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <span wicket:id="new"/> <wicket:message key="title"/> <span wicket:id="id"/>
+ </p>
+
+ <form wicket:id="UserForm">
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#tabs-1"><span><wicket:message key="tab1"/></span></a></li>
+ <li><a href="#tabs-2"><span><wicket:message key="tab2"/></span></a></li>
+ <li><a href="#tabs-3"><span><wicket:message key="tab3"/></span></a></li>
+ <li><a href="#tabs-4"><span><wicket:message key="tab4"/></span></a></li>
+ <li><a href="#tabs-5"><span><wicket:message key="tab5"/></span></a></li>
+ <li><a href="#tabs-6"><span><wicket:message key="tab6"/></span></a></li>
+ </ul>
+ <div id="tabs-1">
+ <span wicket:id="details">[user details]</span>
+ <span wicket:id="storePwdFrag">[storePwdFrag]</span>
+ <wicket:fragment wicket:id="storePwdCheck">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <span wicket:id="storePasswordLabel">[storePasswordLabel]</span>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="storePassword">[storePassword]</span>
+ </div>
+ </div>
+ </wicket:fragment>
+ <wicket:fragment wicket:id="emptyFragment">
+ </wicket:fragment>
+ <div wicket:id="securityQuestion">[Security Question]</div>
+ <div wicket:id="pwdChangeInfo" style="margin-top: 10px;">[pwdChangeInfo]</div>
+ <span wicket:id="statuspanel">[Status Panel]</span>
+ <span wicket:id="accountinformation">[Account Information]</span>
+ </div>
+ <div id="tabs-2">
+ <div id="formtable">
+ <span wicket:id="plainAttrs">[user plain attributes]</span>
+ </div>
+ </div>
+
+ <div id="tabs-3">
+ <span wicket:id="derAttrs">[user derived attributes]</span>
+ </div>
+
+ <div id="tabs-4">
+ <span wicket:id="virAttrs">[user virtual attributes]</span>
+ </div>
+
+ <div id="tabs-5">
+ <span wicket:id="resources">[resources]</span>
+ </div>
+
+ <div id="tabs-6">
+ <span wicket:id="memberships">[memberships]</span>
+ </div>
+ </div>
+
+ <div style="margin: 20px 10px 0">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:fragment>
+
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage.properties
new file mode 100644
index 0000000..7667bc5
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage.properties
@@ -0,0 +1,52 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=All form fields are required.
+title=User
+firstname=Firstname
+surname=Surname
+tab1=Details
+tab2=Plain attributes
+tab3=Derived attributes
+tab4=Virtual attributes
+tab5=Resources
+tab6=Roles
+add=+
+drop=-
+resources=Resources transfer
+firstResourcesList=User's resources
+secondResourcesList=Available resources
+updating_error=Generic error occurred during updating
+column1=Roles
+column2=Action
+
+edit=Edit
+delete=Delete
+derAttrs=Derived Attributes
+derAttrToRemove=Delete
+derAttrName=Name
+derAttrValue=Derived value
+
+virAttrs=Virtual Attributes
+virAttrToRemove=Delete
+virAttrName=Name
+virAttrValue=Virtual value
+
+addAttributeBtn=Add
+new=New
+pwdChangeInfo=If provided, the password will be changed on the following resources.
+
+storePassword=Store password internally
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage_it.properties
new file mode 100644
index 0000000..ec550c3
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage_it.properties
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=Tutti i campi sono obbligatori.
+title=Utente
+firstname=Nome
+surname=Cognome
+tab1=Details
+tab2=Attributi normali
+tab3=Attributi derivati
+tab4=Attributi virtuali
+tab5=Risorse
+tab6=Ruoli
+add=+
+drop=-
+resources=Associazione risorse
+firstResourcesList=Risorse utente
+secondResourcesList=Risorse disponibili
+updating_error=Errore generico durante l'aggiornamento
+column1=Ruoli
+column2=Azioni
+edit=Modifica
+delete=Rimuovi
+
+derAttrs=Attributi derivati
+derAttrToRemove=Elimina
+derAttrName=Nome
+derAttrValue=Valore derivato
+
+virAttrs=Attributi virtual
+virAttrToRemove=Elimina
+virAttrName=Nome
+virAttrValue=Valore virtuale
+
+addAttributeBtn=Aggiungi
+
+new=Nuovo
+pwdChangeInfo=Se inserita, la password verr\u00e0 cambiata sulle seguenti risorse.
+
+storePassword=Salva la password internamente
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage_pt_BR.properties
new file mode 100644
index 0000000..d5d26a9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserModalPage_pt_BR.properties
@@ -0,0 +1,52 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=Todos os campos s\u00e3o obrigat\u00f3rios
+title=Usu\u00e1rio
+firstname=Nome
+surname=Sobrenome
+tab1=Detalhes
+tab2=Atributos Normal
+tab3=Atriutos Derivados
+tab4=Atributos Virtuais
+tab5=Recursos
+tab6=Fun\u00e7\u00f5es
+add=+
+drop=-
+resources=Transfer\u00eancia de Recursos
+firstResourcesList=Recursos de usu\u00e1rio
+secondResourcesList=Recursos Dispon\u00edveis
+updating_error=Um erro gern\u00e9rico ocorreu durante a atualiza\u00e7\u00e3o
+column1=Fun\u00e7\u00f5es
+column2=A\u00e7\u00e3o
+
+edit=Alterar
+delete=Excluir
+derAttrs=Atributos Derivados
+derAttrToRemove=Excluir
+derAttrName=Nome
+derAttrValue=Valor Derivado
+
+virAttrs=Atributos virtuais
+virAttrToRemove=Excluir
+virAttrName=Nome
+virAttrValue=Valor Virtual
+
+addAttributeBtn=Adicionar
+new=Novo
+pwdChangeInfo=Se provida, a senha ser\u00e1 alterada nos seguintes recursos
+
+storePassword=Salvar senha internamente
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage.html
new file mode 100644
index 0000000..e62e4f3
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage.html
@@ -0,0 +1,38 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:extend>
+ <div style="padding: 5px;">
+ <div>
+ <form wicket:id="searchForm">
+ <span wicket:id="searchPanel">searchPanel</span>
+
+ <br/>
+ <a wicket:id="search"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
+ <img src="img/search.png" alt="search"/>
+ <wicket:message key="search"/>
+ </a>
+ </form>
+ </div>
+
+ <div id="users-contain" class="ui-widget" style="width:auto">
+ <span wicket:id="searchResult"> [search result] </span>
+ </div>
+ </div>
+</wicket:extend>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage.properties
new file mode 100644
index 0000000..6e0a6ea
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+search=Search
+search_error=Error:search's format is invalid
+search_noResults=No matches found.
+reset=Reset
+showingFrom=Showing
+showingTo=to
+showingOf=of
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage_it.properties
new file mode 100644
index 0000000..1d4f230
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage_it.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+search=Cerca
+search_error=Errore:il formato di ricerca non \u00e8 valido
+search_noResults=Nessuna corrispondenza trovata.
+reset=Reset
+showingFrom=Risultati da
+showingTo=a
+showingOf=di
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage_pt_BR.properties
new file mode 100644
index 0000000..28ef869
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage_pt_BR.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+search=Senha
+search_error=Erro\: formato de busca incorreto.
+search_noResults=Nenhum resultado encontrado.
+reset=Resetar
+showingFrom=Mostrando
+showingTo=para
+showingOf=de
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users.html
new file mode 100644
index 0000000..e302ea1
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users.html
@@ -0,0 +1,72 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected">
+ <a href="#tabs-1">
+ <span><wicket:message key="tab1"/>
+ </span>
+ </a>
+ </li>
+ <li>
+ <a href="#tabs-2">
+ <span><wicket:message key="tab2"/>
+ </span>
+ </a>
+ </li>
+ </ul>
+
+ <div id="tabs-1">
+ <div id="users-contain" class="ui-widget" style="width:auto">
+ <span wicket:id="listResult"> [search result] </span>
+ <div wicket:id="editModal" ></div>
+ </div>
+
+ <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="createLink">
+ <wicket:message key="create"/>
+ </a>
+ </div>
+
+ <div id="tabs-2">
+ <div>
+ <form wicket:id="searchForm">
+ <span wicket:id="searchPanel">searchPanel</span>
+
+ <br/>
+ <a wicket:id="search"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
+ <img src="img/search.png" alt="search"/>
+ <wicket:message key="search"/>
+ </a>
+ </form>
+ </div>
+
+ <div id="users-contain" class="ui-widget" style="width:auto">
+ <span wicket:id="searchResult">[search result]</span>
+ </div>
+ </div>
+
+ </div>
+
+ <wicket:child/>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users.properties
new file mode 100644
index 0000000..8ad9ae6
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=List
+tab2=Search
+search=Search
+search_results_title=Search results:
+search_noResults=No matches found.
+search_error=Error:search's format is invalid
+reset=Reset
+showingFrom=Showing
+showingTo=to
+showingOf=of
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users_it.properties
new file mode 100644
index 0000000..708bfed
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users_it.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Elenco
+tab2=Ricerca
+search=Cerca
+search_results_title=Risultati ricerca:
+search_noResults=Nessuna corrispondenza trovata.
+search_error=Errore:il formato di ricerca non \u00e8 valido
+reset=Reset
+showingFrom=Risultati da
+showingTo=a
+showingOf=di
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users_pt_BR.properties
new file mode 100644
index 0000000..7ab1053
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Users_pt_BR.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Lista
+tab2=Buscar
+search=Buscar
+search_results_title=Resultados de pesquisa\:
+search_noResults=Nenhum resultado encontrado
+search_error=Erro\: formato de busca incorreto.
+reset=Resetar
+showingFrom=Mostrar
+showingTo=para
+showingOf=de
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage.html
new file mode 100644
index 0000000..3adea45
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage.html
@@ -0,0 +1,53 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title" /></p>
+ <div style="margin: 5px;">
+ <form wicket:id="form">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="key"><wicket:message key="key"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="key">[name]</span>
+ </div>
+ </div>
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="readonly" class="onerowlabel"><wicket:message key="readonly"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="readonly">[readonly]</span>
+ </div>
+ </div>
+ </div>
+ <div style="margin: 10px 0px 0">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage.properties
new file mode 100644
index 0000000..ef0cb6a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=All form fields are required.
+existing_schemas=Existing Schemas:
+edit_attribute=Edit attribute
+attributes=Virtual attributes
+title=Virtual Schema
+readonly=Read-only
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage_it.properties
new file mode 100644
index 0000000..21c2d3c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage_it.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=Tutti i campi sono richiesti.
+existing_schemas=Schemi presenti:
+edit_attribute=Modifica attributo
+attributes=Attributi virtuali
+title=Schema Virtuale
+readonly=Read-only
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage_pt_BR.properties
new file mode 100644
index 0000000..1d0de8a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/VirSchemaModalPage_pt_BR.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=Todos os campos do formul\u00e1rio s\u00e3o obrigat\u00f3rios
+existing_schemas=Esquemas Existentes\:
+edit_attribute=Editar Atributo
+attributes=Atributos Virtuais
+title=Esquema Virtual
+readonly=Apenas Leitura
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage.html
new file mode 100644
index 0000000..4e0e5a0
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage.html
@@ -0,0 +1,70 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+
+ <title>Apache Syncope - <wicket:message key="welcome"/></title>
+
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="all"/>
+ <style type="text/css">
+ em {
+ font-size: 14px;
+ color: gray;
+ }
+ em img {
+ opacity:0.4;
+ filter:alpha(opacity=40);
+ }
+ </style>
+ </head>
+ <body style="text-align:center">
+ <div id="splash">
+ <img src="img/logo.png" alt="syncope" title="syncope" id="logo" />
+ <div style="display: table-row;height: 20px;">
+ <div id="username" style="display: table-cell; padding-left: 5px; cursor: pointer; width: 100%;vertical-align: bottom;">
+ <a href="#" wicket:id="editProfileLink" style="font-family: monospace;">
+ <span style="color: #B9CFB3;"><wicket:message key="welcome"/>,
+ <span wicket:id="username" style="color: #B9CFB3;text-decoration: underline;"/>
+ </span>
+ </a>
+ </div>
+ <div style="display: table-cell; padding-right: 5px;vertical-align: bottom;">
+ <div wicket:id="infoModal"/>
+ <a wicket:id="infoLink"><img src="img/info.png" alt="info"/></a>
+ </div>
+ </div>
+ <ul>
+ <li><a href="#" wicket:id="todo" class="todo"><img wicket:id="todoIcon" alt="TODO" width="80" height="80" /><br /><wicket:message key="todo"/></a></li>
+ <li><a href="#" wicket:id="schema" class="schema"><img wicket:id="schemaIcon" alt="Schema" width="80" height="80" /><br /><wicket:message key="schema"/></a></li>
+ <li><a href="#" wicket:id="users" class="users"><img wicket:id="usersIcon" alt="Users" width="80" height="80" /><br /><wicket:message key="users"/></a></li>
+ <li><a href="#" wicket:id="roles" class="roles"><img wicket:id="rolesIcon" alt="Roles" width="80" height="80" /><br /><wicket:message key="roles"/></a></li>
+ <li><a href="#" wicket:id="resources" class="resources"><img wicket:id="resourcesIcon" alt="Resources" width="80" height="80" /><br /><wicket:message key="resources"/></a></li>
+ <li><a href="#" wicket:id="tasks" class="tasks"><img wicket:id="tasksIcon" alt="Tasks" width="80" height="80" /><br /><wicket:message key="tasks"/></a></li>
+ <li><a href="#" wicket:id="reports" class="reports"><img wicket:id="reportsIcon" alt="Reports" width="80" height="80" /><br /><wicket:message key="reports"/></a></li>
+ <li><a href="#" wicket:id="configuration" class="configuration"><img wicket:id="configurationIcon" alt="Configuration" width="80" height="80" /><br /><wicket:message key="configuration"/></a></li>
+ <li><a href="#" wicket:id="logout" class="logout"><img src="img/menu/logout.png" alt="Logout" width="80" height="80" /><br /><wicket:message key="logout"/></a></li>
+ </ul>
+ </div>
+ <div wicket:id="editProfileModal"></div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage.properties
new file mode 100644
index 0000000..f08be49
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+welcome=Welcome
+version=VERSION
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage_it.properties
new file mode 100644
index 0000000..2499ae4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage_it.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+welcome=Benvenuto
+version=VERSIONE
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage_pt_BR.properties
new file mode 100644
index 0000000..c22a518
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/WelcomePage_pt_BR.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+welcome=Bem Vindo
+version=VERS\u00C3O
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.html
new file mode 100644
index 0000000..07aba41
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.html
@@ -0,0 +1,82 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <link rel="stylesheet" type="text/css" href="webjars/codemirror/${codemirror.version}/lib/codemirror.css"/>
+
+ <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/lib/codemirror.js"></script>
+ <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/mode/xml/xml.js"></script>
+ <script type="text/javascript">
+ function updateTextArea(editor) {
+ document.getElementById("workflowDefArea").value = editor.getValue();
+ }
+ </script>
+ <script>
+ window.onunload = refreshParent;
+ function refreshParent() {
+ if (window.opener.location.toString().indexOf('#workflow') === -1) {
+ window.opener.location = window.opener.location + "#workflow";
+ }
+ window.opener.location.reload();
+ }
+ </script>
+ <style>
+ .w_content_3 {
+ padding: 0;
+ color: #333333;
+ font-family: Verdana,Tahoma,sans-serif;
+ font-size: 100%;
+ border: 1px solid #BBBBBB;
+ padding: 1%;
+ }
+ </style>
+ </wicket:head>
+ <wicket:extend>
+ <div style="padding: 1%;">
+ <div class="w_content_3">
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <wicket:message key="title"/>
+ </p>
+ <form wicket:id="workflowDefForm">
+ <div class="ui-tabs ui-widget ui-widget-content ui-corner-all">
+ <textarea wicket:id="workflowDefArea" id="workflowDefArea" style="width: 100%; height: 350px;">
+ </textarea>
+ </div>
+ <div style="padding-top: 1%;">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"
+ style="width: 50px"/>
+ <input type="submit"
+ wicket:id="closePage"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ onclick="window.close();"
+ style="width: 50px"/>
+ </div>
+ </form>
+ </div>
+ </div>
+ <script>
+ window.onload = function() {
+ var editor = CodeMirror.fromTextArea(document.getElementById("workflowDefArea"), {lineNumbers: true});
+ editor.on("change", updateTextArea);
+ };
+ </script>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.properties
new file mode 100644
index 0000000..2276791
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+submit=Save
+cancel=Close
+title=Workflow XML Editor
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_it.properties
new file mode 100644
index 0000000..818dfb4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_it.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+submit=Salva
+cancel=Chiudi
+title=Workflow XML Editor
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_pt_BR.properties
new file mode 100644
index 0000000..4152188
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage_pt_BR.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+submit=Salvar
+cancel=Fechar
+title=Workflow XML Editor
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractProvisioningTasksPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractProvisioningTasksPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractProvisioningTasksPanel.html
new file mode 100644
index 0000000..cbe6296
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractProvisioningTasksPanel.html
@@ -0,0 +1,41 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div id="users-contain" class="ui-widget" style="width:auto">
+ <span wicket:id="container">
+ <span wicket:id="datatable">[datatable]</span>
+ <span style="float:right">
+ <form wicket:id="PaginatorForm" style="display:inline">
+ <label><wicket:message key="displayRows"/></label>
+ <select class="text ui-widget-content ui-corner-all"
+ wicket:id="rowsChooser"/>
+ </form>
+ </span>
+ </span>
+ </div>
+ <div wicket:id="taskWin">
+ [Show modal window for viewing task]
+ </div>
+ <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="createLink">
+ <wicket:message key="create"/>
+ </a>
+ </wicket:panel>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchPanel.html
new file mode 100644
index 0000000..a2af697
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchPanel.html
@@ -0,0 +1,50 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div id="searchBox">
+ <div wicket:id="searchFeedback"></div>
+ <table border="0">
+ <tbody wicket:id="searchFormContainer">
+ <tr wicket:id="searchView">
+ <td width="60">
+ <select class="text ui-widget-content ui-corner-all" wicket:id="operator"/>
+ </td>
+ <td>
+ <select class="text ui-widget-content ui-corner-all" wicket:id="type"/>
+ </td>
+ <td>
+ <select class="text ui-widget-content ui-corner-all" wicket:id="property"/>
+ </td>
+ <td>
+ <select class="text ui-widget-content ui-corner-all" wicket:id="comparator"/>
+ </td>
+ <td>
+ <input type="text" class="text ui-widget-content ui-corner-all" wicket:id="value"/>
+ </td>
+ <td>
+ <a wicket:id="add"><img src="img/plus-icon.png" alt="add icon" class="add_button"/></a>
+ <a wicket:id="drop"><img src="img/minus-icon.png" alt="remove icon" class="drop_button"/></a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html
new file mode 100644
index 0000000..487165b
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html
@@ -0,0 +1,43 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+
+ <div wicket:id="container">
+ <span wicket:id="resultTable">[Table]</span>
+
+ <span style="float:right">
+ <form wicket:id="paginator" style="display:inline">
+ <label><wicket:message key="displayRows"/></label>
+ <select class="text ui-widget-content ui-corner-all" wicket:id="rowsChooser"/>
+ </form>
+ </span>
+ </div>
+
+ <div wicket:id="editModal">
+ </div>
+
+ <div wicket:id="displayModal">
+ </div>
+
+ <div wicket:id="statusModal">
+ </div>
+
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.properties
new file mode 100644
index 0000000..6f016a4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.properties
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+displayRows=Display rows
+
+firstname=Firstname
+surname=Surname
+userId=User Id
+edit=Edit
+delete=Delete
+id=Id
+status=Status
+token=Token
+username=Username
+creationDate=Creation Date
+tokenValued=Valued
+tokenNotValued=Not valued
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_it.properties
new file mode 100644
index 0000000..02b3b57
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_it.properties
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+displayRows=display rows
+
+firstname=Nome
+surname=Cognome
+userId=User Id
+edit=Edit
+delete=Rimuovi
+id=Id
+status=Stato
+token=Token
+username=Username
+creationDate=Data Creazione
+tokenValued=Valued
+tokenNotValued=Not valued
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_pt_BR.properties
new file mode 100644
index 0000000..1591edc
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_pt_BR.properties
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+displayRows=Mostrar linhas
+
+firstname=Nome
+surname=Sobrenome
+userId=Identificador do Usu\u00E1rio
+edit=Alterar
+delete=Excluir
+id=Identificador
+status=Estatus
+token=Token
+username=Nome de Usu\u00E1rio
+creationDate=Data de Cria\u00E7\u00E3o
+tokenValued=Atribu\u00EDdo
+tokenNotValued=N\u00E3o Atribu\u00EDdo
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel.html
new file mode 100644
index 0000000..5e0fe54
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel.html
@@ -0,0 +1,67 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+
+ <div class="infoleft">
+ <div class="infolabel">
+ <wicket:message key="lastLoginDate"/>:
+ </div>
+ <div>
+ <span wicket:id="lastLoginDate"/>
+ </div>
+ </div>
+
+ <div class="inforight">
+ <div class="infolabel">
+ <wicket:message key="failedLogins"/>:
+ </div>
+ <div>
+ <span wicket:id="failedLogins"/>
+ </div>
+ </div>
+
+ <div class="infoleft">
+ <div class="infolabel">
+ <wicket:message key="changePwdDate"/>:
+ </div>
+ <div>
+ <span wicket:id="changePwdDate"/>
+ </div>
+ </div>
+
+ <div class="inforight">
+ <div class="infolabel">
+ <wicket:message key="tokenExpireTime"/>
+ </div>
+ <div>
+ <span wicket:id="tokenExpireTime"/>
+ </div>
+ </div>
+
+ <div class="inforow">
+ <div class="infolabel">
+ <wicket:message key="token"/>:
+ </div>
+ <div style="word-wrap: break-word; width: 550px; margin-left: 155px;">
+ <span wicket:id="token"/>
+ </div>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel.properties
new file mode 100644
index 0000000..799c968
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+changePwdDate=Last Change Password Date
+lastLoginDate=Last Login Data
+failedLogins=Subsequent Failed Logins
+token=Token
+tokenExpireTime=Token Expire Time
+confirmPassword=Password (confirm)
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel_it.properties
new file mode 100644
index 0000000..844a0c3
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel_it.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+creationDate=Data Di Creazione
+changePwdDate=Data Ultimo Cambio Password
+lastLoginDate=Data Di Ultimo Login
+failedLogins=Login Consecutivi Falliti
+token=Token
+tokenExpireTime=Scadenza Token
+confirmPassword=Password (conferma)
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel_pt_BR.properties
new file mode 100644
index 0000000..27e99f5
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccountInformationPanel_pt_BR.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+creationDate=Data de Cria\u00E7\u00E3o
+changePwdDate=Data da \u00DAltima Troca de Senha
+lastLoginDate=Data do \u00DAltimo Login
+failedLogins=Falhas Subsequentes de Logins
+token=Token
+tokenExpireTime=Tempo de Expira\u00E7\u00E3o do Token
+confirmPassword=Senha (confirmar)
[49/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSRootDseServlet.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSRootDseServlet.java b/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSRootDseServlet.java
deleted file mode 100644
index dd06e47..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSRootDseServlet.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.buildtools;
-
-import java.io.PrintWriter;
-import java.util.Hashtable;
-import javax.naming.Context;
-import javax.naming.NamingEnumeration;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.jndi.CoreContextFactory;
-
-public class ApacheDSRootDseServlet extends HttpServlet {
-
- private static final long serialVersionUID = 1514567335969002735L;
-
- @Override
- protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException {
-
- try {
- resp.setContentType("text/plain");
- PrintWriter out = resp.getWriter();
-
- out.println("*** ApacheDS RootDSE ***\n");
-
- DirContext ctx = new InitialDirContext(this.createEnv());
-
- SearchControls ctls = new SearchControls();
- ctls.setReturningAttributes(new String[] { "*", "+" });
- ctls.setSearchScope(SearchControls.OBJECT_SCOPE);
-
- NamingEnumeration<SearchResult> result = ctx.search("", "(objectClass=*)", ctls);
- if (result.hasMore()) {
- SearchResult entry = result.next();
- Attributes as = entry.getAttributes();
-
- NamingEnumeration<String> ids = as.getIDs();
- while (ids.hasMore()) {
- String id = ids.next();
- Attribute attr = as.get(id);
- for (int i = 0; i < attr.size(); ++i) {
- out.println(id + ": " + attr.get(i));
- }
- }
- }
- ctx.close();
-
- out.flush();
- } catch (Exception e) {
- throw new ServletException(e);
- }
- }
-
- /**
- * Creates an environment configuration for JNDI access.
- */
- private Hashtable<Object, Object> createEnv() {
- // Fetch directory service from servlet context
- ServletContext servletContext = this.getServletContext();
- DirectoryService directoryService = (DirectoryService) servletContext.getAttribute(DirectoryService.JNDI_KEY);
-
- Hashtable<Object, Object> env = new Hashtable<Object, Object>();
- env.put(DirectoryService.JNDI_KEY, directoryService);
- env.put(Context.PROVIDER_URL, "");
- env.put(Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName());
-
- env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
- env.put(Context.SECURITY_CREDENTIALS, "secret");
- env.put(Context.SECURITY_AUTHENTICATION, "simple");
-
- return env;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java b/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java
deleted file mode 100644
index 92e7564..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.buildtools;
-
-import java.io.File;
-import java.util.HashSet;
-import java.util.List;
-import java.util.regex.Pattern;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.DefaultDirectoryService;
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
-import org.apache.directory.server.core.partition.ldif.LdifPartition;
-import org.apache.directory.server.core.schema.SchemaPartition;
-import org.apache.directory.server.ldap.LdapServer;
-import org.apache.directory.server.protocol.shared.transport.TcpTransport;
-import org.apache.directory.server.xdbm.Index;
-import org.apache.directory.shared.ldap.entry.Entry;
-import org.apache.directory.shared.ldap.entry.ServerEntry;
-import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
-import org.apache.directory.shared.ldap.schema.loader.ldif.LdifSchemaLoader;
-import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
-import org.apache.directory.shared.ldap.schema.registries.SchemaLoader;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Start and stop an embedded ApacheDS instance alongside with Servlet Context.
- */
-public class ApacheDSStartStopListener implements ServletContextListener {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(ApacheDSStartStopListener.class);
-
- private DirectoryService service;
-
- private LdapServer server;
-
- /**
- * Initialize the schema manager and add the schema partition to directory service.
- *
- * @throws Exception if the schema LDIF files are not found on the classpath
- */
- private void initSchemaPartition(final ServletContext servletContext) throws Exception {
- final Pattern sharedLdapSchemaManagerPattern = Pattern.compile(".*apacheds-all-.*\\.jar");
- File found = null;
- for (final File jarFile : new File(servletContext.getRealPath("/WEB-INF/lib")).listFiles()) {
- if (sharedLdapSchemaManagerPattern.matcher(jarFile.getAbsolutePath()).matches()) {
- found = jarFile;
- }
- }
- if (found == null) {
- throw new RuntimeException("No apache-ds-all JAR found under WEB-INF/lib");
- }
-
- final SchemaPartition schemaPartition = service.getSchemaService().getSchemaPartition();
-
- // Init the LdifPartition
- final LdifPartition ldifPartition = new LdifPartition();
- final String workingDirectory = service.getWorkingDirectory().getPath();
- ldifPartition.setWorkingDirectory(workingDirectory + "/schema");
-
- // Extract the schema on disk (a brand new one) and load the registries
- final File schemaRepository = new File(workingDirectory, "schema");
- final SchemaLdifExtractor extractor = new JarSchemaLdifExtractor(new File(workingDirectory), found);
- extractor.extractOrCopy(true);
-
- schemaPartition.setWrappedPartition(ldifPartition);
-
- final SchemaLoader loader = new LdifSchemaLoader(schemaRepository);
- final SchemaManager schemaManager = new DefaultSchemaManager(loader);
- service.setSchemaManager(schemaManager);
-
- // Enable nis so that posixAccount and posixGroup are available
- schemaManager.enable("nis");
- // We have to load the schema now, otherwise we won't be able
- // to initialize the Partitions, as we won't be able to parse
- // and normalize their suffix DN
- schemaManager.loadAllEnabled();
-
- schemaPartition.setSchemaManager(schemaManager);
-
- final List<Throwable> errors = schemaManager.getErrors();
- if (!errors.isEmpty()) {
- throw new RuntimeException("Schema load failed : " + errors);
- }
- }
-
- /**
- * Add a new partition to the server.
- *
- * @param partitionId The partition Id
- * @param partitionDn The partition DN
- * @return The newly added partition
- * @throws Exception If the partition can't be added
- */
- private Partition addPartition(final String partitionId, final String partitionDn) throws Exception {
- // Create a new partition named 'foo'.
- final JdbmPartition partition = new JdbmPartition();
- partition.setId(partitionId);
- partition.setPartitionDir(new File(service.getWorkingDirectory(), partitionId));
- partition.setSuffix(partitionDn);
- service.addPartition(partition);
-
- return partition;
- }
-
- /**
- * Add a new set of index on the given attributes.
- *
- * @param partition The partition on which we want to add index
- * @param attrs The list of attributes to index
- */
- private void addIndex(final Partition partition, final String... attrs) {
- // Index some attributes on the apache partition
- final HashSet<Index<?, ServerEntry, Long>> indexedAttributes = new HashSet<Index<?, ServerEntry, Long>>();
- for (String attribute : attrs) {
- indexedAttributes.add(new JdbmIndex<String, ServerEntry>(attribute));
- }
-
- ((JdbmPartition) partition).setIndexedAttributes(indexedAttributes);
- }
-
- /**
- * Initialize the server. It creates the partition, adds the index, and injects the context entries for the created
- * partitions.
- *
- * @param workDir the directory to be used for storing the data
- * @param loadDefaultContent if default content should be loaded
- * @throws Exception if there were some problems while initializing
- */
- private void initDirectoryService(final ServletContext servletContext, final File workDir,
- final boolean loadDefaultContent) throws Exception {
-
- // Initialize the LDAP service
- service = new DefaultDirectoryService();
- service.setWorkingDirectory(workDir);
-
- // first load the schema
- initSchemaPartition(servletContext);
-
- // then the system partition
- // this is a MANDATORY partition
- final Partition systemPartition = addPartition("system", ServerDNConstants.SYSTEM_DN);
- service.setSystemPartition(systemPartition);
-
- // Disable the ChangeLog system
- service.getChangeLog().setEnabled(false);
- service.setDenormalizeOpAttrsEnabled(true);
-
- // Now we can create as many partitions as we need
- final Partition ispPartition = addPartition("isp", "o=isp");
- addIndex(ispPartition, "objectClass", "ou", "uid");
-
- // And start the service
- service.startup();
-
- // Finally, load content LDIF
- if (loadDefaultContent) {
- final LdifURLLoader contentLoader = new LdifURLLoader(service.getAdminSession(),
- servletContext.getResource("/WEB-INF/classes/content.ldif"));
- final int numEntries = contentLoader.execute();
- LOG.info("Successfully created {} entries", numEntries);
- }
- }
-
- /**
- * Startup ApacheDS embedded.
- *
- * @param sce ServletContext event
- */
- @Override
- public void contextInitialized(final ServletContextEvent sce) {
- File workDir = (File) sce.getServletContext().getAttribute("javax.servlet.context.tempdir");
- workDir = new File(workDir, "server-work");
-
- final boolean loadDefaultContent = !workDir.exists();
-
- if (loadDefaultContent && !workDir.mkdirs()) {
- throw new RuntimeException("Could not create " + workDir.getAbsolutePath());
- }
-
- Entry result;
- try {
- initDirectoryService(sce.getServletContext(), workDir, loadDefaultContent);
-
- server = new LdapServer();
- server.setTransports(
- new TcpTransport(Integer.valueOf(sce.getServletContext().getInitParameter("testds.port"))));
- server.setDirectoryService(service);
-
- server.start();
-
- // store directoryService in context to provide it to servlets etc.
- sce.getServletContext().setAttribute(DirectoryService.JNDI_KEY, service);
-
- result = service.getAdminSession().lookup(new DN("o=isp"));
- } catch (Exception e) {
- LOG.error("Fatal error in context init", e);
- throw new RuntimeException(e);
- }
-
- if (result == null) {
- throw new RuntimeException("Base DN not found");
- } else {
- LOG.info("ApacheDS startup completed succesfully");
- }
- }
-
- /**
- * Shutdown ApacheDS embedded.
- *
- * @param scEvent ServletContext event
- */
- @Override
- public void contextDestroyed(final ServletContextEvent scEvent) {
- try {
- if (server != null) {
- server.stop();
- }
- if (service != null) {
- service.shutdown();
- }
- } catch (Exception e) {
- LOG.error("Fatal error in context shutdown", e);
- throw new RuntimeException(e);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java b/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
deleted file mode 100644
index 9ef2d42..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.buildtools;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import org.identityconnectors.common.security.SecurityUtil;
-import org.identityconnectors.framework.impl.api.local.ThreadClassLoaderManager;
-import org.identityconnectors.framework.server.ConnectorServer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ConnIdStartStopListener implements ServletContextListener {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(ConnIdStartStopListener.class);
-
- private static final String SERVER = "ConnIdConnectorServer";
-
- /**
- * Build list of URLs from bundles available under /WEB-INF/lib
- *
- * @param ctx ServletContext needed for getting ConnId jar bundles URLs
- */
- private List<URL> getBundleURLs(final ServletContext ctx) {
- final List<URL> bundleURLs = new ArrayList<URL>();
-
- for (String bundleFile : new String[] {
- "testconnectorserver.soap.bundle",
- "testconnectorserver.db.bundle",
- "testconnectorserver.csvdir.bundle",
- "testconnectorserver.ldap.bundle"}) {
-
- URL url = null;
- try {
- url = ctx.getResource("/WEB-INF/lib/" + ctx.getInitParameter(bundleFile));
- } catch (MalformedURLException e) {
- // ignore
- }
- if (url != null) {
- bundleURLs.add(url);
- }
- }
-
- LOG.info("ConnId bundles loaded: " + bundleURLs);
-
- return bundleURLs;
- }
-
- @Override
- public void contextInitialized(final ServletContextEvent sce) {
- final ConnectorServer _server = ConnectorServer.newInstance();
-
- try {
- _server.setPort(Integer.parseInt(
- sce.getServletContext().getInitParameter("testconnectorserver.port")));
-
- _server.setBundleURLs(getBundleURLs(sce.getServletContext()));
-
- _server.setKeyHash(SecurityUtil.computeBase64SHA1Hash(
- sce.getServletContext().getInitParameter("testconnectorserver.key").toCharArray()));
-
- _server.start();
- LOG.info("ConnId connector server listening on port " + _server.getPort());
- } catch (Exception e) {
- LOG.error("Could not start ConnId connector server", e);
- }
-
- sce.getServletContext().setAttribute(SERVER, _server);
- }
-
- @Override
- public void contextDestroyed(final ServletContextEvent sce) {
- final ConnectorServer _server = (ConnectorServer) sce.getServletContext().getAttribute(SERVER);
- if (_server != null && _server.isStarted()) {
- _server.stop();
- }
- ThreadClassLoaderManager.clearInstance();
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java b/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java
deleted file mode 100644
index ce1a87f..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.buildtools;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Statement;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.sql.DataSource;
-import org.h2.tools.Server;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.jdbc.datasource.DataSourceUtils;
-import org.springframework.web.context.WebApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-
-/**
- * Utility servlet context listener managing H2 test server instance (to be used as external resource).
- */
-public class H2StartStopListener implements ServletContextListener {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(H2StartStopListener.class);
-
- private static final String H2_TESTDB = "h2TestDb";
-
- @Override
- public void contextInitialized(final ServletContextEvent sce) {
- final ServletContext context = sce.getServletContext();
-
- try {
- final Server h2TestDb = new Server();
- h2TestDb.runTool("-tcp", "-tcpDaemon", "-web", "-webDaemon",
- "-webPort", sce.getServletContext().getInitParameter("testdb.webport"));
-
- context.setAttribute(H2_TESTDB, h2TestDb);
- } catch (SQLException e) {
- LOG.error("Could not start H2 test db", e);
- }
-
- final WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context);
- final DataSource datasource = ctx.getBean(DataSource.class);
-
- Connection conn = null;
- Statement stmt = null;
- try {
- conn = DataSourceUtils.getConnection(datasource);
- stmt = conn.createStatement();
- stmt.executeUpdate("RUNSCRIPT FROM 'classpath:/testdb.sql'");
-
- LOG.info("Database successfully initialized");
- } catch (Exception e) {
- LOG.error("While loading data into testdb", e);
- } finally {
- if (stmt != null) {
- try {
- stmt.close();
- } catch (SQLException e) {
- }
- }
- if (conn != null) {
- try {
- conn.close();
- } catch (SQLException e) {
- }
- }
- DataSourceUtils.releaseConnection(conn, datasource);
- }
- }
-
- @Override
- public void contextDestroyed(final ServletContextEvent sce) {
- final ServletContext context = sce.getServletContext();
-
- final Server h2TestDb = (Server) context.getAttribute(H2_TESTDB);
- if (h2TestDb != null) {
- h2TestDb.shutdown();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/JarSchemaLdifExtractor.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/JarSchemaLdifExtractor.java b/build-tools/src/main/java/org/apache/syncope/buildtools/JarSchemaLdifExtractor.java
deleted file mode 100644
index 682954d..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/JarSchemaLdifExtractor.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.buildtools;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.regex.Pattern;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
-import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
-
-/**
- * Extracts LDIF files for the schema repository onto a destination directory,
- * from specified JAR.
- */
-public class JarSchemaLdifExtractor implements SchemaLdifExtractor {
-
- private static final String SCHEMA_SUBDIR = "schema";
-
- private boolean extracted;
-
- private final File outputDirectory;
-
- private final File schemaDirectory;
-
- private final File jarFile;
-
- /**
- * Creates an extractor which deposits files into the specified output
- * directory.
- *
- * @param outputDirectory the directory where the schema root is extracted
- * @param jarFile the JAR file
- */
- public JarSchemaLdifExtractor(final File outputDirectory, final File jarFile) throws IOException {
-
- this.outputDirectory = outputDirectory;
- this.schemaDirectory = new File(outputDirectory, SCHEMA_SUBDIR);
- this.jarFile = jarFile;
-
- if (!outputDirectory.exists() && !outputDirectory.mkdir()) {
- throw new IOException("Failed to create outputDirectory: " + outputDirectory);
- }
-
- extracted = !schemaDirectory.exists();
- }
-
- /**
- * Gets whether or not schema folder has been created or not.
- *
- * @return true if schema folder has already been extracted.
- */
- @Override
- public boolean isExtracted() {
- return extracted;
- }
-
- /**
- * Extracts the LDIF files from a Jar file.
- *
- * @param overwrite over write extracted structure if true, false otherwise
- * @throws IOException if schema already extracted and on IO errors
- */
- @Override
- public void extractOrCopy(final boolean overwrite) throws IOException {
-
- if (!outputDirectory.exists() && !outputDirectory.mkdir()) {
- throw new IOException("Could not create " + outputDirectory.getAbsolutePath());
- }
-
- if (!schemaDirectory.exists()) {
- if (!schemaDirectory.mkdir()) {
- throw new IOException("Could not create " + schemaDirectory.getAbsolutePath());
- }
- } else if (!overwrite) {
- throw new IOException(I18n.err(I18n.ERR_08001, schemaDirectory.getAbsolutePath()));
- }
-
- final Pattern pattern = Pattern.compile(".*schema/ou=schema.*\\.ldif");
- for (String entry : getResources(pattern)) {
- extractFromJar(entry);
- }
- }
-
- /**
- * Extracts the LDIF files from a Jar file or copies exploded LDIF
- * resources without overwriting the resources if the schema has
- * already been extracted.
- *
- * @throws IOException if schema already extracted and on IO errors
- */
- @Override
- public void extractOrCopy() throws IOException {
-
- extractOrCopy(false);
- }
-
- private Set<String> getResources(final Pattern pattern) throws IOException {
-
- final Set<String> result = new HashSet<String>();
-
- final ZipFile zipFile = new ZipFile(jarFile);
- final Enumeration<? extends ZipEntry> entries = zipFile.entries();
- while (entries.hasMoreElements()) {
- ZipEntry entry = entries.nextElement();
- if (pattern.matcher(entry.getName()).matches()) {
- result.add(entry.getName());
- }
- }
- zipFile.close();
-
- return result;
- }
-
- /**
- * Extracts the LDIF schema resource from a Jar.
- *
- * @param resource the LDIF schema resource
- * @throws IOException if there are IO errors
- */
- private void extractFromJar(final String resource) throws IOException {
-
- final InputStream in = DefaultSchemaLdifExtractor.getUniqueResourceAsStream(resource,
- "LDIF file in schema repository");
- try {
- final File destination = new File(outputDirectory, resource);
-
- /*
- * Do not overwrite an LDIF file if it has already been extracted.
- */
- if (destination.exists()) {
- return;
- }
-
- if (!destination.getParentFile().exists() && !destination.getParentFile().mkdirs()) {
-
- throw new IOException("Could not create " + destination.getParentFile().getAbsolutePath());
- }
-
- final FileOutputStream out = new FileOutputStream(destination);
- final byte[] buf = new byte[512];
- try {
- while (in.available() > 0) {
- final int readCount = in.read(buf);
- out.write(buf, 0, readCount);
- }
- out.flush();
- } finally {
- out.close();
- }
- } finally {
- in.close();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/LdifURLLoader.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/LdifURLLoader.java b/build-tools/src/main/java/org/apache/syncope/buildtools/LdifURLLoader.java
deleted file mode 100644
index 42b28dd..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/LdifURLLoader.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.buildtools;
-
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.List;
-import javax.naming.NamingException;
-import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.i18n.I18n;
-import org.apache.directory.shared.ldap.entry.DefaultServerEntry;
-import org.apache.directory.shared.ldap.entry.Entry;
-import org.apache.directory.shared.ldap.entry.Modification;
-import org.apache.directory.shared.ldap.ldif.LdifEntry;
-import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.name.DN;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Support for commands to load an LDIF from an URL into a DirContext.
- *
- * Inspired from <tt>org.apache.directory.server.protocol.shared.store.LdifFileLoader</tt>.
- */
-public class LdifURLLoader {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(LdifURLLoader.class);
-
- /**
- * A handle on the top core session.
- */
- protected CoreSession coreSession;
-
- /**
- * The LDIF URL.
- */
- protected URL ldif;
-
- /**
- * The total count of entries loaded.
- */
- private int count;
-
- public LdifURLLoader(final CoreSession coreSession, final URL ldif) {
- this.coreSession = coreSession;
- this.ldif = ldif;
- }
-
- /**
- * Opens the LDIF file and loads the entries into the context.
- *
- * @return The count of entries created.
- */
- public int execute() {
- DN rdn = null;
- InputStream in = null;
-
- try {
- in = ldif.openStream();
-
- for (final LdifEntry ldifEntry : new LdifReader(in)) {
- final DN dn = ldifEntry.getDn();
-
- if (ldifEntry.isEntry()) {
- final Entry entry = ldifEntry.getEntry();
- try {
- coreSession.lookup(dn);
- LOG.info("Found {}, will not create.", rdn);
- } catch (Exception e) {
- try {
- coreSession.add(new DefaultServerEntry(
- coreSession.getDirectoryService().getSchemaManager(), entry));
- count++;
- LOG.info("Created {}.", rdn);
- } catch (NamingException ne) {
- LOG.info("Could not create entry {}", entry, ne);
- }
- }
- } else {
- //modify
- final List<Modification> items = ldifEntry.getModificationItems();
- try {
- coreSession.modify(dn, items);
- LOG.info("Modified: " + dn + " with modificationItems: " + items);
- } catch (NamingException e) {
- LOG.info("Could not modify: " + dn + " with modificationItems: " + items, e);
- }
- }
- }
- } catch (FileNotFoundException fnfe) {
- LOG.error(I18n.err(I18n.ERR_173));
- } catch (Exception ioe) {
- LOG.error(I18n.err(I18n.ERR_174), ioe);
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (Exception e) {
- LOG.error(I18n.err(I18n.ERR_175), e);
- }
- }
- }
-
- return count;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/java/org/apache/syncope/buildtools/ServiceTimeoutServlet.java
----------------------------------------------------------------------
diff --git a/build-tools/src/main/java/org/apache/syncope/buildtools/ServiceTimeoutServlet.java b/build-tools/src/main/java/org/apache/syncope/buildtools/ServiceTimeoutServlet.java
deleted file mode 100644
index f1b690a..0000000
--- a/build-tools/src/main/java/org/apache/syncope/buildtools/ServiceTimeoutServlet.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.buildtools;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Just used to verify a connector request timeout.
- */
-public class ServiceTimeoutServlet extends HttpServlet {
-
- private static final long serialVersionUID = -1467488672392710293L;
-
- /**
- * Processes requests for both HTTP
- * <code>GET</code> and
- * <code>POST</code> methods.
- *
- * @param request servlet request
- * @param response servlet response
- * @throws ServletException if a servlet-specific error occurs
- * @throws IOException if an I/O error occurs
- */
- protected void processRequest(final HttpServletRequest request, final HttpServletResponse response)
- throws ServletException, IOException {
-
- response.setContentType("text/html;charset=UTF-8");
-
- try {
- Thread.sleep(60000);
- } catch (InterruptedException ignore) {
- // ignore
- }
-
- final PrintWriter out = response.getWriter();
- try {
- out.println("OK");
- } finally {
- out.close();
- }
- }
-
- /**
- * Handles the HTTP
- * <code>GET</code> method.
- *
- * @param request servlet request
- * @param response servlet response
- * @throws ServletException if a servlet-specific error occurs
- * @throws IOException if an I/O error occurs
- */
- @Override
- protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
- throws ServletException, IOException {
-
- processRequest(request, response);
- }
-
- /**
- * Handles the HTTP
- * <code>POST</code> method.
- *
- * @param request servlet request
- * @param response servlet response
- * @throws ServletException if a servlet-specific error occurs
- * @throws IOException if an I/O error occurs
- */
- @Override
- protected void doPost(final HttpServletRequest request, final HttpServletResponse response)
- throws ServletException, IOException {
-
- processRequest(request, response);
- }
-
- /**
- * Returns a short description of the servlet.
- *
- * @return a String containing servlet description
- */
- @Override
- public String getServletInfo() {
- return "Service Timeout";
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/resources/applicationContext.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/applicationContext.xml b/build-tools/src/main/resources/applicationContext.xml
deleted file mode 100644
index d89e067..0000000
--- a/build-tools/src/main/resources/applicationContext.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <bean id="testDataSource"
- class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <property name="driverClassName" value="${testdb.driver}"/>
- <property name="url" value="${testdb.url}"/>
- <property name="username" value="${testdb.username}"/>
- <property name="password" value="${testdb.password}"/>
- </bean>
-
-</beans>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/resources/content.ldif
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/content.ldif b/build-tools/src/main/resources/content.ldif
deleted file mode 100644
index aa47af5..0000000
--- a/build-tools/src/main/resources/content.ldif
+++ /dev/null
@@ -1,57 +0,0 @@
-# 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.
-DN: o=isp
-objectClass: organization
-objectClass: top
-o: isp
-
-DN: ou=People,o=isp
-objectClass: organizationalUnit
-objectClass: top
-ou: People
-
-DN: ou=Groups,o=isp
-objectClass: organizationalUnit
-objectClass: top
-ou: Groups
-
-DN: cn=testLDAPGroup,ou=Groups,o=isp
-objectClass: groupOfUniqueNames
-objectClass: top
-cn: testLDAPGroup
-uniqueMember: uid=admin,ou=system
-uniqueMember: uid=syncFromLDAP,ou=People,o=isp
-owner: uid=syncFromLDAP,ou=People,o=isp
-
-DN: uid=syncFromLDAP,ou=People,o=isp
-objectClass: organizationalPerson
-objectClass: person
-objectClass: inetOrgPerson
-objectClass: top
-cn: syncFromLDAP
-description: Active
-mail: syncFromLDAP@syncope.apache.org
-sn: Surname
-uid: syncFromLDAP
-userpassword:: cGFzc3dvcmQxMjM=
-givenname: syncFromLDAP
-registeredAddress: 5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8
-jpegPhoto:: /9j/4AAQSkZJRgABAQEBKwErAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoH
- BwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQk
- UDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wg
- ARCAAEAAQDAREAAhEBAxEB/8QAFAABAAAAAAAAAAAAAAAAAAAACP/EABQBAQAAAAAAAAAAAAAAA
- AAAAAD/2gAMAwEAAhADEAAAAUuf/8QAFhABAQEAAAAAAAAAAAAAAAAAAwAS/9oACAEBAAEFAiLV
- /8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPwF//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/
- aAAgBAgEBPwF//8QAGhAAAQUBAAAAAAAAAAAAAAAAAgABESEiQf/aAAgBAQAGPwI9k2orq//EAB
- kQAAMAAwAAAAAAAAAAAAAAAAERIQBBYf/aAAgBAQABPyF20CYlpT3P/9oADAMBAAIAAwAAABCf/
- 8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPxB//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/a
- AAgBAgEBPxB//8QAGhABAAIDAQAAAAAAAAAAAAAAAREhAEFRYf/aAAgBAQABPxCUKGDcAUFrvhoz/9k=
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/log4j.xml b/build-tools/src/main/resources/log4j.xml
deleted file mode 100644
index c0aec05..0000000
--- a/build-tools/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
-
--->
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" >
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
- <appender name="stdout" class="org.apache.log4j.ConsoleAppender">
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} %-5p [%C.%M():%L] %m%n"/>
- </layout>
- </appender>
-
- <category name="org.apache.directory">
- <level value="off"/>
- </category>
-
- <root>
- <priority value="info"/>
- <appender-ref ref="stdout"/>
- </root>
-</log4j:configuration>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/resources/org/apache/syncope/checkstyle.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/org/apache/syncope/checkstyle.xml b/build-tools/src/main/resources/org/apache/syncope/checkstyle.xml
deleted file mode 100644
index ed27f91..0000000
--- a/build-tools/src/main/resources/org/apache/syncope/checkstyle.xml
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
-
--->
-<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
-"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
-<!--
-
- Checkstyle configuration that checks the sun coding conventions from:
-
- - the Java Language Specification at
- http://java.sun.com/docs/books/jls/second_edition/html/index.html
-
- - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
-
- - the Javadoc guidelines at
- http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
-
- - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
-
- - some best practices
-
- Checkstyle is very configurable. Be sure to read the documentation at
- http://checkstyle.sf.net (or in your downloaded distribution).
-
- Most Checks are configurable, be sure to consult the documentation.
-
- To completely disable a check, just comment it out or delete it from the file.
-
- Finally, it is worth reading the documentation.
-
--->
-<module name="Checker">
- <!--
- If you set the basedir property below, then all reported file
- names will be relative to the specified directory. See
- http://checkstyle.sourceforge.net/5.x/config.html#Checker
-
- <property name="basedir" value="${basedir}"/>
- -->
-
- <!-- Checks that a package-info.java file exists for each package. -->
- <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
- <module name="JavadocPackage"/>
-
- <!-- Checks whether files end with a new line. -->
- <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
- <module name="NewlineAtEndOfFile"/>
-
- <!-- Checks that property files contain the same keys. -->
- <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
- <module name="Translation"/>
-
- <!-- Checks for Size Violations. -->
- <!-- See http://checkstyle.sf.net/config_sizes.html -->
- <module name="FileLength"/>
-
- <!-- Checks for whitespace -->
- <!-- See http://checkstyle.sf.net/config_whitespace.html -->
- <module name="FileTabCharacter"/>
-
- <!-- Miscellaneous other checks. -->
- <!-- See http://checkstyle.sf.net/config_misc.html -->
- <module name="RegexpSingleline">
- <property name="format" value="\s+$"/>
- <property name="minimum" value="0"/>
- <property name="maximum" value="2"/>
- <property name="message" value="Line has trailing spaces."/>
- </module>
-
- <module name="TreeWalker">
-
- <property name="cacheFile" value="target/checkstyle.cache"/>
-
- <!-- Checks for Javadoc comments. -->
- <!-- See http://checkstyle.sf.net/config_javadoc.html -->
- <module name="JavadocMethod"/>
- <module name="JavadocType"/>
- <module name="JavadocVariable"/>
- <module name="JavadocStyle"/>
-
-
- <!-- Checks for Naming Conventions. -->
- <!-- See http://checkstyle.sf.net/config_naming.html -->
- <module name="ConstantName"/>
- <module name="LocalFinalVariableName"/>
- <module name="LocalVariableName"/>
- <module name="MemberName"/>
- <module name="MethodName"/>
- <module name="PackageName"/>
- <module name="ParameterName"/>
- <module name="StaticVariableName"/>
- <module name="TypeName"/>
-
-
- <!-- Checks for Headers -->
- <!-- See http://checkstyle.sf.net/config_header.html -->
- <!-- <module name="Header"> -->
- <!-- The follow property value demonstrates the ability -->
- <!-- to have access to ANT properties. In this case it uses -->
- <!-- the ${basedir} property to allow Checkstyle to be run -->
- <!-- from any directory within a project. See property -->
- <!-- expansion, -->
- <!-- http://checkstyle.sf.net/config.html#properties -->
- <!-- <property -->
- <!-- name="headerFile" -->
- <!-- value="${basedir}/java.header"/> -->
- <!-- </module> -->
-
- <!-- Following interprets the header file as regular expressions. -->
- <!-- <module name="RegexpHeader"/> -->
-
-
- <!-- Checks for imports -->
- <!-- See http://checkstyle.sf.net/config_import.html -->
- <module name="AvoidStarImport"/>
- <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
- <module name="RedundantImport"/>
- <module name="UnusedImports"/>
-
-
- <!-- Checks for Size Violations. -->
- <!-- See http://checkstyle.sf.net/config_sizes.html -->
- <module name="LineLength">
- <property name="max" value="120"/>
- <property name="ignorePattern" value="^import"/>
- </module>
- <module name="MethodLength"/>
- <module name="ParameterNumber"/>
-
-
- <!-- Checks for whitespace -->
- <!-- See http://checkstyle.sf.net/config_whitespace.html -->
- <module name="EmptyForIteratorPad"/>
- <module name="GenericWhitespace"/>
- <module name="MethodParamPad"/>
- <!--<module name="NoWhitespaceAfter"/>
- <module name="NoWhitespaceBefore"/>-->
- <module name="OperatorWrap"/>
- <module name="ParenPad"/>
- <module name="TypecastParenPad"/>
- <module name="WhitespaceAfter"/>
- <module name="WhitespaceAround"/>
-
-
- <!-- Modifier Checks -->
- <!-- See http://checkstyle.sf.net/config_modifiers.html -->
- <module name="ModifierOrder"/>
- <module name="RedundantModifier"/>
-
-
- <!-- Checks for blocks. You know, those {}'s -->
- <!-- See http://checkstyle.sf.net/config_blocks.html -->
- <module name="AvoidNestedBlocks"/>
- <module name="EmptyBlock"/>
- <module name="LeftCurly"/>
- <module name="NeedBraces"/>
- <module name="RightCurly"/>
-
-
- <!-- Checks for common coding problems -->
- <!-- See http://checkstyle.sf.net/config_coding.html -->
-<!-- <module name="AvoidInlineConditionals"/>-->
- <!--module name="DoubleCheckedLocking"/--> <!-- MY FAVOURITE -->
- <module name="EmptyStatement"/>
- <module name="EqualsHashCode"/>
- <module name="HiddenField">
- <property name="ignoreSetter" value="true"/>
- <property name="ignoreConstructorParameter" value="true"/>
- </module>
- <module name="IllegalInstantiation"/>
- <module name="InnerAssignment"/>
- <!--<module name="MagicNumber"/>-->
- <module name="MissingSwitchDefault"/>
- <module name="RedundantThrows"/>
- <module name="SimplifyBooleanExpression"/>
- <module name="SimplifyBooleanReturn"/>
-
- <!-- Checks for class design -->
- <!-- See http://checkstyle.sf.net/config_design.html -->
- <!--<module name="DesignForExtension"/>-->
- <module name="FinalClass"/>
- <module name="HideUtilityClassConstructor"/>
- <module name="InterfaceIsType"/>
- <module name="VisibilityModifier">
- <property name="protectedAllowed" value="true"/>
- </module>
-
-
- <!-- Miscellaneous other checks. -->
- <!-- See http://checkstyle.sf.net/config_misc.html -->
- <module name="ArrayTypeStyle"/>
- <module name="FinalParameters"/>
- <module name="TodoComment"/>
- <module name="UpperEll"/>
-
- </module>
-
-</module>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/build-tools/src/main/resources/org/apache/syncope/java-formatter.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/org/apache/syncope/java-formatter.xml b/build-tools/src/main/resources/org/apache/syncope/java-formatter.xml
deleted file mode 100644
index d491f7f..0000000
--- a/build-tools/src/main/resources/org/apache/syncope/java-formatter.xml
+++ /dev/null
@@ -1,310 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
-
--->
-<profiles version="12">
- <profile kind="CodeFormatterProfile" name="Syncope" version="12">
- <setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="49"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
- <setting id="org.eclipse.jdt.core.compiler.source" value="1.7"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
- <setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
- <setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="32"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
- <setting id="org.eclipse.jdt.core.compiler.compliance" value="1.7"/>
- <setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="48"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="48"/>
- <setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="32"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
- <setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.7"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="120"/>
- <setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="16"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="49"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
- <setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
- <setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
- <setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
- </profile>
-</profiles>
[24/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage_pt_BR.properties
new file mode 100644
index 0000000..fd54adc
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage_pt_BR.properties
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Perfil
+executions=Execu\u00E7\u00F5es
+title=Tarefas
+accountId=Identificador de Conta
+resource=Recurso
+startDate=Data Inicial
+endDate=Data final
+status=Estatus
+message=Mensagem
+taskExecutions=Execu\u00E7\u00E3o de Tarefas
+delete=Excluir
+showMessage=Mostrar
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage.html
new file mode 100644
index 0000000..37047cc
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage.html
@@ -0,0 +1,228 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div style="margin: 5px;">
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+
+ <form wicket:id="form">
+
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#profile"><span><wicket:message key="profile"/></span></a></li>
+ <li><a href="#crontab"><span><wicket:message key="crontab"/></span></a></li>
+ <li><a href="#executions"><span><wicket:message key="executions"/></span></a></li>
+ </ul>
+ <div id="profile">
+ <div class="ui-widget">
+ <span wicket:id="profile">
+ <div id="formtable">
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <span wicket:id="idLabel">[Id]</span>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="key">[key]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="name"><wicket:message key="name"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="name">[name]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="description"><wicket:message key="description"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="description">[description]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="resource"><wicket:message key="resourceName"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="resource">[resource]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="lastExec"><wicket:message key="lastExec"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="lastExec">[lastExec]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="nextExec"><wicket:message key="nextExec"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="nextExec">[nextExec]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="actionsClassNames"><wicket:message key="actionsClasses"/></label>
+ </div>
+ <span wicket:id="syncActionsClassNames">
+ <span wicket:id="actionsClasses">
+ <select class="text ui-widget-content ui-corner-all" wicket:id="actionsClass"/>
+ <a wicket:id="drop"><img src="img/minus-icon.png" alt="remove icon" class="drop_button"/></a>
+ <a wicket:id="add"><img src="img/plus-icon.png" alt="add icon" class="add_button"/></a>
+ <br/>
+ </span>
+ <a wicket:id="first"><img src="img/plus-icon.png" alt="add icon" class="add_button"/></a>
+ </span>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="performCreate"><wicket:message key="creates"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="performCreate">[performCreate]</span>
+ </div>
+ </div>
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="performUpdate"><wicket:message key="updates"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="performUpdate">[performUpdate]</span>
+ </div>
+ </div>
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="performDelete"><wicket:message key="deletes"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="performDelete">[performDelete]</span>
+ </div>
+ </div>
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="syncStatus"><wicket:message key="syncStatus"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="syncStatus">[syncStatus]</span>
+ </div>
+ </div>
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="matchingRule"><wicket:message key="matchingRule"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="matchingRule">[matchingRule]</span>
+ </div>
+ </div>
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="unmatchingRule"><wicket:message key="unmatchingRule"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="unmatchingRule">[unmatchingRule]</span>
+ </div>
+ </div>
+ <div id="filters">
+ <span wicket:id="filterContainer">
+ <div class="tablerow" style="width: auto;">
+ <div class="tablecolumn_field" style="width: auto; padding-right: 5px;">
+ <span wicket:id="checkUserFilter">[checkUserFilter]</span>
+ </div>
+ <div class="tablecolumn_label" style="width: auto;">
+ <label for="checkUserFilter"><wicket:message key="checkUserFilter"/></label>
+ </div>
+ </div>
+
+ <div id="userFilter" style="border: 1px solid #dddddd; padding-bottom: 2%; padding-top: 2%;">
+ <div id="condition">
+ <span wicket:id="userFilter"/>
+ </div>
+ </div>
+ <div class="tablerow" style="width: auto;">
+ <div class="tablecolumn_field" style="width: auto; padding-right: 5px;">
+ <span wicket:id="checkRoleFilter">[checkRoleFilter]</span>
+ </div>
+ <div class="tablecolumn_label" style="width: auto;">
+ <label for="checkRoleFilter"><wicket:message key="checkRoleFilter"/></label>
+ </div>
+ </div>
+ <div id="roleFilter" style="border: 1px solid #dddddd; padding-bottom: 2%; padding-top: 2%;">
+ <div id="condition">
+ <span wicket:id="roleFilter"/>
+ </div>
+ </div>
+ </span>
+ </div>
+ <wicket:child/>
+ </div>
+ </span>
+ </div>
+ </div>
+ <div id="crontab">
+ <span wicket:id="crontab">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <label for="cron"><wicket:message key="cron"/></label>
+ </div>
+ <div class="tablerow">
+ <input type="text" id="seconds" class="text ui-widget-content ui-corner-all" wicket:id="seconds" style="width: 50px;float: left" />
+ <input type="text" id="minutes" class="text ui-widget-content ui-corner-all" wicket:id="minutes" style="width: 50px;float: left" />
+ <input type="text" id="hours" class="text ui-widget-content ui-corner-all" wicket:id="hours" style="width: 50px;float: left" />
+ <input type="text" id="daysOfMonth" class="text ui-widget-content ui-corner-all" wicket:id="daysOfMonth" style="width: 50px;float: left" />
+ <input type="text" id="months" class="text ui-widget-content ui-corner-all" wicket:id="months" style="width: 50px;float: left" />
+ <input type="text" id="daysOfWeek" class="text ui-widget-content ui-corner-all" wicket:id="daysOfWeek" style="width: 50px" />
+ </div>
+ <div class="tablerow alt">
+ <label for="cronExpression"><wicket:message key="templates"/></label>
+ </div>
+ <div class="tablerow">
+ <select class="text ui-widget-content ui-corner-all" wicket:id="cronTemplateChooser" style="width: 250px"/>
+ </div>
+ </div>
+ </span>
+ </div>
+ <div id="executions" class="ui-widget">
+ <span wicket:id="executionContainer" id="executionContainer">
+ <table class="ui-widget ui-widget-content"
+ wicket:id="executionsTable" style="width: 100%"/>
+ </span>
+ </div>
+ </div>
+ <div style="margin: 20px 10px 0">
+ <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="apply"/>
+ <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ <div wicket:id="taskExecMessageWin"/>
+ </wicket:extend>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage.properties
new file mode 100644
index 0000000..4343e45
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage.properties
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Profile
+crontab=Schedule
+executions=Executions
+title=Task
+resourceName=Resource Name
+name=Name
+description=Description
+lastExec=Last Execution
+nextExec=Next Execution
+cron=Schedule (seconds, minutes, hours, days of month, months, days of week)
+templates=Remove task from scheduler / Use a template to schedule
+apply=Save
+startDate=Start date
+endDate=End date
+status=Status
+message=Message
+delete=Delete
+showMessage=Show
+chooseForTemplate=Use A Template
+creates=Allow create operations
+deletes=Allow delete operations
+updates=Allow update operations
+syncStatus=Allow status synchronization
+fullReconciliation=Full reconciliation
+actionsClasses=Actions classes
+matchingRule=Matching Rule
+unmatchingRule=Unmatching Rule
+checkUserFilter=User Filter
+checkRoleFilter=Role Filter
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage_it.properties
new file mode 100644
index 0000000..33134b2
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage_it.properties
@@ -0,0 +1,47 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Profilo
+crontab=Schedule
+executions=Esecuzioni
+title=Task
+resourceName=Nome Risorsa
+name=Nome
+description=Descrizione
+lastExec=Ultima Esecuzione
+nextExec=Prossima Esecuzione
+cron=Schedule (secondi, minuti, ore, giorni del mese, mesi, giorni della settimana)
+templates=Rimuovi task dallo scheduler / Utilizza un template per schedulare
+apply=Salva
+startDate=Data di avvio
+endDate=Data di conclusione
+status=Stato
+message=Messaggio
+delete=Rimozione
+showMessage=Mostra
+chooseForTemplate=Usa Un Template
+creates=Consenti operazioni di creazione
+deletes=Consenti operazioni di rimozione
+updates=Consenti operazioni di modifica
+syncStatus=Consenti sincronizzazione di stato
+status=Sincronizza stato utente
+fullReconciliation=Riconciliazione totale
+actionsClasses=Classi azioni
+syncStatus=Sincronizza stato utente
+matchingRule=Regola di corrispondenza
+unmatchingRule=Regola di non corrispondenza
+checkUserFilter=Filtro Utente
+checkRoleFilter=Filtero Ruolo
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage_pt_BR.properties
new file mode 100644
index 0000000..8e00512
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PushTaskModalPage_pt_BR.properties
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Perfil
+crontab=Agenda
+executions=Execu\u00e7\u00f5es
+title=Tarefas
+resourceName=Nome de Recursos
+name=Nome
+description=Descri\u00e7\u00e3o
+lastExec=\u00daltima Execu\u00e7\u00e3o
+nextExec=Pr\u00f3xima Execu\u00e7\u00e3o
+cron=Agenda (segundos, minutos, horas, dias do m\u00eas, meses, dias da semana)
+templates=Remover tarefa agendada / usar template para agendar
+apply=Salvar
+startDate=Data de In\u00edcio
+endDate=Data Final
+status=Estatus
+message=Mensagem
+delete=Excluir
+showMessage=Mostrar
+chooseForTemplate=Usar um template
+creates=Permitir opera\u00e7\u00f5es de cria\u00e7\u00e3o
+deletes=Permitir opera\u00e7\u00f5es de remo\u00e7\u00e3o
+updates=Permitir a edi\u00e7\u00e3o
+syncStatus=Permitir a sincroniza\u00e7\u00e3o de status
+fullReconciliation=Reconcilia\u00e7\u00e3o completa
+actionsClasses=Classes de a\u00e7\u00f5es
+matchingRule=Regra de correspond\u00eancia
+unmatchingRule=Regra de non correspond\u00eancia
+checkUserFilter=Filtro Usu\u00e1rio
+checkRoleFilter=Filtro Papel
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RecursivePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RecursivePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RecursivePanel.html
new file mode 100644
index 0000000..63cb904
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RecursivePanel.html
@@ -0,0 +1,28 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:panel>
+ <ul>
+ <span wicket:id="rows">
+ <li wicket:id="row">
+ <span wicket:id="label">[The label]</span>
+ </li>
+ <span wicket:id="nested"/>
+ </span>
+ </ul>
+</wicket:panel>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage.html
new file mode 100644
index 0000000..aa9cd0b
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage.html
@@ -0,0 +1,23 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:extend>
+ <div id="dialog">
+ <wicket:message key="downloadAs"/> <span wicket:id="format" class="small_dynamicsize">[format]</span>
+ </div>
+</wicket:extend>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage.properties
new file mode 100644
index 0000000..22b990a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+downloadAs=Download as
+download=Download
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage_it.properties
new file mode 100644
index 0000000..7841efe
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage_it.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+downloadAs=Scarica come
+download=Scarica
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage_pt_BR.properties
new file mode 100644
index 0000000..ba57357
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage_pt_BR.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+downloadAs=Salvar como
+download=Salvar
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage.html
new file mode 100644
index 0000000..b813b12
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage.html
@@ -0,0 +1,146 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div style="margin: 5px;">
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+ <form wicket:id="form">
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#profile"><span><wicket:message key="profile"/></span></a></li>
+ <li><a href="#crontab"><span><wicket:message key="crontab"/></span></a></li>
+ <li><a href="#executions"><span><wicket:message key="executions"/></span></a></li>
+ </ul>
+ <div id="profile">
+ <div id="users-contain" class="ui-widget">
+ <span wicket:id="profile">
+ <div id="formtable">
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <span wicket:id="idLabel">[Id]</span>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="key">[key]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <span wicket:id="nameLabel">[Name]</span>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="name">[name]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="lastExec"><wicket:message key="lastExec"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="lastExec">[lastExec]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="nextExec"><wicket:message key="nextExec"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="nextExec">[nextExec]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="reportlets"><wicket:message key="reportlets"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <div style="display: inline-table;">
+ <div id="selections" style="display: table-cell;">
+ <select wicket:id="reportletConfs" class="selectionSelect"></select>
+ </div>
+ <div id="orderingButtons" style="display: table-cell; width: 30px; vertical-align: middle; padding-left: 5px;">
+ <div style="padding-bottom: 5px;">
+ <a wicket:id="upButton"><img src="img/up-icon.png" alt="move up icon"/></a>
+ </div>
+ <div style="padding-top: 5px;">
+ <a wicket:id="downButton"><img src="img/down-icon.png" alt="move down icon"/></a>
+ </div>
+ </div>
+ </div>
+ <div id="actionButtons" style="padding-top: 5px;">
+ <div style="padding-left: 35px;float: left;">
+ <a wicket:id="addButton"><img src="img/plus-icon.png" alt="plus icon"/></a>
+ </div>
+ <div style="padding-left: 15px;float: left;">
+ <a wicket:id="editButton"><img src="img/actions/edit.png" alt="edit icon"/></a>
+ </div>
+ <div style="padding-left: 15px;float: left;">
+ <a wicket:id="removeButton"><img src="img/minus-icon.png" alt="minus icon"/></a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </span>
+ </div>
+ </div>
+ <div id="crontab">
+ <span wicket:id="crontab">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <label for="cron"><wicket:message key="cron"/></label>
+ </div>
+ <div class="tablerow">
+ <input type="text" id="seconds" class="text ui-widget-content ui-corner-all" wicket:id="seconds" style="width: 50px;float: left" />
+ <input type="text" id="minutes" class="text ui-widget-content ui-corner-all" wicket:id="minutes" style="width: 50px;float: left" />
+ <input type="text" id="hours" class="text ui-widget-content ui-corner-all" wicket:id="hours" style="width: 50px;float: left" />
+ <input type="text" id="daysOfMonth" class="text ui-widget-content ui-corner-all" wicket:id="daysOfMonth" style="width: 50px;float: left" />
+ <input type="text" id="months" class="text ui-widget-content ui-corner-all" wicket:id="months" style="width: 50px;float: left" />
+ <input type="text" id="daysOfWeek" class="text ui-widget-content ui-corner-all" wicket:id="daysOfWeek" style="width: 50px" />
+ </div>
+ <div class="tablerow alt">
+ <label for="cronExpression"><wicket:message key="templates"/></label>
+ </div>
+ <div class="tablerow">
+ <select class="text ui-widget-content ui-corner-all" wicket:id="cronTemplateChooser" style="width: 250px"/>
+ </div>
+ </div>
+ </span>
+ </div>
+ <div id="executions" class="ui-widget">
+ <span wicket:id="executionContainer" id="executionContainer">
+ <table class="ui-widget ui-widget-content"
+ wicket:id="executionsTable" style="width: 100%"/>
+ </span>
+ </div>
+ </div>
+ <div style="margin: 20px 10px 0">
+ <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="apply"/>
+ <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ <div wicket:id="reportletConfWin"/>
+ <div wicket:id="reportExecMessageWin"/>
+ <div wicket:id="reportExecExportWin"/>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage.properties
new file mode 100644
index 0000000..115fc49
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage.properties
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Profile
+crontab=Schedule
+executions=Executions
+title=Report
+lastExec=Last Execution
+nextExec=Next Execution
+cron=Schedule (seconds, minutes, hours, days of month, months, days of week)
+templates=Remove task from scheduler / Use a template to schedule
+apply=Save
+startDate=Start date
+endDate=End date
+status=Status
+message=Message
+taskExecutions=Task executions
+delete=Delete
+showMessage=Show
+chooseForTemplate=Use A Template
+reportlets=Reportlets
+create_reportletconf=Add new Reporlet
+selectItem=Please select an item first
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage_it.properties
new file mode 100644
index 0000000..fa600f6
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage_it.properties
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Profilo
+crontab=Schedule
+executions=Esecuzioni
+title=Rapporto
+lastExec=Ultima Esecuzione
+nextExec=Prossima Esecuzione
+cron=Schedule (secondi, minuti, ore, giorni del mese, mesi, giorni della settimana)
+templates=Rimuovi task dallo scheduler / Utilizza un template per schedulare
+apply=Salva
+startDate=Data di avvio
+endDate=Data di conclusione
+status=Stato
+message=Messaggio
+taskExecutions=Esecuzione del task
+delete=Rimozione
+showMessage=Mostra
+chooseForTemplate=Usa Un Template
+reportlets=Reportlets
+create_reportletconf=Aggiungi Reporlet
+selectItem=Seleziona un elemento
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage_pt_BR.properties
new file mode 100644
index 0000000..da48be6
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportModalPage_pt_BR.properties
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Perfil
+crontab=Agendamento
+executions=Execu\u00E7\u00F5es
+title=Relat\u00F3rios
+lastExec=\u00DAlitima Execu\u00E7\u00E3o
+nextExec=Pr\u00F3xima Execu\u00E7\u00E3o
+cron=Agendar (segundos, minutos, horar, dias do m\u00EAs, meses, dias da semana)
+templates=Remover tarefa da agenda / Use um template para agendar
+apply=Salvar
+startDate=Data de in\u00EDcio
+endDate=Data Final
+status=Estatus
+message=Mensagem
+taskExecutions=Execu\u00E7\u00E3o de Tarefas
+delete=Remover
+showMessage=Mostar
+chooseForTemplate=Usar um Template
+reportlets=Reportlets
+create_reportletconf=Adicionar novo Reporlet
+selectItem=Por favor selecionar um item primeiro
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage.html
new file mode 100644
index 0000000..bc8a1f9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage.html
@@ -0,0 +1,85 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div style="margin: 5px;">
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+ <form wicket:id="form">
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#general"><span><wicket:message key="general"/></span></a></li>
+ <li><a href="#configuration"><span><wicket:message key="configuration"/></span></a></li>
+ </ul>
+ <div id="general">
+ <div id="formtable">
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="name"><wicket:message key="name"/></label>
+ </div>
+ <div class="tablecolumn_field short_dynamicsize">
+ <span wicket:id="name">[name]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="reportletClass"><wicket:message key="reportletClass"/></label>
+ </div>
+ <div class="tablecolumn_field">
+ <span wicket:id="reportletClass" style="width: 100%;">[reportletClass]</span>
+ </div>
+ </div>
+ </div>
+
+ <script type="text/javascript">
+ $(function() {
+ $('#general #formtable div.tablerow:even').addClass("alt");
+ });
+ </script>
+ </div>
+ <div id="configuration">
+ <div id="formtable">
+ <span wicket:id="container">
+ <div class="tablerow" wicket:id="propView">
+ <div class="tablecolumn_label short_fixedsize">
+ <span wicket:id="key">[key]</span>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="value">[value]</span>
+ </div>
+ </div>
+
+ <script type="text/javascript">
+ $(function() {
+ $('#configuration #formtable div.tablerow:even').addClass("alt");
+ });
+ </script>
+ </span>
+ </div>
+ </div>
+ </div>
+
+ <div style="margin: 20px 10px 0">
+ <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="apply"/>
+ <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage.properties
new file mode 100644
index 0000000..52ca027
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Reportlet
+general=General
+configuration=Configuration
+apply=Save
+name=Name
+reportletClass=Reportlet class
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage_it.properties
new file mode 100644
index 0000000..9245554
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage_it.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Reportlet
+general=Generale
+configuration=Configurazione
+apply=Salva
+name=Nome
+reportletClass=Classe Reportlet
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage_pt_BR.properties
new file mode 100644
index 0000000..dc7e422
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ReportletConfModalPage_pt_BR.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Reportlet
+general=Geral
+configuration=Configura\u00E7\u00E3o
+apply=Salvar
+name=Nome
+reportletClass=Classe Reportlet
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports.html
new file mode 100644
index 0000000..456f7a3
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports.html
@@ -0,0 +1,58 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#tabs-1"><span><wicket:message key="reports"/></span></a></li>
+ <li><a href="#tabs-2"><span><wicket:message key="audit"/></span></a></li>
+ </ul>
+
+ <div id="tabs-1">
+ <div id="users-contain" class="ui-widget" style="width:inherit;">
+ <span wicket:id="reportContainer">
+ <table class="ui-widget ui-widget-content table-hover" wicket:id="reportTable"/>
+ </span>
+ <span style="float:right">
+ <form wicket:id="paginatorForm" style="display:inline">
+ <label><wicket:message key="displayRows"/></label>
+ <select class="text ui-widget-content ui-corner-all" wicket:id="rowsChooser"/>
+ </form>
+ </span>
+ </div>
+
+ <div wicket:id="reportWin">[Show modal window for report editing]</div>
+ <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="createLink">
+ <wicket:message key="create"/>
+ </a>
+
+ </div>
+
+ <div id="tabs-2">
+ <span wicket:id="auditContainer">
+ <form wicket:id="auditForm">
+ <span wicket:id="events">[event builder]</span>
+ </form>
+ </span>
+ </div>
+ </div>
+
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports.properties
new file mode 100644
index 0000000..06ebaca
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports.properties
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+audit=Audit
+lastExec=Last Execution
+nextExec=Next Execution
+latestExecStatus=Last status
+category=Category
+subcategory=Subcategory
+startDate=Start date
+endDate=End date
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports_it.properties
new file mode 100644
index 0000000..24b62ba
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports_it.properties
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+audit=Audit
+lastExec=Ultima Esecuzione
+nextExec=Prossima Esecuzione
+latestExecStatus=Ultimo stato
+category=Categoria
+subcategory=Sottocategoria
+startDate=Data di avvio
+endDate=Data di conclusione
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports_pt_BR.properties
new file mode 100644
index 0000000..c688a06
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Reports_pt_BR.properties
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+audit=Auditar
+lastExec=\u00daltima Execu\u00e7\u00e3o
+nextExec=Pr\u00f3xima Execu\u00e7\u00e3o
+latestExecStatus=\u00daltimo Estatus
+category=Categoria
+subcategory=Subcategoria
+startDate=Data de in\u00edcio
+endDate=Data Final
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage.html
new file mode 100644
index 0000000..90b4da8
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage.html
@@ -0,0 +1,64 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div>
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+ <form wicket:id="form">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="username"><wicket:message key="username"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="username">[username]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="securityQuestion"><span wicket:id="securityQuestionLabel"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="securityQuestion">[securityQuestion]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="securityAnswer"><span wicket:id="securityAnswerLabel"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="securityAnswer">[securityAnswer]</span>
+ </div>
+ </div>
+ </div>
+
+ <div style="margin: 20px 10px 0">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage.properties
new file mode 100644
index 0000000..4cc999a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+securityQuestion=Security question
+title=Password reset
+username=User
+securityAnswer=Security answer
+submit=Submit
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage_it.properties
new file mode 100644
index 0000000..77c1dd4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage_it.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+securityQuestion=Domanda di sicurezza
+title=Password smarrita
+username=Utente
+securityAnswer=Risposta di sicurezza
+submit=Invia
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage_pt_BR.properties
new file mode 100644
index 0000000..27728db
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage_pt_BR.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+securityQuestion=Pergunta de seguran\u00e7a
+title=Redefini\u00e7\u00e3o de senha
+username=Usu\u00e1rio
+securityAnswer=Resposta de seguran\u00e7a
+submit=Apresentar
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.html
new file mode 100644
index 0000000..2316adc
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.html
@@ -0,0 +1,64 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div style="margin: 5px;">
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <span wicket:id="new"/> <wicket:message key="title"/> <span wicket:id="name"/>
+ </p>
+
+ <form wicket:id="form">
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#resource"><span><wicket:message key="resource"/></span></a></li>
+ <li><a href="#umapping"><span><wicket:message key="umapping"/></span></a></li>
+ <li><a href="#rmapping"><span><wicket:message key="rmapping"/></span></a></li>
+ <li><a href="#connectorProperties"><span><wicket:message key="connectorProperties"/></span></a></li>
+ <li><a href="#security"><span><wicket:message key="security"/></span></a></li>
+ </ul>
+ <div id="resource">
+ <span wicket:id="details">[details]</span>
+ <span wicket:id="systeminformation">[System Information]</span>
+ </div>
+ <div id="umapping">
+ <span wicket:id="umapping">[umapping]</span>
+ </div>
+ <div id="rmapping">
+ <span wicket:id="rmapping">[rmapping]</span>
+ </div>
+ <div id="connectorProperties">
+ <span wicket:id="connconf">[connconf]</span>
+ </div>
+ <div id="security">
+ <span wicket:id="security">[security]</span>
+ </div>
+ </div>
+
+ <div style="margin: 20px 10px 0">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.properties
new file mode 100644
index 0000000..561fe2e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.properties
@@ -0,0 +1,60 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+resource=Resource details
+umapping=User mapping
+connectorProperties=Connector properties
+security=Security
+required_alert=All form fields are required
+connector=Connector
+existing_resources=Existing resources
+action=Action
+edit_attribute=Edit resource
+title=Resource
+extAttrNames=External attributes
+intMappingTypes=Internal mapping types
+entity=Entity
+roleSchema=Role Schema
+accountId=AccountId
+mandatoryCondition=Mandatory
+password=Password
+purpose=Purpose
+mappingUserSchema=Mapping User Schema
+mappingRoleSchema=Mapping Role Schema
+delete=Delete
+intAttrNames=Internal attributes
+enforceMandatoryCondition=Enforce mandatory condition
+fieldName=Field name
+
+accountIdValidation=There must be exactly one AccountId
+propagationMode=Propagation mode
+accountLink=Account link
+enable=Enable
+
+createTraceLevel=Create trace level
+updateTraceLevel=Update trace level
+deleteTraceLevel=Delete trace level
+syncTraceLevel=Synchronization trace level
+propagationPriority=Propagation priority
+propagationPrimary=Propagation primary
+
+success_connection=Successful connection
+error_connection=Connection failure
+check=Check connection
+actionsClasses=Actions classes
+rmapping=Role mapping
+new=New
+randomPwdIfNotProvided=Generate random passwords when missing
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_it.properties
new file mode 100644
index 0000000..2223b99
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_it.properties
@@ -0,0 +1,60 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+resource=Dettagli Risorsa
+umapping=Mapping utenti
+connectorProperties=Propriet\u00e0\u00a0 Connettore
+security=Sicurezza
+required_alert=Tutti i campi sono richiesti
+connector=Connettore
+existing_resources=Risorse esistenti
+action=Azione
+edit_attribute=Modifica risorsa
+title=Risorsa
+extAttrNames=Attributi esterni
+intMappingTypes=Tipo mapping interno
+entity=Entità
+roleSchema=Schema Ruolo
+accountId=AccountId
+mandatoryCondition=Obbligatorio
+password=Password
+purpose=Scopo
+mappingUserSchema=Mapping User Schema
+mappingRoleSchema=Mapping Role Schema
+delete=Rimuovi
+intAttrNames=Attributi interni
+enforceMandatoryCondition=Abilita mandatory condition
+fieldName=Nome campo
+
+accountIdValidation=Deve essere definito esattamente un AccountId
+propagationMode=Modalit\u00e0 di propagazione
+accountLink=Account link
+enable=Abilita
+
+createTraceLevel=Livello di tracciamento delle creazioni
+updateTraceLevel=Livello di tracciamento degli aggiornamenti
+deleteTraceLevel=Livello di tracciamento delle cancellazioni
+syncTraceLevel=Livello di tracciamento delle sincronizzazioni
+propagationPriority=Priorit\u00e0 in propagazione
+propagationPrimary=Primaria in propagazione
+
+success_connection=Connessione avvenuta con successo
+error_connection=Connessione non riuscita
+check=Verifica connessione
+actionsClasses=Classi azioni
+rmapping=Mapping ruoli
+new=Nuova
+randomPwdIfNotProvided=Genera password casuali se mancanti
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_pt_BR.properties
new file mode 100644
index 0000000..a681eb0
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_pt_BR.properties
@@ -0,0 +1,60 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+resource=Detalhes de Recursos
+umapping=Mapeamento de usu\u00e1rios
+connectorProperties=Propriedades de Conectores
+security=Seguran\u00e7a
+required_alert=Todos os campos deste formul\u00e1rio s\u00e3o obrigat\u00f3rios
+connector=Conector
+existing_resources=Recursos Existentes
+action=A\u00e7\u00e3o
+edit_attribute=Alterar Recurso
+title=Recurso
+extAttrNames=Atributos Externos
+intMappingTypes=Tipos internos de mapeamentos
+entity=Entidade
+roleSchema=Esquema de Fun\u00e7\u00e3o
+accountId=Identificador da Conta
+mandatoryCondition=Obrigat\u00f3rio
+password=Senha
+purpose=Prop\u00f3sito
+mappingUserSchema=Esquema de mapeamento de usu\u00e1rio
+mappingRoleSchema=Esquema de mapeamento de fun\u00e7\u00e3o
+delete=Excluir
+intAttrNames=Atributos internos
+enforceMandatoryCondition=Aplicar condi\u00e7\u00e3o obrigat\u00f3ria
+fieldName=Nome do Campo
+
+accountIdValidation=Precisa ser exatamente um Identificador de Conta
+propagationMode=Modo de propaga\u00e7\u00e3o
+accountLink=Link de Conta
+enable=Habilitado
+
+createTraceLevel=Criar n\u00edvel de trace
+updateTraceLevel=Atualizar n\u00edvel de trace
+deleteTraceLevel=Excluir n\u00edvel de trace
+syncTraceLevel=N\u00edvel de trace de sincroniza\u00e7\u00e3o
+propagationPriority=Prioridade de propaga\u00e7\u00e3o
+propagationPrimary=Propaga\u00e7\u00e3o prim\u00e1ria
+
+success_connection=Conex\u00e3o com sucesso
+error_connection=Conex\u00e3o sem sucesso
+check=Verificar a conex\u00e3o
+actionsClasses=Classes de a\u00e7\u00f5es
+rmapping=Regra de Mapeamento
+new=Novo
+randomPwdIfNotProvided=Gerar senhas aleat\u00f3rias quando n\u00e3o houver
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources.html
new file mode 100644
index 0000000..6486a0e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources.html
@@ -0,0 +1,99 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style type="text/css">
+ .true {
+ background-image: url(../../img/ok.png);
+ background-position: center center;
+ background-repeat: no-repeat;
+ height: 18px;
+ width: 65px;
+ }
+ .false {
+ width: 65px;
+ }
+ .narrowcolumn {
+ width: 120px;
+ }
+ </style>
+ </wicket:head>
+ <wicket:extend>
+
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected">
+ <a href="#tabs-1"><span><wicket:message key="tab1"/></span></a>
+ </li>
+ <li><a href="#tabs-2"><span><wicket:message key="tab2"/></span></a></li>
+ </ul>
+ <div id="tabs-1">
+ <div id="users-contain" class="ui-widget" style="width:inherit">
+ <span wicket:id="resourceContainer">
+ <span wicket:id="resourceDatatable">[resources]</span>
+ </span>
+
+ <span style="float:right">
+ <form wicket:id="resourcePaginatorForm" style="display:inline">
+ <label><wicket:message key="displayRows"/></label>
+ <select class="text ui-widget-content ui-corner-all" wicket:id="rowsChooser"/>
+ </form>
+ </span>
+ </div>
+
+ <div wicket:id="statusModal">[Show modal window for provisioning status]</div>
+ <div wicket:id="createResourceWin">[Show modal window for creating resource]</div>
+ <div wicket:id="editResourceWin">[Show modal window for editing resource]</div>
+
+ <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="createResourceLink">
+ <wicket:message key="create-resource"/>
+ </a>
+ </div>
+ <div id="tabs-2">
+ <div id="users-contain" class="ui-widget" style="width:inherit">
+ <span wicket:id="connectorContainer">
+ <span wicket:id="connectorDatatable">[connectors]</span>
+ </span>
+
+ <span style="float:right">
+ <form wicket:id="connectorPaginatorForm" style="display:inline">
+ <label><wicket:message key="displayRows"/></label>
+ <select class="text ui-widget-content ui-corner-all" wicket:id="rowsChooser"/>
+ </form>
+ </span>
+ </div>
+
+ <div wicket:id="createConnectorWin">[Show modal window for creating connector]</div>
+ <div wicket:id="editConnectorWin">[Show modal window for editing connector]</div>
+
+ <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="createConnectorLink">
+ <wicket:message key="create-connector"/>
+ </a>
+ </div>
+
+ <div>
+ <a href="#" style="position: absolute; top: 4px; right:20px;" wicket:id="reloadLink">
+ <img src="img/reload_30.png" width="25" height="25"
+ alt="Reload connectors" title="title" wicket:message="title:reloadConnectors"/>
+ </a>
+ </div>
+ </div>
+
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources.properties
new file mode 100644
index 0000000..fb6b8a1
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources.properties
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Resources
+edit=Edit
+delete=Delete
+create-resource=Create
+propagationPriority=Propagation priority
+propagationPrimary=Propagation primary
+
+tab2=Connectors
+displayName=Display name
+version=Version
+bundleName=Bundle name
+edit=Edit
+delete=Delete
+create-connector=Create
+delete_error=Operation forbidden:the connector you're trying to delete is connected to a Resource
+connector=Connector
+reloadConnectors=Reload connectors
+confirmReloadConnectors=This request is potentially dangerous for running operations, continue?
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources_it.properties
new file mode 100644
index 0000000..80a5185
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Resources_it.properties
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Risorse
+edit=Modifica
+delete=Rimuovi
+create-resource=Crea
+propagationPriority=Priorit\u00e0 in propagazione
+propagationPrimary=Primaria in propagazione
+
+tab2=Connettori
+create-connector=Crea
+version=Versione
+bundleName=Bundle name
+edit=Modifica
+delete=Elimina
+delete_error=Operazione vietata: il connettore che si desidera rimuovere \u00e8 correlato ad una risorsa
+displayName=Nome visualizzato
+connector=Connettore
+reloadConnectors=Ricarica connettori
+confirmReloadConnectors=Questa richiesta \u00e8 potenzialmente dannosa per le operazioni in corso, proseguire?
[39/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/Schema.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Schema.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Schema.java
new file mode 100644
index 0000000..c47edcd
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Schema.java
@@ -0,0 +1,467 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.lang.reflect.Field;
+import java.util.AbstractMap.SimpleEntry;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.PreferenceManager;
+import org.apache.syncope.client.console.commons.SchemaModalPageFactory;
+import org.apache.syncope.client.console.commons.SelectChoiceRenderer;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.panels.JQueryUITabbedPanel;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.to.AbstractSchemaTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.Page;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+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.util.SortableDataProvider;
+import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
+import org.apache.wicket.extensions.markup.html.tabs.ITab;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.springframework.beans.BeanWrapper;
+import org.springframework.beans.BeanWrapperImpl;
+import org.springframework.util.ReflectionUtils;
+
+/**
+ * Schema WebPage.
+ */
+@SuppressWarnings({ "unchecked", "rawtypes" })
+public class Schema extends BasePage {
+
+ private static final long serialVersionUID = 8091922398776299403L;
+
+ private static final Map<SchemaType, List<String>> COL_NAMES = new HashMap<SchemaType, List<String>>() {
+
+ private static final long serialVersionUID = 3109256773218160485L;
+
+ {
+ put(SchemaType.PLAIN, Arrays.asList(new String[] { "key", "type",
+ "mandatoryCondition", "uniqueConstraint", "multivalue", "readonly" }));
+ put(SchemaType.DERIVED, Arrays.asList(new String[] { "key", "expression" }));
+ put(SchemaType.VIRTUAL, Arrays.asList(new String[] { "key", "readonly" }));
+ }
+ };
+
+ private static final Map<Map.Entry<AttributableType, SchemaType>, String> PAGINATOR_ROWS_KEYS =
+ new HashMap<Map.Entry<AttributableType, SchemaType>, String>() {
+
+ private static final long serialVersionUID = 3109256773218160485L;
+
+ {
+ put(new SimpleEntry<>(AttributableType.CONFIGURATION, SchemaType.PLAIN),
+ Constants.PREF_CONF_SCHEMA_PAGINATOR_ROWS);
+ put(new SimpleEntry<>(AttributableType.USER, SchemaType.PLAIN),
+ Constants.PREF_USER_SCHEMA_PAGINATOR_ROWS);
+ put(new SimpleEntry<>(AttributableType.USER, SchemaType.DERIVED),
+ Constants.PREF_USER_DER_SCHEMA_PAGINATOR_ROWS);
+ put(new SimpleEntry<>(AttributableType.USER, SchemaType.VIRTUAL),
+ Constants.PREF_USER_VIR_SCHEMA_PAGINATOR_ROWS);
+ put(new SimpleEntry<>(AttributableType.MEMBERSHIP, SchemaType.PLAIN),
+ Constants.PREF_MEMBERSHIP_SCHEMA_PAGINATOR_ROWS);
+ put(new SimpleEntry<>(AttributableType.MEMBERSHIP, SchemaType.DERIVED),
+ Constants.PREF_MEMBERSHIP_DER_SCHEMA_PAGINATOR_ROWS);
+ put(new SimpleEntry<>(AttributableType.MEMBERSHIP, SchemaType.VIRTUAL),
+ Constants.PREF_MEMBERSHIP_VIR_SCHEMA_PAGINATOR_ROWS);
+ put(new SimpleEntry<>(AttributableType.ROLE, SchemaType.PLAIN),
+ Constants.PREF_ROLE_SCHEMA_PAGINATOR_ROWS);
+ put(new SimpleEntry<>(AttributableType.ROLE, SchemaType.DERIVED),
+ Constants.PREF_ROLE_DER_SCHEMA_PAGINATOR_ROWS);
+ put(new SimpleEntry<>(AttributableType.ROLE, SchemaType.VIRTUAL),
+ Constants.PREF_ROLE_VIR_SCHEMA_PAGINATOR_ROWS);
+ }
+ };
+
+ private static final int WIN_WIDTH = 600;
+
+ private static final int WIN_HEIGHT = 200;
+
+ private static final int PLAIN_WIN_HEIGHT = 500;
+
+ @SpringBean
+ private SchemaRestClient restClient;
+
+ @SpringBean
+ private PreferenceManager prefMan;
+
+ private final String allowedCreateRoles = xmlRolesReader.getEntitlement("Schema", "create");
+
+ private final String allowedReadRoles = xmlRolesReader.getEntitlement("Schema", "read");
+
+ private final String allowedDeleteRoles = xmlRolesReader.getEntitlement("Schema", "delete");
+
+ public Schema() {
+ super();
+
+ for (final AttributableType attrType : AttributableType.values()) {
+ final String attrTypeAsString = attrType.name().toLowerCase();
+
+ List<ITab> tabs = new ArrayList<>();
+
+ for (final SchemaType schemaType : SchemaType.values()) {
+ if (attrType != AttributableType.CONFIGURATION || schemaType == SchemaType.PLAIN) {
+ final String schemaTypeAsString = schemaType.name().toLowerCase();
+
+ tabs.add(new AbstractTab(new Model<>(getString(schemaTypeAsString))) {
+
+ private static final long serialVersionUID = -5861786415855103549L;
+
+ @Override
+ public WebMarkupContainer getPanel(final String panelId) {
+ return new SchemaTypePanel(panelId, attrType, schemaType);
+ }
+ });
+ }
+ }
+
+ add(new JQueryUITabbedPanel(attrTypeAsString + "Tabs", tabs));
+ }
+ }
+
+ private <T extends AbstractSchemaModalPage> List<IColumn> getColumns(
+ final WebMarkupContainer webContainer, final ModalWindow modalWindow,
+ final AttributableType attributableType, final SchemaType schemaType,
+ final Collection<String> fields) {
+
+ List<IColumn> columns = new ArrayList<IColumn>();
+
+ for (final String field : fields) {
+ final Field clazzField = ReflectionUtils.findField(schemaType.getToClass(), field);
+
+ if (clazzField != null) {
+ if (clazzField.getType().equals(Boolean.class) || clazzField.getType().equals(boolean.class)) {
+ columns.add(new AbstractColumn<AbstractSchemaTO, String>(new ResourceModel(field)) {
+
+ private static final long serialVersionUID = 8263694778917279290L;
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<AbstractSchemaTO>> item,
+ final String componentId, final IModel<AbstractSchemaTO> model) {
+
+ BeanWrapper bwi = new BeanWrapperImpl(model.getObject());
+ Object obj = bwi.getPropertyValue(field);
+
+ item.add(new Label(componentId, ""));
+ item.add(new AttributeModifier("class", new Model<String>(obj.toString())));
+ }
+
+ @Override
+ public String getCssClass() {
+ return "small_fixedsize";
+ }
+ });
+ } else {
+ IColumn column = new PropertyColumn(new ResourceModel(field), field, field) {
+
+ private static final long serialVersionUID = 3282547854226892169L;
+
+ @Override
+ public String getCssClass() {
+ String css = super.getCssClass();
+ if ("key".equals(field)) {
+ css = StringUtils.isBlank(css)
+ ? "medium_fixedsize"
+ : css + " medium_fixedsize";
+ }
+ return css;
+ }
+ };
+ columns.add(column);
+ }
+ }
+ }
+
+ columns.add(new AbstractColumn<AbstractSchemaTO, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<AbstractSchemaTO>> item, final String componentId,
+ final IModel<AbstractSchemaTO> model) {
+
+ final AbstractSchemaTO schemaTO = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+
+ panel.addWithRoles(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ modalWindow.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ AbstractSchemaModalPage page = SchemaModalPageFactory.getSchemaModalPage(
+ attributableType, schemaType);
+
+ page.setSchemaModalPage(Schema.this.getPageReference(), modalWindow, schemaTO, false);
+
+ return page;
+ }
+ });
+
+ modalWindow.show(target);
+ }
+ }, ActionType.EDIT, allowedReadRoles);
+
+ panel.addWithRoles(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+
+ switch (schemaType) {
+ case DERIVED:
+ restClient.deleteDerSchema(attributableType, schemaTO.getKey());
+ break;
+
+ case VIRTUAL:
+ restClient.deleteVirSchema(attributableType, schemaTO.getKey());
+ break;
+
+ default:
+ restClient.deletePlainSchema(attributableType, schemaTO.getKey());
+ break;
+ }
+
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ feedbackPanel.refresh(target);
+
+ target.add(webContainer);
+ }
+ }, ActionType.DELETE, allowedDeleteRoles);
+
+ item.add(panel);
+ }
+ });
+
+ return columns;
+ }
+
+ private Form<Void> getPaginatorForm(final WebMarkupContainer webContainer,
+ final AjaxFallbackDefaultDataTable dataTable,
+ final String formname, final SchemaTypePanel schemaTypePanel, final String rowsPerPagePrefName) {
+
+ Form<Void> form = new Form<Void>(formname);
+
+ final DropDownChoice<Integer> rowChooser = new DropDownChoice<Integer>("rowsChooser",
+ new PropertyModel<Integer>(schemaTypePanel, "pageRows"), prefMan.getPaginatorChoices(),
+ new SelectChoiceRenderer<Integer>());
+
+ rowChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ prefMan.set(getRequest(), getResponse(), rowsPerPagePrefName, rowChooser.getInput());
+ dataTable.setItemsPerPage(rowChooser.getModelObject());
+
+ target.add(webContainer);
+ }
+ });
+
+ form.add(rowChooser);
+
+ return form;
+ }
+
+ private <T extends AbstractSchemaModalPage> AjaxLink<Void> getCreateSchemaLink(final ModalWindow modalWindow,
+ final AttributableType attrType, final SchemaType schemaType, final String winLinkName) {
+
+ AjaxLink<Void> link = new ClearIndicatingAjaxLink<Void>(winLinkName, getPageReference()) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ modalWindow.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ T page = SchemaModalPageFactory.getSchemaModalPage(attrType, schemaType);
+ page.setSchemaModalPage(Schema.this.getPageReference(), modalWindow, null, true);
+
+ return page;
+ }
+ });
+
+ modalWindow.show(target);
+ }
+ };
+
+ MetaDataRoleAuthorizationStrategy.authorize(link, ENABLE, allowedCreateRoles);
+
+ return link;
+
+ }
+
+ private class SchemaProvider extends SortableDataProvider<AbstractSchemaTO, String> {
+
+ private static final long serialVersionUID = -185944053385660794L;
+
+ private final SortableDataProviderComparator<AbstractSchemaTO> comparator;
+
+ private final AttributableType attrType;
+
+ private final SchemaType schemaType;
+
+ public SchemaProvider(final AttributableType attrType, final SchemaType schemaType) {
+ super();
+
+ this.attrType = attrType;
+ this.schemaType = schemaType;
+
+ // Default sorting
+ setSort("key", SortOrder.ASCENDING);
+
+ comparator = new SortableDataProviderComparator<>(this);
+ }
+
+ @Override
+ public Iterator<AbstractSchemaTO> iterator(final long first, final long count) {
+ @SuppressWarnings("unchecked")
+ List<AbstractSchemaTO> list =
+ (List<AbstractSchemaTO>) restClient.getSchemas(this.attrType, this.schemaType);
+
+ Collections.sort(list, comparator);
+
+ return list.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return restClient.getSchemas(this.attrType, this.schemaType).size();
+ }
+
+ @Override
+ public IModel<AbstractSchemaTO> model(final AbstractSchemaTO object) {
+ return new CompoundPropertyModel<AbstractSchemaTO>(object);
+ }
+ }
+
+ private class SchemaTypePanel extends Panel {
+
+ private static final long serialVersionUID = 2854050613688773575L;
+
+ private int pageRows;
+
+ private final AttributableType attrType;
+
+ private final SchemaType schemaType;
+
+ public SchemaTypePanel(final String id, final AttributableType attrType, final SchemaType schemaType) {
+ super(id);
+
+ this.attrType = attrType;
+ this.schemaType = schemaType;
+
+ setup();
+ }
+
+ private void setup() {
+ ModalWindow editSchemaWin = new ModalWindow("editSchemaWin");
+ editSchemaWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editSchemaWin.setInitialWidth(WIN_WIDTH);
+ if (schemaType == SchemaType.PLAIN) {
+ editSchemaWin.setInitialHeight(PLAIN_WIN_HEIGHT);
+ } else {
+ editSchemaWin.setInitialHeight(WIN_HEIGHT);
+ }
+ editSchemaWin.setCookieName("editSchemaWin");
+ editSchemaWin.setMarkupId("editSchemaWin");
+ add(editSchemaWin);
+
+ WebMarkupContainer schemaWrapContainer = new WebMarkupContainer("schemaWrapContainer");
+ schemaWrapContainer.setOutputMarkupId(true);
+ if (schemaType != SchemaType.VIRTUAL) {
+ schemaWrapContainer.add(new AttributeModifier("style", "width:auto;"));
+ }
+ add(schemaWrapContainer);
+
+ WebMarkupContainer schemaContainer = new WebMarkupContainer("schemaContainer");
+ schemaContainer.setOutputMarkupId(true);
+ schemaWrapContainer.add(schemaContainer);
+ setWindowClosedCallback(editSchemaWin, schemaContainer);
+
+ final String paginatorRowsKey = PAGINATOR_ROWS_KEYS.get(
+ new SimpleEntry<AttributableType, SchemaType>(attrType, schemaType));
+ pageRows = prefMan.getPaginatorRows(getRequest(), paginatorRowsKey);
+
+ List<IColumn> tableCols = getColumns(schemaContainer, editSchemaWin, attrType,
+ schemaType, COL_NAMES.get(schemaType));
+ final AjaxFallbackDefaultDataTable table = new AjaxFallbackDefaultDataTable("datatable", tableCols,
+ new SchemaProvider(attrType, schemaType), pageRows);
+ table.setOutputMarkupId(true);
+ schemaContainer.add(table);
+
+ schemaWrapContainer.add(getPaginatorForm(schemaContainer, table, "paginatorForm", this, paginatorRowsKey));
+
+ add(getCreateSchemaLink(editSchemaWin, attrType, schemaType, "createSchemaLink"));
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/SecurityQuestionModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/SecurityQuestionModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/SecurityQuestionModalPage.java
new file mode 100644
index 0000000..12bfc2b
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/SecurityQuestionModalPage.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.rest.SecurityQuestionRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.SecurityQuestionTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+class SecurityQuestionModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = -6709838862698327502L;
+
+ @SpringBean
+ private SecurityQuestionRestClient restClient;
+
+ public SecurityQuestionModalPage(final PageReference pageRef, final ModalWindow window,
+ final SecurityQuestionTO securityQuestionTO, final boolean createFlag) {
+
+ final Form<SecurityQuestionTO> form =
+ new Form<SecurityQuestionTO>(FORM, new CompoundPropertyModel<SecurityQuestionTO>(securityQuestionTO));
+
+ final AjaxTextFieldPanel contentFieldPanel =
+ new AjaxTextFieldPanel("content", "content", new PropertyModel<String>(securityQuestionTO, "content"));
+ contentFieldPanel.setRequired(true);
+ form.add(contentFieldPanel);
+
+ AjaxButton submit = new IndicatingAjaxButton(APPLY, new Model<String>(getString(SUBMIT))) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ try {
+ if (createFlag) {
+ restClient.create(securityQuestionTO);
+ } else {
+ restClient.update(securityQuestionTO);
+ }
+ info(getString(Constants.OPERATION_SUCCEEDED));
+
+ Configuration callerPage = (Configuration) pageRef.getPage();
+ callerPage.setModalResult(true);
+
+ window.close(target);
+ } catch (SyncopeClientException scee) {
+ error(getString(Constants.ERROR) + ": " + scee.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+
+ final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+ };
+
+ cancel.setDefaultFormProcessing(false);
+
+ String allowedRoles = createFlag
+ ? xmlRolesReader.getEntitlement("SecurityQuestion", "create")
+ : xmlRolesReader.getEntitlement("SecurityQuestion", "update");
+ MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, allowedRoles);
+
+ form.add(submit);
+ form.setDefaultButton(submit);
+
+ form.add(cancel);
+
+ add(form);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
new file mode 100644
index 0000000..9d0ede2
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
@@ -0,0 +1,644 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.status.AbstractStatusBeanProvider;
+import org.apache.syncope.client.console.commons.status.ConnObjectWrapper;
+import org.apache.syncope.client.console.commons.status.Status;
+import org.apache.syncope.client.console.commons.status.StatusBean;
+import org.apache.syncope.client.console.commons.status.StatusUtils;
+import org.apache.syncope.client.console.panels.ActionDataTablePanel;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.common.lib.to.AbstractSubjectTO;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.PasswordTextField;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.model.StringResourceModel;
+
+public class StatusModalPage<T extends AbstractSubjectTO> extends AbstractStatusModalPage {
+
+ private static final long serialVersionUID = -9148734710505211261L;
+
+ private final AbstractSubjectTO subjectTO;
+
+ private int rowsPerPage = 10;
+
+ final StatusUtils statusUtils;
+
+ final boolean statusOnly;
+
+ // --------------------------------
+ // password management fields ..
+ // --------------------------------
+ final ClearIndicatingAjaxButton cancel;
+
+ final WebMarkupContainer pwdMgt;
+
+ final Form<?> pwdMgtForm;
+
+ final AjaxCheckBoxPanel changepwd;
+
+ final PasswordTextField password;
+
+ final PasswordTextField confirm;
+ // --------------------------------
+
+ final PageReference pageRef;
+
+ final ModalWindow window;
+
+ final ActionDataTablePanel<StatusBean, String> table;
+
+ final List<IColumn<StatusBean, String>> columns;
+
+ public StatusModalPage(
+ final PageReference pageRef,
+ final ModalWindow window,
+ final AbstractSubjectTO attributableTO) {
+
+ this(pageRef, window, attributableTO, false);
+ }
+
+ public StatusModalPage(
+ final PageReference pageRef,
+ final ModalWindow window,
+ final AbstractSubjectTO subjectTO,
+ final boolean statusOnly) {
+
+ super();
+
+ this.pageRef = pageRef;
+ this.window = window;
+ this.statusOnly = statusOnly;
+ this.subjectTO = subjectTO;
+
+ statusUtils = new StatusUtils(subjectTO instanceof UserTO ? userRestClient : roleRestClient);
+
+ add(new Label("displayName", subjectTO.getKey() + " "
+ + (subjectTO instanceof UserTO ? ((UserTO) subjectTO).getUsername() : ((RoleTO) subjectTO).getName())));
+
+ columns = new ArrayList<>();
+ columns.add(new AbstractColumn<StatusBean, String>(
+ new StringResourceModel("resourceName", this, null, "Resource name"), "resourceName") {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public void populateItem(
+ final Item<ICellPopulator<StatusBean>> cellItem,
+ final String componentId,
+ final IModel<StatusBean> model) {
+
+ cellItem.add(new Label(componentId, model.getObject().getResourceName()) {
+
+ private static final long serialVersionUID = 8432079838783825801L;
+
+ @Override
+ protected void onComponentTag(final ComponentTag tag) {
+ if (model.getObject().isLinked()) {
+ super.onComponentTag(tag);
+ } else {
+ tag.put("style", "color: #DDDDDD");
+ }
+ }
+ });
+ }
+ });
+
+ columns.add(new PropertyColumn<StatusBean, String>(
+ new StringResourceModel("accountLink", this, null, "Account link"), "accountLink", "accountLink"));
+
+ columns.add(new AbstractColumn<StatusBean, String>(
+ new StringResourceModel("status", this, null, "")) {
+
+ private static final long serialVersionUID = -3503023501954863131L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(
+ final Item<ICellPopulator<StatusBean>> cellItem,
+ final String componentId,
+ final IModel<StatusBean> model) {
+
+ if (model.getObject().isLinked()) {
+ cellItem.add(statusUtils.getStatusImagePanel(componentId, model.getObject().
+ getStatus()));
+ } else {
+ cellItem.add(new Label(componentId, ""));
+ }
+ }
+ });
+
+ table = new ActionDataTablePanel<StatusBean, String>(
+ "resourceDatatable",
+ columns,
+ (ISortableDataProvider<StatusBean, String>) new AttributableStatusProvider(),
+ rowsPerPage,
+ pageRef) {
+
+ private static final long serialVersionUID = 6510391461033818316L;
+
+ @Override
+ public boolean isElementEnabled(final StatusBean element) {
+ return !statusOnly || element.getStatus() != Status.OBJECT_NOT_FOUND;
+ }
+ };
+ table.setOutputMarkupId(true);
+
+ final String pageId = subjectTO instanceof RoleTO ? "Roles" : "Users";
+
+ final Fragment pwdMgtFragment = new Fragment("pwdMgtFields", "pwdMgtFragment", this);
+ addOrReplace(pwdMgtFragment);
+
+ pwdMgt = new WebMarkupContainer("pwdMgt");
+ pwdMgtFragment.add(pwdMgt.setOutputMarkupId(true));
+
+ pwdMgtForm = new Form("pwdMgtForm");
+ pwdMgtForm.setVisible(false).setEnabled(false);
+ pwdMgt.add(pwdMgtForm);
+
+ password = new PasswordTextField("password", new Model<String>());
+ pwdMgtForm.add(password.setRequired(false).setEnabled(false));
+
+ confirm = new PasswordTextField("confirm", new Model<String>());
+ pwdMgtForm.add(confirm.setRequired(false).setEnabled(false));
+
+ changepwd = new AjaxCheckBoxPanel("changepwd", "changepwd", new Model<Boolean>(false));
+ pwdMgtForm.add(changepwd.setModelObject(false));
+ pwdMgtForm.add(new Label("changePwdLabel", new ResourceModel("changePwdLabel", "Password propagation")));
+
+ changepwd.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ password.setEnabled(changepwd.getModelObject());
+ confirm.setEnabled(changepwd.getModelObject());
+ target.add(pwdMgt);
+ }
+ });
+
+ cancel = new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), pageRef) {
+
+ private static final long serialVersionUID = -2341391430136818026L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ // ignore
+ window.close(target);
+ }
+ }.feedbackPanelAutomaticReload(false);
+
+ pwdMgtForm.add(cancel);
+
+ final ClearIndicatingAjaxButton goon =
+ new ClearIndicatingAjaxButton("continue", new ResourceModel("continue"), pageRef) {
+
+ private static final long serialVersionUID = -2341391430136818027L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ // none
+ }
+ };
+
+ pwdMgtForm.add(goon);
+
+ if (statusOnly) {
+ table.addAction(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ userRestClient.reactivate(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(table.getModelObject()));
+
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+
+ window.close(target);
+ } catch (Exception e) {
+ LOG.error("Error enabling resources", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }, ActionLink.ActionType.REACTIVATE, pageId);
+
+ table.addAction(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ userRestClient.suspend(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(table.getModelObject()));
+
+ if (pageRef.getPage() instanceof BasePage) {
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ }
+
+ window.close(target);
+ } catch (Exception e) {
+ LOG.error("Error disabling resources", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }, ActionLink.ActionType.SUSPEND, pageId);
+ } else {
+ table.addAction(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ if (subjectTO instanceof UserTO) {
+ userRestClient.unlink(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(table.getModelObject()));
+ } else {
+ roleRestClient.unlink(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(table.getModelObject()));
+ }
+
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ window.close(target);
+ } catch (Exception e) {
+ LOG.error("Error unlinking resources", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }, ActionLink.ActionType.UNLINK, pageId);
+
+ table.addAction(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ if (subjectTO instanceof UserTO) {
+ userRestClient.link(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(table.getModelObject()));
+ } else {
+ roleRestClient.link(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(table.getModelObject()));
+ }
+
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ window.close(target);
+ } catch (Exception e) {
+ LOG.error("Error linking resources", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }, ActionLink.ActionType.LINK, pageId);
+
+ table.addAction(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ BulkActionResult bulkActionResult;
+ if (subjectTO instanceof UserTO) {
+ bulkActionResult = userRestClient.deprovision(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(table.getModelObject()));
+ } else {
+ bulkActionResult = roleRestClient.deprovision(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(table.getModelObject()));
+ }
+
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ loadBulkActionResultPage(table.getModelObject(), bulkActionResult);
+ } catch (Exception e) {
+ LOG.error("Error de-provisioning user", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }, ActionLink.ActionType.DEPROVISION, pageId);
+
+ table.addAction(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+
+ if (subjectTO instanceof UserTO) {
+ StatusModalPage.this.passwordManagement(
+ target, ResourceAssociationActionType.PROVISION, table.getModelObject());
+ } else {
+ try {
+ final BulkActionResult bulkActionResult = roleRestClient.provision(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(table.getModelObject()));
+
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ loadBulkActionResultPage(table.getModelObject(), bulkActionResult);
+ } catch (Exception e) {
+ LOG.error("Error provisioning user", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }
+ }.feedbackPanelAutomaticReload(!(subjectTO instanceof UserTO)), ActionLink.ActionType.PROVISION, pageId);
+
+ table.addAction(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ final BulkActionResult bulkActionResult;
+ if (subjectTO instanceof UserTO) {
+ bulkActionResult = userRestClient.unassign(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(table.getModelObject()));
+ } else {
+ bulkActionResult = roleRestClient.unassign(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(table.getModelObject()));
+ }
+
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ loadBulkActionResultPage(table.getModelObject(), bulkActionResult);
+ } catch (Exception e) {
+ LOG.error("Error unassigning resources", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }, ActionLink.ActionType.UNASSIGN, pageId);
+
+ table.addAction(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (subjectTO instanceof UserTO) {
+ StatusModalPage.this.passwordManagement(
+ target, ResourceAssociationActionType.ASSIGN, table.getModelObject());
+ } else {
+ try {
+ final BulkActionResult bulkActionResult = roleRestClient.assign(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(table.getModelObject()));
+
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ loadBulkActionResultPage(table.getModelObject(), bulkActionResult);
+ } catch (Exception e) {
+ LOG.error("Error assigning resources", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }
+ }.feedbackPanelAutomaticReload(!(subjectTO instanceof UserTO)), ActionLink.ActionType.ASSIGN, pageId);
+ }
+
+ table.addCancelButton(window);
+ add(table);
+ }
+
+ private class AttributableStatusProvider extends AbstractStatusBeanProvider {
+
+ private static final long serialVersionUID = 4586969457669796621L;
+
+ public AttributableStatusProvider() {
+ super(statusOnly ? "resourceName" : "accountLink");
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public List<StatusBean> getStatusBeans() {
+ final List<String> resources = new ArrayList<>();
+ for (ResourceTO resourceTO : resourceRestClient.getAll()) {
+ resources.add(resourceTO.getKey());
+ }
+
+ final List<ConnObjectWrapper> connObjects = statusUtils.getConnectorObjects(subjectTO);
+
+ final List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size() + 1);
+
+ for (ConnObjectWrapper entry : connObjects) {
+ final StatusBean statusBean = statusUtils.getStatusBean(
+ subjectTO,
+ entry.getResourceName(),
+ entry.getConnObjectTO(),
+ subjectTO instanceof RoleTO);
+
+ statusBeans.add(statusBean);
+ resources.remove(entry.getResourceName());
+ }
+
+ if (statusOnly) {
+ final StatusBean syncope = new StatusBean(subjectTO, "Syncope");
+
+ syncope.setAccountLink(((UserTO) subjectTO).getUsername());
+
+ Status syncopeStatus = Status.UNDEFINED;
+ if (((UserTO) subjectTO).getStatus() != null) {
+ try {
+ syncopeStatus = Status.valueOf(((UserTO) subjectTO).getStatus().toUpperCase());
+ } catch (IllegalArgumentException e) {
+ LOG.warn("Unexpected status found: {}", ((UserTO) subjectTO).getStatus(), e);
+ }
+ }
+ syncope.setStatus(syncopeStatus);
+
+ statusBeans.add(syncope);
+ } else {
+ for (String resource : resources) {
+ final StatusBean statusBean = statusUtils.getStatusBean(
+ subjectTO,
+ resource,
+ null,
+ subjectTO instanceof RoleTO);
+
+ statusBean.setLinked(false);
+ statusBeans.add(statusBean);
+ }
+ }
+
+ return statusBeans;
+ }
+ }
+
+ private void passwordManagement(
+ final AjaxRequestTarget target,
+ final ResourceAssociationActionType type,
+ final Collection<StatusBean> selection) {
+
+ final ClearIndicatingAjaxButton goon =
+ new ClearIndicatingAjaxButton("continue", new ResourceModel("continue", "Continue"), pageRef) {
+
+ private static final long serialVersionUID = -2341391430136818027L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ try {
+ if (StringUtils.isNotBlank(password.getModelObject())
+ && !password.getModelObject().equals(confirm.getModelObject())) {
+ throw new Exception(getString("passwordMismatch"));
+ }
+
+ final BulkActionResult bulkActionResult;
+ switch (type) {
+ case ASSIGN:
+ bulkActionResult = userRestClient.assign(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(selection),
+ changepwd.getModelObject(),
+ password.getModelObject());
+ break;
+ case PROVISION:
+ bulkActionResult = userRestClient.provision(
+ subjectTO.getETagValue(),
+ subjectTO.getKey(),
+ new ArrayList<>(selection),
+ changepwd.getModelObject(),
+ password.getModelObject());
+ break;
+ default:
+ bulkActionResult = null;
+ // ignore
+ }
+
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+
+ if (bulkActionResult != null) {
+ loadBulkActionResultPage(selection, bulkActionResult);
+ } else {
+
+ target.add(((BasePage) pageRef.getPage()).getFeedbackPanel());
+ window.close(target);
+ }
+ } catch (Exception e) {
+ LOG.error("Error provisioning resources", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }.feedbackPanelAutomaticReload(false);
+
+ pwdMgtForm.addOrReplace(goon);
+
+ table.setVisible(false);
+ pwdMgtForm.setVisible(true).setEnabled(true);
+
+ target.add(table);
+ target.add(pwdMgt);
+ }
+
+ private void loadBulkActionResultPage(
+ final Collection<StatusBean> selection, final BulkActionResult bulkActionResult) {
+ final List<String> resources = new ArrayList<String>(selection.size());
+ for (StatusBean statusBean : selection) {
+ resources.add(statusBean.getResourceName());
+ }
+
+ final List<ConnObjectWrapper> connObjects =
+ statusUtils.getConnectorObjects(Collections.singletonList(subjectTO), resources);
+
+ final List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size());
+
+ for (ConnObjectWrapper entry : connObjects) {
+ final StatusBean statusBean = statusUtils.getStatusBean(
+ subjectTO,
+ entry.getResourceName(),
+ entry.getConnObjectTO(),
+ subjectTO instanceof RoleTO);
+
+ statusBeans.add(statusBean);
+ }
+
+ setResponsePage(new BulkActionResultModalPage<StatusBean, String>(
+ window,
+ statusBeans,
+ columns,
+ bulkActionResult,
+ "resourceName"));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/SyncTaskModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/SyncTaskModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/SyncTaskModalPage.java
new file mode 100644
index 0000000..544f670
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/SyncTaskModalPage.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.List;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.syncope.common.lib.to.SyncTaskTO;
+import org.apache.syncope.common.lib.types.MatchingRule;
+import org.apache.syncope.common.lib.types.UnmatchingRule;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.model.PropertyModel;
+
+/**
+ * Modal window with Sync Task form.
+ */
+public class SyncTaskModalPage extends AbstractSyncTaskModalPage {
+
+ private static final long serialVersionUID = 2148403203517274669L;
+
+ public SyncTaskModalPage(final ModalWindow window, final SyncTaskTO taskTO, final PageReference pageRef) {
+
+ super(window, taskTO, pageRef);
+
+ // set default Matching rule
+ ((DropDownChoice) matchingRule.getField()).setDefaultModelObject(taskTO.getMatchingRule() == null
+ ? MatchingRule.UPDATE
+ : taskTO.getMatchingRule());
+ profile.add(matchingRule);
+
+ // set default Unmatching rule
+ ((DropDownChoice) unmatchingRule.getField()).setDefaultModelObject(taskTO.getUnmatchingRule() == null
+ ? UnmatchingRule.PROVISION
+ : taskTO.getUnmatchingRule());
+ profile.add(unmatchingRule);
+
+ final AjaxCheckBoxPanel fullReconciliation = new AjaxCheckBoxPanel("fullReconciliation",
+ getString("fullReconciliation"), new PropertyModel<Boolean>(taskTO, "fullReconciliation"));
+ profile.add(fullReconciliation);
+ }
+
+ @Override
+ protected List<String> getSyncActions() {
+ return taskRestClient.getSyncActionsClasses();
+ }
+
+ @Override
+ public void submitAction(final SchedTaskTO taskTO) {
+ if (taskTO.getKey() > 0) {
+ taskRestClient.updateSyncTask((SyncTaskTO) taskTO);
+ } else {
+ taskRestClient.createSyncTask((SyncTaskTO) taskTO);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/TaskModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/TaskModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/TaskModalPage.java
new file mode 100644
index 0000000..c251d87
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/TaskModalPage.java
@@ -0,0 +1,253 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.NotificationTaskTO;
+import org.apache.syncope.common.lib.to.PropagationTaskTO;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.syncope.common.lib.to.SyncTaskTO;
+import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+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.util.SortableDataProvider;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.springframework.util.StringUtils;
+
+/**
+ * Modal window with Task form (to stop and start execution).
+ */
+public abstract class TaskModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = -4110576026663173545L;
+
+ protected WebMarkupContainer profile;
+
+ protected WebMarkupContainer executions;
+
+ protected Form<AbstractTaskTO> form;
+
+ public TaskModalPage(final AbstractTaskTO taskTO) {
+ final ModalWindow taskExecMessageWin = new ModalWindow("taskExecMessageWin");
+ taskExecMessageWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ taskExecMessageWin.setCookieName("task-exec-message-win-modal");
+ add(taskExecMessageWin);
+
+ form = new Form<>(FORM);
+ form.setModel(new CompoundPropertyModel<>(taskTO));
+ add(form);
+
+ profile = new WebMarkupContainer("profile");
+ profile.setOutputMarkupId(true);
+ form.add(profile);
+
+ executions = new WebMarkupContainer("executionContainer");
+ executions.setOutputMarkupId(true);
+ form.add(executions);
+
+ final Label idLabel = new Label("idLabel", new ResourceModel("key"));
+ profile.add(idLabel);
+
+ final AjaxTextFieldPanel id =
+ new AjaxTextFieldPanel("key", getString("key"), new PropertyModel<String>(taskTO, "key"));
+
+ id.setEnabled(false);
+ profile.add(id);
+
+ final List<IColumn<TaskExecTO, String>> columns = new ArrayList<>();
+
+ final int paginatorRows = 10;
+
+ columns.add(new PropertyColumn<TaskExecTO, String>(new ResourceModel("key"), "key", "key"));
+ columns.add(new DatePropertyColumn<TaskExecTO>(new ResourceModel("startDate"), "startDate", "startDate"));
+ columns.add(new DatePropertyColumn<TaskExecTO>(new ResourceModel("endDate"), "endDate", "endDate"));
+ columns.add(new PropertyColumn<TaskExecTO, String>(new ResourceModel("status"), "status", "status"));
+ columns.add(new ActionColumn<TaskExecTO, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public ActionLinksPanel getActions(final String componentId, final IModel<TaskExecTO> model) {
+
+ final TaskExecTO taskExecutionTO = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ taskExecMessageWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ExecMessageModalPage(model.getObject().getMessage());
+ }
+ });
+ taskExecMessageWin.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, TASKS, StringUtils.hasText(model.getObject().getMessage()));
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ taskRestClient.deleteExecution(taskExecutionTO.getKey());
+
+ taskTO.getExecutions().remove(taskExecutionTO);
+
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+
+ feedbackPanel.refresh(target);
+ target.add(executions);
+ }
+ }, ActionLink.ActionType.DELETE, TASKS);
+
+ return panel;
+ }
+
+ @Override
+ public Component getHeader(final String componentId) {
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(), getPageReference());
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (target != null) {
+ final AjaxFallbackDefaultDataTable<TaskExecTO, String> currentTable =
+ new AjaxFallbackDefaultDataTable<TaskExecTO, String>("executionsTable", columns,
+ new TaskExecutionsProvider(getCurrentTaskExecution(taskTO)), paginatorRows);
+ currentTable.setOutputMarkupId(true);
+ target.add(currentTable);
+ executions.addOrReplace(currentTable);
+ }
+ }
+ }, ActionLink.ActionType.RELOAD, TASKS, "list");
+
+ return panel;
+ }
+ });
+
+ final AjaxFallbackDefaultDataTable<TaskExecTO, String> table =
+ new AjaxFallbackDefaultDataTable<TaskExecTO, String>("executionsTable", columns,
+ new TaskExecutionsProvider(getCurrentTaskExecution(taskTO)), paginatorRows);
+
+ executions.add(table);
+ }
+
+ protected static class TaskExecutionsProvider extends SortableDataProvider<TaskExecTO, String> {
+
+ private static final long serialVersionUID = 8943636537120648961L;
+
+ private SortableDataProviderComparator<TaskExecTO> comparator;
+
+ private AbstractTaskTO taskTO;
+
+ public TaskExecutionsProvider(final AbstractTaskTO taskTO) {
+ //Default sorting
+ this.taskTO = taskTO;
+ setSort("startDate", SortOrder.DESCENDING);
+ comparator = new SortableDataProviderComparator<TaskExecTO>(this);
+ }
+
+ @Override
+ public Iterator<TaskExecTO> iterator(final long first, final long count) {
+
+ List<TaskExecTO> list = taskTO.getExecutions();
+
+ Collections.sort(list, comparator);
+
+ return list.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return taskTO.getExecutions().size();
+ }
+
+ @Override
+ public IModel<TaskExecTO> model(final TaskExecTO taskExecution) {
+
+ return new AbstractReadOnlyModel<TaskExecTO>() {
+
+ private static final long serialVersionUID = 7485475149862342421L;
+
+ @Override
+ public TaskExecTO getObject() {
+ return taskExecution;
+ }
+ };
+ }
+ }
+
+ private AbstractTaskTO getCurrentTaskExecution(final AbstractTaskTO taskTO) {
+ final AbstractTaskTO currentTask = taskTO.getKey() == 0
+ ? taskTO
+ : taskTO instanceof PropagationTaskTO
+ ? taskRestClient.readPropagationTask(taskTO.getKey())
+ : taskTO instanceof NotificationTaskTO
+ ? taskRestClient.readNotificationTask(taskTO.getKey())
+ : taskTO instanceof SyncTaskTO
+ ? taskRestClient.readSchedTask(SyncTaskTO.class, taskTO.getKey())
+ : taskRestClient.readSchedTask(SchedTaskTO.class, taskTO.getKey());
+
+ taskTO.getExecutions().clear();
+ taskTO.getExecutions().addAll(currentTask.getExecutions());
+ return taskTO;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/Tasks.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Tasks.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Tasks.java
new file mode 100644
index 0000000..296c365
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Tasks.java
@@ -0,0 +1,230 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.panels.AjaxDataTablePanel;
+import org.apache.syncope.client.console.panels.NotificationTasks;
+import org.apache.syncope.client.console.panels.PropagationTasks;
+import org.apache.syncope.client.console.panels.PushTasksPanel;
+import org.apache.syncope.client.console.panels.SchedTasks;
+import org.apache.syncope.client.console.panels.SyncTasksPanel;
+import org.apache.syncope.client.console.rest.BaseRestClient;
+import org.apache.syncope.client.console.rest.TaskRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+
+public class Tasks extends BasePage {
+
+ private static final long serialVersionUID = 5289215853622289061L;
+
+ public Tasks() {
+ super();
+
+ add(new PropagationTasks("propagation", getPageReference()));
+ add(new NotificationTasks("notification", getPageReference()));
+ add(new SchedTasks("sched", getPageReference()));
+ add(new SyncTasksPanel("sync", getPageReference()));
+ add(new PushTasksPanel("push", getPageReference()));
+
+ getPageReference();
+ }
+
+ @Override
+ public void setWindowClosedCallback(final ModalWindow window, final WebMarkupContainer container) {
+
+ super.setWindowClosedCallback(window, container);
+ }
+
+ public static class TaskExecutionsProvider extends SortableDataProvider<TaskExecTO, String> {
+
+ private static final long serialVersionUID = -5401263348984206145L;
+
+ private SortableDataProviderComparator<TaskExecTO> comparator;
+
+ private AbstractTaskTO taskTO;
+
+ public TaskExecutionsProvider(final AbstractTaskTO taskTO) {
+ super();
+
+ //Default sorting
+ this.taskTO = taskTO;
+ setSort("startDate", SortOrder.DESCENDING);
+ comparator = new SortableDataProviderComparator<TaskExecTO>(this);
+ }
+
+ @Override
+ public Iterator<TaskExecTO> iterator(final long first, final long count) {
+
+ List<TaskExecTO> list = getTaskDB();
+
+ Collections.sort(list, comparator);
+
+ return list.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return getTaskDB().size();
+ }
+
+ @Override
+ public IModel<TaskExecTO> model(final TaskExecTO taskExecution) {
+
+ return new AbstractReadOnlyModel<TaskExecTO>() {
+
+ private static final long serialVersionUID = 7485475149862342421L;
+
+ @Override
+ public TaskExecTO getObject() {
+ return taskExecution;
+ }
+ };
+ }
+
+ public List<TaskExecTO> getTaskDB() {
+ return taskTO.getExecutions();
+ }
+ }
+
+ public static class TasksProvider<T extends AbstractTaskTO> extends SortableDataProvider<T, String> {
+
+ private static final long serialVersionUID = -20112718133295756L;
+
+ private SortableDataProviderComparator<T> comparator;
+
+ private TaskRestClient restClient;
+
+ private int paginatorRows;
+
+ private String id;
+
+ private Class<T> reference;
+
+ public TasksProvider(
+ final TaskRestClient restClient, final int paginatorRows, final String id, final Class<T> reference) {
+
+ super();
+
+ //Default sorting
+ setSort("key", SortOrder.DESCENDING);
+ comparator = new SortableDataProviderComparator<>(this);
+ this.paginatorRows = paginatorRows;
+ this.restClient = restClient;
+ this.id = id;
+ this.reference = reference;
+ }
+
+ @Override
+ public Iterator<T> iterator(final long first, final long count) {
+ final List<T> tasks = new ArrayList<>();
+
+ final int page = ((int) first / paginatorRows);
+
+ for (T task : restClient.list(reference, (page < 0 ? 0 : page) + 1, paginatorRows, getSort())) {
+ if (task instanceof SchedTaskTO && ((SchedTaskTO) task).getLastExec() == null
+ && task.getExecutions() != null && !task.getExecutions().isEmpty()) {
+
+ Collections.sort(task.getExecutions(), new Comparator<TaskExecTO>() {
+
+ @Override
+ public int compare(final TaskExecTO left, final TaskExecTO right) {
+ return left.getStartDate().compareTo(right.getStartDate());
+ }
+ });
+
+ ((SchedTaskTO) task).setLastExec(task.getExecutions().get(task.getExecutions().size() - 1).
+ getStartDate());
+ }
+ tasks.add(task);
+ }
+
+ Collections.sort(tasks, comparator);
+ return tasks.iterator();
+ }
+
+ @Override
+ public long size() {
+ return restClient.count(id);
+ }
+
+ @Override
+ public IModel<T> model(final T object) {
+ return new CompoundPropertyModel<>(object);
+ }
+ }
+
+ /**
+ * Update task table.
+ *
+ * @param columns columns.
+ * @param dataProvider data provider.
+ * @param container container.
+ * @param currentPage current page index.
+ * @param pageRef page reference
+ * @param restClient syncope base rest client
+ * @return data table.
+ */
+ public static AjaxDataTablePanel<AbstractTaskTO, String> updateTaskTable(
+ final List<IColumn<AbstractTaskTO, String>> columns,
+ final TasksProvider<? extends AbstractTaskTO> dataProvider,
+ final WebMarkupContainer container,
+ final int currentPage,
+ final PageReference pageRef,
+ final BaseRestClient restClient) {
+
+ @SuppressWarnings("unchecked")
+ final AjaxDataTablePanel<AbstractTaskTO, String> table = new AjaxDataTablePanel<>(
+ "datatable",
+ columns,
+ (ISortableDataProvider<AbstractTaskTO, String>) dataProvider,
+ dataProvider.paginatorRows,
+ Arrays.asList(new ActionLink.ActionType[] {
+ ActionLink.ActionType.DELETE, ActionLink.ActionType.DRYRUN, ActionLink.ActionType.EXECUTE }),
+ restClient,
+ "key",
+ TASKS,
+ pageRef);
+
+ table.setCurrentPage(currentPage);
+ table.setOutputMarkupId(true);
+
+ container.addOrReplace(table);
+
+ return table;
+ }
+}
[10/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java b/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java
deleted file mode 100644
index 4e4042d..0000000
--- a/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.report;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.annotation.FormAttributeField;
-import org.apache.syncope.common.types.IntMappingType;
-
-@XmlRootElement(name = "roleReportletConf")
-@XmlType
-public class RoleReportletConf extends AbstractReportletConf {
-
- private static final long serialVersionUID = -8488503068032439699L;
-
- @XmlEnum
- @XmlType(name = "roleReportletConfFeature")
- public enum Feature {
-
- id,
- name,
- roleOwner,
- userOwner,
- entitlements,
- users,
- resources
-
- }
-
- @FormAttributeField(userSearch = true)
- private String matchingCond;
-
- @FormAttributeField(schema = IntMappingType.RoleSchema)
- private final List<String> attrs = new ArrayList<String>();
-
- @FormAttributeField(schema = IntMappingType.RoleDerivedSchema)
- private final List<String> derAttrs = new ArrayList<String>();
-
- @FormAttributeField(schema = IntMappingType.RoleVirtualSchema)
- private final List<String> virAttrs = new ArrayList<String>();
-
- private final List<Feature> features = new ArrayList<Feature>();
-
- public RoleReportletConf() {
- super();
- }
-
- public RoleReportletConf(final String name) {
- super(name);
- }
-
- @XmlElementWrapper(name = "attributes")
- @XmlElement(name = "attribute")
- @JsonProperty("attributes")
- public List<String> getAttrs() {
- return attrs;
- }
-
- @XmlElementWrapper(name = "derivedAttributes")
- @XmlElement(name = "attribute")
- @JsonProperty("derivedAttributes")
- public List<String> getDerAttrs() {
- return derAttrs;
- }
-
- @XmlElementWrapper(name = "virtualAttributes")
- @XmlElement(name = "attribute")
- @JsonProperty("virtualAttributes")
- public List<String> getVirAttrs() {
- return virAttrs;
- }
-
- @XmlElementWrapper(name = "features")
- @XmlElement(name = "feature")
- @JsonProperty("features")
- public List<Feature> getFeatures() {
- return features;
- }
-
- public String getMatchingCond() {
- return matchingCond;
- }
-
- public void setMatchingCond(final String matchingCond) {
- this.matchingCond = matchingCond;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/report/StaticReportletConf.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/report/StaticReportletConf.java b/common/src/main/java/org/apache/syncope/common/report/StaticReportletConf.java
deleted file mode 100644
index 482b939..0000000
--- a/common/src/main/java/org/apache/syncope/common/report/StaticReportletConf.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.report;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.types.TraceLevel;
-
-@XmlRootElement(name = "staticReportletConf")
-@XmlType
-public class StaticReportletConf extends AbstractReportletConf {
-
- private static final long serialVersionUID = -4814950086361753689L;
-
- private String stringField;
-
- private Long longField;
-
- private Double doubleField;
-
- private Date dateField;
-
- private TraceLevel traceLevel;
-
- private final List<String> listField = new ArrayList<String>();
-
- public StaticReportletConf() {
- super();
- }
-
- public StaticReportletConf(final String name) {
- super(name);
- }
-
- public Date getDateField() {
- return dateField == null
- ? null
- : new Date(dateField.getTime());
- }
-
- public void setDateField(Date dateField) {
- this.dateField = dateField == null
- ? null
- : new Date(dateField.getTime());
- }
-
- public Double getDoubleField() {
- return doubleField;
- }
-
- public void setDoubleField(Double doubleField) {
- this.doubleField = doubleField;
- }
-
- @XmlElementWrapper(name = "listField")
- @XmlElement(name = "field")
- @JsonProperty("listField")
- public List<String> getListField() {
- return listField;
- }
-
- public Long getLongField() {
- return longField;
- }
-
- public void setLongField(Long longField) {
- this.longField = longField;
- }
-
- public String getStringField() {
- return stringField;
- }
-
- public void setStringField(String stringField) {
- this.stringField = stringField;
- }
-
- public TraceLevel getTraceLevel() {
- return traceLevel;
- }
-
- public void setTraceLevel(TraceLevel traceLevel) {
- this.traceLevel = traceLevel;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java b/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java
deleted file mode 100644
index cd1cd3e..0000000
--- a/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.report;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.annotation.FormAttributeField;
-import org.apache.syncope.common.types.IntMappingType;
-
-@XmlRootElement(name = "userReportletConf")
-@XmlType
-public class UserReportletConf extends AbstractReportletConf {
-
- @XmlEnum
- @XmlType(name = "userReportletConfFeature")
- public enum Feature {
-
- id,
- username,
- workflowId,
- status,
- creationDate,
- lastLoginDate,
- changePwdDate,
- passwordHistorySize,
- failedLoginCount,
- memberships,
- resources
-
- }
-
- private static final long serialVersionUID = 6602717600064602764L;
-
- @FormAttributeField(userSearch = true)
- private String matchingCond;
-
- @FormAttributeField(schema = IntMappingType.UserSchema)
- private final List<String> attrs = new ArrayList<String>();
-
- @FormAttributeField(schema = IntMappingType.UserDerivedSchema)
- private final List<String> derAttrs = new ArrayList<String>();
-
- @FormAttributeField(schema = IntMappingType.UserVirtualSchema)
- private final List<String> virAttrs = new ArrayList<String>();
-
- private final List<Feature> features = new ArrayList<Feature>();
-
- public UserReportletConf() {
- super();
- }
-
- public UserReportletConf(final String name) {
- super(name);
- }
-
- @XmlElementWrapper(name = "attributes")
- @XmlElement(name = "attribute")
- @JsonProperty("attributes")
- public List<String> getAttrs() {
- return attrs;
- }
-
- @XmlElementWrapper(name = "derivedAttributes")
- @XmlElement(name = "attribute")
- @JsonProperty("derivedAttributes")
- public List<String> getDerAttrs() {
- return derAttrs;
- }
-
- @XmlElementWrapper(name = "virtualAttributes")
- @XmlElement(name = "attribute")
- @JsonProperty("virtualAttributes")
- public List<String> getVirAttrs() {
- return virAttrs;
- }
-
- @XmlElementWrapper(name = "features")
- @XmlElement(name = "feature")
- @JsonProperty("features")
- public List<Feature> getFeatures() {
- return features;
- }
-
- public String getMatchingCond() {
- return matchingCond;
- }
-
- public void setMatchingCond(final String matchingCond) {
- this.matchingCond = matchingCond;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/report/package-info.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/report/package-info.java b/common/src/main/java/org/apache/syncope/common/report/package-info.java
deleted file mode 100644
index 999bb08..0000000
--- a/common/src/main/java/org/apache/syncope/common/report/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
-package org.apache.syncope.common.report;
-
-import javax.xml.bind.annotation.XmlSchema;
-import org.apache.syncope.common.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/reqres/BulkAction.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/reqres/BulkAction.java b/common/src/main/java/org/apache/syncope/common/reqres/BulkAction.java
deleted file mode 100644
index 13fcf8f..0000000
--- a/common/src/main/java/org/apache/syncope/common/reqres/BulkAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.reqres;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlRootElement(name = "bulkAction")
-@XmlType
-public class BulkAction extends AbstractBaseBean {
-
- private static final long serialVersionUID = 1395353278878758961L;
-
- @XmlEnum
- @XmlType(name = "bulkActionType")
- public enum Type {
-
- DELETE,
- REACTIVATE,
- SUSPEND,
- DRYRUN,
- EXECUTE
-
- }
-
- private Type operation;
-
- /**
- * Serialized identifiers.
- */
- private final List<String> targets = new ArrayList<String>();
-
- public Type getOperation() {
- return operation;
- }
-
- public void setOperation(final Type operation) {
- this.operation = operation;
- }
-
- @XmlElementWrapper(name = "targets")
- @XmlElement(name = "target")
- @JsonProperty("targets")
- public List<String> getTargets() {
- return targets;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/reqres/BulkActionResult.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/reqres/BulkActionResult.java b/common/src/main/java/org/apache/syncope/common/reqres/BulkActionResult.java
deleted file mode 100644
index 9c46312..0000000
--- a/common/src/main/java/org/apache/syncope/common/reqres/BulkActionResult.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.reqres;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlRootElement(name = "bulkActionResult")
-@XmlType
-public class BulkActionResult extends AbstractBaseBean {
-
- private static final long serialVersionUID = 2868894178821778133L;
-
- @XmlEnum
- @XmlType(name = "bulkActionStatus")
- public enum Status {
-
- // general bulk action result statuses
- SUCCESS,
- FAILURE,
- // specific propagation task execution statuses
- CREATED,
- SUBMITTED,
- UNSUBMITTED;
-
- }
-
- private final List<Result> results = new ArrayList<Result>();
-
- @XmlElementWrapper(name = "result")
- @XmlElement(name = "item")
- @JsonProperty("result")
- public List<Result> getResult() {
- return results;
- }
-
- @JsonIgnore
- public void add(final Object id, final Status status) {
- if (id != null) {
- results.add(new Result(id.toString(), status));
- }
- }
-
- @JsonIgnore
- public void add(final Object id, final String status) {
- if (id != null) {
- results.add(new Result(id.toString(), Status.valueOf(status.toUpperCase())));
- }
- }
-
- @JsonIgnore
- public Map<String, Status> getResultMap() {
- final Map<String, Status> res = new HashMap<String, Status>();
-
- for (Result result : results) {
- res.put(result.getKey(), result.getValue());
- }
-
- return res;
- }
-
- @JsonIgnore
- public List<String> getResultByStatus(final Status status) {
- final List<String> res = new ArrayList<String>();
-
- for (Result result : results) {
- if (result.getValue() == status) {
- res.add(result.getKey());
- }
- }
-
- return res;
- }
-
- public static class Result extends AbstractBaseBean {
-
- private static final long serialVersionUID = -1149681964161193232L;
-
- private String key;
-
- private Status value;
-
- public Result() {
- super();
- }
-
- public Result(final String key, final Status value) {
- this.key = key;
- this.value = value;
- }
-
- public String getKey() {
- return key;
- }
-
- public Status getValue() {
- return value;
- }
-
- public void setKey(final String key) {
- this.key = key;
- }
-
- public void setValue(final Status value) {
- this.value = value;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/reqres/ErrorTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/reqres/ErrorTO.java b/common/src/main/java/org/apache/syncope/common/reqres/ErrorTO.java
deleted file mode 100644
index 166c986..0000000
--- a/common/src/main/java/org/apache/syncope/common/reqres/ErrorTO.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.reqres;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.types.ClientExceptionType;
-
-@XmlRootElement(name = "error")
-@XmlType
-public class ErrorTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = 2435764161719225927L;
-
- private int status;
-
- private ClientExceptionType type;
-
- private final List<Object> elements = new ArrayList<Object>();
-
- public int getStatus() {
- return status;
- }
-
- public void setStatus(final int status) {
- this.status = status;
- }
-
- public ClientExceptionType getType() {
- return type;
- }
-
- public void setType(final ClientExceptionType type) {
- this.type = type;
- }
-
- @XmlElementWrapper(name = "elements")
- @XmlElement(name = "element")
- @JsonProperty("elements")
- public List<Object> getElements() {
- return elements;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/reqres/PagedResult.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/reqres/PagedResult.java b/common/src/main/java/org/apache/syncope/common/reqres/PagedResult.java
deleted file mode 100644
index fd177cb..0000000
--- a/common/src/main/java/org/apache/syncope/common/reqres/PagedResult.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.reqres;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlRootElement(name = "pagedResult")
-@XmlType
-public class PagedResult<T extends AbstractBaseBean> extends AbstractBaseBean {
-
- private static final long serialVersionUID = 3472875885259250934L;
-
- private URI prev;
-
- private URI next;
-
- private final List<T> result = new ArrayList<T>();
-
- private int page;
-
- private int size;
-
- private int totalCount;
-
- public URI getPrev() {
- return prev;
- }
-
- public void setPrev(final URI prev) {
- this.prev = prev;
- }
-
- public URI getNext() {
- return next;
- }
-
- public void setNext(final URI next) {
- this.next = next;
- }
-
- @XmlElementWrapper(name = "result")
- @XmlElement(name = "item")
- @JsonProperty("result")
- @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
- public List<T> getResult() {
- return result;
- }
-
- public int getPage() {
- return page;
- }
-
- public void setPage(final int page) {
- this.page = page;
- }
-
- public int getSize() {
- return size;
- }
-
- public void setSize(final int size) {
- this.size = size;
- }
-
- public int getTotalCount() {
- return totalCount;
- }
-
- public void setTotalCount(final int totalCount) {
- this.totalCount = totalCount;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/reqres/package-info.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/reqres/package-info.java b/common/src/main/java/org/apache/syncope/common/reqres/package-info.java
deleted file mode 100644
index 6f23599..0000000
--- a/common/src/main/java/org/apache/syncope/common/reqres/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
-package org.apache.syncope.common.reqres;
-
-import javax.xml.bind.annotation.XmlSchema;
-import org.apache.syncope.common.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/search/OrderByClauseBuilder.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/search/OrderByClauseBuilder.java b/common/src/main/java/org/apache/syncope/common/search/OrderByClauseBuilder.java
deleted file mode 100644
index 186fe2e..0000000
--- a/common/src/main/java/org/apache/syncope/common/search/OrderByClauseBuilder.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.search;
-
-import org.apache.commons.lang3.StringUtils;
-
-/**
- * Simple builder for generating <tt>orderby</tt> values.
- */
-public class OrderByClauseBuilder {
-
- private final StringBuilder builder = new StringBuilder();
-
- public OrderByClauseBuilder asc(final String key) {
- builder.append(key).append(" ASC,");
- return this;
- }
-
- public OrderByClauseBuilder desc(final String key) {
- builder.append(key).append(" DESC,");
- return this;
- }
-
- public String build() {
- return builder.length() == 0
- ? StringUtils.EMPTY
- : builder.deleteCharAt(builder.length() - 1).toString();
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/search/RoleFiqlSearchConditionBuilder.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/search/RoleFiqlSearchConditionBuilder.java b/common/src/main/java/org/apache/syncope/common/search/RoleFiqlSearchConditionBuilder.java
deleted file mode 100644
index fb0e730..0000000
--- a/common/src/main/java/org/apache/syncope/common/search/RoleFiqlSearchConditionBuilder.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.search;
-
-import java.util.Map;
-import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition;
-import org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser;
-
-/**
- * Extends <tt>SyncopeFiqlSearchConditionBuilder</tt> by providing some additional facilities for searching
- * roles in Syncope.
- */
-public class RoleFiqlSearchConditionBuilder extends SyncopeFiqlSearchConditionBuilder {
-
- public RoleFiqlSearchConditionBuilder() {
- super();
- }
-
- public RoleFiqlSearchConditionBuilder(final Map<String, String> properties) {
- super(properties);
- }
-
- @Override
- protected Builder newBuilderInstance() {
- return new Builder(properties);
- }
-
- @Override
- public RoleProperty is(final String property) {
- return newBuilderInstance().is(property);
- }
-
- public CompleteCondition hasEntitlements(final String entitlement, final String... moreEntitlements) {
- return newBuilderInstance().is(SpecialAttr.ENTITLEMENTS.toString()).
- hasEntitlements(entitlement, moreEntitlements);
- }
-
- public CompleteCondition hasNotEntitlements(final String entitlement, final String... moreEntitlements) {
- return newBuilderInstance().is(SpecialAttr.ENTITLEMENTS.toString()).
- hasNotEntitlements(entitlement, moreEntitlements);
- }
-
- protected static class Builder extends SyncopeFiqlSearchConditionBuilder.Builder
- implements RoleProperty, CompleteCondition {
-
- public Builder(final Map<String, String> properties) {
- super(properties);
- }
-
- public Builder(final Builder parent) {
- super(parent);
- }
-
- @Override
- public RoleProperty is(final String property) {
- Builder b = new Builder(this);
- b.result = property;
- return b;
- }
-
- @Override
- public CompleteCondition hasEntitlements(final String entitlement, final String... moreEntitlements) {
- this.result = SpecialAttr.ENTITLEMENTS.toString();
- return condition(FiqlParser.EQ, entitlement, (Object[]) moreEntitlements);
- }
-
- @Override
- public CompleteCondition hasNotEntitlements(final String entitlement, final String... moreEntitlements) {
- this.result = SpecialAttr.ENTITLEMENTS.toString();
- return condition(FiqlParser.NEQ, entitlement, (Object[]) moreEntitlements);
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/search/RoleProperty.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/search/RoleProperty.java b/common/src/main/java/org/apache/syncope/common/search/RoleProperty.java
deleted file mode 100644
index 70938e1..0000000
--- a/common/src/main/java/org/apache/syncope/common/search/RoleProperty.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.search;
-
-import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition;
-
-public interface RoleProperty extends SyncopeProperty {
-
- CompleteCondition hasEntitlements(String entitlement, String... moreEntitlements);
-
- CompleteCondition hasNotEntitlements(String entitlement, String... moreEntitlements);
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/search/SearchableFields.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/search/SearchableFields.java b/common/src/main/java/org/apache/syncope/common/search/SearchableFields.java
deleted file mode 100644
index ce06934..0000000
--- a/common/src/main/java/org/apache/syncope/common/search/SearchableFields.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.search;
-
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import org.apache.commons.lang3.ArrayUtils;
-import org.apache.syncope.common.to.AbstractAttributableTO;
-import org.apache.syncope.common.to.RoleTO;
-import org.apache.syncope.common.to.UserTO;
-import org.apache.syncope.common.types.SubjectType;
-
-public class SearchableFields {
-
- protected static final String[] ATTRIBUTES_NOTINCLUDED = {
- "attrs", "derAttrs", "virAttrs",
- "serialVersionUID", "memberships", "entitlements", "resources", "password",
- "propagationTOs", "propagationStatusMap"
- };
-
- public static final List<String> get(final SubjectType subjectType) {
- return get(subjectType == SubjectType.USER
- ? UserTO.class
- : RoleTO.class);
- }
-
- public static final List<String> get(final Class<? extends AbstractAttributableTO> attributableRef) {
- final List<String> fieldNames = new ArrayList<String>();
-
- // loop on class and all superclasses searching for field
- Class<?> clazz = attributableRef;
- while (clazz != null && clazz != Object.class) {
- for (Field field : clazz.getDeclaredFields()) {
- if (!ArrayUtils.contains(ATTRIBUTES_NOTINCLUDED, field.getName())) {
- fieldNames.add(field.getName());
- }
- }
- clazz = clazz.getSuperclass();
- }
-
- Collections.reverse(fieldNames);
- return fieldNames;
-
- }
-
- private SearchableFields() {
- // empty constructor for static utility class
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/search/SpecialAttr.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/search/SpecialAttr.java b/common/src/main/java/org/apache/syncope/common/search/SpecialAttr.java
deleted file mode 100644
index 35572c6..0000000
--- a/common/src/main/java/org/apache/syncope/common/search/SpecialAttr.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.search;
-
-public enum SpecialAttr {
-
- NULL("$null"),
- RESOURCES("$resources"),
- ROLES("$roles"),
- ENTITLEMENTS("$entitlements");
-
- private final String literal;
-
- SpecialAttr(final String literal) {
- this.literal = literal;
- }
-
- public static SpecialAttr fromString(final String value) {
- SpecialAttr result = null;
- for (SpecialAttr specialAttr : values()) {
- if (specialAttr.literal.equals(value)) {
- result = specialAttr;
- }
- }
-
- return result;
- }
-
- @Override
- public String toString() {
- return literal;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/search/SyncopeFiqlSearchConditionBuilder.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/search/SyncopeFiqlSearchConditionBuilder.java b/common/src/main/java/org/apache/syncope/common/search/SyncopeFiqlSearchConditionBuilder.java
deleted file mode 100644
index 17bb608..0000000
--- a/common/src/main/java/org/apache/syncope/common/search/SyncopeFiqlSearchConditionBuilder.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.search;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.cxf.jaxrs.ext.search.SearchUtils;
-import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition;
-import org.apache.cxf.jaxrs.ext.search.client.FiqlSearchConditionBuilder;
-import org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser;
-
-public abstract class SyncopeFiqlSearchConditionBuilder extends FiqlSearchConditionBuilder {
-
- public static final Map<String, String> CONTEXTUAL_PROPERTIES;
-
- static {
- CONTEXTUAL_PROPERTIES = new HashMap<String, String>();
- CONTEXTUAL_PROPERTIES.put(SearchUtils.LAX_PROPERTY_MATCH, "true");
- }
-
- protected SyncopeFiqlSearchConditionBuilder() {
- super();
- }
-
- protected SyncopeFiqlSearchConditionBuilder(final Map<String, String> properties) {
- super(properties);
- }
-
- @Override
- protected Builder newBuilderInstance() {
- return new Builder(properties);
- }
-
- public SyncopeProperty is(final String property) {
- return newBuilderInstance().is(property);
- }
-
- public CompleteCondition isNull(final String property) {
- return newBuilderInstance().is(property).nullValue();
- }
-
- public CompleteCondition isNotNull(final String property) {
- return newBuilderInstance().is(property).notNullValue();
- }
-
- public CompleteCondition hasResources(final String resource, final String... moreResources) {
- return newBuilderInstance().is(SpecialAttr.RESOURCES.toString()).hasResources(resource, moreResources);
- }
-
- public CompleteCondition hasNotResources(final String resource, final String... moreResources) {
- return newBuilderInstance().is(SpecialAttr.RESOURCES.toString()).hasNotResources(resource, moreResources);
- }
-
- protected static class Builder extends FiqlSearchConditionBuilder.Builder
- implements SyncopeProperty, CompleteCondition {
-
- protected Builder(final Map<String, String> properties) {
- super(properties);
- }
-
- protected Builder(final Builder parent) {
- super(parent);
- }
-
- @Override
- public SyncopeProperty is(final String property) {
- Builder b = new Builder(this);
- b.result = property;
- return b;
- }
-
- @Override
- public CompleteCondition nullValue() {
- return condition(FiqlParser.EQ, SpecialAttr.NULL);
- }
-
- @Override
- public CompleteCondition notNullValue() {
- return condition(FiqlParser.NEQ, SpecialAttr.NULL);
- }
-
- @Override
- public CompleteCondition hasResources(final String resource, final String... moreResources) {
- this.result = SpecialAttr.RESOURCES.toString();
- return condition(FiqlParser.EQ, resource, (Object[]) moreResources);
- }
-
- @Override
- public CompleteCondition hasNotResources(final String resource, final String... moreResources) {
- this.result = SpecialAttr.RESOURCES.toString();
- return condition(FiqlParser.NEQ, resource, (Object[]) moreResources);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/search/SyncopeProperty.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/search/SyncopeProperty.java b/common/src/main/java/org/apache/syncope/common/search/SyncopeProperty.java
deleted file mode 100644
index 782d31a..0000000
--- a/common/src/main/java/org/apache/syncope/common/search/SyncopeProperty.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.search;
-
-import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition;
-import org.apache.cxf.jaxrs.ext.search.client.Property;
-
-/**
- * Extension of fluent interface, for {@link SyncopeFiqlSearchConditionBuilder}.
- */
-public abstract interface SyncopeProperty extends Property {
-
- CompleteCondition nullValue();
-
- CompleteCondition notNullValue();
-
- CompleteCondition hasResources(String resource, String... moreResources);
-
- CompleteCondition hasNotResources(String resource, String... moreResources);
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/search/UserFiqlSearchConditionBuilder.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/search/UserFiqlSearchConditionBuilder.java b/common/src/main/java/org/apache/syncope/common/search/UserFiqlSearchConditionBuilder.java
deleted file mode 100644
index 6268544..0000000
--- a/common/src/main/java/org/apache/syncope/common/search/UserFiqlSearchConditionBuilder.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.search;
-
-import java.util.Map;
-import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition;
-import org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser;
-
-/**
- * Extends <tt>SyncopeFiqlSearchConditionBuilder</tt> by providing some additional facilities for searching
- * users in Syncope.
- */
-public class UserFiqlSearchConditionBuilder extends SyncopeFiqlSearchConditionBuilder {
-
- public UserFiqlSearchConditionBuilder() {
- super();
- }
-
- public UserFiqlSearchConditionBuilder(final Map<String, String> properties) {
- super(properties);
- }
-
- @Override
- protected Builder newBuilderInstance() {
- return new Builder(properties);
- }
-
- @Override
- public UserProperty is(final String property) {
- return newBuilderInstance().is(property);
- }
-
- public CompleteCondition hasRoles(final Long role, final Long... moreRoles) {
- return newBuilderInstance().is(SpecialAttr.ROLES.toString()).hasRoles(role, moreRoles);
- }
-
- public CompleteCondition hasNotRoles(final Long role, final Long... moreRoles) {
- return newBuilderInstance().is(SpecialAttr.ROLES.toString()).hasNotRoles(role, moreRoles);
- }
-
- public CompleteCondition hasResources(final String resource, final String... moreResources) {
- return newBuilderInstance().is(SpecialAttr.RESOURCES.toString()).hasResources(resource, moreResources);
- }
-
- public CompleteCondition hasNotResources(final String resource, final String... moreResources) {
- return newBuilderInstance().is(SpecialAttr.RESOURCES.toString()).hasNotResources(resource, moreResources);
- }
-
- protected static class Builder extends SyncopeFiqlSearchConditionBuilder.Builder
- implements UserProperty, CompleteCondition {
-
- public Builder(final Map<String, String> properties) {
- super(properties);
- }
-
- public Builder(final Builder parent) {
- super(parent);
- }
-
- @Override
- public UserProperty is(final String property) {
- Builder b = new Builder(this);
- b.result = property;
- return b;
- }
-
- @Override
- public CompleteCondition hasRoles(final Long role, final Long... moreRoles) {
- this.result = SpecialAttr.ROLES.toString();
- return condition(FiqlParser.EQ, role, (Object[]) moreRoles);
- }
-
- @Override
- public CompleteCondition hasNotRoles(final Long role, final Long... moreRoles) {
- this.result = SpecialAttr.ROLES.toString();
- return condition(FiqlParser.NEQ, role, (Object[]) moreRoles);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/search/UserProperty.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/search/UserProperty.java b/common/src/main/java/org/apache/syncope/common/search/UserProperty.java
deleted file mode 100644
index ea8766e..0000000
--- a/common/src/main/java/org/apache/syncope/common/search/UserProperty.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.search;
-
-import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition;
-
-public interface UserProperty extends SyncopeProperty {
-
- CompleteCondition hasRoles(Long role, Long... moreRoles);
-
- CompleteCondition hasNotRoles(Long role, Long... moreRoles);
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/ConfigurationService.java b/common/src/main/java/org/apache/syncope/common/services/ConfigurationService.java
deleted file mode 100644
index c678bb7..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/ConfigurationService.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.syncope.common.to.AttributeTO;
-import org.apache.syncope.common.to.ConfTO;
-import org.apache.syncope.common.wrap.MailTemplate;
-import org.apache.syncope.common.wrap.Validator;
-
-/**
- * REST operations for configuration.
- */
-@Path("configurations")
-public interface ConfigurationService extends JAXRSService {
-
- /**
- * Exports internal storage content as downloadable XML file.
- *
- * @return internal storage content as downloadable XML file
- */
- @GET
- @Path("stream")
- Response export();
-
- /**
- * Returns a list of known mail-template names.
- *
- * @return a list of known mail-template names
- */
- @GET
- @Path("mailTemplates")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<MailTemplate> getMailTemplates();
-
- /**
- * Returns a list of known validator names.
- *
- * @return a list of known validator names
- */
- @GET
- @Path("validators")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<Validator> getValidators();
-
- /**
- * Returns all configuration parameters.
- *
- * @return all configuration parameters
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- ConfTO list();
-
- /**
- * Returns configuration parameter with matching key.
- *
- * @param key identifier of configuration to be read
- * @return configuration parameter with matching key
- */
- @GET
- @Path("{key}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- AttributeTO read(@NotNull @PathParam("key") String key);
-
- /**
- * Creates / updates the configuration parameter with the given key.
- *
- * @param key parameter key
- * @param value parameter value
- */
- @PUT
- @Path("{key}")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- void set(@NotNull @PathParam("key") String key, @NotNull AttributeTO value);
-
- /**
- * Deletes the configuration parameter with matching key.
- *
- * @param key configuration parameter key
- */
- @DELETE
- @Path("{key}")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- void delete(@NotNull @PathParam("key") String key);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/ConnectorService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/ConnectorService.java b/common/src/main/java/org/apache/syncope/common/services/ConnectorService.java
deleted file mode 100644
index 0e4ff92..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/ConnectorService.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-
-import org.apache.syncope.common.reqres.BulkAction;
-import org.apache.syncope.common.reqres.BulkActionResult;
-import org.apache.syncope.common.to.ConnBundleTO;
-import org.apache.syncope.common.to.ConnIdObjectClassTO;
-import org.apache.syncope.common.to.ConnInstanceTO;
-import org.apache.syncope.common.to.SchemaTO;
-import org.apache.syncope.common.types.ConnConfProperty;
-
-/**
- * REST operations for connector bundles and instances.
- */
-@Path("connectors")
-public interface ConnectorService extends JAXRSService {
-
- /**
- * Returns available connector bundles with property keys in selected language.
- *
- * @param lang language to select property keys; default language is English
- * @return available connector bundles with property keys in selected language
- */
- @GET
- @Path("bundles")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<ConnBundleTO> getBundles(@QueryParam("lang") String lang);
-
- /**
- * Returns configuration for given connector instance.
- *
- * @param connInstanceId connector instance id to read configuration from
- * @return configuration for given connector instance
- */
- @GET
- @Path("{connInstanceId}/configuration")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<ConnConfProperty> getConfigurationProperties(@NotNull @PathParam("connInstanceId") Long connInstanceId);
-
- /**
- * Returns schema names for connector bundle matching the given connector instance id.
- *
- * @param connInstanceId connector instance id to be used for schema lookup
- * @param connInstanceTO connector instance object to provide special configuration properties
- * @param includeSpecial if set to true, special schema names (like '__PASSWORD__') will be included;
- * default is false
- * @return schema names for connector bundle matching the given connector instance id
- */
- @POST
- @Path("{connInstanceId}/schemaNames")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<SchemaTO> getSchemaNames(@NotNull @PathParam("connInstanceId") Long connInstanceId,
- @NotNull ConnInstanceTO connInstanceTO,
- @QueryParam("includeSpecial") @DefaultValue("false") boolean includeSpecial);
-
- /**
- * Returns supported object classes for connector bundle matching the given connector instance id.
- *
- * @param connInstanceId connector instance id to be used for schema lookup
- * @param connInstanceTO connector instance object to provide special configuration properties
- * @return supported object classes for connector bundle matching the given connector instance id
- */
- @POST
- @Path("{connInstanceId}/supportedObjectClasses")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<ConnIdObjectClassTO> getSupportedObjectClasses(
- @NotNull @PathParam("connInstanceId") Long connInstanceId,
- @NotNull ConnInstanceTO connInstanceTO);
-
- /**
- * Returns connector instance with matching id.
- *
- * @param connInstanceId connector instance id to be read
- * @return connector instance with matching id
- */
- @GET
- @Path("{connInstanceId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- ConnInstanceTO read(@NotNull @PathParam("connInstanceId") Long connInstanceId);
-
- /**
- * Returns connector instance for matching resource.
- *
- * @param resourceName resource name to be used for connector lookup
- * @return connector instance for matching resource
- */
- @GET
- @Path("byResource/{resourceName}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- ConnInstanceTO readByResource(@NotNull @PathParam("resourceName") String resourceName);
-
- /**
- * Returns a list of all connector instances with property keys in the matching language.
- *
- * @param lang language to select property keys, null for default (English).
- * An ISO 639 alpha-2 or alpha-3 language code, or a language subtag up to 8 characters in length.
- * @return list of all connector instances with property keys in the matching language
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<ConnInstanceTO> list(@QueryParam("lang") String lang);
-
- /**
- * Creates a new connector instance.
- *
- * @param connInstanceTO connector instance to be created
- * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created connector instance
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring <tt>Location</tt> header of created connector instance")
- })
- @POST
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response create(@NotNull ConnInstanceTO connInstanceTO);
-
- /**
- * Updates the connector instance matching the provided id.
- *
- * @param connInstanceId connector instance id to be updated
- * @param connInstanceTO connector instance to be stored
- */
- @PUT
- @Path("{connInstanceId}")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- void update(@NotNull @PathParam("connInstanceId") Long connInstanceId, @NotNull ConnInstanceTO connInstanceTO);
-
- /**
- * Deletes the connector instance matching the provided id.
- *
- * @param connInstanceId connector instance id to be deleted
- */
- @DELETE
- @Path("{connInstanceId}")
- void delete(@NotNull @PathParam("connInstanceId") Long connInstanceId);
-
- /**
- * @param connInstanceTO connector instance to be used for connection check
- * @return true if connection could be established
- */
- @POST
- @Path("check")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- boolean check(@NotNull ConnInstanceTO connInstanceTO);
-
- /**
- * Reload all connector bundles and instances.
- */
- @POST
- @Path("reload")
- void reload();
-
- /**
- * Executes the provided bulk action.
- *
- * @param bulkAction list of connector instance ids against which the bulk action will be performed.
- * @return Bulk action result
- */
- @POST
- @Path("bulk")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- BulkActionResult bulk(@NotNull BulkAction bulkAction);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/EntitlementService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/EntitlementService.java b/common/src/main/java/org/apache/syncope/common/services/EntitlementService.java
deleted file mode 100644
index be2efea..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/EntitlementService.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.syncope.common.wrap.EntitlementTO;
-
-/**
- * REST operations for entitlements.
- */
-@Path("entitlements")
-public interface EntitlementService extends JAXRSService {
-
- /**
- * Returns a list of all known entitlements.
- *
- * @return list of all known entitlements
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<EntitlementTO> getAllEntitlements();
-
- /**
- * Returns a list of entitlements assigned to user making the current request.
- *
- * @return list of entitlements assigned to user making the current request
- */
- @GET
- @Path("own")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<EntitlementTO> getOwnEntitlements();
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/JAXRSService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/JAXRSService.java b/common/src/main/java/org/apache/syncope/common/services/JAXRSService.java
deleted file mode 100644
index c801bb1..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/JAXRSService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-public interface JAXRSService {
-
- final String PARAM_FIQL = "fiql";
-
- final String PARAM_PAGE = "page";
-
- final String DEFAULT_PARAM_PAGE = "1";
-
- final int DEFAULT_PARAM_PAGE_VALUE = Integer.valueOf(DEFAULT_PARAM_PAGE);
-
- final String PARAM_SIZE = "size";
-
- final String DEFAULT_PARAM_SIZE = "25";
-
- final int DEFAULT_PARAM_SIZE_VALUE = Integer.valueOf(DEFAULT_PARAM_SIZE);
-
- final String PARAM_ORDERBY = "orderby";
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/LoggerService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/LoggerService.java b/common/src/main/java/org/apache/syncope/common/services/LoggerService.java
deleted file mode 100644
index 173c046..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/LoggerService.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.syncope.common.to.EventCategoryTO;
-import org.apache.syncope.common.to.LoggerTO;
-import org.apache.syncope.common.types.LoggerType;
-
-/**
- * REST operations for logging and auditing.
- */
-@Path("logger")
-public interface LoggerService extends JAXRSService {
-
- /**
- * Returns a list of all managed events in audit.
- *
- * @return list of all managed events in audit
- */
- @GET
- @Path("events")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<EventCategoryTO> events();
-
- /**
- * Returns logger with matching type and name.
- *
- * @param type LoggerType to be selected.
- * @param name Logger name to be read
- * @return logger with matching type and name
- */
- @GET
- @Path("{type}/{name}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- LoggerTO read(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") final String name);
-
- /**
- * Returns a list of loggers with matching type.
- *
- * @param type LoggerType to be selected
- * @return list of loggers with matching type
- */
- @GET
- @Path("{type}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<LoggerTO> list(@NotNull @PathParam("type") LoggerType type);
-
- /**
- * Creates or updates (if existing) the logger with matching name.
- *
- * @param type LoggerType to be selected
- * @param name Logger name to be updated
- * @param logger Logger to be created or updated
- */
- @PUT
- @Path("{type}/{name}")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- void update(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") String name,
- @NotNull LoggerTO logger);
-
- /**
- * Deletes the logger with matching name.
- *
- * @param type LoggerType to be selected
- * @param name Logger name to be deleted
- */
- @DELETE
- @Path("{type}/{name}")
- void delete(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") String name);
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/NotificationService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/NotificationService.java b/common/src/main/java/org/apache/syncope/common/services/NotificationService.java
deleted file mode 100644
index efba417..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/NotificationService.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-
-import org.apache.syncope.common.to.NotificationTO;
-
-/**
- * REST operations for notifications.
- */
-@Path("notifications")
-public interface NotificationService extends JAXRSService {
-
- /**
- * Returns notification with matching id.
- *
- * @param notificationId id of notification to be read
- * @return notification with matching id
- */
- @GET
- @Path("{notificationId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- NotificationTO read(@NotNull @PathParam("notificationId") Long notificationId);
-
- /**
- * Returns a list of all notifications.
- *
- * @return list of all notifications.
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<NotificationTO> list();
-
- /**
- * Creates a new notification.
- *
- * @param notificationTO Creates a new notification.
- * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created notification
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring <tt>Location</tt> header of created notification")
- })
- @POST
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response create(@NotNull NotificationTO notificationTO);
-
- /**
- * Updates the notification matching the given id.
- *
- * @param notificationId id of notification to be updated
- * @param notificationTO notification to be stored
- */
- @PUT
- @Path("{notificationId}")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- void update(@NotNull @PathParam("notificationId") Long notificationId, @NotNull NotificationTO notificationTO);
-
- /**
- * Deletes the notification matching the given id.
- *
- * @param notificationId id for notification to be deleted
- */
- @DELETE
- @Path("{notificationId}")
- void delete(@NotNull @PathParam("notificationId") Long notificationId);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/PolicyService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/PolicyService.java b/common/src/main/java/org/apache/syncope/common/services/PolicyService.java
deleted file mode 100644
index 99010d8..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/PolicyService.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.MatrixParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.wrap.CorrelationRuleClass;
-import org.apache.syncope.common.to.AbstractPolicyTO;
-import org.apache.syncope.common.types.PolicyType;
-
-/**
- * REST operations for policies.
- */
-@Path("policies")
-public interface PolicyService extends JAXRSService {
-
- /**
- * Returns a list of classes to be used as correlation rules.
- *
- * @return list of classes to be used as correlation rules
- */
- @GET
- @Path("syncCorrelationRuleClasses")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<CorrelationRuleClass> getSyncCorrelationRuleClasses();
-
- /**
- * Returns the policy matching the given id.
- *
- * @param policyId id of requested policy
- * @param <T> response type (extending PolicyTO)
- * @return policy with matching id
- */
- @GET
- @Path("{policyId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractPolicyTO> T read(@NotNull @PathParam("policyId") Long policyId);
-
- /**
- * Returns the global policy for the given type.
- *
- * @param type PolicyType to read global policy from
- * @param <T> response type (extending PolicyTO)
- * @return global policy for matching type
- */
- @GET
- @Path("global")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractPolicyTO> T readGlobal(@NotNull @MatrixParam("type") PolicyType type);
-
- /**
- * Returns a list of policies of the matching type.
- *
- * @param type Type selector for requested policies
- * @param <T> response type (extending PolicyTO)
- * @return list of policies with matching type
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractPolicyTO> List<T> list(@NotNull @MatrixParam("type") PolicyType type);
-
- /**
- * Create a new policy.
- *
- * @param policyTO Policy to be created (needs to match type)
- * @param <T> response type (extending PolicyTO)
- * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created policy
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE, value = "Featuring <tt>Location</tt> header of created policy")
- })
- @POST
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractPolicyTO> Response create(@NotNull T policyTO);
-
- /**
- * Updates policy matching the given id.
- *
- * @param policyId id of policy to be updated
- * @param policyTO Policy to replace existing policy
- * @param <T> response type (extending PolicyTO)
- */
- @PUT
- @Path("{policyId}")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractPolicyTO> void update(@NotNull @PathParam("policyId") Long policyId, @NotNull T policyTO);
-
- /**
- * Delete policy matching the given id.
- *
- * @param policyId id of policy to be deleted
- * @param <T> response type (extending PolicyTO)
- */
- @DELETE
- @Path("{policyId}")
- <T extends AbstractPolicyTO> void delete(@NotNull @PathParam("policyId") Long policyId);
-
-}
[08/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/AbstractPolicyTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/AbstractPolicyTO.java b/common/src/main/java/org/apache/syncope/common/to/AbstractPolicyTO.java
deleted file mode 100644
index d541556..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/AbstractPolicyTO.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.types.PolicyType;
-
-@XmlRootElement(name = "abstractPolicy")
-@XmlType
-@XmlSeeAlso({ AccountPolicyTO.class, PasswordPolicyTO.class, SyncPolicyTO.class })
-@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
-public abstract class AbstractPolicyTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = -2903888572649721035L;
-
- private long id;
-
- private String description;
-
- private PolicyType type;
-
- private final List<String> usedByResources = new ArrayList<String>();
-
- private final List<Long> usedByRoles = new ArrayList<Long>();
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(final String description) {
- this.description = description;
- }
-
- public PolicyType getType() {
- return type;
- }
-
- public void setType(final PolicyType type) {
- this.type = type;
- }
-
- @XmlElementWrapper(name = "usedByResources")
- @XmlElement(name = "resource")
- @JsonProperty("usedByResources")
- public List<String> getUsedByResources() {
- return usedByResources;
- }
-
- @XmlElementWrapper(name = "usedByRoles")
- @XmlElement(name = "role")
- @JsonProperty("usedByRoles")
- public List<Long> getUsedByRoles() {
- return usedByRoles;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java b/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java
deleted file mode 100644
index 7742f84..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlRootElement(name = "abstractSchema")
-@XmlType
-@XmlSeeAlso({ SchemaTO.class, DerSchemaTO.class, VirSchemaTO.class })
-@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
-public abstract class AbstractSchemaTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = 4088388951694301759L;
-
- private String name;
-
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/AbstractSubjectTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/AbstractSubjectTO.java b/common/src/main/java/org/apache/syncope/common/to/AbstractSubjectTO.java
deleted file mode 100644
index 9cfae4e..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/AbstractSubjectTO.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlType
-public abstract class AbstractSubjectTO extends AbstractAttributableTO {
-
- private static final long serialVersionUID = 114668706977919206L;
-
- private final Set<String> resources = new HashSet<String>();
-
- private final List<PropagationStatus> propagationStatusTOs = new ArrayList<PropagationStatus>();
-
- @XmlElementWrapper(name = "resources")
- @XmlElement(name = "resource")
- @JsonProperty("resources")
- public Set<String> getResources() {
- return resources;
- }
-
- public boolean removePropagationTO(final String resource) {
- if (resource != null && getPropagationStatusTOs().isEmpty()) {
- final List<PropagationStatus> toBeRemoved = new ArrayList<PropagationStatus>();
-
- for (PropagationStatus propagationTO : getPropagationStatusTOs()) {
- if (resource.equals(propagationTO.getResource())) {
- toBeRemoved.add(propagationTO);
- }
- }
-
- return propagationStatusTOs.removeAll(toBeRemoved);
- }
- return false;
- }
-
- @XmlElementWrapper(name = "propagationStatuses")
- @XmlElement(name = "propagationStatus")
- @JsonProperty("propagationStatuses")
- public List<PropagationStatus> getPropagationStatusTOs() {
- return propagationStatusTOs;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/AbstractSyncTaskTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/AbstractSyncTaskTO.java b/common/src/main/java/org/apache/syncope/common/to/AbstractSyncTaskTO.java
deleted file mode 100644
index 8d6c129..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/AbstractSyncTaskTO.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.types.MatchingRule;
-import org.apache.syncope.common.types.UnmatchingRule;
-
-@XmlRootElement(name = "abstractSyncTask")
-@XmlType
-@XmlSeeAlso({ PushTaskTO.class, SyncTaskTO.class })
-public class AbstractSyncTaskTO extends SchedTaskTO {
-
- private static final long serialVersionUID = -2143537546915809016L;
-
- private String resource;
-
- private boolean performCreate;
-
- private boolean performUpdate;
-
- private boolean performDelete;
-
- private boolean syncStatus;
-
- private UnmatchingRule unmatchingRule;
-
- private MatchingRule matchingRule;
-
- private List<String> actionsClassNames = new ArrayList<String>();
-
- public String getResource() {
- return resource;
- }
-
- public void setResource(String resource) {
- this.resource = resource;
- }
-
- public boolean isPerformCreate() {
- return performCreate;
- }
-
- public void setPerformCreate(boolean performCreate) {
- this.performCreate = performCreate;
- }
-
- public boolean isPerformUpdate() {
- return performUpdate;
- }
-
- public void setPerformUpdate(boolean performUpdate) {
- this.performUpdate = performUpdate;
- }
-
- public boolean isPerformDelete() {
- return performDelete;
- }
-
- public void setPerformDelete(boolean performDelete) {
- this.performDelete = performDelete;
- }
-
- public boolean isSyncStatus() {
- return syncStatus;
- }
-
- public void setSyncStatus(boolean syncStatus) {
- this.syncStatus = syncStatus;
- }
-
- @XmlElementWrapper(name = "actionsClassNames")
- @XmlElement(name = "actionsClassName")
- @JsonProperty("actionsClassNames")
- public List<String> getActionsClassNames() {
- return actionsClassNames;
- }
-
- public UnmatchingRule getUnmatchingRule() {
- return unmatchingRule;
- }
-
- public void setUnmatchingRule(final UnmatchingRule unmatchigRule) {
- this.unmatchingRule = unmatchigRule;
- }
-
- public MatchingRule getMatchingRule() {
- return matchingRule;
- }
-
- public void setMatchingRule(final MatchingRule matchigRule) {
- this.matchingRule = matchigRule;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/AbstractSysInfoTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/AbstractSysInfoTO.java b/common/src/main/java/org/apache/syncope/common/to/AbstractSysInfoTO.java
deleted file mode 100644
index 7790a3c..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/AbstractSysInfoTO.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import java.util.Date;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.common.AbstractBaseBean;
-
-/**
- * Abstract wrapper for common system information.
- */
-@XmlType
-public class AbstractSysInfoTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = -930797879027642457L;
-
- /**
- * Username of the user that has created this profile.
- * <p>
- * Cannot be used a reference to an existing user for two main reasons: the creator can be the user <tt>admin</tt>;
- * the creator could have been removed.
- */
- private String creator;
-
- /**
- * Creation date.
- */
- private Date creationDate;
-
- /**
- * Username of the user that has performed the last modification to this profile.
- * <p>
- * This field cannot be null: at creation time it have to be initialized with the creator username.
- * <p>
- * The modifier can be the user itself whether the last performed change has been a self-modification.
- * <p>
- * Cannot be used a reference to an existing user for two main reasons: the modifier can be the user <tt>admin</tt>;
- * the modifier could have been removed.
- */
- private String lastModifier;
-
- /**
- * Last change date.
- * <p>
- * This field cannot be null: at creation time it has to be initialized with <tt>creationDate</tt> field value.
- */
- private Date lastChangeDate;
-
- public String getCreator() {
- return creator;
- }
-
- public void setCreator(final String creator) {
- this.creator = creator;
- }
-
- public Date getCreationDate() {
- return creationDate;
- }
-
- public void setCreationDate(final Date creationDate) {
- this.creationDate = creationDate;
- }
-
- public String getLastModifier() {
- return lastModifier;
- }
-
- public void setLastModifier(final String lastModifier) {
- this.lastModifier = lastModifier;
- }
-
- public Date getLastChangeDate() {
- return lastChangeDate;
- }
-
- public void setLastChangeDate(final Date lastChangeDate) {
- this.lastChangeDate = lastChangeDate;
- }
-
- @JsonIgnore
- public String getETagValue() {
- Date etagDate = getLastChangeDate() == null
- ? getCreationDate() : getLastChangeDate();
- return etagDate == null
- ? StringUtils.EMPTY
- : String.valueOf(etagDate.getTime());
-
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java b/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java
deleted file mode 100644
index 518f985..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlRootElement(name = "abstractTask")
-@XmlType
-@XmlSeeAlso({ PropagationTaskTO.class, SchedTaskTO.class, NotificationTaskTO.class })
-@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
-public abstract class AbstractTaskTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = 386450127003321197L;
-
- private long id;
-
- private String latestExecStatus;
-
- private List<TaskExecTO> executions = new ArrayList<TaskExecTO>();
-
- private Date startDate;
-
- private Date endDate;
-
- public long getId() {
- return id;
- }
-
- public void setId(final long id) {
- this.id = id;
- }
-
- public String getLatestExecStatus() {
- return latestExecStatus;
- }
-
- public void setLatestExecStatus(final String latestExecStatus) {
- this.latestExecStatus = latestExecStatus;
- }
-
- @XmlElementWrapper(name = "executions")
- @XmlElement(name = "execution")
- @JsonProperty("executions")
- public List<TaskExecTO> getExecutions() {
- return executions;
- }
-
- public Date getStartDate() {
- return startDate == null
- ? null
- : new Date(startDate.getTime());
- }
-
- public void setStartDate(final Date startDate) {
- if (startDate != null) {
- this.startDate = new Date(startDate.getTime());
- }
- }
-
- public Date getEndDate() {
- return endDate == null
- ? null
- : new Date(endDate.getTime());
- }
-
- public void setEndDate(final Date endDate) {
- if (endDate != null) {
- this.endDate = new Date(endDate.getTime());
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/AccountPolicyTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/AccountPolicyTO.java b/common/src/main/java/org/apache/syncope/common/to/AccountPolicyTO.java
deleted file mode 100644
index 34dce95..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/AccountPolicyTO.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.types.AccountPolicySpec;
-import org.apache.syncope.common.types.PolicyType;
-
-@XmlRootElement(name = "accountPolicy")
-@XmlType
-public class AccountPolicyTO extends AbstractPolicyTO {
-
- private static final long serialVersionUID = -1557150042828800134L;
-
- private AccountPolicySpec specification;
-
- private final List<String> resources = new ArrayList<String>();
-
- public AccountPolicyTO() {
- this(false);
- }
-
- public AccountPolicyTO(boolean global) {
- super();
-
- PolicyType type = global
- ? PolicyType.GLOBAL_ACCOUNT
- : PolicyType.ACCOUNT;
- setType(type);
- }
-
- public void setSpecification(final AccountPolicySpec specification) {
- this.specification = specification;
- }
-
- public AccountPolicySpec getSpecification() {
- return specification;
- }
-
- @XmlElementWrapper(name = "resources")
- @XmlElement(name = "resource")
- @JsonProperty("resources")
- public List<String> getResources() {
- return resources;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java b/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java
deleted file mode 100644
index 0e4d55d..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlRootElement(name = "attribute")
-@XmlType
-public class AttributeTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = 4941691338796323623L;
-
- /**
- * Name of the schema that this attribute is referring to.
- */
- private String schema;
-
- /**
- * Set of (string) values of this attribute.
- */
- private final List<String> values;
-
- /**
- * Whether this attribute is read-only or not.
- */
- private boolean readonly;
-
- /**
- * Default constructor.
- */
- public AttributeTO() {
- super();
- values = new ArrayList<String>();
- readonly = false;
- }
-
- /**
- * @return the name of the schema that this attribute is referring to
- */
- public String getSchema() {
- return schema;
- }
-
- /**
- * @param schema name to be set
- */
- public void setSchema(final String schema) {
- this.schema = schema;
-
- }
-
- /**
- * @return attribute values as strings
- */
- @XmlElementWrapper(name = "values")
- @XmlElement(name = "value")
- @JsonProperty("values")
- public List<String> getValues() {
- return values;
- }
-
- public boolean isReadonly() {
- return readonly;
- }
-
- public void setReadonly(boolean readonly) {
- this.readonly = readonly;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/ConfTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/ConfTO.java b/common/src/main/java/org/apache/syncope/common/to/ConfTO.java
deleted file mode 100644
index 1a0b349..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/ConfTO.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "conf")
-@XmlType
-public class ConfTO extends AbstractAttributableTO {
-
- private static final long serialVersionUID = -3825039700228595590L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java b/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java
deleted file mode 100644
index baa4bb9..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.types.ConnConfPropSchema;
-
-@XmlRootElement(name = "connectorBundle")
-@XmlType
-public class ConnBundleTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = 7215115961910138005L;
-
- private String displayName;
-
- private String location;
-
- private String bundleName;
-
- private String connectorName;
-
- private String version;
-
- private List<ConnConfPropSchema> properties = new ArrayList<ConnConfPropSchema>();
-
- public String getDisplayName() {
- return displayName;
- }
-
- public void setDisplayName(final String displayName) {
- this.displayName = displayName;
- }
-
- public String getLocation() {
- return location;
- }
-
- public void setLocation(final String location) {
- this.location = location;
- }
-
- public String getBundleName() {
- return bundleName;
- }
-
- public void setBundleName(final String bundleName) {
- this.bundleName = bundleName;
- }
-
- public String getConnectorName() {
- return connectorName;
- }
-
- public void setConnectorName(final String connectorName) {
- this.connectorName = connectorName;
- }
-
- @XmlElementWrapper(name = "properties")
- @XmlElement(name = "connConfPropSchema")
- @JsonProperty("properties")
- public List<ConnConfPropSchema> getProperties() {
- return properties;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(final String version) {
- this.version = version;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/ConnIdObjectClassTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/ConnIdObjectClassTO.java b/common/src/main/java/org/apache/syncope/common/to/ConnIdObjectClassTO.java
deleted file mode 100644
index 9778e96..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/ConnIdObjectClassTO.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.AbstractBaseBean;
-
-/**
- * Mimic ConnId's ObjectClass information.
- */
-@XmlRootElement(name = "connIdObjectClass")
-@XmlType
-public class ConnIdObjectClassTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = 5802458031138859994L;
-
- @XmlEnum
- public enum DefaultType {
-
- ACCOUNT("__ACCOUNT__"),
- GROUP("__GROUP__");
-
- private String specialName;
-
- private DefaultType(final String specialName) {
- this.specialName = specialName;
- }
-
- public String getSpecialName() {
- return specialName;
- }
- }
-
- public static ConnIdObjectClassTO ACCOUNT = new ConnIdObjectClassTO(DefaultType.ACCOUNT.getSpecialName());
-
- public static ConnIdObjectClassTO GROUP = new ConnIdObjectClassTO(DefaultType.GROUP.getSpecialName());
-
- private String type;
-
- public ConnIdObjectClassTO() {
- }
-
- public ConnIdObjectClassTO(final String type) {
- this.type = type;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(final String type) {
- this.type = type;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java b/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java
deleted file mode 100644
index 19d8ab3..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.types.ConnConfProperty;
-import org.apache.syncope.common.types.ConnectorCapability;
-
-@XmlRootElement(name = "connInstance")
-@XmlType
-public class ConnInstanceTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = 2707778645445168671L;
-
- private long id;
-
- private String location;
-
- private String connectorName;
-
- private String bundleName;
-
- private String version;
-
- private final Set<ConnConfProperty> configuration;
-
- private final Set<ConnectorCapability> capabilities;
-
- private String displayName;
-
- private Integer connRequestTimeout;
-
- private ConnPoolConfTO poolConf;
-
- public ConnInstanceTO() {
- super();
-
- configuration = new HashSet<ConnConfProperty>();
- capabilities = EnumSet.noneOf(ConnectorCapability.class);
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getLocation() {
- return location;
- }
-
- public void setLocation(final String location) {
- this.location = location;
- }
-
- public String getConnectorName() {
- return connectorName;
- }
-
- public void setConnectorName(final String connectorname) {
- this.connectorName = connectorname;
- }
-
- public String getBundleName() {
- return bundleName;
- }
-
- public void setBundleName(final String bundlename) {
- this.bundleName = bundlename;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(final String version) {
- this.version = version;
- }
-
- @XmlElementWrapper(name = "configuration")
- @XmlElement(name = "property")
- @JsonProperty("configuration")
- public Set<ConnConfProperty> getConfiguration() {
- return this.configuration;
- }
-
- @JsonIgnore
- public Map<String, ConnConfProperty> getConfigurationMap() {
- Map<String, ConnConfProperty> result;
-
- if (getConfiguration() == null) {
- result = Collections.<String, ConnConfProperty>emptyMap();
- } else {
- result = new HashMap<String, ConnConfProperty>();
- for (ConnConfProperty prop : getConfiguration()) {
- result.put(prop.getSchema().getName(), prop);
- }
- result = Collections.unmodifiableMap(result);
- }
-
- return result;
- }
-
- @XmlElementWrapper(name = "capabilities")
- @XmlElement(name = "capability")
- @JsonProperty("capabilities")
- public Set<ConnectorCapability> getCapabilities() {
- return capabilities;
- }
-
- public String getDisplayName() {
- return displayName;
- }
-
- public void setDisplayName(final String displayName) {
- this.displayName = displayName;
- }
-
- /**
- * Get connector request timeout.
- * It is not applied in case of sync, full reconciliation and search.
- *
- * @return timeout.
- */
- public Integer getConnRequestTimeout() {
- return connRequestTimeout;
- }
-
- /**
- * Set connector request timeout.
- * It is not applied in case of sync, full reconciliation and search.
- *
- * @param connRequestTimeout timeout
- */
- public void setConnRequestTimeout(final Integer connRequestTimeout) {
- this.connRequestTimeout = connRequestTimeout;
- }
-
- public ConnPoolConfTO getPoolConf() {
- return poolConf;
- }
-
- public void setPoolConf(final ConnPoolConfTO poolConf) {
- this.poolConf = poolConf;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java b/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java
deleted file mode 100644
index 9e24736..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "connObject")
-@XmlType
-public class ConnObjectTO extends AbstractSysInfoTO {
-
- private static final long serialVersionUID = 5139554911265442497L;
-
- private final List<AttributeTO> attrs = new ArrayList<AttributeTO>();
-
- @XmlElementWrapper(name = "attributes")
- @XmlElement(name = "attribute")
- @JsonProperty("attributes")
- public List<AttributeTO> getAttrs() {
- return attrs;
- }
-
- @JsonIgnore
- public Map<String, AttributeTO> getAttrMap() {
- Map<String, AttributeTO> result = new HashMap<String, AttributeTO>(attrs.size());
- for (AttributeTO attributeTO : attrs) {
- result.put(attributeTO.getSchema(), attributeTO);
- }
- result = Collections.<String, AttributeTO>unmodifiableMap(result);
-
- return result;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/ConnPoolConfTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/ConnPoolConfTO.java b/common/src/main/java/org/apache/syncope/common/to/ConnPoolConfTO.java
deleted file mode 100644
index 5660b54..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/ConnPoolConfTO.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlRootElement(name = "connPoolConf")
-@XmlType
-public class ConnPoolConfTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = -214360178113476623L;
-
- private Integer maxObjects;
-
- private Integer minIdle;
-
- private Integer maxIdle;
-
- private Long maxWait;
-
- private Long minEvictableIdleTimeMillis;
-
- public Integer getMaxObjects() {
- return maxObjects;
- }
-
- public void setMaxObjects(final Integer maxObjects) {
- this.maxObjects = maxObjects;
- }
-
- public Integer getMinIdle() {
- return minIdle;
- }
-
- public void setMinIdle(final Integer minIdle) {
- this.minIdle = minIdle;
- }
-
- public Integer getMaxIdle() {
- return maxIdle;
- }
-
- public void setMaxIdle(final Integer maxIdle) {
- this.maxIdle = maxIdle;
- }
-
- public Long getMaxWait() {
- return maxWait;
- }
-
- public void setMaxWait(final Long maxWait) {
- this.maxWait = maxWait;
- }
-
- public Long getMinEvictableIdleTimeMillis() {
- return minEvictableIdleTimeMillis;
- }
-
- public void setMinEvictableIdleTimeMillis(final Long minEvictableIdleTimeMillis) {
- this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java b/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java
deleted file mode 100644
index 570bfa0..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "derivedSchema")
-@XmlType
-public class DerSchemaTO extends AbstractSchemaTO {
-
- private static final long serialVersionUID = -6747399803792103108L;
-
- private String expression;
-
- public String getExpression() {
- return expression;
- }
-
- public void setExpression(final String expression) {
- this.expression = expression;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/EventCategoryTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/EventCategoryTO.java b/common/src/main/java/org/apache/syncope/common/to/EventCategoryTO.java
deleted file mode 100644
index 64a41ee..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/EventCategoryTO.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.types.AuditElements;
-
-@XmlRootElement(name = "eventCategory")
-@XmlType
-public class EventCategoryTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = -4340060002701633401L;
-
- private AuditElements.EventCategoryType type;
-
- private String category;
-
- private String subcategory;
-
- private final List<String> events = new ArrayList<String>();
-
- /**
- * Constructor for Type.REST event category.
- */
- public EventCategoryTO() {
- this.type = AuditElements.EventCategoryType.REST;
- }
-
- /**
- * Constructor for the given Type event category.
- */
- public EventCategoryTO(final AuditElements.EventCategoryType type) {
- this.type = type;
- }
-
- public AuditElements.EventCategoryType getType() {
- return type;
- }
-
- public void setType(final AuditElements.EventCategoryType type) {
- this.type = type == null ? AuditElements.EventCategoryType.CUSTOM : type;
- }
-
- public String getCategory() {
- return category;
- }
-
- public void setCategory(final String category) {
- this.category = category;
- }
-
- public String getSubcategory() {
- return subcategory;
- }
-
- public void setSubcategory(final String subcategory) {
- this.subcategory = subcategory;
- }
-
- @XmlElementWrapper(name = "events")
- @XmlElement(name = "event")
- @JsonProperty("events")
- public List<String> getEvents() {
- return events;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/LoggerTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/LoggerTO.java b/common/src/main/java/org/apache/syncope/common/to/LoggerTO.java
deleted file mode 100644
index 4490585..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/LoggerTO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.types.LoggerLevel;
-
-@XmlRootElement(name = "logger")
-@XmlType
-public class LoggerTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = -7794833835668648505L;
-
- private String name;
-
- private LoggerLevel level;
-
- public LoggerLevel getLevel() {
- return level;
- }
-
- public void setLevel(final LoggerLevel level) {
- this.level = level;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java b/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java
deleted file mode 100644
index e28f17a..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.types.IntMappingType;
-import org.apache.syncope.common.types.MappingPurpose;
-
-@XmlRootElement(name = "mappingItem")
-@XmlType
-public class MappingItemTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = 2983498836767176862L;
-
- private Long id;
-
- /**
- * Attribute schema to be mapped. Consider that we can associate tha same attribute schema more than once, with
- * different aliases, to different resource attributes.
- */
- private String intAttrName;
-
- /**
- * Schema type to be mapped.
- */
- private IntMappingType intMappingType;
-
- /**
- * External resource's field to be mapped.
- */
- private String extAttrName;
-
- /**
- * Specify if the mapped target resource's field is the key.
- */
- private boolean accountid;
-
- /**
- * Specify if the mapped target resource's field is the password.
- */
- private boolean password;
-
- /**
- * Specify if the mapped target resource's field is nullable.
- */
- private String mandatoryCondition = "false";
-
- /**
- * Mapping purposes: SYNCHRONIZATION, PROPAGATION, BOTH, NONE.
- */
- private MappingPurpose purpose;
-
- public boolean isAccountid() {
- return accountid;
- }
-
- public void setAccountid(boolean accountid) {
- this.accountid = accountid;
- }
-
- public String getExtAttrName() {
- return extAttrName;
- }
-
- public void setExtAttrName(String extAttrName) {
- this.extAttrName = extAttrName;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getMandatoryCondition() {
- return mandatoryCondition;
- }
-
- public void setMandatoryCondition(String mandatoryCondition) {
- this.mandatoryCondition = mandatoryCondition;
- }
-
- public boolean isPassword() {
- return password;
- }
-
- public void setPassword(boolean password) {
- this.password = password;
- }
-
- public String getIntAttrName() {
- return intAttrName;
- }
-
- public void setIntAttrName(String intAttrName) {
- this.intAttrName = intAttrName;
- }
-
- public IntMappingType getIntMappingType() {
- return intMappingType;
- }
-
- public void setIntMappingType(IntMappingType intMappingType) {
- this.intMappingType = intMappingType;
- }
-
- public MappingPurpose getPurpose() {
- return purpose;
- }
-
- public void setPurpose(MappingPurpose purpose) {
- this.purpose = purpose;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/MappingTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/MappingTO.java b/common/src/main/java/org/apache/syncope/common/to/MappingTO.java
deleted file mode 100644
index 3acd063..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/MappingTO.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.types.IntMappingType;
-
-@XmlRootElement(name = "mapping")
-@XmlType
-public class MappingTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = 8447688036282611118L;
-
- private String accountLink;
-
- private final List<MappingItemTO> items = new ArrayList<MappingItemTO>();
-
- public String getAccountLink() {
- return accountLink;
- }
-
- public void setAccountLink(String accountLink) {
- this.accountLink = accountLink;
- }
-
- public MappingItemTO getAccountIdItem() {
- MappingItemTO accountIdItem = null;
- for (MappingItemTO item : getItems()) {
- if (item.isAccountid()) {
- accountIdItem = item;
- }
- }
- return accountIdItem;
- }
-
- protected boolean addAccountIdItem(final MappingItemTO accountIdItem) {
- if (IntMappingType.UserVirtualSchema == accountIdItem.getIntMappingType()
- || IntMappingType.RoleVirtualSchema == accountIdItem.getIntMappingType()
- || IntMappingType.MembershipVirtualSchema == accountIdItem.getIntMappingType()
- || IntMappingType.Password == accountIdItem.getIntMappingType()) {
-
- throw new IllegalArgumentException("Virtual attributes cannot be set as accountId");
- }
- if (IntMappingType.Password == accountIdItem.getIntMappingType()) {
- throw new IllegalArgumentException("Password attributes cannot be set as accountId");
- }
-
- accountIdItem.setExtAttrName(accountIdItem.getExtAttrName());
- accountIdItem.setAccountid(true);
-
- return this.addItem(accountIdItem);
- }
-
- public boolean setAccountIdItem(final MappingItemTO accountIdItem) {
- return accountIdItem == null
- ? this.removeItem(getAccountIdItem())
- : addAccountIdItem(accountIdItem);
- }
-
- public MappingItemTO getPasswordItem() {
- MappingItemTO passwordItem = null;
- for (MappingItemTO item : getItems()) {
- if (item.isPassword()) {
- passwordItem = item;
- }
- }
- return passwordItem;
- }
-
- public boolean setPasswordItem(final MappingItemTO passwordItem) {
- if (passwordItem == null) {
- return this.removeItem(getPasswordItem());
- } else {
- passwordItem.setExtAttrName(null);
- passwordItem.setPassword(true);
- return addItem(passwordItem);
- }
- }
-
- @XmlElementWrapper(name = "items")
- @XmlElement(name = "item")
- @JsonProperty("items")
- public List<MappingItemTO> getItems() {
- return items;
- }
-
- public boolean addItem(final MappingItemTO item) {
- return item == null ? false : this.items.contains(item) || this.items.add(item);
- }
-
- public boolean removeItem(final MappingItemTO item) {
- return this.items.remove(item);
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/MembershipTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/MembershipTO.java b/common/src/main/java/org/apache/syncope/common/to/MembershipTO.java
deleted file mode 100644
index 00cabf3..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/MembershipTO.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "membership")
-@XmlType
-public class MembershipTO extends AbstractAttributableTO {
-
- private static final long serialVersionUID = 5992828670273935861L;
-
- private long roleId;
-
- private String roleName;
-
- public long getRoleId() {
- return roleId;
- }
-
- public void setRoleId(long roleId) {
- this.roleId = roleId;
- }
-
- public String getRoleName() {
- return roleName;
- }
-
- public void setRoleName(String roleName) {
- this.roleName = roleName;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java b/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java
deleted file mode 100644
index 20fb9cc..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.types.IntMappingType;
-import org.apache.syncope.common.types.TraceLevel;
-
-@XmlRootElement(name = "notification")
-@XmlType
-public class NotificationTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = -6145117115632592612L;
-
- private Long id;
-
- private List<String> events = new ArrayList<String>();
-
- private String userAbout;
-
- private String roleAbout;
-
- private String recipients;
-
- private List<String> staticRecipients = new ArrayList<String>();
-
- private IntMappingType recipientAttrType;
-
- private String recipientAttrName;
-
- private boolean selfAsRecipient;
-
- private String sender;
-
- private String subject;
-
- private String template;
-
- private TraceLevel traceLevel;
-
- private boolean active;
-
- public String getUserAbout() {
- return userAbout;
- }
-
- public void setUserAbout(final String userAbout) {
- this.userAbout = userAbout;
- }
-
- public String getRoleAbout() {
- return roleAbout;
- }
-
- public void setRoleAbout(final String roleAbout) {
- this.roleAbout = roleAbout;
- }
-
- @XmlElementWrapper(name = "events")
- @XmlElement(name = "event")
- @JsonProperty("events")
- public List<String> getEvents() {
- return events;
- }
-
- @XmlElementWrapper(name = "staticRecipients")
- @XmlElement(name = "staticRecipient")
- @JsonProperty("staticRecipients")
- public List<String> getStaticRecipients() {
- return staticRecipients;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getRecipients() {
- return recipients;
- }
-
- public void setRecipients(String recipients) {
- this.recipients = recipients;
- }
-
- public String getRecipientAttrName() {
- return recipientAttrName;
- }
-
- public void setRecipientAttrName(String recipientAttrName) {
- this.recipientAttrName = recipientAttrName;
- }
-
- public IntMappingType getRecipientAttrType() {
- return recipientAttrType;
- }
-
- public void setRecipientAttrType(IntMappingType recipientAttrType) {
- this.recipientAttrType = recipientAttrType;
- }
-
- public boolean isSelfAsRecipient() {
- return selfAsRecipient;
- }
-
- public void setSelfAsRecipient(boolean selfAsRecipient) {
- this.selfAsRecipient = selfAsRecipient;
- }
-
- public String getSender() {
- return sender;
- }
-
- public void setSender(String sender) {
- this.sender = sender;
- }
-
- public String getSubject() {
- return subject;
- }
-
- public void setSubject(String subject) {
- this.subject = subject;
- }
-
- public String getTemplate() {
- return template;
- }
-
- public void setTemplate(String template) {
- this.template = template;
- }
-
- public TraceLevel getTraceLevel() {
- return traceLevel;
- }
-
- public void setTraceLevel(TraceLevel traceLevel) {
- this.traceLevel = traceLevel;
- }
-
- public boolean isActive() {
- return active;
- }
-
- public void setActive(boolean active) {
- this.active = active;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/NotificationTaskTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/NotificationTaskTO.java b/common/src/main/java/org/apache/syncope/common/to/NotificationTaskTO.java
deleted file mode 100644
index d0ef1b1..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/NotificationTaskTO.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.types.TraceLevel;
-
-@XmlRootElement(name = "notificationTask")
-@XmlType
-public class NotificationTaskTO extends AbstractTaskTO {
-
- private static final long serialVersionUID = 371671242591093846L;
-
- private final Set<String> recipients = new HashSet<String>();
-
- private String sender;
-
- private String subject;
-
- private String textBody;
-
- private String htmlBody;
-
- private boolean executed;
-
- private TraceLevel traceLevel;
-
- @XmlElementWrapper(name = "recipients")
- @XmlElement(name = "recipient")
- @JsonProperty("recipients")
- public Set<String> getRecipients() {
- return recipients;
- }
-
- public String getSender() {
- return sender;
- }
-
- public void setSender(final String sender) {
- this.sender = sender;
- }
-
- public String getSubject() {
- return subject;
- }
-
- public void setSubject(final String subject) {
- this.subject = subject;
- }
-
- public String getTextBody() {
- return textBody;
- }
-
- public void setTextBody(final String textBody) {
- this.textBody = textBody;
- }
-
- public String getHtmlBody() {
- return htmlBody;
- }
-
- public void setHtmlBody(final String htmlBody) {
- this.htmlBody = htmlBody;
- }
-
- public boolean isExecuted() {
- return executed;
- }
-
- public void setExecuted(boolean executed) {
- this.executed = executed;
- }
-
- public TraceLevel getTraceLevel() {
- return traceLevel;
- }
-
- public void setTraceLevel(TraceLevel traceLevel) {
- this.traceLevel = traceLevel;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/PasswordPolicyTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/PasswordPolicyTO.java b/common/src/main/java/org/apache/syncope/common/to/PasswordPolicyTO.java
deleted file mode 100644
index a51f2a7..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/PasswordPolicyTO.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.types.PasswordPolicySpec;
-import org.apache.syncope.common.types.PolicyType;
-
-@XmlRootElement(name = "passwordPolicy")
-@XmlType
-public class PasswordPolicyTO extends AbstractPolicyTO {
-
- private static final long serialVersionUID = -5606086441294799690L;
-
- private PasswordPolicySpec specification;
-
- public PasswordPolicyTO() {
- this(false);
- }
-
- public PasswordPolicyTO(boolean global) {
- super();
-
- PolicyType type = global
- ? PolicyType.GLOBAL_PASSWORD
- : PolicyType.PASSWORD;
- setType(type);
- }
-
- public void setSpecification(final PasswordPolicySpec specification) {
- this.specification = specification;
- }
-
- public PasswordPolicySpec getSpecification() {
- return specification;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/PropagationStatus.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/PropagationStatus.java b/common/src/main/java/org/apache/syncope/common/to/PropagationStatus.java
deleted file mode 100644
index 9983c2a..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/PropagationStatus.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.to.ConnObjectTO;
-import org.apache.syncope.common.types.PropagationTaskExecStatus;
-
-/**
- * Single propagation status.
- */
-@XmlRootElement(name = "propagationStatus")
-@XmlType
-public class PropagationStatus extends AbstractBaseBean {
-
- /**
- * Serial version ID.
- */
- private static final long serialVersionUID = 3921498450222857690L;
-
- /**
- * Object before propagation.
- */
- private ConnObjectTO beforeObj;
-
- /**
- * Object after propagation.
- */
- private ConnObjectTO afterObj;
-
- /**
- * Propagated resource name.
- */
- private String resource;
-
- /**
- * Propagation task execution status.
- */
- private PropagationTaskExecStatus status;
-
- /**
- * Propagation task execution failure message.
- */
- private String failureReason;
-
- /**
- * After object getter.
- *
- * @return after object.
- */
- public ConnObjectTO getAfterObj() {
- return afterObj;
- }
-
- /**
- * After object setter.
- *
- * @param afterObj object.
- */
- public void setAfterObj(final ConnObjectTO afterObj) {
- this.afterObj = afterObj;
- }
-
- /**
- * Before object getter.
- *
- * @return before object.
- */
- public ConnObjectTO getBeforeObj() {
- return beforeObj;
- }
-
- /**
- * Before object setter.
- *
- * @param beforeObj object.
- */
- public void setBeforeObj(final ConnObjectTO beforeObj) {
- this.beforeObj = beforeObj;
- }
-
- /**
- * resource name getter.
- *
- * @return resource name.
- */
- public String getResource() {
- return resource;
- }
-
- /**
- * Resource name setter.
- *
- * @param resource resource name
- */
- public void setResource(final String resource) {
- this.resource = resource;
- }
-
- /**
- * Propagation execution status getter.
- *
- * @return status
- */
- public PropagationTaskExecStatus getStatus() {
- return status;
- }
-
- /**
- * Propagation execution status setter.
- *
- * @param status propagation execution status
- */
- public void setStatus(final PropagationTaskExecStatus status) {
- this.status = status;
- }
-
- /**
- * Propagation execution message getter.
- *
- * @return failureReason.
- */
- public String getFailureReason() {
- return failureReason;
- }
-
- /**
- * Propagation execution failure message setter.
- *
- * @param failureReason describes why this propagation failed
- */
- public void setFailureReason(final String failureReason) {
- this.failureReason = failureReason;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/PropagationTaskTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/PropagationTaskTO.java b/common/src/main/java/org/apache/syncope/common/to/PropagationTaskTO.java
deleted file mode 100644
index d6283d9..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/PropagationTaskTO.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.types.PropagationMode;
-import org.apache.syncope.common.types.ResourceOperation;
-import org.apache.syncope.common.types.SubjectType;
-
-@XmlRootElement(name = "propagationTask")
-@XmlType
-public class PropagationTaskTO extends AbstractTaskTO {
-
- private static final long serialVersionUID = 386450127003321197L;
-
- private PropagationMode propagationMode;
-
- private ResourceOperation propagationOperation;
-
- private String accountId;
-
- private String oldAccountId;
-
- private String xmlAttributes;
-
- private String resource;
-
- private String objectClassName;
-
- private SubjectType subjectType;
-
- private Long subjectId;
-
- public String getAccountId() {
- return accountId;
- }
-
- public void setAccountId(final String accountId) {
- this.accountId = accountId;
- }
-
- public String getOldAccountId() {
- return oldAccountId;
- }
-
- public void setOldAccountId(final String oldAccountId) {
- this.oldAccountId = oldAccountId;
- }
-
- public PropagationMode getPropagationMode() {
- return propagationMode;
- }
-
- public void setPropagationMode(final PropagationMode propagationMode) {
- this.propagationMode = propagationMode;
- }
-
- public String getResource() {
- return resource;
- }
-
- public void setResource(final String resource) {
- this.resource = resource;
- }
-
- public ResourceOperation getPropagationOperation() {
- return propagationOperation;
- }
-
- public void setPropagationOperation(final ResourceOperation propagationOperation) {
-
- this.propagationOperation = propagationOperation;
- }
-
- public String getXmlAttributes() {
- return xmlAttributes;
- }
-
- public void setXmlAttributes(final String xmlAttributes) {
- this.xmlAttributes = xmlAttributes;
- }
-
- public String getObjectClassName() {
- return objectClassName;
- }
-
- public void setObjectClassName(final String objectClassName) {
- this.objectClassName = objectClassName;
- }
-
- public SubjectType getSubjectType() {
- return subjectType;
- }
-
- public void setSubjectType(final SubjectType subjectType) {
- this.subjectType = subjectType;
- }
-
- public Long getSubjectId() {
- return subjectId;
- }
-
- public void setSubjectId(final Long subjectId) {
- this.subjectId = subjectId;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/PushTaskTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/PushTaskTO.java b/common/src/main/java/org/apache/syncope/common/to/PushTaskTO.java
deleted file mode 100644
index 60b840e..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/PushTaskTO.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "pushTask")
-@XmlType
-public class PushTaskTO extends AbstractSyncTaskTO {
-
- private static final long serialVersionUID = -2143537546915809018L;
-
- private String userFilter;
-
- private String roleFilter;
-
- public String getUserFilter() {
- return userFilter;
- }
-
- public void setUserFilter(String filter) {
- this.userFilter = filter;
- }
-
- public String getRoleFilter() {
- return roleFilter;
- }
-
- public void setRoleFilter(String roleFilter) {
- this.roleFilter = roleFilter;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java b/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java
deleted file mode 100644
index 95c5164..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "reportExec")
-@XmlType
-public class ReportExecTO extends AbstractExecTO {
-
- private static final long serialVersionUID = -1025555939724089215L;
-
- private long report;
-
- public long getReport() {
- return report;
- }
-
- public void setReport(long report) {
- this.report = report;
- }
-
-}
[13/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/PasswordPolicySpec.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/PasswordPolicySpec.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PasswordPolicySpec.java
new file mode 100644
index 0000000..448fceb
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PasswordPolicySpec.java
@@ -0,0 +1,367 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.annotation.SchemaList;
+
+@XmlType
+public class PasswordPolicySpec implements PolicySpec {
+
+ private static final long serialVersionUID = -7988778083915548547L;
+
+ /**
+ * History length.
+ */
+ private int historyLength;
+
+ /**
+ * Minimum length.
+ */
+ private int maxLength;
+
+ /**
+ * Maximum length.
+ */
+ private int minLength;
+
+ /**
+ * Substrings not permitted.
+ */
+ private List<String> wordsNotPermitted;
+
+ /**
+ * User attribute values not permitted.
+ */
+ @SchemaList
+ private List<String> schemasNotPermitted;
+
+ /**
+ * Specify if one or more non alphanumeric characters are required.
+ */
+ private boolean nonAlphanumericRequired;
+
+ /**
+ * Specify if one or more alphanumeric characters are required.
+ */
+ private boolean alphanumericRequired;
+
+ /**
+ * Specify if one or more digits are required.
+ */
+ private boolean digitRequired;
+
+ /**
+ * Specify if one or more lowercase alphabetic characters are required.
+ */
+ private boolean lowercaseRequired;
+
+ /**
+ * Specify if one or more uppercase alphabetic characters are required.
+ */
+ private boolean uppercaseRequired;
+
+ /**
+ * Specify if must start with a digit.
+ */
+ private boolean mustStartWithDigit;
+
+ /**
+ * Specify if mustn't start with a digit.
+ */
+ private boolean mustntStartWithDigit;
+
+ /**
+ * Specify if must end with a digit.
+ */
+ private boolean mustEndWithDigit;
+
+ /**
+ * Specify if mustn't end with a digit.
+ */
+ private boolean mustntEndWithDigit;
+
+ /**
+ * Specify if must start with a non alphanumeric character.
+ */
+ private boolean mustStartWithNonAlpha;
+
+ /**
+ * Specify if must start with a alphanumeric character.
+ */
+ private boolean mustStartWithAlpha;
+
+ /**
+ * Specify if mustn't start with a non alphanumeric character.
+ */
+ private boolean mustntStartWithNonAlpha;
+
+ /**
+ * Specify if mustn't start with a alphanumeric character.
+ */
+ private boolean mustntStartWithAlpha;
+
+ /**
+ * Specify if must end with a non alphanumeric character.
+ */
+ private boolean mustEndWithNonAlpha;
+
+ /**
+ * Specify if must end with a alphanumeric character.
+ */
+ private boolean mustEndWithAlpha;
+
+ /**
+ * Specify if mustn't end with a non alphanumeric character.
+ */
+ private boolean mustntEndWithNonAlpha;
+
+ /**
+ * Specify if mustn't end with a alphanumeric character.
+ */
+ private boolean mustntEndWithAlpha;
+
+ /**
+ * Specify if password shall not be stored internally.
+ */
+ private boolean allowNullPassword;
+
+ /**
+ * Substrings not permitted as prefix.
+ */
+ private List<String> prefixesNotPermitted;
+
+ /**
+ * Substrings not permitted as suffix.
+ */
+ private List<String> suffixesNotPermitted;
+
+ public boolean isDigitRequired() {
+ return digitRequired;
+ }
+
+ public void setDigitRequired(final boolean digitRequired) {
+ this.digitRequired = digitRequired;
+ }
+
+ public boolean isLowercaseRequired() {
+ return lowercaseRequired;
+ }
+
+ public void setLowercaseRequired(final boolean lowercaseRequired) {
+ this.lowercaseRequired = lowercaseRequired;
+ }
+
+ public int getMaxLength() {
+ return maxLength;
+ }
+
+ public void setMaxLength(final int maxLength) {
+ this.maxLength = maxLength;
+ }
+
+ public int getMinLength() {
+ return minLength;
+ }
+
+ public void setMinLength(final int minLength) {
+ this.minLength = minLength;
+ }
+
+ public boolean isMustEndWithDigit() {
+ return mustEndWithDigit;
+ }
+
+ public void setMustEndWithDigit(final boolean mustEndWithDigit) {
+ this.mustEndWithDigit = mustEndWithDigit;
+ }
+
+ public boolean isMustEndWithNonAlpha() {
+ return mustEndWithNonAlpha;
+ }
+
+ public void setMustEndWithNonAlpha(final boolean mustEndWithNonAlpha) {
+ this.mustEndWithNonAlpha = mustEndWithNonAlpha;
+ }
+
+ public boolean isMustStartWithDigit() {
+ return mustStartWithDigit;
+ }
+
+ public void setMustStartWithDigit(final boolean mustStartWithDigit) {
+ this.mustStartWithDigit = mustStartWithDigit;
+ }
+
+ public boolean isMustStartWithNonAlpha() {
+ return mustStartWithNonAlpha;
+ }
+
+ public void setMustStartWithNonAlpha(final boolean mustStartWithNonAlpha) {
+ this.mustStartWithNonAlpha = mustStartWithNonAlpha;
+ }
+
+ public boolean isMustntEndWithDigit() {
+ return mustntEndWithDigit;
+ }
+
+ public void setMustntEndWithDigit(final boolean mustntEndWithDigit) {
+ this.mustntEndWithDigit = mustntEndWithDigit;
+ }
+
+ public boolean isMustntEndWithNonAlpha() {
+ return mustntEndWithNonAlpha;
+ }
+
+ public void setMustntEndWithNonAlpha(final boolean mustntEndWithNonAlpha) {
+ this.mustntEndWithNonAlpha = mustntEndWithNonAlpha;
+ }
+
+ public boolean isMustntStartWithDigit() {
+ return mustntStartWithDigit;
+ }
+
+ public void setMustntStartWithDigit(final boolean mustntStartWithDigit) {
+ this.mustntStartWithDigit = mustntStartWithDigit;
+ }
+
+ public boolean isMustntStartWithNonAlpha() {
+ return mustntStartWithNonAlpha;
+ }
+
+ public void setMustntStartWithNonAlpha(final boolean mustntStartWithNonAlpha) {
+ this.mustntStartWithNonAlpha = mustntStartWithNonAlpha;
+ }
+
+ public boolean isNonAlphanumericRequired() {
+ return nonAlphanumericRequired;
+ }
+
+ public void setNonAlphanumericRequired(final boolean nonAlphanumericRequired) {
+ this.nonAlphanumericRequired = nonAlphanumericRequired;
+ }
+
+ @XmlElementWrapper(name = "prefixesNotPermitted")
+ @XmlElement(name = "prefix")
+ @JsonProperty("prefixesNotPermitted")
+ public List<String> getPrefixesNotPermitted() {
+ if (prefixesNotPermitted == null) {
+ prefixesNotPermitted = new ArrayList<String>();
+ }
+ return prefixesNotPermitted;
+ }
+
+ @XmlElementWrapper(name = "schemasNotPermitted")
+ @XmlElement(name = "schema")
+ @JsonProperty("schemasNotPermitted")
+ public List<String> getSchemasNotPermitted() {
+ if (schemasNotPermitted == null) {
+ schemasNotPermitted = new ArrayList<String>();
+ }
+ return schemasNotPermitted;
+ }
+
+ @XmlElementWrapper(name = "suffixesNotPermitted")
+ @XmlElement(name = "suffix")
+ @JsonProperty("suffixesNotPermitted")
+ public List<String> getSuffixesNotPermitted() {
+ if (suffixesNotPermitted == null) {
+ suffixesNotPermitted = new ArrayList<String>();
+ }
+ return suffixesNotPermitted;
+ }
+
+ public boolean isUppercaseRequired() {
+ return uppercaseRequired;
+ }
+
+ public void setUppercaseRequired(final boolean uppercaseRequired) {
+ this.uppercaseRequired = uppercaseRequired;
+ }
+
+ @XmlElementWrapper(name = "wordsNotPermitted")
+ @XmlElement(name = "word")
+ @JsonProperty("wordsNotPermitted")
+ public List<String> getWordsNotPermitted() {
+ if (wordsNotPermitted == null) {
+ wordsNotPermitted = new ArrayList<String>();
+ }
+ return wordsNotPermitted;
+ }
+
+ public boolean isAlphanumericRequired() {
+ return alphanumericRequired;
+ }
+
+ public void setAlphanumericRequired(final boolean alphanumericRequired) {
+ this.alphanumericRequired = alphanumericRequired;
+ }
+
+ public boolean isMustEndWithAlpha() {
+ return mustEndWithAlpha;
+ }
+
+ public void setMustEndWithAlpha(final boolean mustEndWithAlpha) {
+ this.mustEndWithAlpha = mustEndWithAlpha;
+ }
+
+ public boolean isMustStartWithAlpha() {
+ return mustStartWithAlpha;
+ }
+
+ public void setMustStartWithAlpha(final boolean mustStartWithAlpha) {
+ this.mustStartWithAlpha = mustStartWithAlpha;
+ }
+
+ public boolean isMustntEndWithAlpha() {
+ return mustntEndWithAlpha;
+ }
+
+ public void setMustntEndWithAlpha(final boolean mustntEndWithAlpha) {
+ this.mustntEndWithAlpha = mustntEndWithAlpha;
+ }
+
+ public boolean isMustntStartWithAlpha() {
+ return mustntStartWithAlpha;
+ }
+
+ public void setMustntStartWithAlpha(final boolean mustntStartWithAlpha) {
+ this.mustntStartWithAlpha = mustntStartWithAlpha;
+ }
+
+ public int getHistoryLength() {
+ return historyLength;
+ }
+
+ public void setHistoryLength(final int historyLength) {
+ this.historyLength = historyLength;
+ }
+
+ public boolean isAllowNullPassword() {
+ return allowNullPassword;
+ }
+
+ public void setAllowNullPassword(final boolean allowNullPassword) {
+ this.allowNullPassword = allowNullPassword;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/PolicySpec.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/PolicySpec.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PolicySpec.java
new file mode 100644
index 0000000..7de0e48
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PolicySpec.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import java.io.Serializable;
+
+public interface PolicySpec extends Serializable {
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/PolicyType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/PolicyType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PolicyType.java
new file mode 100644
index 0000000..0b498d6
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PolicyType.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum PolicyType {
+
+ /**
+ * Account policy like:
+ * password expire time, change password at first access, ...
+ */
+ ACCOUNT("Account Policy"),
+ GLOBAL_ACCOUNT("Account Global Policy"),
+ /**
+ * Password policy regarding password syntax.
+ */
+ PASSWORD("Password Policy"),
+ GLOBAL_PASSWORD("Password Global Policy"),
+ /**
+ * SYNC policy regarding account conflicts resolution.
+ */
+ SYNC("Synchronization Policy"),
+ GLOBAL_SYNC("Synchronization Global Policy"),
+ /**
+ * PUSH policy regarding account conflicts resolution.
+ */
+ PUSH("Push Policy"),
+ GLOBAL_PUSH("Push Global Policy");
+
+ private String description;
+
+ PolicyType(final String description) {
+ this.description = description;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public boolean isGlobal() {
+ return name().startsWith("GLOBAL");
+ }
+
+ public static PolicyType fromString(final String value) {
+ return PolicyType.valueOf(value.toUpperCase());
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationByResource.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationByResource.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationByResource.java
new file mode 100644
index 0000000..f89f27e
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationByResource.java
@@ -0,0 +1,364 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Utility class for encapsulating operations to be performed on various resources.
+ */
+public class PropagationByResource implements Serializable {
+
+ private static final long serialVersionUID = -5699740428104336636L;
+
+ /**
+ * Resources for creation.
+ */
+ private final Set<String> toBeCreated;
+
+ /**
+ * Resources for update.
+ */
+ private final Set<String> toBeUpdated;
+
+ /**
+ * Resources for deletion.
+ */
+ private final Set<String> toBeDeleted;
+
+ /**
+ * Mapping target resource names to old account ids (when applicable).
+ */
+ private final Map<String, String> oldAccountIds;
+
+ /**
+ * Default constructor.
+ */
+ public PropagationByResource() {
+ toBeCreated = new HashSet<>();
+ toBeUpdated = new HashSet<>();
+ toBeDeleted = new HashSet<>();
+
+ oldAccountIds = new HashMap<>();
+ }
+
+ /**
+ * Avoid potential conflicts by not doing create or update on any resource for which a delete is requested, and by
+ * not doing any create on any resource for which an update is requested.
+ */
+ public final void purge() {
+ toBeCreated.removeAll(toBeDeleted);
+ toBeCreated.removeAll(toBeUpdated);
+
+ toBeUpdated.removeAll(toBeDeleted);
+ }
+
+ /**
+ * Add an element.
+ *
+ * @param type resource operation type
+ * @param resourceName target resource
+ * @return whether the operation was successful or not
+ */
+ public final boolean add(final ResourceOperation type, final String resourceName) {
+ Set<String> set;
+ switch (type) {
+ case CREATE:
+ set = toBeCreated;
+ break;
+
+ case UPDATE:
+ set = toBeUpdated;
+ break;
+
+ case DELETE:
+ default:
+ set = toBeDeleted;
+ break;
+ }
+
+ return set.add(resourceName);
+ }
+
+ /**
+ * Add some elements.
+ *
+ * @param type resource operation type
+ * @param resourceNames target resources
+ * @return whether the operation was successful or not
+ */
+ public boolean addAll(final ResourceOperation type, final Collection<String> resourceNames) {
+ Set<String> set;
+ switch (type) {
+ case CREATE:
+ set = toBeCreated;
+ break;
+
+ case UPDATE:
+ set = toBeUpdated;
+ break;
+
+ case DELETE:
+ default:
+ set = toBeDeleted;
+ break;
+ }
+
+ return set.addAll(resourceNames);
+ }
+
+ /**
+ * Remove an element.
+ *
+ * @param type resource operation type
+ * @param resourceName target resource
+ * @return whether the operation was successful or not
+ */
+ public final boolean remove(final ResourceOperation type, final String resourceName) {
+ boolean result = false;
+
+ switch (type) {
+ case CREATE:
+ result = toBeCreated.remove(resourceName);
+ break;
+
+ case UPDATE:
+ result = toBeUpdated.remove(resourceName);
+ break;
+
+ case DELETE:
+ result = toBeDeleted.remove(resourceName);
+ break;
+
+ default:
+ }
+
+ return result;
+ }
+
+ /**
+ * Remove some elements.
+ *
+ * @param type resource operation type
+ * @param resourceNames target resources
+ * @return whether the operation was successful or not
+ */
+ public boolean removeAll(final ResourceOperation type, final Set<String> resourceNames) {
+ Set<String> set;
+ switch (type) {
+ case CREATE:
+ set = toBeCreated;
+ break;
+
+ case UPDATE:
+ set = toBeUpdated;
+ break;
+
+ case DELETE:
+ default:
+ set = toBeDeleted;
+ break;
+ }
+
+ return set.removeAll(resourceNames);
+ }
+
+ /**
+ * Removes only the resource names in the underlying resource name sets that are contained in the specified
+ * collection.
+ *
+ * @param resourceNames collection containing resource names to be retained in the underlying resource name sets
+ * @return <tt>true</tt> if the underlying resource name sets changed as a result of the call
+ * @see Collection#removeAll(java.util.Collection)
+ */
+ public boolean removeAll(final Collection<String> resourceNames) {
+ return toBeCreated.removeAll(resourceNames)
+ | toBeUpdated.removeAll(resourceNames)
+ | toBeDeleted.removeAll(resourceNames);
+ }
+
+ /**
+ * Retains only the resource names in the underlying resource name sets that are contained in the specified
+ * collection.
+ *
+ * @param resourceNames collection containing resource names to be retained in the underlying resource name sets
+ * @return <tt>true</tt> if the underlying resource name sets changed as a result of the call
+ * @see Collection#retainAll(java.util.Collection)
+ */
+ public boolean retainAll(final Collection<String> resourceNames) {
+ return toBeCreated.retainAll(resourceNames)
+ | toBeUpdated.retainAll(resourceNames)
+ | toBeDeleted.retainAll(resourceNames);
+ }
+
+ public boolean contains(final ResourceOperation type, final String resourceName) {
+ boolean result = false;
+
+ switch (type) {
+ case CREATE:
+ result = toBeCreated.contains(resourceName);
+ break;
+
+ case UPDATE:
+ result = toBeUpdated.contains(resourceName);
+ break;
+
+ case DELETE:
+ result = toBeDeleted.contains(resourceName);
+ break;
+
+ default:
+ }
+
+ return result;
+ }
+
+ /**
+ * Get resources for a given resource operation type.
+ *
+ * @param type resource operation type
+ * @return resource matching the given type
+ */
+ public final Set<String> get(final ResourceOperation type) {
+ Set<String> result = Collections.<String>emptySet();
+
+ switch (type) {
+ case CREATE:
+ result = toBeCreated;
+ break;
+
+ case UPDATE:
+ result = toBeUpdated;
+ break;
+
+ case DELETE:
+ result = toBeDeleted;
+ break;
+
+ default:
+ }
+
+ return result;
+ }
+
+ /**
+ * Set resources for a given resource operation type.
+ *
+ * @param type resource operation type
+ * @param resourceNames to be set
+ */
+ public final void set(final ResourceOperation type, final Set<String> resourceNames) {
+
+ switch (type) {
+ case CREATE:
+ toBeCreated.clear();
+ toBeCreated.addAll(resourceNames);
+ break;
+
+ case UPDATE:
+ toBeUpdated.clear();
+ toBeUpdated.addAll(resourceNames);
+ break;
+
+ case DELETE:
+ toBeDeleted.clear();
+ toBeDeleted.addAll(resourceNames);
+ break;
+
+ default:
+ }
+ }
+
+ /**
+ * Merge another resource operation instance into this instance.
+ *
+ * @param propByRes to be merged
+ */
+ public final void merge(final PropagationByResource propByRes) {
+ if (propByRes != null) {
+ toBeCreated.addAll(propByRes.get(ResourceOperation.CREATE));
+ toBeUpdated.addAll(propByRes.get(ResourceOperation.UPDATE));
+ toBeDeleted.addAll(propByRes.get(ResourceOperation.DELETE));
+ oldAccountIds.putAll(propByRes.getOldAccountIds());
+ }
+ }
+
+ /**
+ * Removes all of the operations.
+ */
+ public void clear() {
+ toBeCreated.clear();
+ toBeUpdated.clear();
+ toBeDeleted.clear();
+ }
+
+ /**
+ * Whether no operations are present.
+ *
+ * @return true if no operations (create / update / delete) and no old account ids are present
+ */
+ public final boolean isEmpty() {
+ return toBeCreated.isEmpty() && toBeUpdated.isEmpty() && toBeDeleted.isEmpty() && oldAccountIds.isEmpty();
+ }
+
+ /**
+ * Fetch all old account ids.
+ *
+ * @return old account ids; can be empty
+ */
+ public Map<String, String> getOldAccountIds() {
+ return oldAccountIds;
+ }
+
+ /**
+ * Fetch old account id for given resource name.
+ *
+ * @param resourceName resource name
+ * @return old account id; can be null
+ */
+ public String getOldAccountId(final String resourceName) {
+ return oldAccountIds.get(resourceName);
+ }
+
+ /**
+ * Add old account id for a given resource name.
+ *
+ * @param resourceName resourceName resource name
+ * @param oldAccountId old account id
+ */
+ public void addOldAccountId(final String resourceName, final String oldAccountId) {
+ if (resourceName != null && oldAccountId != null) {
+ oldAccountIds.put(resourceName, oldAccountId);
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "To be Created: " + toBeCreated + ";\n"
+ + "To be Updated: " + toBeUpdated + ";\n"
+ + "To be Deleted: " + toBeDeleted + ";\n"
+ + "Old account Ids: " + oldAccountIds;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationMode.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationMode.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationMode.java
new file mode 100644
index 0000000..8b10bc8
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationMode.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum PropagationMode {
+
+ ONE_PHASE,
+ TWO_PHASES
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationTaskExecStatus.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationTaskExecStatus.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationTaskExecStatus.java
new file mode 100644
index 0000000..448b3a9
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PropagationTaskExecStatus.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+/**
+ * Status of a propagation task execution.
+ *
+ * CREATED -> SUBMITTED or UBSUBMITTED (depending on the external resource to
+ * return success or failure).
+ * SUBMITTED -> SUCCESS or FAILURE (depending on the external resource to
+ * report success or failure).
+ */
+@XmlEnum
+public enum PropagationTaskExecStatus {
+
+ CREATED,
+ SUBMITTED,
+ UNSUBMITTED,
+ SUCCESS,
+ FAILURE;
+
+ public boolean isSuccessful() {
+ return this == SUCCESS || this == SUBMITTED;
+ }
+
+ public static PropagationTaskExecStatus fromString(final String value) {
+ return PropagationTaskExecStatus.valueOf(value.toUpperCase());
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/ReportExecExportFormat.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ReportExecExportFormat.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ReportExecExportFormat.java
new file mode 100644
index 0000000..fdac43d
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ReportExecExportFormat.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum ReportExecExportFormat {
+
+ XML,
+ HTML,
+ PDF,
+ RTF,
+ CSV
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/ReportExecStatus.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ReportExecStatus.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ReportExecStatus.java
new file mode 100644
index 0000000..2fe42ed
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ReportExecStatus.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum ReportExecStatus {
+
+ STARTED,
+ RUNNING,
+ SUCCESS,
+ FAILURE;
+
+ public static ReportExecStatus fromString(final String value) {
+ return ReportExecStatus.valueOf(value.toUpperCase());
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceAssociationActionType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceAssociationActionType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceAssociationActionType.java
new file mode 100644
index 0000000..7693ca3
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceAssociationActionType.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum ResourceAssociationActionType {
+
+ /**
+ * Add association between user/role on Syncope and external resource(s) without any propagation.
+ */
+ LINK,
+ /**
+ * Add user/role into external resource(s).
+ */
+ PROVISION,
+ /**
+ * Assign (link + provision) external resource(s) with user/role.
+ */
+ ASSIGN
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceDeassociationActionType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceDeassociationActionType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceDeassociationActionType.java
new file mode 100644
index 0000000..c88f453
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceDeassociationActionType.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum ResourceDeassociationActionType {
+
+ /**
+ * Remove association between user/role on Syncope and external resource(s) without any propagation.
+ */
+ UNLINK,
+ /**
+ * Remove user/role from external resource(s).
+ */
+ DEPROVISION,
+ /**
+ * Unassign (unlink + de-provision) external resource(s) from user/role.
+ */
+ UNASSIGN
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceOperation.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceOperation.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceOperation.java
new file mode 100644
index 0000000..b399b17
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceOperation.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum ResourceOperation {
+
+ CREATE,
+ UPDATE,
+ DELETE,
+ NONE
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/SchemaType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/SchemaType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/SchemaType.java
new file mode 100644
index 0000000..673666d
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/SchemaType.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+import org.apache.syncope.common.lib.to.AbstractSchemaTO;
+import org.apache.syncope.common.lib.to.DerSchemaTO;
+import org.apache.syncope.common.lib.to.PlainSchemaTO;
+import org.apache.syncope.common.lib.to.VirSchemaTO;
+
+@XmlEnum
+public enum SchemaType {
+
+ /**
+ * Standard schema for normal attributes to be stored within syncope.
+ */
+ PLAIN(PlainSchemaTO.class),
+ /**
+ * Derived schema calculated based on other attributes.
+ */
+ DERIVED(DerSchemaTO.class),
+ /**
+ * Virtual schema for attributes fetched from remote resources only.
+ */
+ VIRTUAL(VirSchemaTO.class);
+
+ private final Class<? extends AbstractSchemaTO> toClass;
+
+ SchemaType(final Class<? extends AbstractSchemaTO> toClass) {
+ this.toClass = toClass;
+ }
+
+ public Class<? extends AbstractSchemaTO> getToClass() {
+ return toClass;
+ }
+
+ public static SchemaType fromToClass(final Class<? extends AbstractSchemaTO> toClass) {
+ SchemaType schemaType = null;
+
+ if (PlainSchemaTO.class.equals(toClass)) {
+ schemaType = SchemaType.PLAIN;
+ } else if (DerSchemaTO.class.equals(toClass)) {
+ schemaType = SchemaType.DERIVED;
+ } else if (VirSchemaTO.class.equals(toClass)) {
+ schemaType = SchemaType.VIRTUAL;
+ } else {
+ throw new IllegalArgumentException("Unexpected class: " + toClass.getName());
+ }
+
+ return schemaType;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/SubjectType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/SubjectType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/SubjectType.java
new file mode 100644
index 0000000..0acd314
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/SubjectType.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum SubjectType {
+
+ USER,
+ ROLE;
+
+ public AttributableType asAttributableType() {
+ return this == USER
+ ? AttributableType.USER
+ : AttributableType.ROLE;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/SyncPolicySpec.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/SyncPolicySpec.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/SyncPolicySpec.java
new file mode 100644
index 0000000..e0040de
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/SyncPolicySpec.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.annotation.ClassList;
+import org.apache.syncope.common.lib.annotation.SchemaList;
+
+@XmlType
+public class SyncPolicySpec implements PolicySpec {
+
+ private static final long serialVersionUID = -3144027171719498127L;
+
+ /**
+ * User attributes and fields for matching during synchronization.
+ */
+ @SchemaList(extended = true)
+ private final List<String> uAltSearchSchemas = new ArrayList<String>();
+
+ @ClassList
+ private String userJavaRule;
+
+ /**
+ * Role attributes and fields for matching during synchronization.
+ */
+ @SchemaList(extended = true)
+ private final List<String> rAltSearchSchemas = new ArrayList<String>();
+
+ @ClassList
+ private String roleJavaRule;
+
+ /**
+ * Conflict resolution action.
+ */
+ private ConflictResolutionAction conflictResolutionAction;
+
+ public ConflictResolutionAction getConflictResolutionAction() {
+ return conflictResolutionAction == null
+ ? ConflictResolutionAction.IGNORE
+ : conflictResolutionAction;
+ }
+
+ public void setConflictResolutionAction(final ConflictResolutionAction conflictResolutionAction) {
+ this.conflictResolutionAction = conflictResolutionAction;
+ }
+
+ @XmlElementWrapper(name = "userAltSearchSchemas")
+ @XmlElement(name = "userAltSearchSchema")
+ @JsonProperty("userAltSearchSchemas")
+ public List<String> getuAltSearchSchemas() {
+ return uAltSearchSchemas;
+ }
+
+ @XmlElementWrapper(name = "roleAltSearchSchemas")
+ @XmlElement(name = "roleAltSearchSchema")
+ @JsonProperty("roleAltSearchSchemas")
+ public List<String> getrAltSearchSchemas() {
+ return rAltSearchSchemas;
+ }
+
+ public String getRoleJavaRule() {
+ return roleJavaRule;
+ }
+
+ public void setRoleJavaRule(final String roleJavaRule) {
+ this.roleJavaRule = roleJavaRule;
+ }
+
+ public String getUserJavaRule() {
+ return userJavaRule;
+ }
+
+ public void setUserJavaRule(final String userJavaRule) {
+ this.userJavaRule = userJavaRule;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java
new file mode 100644
index 0000000..a20d0a7
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum TaskType {
+
+ PROPAGATION("propagation"),
+ NOTIFICATION("notification"),
+ SCHEDULED("sched"),
+ SYNCHRONIZATION("sync"),
+ PUSH("push");
+
+ private String name;
+
+ private TaskType(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String toString() {
+ return name;
+ }
+
+ public static TaskType fromString(final String name) {
+ if (name != null) {
+ for (TaskType t : TaskType.values()) {
+ if (t.name.equalsIgnoreCase(name)) {
+ return t;
+ }
+ }
+ }
+
+ return null;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/TraceLevel.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/TraceLevel.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/TraceLevel.java
new file mode 100644
index 0000000..e8232b8
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/TraceLevel.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum TraceLevel {
+
+ /**
+ * No details at all.
+ */
+ NONE,
+ /**
+ * Only failed entries.
+ */
+ FAILURES,
+ /**
+ * Only an overall summary.
+ */
+ SUMMARY,
+ /**
+ * All available information, including per-entry information.
+ */
+ ALL
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/UnmatchingRule.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/UnmatchingRule.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/UnmatchingRule.java
new file mode 100644
index 0000000..f579128
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/UnmatchingRule.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+/**
+ * Sync/Push task un-matching rule.
+ */
+@XmlEnum
+public enum UnmatchingRule {
+
+ /**
+ * Do not perform any action.
+ */
+ IGNORE,
+ /**
+ * Link the resource and create entity.
+ */
+ ASSIGN,
+ /**
+ * Create entity without linking the resource.
+ */
+ PROVISION,
+ /**
+ * Just unlink resource without performing any (de-)provisioning operation.
+ * In case of sync task UNLINK and IGNORE will coincide.
+ */
+ UNLINK
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/WorkflowFormPropertyType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/WorkflowFormPropertyType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/WorkflowFormPropertyType.java
new file mode 100644
index 0000000..ec2db4a
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/WorkflowFormPropertyType.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum WorkflowFormPropertyType {
+
+ String,
+ Long,
+ Enum,
+ Date,
+ Boolean
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/WorkflowTasks.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/WorkflowTasks.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/WorkflowTasks.java
new file mode 100644
index 0000000..8c487f8
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/WorkflowTasks.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class WorkflowTasks {
+
+ private List<String> tasks;
+
+ public WorkflowTasks() {
+ this.tasks = new ArrayList<String>();
+ }
+
+ public WorkflowTasks(final Collection<String> tasks) {
+ this();
+ this.tasks.addAll(tasks);
+ }
+
+ public List<String> getTasks() {
+ return tasks;
+ }
+
+ public void setTasks(final List<String> tasks) {
+ this.tasks = tasks;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java
new file mode 100644
index 0000000..80cb87f
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlSchema;
+import org.apache.syncope.common.lib.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/AbstractWrappable.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/AbstractWrappable.java b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/AbstractWrappable.java
new file mode 100644
index 0000000..7ba0afa
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/AbstractWrappable.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.wrap;
+
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+public abstract class AbstractWrappable<E> extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 1712808704911635170L;
+
+ private E element;
+
+ public static <E, T extends AbstractWrappable<E>> T getInstance(final Class<T> reference, final E element) {
+ try {
+ T instance = reference.newInstance();
+ instance.setElement(element);
+ return instance;
+ } catch (Exception e) {
+ throw new IllegalArgumentException("Could not instantiate " + reference.getName(), e);
+ }
+ }
+
+ public E getElement() {
+ return element;
+ }
+
+ public void setElement(final E element) {
+ this.element = element;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/EntitlementTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/EntitlementTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/EntitlementTO.java
new file mode 100644
index 0000000..62530eb
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/EntitlementTO.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.wrap;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "entitlement")
+@XmlType
+public class EntitlementTO extends AbstractWrappable<String> {
+
+ private static final long serialVersionUID = 7133614577172038452L;
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ReportletConfClass.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ReportletConfClass.java b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ReportletConfClass.java
new file mode 100644
index 0000000..24ba188
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ReportletConfClass.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.wrap;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "reportletConfClass")
+@XmlType
+public class ReportletConfClass extends AbstractWrappable<String> {
+
+ private static final long serialVersionUID = 1343357929074360450L;
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ResourceName.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ResourceName.java b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ResourceName.java
new file mode 100644
index 0000000..42b77ca
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ResourceName.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.wrap;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "resourceName")
+@XmlType
+public class ResourceName extends AbstractWrappable<String> {
+
+ private static final long serialVersionUID = -175720097924079573L;
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/SubjectKey.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/SubjectKey.java b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/SubjectKey.java
new file mode 100644
index 0000000..930cf35
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/SubjectKey.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.wrap;
+
+public class SubjectKey extends AbstractWrappable<Long> {
+
+ private static final long serialVersionUID = -8664228651057889297L;
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/package-info.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/package-info.java b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/package-info.java
new file mode 100644
index 0000000..397cb66
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib.wrap;
+
+import javax.xml.bind.annotation.XmlSchema;
+import org.apache.syncope.common.lib.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java
----------------------------------------------------------------------
diff --git a/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java b/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java
new file mode 100644
index 0000000..008c226
--- /dev/null
+++ b/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib;
+
+import static org.junit.Assert.assertEquals;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import java.io.StringWriter;
+import org.apache.syncope.common.lib.report.UserReportletConf;
+import org.apache.syncope.common.lib.to.ReportTO;
+import org.apache.syncope.common.lib.to.WorkflowFormPropertyTO;
+import org.junit.Test;
+
+public class JSONTest {
+
+ @Test
+ public void map() throws IOException {
+ WorkflowFormPropertyTO prop = new WorkflowFormPropertyTO();
+ prop.getEnumValues().put("key1", "value1");
+ prop.getEnumValues().put("key2", "value2");
+
+ ObjectMapper mapper = new ObjectMapper();
+
+ StringWriter writer = new StringWriter();
+ mapper.writeValue(writer, prop);
+
+ WorkflowFormPropertyTO unserializedProp = mapper.readValue(writer.toString(), WorkflowFormPropertyTO.class);
+ assertEquals(prop, unserializedProp);
+ }
+
+ @Test
+ public void reportletConfImplementations() throws IOException {
+ ReportTO report = new ReportTO();
+ report.setName("testReportForCreate");
+ report.getReportletConfs().add(new UserReportletConf("first"));
+ report.getReportletConfs().add(new UserReportletConf("second"));
+
+ ObjectMapper mapper = new ObjectMapper();
+
+ StringWriter writer = new StringWriter();
+ mapper.writeValue(writer, report);
+
+ ReportTO actual = mapper.readValue(writer.toString(), ReportTO.class);
+ assertEquals(report, actual);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/pom.xml
----------------------------------------------------------------------
diff --git a/common/pom.xml b/common/pom.xml
index de1f31e..a137eb5 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -31,288 +31,11 @@ under the License.
<description>Apache Syncope Common</description>
<groupId>org.apache.syncope</groupId>
<artifactId>syncope-common</artifactId>
- <packaging>bundle</packaging>
+ <packaging>pom</packaging>
- <distributionManagement>
- <site>
- <id>syncope.website</id>
- <name>Apache Syncope website</name>
- <url>${site.deploymentBaseUrl}/${project.artifactId}</url>
- </site>
- </distributionManagement>
+ <modules>
+ <module>lib</module>
+ <module>rest-api</module>
+ </modules>
- <dependencies>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-extension-search</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-service-description</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <!-- Generating javadoc JAR artifact for usage with CXF's WADL generator (for core) -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-Name>${project.name}</Bundle-Name>
- <Bundle-SymbolicName>org.apache.syncope.common</Bundle-SymbolicName>
- <Bundle-Version>${project.version}</Bundle-Version>
- <Export-Package>
- org.apache.syncope.common*;version=${project.version};-split-package:=merge-first
- </Export-Package>
- <Import-Package>
- org.apache.commons.lang3;version="[3.1,3.2)",
- com.fasterxml.jackson.annotation;version="[2.2.2,2.3)",
- org.springframework*;version="[3,4)",
- org.apache.logging.log4j*;resolution:=optional,
- org.slf4j;resolution:=optional,
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- </plugin>
- </plugins>
-
- <resources>
- <resource>
- <directory>..</directory>
- <targetPath>META-INF</targetPath>
- <includes>
- <include>LICENSE</include>
- <include>NOTICE</include>
- </includes>
- </resource>
- </resources>
- </build>
-
- <profiles>
- <profile>
- <id>offline-doc</id>
-
- <build>
- <defaultGoal>clean verify</defaultGoal>
-
- <plugins>
- <!-- 1. Generate offline WADL -->
- <plugin>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-java2wadl-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>parsejavadoc</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>parsejavadoc</goal>
- </goals>
- </execution>
- <execution>
- <id>process-classes</id>
- <phase>process-classes</phase>
- <goals>
- <goal>java2wadl</goal>
- </goals>
- <configuration>
- <applicationTitle>Apache Syncope ${project.version}</applicationTitle>
- <namespacePrefix>syncope</namespacePrefix>
- <addResourceAndMethodIds>true</addResourceAndMethodIds>
- <linkAnyMediaTypeToXmlSchema>true</linkAnyMediaTypeToXmlSchema>
- <classResourceNames />
- <basePackages>org.apache.syncope.common.services</basePackages>
- <docProvider>org.apache.cxf.maven_plugin.javatowadl.ResourceMapJavaDocProvider</docProvider>
- <attachWadl>true</attachWadl>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <!-- 2. Transform WADL into 2 HTML pages -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>xml-maven-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <phase>prepare-package</phase>
- <goals>
- <goal>transform</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <transformationSets>
- <transformationSet>
- <dir>${project.build.directory}/generated/wadl/</dir>
- <includes>
- <include>application.wadl</include>
- </includes>
- <outputDir>${project.build.directory}/generated/wadl</outputDir>
- <stylesheet>${basedir}/../core/src/main/resources/wadl2html/index.xsl</stylesheet>
- <parameters>
- <parameter>
- <name>contextPath</name>
- <value>/restdocs/${project.version}</value>
- </parameter>
- </parameters>
- <outputProperties>
- <outputProperty>
- <name>indent</name>
- <value>yes</value>
- </outputProperty>
- </outputProperties>
- <fileMappers>
- <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
- <pattern>^.*$</pattern>
- <replacement>index.html</replacement>
- </fileMapper>
- </fileMappers>
- </transformationSet>
- <transformationSet>
- <dir>${project.build.directory}/generated/wadl/</dir>
- <includes>
- <include>application.wadl</include>
- </includes>
- <outputDir>${project.build.directory}/generated/wadl</outputDir>
- <stylesheet>${basedir}/../core/src/main/resources/wadl2html/schema.xsl</stylesheet>
- <parameters>
- <parameter>
- <name>contextPath</name>
- <value>/restdocs/${project.version}</value>
- </parameter>
- <parameter>
- <name>schema-position</name>
- <value>1</value>
- </parameter>
- <parameter>
- <name>schema-prefix</name>
- <value>syncope1</value>
- </parameter>
- </parameters>
- <outputProperties>
- <outputProperty>
- <name>indent</name>
- <value>yes</value>
- </outputProperty>
- </outputProperties>
- <fileMappers>
- <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
- <pattern>^.*$</pattern>
- <replacement>schema_1_syncope1.html</replacement>
- </fileMapper>
- </fileMappers>
- </transformationSet>
- </transformationSets>
- </configuration>
- </plugin>
- <!-- 3. Replace CSS and JS local includes with hosted -->
- <plugin>
- <groupId>com.google.code.maven-replacer-plugin</groupId>
- <artifactId>replacer</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>replace</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <regex>false</regex>
- <includes>
- <include>${project.build.directory}/generated/wadl/*.html</include>
- </includes>
- <replacements>
- <replacement>
- <token>/restdocs/${project.version}/webjars/highlightjs/$/styles/default.min.css</token>
- <value>http://yandex.st/highlightjs/${highlightjs.version}/styles/default.min.css</value>
- </replacement>
- <replacement>
- <token>/restdocs/${project.version}/webjars/highlightjs/$/highlight.min.js</token>
- <value>http://yandex.st/highlightjs/${highlightjs.version}/highlight.min.js"</value>
- </replacement>
- <replacement>
- <token>/restdocs/${project.version}/webjars/jquery-ui/$/themes/base/minified/jquery-ui.min.css</token>
- <value>http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/minified/jquery-ui.min.css</value>
- </replacement>
- <replacement>
- <token>/restdocs/${project.version}/webjars/jquery-ui/$/ui/minified/jquery-ui.min.js</token>
- <value>http://ajax.googleapis.com/ajax/libs/jqueryui/${jquery-ui.version}/jquery-ui.min.js</value>
- </replacement>
- <replacement>
- <token>/restdocs/${project.version}/webjars/jquery/$/jquery.min.js</token>
- <value>http://ajax.googleapis.com/ajax/libs/jquery/${jquery.version}/jquery.min.js</value>
- </replacement>
- </replacements>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/pom.xml
----------------------------------------------------------------------
diff --git a/common/rest-api/pom.xml b/common/rest-api/pom.xml
new file mode 100644
index 0000000..f4409c5
--- /dev/null
+++ b/common/rest-api/pom.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.syncope</groupId>
+ <artifactId>syncope-common</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>Apache Syncope Common REST API</name>
+ <description>Apache Syncope Common REST API</description>
+ <groupId>org.apache.syncope.common</groupId>
+ <artifactId>syncope-common-rest-api</artifactId>
+ <packaging>jar</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-extension-search</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-service-description</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.syncope.common</groupId>
+ <artifactId>syncope-common-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <!-- Generating javadoc JAR artifact for usage with CXF's WADL generator (for core) -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
[34/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
new file mode 100644
index 0000000..40e031a
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
@@ -0,0 +1,189 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.syncope.client.console.rest.PolicyRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.common.lib.to.AbstractPolicyTO;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.types.PolicyType;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.ChoiceRenderer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class ResourceSecurityPanel extends Panel {
+
+ private static final long serialVersionUID = -7982691107029848579L;
+
+ @SpringBean
+ private PolicyRestClient policyRestClient;
+
+ private IModel<Map<Long, String>> passwordPolicies = null;
+
+ private IModel<Map<Long, String>> accountPolicies = null;
+
+ private IModel<Map<Long, String>> syncPolicies = null;
+
+ public ResourceSecurityPanel(final String id, final ResourceTO resourceTO) {
+
+ super(id);
+
+ setOutputMarkupId(true);
+
+ passwordPolicies = new LoadableDetachableModel<Map<Long, String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected Map<Long, String> load() {
+ Map<Long, String> res = new HashMap<>();
+ for (AbstractPolicyTO policyTO : policyRestClient.getPolicies(PolicyType.PASSWORD, false)) {
+ res.put(policyTO.getKey(), policyTO.getDescription());
+ }
+ return res;
+ }
+ };
+
+ accountPolicies = new LoadableDetachableModel<Map<Long, String>>() {
+
+ private static final long serialVersionUID = -2012833443695917883L;
+
+ @Override
+ protected Map<Long, String> load() {
+ Map<Long, String> res = new HashMap<>();
+ for (AbstractPolicyTO policyTO : policyRestClient.getPolicies(PolicyType.ACCOUNT, false)) {
+ res.put(policyTO.getKey(), policyTO.getDescription());
+ }
+ return res;
+ }
+ };
+
+ syncPolicies = new LoadableDetachableModel<Map<Long, String>>() {
+
+ private static final long serialVersionUID = -2012833443695917883L;
+
+ @Override
+ protected Map<Long, String> load() {
+ Map<Long, String> res = new HashMap<>();
+ for (AbstractPolicyTO policyTO : policyRestClient.getPolicies(PolicyType.SYNC, false)) {
+ res.put(policyTO.getKey(), policyTO.getDescription());
+ }
+ return res;
+ }
+ };
+
+ final WebMarkupContainer securityContainer = new WebMarkupContainer("security");
+
+ securityContainer.setOutputMarkupId(true);
+ add(securityContainer);
+
+ // -------------------------------
+ // Password policy specification
+ // -------------------------------
+ final AjaxDropDownChoicePanel<Long> passwordPolicy = new AjaxDropDownChoicePanel<Long>("passwordPolicy",
+ new ResourceModel("passwordPolicy", "passwordPolicy").getObject(), new PropertyModel<Long>(resourceTO,
+ "passwordPolicy"));
+
+ passwordPolicy.setChoiceRenderer(new PolicyRenderer(PolicyType.PASSWORD));
+
+ passwordPolicy.setChoices(new ArrayList<>(passwordPolicies.getObject().keySet()));
+
+ ((DropDownChoice<?>) passwordPolicy.getField()).setNullValid(true);
+
+ securityContainer.add(passwordPolicy);
+ // -------------------------------
+
+ // -------------------------------
+ // Account policy specification
+ // -------------------------------
+ final AjaxDropDownChoicePanel<Long> accountPolicy = new AjaxDropDownChoicePanel<Long>("accountPolicy",
+ new ResourceModel("accountPolicy", "accountPolicy").getObject(), new PropertyModel<Long>(resourceTO,
+ "accountPolicy"));
+
+ accountPolicy.setChoiceRenderer(new PolicyRenderer(PolicyType.ACCOUNT));
+
+ accountPolicy.setChoices(new ArrayList<Long>(accountPolicies.getObject().keySet()));
+
+ ((DropDownChoice<?>) accountPolicy.getField()).setNullValid(true);
+
+ securityContainer.add(accountPolicy);
+ // -------------------------------
+
+ // -------------------------------
+ // Sync policy specification
+ // -------------------------------
+ final AjaxDropDownChoicePanel<Long> syncPolicy = new AjaxDropDownChoicePanel<Long>("syncPolicy",
+ new ResourceModel("syncPolicy", "syncPolicy").getObject(), new PropertyModel<Long>(resourceTO,
+ "syncPolicy"));
+
+ syncPolicy.setChoiceRenderer(new PolicyRenderer(PolicyType.SYNC));
+
+ syncPolicy.setChoices(new ArrayList<Long>(syncPolicies.getObject().keySet()));
+
+ ((DropDownChoice<?>) syncPolicy.getField()).setNullValid(true);
+
+ securityContainer.add(syncPolicy);
+ // -------------------------------
+ }
+
+ private class PolicyRenderer extends ChoiceRenderer<Long> {
+
+ private static final long serialVersionUID = 8060500161321947000L;
+
+ private PolicyType type;
+
+ public PolicyRenderer(final PolicyType type) {
+ super();
+ this.type = type;
+ }
+
+ @Override
+ public Object getDisplayValue(final Long object) {
+ switch (type) {
+ case GLOBAL_ACCOUNT:
+ case ACCOUNT:
+ return accountPolicies.getObject().get(object);
+ case GLOBAL_PASSWORD:
+ case PASSWORD:
+ return passwordPolicies.getObject().get(object);
+ case GLOBAL_SYNC:
+ case SYNC:
+ return syncPolicies.getObject().get(object);
+ default:
+ return "";
+ }
+ }
+
+ @Override
+ public String getIdValue(final Long object, final int index) {
+ return String.valueOf(object != null
+ ? object
+ : 0L);
+ }
+ };
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourcesPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourcesPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourcesPanel.java
new file mode 100644
index 0000000..67e2281
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourcesPanel.java
@@ -0,0 +1,178 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.RoleTreeBuilder;
+import org.apache.syncope.client.console.commons.RoleUtils;
+import org.apache.syncope.client.console.commons.SelectChoiceRenderer;
+import org.apache.syncope.client.console.commons.status.StatusUtils;
+import org.apache.syncope.client.console.rest.ResourceRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.NonI18nPalette;
+import org.apache.syncope.common.lib.to.AbstractSubjectTO;
+import org.apache.syncope.common.lib.to.MembershipTO;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.extensions.markup.html.form.palette.Palette;
+import org.apache.wicket.extensions.markup.html.form.palette.component.Recorder;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.util.ListModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class ResourcesPanel extends Panel {
+
+ private static final long serialVersionUID = -8728071019777410008L;
+
+ @SpringBean
+ private ResourceRestClient resourceRestClient;
+
+ @SpringBean
+ private RoleTreeBuilder roleTreeBuilder;
+
+ private final AbstractSubjectTO subjectTO;
+
+ private final Set<String> previousResources;
+
+ private final List<String> allResources;
+
+ public static class Builder implements Serializable {
+
+ private static final long serialVersionUID = 8644108944633025494L;
+
+ private String id;
+
+ private Object to;
+
+ private StatusPanel statusPanel;
+
+ public Builder(final String id) {
+ this.id = id;
+ }
+
+ public Builder attributableTO(final Object to) {
+ this.to = to;
+ return this;
+ }
+
+ public Builder statusPanel(final StatusPanel statusPanel) {
+ this.statusPanel = statusPanel;
+ return this;
+ }
+
+ public ResourcesPanel build() {
+ return new ResourcesPanel(this);
+ }
+ }
+
+ private ResourcesPanel(final Builder builder) {
+ super(builder.id);
+ subjectTO = (AbstractSubjectTO) builder.to;
+ previousResources = new HashSet<>(subjectTO.getResources());
+ allResources = new ArrayList<>();
+ for (ResourceTO resourceTO : resourceRestClient.getAll()) {
+ allResources.add(resourceTO.getKey());
+ }
+ Collections.sort(allResources);
+
+ AjaxPalettePanel<String> resourcesPalette = null;
+
+ if (subjectTO instanceof UserTO) {
+ resourcesPalette = new AjaxRecordingPalettePanel<>("resourcesPalette",
+ new PropertyModel<List<String>>(subjectTO, "resources"),
+ new ListModel<>(allResources), builder.statusPanel);
+ } else if (subjectTO instanceof RoleTO) {
+ resourcesPalette = new AjaxPalettePanel<>("resourcesPalette",
+ new PropertyModel<List<String>>(subjectTO, "resources"), new ListModel<>(allResources));
+ }
+ add(resourcesPalette);
+ }
+
+ private class AjaxRecordingPalettePanel<T> extends AjaxPalettePanel<T> {
+
+ private static final long serialVersionUID = -4215625881756021988L;
+
+ private final StatusPanel statusPanel;
+
+ public AjaxRecordingPalettePanel(final String id, final IModel<List<T>> model, final ListModel<T> choices,
+ final StatusPanel statusPanel) {
+
+ super(id, model, choices, new SelectChoiceRenderer<T>(), false, false);
+ this.statusPanel = statusPanel;
+ }
+
+ @Override
+ protected Palette<T> createPalette(final IModel<List<T>> model, final ListModel<T> choices,
+ final IChoiceRenderer<T> renderer, final boolean allowOrder, final boolean allowMoveAll) {
+
+ return new NonI18nPalette<T>("paletteField", model, choices, renderer, 8, allowOrder, false) {
+
+ private static final long serialVersionUID = -3415146226879212841L;
+
+ @Override
+ protected Recorder<T> newRecorderComponent() {
+ Recorder<T> recorder = super.newRecorderComponent();
+ recorder.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = 5538299138211283825L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ if (subjectTO instanceof UserTO) {
+ UserTO userTO = (UserTO) subjectTO;
+
+ Set<String> resourcesToRemove = new HashSet<String>(previousResources);
+ resourcesToRemove.removeAll(userTO.getResources());
+ if (!resourcesToRemove.isEmpty()) {
+ Set<String> resourcesAssignedViaMembership = new HashSet<String>();
+ for (MembershipTO membTO : userTO.getMemberships()) {
+ RoleTO roleTO = RoleUtils.findRole(roleTreeBuilder, membTO.getRoleId());
+ if (roleTO != null) {
+ resourcesAssignedViaMembership.addAll(roleTO.getResources());
+ }
+ }
+ resourcesToRemove.removeAll(resourcesAssignedViaMembership);
+ }
+
+ previousResources.clear();
+ previousResources.addAll(userTO.getResources());
+
+ StatusUtils.update(
+ userTO, statusPanel, target, userTO.getResources(), resourcesToRemove);
+ }
+ }
+ });
+ return recorder;
+ }
+ };
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDetailsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDetailsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDetailsPanel.java
new file mode 100644
index 0000000..03d2e75
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDetailsPanel.java
@@ -0,0 +1,435 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.JexlHelpUtil;
+import org.apache.syncope.client.console.pages.RoleSelectModalPage;
+import org.apache.syncope.client.console.pages.UserOwnerSelectModalPage;
+import org.apache.syncope.client.console.panels.AttrTemplatesPanel.RoleAttrTemplatesChange;
+import org.apache.syncope.client.console.panels.AttrTemplatesPanel.Type;
+import org.apache.syncope.client.console.rest.RoleRestClient;
+import org.apache.syncope.client.console.rest.UserRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.wicket.Page;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RoleDetailsPanel extends Panel {
+
+ private static final long serialVersionUID = 855618618337931784L;
+
+ /**
+ * Logger.
+ */
+ protected static final Logger LOG = LoggerFactory.getLogger(RoleDetailsPanel.class);
+
+ @SpringBean
+ private UserRestClient userRestClient;
+
+ @SpringBean
+ private RoleRestClient roleRestClient;
+
+ private final Fragment parentFragment;
+
+ private final WebMarkupContainer ownerContainer;
+
+ private final OwnerModel userOwnerModel;
+
+ private final OwnerModel roleOwnerModel;
+
+ private ParentModel parentModel;
+
+ public RoleDetailsPanel(final String id, final RoleTO roleTO, final boolean templateMode) {
+ super(id);
+
+ ownerContainer = new WebMarkupContainer("ownerContainer");
+ ownerContainer.setOutputMarkupId(true);
+ this.add(ownerContainer);
+
+ final ModalWindow userOwnerSelectWin = new ModalWindow("userOwnerSelectWin");
+ userOwnerSelectWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ userOwnerSelectWin.setCookieName("create-userOwnerSelect-modal");
+ this.add(userOwnerSelectWin);
+ final ModalWindow roleOwnerSelectWin = new ModalWindow("roleOwnerSelectWin");
+ roleOwnerSelectWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ roleOwnerSelectWin.setCookieName("create-roleOwnerSelect-modal");
+ this.add(roleOwnerSelectWin);
+ final ModalWindow parentSelectWin = new ModalWindow("parentSelectWin");
+ parentSelectWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ parentSelectWin.setCookieName("create-parentSelect-modal");
+ this.add(parentSelectWin);
+
+ if (templateMode) {
+ parentFragment = new Fragment("parent", "parentFragment", this);
+
+ parentModel = new ParentModel(roleTO);
+ @SuppressWarnings("unchecked")
+ final AjaxTextFieldPanel parent = new AjaxTextFieldPanel("parent", "parent", parentModel);
+ parent.setReadOnly(true);
+ parent.setOutputMarkupId(true);
+ parentFragment.add(parent);
+ final AjaxLink<Void> parentSelect = new IndicatingAjaxLink<Void>("parentSelect") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ parentSelectWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new RoleSelectModalPage(getPage().getPageReference(), parentSelectWin,
+ ParentSelectPayload.class);
+ }
+ });
+ parentSelectWin.show(target);
+ }
+ };
+ parentFragment.add(parentSelect);
+ final IndicatingAjaxLink<Void> parentReset = new IndicatingAjaxLink<Void>("parentReset") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ parentModel.setObject(null);
+ target.add(parent);
+ }
+ };
+ parentFragment.add(parentReset);
+ } else {
+ parentFragment = new Fragment("parent", "emptyFragment", this);
+ }
+ parentFragment.setOutputMarkupId(true);
+ this.add(parentFragment);
+
+ final AjaxTextFieldPanel name =
+ new AjaxTextFieldPanel("name", "name", new PropertyModel<String>(roleTO, "key"));
+
+ final WebMarkupContainer jexlHelp = JexlHelpUtil.getJexlHelpWebContainer("jexlHelp");
+
+ final AjaxLink<Void> questionMarkJexlHelp = JexlHelpUtil.getAjaxLink(jexlHelp, "questionMarkJexlHelp");
+ this.add(questionMarkJexlHelp);
+ questionMarkJexlHelp.add(jexlHelp);
+
+ if (!templateMode) {
+ name.addRequiredLabel();
+ questionMarkJexlHelp.setVisible(false);
+ }
+ this.add(name);
+
+ userOwnerModel = new OwnerModel(roleTO, AttributableType.USER);
+ @SuppressWarnings("unchecked")
+ final AjaxTextFieldPanel userOwner = new AjaxTextFieldPanel("userOwner", "userOwner", userOwnerModel);
+ userOwner.setReadOnly(true);
+ userOwner.setOutputMarkupId(true);
+ ownerContainer.add(userOwner);
+ final AjaxLink<Void> userOwnerSelect = new IndicatingAjaxLink<Void>("userOwnerSelect") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ userOwnerSelectWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new UserOwnerSelectModalPage(getPage().getPageReference(), userOwnerSelectWin);
+ }
+ });
+ userOwnerSelectWin.show(target);
+ }
+ };
+ ownerContainer.add(userOwnerSelect);
+ final IndicatingAjaxLink<Void> userOwnerReset = new IndicatingAjaxLink<Void>("userOwnerReset") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ userOwnerModel.setObject(null);
+ target.add(userOwner);
+ }
+ };
+ ownerContainer.add(userOwnerReset);
+
+ roleOwnerModel = new OwnerModel(roleTO, AttributableType.ROLE);
+ @SuppressWarnings("unchecked")
+ final AjaxTextFieldPanel roleOwner = new AjaxTextFieldPanel("roleOwner", "roleOwner", roleOwnerModel);
+ roleOwner.setReadOnly(true);
+ roleOwner.setOutputMarkupId(true);
+ ownerContainer.add(roleOwner);
+ final AjaxLink<Void> roleOwnerSelect = new IndicatingAjaxLink<Void>("roleOwnerSelect") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ parentSelectWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new RoleSelectModalPage(getPage().getPageReference(), parentSelectWin,
+ RoleOwnerSelectPayload.class);
+ }
+ });
+ parentSelectWin.show(target);
+ }
+ };
+ ownerContainer.add(roleOwnerSelect);
+ final IndicatingAjaxLink<Void> roleOwnerReset = new IndicatingAjaxLink<Void>("roleOwnerReset") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ roleOwnerModel.setObject(null);
+ target.add(roleOwner);
+ }
+ };
+ ownerContainer.add(roleOwnerReset);
+
+ final AjaxCheckBoxPanel inhOwner = new AjaxCheckBoxPanel("inheritOwner", "inheritOwner",
+ new PropertyModel<Boolean>(roleTO, "inheritOwner"));
+ this.add(inhOwner);
+
+ final AjaxCheckBoxPanel inhTemplates = new AjaxCheckBoxPanel("inheritTemplates", "inheritTemplates",
+ new PropertyModel<Boolean>(roleTO, "inheritTemplates"));
+ inhTemplates.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ send(getPage(), Broadcast.BREADTH, new RoleAttrTemplatesChange(Type.rPlainAttrTemplates, target));
+ send(getPage(), Broadcast.BREADTH, new RoleAttrTemplatesChange(Type.rDerAttrTemplates, target));
+ send(getPage(), Broadcast.BREADTH, new RoleAttrTemplatesChange(Type.rVirAttrTemplates, target));
+ }
+ });
+ this.add(inhTemplates);
+ }
+
+ /**
+ * This is waiting for events from opened modal windows: first to get the selected user / role, then to update the
+ * respective text panel.
+ *
+ * {@inheritDoc }
+ */
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ super.onEvent(event);
+
+ if (event.getPayload() instanceof ParentSelectPayload) {
+ parentModel.setObject(((ParentSelectPayload) event.getPayload()).getRoleId());
+ }
+ if (event.getPayload() instanceof UserOwnerSelectPayload) {
+ userOwnerModel.setObject(((UserOwnerSelectPayload) event.getPayload()).getUserId());
+ }
+ if (event.getPayload() instanceof RoleOwnerSelectPayload) {
+ roleOwnerModel.setObject(((RoleOwnerSelectPayload) event.getPayload()).getRoleId());
+ }
+
+ if (event.getPayload() instanceof AjaxRequestTarget) {
+ ((AjaxRequestTarget) event.getPayload()).add(parentFragment);
+ ((AjaxRequestTarget) event.getPayload()).add(ownerContainer);
+ }
+ }
+
+ private class OwnerModel implements IModel {
+
+ private static final long serialVersionUID = -3865621970810102714L;
+
+ private final RoleTO roleTO;
+
+ private final AttributableType type;
+
+ public OwnerModel(final RoleTO roleTO, final AttributableType type) {
+ this.roleTO = roleTO;
+ this.type = type;
+ }
+
+ @Override
+ public Object getObject() {
+ String object = null;
+
+ switch (type) {
+ case USER:
+ if (roleTO.getUserOwner() != null) {
+ UserTO user = null;
+ try {
+ user = userRestClient.read(roleTO.getUserOwner());
+ } catch (Exception e) {
+ LOG.warn("Could not find user with id {}, ignoring", roleTO.getUserOwner(), e);
+ }
+ if (user == null) {
+ roleTO.setUserOwner(null);
+ } else {
+ object = user.getKey() + " " + user.getUsername();
+ }
+ }
+ break;
+
+ case ROLE:
+ RoleTO role = null;
+ if (roleTO.getRoleOwner() != null) {
+ try {
+ role = roleRestClient.read(roleTO.getRoleOwner());
+ } catch (Exception e) {
+ LOG.warn("Could not find role with id {}, ignoring", roleTO.getRoleOwner(), e);
+ }
+ if (role == null) {
+ roleTO.setRoleOwner(null);
+ } else {
+ object = role.getDisplayName();
+ }
+ }
+ break;
+
+ case MEMBERSHIP:
+ default:
+ }
+
+ return object;
+ }
+
+ @Override
+ public void setObject(final Object object) {
+ switch (type) {
+ case USER:
+ roleTO.setUserOwner((Long) object);
+ break;
+
+ case ROLE:
+ roleTO.setRoleOwner((Long) object);
+ break;
+
+ case MEMBERSHIP:
+ default:
+ }
+ }
+
+ @Override
+ public void detach() {
+ // ignore
+ }
+ }
+
+ private class ParentModel implements IModel {
+
+ private static final long serialVersionUID = 1006546156848990721L;
+
+ private final RoleTO roleTO;
+
+ public ParentModel(final RoleTO roleTO) {
+ this.roleTO = roleTO;
+ }
+
+ @Override
+ public Object getObject() {
+ Object object = null;
+ if (roleTO.getParent() != 0) {
+ RoleTO parent = null;
+ try {
+ parent = roleRestClient.read(roleTO.getParent());
+ } catch (Exception e) {
+ LOG.warn("Could not find role with id {}, ignoring", roleTO.getParent(), e);
+ }
+ if (parent == null) {
+ roleTO.setParent(0);
+ } else {
+ object = parent.getDisplayName();
+ }
+ }
+ return object;
+ }
+
+ @Override
+ public void setObject(final Object object) {
+ roleTO.setParent((object instanceof Long) ? ((Long) object) : 0);
+ }
+
+ @Override
+ public void detach() {
+ // ignore
+ }
+ }
+
+ public static class UserOwnerSelectPayload {
+
+ private final Long userId;
+
+ public UserOwnerSelectPayload(final Long userId) {
+ this.userId = userId;
+ }
+
+ public Long getUserId() {
+ return userId;
+ }
+ }
+
+ public static class RoleOwnerSelectPayload {
+
+ private final Long roleId;
+
+ public RoleOwnerSelectPayload(final Long roleId) {
+ this.roleId = roleId;
+ }
+
+ public Long getRoleId() {
+ return roleId;
+ }
+ }
+
+ public static class ParentSelectPayload {
+
+ private final Long roleId;
+
+ public ParentSelectPayload(final Long roleId) {
+ this.roleId = roleId;
+ }
+
+ public Long getRoleId() {
+ return roleId;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/RolePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RolePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RolePanel.java
new file mode 100644
index 0000000..da04397
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RolePanel.java
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.commons.XMLRolesReader;
+import org.apache.syncope.client.console.commons.status.StatusBean;
+import org.apache.syncope.client.console.rest.AuthRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.util.ListModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class RolePanel extends Panel {
+
+ private static final long serialVersionUID = 4216376097320768369L;
+
+ @SpringBean
+ private AuthRestClient authRestClient;
+
+ @SpringBean
+ private XMLRolesReader xmlRolesReader;
+
+ private final AjaxPalettePanel<String> entitlements;
+
+ public static class Builder implements Serializable {
+
+ private static final long serialVersionUID = 8150440254654306070L;
+
+ private String id;
+
+ private Form form;
+
+ private RoleTO roleTO;
+
+ private Mode mode;
+
+ private PageReference pageReference;
+
+ public Builder(final String id) {
+ this.id = id;
+ }
+
+ public Builder form(final Form form) {
+ this.form = form;
+ return this;
+ }
+
+ public Builder roleTO(final RoleTO roleTO) {
+ this.roleTO = roleTO;
+ return this;
+ }
+
+ public Builder roleModalPageMode(final Mode mode) {
+ this.mode = mode;
+ return this;
+ }
+
+ public Builder pageRef(final PageReference pageReference) {
+ this.pageReference = pageReference;
+ return this;
+ }
+
+ public RolePanel build() {
+ return new RolePanel(this);
+ }
+ }
+
+ private RolePanel(final Builder builder) {
+ super(builder.id);
+
+ this.add(new RoleDetailsPanel("details", builder.roleTO, builder.mode == Mode.TEMPLATE));
+
+ if (builder.pageReference == null || builder.roleTO.getKey() == 0) {
+ this.add(new Label("statuspanel", ""));
+ } else {
+ StatusPanel statusPanel = new StatusPanel(
+ "statuspanel", builder.roleTO, new ArrayList<StatusBean>(), builder.pageReference);
+ statusPanel.setOutputMarkupId(true);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ statusPanel, RENDER, xmlRolesReader.getEntitlement("Resources", "getConnectorObject"));
+ this.add(statusPanel);
+ }
+
+ this.add(new AnnotatedBeanPanel("systeminformation", builder.roleTO));
+
+ //--------------------------------
+ // Attribute templates panel
+ //--------------------------------
+ AttrTemplatesPanel attrTemplates = new AttrTemplatesPanel("templates", builder.roleTO);
+ this.add(attrTemplates);
+
+ //--------------------------------
+ // Attributes panel
+ //--------------------------------
+ this.add(new PlainAttrsPanel(
+ "plainAttrs", builder.roleTO, builder.form, builder.mode, attrTemplates));
+
+ final AjaxCheckBoxPanel inhAttributes = new AjaxCheckBoxPanel("inheritPlainAttrs", "inheritPlainAttrs",
+ new PropertyModel<Boolean>(builder.roleTO, "inheritPlainAttrs"));
+ inhAttributes.setOutputMarkupId(true);
+ this.add(inhAttributes);
+ //--------------------------------
+
+ //--------------------------------
+ // Derived attributes panel
+ //--------------------------------
+ this.add(new DerAttrsPanel("derAttrs", builder.roleTO, attrTemplates));
+
+ final AjaxCheckBoxPanel inhDerivedAttributes = new AjaxCheckBoxPanel("inheritDerAttrs",
+ "inheritDerAttrs", new PropertyModel<Boolean>(builder.roleTO, "inheritDerAttrs"));
+ inhDerivedAttributes.setOutputMarkupId(true);
+ this.add(inhDerivedAttributes);
+ //--------------------------------
+
+ //--------------------------------
+ // Virtual attributes panel
+ //--------------------------------
+ this.add(new VirAttrsPanel(
+ "virAttrs", builder.roleTO, builder.mode == Mode.TEMPLATE, attrTemplates));
+
+ final AjaxCheckBoxPanel inhVirtualAttributes = new AjaxCheckBoxPanel("inheritVirAttrs",
+ "inheritVirAttrs", new PropertyModel<Boolean>(builder.roleTO, "inheritVirAttrs"));
+ inhVirtualAttributes.setOutputMarkupId(true);
+ this.add(inhVirtualAttributes);
+ //--------------------------------
+
+ //--------------------------------
+ // Resources panel
+ //--------------------------------
+ this.add(new ResourcesPanel.Builder("resources").attributableTO(builder.roleTO).build().
+ setOutputMarkupId(true));
+ //--------------------------------
+
+ //--------------------------------
+ // Entitlements
+ //--------------------------------
+ ListModel<String> selectedEntitlements = new ListModel<String>(builder.roleTO.getEntitlements());
+
+ List<String> allEntitlements = authRestClient.getAllEntitlements();
+ if (allEntitlements != null && !allEntitlements.isEmpty()) {
+ Collections.sort(allEntitlements);
+ }
+ ListModel<String> availableEntitlements = new ListModel<String>(allEntitlements);
+
+ entitlements = new AjaxPalettePanel<String>("entitlements", selectedEntitlements, availableEntitlements);
+ this.add(entitlements);
+
+ //--------------------------------
+ // Security panel
+ //--------------------------------
+ this.add(new RoleSecurityPanel("security", builder.roleTO).setOutputMarkupId(true));
+ //--------------------------------
+ }
+
+ public Collection<String> getSelectedEntitlements() {
+ return this.entitlements.getModelCollection();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSearchPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSearchPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSearchPanel.java
new file mode 100644
index 0000000..c8d9727
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSearchPanel.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import org.apache.syncope.client.lib.SyncopeClient;
+import org.apache.syncope.common.lib.search.SyncopeFiqlSearchConditionBuilder;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.wicket.model.LoadableDetachableModel;
+
+public class RoleSearchPanel extends AbstractSearchPanel {
+
+ private static final long serialVersionUID = 5757183539269316263L;
+
+ public static class Builder implements Serializable {
+
+ private static final long serialVersionUID = 6308997285778809579L;
+
+ private String id;
+
+ private String fiql = null;
+
+ private boolean required = true;
+
+ public Builder(final String id) {
+ this.id = id;
+ }
+
+ public Builder fiql(final String fiql) {
+ this.fiql = fiql;
+ return this;
+ }
+
+ public Builder required(final boolean required) {
+ this.required = required;
+ return this;
+ }
+
+ public RoleSearchPanel build() {
+ return new RoleSearchPanel(this);
+ }
+ }
+
+ private RoleSearchPanel(final Builder builder) {
+ super(builder.id, AttributableType.ROLE, builder.fiql, builder.required);
+ }
+
+ @Override
+ protected void populate() {
+ super.populate();
+
+ this.types = new LoadableDetachableModel<List<SearchClause.Type>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<SearchClause.Type> load() {
+ final List<SearchClause.Type> result = new ArrayList<SearchClause.Type>();
+ result.add(SearchClause.Type.ATTRIBUTE);
+ result.add(SearchClause.Type.ENTITLEMENT);
+ result.add(SearchClause.Type.RESOURCE);
+ return result;
+ }
+ };
+
+ this.roleNames = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ return Collections.<String>emptyList();
+ }
+ };
+ }
+
+ @Override
+ protected SyncopeFiqlSearchConditionBuilder getSearchConditionBuilder() {
+ return SyncopeClient.getRoleSearchConditionBuilder();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSearchResultPanel.java
new file mode 100644
index 0000000..dfd40d5
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSearchResultPanel.java
@@ -0,0 +1,172 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.ResultStatusModalPage;
+import org.apache.syncope.client.console.pages.RoleModalPage;
+import org.apache.syncope.client.console.pages.StatusModalPage;
+import org.apache.syncope.client.console.rest.AbstractSubjectRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+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.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
+
+public class RoleSearchResultPanel extends AbstractSearchResultPanel {
+
+ private static final long serialVersionUID = -1180593361914008764L;
+
+ private final static String PAGEID = "Roles";
+
+ public <T extends AbstractAttributableTO> RoleSearchResultPanel(final String id, final boolean filtered,
+ final String fiql, final PageReference callerRef, final AbstractSubjectRestClient restClient) {
+
+ super(id, filtered, fiql, callerRef, restClient);
+ initResultTable();
+ }
+
+ @Override
+ protected List<IColumn<AbstractAttributableTO, String>> getColumns() {
+ final List<IColumn<AbstractAttributableTO, String>> columns = new ArrayList<>();
+
+ for (String item : new String[] { "key", "name", "entitlements" }) {
+ columns.add(new PropertyColumn<AbstractAttributableTO, String>(new ResourceModel(item, item), item, item));
+ }
+
+ columns.add(new AbstractColumn<AbstractAttributableTO, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = -3503023501954863131L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<AbstractAttributableTO>> cellItem,
+ final String componentId, final IModel<AbstractAttributableTO> model) {
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, page.getPageReference());
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ statusmodal.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new StatusModalPage<RoleTO>(
+ page.getPageReference(), statusmodal, (RoleTO) model.getObject());
+ }
+ });
+
+ statusmodal.show(target);
+ }
+ }, ActionLink.ActionType.MANAGE_RESOURCES, PAGEID);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ editmodal.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new RoleModalPage(
+ page.getPageReference(), editmodal, (RoleTO) model.getObject());
+ }
+ });
+
+ editmodal.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, PAGEID);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ final RoleTO roleTO = (RoleTO) restClient.
+ delete(model.getObject().getETagValue(), model.getObject().getKey());
+
+ page.setModalResult(true);
+
+ editmodal.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ResultStatusModalPage.Builder(editmodal, roleTO).build();
+ }
+ });
+
+ editmodal.show(target);
+ } catch (SyncopeClientException scce) {
+ error(getString(Constants.OPERATION_ERROR) + ": " + scce.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }, ActionLink.ActionType.DELETE, PAGEID);
+
+ cellItem.add(panel);
+ }
+ });
+
+ return columns;
+ }
+
+ @Override
+ protected Collection<ActionType> getBulkActions() {
+ return Collections.<ActionLink.ActionType>singletonList(ActionLink.ActionType.DELETE);
+ }
+
+ @Override
+ protected String getPageId() {
+ return PAGEID;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSecurityPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSecurityPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSecurityPanel.java
new file mode 100644
index 0000000..b60d1e4
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSecurityPanel.java
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.rest.PolicyRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.AbstractPolicyTO;
+import org.apache.syncope.common.lib.types.PolicyType;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.ChoiceRenderer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RoleSecurityPanel extends Panel {
+
+ /**
+ * Logger.
+ */
+ protected static final Logger LOG = LoggerFactory.getLogger(RoleSecurityPanel.class);
+
+ private static final long serialVersionUID = -7982691107029848579L;
+
+ @SpringBean
+ private PolicyRestClient policyRestClient;
+
+ private IModel<Map<Long, String>> passwordPolicies = null;
+
+ private IModel<Map<Long, String>> accountPolicies = null;
+
+ public <T extends AbstractAttributableTO> RoleSecurityPanel(final String id, final T entityTO) {
+ super(id);
+
+ setOutputMarkupId(true);
+
+ passwordPolicies = new LoadableDetachableModel<Map<Long, String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected Map<Long, String> load() {
+ Map<Long, String> res = new HashMap<>();
+ for (AbstractPolicyTO policyTO : policyRestClient.getPolicies(PolicyType.PASSWORD, false)) {
+ res.put(policyTO.getKey(), policyTO.getDescription());
+ }
+ return res;
+ }
+ };
+
+ accountPolicies = new LoadableDetachableModel<Map<Long, String>>() {
+
+ private static final long serialVersionUID = -2012833443695917883L;
+
+ @Override
+ protected Map<Long, String> load() {
+ Map<Long, String> res = new HashMap<>();
+ for (AbstractPolicyTO policyTO : policyRestClient.getPolicies(PolicyType.ACCOUNT, false)) {
+ res.put(policyTO.getKey(), policyTO.getDescription());
+ }
+ return res;
+ }
+ };
+
+ final WebMarkupContainer securityContainer = new WebMarkupContainer("security");
+
+ securityContainer.setOutputMarkupId(true);
+ add(securityContainer);
+
+ // -------------------------------
+ // Password policy specification
+ // -------------------------------
+ final AjaxDropDownChoicePanel<Long> passwordPolicy = new AjaxDropDownChoicePanel<Long>("passwordPolicy",
+ "passwordPolicy", new PropertyModel<Long>(entityTO, "passwordPolicy"));
+
+ passwordPolicy.setChoiceRenderer(new PolicyRenderer(PolicyType.PASSWORD));
+
+ passwordPolicy.setChoices(new ArrayList<Long>(passwordPolicies.getObject().keySet()));
+
+ ((DropDownChoice<?>) passwordPolicy.getField()).setNullValid(true);
+
+ securityContainer.add(passwordPolicy);
+
+ final AjaxCheckBoxPanel inhPasswordPolicy = new AjaxCheckBoxPanel("inheritPasswordPolicy",
+ "inheritPasswordPolicy", new PropertyModel<Boolean>(entityTO, "inheritPasswordPolicy"));
+
+ passwordPolicy.setReadOnly(inhPasswordPolicy.getModelObject());
+
+ inhPasswordPolicy.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ passwordPolicy.setReadOnly(inhPasswordPolicy.getModelObject());
+ target.add(passwordPolicy);
+ }
+ });
+
+ securityContainer.add(inhPasswordPolicy);
+ // -------------------------------
+
+ // -------------------------------
+ // Account policy specification
+ // -------------------------------
+ final AjaxDropDownChoicePanel<Long> accountPolicy = new AjaxDropDownChoicePanel<Long>("accountPolicy",
+ "accountPolicy", new PropertyModel<Long>(entityTO, "accountPolicy"));
+
+ accountPolicy.setChoiceRenderer(new PolicyRenderer(PolicyType.ACCOUNT));
+
+ accountPolicy.setChoices(new ArrayList<Long>(accountPolicies.getObject().keySet()));
+
+ ((DropDownChoice<?>) accountPolicy.getField()).setNullValid(true);
+
+ securityContainer.add(accountPolicy);
+
+ final AjaxCheckBoxPanel inhAccountPolicy = new AjaxCheckBoxPanel("inheritAccountPolicy",
+ "inheritAccountPolicy", new PropertyModel<Boolean>(entityTO, "inheritAccountPolicy"));
+ accountPolicy.setReadOnly(inhAccountPolicy.getModelObject());
+
+ inhAccountPolicy.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ accountPolicy.setReadOnly(inhAccountPolicy.getModelObject());
+ target.add(accountPolicy);
+ }
+ });
+
+ securityContainer.add(inhAccountPolicy);
+ // -------------------------------
+ }
+
+ private class PolicyRenderer extends ChoiceRenderer<Long> {
+
+ private static final long serialVersionUID = 8060500161321947000L;
+
+ private PolicyType type;
+
+ public PolicyRenderer(final PolicyType type) {
+ super();
+ this.type = type;
+ }
+
+ @Override
+ public Object getDisplayValue(final Long object) {
+ Object displayValue;
+ switch (type) {
+ case ACCOUNT:
+ displayValue = accountPolicies.getObject().get(object);
+ break;
+ case PASSWORD:
+ displayValue = passwordPolicies.getObject().get(object);
+ break;
+ default:
+ displayValue = "";
+ }
+ return displayValue;
+ }
+
+ @Override
+ public String getIdValue(Long object, int index) {
+ return String.valueOf(object != null
+ ? object
+ : 0L);
+ }
+ };
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSummaryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSummaryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSummaryPanel.java
new file mode 100644
index 0000000..d7663be
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSummaryPanel.java
@@ -0,0 +1,153 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.io.Serializable;
+import org.apache.syncope.client.console.commons.XMLRolesReader;
+import org.apache.syncope.client.console.pages.RoleModalPage;
+import org.apache.syncope.client.console.rest.RoleRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RoleSummaryPanel extends Panel {
+
+ private static final long serialVersionUID = 643769814985593156L;
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(RoleSummaryPanel.class);
+
+ @SpringBean
+ private XMLRolesReader xmlRolesReader;
+
+ @SpringBean
+ private RoleRestClient restClient;
+
+ private RoleTO selectedNode;
+
+ public static class Builder implements Serializable {
+
+ private static final long serialVersionUID = 4164563358509351832L;
+
+ private String id;
+
+ private ModalWindow window;
+
+ private PageReference callerPageRef;
+
+ private Long selectedNodeId = null;
+
+ public Builder(final String id) {
+ this.id = id;
+ }
+
+ public RoleSummaryPanel.Builder window(final ModalWindow window) {
+ this.window = window;
+ return this;
+ }
+
+ public RoleSummaryPanel.Builder callerPageRef(final PageReference callerPageRef) {
+ this.callerPageRef = callerPageRef;
+ return this;
+ }
+
+ public RoleSummaryPanel.Builder selectedNodeId(final Long selectedNodeId) {
+ this.selectedNodeId = selectedNodeId;
+ return this;
+ }
+
+ public RoleSummaryPanel build() {
+ return new RoleSummaryPanel(this);
+ }
+ }
+
+ private RoleSummaryPanel(final Builder builder) {
+ super(builder.id);
+
+ if (builder.selectedNodeId == null || builder.selectedNodeId == 0) {
+ selectedNode = null;
+ } else {
+ try {
+ selectedNode = restClient.read(builder.selectedNodeId);
+ } catch (SyncopeClientException e) {
+ LOG.error("Could not read {}", builder.selectedNodeId, e);
+ selectedNode = null;
+ builder.selectedNodeId = null;
+ }
+ }
+
+ Fragment fragment = new Fragment("roleSummaryPanel",
+ builder.selectedNodeId == null
+ ? "fakerootFrag"
+ : (builder.selectedNodeId == 0 ? "rootPanel" : "roleViewPanel"),
+ this);
+
+ if (builder.selectedNodeId != null) {
+ if (builder.selectedNodeId == 0) {
+ @SuppressWarnings("rawtypes")
+ final ActionLinksPanel links = new ActionLinksPanel("actionLinks", new Model(), builder.callerPageRef);
+ links.setOutputMarkupId(true);
+ fragment.add(links);
+
+ links.addWithRoles(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ builder.window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new RoleModalPage(builder.callerPageRef, builder.window, new RoleTO());
+ }
+ });
+
+ builder.window.show(target);
+ }
+ }, ActionLink.ActionType.CREATE, xmlRolesReader.getEntitlement("Roles", "create"));
+ } else {
+ RoleTabPanel roleTabPanel =
+ new RoleTabPanel("nodeViewPanel", selectedNode, builder.window, builder.callerPageRef);
+ roleTabPanel.setOutputMarkupId(true);
+ fragment.add(roleTabPanel);
+ }
+ }
+ add(fragment);
+ }
+
+ public RoleTO getSelectedNode() {
+ return selectedNode;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleTabPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleTabPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleTabPanel.java
new file mode 100644
index 0000000..7c483b5
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleTabPanel.java
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.commons.XMLRolesReader;
+import org.apache.syncope.client.console.pages.ResultStatusModalPage;
+import org.apache.syncope.client.console.pages.RoleModalPage;
+import org.apache.syncope.client.console.pages.Roles;
+import org.apache.syncope.client.console.pages.StatusModalPage;
+import org.apache.syncope.client.console.rest.RoleRestClient;
+import org.apache.syncope.client.console.rest.UserRestClient;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.lib.SyncopeClient;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class RoleTabPanel extends Panel {
+
+ private static final long serialVersionUID = 859236186975983959L;
+
+ @SpringBean
+ private XMLRolesReader xmlRolesReader;
+
+ @SpringBean
+ private RoleRestClient roleRestClient;
+
+ @SpringBean
+ private UserRestClient userRestClient;
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public RoleTabPanel(final String id, final RoleTO selectedNode, final ModalWindow window,
+ final PageReference pageRef) {
+
+ super(id);
+
+ this.add(new Label("displayName", selectedNode.getDisplayName()));
+
+ final ActionLinksPanel links = new ActionLinksPanel("actionLinks", new Model(), pageRef);
+ links.setOutputMarkupId(true);
+ this.add(links);
+ links.addWithRoles(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ RoleTO roleTO = new RoleTO();
+ roleTO.setParent(selectedNode.getKey());
+ return new RoleModalPage(pageRef, window, roleTO);
+ }
+ });
+
+ window.show(target);
+ }
+ }, ActionLink.ActionType.CREATE, xmlRolesReader.getEntitlement("Roles", "create"));
+ links.addWithRoles(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new StatusModalPage<RoleTO>(pageRef, window, roleRestClient.read(selectedNode.getKey()));
+ }
+ });
+
+ window.show(target);
+ }
+ }, ActionLink.ActionType.MANAGE_RESOURCES, xmlRolesReader.getEntitlement("Roles", "update"));
+ links.addWithRoles(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ RoleTO roleTO = roleRestClient.read(selectedNode.getKey());
+ return new RoleModalPage(pageRef, window, roleTO);
+ }
+ });
+
+ window.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, xmlRolesReader.getEntitlement("Roles", "update"));
+ links.addWithRoles(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ final RoleTO roleTO = roleRestClient.delete(selectedNode.getETagValue(), selectedNode.getKey());
+
+ ((Roles) pageRef.getPage()).setModalResult(true);
+
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ResultStatusModalPage.Builder(window, roleTO).build();
+ }
+ });
+
+ window.show(target);
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.OPERATION_ERROR) + ": " + e.getMessage());
+ ((Roles) pageRef.getPage()).getFeedbackPanel().refresh(target);
+ }
+ }
+ }, ActionLink.ActionType.DELETE, xmlRolesReader.getEntitlement("Roles", "delete"));
+
+ final Form form = new Form("roleForm");
+ form.setModel(new CompoundPropertyModel(selectedNode));
+ form.setOutputMarkupId(true);
+
+ final RolePanel rolePanel = new RolePanel.Builder("rolePanel").form(form).roleTO(selectedNode).
+ roleModalPageMode(Mode.ADMIN).build();
+ rolePanel.setEnabled(false);
+ form.add(rolePanel);
+
+ final WebMarkupContainer userListContainer = new WebMarkupContainer("userListContainer");
+
+ userListContainer.setOutputMarkupId(true);
+ userListContainer.setEnabled(true);
+ userListContainer.add(new UserSearchResultPanel("userList", true, null, pageRef, userRestClient));
+ userListContainer.add(new ClearIndicatingAjaxButton("search", new ResourceModel("search"), pageRef) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ userListContainer.replace(new UserSearchResultPanel("userList",
+ true,
+ SyncopeClient.getUserSearchConditionBuilder().hasRoles(selectedNode.getKey()).query(),
+ pageRef,
+ userRestClient));
+
+ target.add(userListContainer);
+ }
+ });
+
+ form.add(userListContainer);
+ add(form);
+ }
+}
[44/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ConfModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ConfModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ConfModalPage.java
new file mode 100644
index 0000000..0c65ac2
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ConfModalPage.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.Collections;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.panels.PlainAttrsPanel;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.ConfTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.ResourceModel;
+
+public class ConfModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 3524777398688399977L;
+
+ public ConfModalPage(final PageReference pageRef, final ModalWindow window, final WebMarkupContainer parameters) {
+ super();
+
+ MetaDataRoleAuthorizationStrategy.authorize(
+ parameters, ENABLE, xmlRolesReader.getEntitlement("Configuration", "list"));
+ final ConfTO conf = confRestClient.list();
+
+ final Form<ConfTO> form = new Form<>("confForm");
+ form.setModel(new CompoundPropertyModel<>(conf));
+
+ form.add(new PlainAttrsPanel("paramAttrs", conf, form, Mode.ADMIN));
+
+ final AjaxButton submit = new IndicatingAjaxButton(SUBMIT, new ResourceModel(SUBMIT)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ final ConfTO updatedConf = (ConfTO) form.getModelObject();
+
+ try {
+ for (AttrTO attr : updatedConf.getPlainAttrs()) {
+ attr.getValues().removeAll(Collections.singleton(null));
+ if (attr.getValues().isEmpty()
+ || attr.getValues().equals(Collections.singletonList(StringUtils.EMPTY))) {
+
+ confRestClient.delete(attr.getSchema());
+ } else {
+ confRestClient.set(attr);
+ }
+ }
+
+ if (pageRef.getPage() instanceof BasePage) {
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ }
+
+ window.close(target);
+ } catch (Exception e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+ MetaDataRoleAuthorizationStrategy.authorize(
+ submit, ENABLE, xmlRolesReader.getEntitlement("Configuration", "set"));
+ MetaDataRoleAuthorizationStrategy.authorize(
+ submit, ENABLE, xmlRolesReader.getEntitlement("Configuration", "delete"));
+ form.add(submit);
+ form.setDefaultButton(submit);
+
+ final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+ };
+ cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
+
+ add(form);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/Configuration.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Configuration.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Configuration.java
new file mode 100644
index 0000000..c6774f2
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Configuration.java
@@ -0,0 +1,814 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import static org.apache.syncope.client.console.pages.AbstractBasePage.LOG;
+
+import java.io.File;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+import org.apache.syncope.client.console.ExtensionPanel;
+import org.apache.syncope.client.console.commons.AttrLayoutType;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.HttpResourceStream;
+import org.apache.syncope.client.console.commons.PreferenceManager;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.init.ImplementationClassNamesLoader;
+import org.apache.syncope.client.console.panels.AbstractExtensionPanel;
+import org.apache.syncope.client.console.panels.JQueryUITabbedPanel;
+import org.apache.syncope.client.console.panels.LayoutsPanel;
+import org.apache.syncope.client.console.panels.PoliciesPanel;
+import org.apache.syncope.client.console.rest.LoggerRestClient;
+import org.apache.syncope.client.console.rest.NotificationRestClient;
+import org.apache.syncope.client.console.rest.SecurityQuestionRestClient;
+import org.apache.syncope.client.console.rest.WorkflowRestClient;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.CollectionPropertyColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.link.VeilPopupSettings;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.SyncopeConstants;
+import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.to.NotificationTO;
+import org.apache.syncope.common.lib.to.SecurityQuestionTO;
+import org.apache.syncope.common.lib.types.LoggerLevel;
+import org.apache.syncope.common.lib.types.PolicyType;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+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.util.SortableDataProvider;
+import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.PropertyListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler;
+import org.apache.wicket.request.resource.ContentDisposition;
+import org.apache.wicket.request.resource.DynamicImageResource;
+import org.apache.wicket.request.resource.IResource;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.springframework.util.ClassUtils;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ * Configurations WebPage.
+ */
+public class Configuration extends BasePage {
+
+ private static final long serialVersionUID = -2838270869037702214L;
+
+ private static final int SYNCOPECONF_WIN_HEIGHT = 300;
+
+ private static final int SYNCOPECONF_WIN_WIDTH = 900;
+
+ private static final int NOTIFICATION_WIN_HEIGHT = 500;
+
+ private static final int NOTIFICATION_WIN_WIDTH = 1100;
+
+ private static final int SECURITY_QUESTION_WIN_HEIGHT = 300;
+
+ private static final int SECURITY_QUESTION_WIN_WIDTH = 900;
+
+ @SpringBean
+ private LoggerRestClient loggerRestClient;
+
+ @SpringBean
+ private NotificationRestClient notificationRestClient;
+
+ @SpringBean
+ private SecurityQuestionRestClient securityQuestionRestClient;
+
+ @SpringBean
+ private WorkflowRestClient wfRestClient;
+
+ @SpringBean
+ private PreferenceManager prefMan;
+
+ @SpringBean
+ private ImplementationClassNamesLoader implementationClassNamesLoader;
+
+ private final ModalWindow syncopeConfWin;
+
+ private final ModalWindow createNotificationWin;
+
+ private final ModalWindow editNotificationWin;
+
+ private final ModalWindow createSecurityQuestionWin;
+
+ private final ModalWindow editSecurityQuestionWin;
+
+ private WebMarkupContainer notificationContainer;
+
+ private WebMarkupContainer securityQuestionContainer;
+
+ private int notificationPaginatorRows;
+
+ public Configuration() {
+ super();
+
+ // Layouts
+ add(new LayoutsPanel("adminUserLayoutPanel", AttrLayoutType.ADMIN_USER, feedbackPanel));
+ add(new LayoutsPanel("selfUserLayoutPanel", AttrLayoutType.SELF_USER, feedbackPanel));
+ add(new LayoutsPanel("adminRoleLayoutPanel", AttrLayoutType.ADMIN_ROLE, feedbackPanel));
+ add(new LayoutsPanel("selfRoleLayoutPanel", AttrLayoutType.SELF_ROLE, feedbackPanel));
+ add(new LayoutsPanel("adminMembershipLayoutPanel", AttrLayoutType.ADMIN_MEMBERSHIP, feedbackPanel));
+ add(new LayoutsPanel("selfMembershipLayoutPanel", AttrLayoutType.SELF_MEMBERSHIP, feedbackPanel));
+
+ add(syncopeConfWin = new ModalWindow("syncopeConfWin"));
+ syncopeConfWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ syncopeConfWin.setInitialHeight(SYNCOPECONF_WIN_HEIGHT);
+ syncopeConfWin.setInitialWidth(SYNCOPECONF_WIN_WIDTH);
+ syncopeConfWin.setCookieName("syncopeconf-modal");
+ setupSyncopeConf();
+
+ add(new PoliciesPanel("passwordPoliciesPanel", getPageReference(), PolicyType.PASSWORD));
+ add(new PoliciesPanel("accountPoliciesPanel", getPageReference(), PolicyType.ACCOUNT));
+ add(new PoliciesPanel("syncPoliciesPanel", getPageReference(), PolicyType.SYNC));
+
+ add(createNotificationWin = new ModalWindow("createNotificationWin"));
+ createNotificationWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ createNotificationWin.setInitialHeight(NOTIFICATION_WIN_HEIGHT);
+ createNotificationWin.setInitialWidth(NOTIFICATION_WIN_WIDTH);
+ createNotificationWin.setCookieName("create-notification-modal");
+ add(editNotificationWin = new ModalWindow("editNotificationWin"));
+ editNotificationWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editNotificationWin.setInitialHeight(NOTIFICATION_WIN_HEIGHT);
+ editNotificationWin.setInitialWidth(NOTIFICATION_WIN_WIDTH);
+ editNotificationWin.setCookieName("edit-notification-modal");
+ setupNotification();
+
+ add(createSecurityQuestionWin = new ModalWindow("createSecurityQuestionWin"));
+ createSecurityQuestionWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ createSecurityQuestionWin.setInitialHeight(SECURITY_QUESTION_WIN_HEIGHT);
+ createSecurityQuestionWin.setInitialWidth(SECURITY_QUESTION_WIN_WIDTH);
+ createSecurityQuestionWin.setCookieName("create-security-question-modal");
+ add(editSecurityQuestionWin = new ModalWindow("editSecurityQuestionWin"));
+ editSecurityQuestionWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editSecurityQuestionWin.setInitialHeight(SECURITY_QUESTION_WIN_HEIGHT);
+ editSecurityQuestionWin.setInitialWidth(SECURITY_QUESTION_WIN_WIDTH);
+ editSecurityQuestionWin.setCookieName("edit-security-question-modal");
+ setupSecurityQuestion();
+
+ // Workflow definition stuff
+ WebMarkupContainer noActivitiEnabledForUsers = new WebMarkupContainer("noActivitiEnabledForUsers");
+ noActivitiEnabledForUsers.setOutputMarkupPlaceholderTag(true);
+ add(noActivitiEnabledForUsers);
+
+ WebMarkupContainer workflowDefContainer = new WebMarkupContainer("workflowDefContainer");
+ workflowDefContainer.setOutputMarkupPlaceholderTag(true);
+
+ if (wfRestClient.isActivitiEnabledForUsers()) {
+ noActivitiEnabledForUsers.setVisible(false);
+ } else {
+ workflowDefContainer.setVisible(false);
+ }
+
+ BookmarkablePageLink<Void> activitiModeler =
+ new BookmarkablePageLink<>("activitiModeler", ActivitiModelerPopupPage.class);
+ activitiModeler.setPopupSettings(new VeilPopupSettings().setHeight(600).setWidth(800));
+ MetaDataRoleAuthorizationStrategy.authorize(activitiModeler, ENABLE,
+ xmlRolesReader.getEntitlement("Configuration", "workflowDefRead"));
+ workflowDefContainer.add(activitiModeler);
+ // Check if Activiti Modeler directory is found
+ boolean activitiModelerEnabled = false;
+ try {
+ String activitiModelerDirectory = WebApplicationContextUtils.getWebApplicationContext(
+ WebApplication.get().getServletContext()).getBean("activitiModelerDirectory", String.class);
+ File baseDir = new File(activitiModelerDirectory);
+ activitiModelerEnabled = baseDir.exists() && baseDir.canRead() && baseDir.isDirectory();
+ } catch (Exception e) {
+ LOG.error("Could not check for Activiti Modeler directory", e);
+ }
+ activitiModeler.setEnabled(activitiModelerEnabled);
+
+ BookmarkablePageLink<Void> xmlEditor = new BookmarkablePageLink<>("xmlEditor", XMLEditorPopupPage.class);
+ xmlEditor.setPopupSettings(new VeilPopupSettings().setHeight(480).setWidth(800));
+ MetaDataRoleAuthorizationStrategy.authorize(xmlEditor, ENABLE,
+ xmlRolesReader.getEntitlement("Configuration", "workflowDefRead"));
+ workflowDefContainer.add(xmlEditor);
+
+ Image workflowDefDiagram = new Image("workflowDefDiagram", new Model()) {
+
+ private static final long serialVersionUID = -8457850449086490660L;
+
+ @Override
+ protected IResource getImageResource() {
+ return new DynamicImageResource() {
+
+ private static final long serialVersionUID = 923201517955737928L;
+
+ @Override
+ protected byte[] getImageData(final IResource.Attributes attributes) {
+ return wfRestClient.isActivitiEnabledForUsers()
+ ? wfRestClient.getDiagram()
+ : new byte[0];
+ }
+ };
+ }
+ };
+ workflowDefContainer.add(workflowDefDiagram);
+
+ MetaDataRoleAuthorizationStrategy.authorize(workflowDefContainer, ENABLE,
+ xmlRolesReader.getEntitlement("Configuration", "workflowDefRead"));
+ add(workflowDefContainer);
+
+ // Logger stuff
+ PropertyListView<LoggerTO> coreLoggerList =
+ new LoggerPropertyList(null, "corelogger", loggerRestClient.listLogs());
+ WebMarkupContainer coreLoggerContainer = new WebMarkupContainer("coreLoggerContainer");
+ coreLoggerContainer.add(coreLoggerList);
+ coreLoggerContainer.setOutputMarkupId(true);
+
+ MetaDataRoleAuthorizationStrategy.authorize(coreLoggerContainer, ENABLE, xmlRolesReader.getEntitlement(
+ "Configuration", "logList"));
+ add(coreLoggerContainer);
+
+ ConsoleLoggerController consoleLoggerController = new ConsoleLoggerController();
+ PropertyListView<LoggerTO> consoleLoggerList =
+ new LoggerPropertyList(consoleLoggerController, "consolelogger", consoleLoggerController.getLoggers());
+ WebMarkupContainer consoleLoggerContainer = new WebMarkupContainer("consoleLoggerContainer");
+ consoleLoggerContainer.add(consoleLoggerList);
+ consoleLoggerContainer.setOutputMarkupId(true);
+
+ MetaDataRoleAuthorizationStrategy.authorize(
+ consoleLoggerContainer, ENABLE, xmlRolesReader.getEntitlement("Configuration", "logList"));
+ add(consoleLoggerContainer);
+
+ // Extension panels
+ setupExtPanels();
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ private void setupSyncopeConf() {
+ final WebMarkupContainer parameters = new WebMarkupContainer("parameters");
+ parameters.setOutputMarkupId(true);
+ add(parameters);
+
+ setWindowClosedCallback(syncopeConfWin, parameters);
+
+ AjaxLink<Void> confLink = new IndicatingAjaxLink<Void>("confLink") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ syncopeConfWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ConfModalPage(getPageReference(), editNotificationWin, parameters);
+ }
+ });
+
+ syncopeConfWin.show(target);
+ }
+ };
+ parameters.add(confLink);
+
+ Link<Void> dbExportLink = new Link<Void>("dbExportLink") {
+
+ private static final long serialVersionUID = -4331619903296515985L;
+
+ @Override
+ public void onClick() {
+ try {
+ HttpResourceStream stream = new HttpResourceStream(confRestClient.dbExport());
+
+ ResourceStreamRequestHandler rsrh = new ResourceStreamRequestHandler(stream);
+ rsrh.setFileName(stream.getFilename() == null ? "content.xml" : stream.getFilename());
+ rsrh.setContentDisposition(ContentDisposition.ATTACHMENT);
+
+ getRequestCycle().scheduleRequestHandlerAfterCurrent(rsrh);
+ } catch (Exception e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ }
+ }
+ };
+ MetaDataRoleAuthorizationStrategy.authorize(
+ dbExportLink, ENABLE, xmlRolesReader.getEntitlement("Configuration", "export"));
+ add(dbExportLink);
+ }
+
+ private void setupNotification() {
+ notificationPaginatorRows = prefMan.getPaginatorRows(getRequest(), Constants.PREF_NOTIFICATION_PAGINATOR_ROWS);
+
+ final List<IColumn<NotificationTO, String>> notificationCols = new ArrayList<>();
+ notificationCols.add(new PropertyColumn<NotificationTO, String>(
+ new ResourceModel("key"), "key", "key"));
+ notificationCols.add(new CollectionPropertyColumn<NotificationTO>(
+ new ResourceModel("events"), "events", "events"));
+ notificationCols.add(new PropertyColumn<NotificationTO, String>(
+ new ResourceModel("subject"), "subject", "subject"));
+ notificationCols.add(new PropertyColumn<NotificationTO, String>(
+ new ResourceModel("template"), "template", "template"));
+ notificationCols.add(new PropertyColumn<NotificationTO, String>(
+ new ResourceModel("traceLevel"), "traceLevel", "traceLevel"));
+ notificationCols.add(new PropertyColumn<NotificationTO, String>(
+ new ResourceModel("active"), "active", "active"));
+
+ notificationCols.add(new AbstractColumn<NotificationTO, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<NotificationTO>> cellItem, final String componentId,
+ final IModel<NotificationTO> model) {
+
+ final NotificationTO notificationTO = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ editNotificationWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new NotificationModalPage(Configuration.this.getPageReference(),
+ editNotificationWin, notificationTO, false);
+ }
+ });
+
+ editNotificationWin.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, "Notification");
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ notificationRestClient.delete(notificationTO.getKey());
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting a notification", e);
+ error(e.getMessage());
+ return;
+ }
+
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ feedbackPanel.refresh(target);
+ target.add(notificationContainer);
+ }
+ }, ActionLink.ActionType.DELETE, "Notification");
+
+ cellItem.add(panel);
+ }
+ });
+
+ final AjaxFallbackDefaultDataTable<NotificationTO, String> notificationTable =
+ new AjaxFallbackDefaultDataTable<>(
+ "notificationTable", notificationCols, new NotificationProvider(), notificationPaginatorRows);
+
+ notificationContainer = new WebMarkupContainer("notificationContainer");
+ notificationContainer.add(notificationTable);
+ notificationContainer.setOutputMarkupId(true);
+
+ add(notificationContainer);
+
+ setWindowClosedCallback(createNotificationWin, notificationContainer);
+ setWindowClosedCallback(editNotificationWin, notificationContainer);
+
+ AjaxLink<Void> createNotificationLink = new AjaxLink<Void>("createNotificationLink") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ createNotificationWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new NotificationModalPage(Configuration.this.getPageReference(), createNotificationWin,
+ new NotificationTO(), true);
+ }
+ });
+
+ createNotificationWin.show(target);
+ }
+ };
+
+ MetaDataRoleAuthorizationStrategy.authorize(createNotificationLink, ENABLE, xmlRolesReader.getEntitlement(
+ "Notification", "create"));
+ add(createNotificationLink);
+
+ @SuppressWarnings("rawtypes")
+ Form notificationPaginatorForm = new Form("notificationPaginatorForm");
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this,
+ "notificationPaginatorRows"), prefMan.getPaginatorChoices());
+
+ rowsChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ prefMan.set(getRequest(), getResponse(), Constants.PREF_NOTIFICATION_PAGINATOR_ROWS, String.valueOf(
+ notificationPaginatorRows));
+ notificationTable.setItemsPerPage(notificationPaginatorRows);
+
+ target.add(notificationContainer);
+ }
+ });
+
+ notificationPaginatorForm.add(rowsChooser);
+ add(notificationPaginatorForm);
+ }
+
+ private void setupSecurityQuestion() {
+ final List<IColumn<SecurityQuestionTO, String>> securityQuestionCols = new ArrayList<>();
+ securityQuestionCols.add(new PropertyColumn<SecurityQuestionTO, String>(
+ new ResourceModel("key"), "key", "key"));
+ securityQuestionCols.add(new PropertyColumn<SecurityQuestionTO, String>(
+ new ResourceModel("content"), "content", "content"));
+
+ securityQuestionCols.add(new AbstractColumn<SecurityQuestionTO, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<SecurityQuestionTO>> cellItem, final String componentId,
+ final IModel<SecurityQuestionTO> model) {
+
+ final SecurityQuestionTO securityQuestionTO = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ editSecurityQuestionWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new SecurityQuestionModalPage(Configuration.this.getPageReference(),
+ editSecurityQuestionWin, securityQuestionTO, false);
+ }
+ });
+
+ editSecurityQuestionWin.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, "SecurityQuestion");
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ securityQuestionRestClient.delete(securityQuestionTO.getKey());
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting a security question", e);
+ error(e.getMessage());
+ return;
+ }
+
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ feedbackPanel.refresh(target);
+ target.add(securityQuestionContainer);
+ }
+ }, ActionLink.ActionType.DELETE, "SecurityQuestion");
+
+ cellItem.add(panel);
+ }
+ });
+
+ final AjaxFallbackDefaultDataTable<SecurityQuestionTO, String> securityQuestionTable =
+ new AjaxFallbackDefaultDataTable<>("securityQuestionTable",
+ securityQuestionCols, new SecurityQuestionProvider(), 50);
+
+ securityQuestionContainer = new WebMarkupContainer("securityQuestionContainer");
+ securityQuestionContainer.add(securityQuestionTable);
+ securityQuestionContainer.setOutputMarkupId(true);
+
+ add(securityQuestionContainer);
+
+ setWindowClosedCallback(createSecurityQuestionWin, securityQuestionContainer);
+ setWindowClosedCallback(editSecurityQuestionWin, securityQuestionContainer);
+
+ AjaxLink<Void> createSecurityQuestionLink = new AjaxLink<Void>("createSecurityQuestionLink") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+
+ createSecurityQuestionWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new SecurityQuestionModalPage(Configuration.this.getPageReference(),
+ createSecurityQuestionWin, new SecurityQuestionTO(), true);
+ }
+ });
+
+ createSecurityQuestionWin.show(target);
+ }
+ };
+
+ MetaDataRoleAuthorizationStrategy.authorize(
+ createSecurityQuestionLink, ENABLE, xmlRolesReader.getEntitlement("SecurityQuestion", "create"));
+ add(createSecurityQuestionLink);
+ }
+
+ private void setupExtPanels() {
+ List<AbstractTab> tabs = new ArrayList<>();
+ int index = 0;
+ for (final Class<? extends AbstractExtensionPanel> clazz
+ : implementationClassNamesLoader.getExtPanelClasses()) {
+
+ String title = clazz.getAnnotation(ExtensionPanel.class) == null
+ ? "Extension " + index
+ : clazz.getAnnotation(ExtensionPanel.class).value();
+ tabs.add(new AbstractTab(new Model<>(title)) {
+
+ private static final long serialVersionUID = -5861786415855103549L;
+
+ @Override
+ public WebMarkupContainer getPanel(final String panelId) {
+ Panel panel;
+
+ try {
+ panel = ClassUtils.getConstructorIfAvailable(clazz, String.class, PageReference.class).
+ newInstance(panelId, Configuration.this.getPageReference());
+ } catch (Exception e) {
+ panel = new Panel(panelId) {
+
+ private static final long serialVersionUID = 5538299138211283825L;
+
+ };
+
+ LOG.error("Could not instantiate {}", clazz.getName(), e);
+ }
+
+ return panel;
+ }
+ });
+
+ index++;
+ }
+
+ JQueryUITabbedPanel<AbstractTab> extPanels = new JQueryUITabbedPanel<>("extPanels", tabs);
+ extPanels.setVisible(!tabs.isEmpty());
+ add(extPanels);
+ }
+
+ private class NotificationProvider extends SortableDataProvider<NotificationTO, String> {
+
+ private static final long serialVersionUID = -276043813563988590L;
+
+ private final SortableDataProviderComparator<NotificationTO> comparator;
+
+ public NotificationProvider() {
+ //Default sorting
+ setSort("key", SortOrder.ASCENDING);
+ comparator = new SortableDataProviderComparator<>(this);
+ }
+
+ @Override
+ public Iterator<NotificationTO> iterator(final long first, final long count) {
+ List<NotificationTO> list = notificationRestClient.getAllNotifications();
+
+ Collections.sort(list, comparator);
+
+ return list.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return notificationRestClient.getAllNotifications().size();
+ }
+
+ @Override
+ public IModel<NotificationTO> model(final NotificationTO notification) {
+ return new AbstractReadOnlyModel<NotificationTO>() {
+
+ private static final long serialVersionUID = 774694801558497248L;
+
+ @Override
+ public NotificationTO getObject() {
+ return notification;
+ }
+ };
+ }
+ }
+
+ private class SecurityQuestionProvider extends SortableDataProvider<SecurityQuestionTO, String> {
+
+ private static final long serialVersionUID = -1458398823626281188L;
+
+ private final SortableDataProviderComparator<SecurityQuestionTO> comparator;
+
+ public SecurityQuestionProvider() {
+ //Default sorting
+ setSort("key", SortOrder.ASCENDING);
+ comparator = new SortableDataProviderComparator<>(this);
+ }
+
+ @Override
+ public Iterator<SecurityQuestionTO> iterator(final long first, final long count) {
+ List<SecurityQuestionTO> list = securityQuestionRestClient.list();
+
+ Collections.sort(list, comparator);
+
+ return list.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return securityQuestionRestClient.list().size();
+ }
+
+ @Override
+ public IModel<SecurityQuestionTO> model(final SecurityQuestionTO securityQuestionTO) {
+ return new AbstractReadOnlyModel<SecurityQuestionTO>() {
+
+ private static final long serialVersionUID = 5079291243768775704L;
+
+ @Override
+ public SecurityQuestionTO getObject() {
+ return securityQuestionTO;
+ }
+ };
+ }
+ }
+
+ private class LoggerPropertyList extends PropertyListView<LoggerTO> {
+
+ private static final long serialVersionUID = 5911412425994616111L;
+
+ private final ConsoleLoggerController consoleLoggerController;
+
+ public LoggerPropertyList(final ConsoleLoggerController consoleLoggerController, final String id,
+ final List<? extends LoggerTO> list) {
+
+ super(id, list);
+ this.consoleLoggerController = consoleLoggerController;
+ }
+
+ @Override
+ protected void populateItem(final ListItem<LoggerTO> item) {
+ item.add(new Label("key"));
+
+ DropDownChoice<LoggerLevel> level = new DropDownChoice<>("level");
+ level.setModel(new IModel<LoggerLevel>() {
+
+ private static final long serialVersionUID = -2350428186089596562L;
+
+ @Override
+ public LoggerLevel getObject() {
+ return item.getModelObject().getLevel();
+ }
+
+ @Override
+ public void setObject(final LoggerLevel object) {
+ item.getModelObject().setLevel(object);
+ }
+
+ @Override
+ public void detach() {
+ }
+ });
+ level.setChoices(Arrays.asList(LoggerLevel.values()));
+ level.setOutputMarkupId(true);
+ level.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ try {
+ if (getId().equals("corelogger")) {
+ loggerRestClient.setLogLevel(item.getModelObject().getKey(),
+ item.getModelObject().getLevel());
+ } else {
+ consoleLoggerController.setLogLevel(item.getModelObject().getKey(),
+ item.getModelObject().getLevel());
+ }
+
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException e) {
+ info(getString(Constants.OPERATION_ERROR));
+ }
+
+ feedbackPanel.refresh(target);
+ }
+ });
+
+ MetaDataRoleAuthorizationStrategy.authorize(level, ENABLE, xmlRolesReader.getEntitlement(
+ "Configuration", "logSetLevel"));
+
+ item.add(level);
+ }
+ }
+
+ private static class ConsoleLoggerController implements Serializable {
+
+ private static final long serialVersionUID = -1550459341476431714L;
+
+ public List<LoggerTO> getLoggers() {
+ LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
+
+ List<LoggerTO> result = new ArrayList<>();
+ for (LoggerConfig logger : ctx.getConfiguration().getLoggers().values()) {
+ final String loggerName = LogManager.ROOT_LOGGER_NAME.equals(logger.getName())
+ ? SyncopeConstants.ROOT_LOGGER : logger.getName();
+ if (logger.getLevel() != null) {
+ LoggerTO loggerTO = new LoggerTO();
+ loggerTO.setKey(loggerName);
+ loggerTO.setLevel(LoggerLevel.fromLevel(logger.getLevel()));
+ result.add(loggerTO);
+ }
+ }
+
+ return result;
+ }
+
+ public void setLogLevel(final String name, final LoggerLevel level) {
+ LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
+ LoggerConfig logConf = SyncopeConstants.ROOT_LOGGER.equals(name)
+ ? ctx.getConfiguration().getLoggerConfig(LogManager.ROOT_LOGGER_NAME)
+ : ctx.getConfiguration().getLoggerConfig(name);
+ logConf.setLevel(level.getLevel());
+ ctx.updateLoggers();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage.java
new file mode 100644
index 0000000..ebc041d
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPasswordFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.PasswordTextField;
+import org.apache.wicket.markup.html.form.StatelessForm;
+import org.apache.wicket.markup.html.form.validation.EqualPasswordInputValidator;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+
+public class ConfirmPasswordResetModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = -8419445804421211904L;
+
+ public ConfirmPasswordResetModalPage(final ModalWindow window, final String token) {
+ super();
+ setOutputMarkupId(true);
+
+ final StatelessForm<?> form = new StatelessForm<Object>(FORM);
+ form.setOutputMarkupId(true);
+
+ final FieldPanel<String> password =
+ new AjaxPasswordFieldPanel("password", "password", new Model<String>()).setRequired(true);
+ ((PasswordTextField) password.getField()).setResetPassword(true);
+ form.add(password);
+
+ final FieldPanel<String> confirmPassword =
+ new AjaxPasswordFieldPanel("confirmPassword", "confirmPassword", new Model<String>());
+ ((PasswordTextField) confirmPassword.getField()).setResetPassword(true);
+ form.add(confirmPassword);
+
+ form.add(new EqualPasswordInputValidator(password.getField(), confirmPassword.getField()));
+
+ final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT, SUBMIT)) {
+
+ private static final long serialVersionUID = -4804368561204623354L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ try {
+ userSelfRestClient.confirmPasswordReset(token, password.getModelObject());
+
+ setResponsePage(new ResultStatusModalPage.Builder(window, new UserTO()).mode(Mode.SELF).build());
+ } catch (Exception e) {
+ LOG.error("While confirming password reset for {}", token, e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+ form.add(submit);
+ form.setDefaultButton(submit);
+
+ final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ }
+ };
+ cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
+
+ add(form);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ConnObjectModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ConnObjectModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ConnObjectModalPage.java
new file mode 100644
index 0000000..cf1c405
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ConnObjectModalPage.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.ConnObjectTO;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.list.AltListView;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.util.ListModel;
+
+public class ConnObjectModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = -6469290753080058487L;
+
+ public ConnObjectModalPage(final ConnObjectTO connObjectTO) {
+ super();
+
+ final Form<Void> form = new Form<Void>(FORM);
+ form.setEnabled(false);
+ add(form);
+
+ IModel<List<AttrTO>> formProps = new LoadableDetachableModel<List<AttrTO>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<AttrTO> load() {
+ List<AttrTO> attrs = connObjectTO.getPlainAttrs();
+ Collections.sort(attrs, new Comparator<AttrTO>() {
+
+ @Override
+ public int compare(final AttrTO attr1, final AttrTO attr2) {
+ if (attr1 == null || attr1.getSchema() == null) {
+ return -1;
+ }
+ if (attr2 == null || attr2.getSchema() == null) {
+ return 1;
+ }
+ return attr1.getSchema().compareTo(attr2.getSchema());
+ }
+ });
+
+ return attrs;
+ }
+ };
+ final ListView<AttrTO> propView = new AltListView<AttrTO>("propView", formProps) {
+
+ private static final long serialVersionUID = 3109256773218160485L;
+
+ @Override
+ protected void populateItem(final ListItem<AttrTO> item) {
+ final AttrTO prop = item.getModelObject();
+
+ Label label = new Label("key", prop.getSchema());
+ item.add(label);
+
+ Panel field;
+ if (prop.getValues().isEmpty()) {
+ field = new AjaxTextFieldPanel("value",
+ prop.getSchema(), new Model<String>());
+ } else if (prop.getValues().size() == 1) {
+ field = new AjaxTextFieldPanel("value",
+ prop.getSchema(), new Model<String>(prop.getValues().get(0)));
+ } else {
+ field = new MultiFieldPanel<String>("value", new ListModel<String>(prop.getValues()),
+ new AjaxTextFieldPanel("panel", prop.getSchema(), new Model<String>()));
+ }
+ item.add(field);
+ }
+ };
+ form.add(propView);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ConnectorModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ConnectorModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ConnectorModalPage.java
new file mode 100644
index 0000000..8095591
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ConnectorModalPage.java
@@ -0,0 +1,479 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.rest.ConnectorRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.list.ConnConfPropertyListView;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.ConnBundleTO;
+import org.apache.syncope.common.lib.to.ConnInstanceTO;
+import org.apache.syncope.common.lib.to.ConnPoolConfTO;
+import org.apache.syncope.common.lib.types.ConnConfPropSchema;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.syncope.common.lib.types.ConnectorCapability;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.apache.wicket.validation.validator.RangeValidator;
+
+/**
+ * Modal window with Connector form.
+ */
+public class ConnectorModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = -2025535531121434050L;
+
+ @SpringBean
+ private ConnectorRestClient restClient;
+
+ private final Map<String, Map<String, Map<String, ConnBundleTO>>> mapConnBundleTOs;
+
+ private final List<ConnectorCapability> selectedCapabilities;
+
+ private ConnBundleTO bundleTO;
+
+ private List<ConnConfProperty> properties;
+
+ private final WebMarkupContainer propertiesContainer;
+
+ public ConnectorModalPage(final PageReference pageRef, final ModalWindow window,
+ final ConnInstanceTO connInstanceTO) {
+
+ super();
+
+ this.add(new Label("new", connInstanceTO.getKey() == 0
+ ? new ResourceModel("new")
+ : new Model<>(StringUtils.EMPTY)));
+ this.add(new Label("key", connInstanceTO.getKey() == 0
+ ? StringUtils.EMPTY
+ : connInstanceTO.getKey()));
+
+ // general data setup
+ selectedCapabilities = new ArrayList<>(connInstanceTO.getKey() == 0
+ ? EnumSet.noneOf(ConnectorCapability.class)
+ : connInstanceTO.getCapabilities());
+
+ mapConnBundleTOs = new HashMap<>();
+ for (ConnBundleTO connBundleTO : restClient.getAllBundles()) {
+ // by location
+ if (!mapConnBundleTOs.containsKey(connBundleTO.getLocation())) {
+ mapConnBundleTOs.put(connBundleTO.getLocation(), new HashMap<String, Map<String, ConnBundleTO>>());
+ }
+ final Map<String, Map<String, ConnBundleTO>> byLocation = mapConnBundleTOs.get(connBundleTO.getLocation());
+
+ // by name
+ if (!byLocation.containsKey(connBundleTO.getBundleName())) {
+ byLocation.put(connBundleTO.getBundleName(), new HashMap<String, ConnBundleTO>());
+ }
+ final Map<String, ConnBundleTO> byName = byLocation.get(connBundleTO.getBundleName());
+
+ // by version
+ if (!byName.containsKey(connBundleTO.getVersion())) {
+ byName.put(connBundleTO.getVersion(), connBundleTO);
+ }
+ }
+
+ bundleTO = getSelectedBundleTO(connInstanceTO);
+ properties = fillProperties(bundleTO, connInstanceTO);
+
+ // form - first tab
+ final Form<ConnInstanceTO> connectorForm = new Form<>(FORM);
+ connectorForm.setModel(new CompoundPropertyModel<>(connInstanceTO));
+ connectorForm.setOutputMarkupId(true);
+ add(connectorForm);
+
+ propertiesContainer = new WebMarkupContainer("container");
+ propertiesContainer.setOutputMarkupId(true);
+ connectorForm.add(propertiesContainer);
+
+ final Form<ConnInstanceTO> connectorPropForm = new Form<>("connectorPropForm");
+ connectorPropForm.setModel(new CompoundPropertyModel<>(connInstanceTO));
+ connectorPropForm.setOutputMarkupId(true);
+ propertiesContainer.add(connectorPropForm);
+
+ final AjaxTextFieldPanel displayName = new AjaxTextFieldPanel(
+ "displayName", "display name", new PropertyModel<String>(connInstanceTO, "displayName"));
+ displayName.setOutputMarkupId(true);
+ displayName.addRequiredLabel();
+ connectorForm.add(displayName);
+
+ final AjaxDropDownChoicePanel<String> location =
+ new AjaxDropDownChoicePanel<>("location", "location",
+ new Model<>(bundleTO == null ? null : bundleTO.getLocation()));
+ ((DropDownChoice<String>) location.getField()).setNullValid(true);
+ location.setStyleSheet("long_dynamicsize");
+ location.setChoices(new ArrayList<>(mapConnBundleTOs.keySet()));
+ location.setRequired(true);
+ location.addRequiredLabel();
+ location.setOutputMarkupId(true);
+ location.setEnabled(connInstanceTO.getKey() == 0);
+ location.getField().setOutputMarkupId(true);
+ connectorForm.add(location);
+
+ final AjaxDropDownChoicePanel<String> connectorName =
+ new AjaxDropDownChoicePanel<>("connectorName", "connectorName",
+ new Model<>(bundleTO == null ? null : bundleTO.getBundleName()));
+ ((DropDownChoice<String>) connectorName.getField()).setNullValid(true);
+ connectorName.setStyleSheet("long_dynamicsize");
+ connectorName.setChoices(bundleTO == null
+ ? new ArrayList<String>()
+ : new ArrayList<>(mapConnBundleTOs.get(connInstanceTO.getLocation()).keySet()));
+ connectorName.setRequired(true);
+ connectorName.addRequiredLabel();
+ connectorName.setEnabled(connInstanceTO.getLocation() != null);
+ connectorName.setOutputMarkupId(true);
+ connectorName.setEnabled(connInstanceTO.getKey() == 0);
+ connectorName.getField().setOutputMarkupId(true);
+ connectorForm.add(connectorName);
+
+ final AjaxDropDownChoicePanel<String> version =
+ new AjaxDropDownChoicePanel<>("version", "version",
+ new Model<>(bundleTO == null ? null : bundleTO.getVersion()));
+ version.setStyleSheet("long_dynamicsize");
+ version.setChoices(bundleTO == null
+ ? new ArrayList<String>()
+ : new ArrayList<>(mapConnBundleTOs.get(connInstanceTO.getLocation()).
+ get(connInstanceTO.getBundleName()).keySet()));
+ version.setRequired(true);
+ version.addRequiredLabel();
+ version.setEnabled(connInstanceTO.getBundleName() != null);
+ version.setOutputMarkupId(true);
+ version.addRequiredLabel();
+ version.getField().setOutputMarkupId(true);
+ connectorForm.add(version);
+
+ final SpinnerFieldPanel<Integer> connRequestTimeout =
+ new SpinnerFieldPanel<>("connRequestTimeout", "connRequestTimeout", Integer.class,
+ new PropertyModel<Integer>(connInstanceTO, "connRequestTimeout"), 0, null);
+ connRequestTimeout.getField().add(new RangeValidator<>(0, Integer.MAX_VALUE));
+ connectorForm.add(connRequestTimeout);
+
+ if (connInstanceTO.getPoolConf() == null) {
+ connInstanceTO.setPoolConf(new ConnPoolConfTO());
+ }
+ final SpinnerFieldPanel<Integer> poolMaxObjects =
+ new SpinnerFieldPanel<>("poolMaxObjects", "poolMaxObjects", Integer.class,
+ new PropertyModel<Integer>(connInstanceTO.getPoolConf(), "maxObjects"), 0, null);
+ poolMaxObjects.getField().add(new RangeValidator<>(0, Integer.MAX_VALUE));
+ connectorForm.add(poolMaxObjects);
+ final SpinnerFieldPanel<Integer> poolMinIdle =
+ new SpinnerFieldPanel<>("poolMinIdle", "poolMinIdle", Integer.class,
+ new PropertyModel<Integer>(connInstanceTO.getPoolConf(), "minIdle"), 0, null);
+ poolMinIdle.getField().add(new RangeValidator<>(0, Integer.MAX_VALUE));
+ connectorForm.add(poolMinIdle);
+ final SpinnerFieldPanel<Integer> poolMaxIdle =
+ new SpinnerFieldPanel<>("poolMaxIdle", "poolMaxIdle", Integer.class,
+ new PropertyModel<Integer>(connInstanceTO.getPoolConf(), "maxIdle"), 0, null);
+ poolMaxIdle.getField().add(new RangeValidator<>(0, Integer.MAX_VALUE));
+ connectorForm.add(poolMaxIdle);
+ final SpinnerFieldPanel<Long> poolMaxWait =
+ new SpinnerFieldPanel<>("poolMaxWait", "poolMaxWait", Long.class,
+ new PropertyModel<Long>(connInstanceTO.getPoolConf(), "maxWait"), 0L, null);
+ poolMaxWait.getField().add(new RangeValidator<>(0L, Long.MAX_VALUE));
+ connectorForm.add(poolMaxWait);
+ final SpinnerFieldPanel<Long> poolMinEvictableIdleTime =
+ new SpinnerFieldPanel<>("poolMinEvictableIdleTime", "poolMinEvictableIdleTime", Long.class,
+ new PropertyModel<Long>(connInstanceTO.getPoolConf(), "minEvictableIdleTimeMillis"),
+ 0L, null);
+ poolMinEvictableIdleTime.getField().add(new RangeValidator<>(0L, Long.MAX_VALUE));
+ connectorForm.add(poolMinEvictableIdleTime);
+
+ // form - first tab - onchange()
+ location.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ ((DropDownChoice<String>) location.getField()).setNullValid(false);
+ connInstanceTO.setLocation(location.getModelObject());
+ target.add(location);
+
+ connectorName.setChoices(new ArrayList<>(
+ mapConnBundleTOs.get(location.getModelObject()).keySet()));
+ connectorName.setEnabled(true);
+ connectorName.getField().setModelValue(null);
+ target.add(connectorName);
+
+ version.setChoices(new ArrayList<String>());
+ version.getField().setModelValue(null);
+ version.setEnabled(false);
+ target.add(version);
+
+ properties.clear();
+ target.add(propertiesContainer);
+ }
+ });
+ connectorName.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ ((DropDownChoice<String>) connectorName.getField()).setNullValid(false);
+ connInstanceTO.setBundleName(connectorName.getModelObject());
+ target.add(connectorName);
+
+ List<String> versions = new ArrayList<>(
+ mapConnBundleTOs.get(location.getModelObject()).get(connectorName.getModelObject()).keySet());
+ version.setChoices(versions);
+ version.setEnabled(true);
+ if (versions.size() == 1) {
+ selectVersion(target, connInstanceTO, version, versions.get(0));
+ version.getField().setModelObject(versions.get(0));
+ } else {
+ version.getField().setModelValue(null);
+ properties.clear();
+ target.add(propertiesContainer);
+ }
+ target.add(version);
+ }
+ });
+ version.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ selectVersion(target, connInstanceTO, version, version.getModelObject());
+ }
+ });
+
+ // form - second tab (properties)
+ final ListView<ConnConfProperty> connPropView = new ConnConfPropertyListView("connectorProperties",
+ new PropertyModel<List<ConnConfProperty>>(this, "properties"),
+ true, connInstanceTO.getConfiguration());
+ connPropView.setOutputMarkupId(true);
+ connectorPropForm.add(connPropView);
+
+ final AjaxButton check = new IndicatingAjaxButton("check", new ResourceModel("check")) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ final ConnInstanceTO conn = (ConnInstanceTO) form.getModelObject();
+
+ // ensure that connector bundle information is in sync
+ conn.setBundleName(bundleTO.getBundleName());
+ conn.setVersion(bundleTO.getVersion());
+ conn.setConnectorName(bundleTO.getConnectorName());
+
+ if (restClient.check(conn)) {
+ info(getString("success_connection"));
+ } else {
+ error(getString("error_connection"));
+ }
+
+ feedbackPanel.refresh(target);
+ }
+ };
+ connectorPropForm.add(check);
+
+ // form - third tab (capabilities)
+ final IModel<List<ConnectorCapability>> capabilities =
+ new LoadableDetachableModel<List<ConnectorCapability>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<ConnectorCapability> load() {
+ return Arrays.asList(ConnectorCapability.values());
+ }
+ };
+ CheckBoxMultipleChoice<ConnectorCapability> capabilitiesPalette =
+ new CheckBoxMultipleChoice<>("capabilitiesPalette",
+ new PropertyModel<List<ConnectorCapability>>(this, "selectedCapabilities"), capabilities);
+
+ capabilitiesPalette.add(new AjaxFormChoiceComponentUpdatingBehavior() {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(AjaxRequestTarget target) {
+ }
+ });
+
+ connectorForm.add(capabilitiesPalette);
+
+ // form - submit / cancel buttons
+ final AjaxButton submit = new IndicatingAjaxButton(APPLY, new Model<>(getString(SUBMIT))) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ final ConnInstanceTO conn = (ConnInstanceTO) form.getModelObject();
+
+ conn.setConnectorName(bundleTO.getConnectorName());
+ conn.setBundleName(bundleTO.getBundleName());
+ conn.setVersion(bundleTO.getVersion());
+ conn.getConfiguration().clear();
+ conn.getConfiguration().addAll(connPropView.getModelObject());
+
+ // Set the model object's capabilities to capabilitiesPalette's converted Set
+ conn.getCapabilities().clear();
+ conn.getCapabilities().addAll(selectedCapabilities.isEmpty()
+ ? EnumSet.noneOf(ConnectorCapability.class)
+ : EnumSet.copyOf(selectedCapabilities));
+
+ // Reset pool configuration if all fields are null
+ if (conn.getPoolConf() != null
+ && conn.getPoolConf().getMaxIdle() == null
+ && conn.getPoolConf().getMaxObjects() == null
+ && conn.getPoolConf().getMaxWait() == null
+ && conn.getPoolConf().getMinEvictableIdleTimeMillis() == null
+ && conn.getPoolConf().getMinIdle() == null) {
+
+ conn.setPoolConf(null);
+ }
+
+ try {
+ if (connInstanceTO.getKey() == 0) {
+ restClient.create(conn);
+ } else {
+ restClient.update(conn);
+ }
+
+ ((Resources) pageRef.getPage()).setModalResult(true);
+ window.close(target);
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ ((Resources) pageRef.getPage()).setModalResult(false);
+ LOG.error("While creating or updating connector {}", conn, e);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+ String roles = connInstanceTO.getKey() == 0
+ ? xmlRolesReader.getEntitlement("Connectors", "create")
+ : xmlRolesReader.getEntitlement("Connectors", "update");
+ MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, roles);
+ connectorForm.add(submit);
+
+ final IndicatingAjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+ };
+ cancel.setDefaultFormProcessing(false);
+ connectorForm.add(cancel);
+ }
+
+ private ConnBundleTO getSelectedBundleTO(final ConnInstanceTO connInstanceTO) {
+ ConnBundleTO result = null;
+ if (connInstanceTO != null
+ && StringUtils.isNotBlank(connInstanceTO.getLocation())
+ && StringUtils.isNotBlank(connInstanceTO.getBundleName())
+ && StringUtils.isNotBlank(connInstanceTO.getVersion())
+ && mapConnBundleTOs.containsKey(connInstanceTO.getLocation())) {
+
+ Map<String, Map<String, ConnBundleTO>> byLocation = mapConnBundleTOs.get(connInstanceTO.getLocation());
+ if (byLocation.containsKey(connInstanceTO.getBundleName())) {
+ Map<String, ConnBundleTO> byName = byLocation.get(connInstanceTO.getBundleName());
+ if (byName.containsKey(connInstanceTO.getVersion())) {
+ result = byName.get(connInstanceTO.getVersion());
+ }
+ }
+ }
+ return result;
+ }
+
+ private List<ConnConfProperty> fillProperties(final ConnBundleTO bundleTO, final ConnInstanceTO connInstanceTO) {
+ final List<ConnConfProperty> props = new ArrayList<>();
+
+ if (bundleTO != null) {
+ for (ConnConfPropSchema key : bundleTO.getProperties()) {
+ final ConnConfProperty property = new ConnConfProperty();
+ property.setSchema(key);
+ if (connInstanceTO.getKey() != 0
+ && connInstanceTO.getConfigurationMap().containsKey(key.getName())
+ && connInstanceTO.getConfigurationMap().get(key.getName()).getValues() != null) {
+
+ property.getValues().addAll(connInstanceTO.getConfigurationMap().get(key.getName()).getValues());
+ property.setOverridable(connInstanceTO.getConfigurationMap().get(key.getName()).isOverridable());
+ }
+
+ if (property.getValues().isEmpty() && !key.getDefaultValues().isEmpty()) {
+ property.getValues().addAll(key.getDefaultValues());
+ }
+
+ props.add(property);
+ }
+ }
+
+ // re-order properties (implements Comparable)
+ Collections.sort(props);
+ return props;
+ }
+
+ private void selectVersion(final AjaxRequestTarget target, final ConnInstanceTO connInstanceTO,
+ final AjaxDropDownChoicePanel<String> version, final String versionValue) {
+
+ connInstanceTO.setVersion(versionValue);
+ target.add(version);
+
+ bundleTO = getSelectedBundleTO(connInstanceTO);
+ properties = fillProperties(bundleTO, connInstanceTO);
+ target.add(propertiesContainer);
+ }
+
+ public List<ConnConfProperty> getProperties() {
+ return properties;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/DerSchemaModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/DerSchemaModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/DerSchemaModalPage.java
new file mode 100644
index 0000000..98f4fbb
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/DerSchemaModalPage.java
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.JexlHelpUtil;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.DerSchemaTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+
+/**
+ * Modal window with Schema form.
+ */
+public class DerSchemaModalPage extends AbstractSchemaModalPage<DerSchemaTO> {
+
+ private static final long serialVersionUID = 6668789770131753386L;
+
+ public DerSchemaModalPage(final AttributableType kind) {
+ super(kind);
+ }
+
+ @Override
+ public void setSchemaModalPage(final PageReference pageRef, final ModalWindow window,
+ DerSchemaTO schema, final boolean createFlag) {
+
+ if (schema == null) {
+ schema = new DerSchemaTO();
+ }
+
+ final Form<DerSchemaTO> schemaForm = new Form<>(FORM);
+
+ schemaForm.setModel(new CompoundPropertyModel<>(schema));
+
+ final AjaxTextFieldPanel name =
+ new AjaxTextFieldPanel("key", getString("key"), new PropertyModel<String>(schema, "key"));
+ name.addRequiredLabel();
+
+ final AjaxTextFieldPanel expression = new AjaxTextFieldPanel("expression", getString("expression"),
+ new PropertyModel<String>(schema, "expression"));
+ expression.addRequiredLabel();
+
+ final WebMarkupContainer jexlHelp = JexlHelpUtil.getJexlHelpWebContainer("jexlHelp");
+
+ final AjaxLink<Void> questionMarkJexlHelp = JexlHelpUtil.getAjaxLink(jexlHelp, "questionMarkJexlHelp");
+ schemaForm.add(questionMarkJexlHelp);
+ questionMarkJexlHelp.add(jexlHelp);
+
+ name.setEnabled(createFlag);
+
+ final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form form) {
+ DerSchemaTO schemaTO = (DerSchemaTO) form.getDefaultModelObject();
+
+ try {
+ if (createFlag) {
+ schemaRestClient.createDerSchema(kind, schemaTO);
+ } else {
+ schemaRestClient.updateDerSchema(kind, schemaTO);
+ }
+
+ if (pageRef.getPage() instanceof BasePage) {
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ }
+
+ window.close(target);
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+
+ final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+ };
+
+ cancel.setDefaultFormProcessing(
+ false);
+
+ String allowedRoles = createFlag
+ ? xmlRolesReader.getEntitlement("Schema", "create")
+ : xmlRolesReader.getEntitlement("Schema", "update");
+
+ MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, allowedRoles);
+
+ schemaForm.add(name);
+
+ schemaForm.add(expression);
+
+ schemaForm.add(submit);
+
+ schemaForm.add(cancel);
+
+ add(schemaForm);
+ }
+}
[16/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/report/UserReportletConf.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/report/UserReportletConf.java b/common/lib/src/main/java/org/apache/syncope/common/lib/report/UserReportletConf.java
new file mode 100644
index 0000000..78735eb
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/report/UserReportletConf.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.report;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.annotation.FormAttributeField;
+import org.apache.syncope.common.lib.types.IntMappingType;
+
+@XmlRootElement(name = "userReportletConf")
+@XmlType
+public class UserReportletConf extends AbstractReportletConf {
+
+ @XmlEnum
+ @XmlType(name = "userReportletConfFeature")
+ public enum Feature {
+
+ key,
+ username,
+ workflowId,
+ status,
+ creationDate,
+ lastLoginDate,
+ changePwdDate,
+ passwordHistorySize,
+ failedLoginCount,
+ memberships,
+ resources
+
+ }
+
+ private static final long serialVersionUID = 6602717600064602764L;
+
+ @FormAttributeField(userSearch = true)
+ private String matchingCond;
+
+ @FormAttributeField(schema = IntMappingType.UserPlainSchema)
+ private final List<String> plainAttrs = new ArrayList<>();
+
+ @FormAttributeField(schema = IntMappingType.UserDerivedSchema)
+ private final List<String> derAttrs = new ArrayList<>();
+
+ @FormAttributeField(schema = IntMappingType.UserVirtualSchema)
+ private final List<String> virAttrs = new ArrayList<>();
+
+ private final List<Feature> features = new ArrayList<>();
+
+ public UserReportletConf() {
+ super();
+ }
+
+ public UserReportletConf(final String name) {
+ super(name);
+ }
+
+ @XmlElementWrapper(name = "plainAttributes")
+ @XmlElement(name = "plainAttribute")
+ @JsonProperty("plainAttributes")
+ public List<String> getPlainAttrs() {
+ return plainAttrs;
+ }
+
+ @XmlElementWrapper(name = "derivedAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("derivedAttributes")
+ public List<String> getDerAttrs() {
+ return derAttrs;
+ }
+
+ @XmlElementWrapper(name = "virtualAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("virtualAttributes")
+ public List<String> getVirAttrs() {
+ return virAttrs;
+ }
+
+ @XmlElementWrapper(name = "features")
+ @XmlElement(name = "feature")
+ @JsonProperty("features")
+ public List<Feature> getFeatures() {
+ return features;
+ }
+
+ public String getMatchingCond() {
+ return matchingCond;
+ }
+
+ public void setMatchingCond(final String matchingCond) {
+ this.matchingCond = matchingCond;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/report/package-info.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/report/package-info.java b/common/lib/src/main/java/org/apache/syncope/common/lib/report/package-info.java
new file mode 100644
index 0000000..bc452c1
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/report/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib.report;
+
+import javax.xml.bind.annotation.XmlSchema;
+import org.apache.syncope.common.lib.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/search/OrderByClauseBuilder.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/search/OrderByClauseBuilder.java b/common/lib/src/main/java/org/apache/syncope/common/lib/search/OrderByClauseBuilder.java
new file mode 100644
index 0000000..41d152c
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/search/OrderByClauseBuilder.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.search;
+
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * Simple builder for generating <tt>orderby</tt> values.
+ */
+public class OrderByClauseBuilder {
+
+ private final StringBuilder builder = new StringBuilder();
+
+ public OrderByClauseBuilder asc(final String key) {
+ builder.append(key).append(" ASC,");
+ return this;
+ }
+
+ public OrderByClauseBuilder desc(final String key) {
+ builder.append(key).append(" DESC,");
+ return this;
+ }
+
+ public String build() {
+ return builder.length() == 0
+ ? StringUtils.EMPTY
+ : builder.deleteCharAt(builder.length() - 1).toString();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/search/RoleFiqlSearchConditionBuilder.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/search/RoleFiqlSearchConditionBuilder.java b/common/lib/src/main/java/org/apache/syncope/common/lib/search/RoleFiqlSearchConditionBuilder.java
new file mode 100644
index 0000000..b6cbb6d
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/search/RoleFiqlSearchConditionBuilder.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.search;
+
+import java.util.Map;
+import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition;
+import org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser;
+
+/**
+ * Extends <tt>SyncopeFiqlSearchConditionBuilder</tt> by providing some additional facilities for searching
+ * roles in Syncope.
+ */
+public class RoleFiqlSearchConditionBuilder extends SyncopeFiqlSearchConditionBuilder {
+
+ public RoleFiqlSearchConditionBuilder() {
+ super();
+ }
+
+ public RoleFiqlSearchConditionBuilder(final Map<String, String> properties) {
+ super(properties);
+ }
+
+ @Override
+ protected Builder newBuilderInstance() {
+ return new Builder(properties);
+ }
+
+ @Override
+ public RoleProperty is(final String property) {
+ return newBuilderInstance().is(property);
+ }
+
+ public CompleteCondition hasEntitlements(final String entitlement, final String... moreEntitlements) {
+ return newBuilderInstance().is(SpecialAttr.ENTITLEMENTS.toString()).
+ hasEntitlements(entitlement, moreEntitlements);
+ }
+
+ public CompleteCondition hasNotEntitlements(final String entitlement, final String... moreEntitlements) {
+ return newBuilderInstance().is(SpecialAttr.ENTITLEMENTS.toString()).
+ hasNotEntitlements(entitlement, moreEntitlements);
+ }
+
+ protected static class Builder extends SyncopeFiqlSearchConditionBuilder.Builder
+ implements RoleProperty, CompleteCondition {
+
+ public Builder(final Map<String, String> properties) {
+ super(properties);
+ }
+
+ public Builder(final Builder parent) {
+ super(parent);
+ }
+
+ @Override
+ public RoleProperty is(final String property) {
+ Builder b = new Builder(this);
+ b.result = property;
+ return b;
+ }
+
+ @Override
+ public CompleteCondition hasEntitlements(final String entitlement, final String... moreEntitlements) {
+ this.result = SpecialAttr.ENTITLEMENTS.toString();
+ return condition(FiqlParser.EQ, entitlement, (Object[]) moreEntitlements);
+ }
+
+ @Override
+ public CompleteCondition hasNotEntitlements(final String entitlement, final String... moreEntitlements) {
+ this.result = SpecialAttr.ENTITLEMENTS.toString();
+ return condition(FiqlParser.NEQ, entitlement, (Object[]) moreEntitlements);
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/search/RoleProperty.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/search/RoleProperty.java b/common/lib/src/main/java/org/apache/syncope/common/lib/search/RoleProperty.java
new file mode 100644
index 0000000..433ed11
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/search/RoleProperty.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.search;
+
+import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition;
+
+public interface RoleProperty extends SyncopeProperty {
+
+ CompleteCondition hasEntitlements(String entitlement, String... moreEntitlements);
+
+ CompleteCondition hasNotEntitlements(String entitlement, String... moreEntitlements);
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/search/SearchableFields.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/search/SearchableFields.java b/common/lib/src/main/java/org/apache/syncope/common/lib/search/SearchableFields.java
new file mode 100644
index 0000000..4945cca
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/search/SearchableFields.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.search;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.SubjectType;
+
+public class SearchableFields {
+
+ protected static final String[] ATTRIBUTES_NOTINCLUDED = {
+ "serialVersionUID", "password"
+ };
+
+ public static final List<String> get(final SubjectType subjectType) {
+ return get(subjectType == SubjectType.USER
+ ? UserTO.class
+ : RoleTO.class);
+ }
+
+ public static final List<String> get(final Class<? extends AbstractAttributableTO> attributableRef) {
+ final List<String> fieldNames = new ArrayList<>();
+
+ // loop on class and all superclasses searching for field
+ Class<?> clazz = attributableRef;
+ while (clazz != null && clazz != Object.class) {
+ for (Field field : clazz.getDeclaredFields()) {
+ if (!ArrayUtils.contains(ATTRIBUTES_NOTINCLUDED, field.getName())
+ && !Collection.class.isAssignableFrom(field.getType())
+ && !Map.class.isAssignableFrom(field.getType())) {
+
+ fieldNames.add(field.getName());
+ }
+ }
+ clazz = clazz.getSuperclass();
+ }
+
+ Collections.reverse(fieldNames);
+ return fieldNames;
+ }
+
+ private SearchableFields() {
+ // empty constructor for static utility class
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/search/SpecialAttr.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/search/SpecialAttr.java b/common/lib/src/main/java/org/apache/syncope/common/lib/search/SpecialAttr.java
new file mode 100644
index 0000000..b4c2f21
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/search/SpecialAttr.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.search;
+
+public enum SpecialAttr {
+
+ NULL("$null"),
+ RESOURCES("$resources"),
+ ROLES("$roles"),
+ ENTITLEMENTS("$entitlements");
+
+ private final String literal;
+
+ SpecialAttr(final String literal) {
+ this.literal = literal;
+ }
+
+ public static SpecialAttr fromString(final String value) {
+ SpecialAttr result = null;
+ for (SpecialAttr specialAttr : values()) {
+ if (specialAttr.literal.equals(value)) {
+ result = specialAttr;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/search/SyncopeFiqlSearchConditionBuilder.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/search/SyncopeFiqlSearchConditionBuilder.java b/common/lib/src/main/java/org/apache/syncope/common/lib/search/SyncopeFiqlSearchConditionBuilder.java
new file mode 100644
index 0000000..6c710a2
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/search/SyncopeFiqlSearchConditionBuilder.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.search;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.cxf.jaxrs.ext.search.SearchUtils;
+import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition;
+import org.apache.cxf.jaxrs.ext.search.client.FiqlSearchConditionBuilder;
+import org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser;
+
+public abstract class SyncopeFiqlSearchConditionBuilder extends FiqlSearchConditionBuilder {
+
+ public static final Map<String, String> CONTEXTUAL_PROPERTIES;
+
+ static {
+ CONTEXTUAL_PROPERTIES = new HashMap<String, String>();
+ CONTEXTUAL_PROPERTIES.put(SearchUtils.LAX_PROPERTY_MATCH, "true");
+ }
+
+ protected SyncopeFiqlSearchConditionBuilder() {
+ super();
+ }
+
+ protected SyncopeFiqlSearchConditionBuilder(final Map<String, String> properties) {
+ super(properties);
+ }
+
+ @Override
+ protected Builder newBuilderInstance() {
+ return new Builder(properties);
+ }
+
+ public SyncopeProperty is(final String property) {
+ return newBuilderInstance().is(property);
+ }
+
+ public CompleteCondition isNull(final String property) {
+ return newBuilderInstance().is(property).nullValue();
+ }
+
+ public CompleteCondition isNotNull(final String property) {
+ return newBuilderInstance().is(property).notNullValue();
+ }
+
+ public CompleteCondition hasResources(final String resource, final String... moreResources) {
+ return newBuilderInstance().is(SpecialAttr.RESOURCES.toString()).hasResources(resource, moreResources);
+ }
+
+ public CompleteCondition hasNotResources(final String resource, final String... moreResources) {
+ return newBuilderInstance().is(SpecialAttr.RESOURCES.toString()).hasNotResources(resource, moreResources);
+ }
+
+ protected static class Builder extends FiqlSearchConditionBuilder.Builder
+ implements SyncopeProperty, CompleteCondition {
+
+ protected Builder(final Map<String, String> properties) {
+ super(properties);
+ }
+
+ protected Builder(final Builder parent) {
+ super(parent);
+ }
+
+ @Override
+ public SyncopeProperty is(final String property) {
+ Builder b = new Builder(this);
+ b.result = property;
+ return b;
+ }
+
+ @Override
+ public CompleteCondition nullValue() {
+ return condition(FiqlParser.EQ, SpecialAttr.NULL);
+ }
+
+ @Override
+ public CompleteCondition notNullValue() {
+ return condition(FiqlParser.NEQ, SpecialAttr.NULL);
+ }
+
+ @Override
+ public CompleteCondition hasResources(final String resource, final String... moreResources) {
+ this.result = SpecialAttr.RESOURCES.toString();
+ return condition(FiqlParser.EQ, resource, (Object[]) moreResources);
+ }
+
+ @Override
+ public CompleteCondition hasNotResources(final String resource, final String... moreResources) {
+ this.result = SpecialAttr.RESOURCES.toString();
+ return condition(FiqlParser.NEQ, resource, (Object[]) moreResources);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/search/SyncopeProperty.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/search/SyncopeProperty.java b/common/lib/src/main/java/org/apache/syncope/common/lib/search/SyncopeProperty.java
new file mode 100644
index 0000000..0f833f8
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/search/SyncopeProperty.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.search;
+
+import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition;
+import org.apache.cxf.jaxrs.ext.search.client.Property;
+
+/**
+ * Extension of fluent interface, for {@link SyncopeFiqlSearchConditionBuilder}.
+ */
+public abstract interface SyncopeProperty extends Property {
+
+ CompleteCondition nullValue();
+
+ CompleteCondition notNullValue();
+
+ CompleteCondition hasResources(String resource, String... moreResources);
+
+ CompleteCondition hasNotResources(String resource, String... moreResources);
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/search/UserFiqlSearchConditionBuilder.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/search/UserFiqlSearchConditionBuilder.java b/common/lib/src/main/java/org/apache/syncope/common/lib/search/UserFiqlSearchConditionBuilder.java
new file mode 100644
index 0000000..ef16e3d
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/search/UserFiqlSearchConditionBuilder.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.search;
+
+import java.util.Map;
+import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition;
+import org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser;
+
+/**
+ * Extends <tt>SyncopeFiqlSearchConditionBuilder</tt> by providing some additional facilities for searching
+ * users in Syncope.
+ */
+public class UserFiqlSearchConditionBuilder extends SyncopeFiqlSearchConditionBuilder {
+
+ public UserFiqlSearchConditionBuilder() {
+ super();
+ }
+
+ public UserFiqlSearchConditionBuilder(final Map<String, String> properties) {
+ super(properties);
+ }
+
+ @Override
+ protected Builder newBuilderInstance() {
+ return new Builder(properties);
+ }
+
+ @Override
+ public UserProperty is(final String property) {
+ return newBuilderInstance().is(property);
+ }
+
+ public CompleteCondition hasRoles(final Long role, final Long... moreRoles) {
+ return newBuilderInstance().is(SpecialAttr.ROLES.toString()).hasRoles(role, moreRoles);
+ }
+
+ public CompleteCondition hasNotRoles(final Long role, final Long... moreRoles) {
+ return newBuilderInstance().is(SpecialAttr.ROLES.toString()).hasNotRoles(role, moreRoles);
+ }
+
+ public CompleteCondition hasResources(final String resource, final String... moreResources) {
+ return newBuilderInstance().is(SpecialAttr.RESOURCES.toString()).hasResources(resource, moreResources);
+ }
+
+ public CompleteCondition hasNotResources(final String resource, final String... moreResources) {
+ return newBuilderInstance().is(SpecialAttr.RESOURCES.toString()).hasNotResources(resource, moreResources);
+ }
+
+ protected static class Builder extends SyncopeFiqlSearchConditionBuilder.Builder
+ implements UserProperty, CompleteCondition {
+
+ public Builder(final Map<String, String> properties) {
+ super(properties);
+ }
+
+ public Builder(final Builder parent) {
+ super(parent);
+ }
+
+ @Override
+ public UserProperty is(final String property) {
+ Builder b = new Builder(this);
+ b.result = property;
+ return b;
+ }
+
+ @Override
+ public CompleteCondition hasRoles(final Long role, final Long... moreRoles) {
+ this.result = SpecialAttr.ROLES.toString();
+ return condition(FiqlParser.EQ, role, (Object[]) moreRoles);
+ }
+
+ @Override
+ public CompleteCondition hasNotRoles(final Long role, final Long... moreRoles) {
+ this.result = SpecialAttr.ROLES.toString();
+ return condition(FiqlParser.NEQ, role, (Object[]) moreRoles);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/search/UserProperty.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/search/UserProperty.java b/common/lib/src/main/java/org/apache/syncope/common/lib/search/UserProperty.java
new file mode 100644
index 0000000..886f27f
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/search/UserProperty.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.search;
+
+import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition;
+
+public interface UserProperty extends SyncopeProperty {
+
+ CompleteCondition hasRoles(Long role, Long... moreRoles);
+
+ CompleteCondition hasNotRoles(Long role, Long... moreRoles);
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/search/package-info.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/search/package-info.java b/common/lib/src/main/java/org/apache/syncope/common/lib/search/package-info.java
new file mode 100644
index 0000000..ff6b5e7
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/search/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib.search;
+
+import javax.xml.bind.annotation.XmlSchema;
+import org.apache.syncope.common.lib.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAnnotatedBean.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAnnotatedBean.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAnnotatedBean.java
new file mode 100644
index 0000000..c0f7155
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAnnotatedBean.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.Date;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * Abstract wrapper for common system information.
+ */
+@XmlType
+public class AbstractAnnotatedBean extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -930797879027642457L;
+
+ /**
+ * Username of the user that has created this profile.
+ * <p>
+ * Cannot be used a reference to an existing user for two main reasons: the creator can be the user <tt>admin</tt>;
+ * the creator could have been removed.
+ */
+ private String creator;
+
+ /**
+ * Creation date.
+ */
+ private Date creationDate;
+
+ /**
+ * Username of the user that has performed the last modification to this profile.
+ * <p>
+ * This field cannot be null: at creation time it have to be initialized with the creator username.
+ * <p>
+ * The modifier can be the user itself whether the last performed change has been a self-modification.
+ * <p>
+ * Cannot be used a reference to an existing user for two main reasons: the modifier can be the user <tt>admin</tt>;
+ * the modifier could have been removed.
+ */
+ private String lastModifier;
+
+ /**
+ * Last change date.
+ * <p>
+ * This field cannot be null: at creation time it has to be initialized with <tt>creationDate</tt> field value.
+ */
+ private Date lastChangeDate;
+
+ public String getCreator() {
+ return creator;
+ }
+
+ public void setCreator(final String creator) {
+ this.creator = creator;
+ }
+
+ public Date getCreationDate() {
+ return creationDate;
+ }
+
+ public void setCreationDate(final Date creationDate) {
+ this.creationDate = creationDate;
+ }
+
+ public String getLastModifier() {
+ return lastModifier;
+ }
+
+ public void setLastModifier(final String lastModifier) {
+ this.lastModifier = lastModifier;
+ }
+
+ public Date getLastChangeDate() {
+ return lastChangeDate;
+ }
+
+ public void setLastChangeDate(final Date lastChangeDate) {
+ this.lastChangeDate = lastChangeDate;
+ }
+
+ @JsonIgnore
+ public String getETagValue() {
+ Date etagDate = getLastChangeDate() == null
+ ? getCreationDate() : getLastChangeDate();
+ return etagDate == null
+ ? StringUtils.EMPTY
+ : String.valueOf(etagDate.getTime());
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAttributableTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAttributableTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAttributableTO.java
new file mode 100644
index 0000000..0794b09
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractAttributableTO.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType
+public abstract class AbstractAttributableTO extends ConnObjectTO {
+
+ private static final long serialVersionUID = 4083884098736820255L;
+
+ private long key;
+
+ private final List<AttrTO> derAttrs = new ArrayList<>();
+
+ private final List<AttrTO> virAttrs = new ArrayList<>();
+
+ public long getKey() {
+ return key;
+ }
+
+ public void setKey(final long id) {
+ this.key = id;
+ }
+
+ @JsonIgnore
+ public Map<String, AttrTO> getDerAttrMap() {
+ Map<String, AttrTO> result = new HashMap<>(derAttrs.size());
+ for (AttrTO attributeTO : derAttrs) {
+ result.put(attributeTO.getSchema(), attributeTO);
+ }
+ result = Collections.unmodifiableMap(result);
+
+ return result;
+ }
+
+ @JsonIgnore
+ public Map<String, AttrTO> getVirAttrMap() {
+ Map<String, AttrTO> result = new HashMap<>(virAttrs.size());
+ for (AttrTO attributeTO : virAttrs) {
+ result.put(attributeTO.getSchema(), attributeTO);
+ }
+ result = Collections.unmodifiableMap(result);
+
+ return result;
+ }
+
+ @XmlElementWrapper(name = "derivedAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("derivedAttributes")
+ public List<AttrTO> getDerAttrs() {
+ return derAttrs;
+ }
+
+ @XmlElementWrapper(name = "virtualAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("virtualAttributes")
+ public List<AttrTO> getVirAttrs() {
+ return virAttrs;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractExecTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractExecTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractExecTO.java
new file mode 100644
index 0000000..71b735f
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractExecTO.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import java.util.Date;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlType
+public class AbstractExecTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -4621191979198357081L;
+
+ protected long key;
+
+ protected String status;
+
+ protected String message;
+
+ protected Date startDate;
+
+ protected Date endDate;
+
+ public long getKey() {
+ return key;
+ }
+
+ public void setKey(long key) {
+ this.key = key;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(final String message) {
+ this.message = message;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(final String status) {
+ this.status = status;
+ }
+
+ public Date getStartDate() {
+ return startDate == null
+ ? null
+ : new Date(startDate.getTime());
+ }
+
+ public void setStartDate(final Date startDate) {
+ if (startDate != null) {
+ this.startDate = new Date(startDate.getTime());
+ }
+ }
+
+ public Date getEndDate() {
+ return endDate == null
+ ? null
+ : new Date(endDate.getTime());
+ }
+
+ public void setEndDate(final Date endDate) {
+ if (endDate != null) {
+ this.endDate = new Date(endDate.getTime());
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractPolicyTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractPolicyTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractPolicyTO.java
new file mode 100644
index 0000000..3851f4e
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractPolicyTO.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.PolicyType;
+
+@XmlRootElement(name = "abstractPolicy")
+@XmlType
+@XmlSeeAlso({ AccountPolicyTO.class, PasswordPolicyTO.class, SyncPolicyTO.class })
+@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
+public abstract class AbstractPolicyTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -2903888572649721035L;
+
+ private long key;
+
+ private String description;
+
+ private PolicyType type;
+
+ private final List<String> usedByResources = new ArrayList<>();
+
+ private final List<Long> usedByRoles = new ArrayList<>();
+
+ public long getKey() {
+ return key;
+ }
+
+ public void setKey(long key) {
+ this.key = key;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(final String description) {
+ this.description = description;
+ }
+
+ public PolicyType getType() {
+ return type;
+ }
+
+ public void setType(final PolicyType type) {
+ this.type = type;
+ }
+
+ @XmlElementWrapper(name = "usedByResources")
+ @XmlElement(name = "resource")
+ @JsonProperty("usedByResources")
+ public List<String> getUsedByResources() {
+ return usedByResources;
+ }
+
+ @XmlElementWrapper(name = "usedByRoles")
+ @XmlElement(name = "role")
+ @JsonProperty("usedByRoles")
+ public List<Long> getUsedByRoles() {
+ return usedByRoles;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractProvisioningTaskTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractProvisioningTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractProvisioningTaskTO.java
new file mode 100644
index 0000000..fe92877
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractProvisioningTaskTO.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.types.MatchingRule;
+import org.apache.syncope.common.lib.types.UnmatchingRule;
+
+@XmlRootElement(name = "abstractProvisioningTask")
+@XmlType
+@XmlSeeAlso({ PushTaskTO.class, SyncTaskTO.class })
+public class AbstractProvisioningTaskTO extends SchedTaskTO {
+
+ private static final long serialVersionUID = -2143537546915809016L;
+
+ private String resource;
+
+ private boolean performCreate;
+
+ private boolean performUpdate;
+
+ private boolean performDelete;
+
+ private boolean syncStatus;
+
+ private UnmatchingRule unmatchingRule;
+
+ private MatchingRule matchingRule;
+
+ private List<String> actionsClassNames = new ArrayList<>();
+
+ public String getResource() {
+ return resource;
+ }
+
+ public void setResource(String resource) {
+ this.resource = resource;
+ }
+
+ public boolean isPerformCreate() {
+ return performCreate;
+ }
+
+ public void setPerformCreate(boolean performCreate) {
+ this.performCreate = performCreate;
+ }
+
+ public boolean isPerformUpdate() {
+ return performUpdate;
+ }
+
+ public void setPerformUpdate(boolean performUpdate) {
+ this.performUpdate = performUpdate;
+ }
+
+ public boolean isPerformDelete() {
+ return performDelete;
+ }
+
+ public void setPerformDelete(boolean performDelete) {
+ this.performDelete = performDelete;
+ }
+
+ public boolean isSyncStatus() {
+ return syncStatus;
+ }
+
+ public void setSyncStatus(boolean syncStatus) {
+ this.syncStatus = syncStatus;
+ }
+
+ @XmlElementWrapper(name = "actionsClassNames")
+ @XmlElement(name = "actionsClassName")
+ @JsonProperty("actionsClassNames")
+ public List<String> getActionsClassNames() {
+ return actionsClassNames;
+ }
+
+ public UnmatchingRule getUnmatchingRule() {
+ return unmatchingRule;
+ }
+
+ public void setUnmatchingRule(final UnmatchingRule unmatchigRule) {
+ this.unmatchingRule = unmatchigRule;
+ }
+
+ public MatchingRule getMatchingRule() {
+ return matchingRule;
+ }
+
+ public void setMatchingRule(final MatchingRule matchigRule) {
+ this.matchingRule = matchigRule;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractSchemaTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractSchemaTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractSchemaTO.java
new file mode 100644
index 0000000..b3a37a8
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractSchemaTO.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlRootElement(name = "abstractSchema")
+@XmlType
+@XmlSeeAlso({ PlainSchemaTO.class, DerSchemaTO.class, VirSchemaTO.class })
+@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
+public abstract class AbstractSchemaTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 4088388951694301759L;
+
+ private String key;
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(final String key) {
+ this.key = key;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractSubjectTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractSubjectTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractSubjectTO.java
new file mode 100644
index 0000000..a2e1b3a
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractSubjectTO.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType
+public abstract class AbstractSubjectTO extends AbstractAttributableTO {
+
+ private static final long serialVersionUID = 114668706977919206L;
+
+ private final Set<String> resources = new HashSet<>();
+
+ private final List<PropagationStatus> propagationStatusTOs = new ArrayList<>();
+
+ @XmlElementWrapper(name = "resources")
+ @XmlElement(name = "resource")
+ @JsonProperty("resources")
+ public Set<String> getResources() {
+ return resources;
+ }
+
+ public boolean removePropagationTO(final String resource) {
+ if (resource != null && getPropagationStatusTOs().isEmpty()) {
+ final List<PropagationStatus> toBeRemoved = new ArrayList<>();
+
+ for (PropagationStatus propagationTO : getPropagationStatusTOs()) {
+ if (resource.equals(propagationTO.getResource())) {
+ toBeRemoved.add(propagationTO);
+ }
+ }
+
+ return propagationStatusTOs.removeAll(toBeRemoved);
+ }
+ return false;
+ }
+
+ @XmlElementWrapper(name = "propagationStatuses")
+ @XmlElement(name = "propagationStatus")
+ @JsonProperty("propagationStatuses")
+ public List<PropagationStatus> getPropagationStatusTOs() {
+ return propagationStatusTOs;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractTaskTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractTaskTO.java
new file mode 100644
index 0000000..eb61493
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractTaskTO.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlRootElement(name = "abstractTask")
+@XmlType
+@XmlSeeAlso({ PropagationTaskTO.class, SchedTaskTO.class, NotificationTaskTO.class })
+@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
+public abstract class AbstractTaskTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 386450127003321197L;
+
+ private long key;
+
+ private String latestExecStatus;
+
+ private final List<TaskExecTO> executions = new ArrayList<>();
+
+ private Date startDate;
+
+ private Date endDate;
+
+ public long getKey() {
+ return key;
+ }
+
+ public void setKey(final long key) {
+ this.key = key;
+ }
+
+ public String getLatestExecStatus() {
+ return latestExecStatus;
+ }
+
+ public void setLatestExecStatus(final String latestExecStatus) {
+ this.latestExecStatus = latestExecStatus;
+ }
+
+ @XmlElementWrapper(name = "executions")
+ @XmlElement(name = "execution")
+ @JsonProperty("executions")
+ public List<TaskExecTO> getExecutions() {
+ return executions;
+ }
+
+ public Date getStartDate() {
+ return startDate == null
+ ? null
+ : new Date(startDate.getTime());
+ }
+
+ public void setStartDate(final Date startDate) {
+ if (startDate != null) {
+ this.startDate = new Date(startDate.getTime());
+ }
+ }
+
+ public Date getEndDate() {
+ return endDate == null
+ ? null
+ : new Date(endDate.getTime());
+ }
+
+ public void setEndDate(final Date endDate) {
+ if (endDate != null) {
+ this.endDate = new Date(endDate.getTime());
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/AccountPolicyTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AccountPolicyTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AccountPolicyTO.java
new file mode 100644
index 0000000..a58b24f
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AccountPolicyTO.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.types.AccountPolicySpec;
+import org.apache.syncope.common.lib.types.PolicyType;
+
+@XmlRootElement(name = "accountPolicy")
+@XmlType
+public class AccountPolicyTO extends AbstractPolicyTO {
+
+ private static final long serialVersionUID = -1557150042828800134L;
+
+ private AccountPolicySpec specification;
+
+ private final List<String> resources = new ArrayList<String>();
+
+ public AccountPolicyTO() {
+ this(false);
+ }
+
+ public AccountPolicyTO(final boolean global) {
+ super();
+
+ PolicyType type = global
+ ? PolicyType.GLOBAL_ACCOUNT
+ : PolicyType.ACCOUNT;
+ setType(type);
+ }
+
+ public void setSpecification(final AccountPolicySpec specification) {
+ this.specification = specification;
+ }
+
+ public AccountPolicySpec getSpecification() {
+ return specification;
+ }
+
+ @XmlElementWrapper(name = "resources")
+ @XmlElement(name = "resource")
+ @JsonProperty("resources")
+ public List<String> getResources() {
+ return resources;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/AttrTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AttrTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AttrTO.java
new file mode 100644
index 0000000..829f309
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AttrTO.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "attribute")
+@XmlType
+public class AttrTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 4941691338796323623L;
+
+ /**
+ * Name of the schema that this attribute is referring to.
+ */
+ private String schema;
+
+ /**
+ * Set of (string) values of this attribute.
+ */
+ private final List<String> values;
+
+ /**
+ * Whether this attribute is read-only or not.
+ */
+ private boolean readonly;
+
+ /**
+ * Default constructor.
+ */
+ public AttrTO() {
+ super();
+ values = new ArrayList<String>();
+ readonly = false;
+ }
+
+ /**
+ * @return the name of the schema that this attribute is referring to
+ */
+ public String getSchema() {
+ return schema;
+ }
+
+ /**
+ * @param schema name to be set
+ */
+ public void setSchema(final String schema) {
+ this.schema = schema;
+
+ }
+
+ /**
+ * @return attribute values as strings
+ */
+ @XmlElementWrapper(name = "values")
+ @XmlElement(name = "value")
+ @JsonProperty("values")
+ public List<String> getValues() {
+ return values;
+ }
+
+ public boolean isReadonly() {
+ return readonly;
+ }
+
+ public void setReadonly(final boolean readonly) {
+ this.readonly = readonly;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkAction.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkAction.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkAction.java
new file mode 100644
index 0000000..a514dcb
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkAction.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlRootElement(name = "bulkAction")
+@XmlType
+public class BulkAction extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 1395353278878758961L;
+
+ @XmlEnum
+ @XmlType(name = "bulkActionType")
+ public enum Type {
+
+ DELETE,
+ REACTIVATE,
+ SUSPEND,
+ DRYRUN,
+ EXECUTE
+
+ }
+
+ private Type operation;
+
+ /**
+ * Serialized identifiers.
+ */
+ private final List<String> targets = new ArrayList<>();
+
+ public Type getOperation() {
+ return operation;
+ }
+
+ public void setOperation(final Type operation) {
+ this.operation = operation;
+ }
+
+ @XmlElementWrapper(name = "targets")
+ @XmlElement(name = "target")
+ @JsonProperty("targets")
+ public List<String> getTargets() {
+ return targets;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkActionResult.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkActionResult.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkActionResult.java
new file mode 100644
index 0000000..dfe52de
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkActionResult.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlRootElement(name = "bulkActionResult")
+@XmlType
+public class BulkActionResult extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 2868894178821778133L;
+
+ @XmlEnum
+ @XmlType(name = "bulkActionStatus")
+ public enum Status {
+
+ // general bulk action result statuses
+ SUCCESS,
+ FAILURE,
+ // specific propagation task execution statuses
+ CREATED,
+ SUBMITTED,
+ UNSUBMITTED;
+
+ }
+
+ private final List<Result> results = new ArrayList<Result>();
+
+ @XmlElementWrapper(name = "result")
+ @XmlElement(name = "item")
+ @JsonProperty("result")
+ public List<Result> getResult() {
+ return results;
+ }
+
+ @JsonIgnore
+ public void add(final Object id, final Status status) {
+ if (id != null) {
+ results.add(new Result(id.toString(), status));
+ }
+ }
+
+ @JsonIgnore
+ public void add(final Object id, final String status) {
+ if (id != null) {
+ results.add(new Result(id.toString(), Status.valueOf(status.toUpperCase())));
+ }
+ }
+
+ @JsonIgnore
+ public Map<String, Status> getResultMap() {
+ final Map<String, Status> res = new HashMap<String, Status>();
+
+ for (Result result : results) {
+ res.put(result.getKey(), result.getValue());
+ }
+
+ return res;
+ }
+
+ @JsonIgnore
+ public List<String> getResultByStatus(final Status status) {
+ final List<String> res = new ArrayList<String>();
+
+ for (Result result : results) {
+ if (result.getValue() == status) {
+ res.add(result.getKey());
+ }
+ }
+
+ return res;
+ }
+
+ public static class Result extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -1149681964161193232L;
+
+ private String key;
+
+ private Status value;
+
+ public Result() {
+ super();
+ }
+
+ public Result(final String key, final Status value) {
+ this.key = key;
+ this.value = value;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public Status getValue() {
+ return value;
+ }
+
+ public void setKey(final String key) {
+ this.key = key;
+ }
+
+ public void setValue(final Status value) {
+ this.value = value;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConfTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConfTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConfTO.java
new file mode 100644
index 0000000..4856a48
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConfTO.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "conf")
+@XmlType
+public class ConfTO extends AbstractAttributableTO {
+
+ private static final long serialVersionUID = -3825039700228595590L;
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnBundleTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnBundleTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnBundleTO.java
new file mode 100644
index 0000000..87583a4
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnBundleTO.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.ConnConfPropSchema;
+
+@XmlRootElement(name = "connectorBundle")
+@XmlType
+public class ConnBundleTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 7215115961910138005L;
+
+ private String displayName;
+
+ private String location;
+
+ private String bundleName;
+
+ private String connectorName;
+
+ private String version;
+
+ private List<ConnConfPropSchema> properties = new ArrayList<>();
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(final String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public void setLocation(final String location) {
+ this.location = location;
+ }
+
+ public String getBundleName() {
+ return bundleName;
+ }
+
+ public void setBundleName(final String bundleName) {
+ this.bundleName = bundleName;
+ }
+
+ public String getConnectorName() {
+ return connectorName;
+ }
+
+ public void setConnectorName(final String connectorName) {
+ this.connectorName = connectorName;
+ }
+
+ @XmlElementWrapper(name = "properties")
+ @XmlElement(name = "connConfPropSchema")
+ @JsonProperty("properties")
+ public List<ConnConfPropSchema> getProperties() {
+ return properties;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(final String version) {
+ this.version = version;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java
new file mode 100644
index 0000000..fd4d0b7
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+/**
+ * Mimic ConnId's ObjectClass information.
+ */
+@XmlRootElement(name = "connIdObjectClass")
+@XmlType
+public class ConnIdObjectClassTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 5802458031138859994L;
+
+ @XmlEnum
+ public enum DefaultType {
+
+ ACCOUNT("__ACCOUNT__"),
+ GROUP("__GROUP__");
+
+ private String specialName;
+
+ private DefaultType(final String specialName) {
+ this.specialName = specialName;
+ }
+
+ public String getSpecialName() {
+ return specialName;
+ }
+ }
+
+ public static ConnIdObjectClassTO ACCOUNT = new ConnIdObjectClassTO(DefaultType.ACCOUNT.getSpecialName());
+
+ public static ConnIdObjectClassTO GROUP = new ConnIdObjectClassTO(DefaultType.GROUP.getSpecialName());
+
+ private String type;
+
+ public ConnIdObjectClassTO() {
+ }
+
+ public ConnIdObjectClassTO(final String type) {
+ this.type = type;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(final String type) {
+ this.type = type;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnInstanceTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnInstanceTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnInstanceTO.java
new file mode 100644
index 0000000..5c25783
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnInstanceTO.java
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.syncope.common.lib.types.ConnectorCapability;
+
+@XmlRootElement(name = "connInstance")
+@XmlType
+public class ConnInstanceTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 2707778645445168671L;
+
+ private long key;
+
+ private String location;
+
+ private String connectorName;
+
+ private String bundleName;
+
+ private String version;
+
+ private final Set<ConnConfProperty> configuration;
+
+ private final Set<ConnectorCapability> capabilities;
+
+ private String displayName;
+
+ private Integer connRequestTimeout;
+
+ private ConnPoolConfTO poolConf;
+
+ public ConnInstanceTO() {
+ super();
+
+ configuration = new HashSet<>();
+ capabilities = EnumSet.noneOf(ConnectorCapability.class);
+ }
+
+ public long getKey() {
+ return key;
+ }
+
+ public void setKey(final long key) {
+ this.key = key;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public void setLocation(final String location) {
+ this.location = location;
+ }
+
+ public String getConnectorName() {
+ return connectorName;
+ }
+
+ public void setConnectorName(final String connectorname) {
+ this.connectorName = connectorname;
+ }
+
+ public String getBundleName() {
+ return bundleName;
+ }
+
+ public void setBundleName(final String bundlename) {
+ this.bundleName = bundlename;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(final String version) {
+ this.version = version;
+ }
+
+ @XmlElementWrapper(name = "configuration")
+ @XmlElement(name = "property")
+ @JsonProperty("configuration")
+ public Set<ConnConfProperty> getConfiguration() {
+ return this.configuration;
+ }
+
+ @JsonIgnore
+ public Map<String, ConnConfProperty> getConfigurationMap() {
+ Map<String, ConnConfProperty> result;
+
+ if (getConfiguration() == null) {
+ result = Collections.<String, ConnConfProperty>emptyMap();
+ } else {
+ result = new HashMap<>();
+ for (ConnConfProperty prop : getConfiguration()) {
+ result.put(prop.getSchema().getName(), prop);
+ }
+ result = Collections.unmodifiableMap(result);
+ }
+
+ return result;
+ }
+
+ @XmlElementWrapper(name = "capabilities")
+ @XmlElement(name = "capability")
+ @JsonProperty("capabilities")
+ public Set<ConnectorCapability> getCapabilities() {
+ return capabilities;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(final String displayName) {
+ this.displayName = displayName;
+ }
+
+ /**
+ * Get connector request timeout.
+ * It is not applied in case of sync, full reconciliation and search.
+ *
+ * @return timeout.
+ */
+ public Integer getConnRequestTimeout() {
+ return connRequestTimeout;
+ }
+
+ /**
+ * Set connector request timeout.
+ * It is not applied in case of sync, full reconciliation and search.
+ *
+ * @param connRequestTimeout timeout
+ */
+ public void setConnRequestTimeout(final Integer connRequestTimeout) {
+ this.connRequestTimeout = connRequestTimeout;
+ }
+
+ public ConnPoolConfTO getPoolConf() {
+ return poolConf;
+ }
+
+ public void setPoolConf(final ConnPoolConfTO poolConf) {
+ this.poolConf = poolConf;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnObjectTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnObjectTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnObjectTO.java
new file mode 100644
index 0000000..78256ba
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnObjectTO.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "connObject")
+@XmlType
+public class ConnObjectTO extends AbstractAnnotatedBean {
+
+ private static final long serialVersionUID = 5139554911265442497L;
+
+ private final List<AttrTO> attrs = new ArrayList<>();
+
+ @XmlElementWrapper(name = "attributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("attributes")
+ public List<AttrTO> getPlainAttrs() {
+ return attrs;
+ }
+
+ @JsonIgnore
+ public Map<String, AttrTO> getPlainAttrMap() {
+ Map<String, AttrTO> result = new HashMap<>(attrs.size());
+ for (AttrTO attributeTO : attrs) {
+ result.put(attributeTO.getSchema(), attributeTO);
+ }
+ result = Collections.<String, AttrTO>unmodifiableMap(result);
+
+ return result;
+ }
+}
[20/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/PushTasksPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PushTasksPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PushTasksPanel_pt_BR.properties
new file mode 100644
index 0000000..054af39
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PushTasksPanel_pt_BR.properties
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Identificador
+name=Nome
+description=Descri\u00e7\u00e3o
+resourceName=Nome do Recurso
+lastExec=\u00daltima Execu\u00e7\u00e3o
+nextExec=Pr\u00f3xima Execu\u00e7\u00e3o
+detail=Detalhe
+delete=Remove
+edit=Alterar
+execute=Executar
+executeDryRun=Executar (Ensaio)
+userTemplate=Usar Template
+latestExecStatus=\u00daltimo Estatus
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnConfPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnConfPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnConfPanel.html
new file mode 100644
index 0000000..d4b0e16
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnConfPanel.html
@@ -0,0 +1,41 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <span wicket:id="connectorPropertiesContainer">
+ <div id="formtable">
+ <div class="tablerow" wicket:id="connectorProperties">
+ <div class="tablecolumn_label medium_fixedsize">
+ <span wicket:id="connPropAttrSchema">[connPropAttrSchema]</span>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="panel">[connPropAttrValue]</span>
+ </div>
+ </div>
+ </div>
+
+ <div>
+ <a style="position: absolute; top: 2px; right:20px;" wicket:id="check">
+ <img src="img/ping.png"width="30" height="30"
+ alt="ping" title="title" wicket:message="title:check"/>
+ </a>
+ </div>
+ </span>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
new file mode 100644
index 0000000..cd8c4ea
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
@@ -0,0 +1,137 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="name"><wicket:message key="name"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="name">[name]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="connector"><wicket:message key="connector"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="connector">[connector]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="enforceMandatoryCondition"><wicket:message key="enforceMandatoryCondition"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="enforceMandatoryCondition">[enforceMandatoryCondition]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="propagationPrimary"><wicket:message key="propagationPrimary"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="propagationPrimary">[propagationPrimary]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="propagationPriority"><wicket:message key="propagationPriority"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="propagationPriority">[propagationPriority]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="propagationMode"><wicket:message key="propagationMode"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="propagationMode">[propagationMode]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="randomPwdIfNotProvided"><wicket:message key="randomPwdIfNotProvided"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="randomPwdIfNotProvided">[randomPwdIfNotProvided]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="propagationActionsClassNames"><wicket:message key="actionsClasses"/></label>
+ </div>
+ <span wicket:id="propagationActionsClassNames">
+ <span wicket:id="actionsClasses">
+ <select class="text ui-widget-content ui-corner-all" wicket:id="actionsClass"/>
+ <a wicket:id="drop"><img src="img/minus-icon.png" alt="remove icon" class="drop_button"/></a>
+ <a wicket:id="add"><img src="img/plus-icon.png" alt="add icon" class="add_button"/></a>
+ <br/>
+ </span>
+ <a wicket:id="first"><img src="img/plus-icon.png" alt="add icon" class="add_button"/></a>
+ </span>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="createTraceLevel"><wicket:message key="createTraceLevel"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="createTraceLevel">[createTraceLevel]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="updateTraceLevel"><wicket:message key="updateTraceLevel"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="updateTraceLevel">[updateTraceLevel]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="deleteTraceLevel"><wicket:message key="deleteTraceLevel"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="deleteTraceLevel">[deleteTraceLevel]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="syncTraceLevel"><wicket:message key="syncTraceLevel"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="syncTraceLevel">[syncTraceLevel]</span>
+ </div>
+ </div>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html
new file mode 100644
index 0000000..8338fd4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html
@@ -0,0 +1,125 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div>
+ <table id="mappings"
+ class="ui-widget ui-widget-content ui-corner-all"
+ style="font-size: 1em;margin-top:2px;"
+ width="100%" cellpadding="2px" cellspacing="1px"
+ wicket:id="mappingContainer">
+ <thead>
+ <tr class="ui-widget-header">
+ <th><wicket:message key="delete"/></th>
+ <th><wicket:message key="entity"/></th>
+ <th><wicket:message key="intMappingTypes"/></th>
+ <th><wicket:message key="intAttrNames"/></th>
+ <th><wicket:message key="extAttrNames"/></th>
+ <th><wicket:message key="mandatoryCondition"/>
+ <a class="tooltips" wicket:id="questionMarkJexlHelp" href="#" alt="Click to help" title="Click to help"><img src="img/help.png"/>
+ <span wicket:id="jexlHelp" class="tooltips">
+ <wicket:message key="jexl_info"/>
+ <ul>
+ <li><wicket:message key="jexl_ex1"/></li>
+ <li><wicket:message key="jexl_ex2"/></li>
+ </ul>
+ <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message key="jexl_syntax_url"/></a>
+ </span>
+ </a>
+ </th>
+ <th><wicket:message key="accountId"/></th>
+ <th><label wicket:id="passwordLabel"/></th>
+ <th><wicket:message key="purpose"/></th>
+ </tr>
+ </thead>
+ <tfoot>
+ <tr>
+ <td colspan="7" style="padding: 5px">
+ <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="addMappingBtn" />
+ </td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <tr wicket:id="mappings" class="tablerow">
+ <td align="center" valign="middle">
+ <input type="checkbox" class="text ui-widget-content ui-corner-all" wicket:id="toRemove"/>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="entities">[entities]</span>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="intMappingTypes">[intMappingTypes]</span>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="intAttrNames">[intAttrNames]</span>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="extAttrName">[extAttrName]</span>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="mandatoryCondition">[mandatoryCondition]</span>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="accountId">[accountId]</span>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="password">[password]</span>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="purpose">
+ <span wicket:id="purposeActions">[purpose]</span>
+ </span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <script type="text/javascript">
+ $(function() {
+ $('table#mappings tbody tr.tablerow:even').addClass("alt");
+ });
+ </script>
+
+ <table id="accountLinkTable"
+ class="ui-widget ui-widget-content ui-corner-all"
+ style="font-size: 1em;margin-top:2px;"
+ border-width="1px;" border-color="#cccccc;" border-style="solid;"
+ width="100%" cellpadding="2px" cellspacing="1px"
+ wicket:id="accountLinkContainer">
+ <thead>
+ <tr class="ui-widget-header">
+ <th width="10%" align="left"><wicket:message key="enable"/></th>
+ <th align="left"><wicket:message key="accountLink"/></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td width="10%" align="left" valign="middle">
+ <span wicket:id="accountLinkCheckbox">[accountLinkCheckbox]</span>
+ </td>
+ <td align="left" valign="middle">
+ <span wicket:id="accountLink">[accountLink]</span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel.html
new file mode 100644
index 0000000..ddabe05
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel.html
@@ -0,0 +1,56 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div id="formtable" wicket:id="security">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="passwordPolicy"><wicket:message key="passwordPolicy"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="passwordPolicy">
+ [panel for dynamic input type markup]
+ </span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="accountPolicy"><wicket:message key="accountPolicy"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="accountPolicy">
+ [panel for dynamic input type markup]
+ </span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="syncPolicy"><wicket:message key="syncPolicy"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="syncPolicy">
+ [panel for dynamic input type markup]
+ </span>
+ </div>
+ </div>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel.properties
new file mode 100644
index 0000000..a38237e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+passwordPolicy = Password Policy
+accountPolicy = Account Policy
+syncPolicy = Sync Policy
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel_it.properties
new file mode 100644
index 0000000..f7fd440
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel_it.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+passwordPolicy = Password Policy
+accountPolicy = Account Policy
+syncPolicy = Sync Policy
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel_pt_BR.properties
new file mode 100644
index 0000000..3933167
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel_pt_BR.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+passwordPolicy = Pol\u00EDtica de Senha
+accountPolicy = Pol\u00EDtica de Conta
+syncPolicy = Pol\u00EDtica de Sincroniza\u00E7\u00E3o
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourcesPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourcesPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourcesPanel.html
new file mode 100644
index 0000000..d5d155a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourcesPanel.html
@@ -0,0 +1,23 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <span wicket:id="resourcesPalette">[palette]</span>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel.html
new file mode 100644
index 0000000..bd04c97
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel.html
@@ -0,0 +1,107 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div id="formtable">
+ <span wicket:id="parent">[parent]</span>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <wicket:message key="name"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="name"/>
+ <a class="tooltips" wicket:id="questionMarkJexlHelp" href="#" alt="Click to help" title="Click to help">
+ <img src="img/help.png"/>
+ <span wicket:id="jexlHelp" class="tooltips">
+ <wicket:message key="jexl_info"/>
+ <ul>
+ <li><wicket:message key="jexl_ex1"/></li>
+ <li><wicket:message key="jexl_ex2"/></li>
+ </ul>
+ <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message key="jexl_syntax_url"/></a>
+ </span>
+ </a>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <wicket:message key="inheritOwner"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="inheritOwner"/>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <wicket:message key="inheritTemplates"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="inheritTemplates"/>
+ </div>
+ </div>
+
+ <div wicket:id="ownerContainer">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <wicket:message key="userOwner"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="userOwner"/>
+ <a href="#" wicket:id="userOwnerSelect"><img src="img/actions/search.png" alt="select user owner" title="Search"/></a>
+ <a href="#" wicket:id="userOwnerReset"><img src="img/actions/delete.png" alt="reset user owner" title="Delete"/></a>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <wicket:message key="roleOwner"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="roleOwner"/>
+ <a href="#" wicket:id="roleOwnerSelect"><img src="img/actions/search.png" alt="select role owner" title="Search"/></a>
+ <a href="#" wicket:id="roleOwnerReset"><img src="img/actions/delete.png" alt="reset role owner" title="Delete"/></a>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <span wicket:id="parentSelectWin"/>
+ <span wicket:id="userOwnerSelectWin"/>
+ <span wicket:id="roleOwnerSelectWin"/>
+
+ <wicket:fragment wicket:id="parentFragment">
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <wicket:message key="parent"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="parent"/>
+ <a href="#" wicket:id="parentSelect"><img src="img/actions/search.png" alt="select role parent" title="Search"/></a>
+ <a href="#" wicket:id="parentReset"><img src="img/actions/delete.png" alt="reset role parent" title="Delete"/></a>
+ </div>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="emptyFragment">
+ </wicket:fragment>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel.properties
new file mode 100644
index 0000000..b729c65
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+name=Name
+userOwner=Owner (user)
+roleOwner=Owner (role)
+inheritOwner=Inherit owner
+parent=Parent
+inheritTemplates=Inherit templates
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel_it.properties
new file mode 100644
index 0000000..7938bae
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel_it.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+name=Nome
+userOwner=Proprietario (utente)
+roleOwner=Proprietario (ruolo)
+inheritOwner=Eredita proprietario
+parent=Padre
+inheritTemplates=Eredita modelli
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel_pt_BR.properties
new file mode 100644
index 0000000..eadc335
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleDetailsPanel_pt_BR.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+name=Nome
+userOwner=Dono (usu\u00e1rio)
+roleOwner=Dono (fun\u00e7\u00e3o)
+inheritOwner=Dono herdado
+parent=Parente
+inheritTemplates=Modelo herdado
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel.html
new file mode 100644
index 0000000..b1729c1
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel.html
@@ -0,0 +1,88 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+
+ <div id="details">
+ <span wicket:id="details">[role details]</span>
+ <span wicket:id="statuspanel">[Status Panel]</span>
+ <span wicket:id="systeminformation">[System Information]</span>
+ </div>
+
+ <div id="templates">
+ <span wicket:id="templates">[templates]</span>
+ </div>
+
+ <div id="plainAttrs">
+ <div id="formtable">
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <wicket:message key="inheritPlainAttrs"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="inheritPlainAttrs" />
+ </div>
+ </div>
+
+ <span wicket:id="plainAttrs">[role attributes]</span>
+ </div>
+ </div>
+
+ <div id="derAttrs">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <wicket:message key="inheritDerAttrs"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="inheritDerAttrs" />
+ </div>
+ </div>
+
+ <span wicket:id="derAttrs">[role derived attributes]</span>
+ </div>
+ </div>
+
+ <div id="virAttrs">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <wicket:message key="inheritVirAttrs"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="inheritVirAttrs" />
+ </div>
+ </div>
+
+ <span wicket:id="virAttrs">[role virtual attributes]</span>
+ </div>
+ </div>
+
+ <div id="resources">
+ <span wicket:id="resources">[resources]</span>
+ </div>
+ <div id="entitlements">
+ <span wicket:id="entitlements">[entitlements]</span>
+ </div>
+ <div id="security">
+ <span wicket:id="security">[security]</span>
+ </div>
+
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel.properties
new file mode 100644
index 0000000..86aace6
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel.properties
@@ -0,0 +1,51 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=All form fields are required.
+add=+
+drop=-
+error=Generic error occurred during the operation
+name=Name
+firstResourcesList=Role's resources
+secondResourcesList=Available resources
+firstEntitlementsList=Role's entitlements
+secondEntitlementsList=Available entitlements
+
+addAttributeBtn=Add
+required_alert=All form fields are required.
+add=+
+drop=-
+error=Generic error occurred during the operation
+name=Name
+firstResourcesList=Role's resources
+secondResourcesList=Available resources
+firstEntitlementsList=Role's entitlements
+secondEntitlementsList=Available entitlements
+derAttrs=Derived Attributes
+derAttrToRemove=Delete
+derAttrName=Name
+derAttrValue=Derived value
+
+virAttrs=Virtual Attributes
+virAttrToRemove=Delete
+virAttrName=Name
+virAttrValue=Virtual value
+
+addAttributeBtn=Add
+
+inheritPlainAttrs=Inherit plain attributes
+inheritDerAttrs=Inherit derived attributes
+inheritVirAttrs=Inherit virtual attributes
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel_it.properties
new file mode 100644
index 0000000..068abdc
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel_it.properties
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=All form fields are required.
+add=+
+drop=-
+name=Nome
+error=Errore generico durante l'operazione
+firstResourcesList=Risorse ruolo
+secondResourcesList=Risorse disponibili
+firstResourcesList=Entitlement ruolo
+secondResourcesList=Entitlement disponibili
+
+addAttributeBtn=Aggiungi
+required_alert=Tutti i valori sono richiesti.
+add=+
+drop=-
+name=Nome
+error=Errore generico durante l'operazione
+firstResourcesList=Risorse ruolo
+secondResourcesList=Risorse disponibili
+firstResourcesList=Risorse ruolo
+secondResourcesList=Risorse disponibili
+derAttrs=Attributi derivati
+derAttrToRemove=Rimuovi
+derAttrName=Nome
+derAttrValue=Valore derivato
+
+virAttrs=Attributi virtuali
+virAttrToRemove=Rimuovi
+virAttrName=Nome
+virAttrValue=Valore virtuale
+
+addAttributeBtn=Aggiungi
+
+inheritPlainAttrs=Eredita attributi normali
+inheritDerAttrs=Eredita attributi derivati
+inheritVirAttrs=Eredita attributi virtuali
+firstEntitlementsList=Entitlement ruolo
+secondEntitlementsList=Entitlement disponibili
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel_pt_BR.properties
new file mode 100644
index 0000000..e480811
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RolePanel_pt_BR.properties
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=Todos os campos s\u00e3o obrigat\u00f3rios
+add=+
+drop=-
+error=Um erro gen\u00e9rico ocorreu durante a opera\u00e7\u00e3o
+name=Nome
+firstResourcesList=Recursos de Fun\u00e7\u00f5es
+secondResourcesList=Recursos Dipon\u00edveis
+firstEntitlementsList=Direitos de Fun\u00e7\u00f5es
+secondEntitlementsList=Direitos Dispon\u00edveis
+derAttrs=Atributos Derivados
+derAttrToRemove=Remover
+derAttrName=Nome
+derAttrValue=Valor Derivado
+
+virAttrs=Atributos Virtuais
+virAttrToRemove=Remover
+virAttrName=Nome
+virAttrValue=Valor Virtual
+
+addAttributeBtn=Adicionar
+
+inheritPlainAttrs=Atributos Herdados Normal
+inheritDerAttrs=Atributos Herdados Derivados
+inheritVirAttrs=Atributos Virtuais Herdados
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel.html
new file mode 100644
index 0000000..61b609e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel.html
@@ -0,0 +1,66 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div id="formtable" wicket:id="security">
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="inheritPasswordPolicy"><wicket:message key="inheritPasswordPolicy"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="inheritPasswordPolicy">
+ [panel for dynamic input type markup]
+ </span>
+ </div>
+ </div>
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="passwordPolicy"><wicket:message key="passwordPolicy"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="passwordPolicy">
+ [panel for dynamic input type markup]
+ </span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="inheritAccountPolicy"><wicket:message key="inheritAccountPolicy"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="inheritAccountPolicy">
+ [panel for dynamic input type markup]
+ </span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="accountPolicy"><wicket:message key="accountPolicy"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="accountPolicy">
+ [panel for dynamic input type markup]
+ </span>
+ </div>
+ </div>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel.properties
new file mode 100644
index 0000000..167673d
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+inheritPasswordPolicy = Inherit password policy
+inheritAccountPolicy = Inherit account policy
+passwordPolicy = Password Policy
+accountPolicy = Account Policy
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel_it.properties
new file mode 100644
index 0000000..6e7c6ed
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel_it.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+inheritPasswordPolicy = Eredita password policy
+inheritAccountPolicy = Eredita account policy
+passwordPolicy = Password Policy
+accountPolicy = Account Policy
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel_pt_BR.properties
new file mode 100644
index 0000000..5c77adc
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSecurityPanel_pt_BR.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+inheritPasswordPolicy = Pol\u00EDtica de Senha Herdada
+inheritAccountPolicy = Pol\u00EDtica de Conta Herdada
+passwordPolicy = Pol\u00EDtica de Senha
+accountPolicy = Pol\u00EDtica de Conta
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSummaryPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSummaryPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSummaryPanel.html
new file mode 100644
index 0000000..3d5e7b9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleSummaryPanel.html
@@ -0,0 +1,39 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+
+ <span wicket:id="roleSummaryPanel">[Role panel]</span>
+
+ <wicket:fragment wicket:id="roleViewPanel">
+ <span wicket:id="nodeViewPanel"></span>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="rootPanel">
+ <div style="float:left; width:70%;">
+ <p style="height:15px; margin-top: 0px;" class="ui-widget ui-corner-all ui-widget-header">
+ <span style="float:right;" wicket:id="actionLinks"/>
+ </p>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fakerootFrag">
+ </wicket:fragment>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel.html
new file mode 100644
index 0000000..226c172
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel.html
@@ -0,0 +1,64 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div style="float:left; width:70%;">
+ <script type="text/javascript">
+ $(document).ready(function () {
+ $("div form #tabs").tabs();
+ });
+ $(document).ready(function () {
+ $("div form #tabs #templates").tabs();
+ });
+ </script>
+ <p style="height:15px; margin-top: 0px;" class="ui-widget ui-corner-all ui-widget-header">
+ <wicket:message key="title"/>
+ <span wicket:id="displayName"/>
+ <span style="float:right;" wicket:id="actionLinks"/>
+ </p>
+
+ <form wicket:id="roleForm">
+ <div id="tabs" style="margin: 0px;">
+ <ul>
+ <li><a href="#details"><span><wicket:message key="details"/></span></a></li>
+ <li><a href="#templates"><span><wicket:message key="templates"/></span></a></li>
+ <li><a href="#plainAttrs"><span><wicket:message key="plainAttrs"/></span></a></li>
+ <li><a href="#derAttrs"><span><wicket:message key="derAttrs"/></span></a></li>
+ <li><a href="#virAttrs"><span><wicket:message key="virAttrs"/></span></a></li>
+ <li><a href="#resources"><span><wicket:message key="resources"/></span></a></li>
+ <li><a href="#entitlements"><span><wicket:message key="entitlements"/></span></a></li>
+ <li><a href="#security"><span><wicket:message key="security"/></span></a></li>
+ <li><a href="#users"><span><wicket:message key="users"/></span></a></li>
+ </ul>
+ <div wicket:id="rolePanel">
+ </div>
+ <div id="users">
+ <div wicket:id="userListContainer">
+ <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="search"/>
+ <div id="users-contain" class="ui-widget" style="width:auto">
+ <span wicket:id="userList"> [userList] </span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel.properties
new file mode 100644
index 0000000..b49cf51
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Role
+details=Details
+plainAttrs=Plain attributes
+derAttrs=Derived attributes
+virAttrs=Virtual attributes
+resources=Resources
+entitlements=Entitlements
+security=Security
+users=Users
+search=Get Users
+templates=Templates
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel_it.properties
new file mode 100644
index 0000000..727fe69
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel_it.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Ruolo
+details=Dettagli
+plainAttrs=Attributi normali
+derAttrs=Attributi derivati
+virAttrs=Attributi virtuali
+resources=Risorse
+entitlements=Entitlement
+security=Sicurezza
+users=Utenti
+search=Lista Utenti
+templates=Modelli
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel_pt_BR.properties
new file mode 100644
index 0000000..f01ecac
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RoleTabPanel_pt_BR.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Fun\u00e7\u00e3o
+details=Detalhes
+plainAttrs=Atributos Normal
+derAttrs=Atributos Derivados
+virAttrs=Atributos Virtuais
+resources=Recursos
+entitlements=Direitos
+security=Seguran\u00e7a
+users=Usu\u00e1rios
+search=Obter Usu\u00e1rios
+templates=Modelo
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks.html
new file mode 100644
index 0000000..7ac78ad
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks.html
@@ -0,0 +1,42 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div id="users-contain" class="ui-widget" style="width:auto">
+ <span wicket:id="container">
+ <span wicket:id="datatable">[datatable]</span>
+ </span>
+
+ <span style="float:right">
+ <form wicket:id="PaginatorForm" style="display:inline">
+ <label><wicket:message key="displayRows"/></label>
+ <select class="text ui-widget-content ui-corner-all"
+ wicket:id="rowsChooser"/>
+ </form>
+ </span>
+ </div>
+ <div wicket:id="taskWin">
+ [Show modal window for viewing task]
+ </div>
+ <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="createLink">
+ <wicket:message key="create"/>
+ </a>
+ </wicket:panel>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks.properties
new file mode 100644
index 0000000..98b50fe
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks.properties
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Id
+name=Name
+description=Description
+class=Class
+lastExec=Last Execution
+nextExec=Next Execution
+detail=Detail
+delete=Delete
+edit=Edit
+execute=Execute
+executeDryRun=Dry run
+latestExecStatus=Last status
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks_it.properties
new file mode 100644
index 0000000..f023310
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks_it.properties
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Id
+name=Nome
+description=Descrizione
+class=Classs
+lastExec=Ultima Esecuzione
+nextExec=Prossima Esecuzione
+detail=Dettagli
+delete=Rimuovi
+edit=Modifica
+execute=Esegui
+executeDryRun=Esecuzione simulata
+latestExecStatus=Ultimo stato
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks_pt_BR.properties
new file mode 100644
index 0000000..0bca81c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchedTasks_pt_BR.properties
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Identificador
+name=Nome
+description=Descri\u00e7\u00e3o
+class=Classe
+lastExec=\u00daltima Execu\u00e7\u00e3o
+nextExec=Pr\u00f3xima Execu\u00e7\u00e3o
+detail=Detalhe
+delete=Remover
+edit=Editar
+execute=Executar
+executeDryRun=Executar (Ensaio)
+latestExecStatus=\u00daltimo Estatus
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel.html
new file mode 100644
index 0000000..d9668a0
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel.html
@@ -0,0 +1,41 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <wicket:message key="securityQuestion"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="securityQuestion"/>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <wicket:message key="securityAnswer"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="securityAnswer"/>
+ </div>
+ </div>
+ </div>
+ </wicket:panel>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel.properties
new file mode 100644
index 0000000..672fc21
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+securityQuestion=Security question
+securityAnswer=Security answer
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel_it.properties
new file mode 100644
index 0000000..014f3aa
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel_it.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+securityQuestion=Domanda di sicurezza
+securityAnswer=Risposta di sicurezza
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel_pt_BR.properties
new file mode 100644
index 0000000..0afcb73
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SecurityQuestionPanel_pt_BR.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+securityQuestion=Pergunta de seguran\u00e7a
+securityAnswer=Resposta de seguran\u00e7a
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/SelectedEventsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SelectedEventsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SelectedEventsPanel.html
new file mode 100644
index 0000000..3ef0354
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SelectedEventsPanel.html
@@ -0,0 +1,33 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style>
+ div#selectionContainer select{
+ width: 585px;
+ min-width: 585px;
+ }
+ </style>
+ </wicket:head>
+ <wicket:panel>
+ <div id="selectionContainer" wicket:id="selectionContainer">
+ <select wicket:id="selectedEvents" ></select>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel.html
new file mode 100644
index 0000000..e558a61
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel.html
@@ -0,0 +1,130 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style>
+ div.group{
+ width:100%;
+ }
+
+ div#check{
+ height: 25px;
+ float:left;
+ }
+
+ div#resource{
+ margin-top: 3px;
+ margin-left: 5px;
+ width: 35%;
+ height: 25px;
+ float:left;
+ }
+
+ div#accountLink{
+ margin-top: 3px;
+ width:45%;
+ height: 25px;
+ float:left
+ }
+
+ div#status{
+ margin-top: 3px;
+ height: 25px;
+ width: 5%;
+ float: left;
+ text-align: center;
+ }
+
+ div#connObject{
+ margin-top: 3px;
+ height: 25px;
+ width: 5%;
+ float: left;
+ text-align: center;
+ }
+
+ div.assignment {
+ display: inline-table;
+ width: 100%
+ }
+
+ div.assignments {
+ margin-top: 5px;
+ display: inline-table;
+ width: 100%;
+ border: 1px solid #DDDDDD;
+ color: #555555;
+ }
+ </style>
+ </wicket:head>
+ <wicket:panel>
+ <div class="assignments">
+ <div class="group">
+ <div>
+ <div id="check">
+ <input type="checkbox" wicket:id="groupselector" />
+ </div>
+
+ <div id="resource">
+ <span style="font: Verdana,Arial,sans-serif; font-weight: bold">
+ <wicket:message key="resourceheader"/>
+ </span>
+ </div>
+ <div id="accountLink">
+ <span style="font: Verdana,Arial,sans-serif; font-weight: bold">
+ <wicket:message key="accountlinkheader"/>
+ </span>
+ </div>
+ <div id="status">
+ <span style="font: Verdana,Arial,sans-serif; font-weight: bold">
+ <wicket:message key="statusheader"/>
+ </span>
+ </div>
+ <div id="connObject">
+ </div>
+ </div>
+
+ <span wicket:id="group">
+
+ <div wicket:id="resources" class="assignment">
+ <div id="check">
+ <input type="checkbox" wicket:id="check"/>
+ </div>
+
+ <div id="resource">
+ <span wicket:id="resource">[resource name]</span>
+ </div>
+ <div id="accountLink">
+ <span wicket:id="accountLink">[accountLink]</span>
+ </div>
+ <div id="status">
+ <img wicket:id="icon"/>
+ </div>
+ <div id="connObject">
+ <span wicket:id="connObject">[connObject]</span>
+ </div>
+ </div>
+ </span>
+ </div>
+
+ </div>
+
+ <div wicket:id="connObjectWin">[Show modal window for showing connector object]</div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel.properties
new file mode 100644
index 0000000..e50c7d7
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+resourceheader = Resource
+accountlinkheader = AccountLink
+statusheader = Status
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel_it.properties
new file mode 100644
index 0000000..6e3e2c4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel_it.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+resourceheader = Risorsa
+accountlinkheader = AccountLink
+statusheader = Stato
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel_pt_BR.properties
new file mode 100644
index 0000000..55ab218
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/StatusPanel_pt_BR.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+resourceheader = Recurso
+accountlinkheader = Link da Conta
+statusheader = Estatus
[28/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/fieldstyle.css
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/fieldstyle.css b/client/console/src/main/resources/META-INF/resources/css/fieldstyle.css
new file mode 100644
index 0000000..23ef109
--- /dev/null
+++ b/client/console/src/main/resources/META-INF/resources/css/fieldstyle.css
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+.drop_button{
+ vertical-align: middle;
+}
+
+.add_button{
+ vertical-align: middle;
+ margin-left: 6px;
+}
+
+.date_size{
+ width: 90px;
+}
+
+.long_dynamicsize{
+ width: 80%;
+}
+
+.medium_dynamicsize{
+ width: 45%;
+}
+
+.short_dynamicsize{
+ width: 35%;
+}
+
+.long_fixedsize{
+ width: 500px;
+}
+
+.medium_fixedsize{
+ width: 300px;
+}
+
+.short_fixedsize{
+ width: 150px;
+}
+
+.veryshort_fixedsize{
+ width: 70px;
+}
+
+.all_dynamicsize{
+ width: 100%;
+}
+
+div#formtable {
+ display: table;
+ width: 100%;
+}
+
+div#formtable > span:first-of-type {
+ display: table-row-group;
+ width: 100%;
+}
+
+div.tablerow {
+ display: inline-table;
+ padding: 5px;
+ width: 99%;
+}
+
+div.tablerow.connectorProp {
+ height:22px;
+ vertical-align: middle;
+ font-size: 12px;
+}
+
+div.tablecolumn_connPropAttr {
+ display: table-cell;
+ vertical-align: middle;
+}
+
+div.tablerow2 {
+ display: inline-table;
+ padding: 5px 0px 5px 0px;
+ width: 99%;
+}
+
+div.alt {
+ background: #eff3ea;
+}
+
+div.tablecolumn_label{
+ display: table-cell;
+ font-size: 12px;
+ vertical-align: middle;
+ font-family: Verdana,Tahoma,sans-serif;
+ width: 30%;
+}
+
+div.tablecolumn_field{
+ display: table-cell;
+ vertical-align: middle;
+ font-family: Verdana,Tahoma,sans-serif;
+ width: 70%;
+}
+
+div.tablecolumn_check{
+ display: table-cell;
+ margin-right: 5px;
+ margin-left: 2px;
+ vertical-align: middle;
+}
+
+div.tablecolumn2_label{
+ display: table-cell;
+ font-size: 12px;
+ vertical-align: middle;
+ font-family: Verdana,Tahoma,sans-serif;
+ padding-left: 5px;
+ width: 15%;
+}
+
+div.tablecolumn2_field{
+ display: table-cell;
+ vertical-align: middle;
+ font-family: Verdana,Tahoma,sans-serif;
+ width: 35%;
+}
+
+.ui-tabs .ui-tabs-panel {
+ background: none repeat scroll 0 0 #FFFFFF;
+ border-width: 0;
+ display: block;
+ overflow: auto;
+ padding: 1em 1.4em;
+}
+
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button {
+ font-family: Verdana,Arial,sans-serif;
+ font-size: 12px;
+ padding: 2px 4px;
+}
+
+.ui-widget-header {
+ border: 1px solid #aaaaaa
+ /*{borderColorHeader}*/;
+ background: #cccccc
+ /*{bgColorHeader}*/
+ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)
+ /*{bgImgUrlHeader}*/
+ 50%/*{bgHeaderXPos}*/
+ 50%/*{bgHeaderYPos}*/
+ repeat-x/*{bgHeaderRepeat}*/;
+ color: #222222/*{fcHeader}*/;
+ font-weight: bold;
+ padding: 7px 15px;
+}
+
+.ui-button {
+ display: inline-block;
+ position: relative;
+ margin-right: .1em;
+ cursor: pointer;
+ text-align: center;
+ zoom: 1;
+ overflow: visible;
+ padding: 7px 15px;
+}
+
+.ui-spinner-button {
+ cursor: default;
+ display: block;
+ font-size: 0.5em;
+ height: 50%;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ right: 0;
+ text-align: center;
+ width: 16px;
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_diagonals-thick_20_666666_40x40.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_diagonals-thick_20_666666_40x40.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_diagonals-thick_20_666666_40x40.png
new file mode 100644
index 0000000..64ece57
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_diagonals-thick_20_666666_40x40.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_flat_0_aaaaaa_40x100.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_flat_0_aaaaaa_40x100.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_flat_0_aaaaaa_40x100.png
new file mode 100644
index 0000000..fc9ef06
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_flat_0_aaaaaa_40x100.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_flat_0_aaaaaa_40x100_greennotused.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_flat_0_aaaaaa_40x100_greennotused.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_flat_0_aaaaaa_40x100_greennotused.png
new file mode 100644
index 0000000..b3d1999
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_flat_0_aaaaaa_40x100_greennotused.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_55_fbf9ee_1x400.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_55_fbf9ee_1x400.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100644
index 0000000..ad3d634
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_55_fbf9ee_1x400.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_65_ffffff_1x400.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_65_ffffff_1x400.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100644
index 0000000..42ccba2
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_65_ffffff_1x400.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_75_dadada_1x400.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_75_dadada_1x400.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_75_dadada_1x400.png
new file mode 100644
index 0000000..5a46b47
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_75_dadada_1x400.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_75_e6e6e6_1x400.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_75_e6e6e6_1x400.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_75_e6e6e6_1x400.png
new file mode 100644
index 0000000..86c2baa
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_75_e6e6e6_1x400.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_95_fef1ec_1x400.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_95_fef1ec_1x400.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_95_fef1ec_1x400.png
new file mode 100644
index 0000000..4443fdc
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_glass_95_fef1ec_1x400.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
new file mode 100644
index 0000000..5749fc4
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_highlight-soft_75_cccccc_1x100_greynotused.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_highlight-soft_75_cccccc_1x100_greynotused.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_highlight-soft_75_cccccc_1x100_greynotused.png
new file mode 100644
index 0000000..7c9fa6c
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_highlight-soft_75_cccccc_1x100_greynotused.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_highlight-soft_75_cccccc_1x100_red.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_highlight-soft_75_cccccc_1x100_red.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_highlight-soft_75_cccccc_1x100_red.png
new file mode 100644
index 0000000..4632529
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-bg_highlight-soft_75_cccccc_1x100_red.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_222222_256x240.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_222222_256x240.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_222222_256x240.png
new file mode 100644
index 0000000..ee039dc
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_222222_256x240.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_2e83ff_256x240.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_2e83ff_256x240.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_2e83ff_256x240.png
new file mode 100644
index 0000000..45e8928
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_2e83ff_256x240.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_454545_256x240.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_454545_256x240.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_454545_256x240.png
new file mode 100644
index 0000000..7ec70d1
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_454545_256x240.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_888888_256x240.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_888888_256x240.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_888888_256x240.png
new file mode 100644
index 0000000..5ba708c
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_888888_256x240.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_cd0a0a_256x240.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_cd0a0a_256x240.png b/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_cd0a0a_256x240.png
new file mode 100644
index 0000000..7930a55
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/css/images/ui-icons_cd0a0a_256x240.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/style.css
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/style.css b/client/console/src/main/resources/META-INF/resources/css/style.css
new file mode 100644
index 0000000..54d8f50
--- /dev/null
+++ b/client/console/src/main/resources/META-INF/resources/css/style.css
@@ -0,0 +1,550 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+body {
+ margin: 0px;
+ padding: 0px;
+ font-family: Verdana, Tahoma, sans-serif;
+ color: #333;
+ font-size: 62.5%;
+}
+
+/* id */
+#tabs {
+ margin: 0px 5px;
+ margin-top: 5px;
+}
+#roletabs {
+ margin: 0px 5px;
+ margin-top: 5px;
+}
+
+#tabs div {
+ /*background-color: #FFF;*/
+}
+
+#logo {
+ margin-top: 10px;
+ margin-bottom: 6px;
+}
+
+#splash {
+ background: url(../img/sf_testa.png) top repeat-x #B9CFB3;
+ width: 400px;
+ margin-left: auto;
+ margin-right: auto;
+ margin-top: 100px;
+ border: 1px solid #463;
+}
+
+#splash a {
+ color: #463;
+ text-decoration: none;
+ font-size: 14px;
+}
+
+a img {
+ border: none;
+}
+
+#splash h2 {
+ color: #FFF;
+ margin: 0px;
+ margin-top: 8px;
+ margin-bottom: 20px;
+ font-size: 14px;
+ text-align: center;
+ font-weight: normal;
+}
+
+#splash form {
+ margin: 6px auto;
+ width: 300px;
+ text-align: center;
+}
+
+#splash form label {
+ margin-right: 5px;
+ display: block;
+}
+
+#splash form label.password {
+}
+
+#splash form input {
+ margin-bottom: 15px;
+}
+
+#splash p {
+ margin: 6px 16px;
+ border-top: 1px solid #463;
+ text-align: center;
+ padding-top: 8px;
+}
+
+#splash ul {
+ height: 320px;
+ margin-left: 37px;
+ padding-left: 28px;
+ margin-top: 25px;
+}
+
+#splash ul li {
+ float: left;
+ width: 90px;
+ text-align: center;
+ list-style: none;
+ margin: 0px;
+}
+
+input[disabled] {
+ background-color: #ddd;
+ background-image: none;
+}
+
+select[disabled] {
+ background-color: #ddd;
+ background-image: none;
+}
+
+#loginFeedbackDiv {
+ width: 100%;
+}
+
+#loginFeedbackDiv ul {
+ list-style:none outside none;
+ margin:0;
+ text-align:center;
+ width: 100%;
+ height: 30px;
+ margin-left: 0px;
+ padding-left: 0px;
+}
+
+#loginFeedbackDiv ul li{
+ border:0 none;
+ padding-left: 20px;
+ padding: 1%;
+ padding-top: 2%;
+ list-style:none outside none;
+ margin:0;
+ text-align:center;
+ width: 100%;
+}
+
+#feedbackDiv {
+ height: 20px;
+ margin: 0px;
+ padding: 0px;
+}
+
+#feedbackDiv ul{
+ height: 20px !important;
+ margin: 0px;
+ padding: 0px;
+}
+
+#feedbackDiv li{
+ list-style:none outside none;
+ margin:0;
+ text-align:center;
+ width: 100%;
+}
+#feedbackDiv ul li{
+ list-style:none outside none;
+ margin:0;
+ text-align:center;
+ width: 100%;
+ color: red;
+}
+
+.feedbackPanel {
+ padding-left:20pt;
+ margin-right:20pt;
+}
+
+#navigationPane {
+ background: url(../img/sf_testa.png) top repeat-x #FFF;
+}
+
+#navigationPane a img {
+ border: none;
+}
+
+#navigationPane {
+ height: 103px;
+}
+
+#navigationPane a {
+ color: #FFF;
+ text-decoration: none;
+}
+
+#navigationPane a:hover {
+ color: #CCC;
+}
+
+#navigationPane ul {
+ clear: both;
+ padding: 0px;
+ margin: 0px;
+ margin-left: 280px;
+}
+
+#navigationPane ul li {
+ float: left;
+ width: 90px;
+ text-align: center;
+ margin: 0px;
+ color: #FFF;
+ font-size: 13px;
+ list-style: none;
+ padding: 1px;
+}
+
+#navigationPane span {
+ font-size: 13px;
+}
+
+/* MODAL-FORM */
+div#dialog-form label, div#dialog-form input { display:block; }
+div#dialog-form span.radio label, div#dialog-form span.radio input { margin-top: 4px; margin-bottom: 12px; display:inline; }
+/*div#dialog-form span.checkbox label, div#dialog-form span.checkbox input { margin-top: 4px; margin-bottom: 12px; display:inline; }*/
+div#dialog-form input.text { margin-bottom:12px; width: 95%; padding: .4em; }
+div#dialog-form select.text { margin-bottom:12px; width: auto; padding: .4em; }
+div#dialog-form fieldset { padding:0; border:0; margin-top:25px; }
+div#users-contain { width: 570px; margin-bottom: 20px;}/*width: 350px*/
+div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
+div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; }
+div#executions { margin-bottom: 0px;}/*width: 350px*/
+div#executions table { margin: 1em 0; border-collapse: collapse; width: 100%; }
+div#executions table td, div#executions table th { border: 1px solid #eee; padding: .3em 10px; }
+.ui-dialog .ui-state-error { padding: .3em; }
+.validateTips { border: 1px solid transparent; padding: 0.3em; }
+
+/* classi */
+#navigationPane .schema {
+ color: #99C;
+}
+
+#navigationPane a img:hover {
+ opacity:0.5;
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=50)";
+ filter:alpha(opacity=50)
+}
+
+#splash a img:hover {
+ opacity:0.5;
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=50)";
+ filter:alpha(opacity=50)
+}
+
+#navigationPane .users {
+ color: #9C0;
+}
+
+#navigationPane .roles {
+ color: #F90;
+}
+
+#navigationPane .resources {
+ color: #09F;
+}
+
+#navigationPane .tasks {
+ color: #FD0;
+}
+
+#navigationPane .todo {
+ color: #F3C98E;
+}
+
+#navigationPane .connectors {
+ color: #09F;
+}
+
+#navigationPane .reports {
+ color: #F66;
+}
+
+#navigationPane .configuration {
+ color: #CCC;
+}
+
+.onerowlabel {
+ float: left;
+}
+
+.onerowcheckbox {
+ margin-left: 10em;
+}
+
+div#attributes-view label {
+ display: block;
+ clear: none;
+ width: 300px;
+ margin-left: 20px;
+}
+
+div#attributes-view input {
+ display: block;
+ float: left;
+ clear: left;
+ height: 12px;
+ padding: 0;
+ margin: 0;
+}
+
+.selectedRow {
+ background-color: #eef1f1; /* alternative: LemonChiffon */
+}
+
+/* WICKET DATATABLE HEADERS */
+.headers {
+ border: 1px solid #aaaaaa;
+ background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)
+ 50% 50% repeat-x;
+}
+
+em {
+ font-size: inherit;
+ color: gray;
+}
+
+em img {
+ opacity:0.4;
+ filter:alpha(opacity=40);
+}
+
+th.action{
+ width: 140px;
+}
+
+td.action{
+ text-align: center;
+}
+
+.navigatorLabel {
+ float: left;
+}
+
+.navigator {
+ text-align: right;
+}
+
+.role-tree {
+ width: 30%;
+ display: block;
+ float: left;
+}
+
+.roleTable {
+ line-height: 1.5em;
+}
+
+.tree-folder-other {
+ padding-top: 2px;
+ display: block;
+ height: 18px;
+}
+
+.tree-folder-open {
+ display: block;
+ height: 18px;
+}
+
+#versionMP {
+ text-align: justify;
+ color: #463;
+ background: url(../img/sf_testa.png) top repeat-x #B9CFB3;
+ border: 1px solid #463;
+ padding: 5px;
+}
+
+#versionMP a {
+ color: white;
+ text-decoration: none;
+}
+
+#versionMP a:hover {
+ color: #463;
+ text-decoration: none;
+}
+
+a.tooltips {
+ position: relative;
+ display: inline;
+ text-decoration: none;
+}
+
+a.tooltips span {
+ position: absolute;
+ width:19em;
+ color: #000000;
+ background: whitesmoke;
+ visibility: hidden;
+ border-radius: 0px;
+ padding: 3px;
+}
+
+a.tooltips span:after {
+ position: absolute;
+ top: 50%;
+ left: 100%;
+ margin-top: -8px;
+ width: 0;
+ height: 0;
+}
+
+a.tooltips span {
+ visibility: visible;
+ opacity: none;
+ right: 100%;
+ top: 50%;
+ margin-right: 4px;
+ margin-top: -11px;
+ border: 1px solid black;
+ z-index: 1000000;
+}
+
+a.tooltips span a {
+ color: #463;
+ text-decoration: none;
+}
+
+.tree-junction-expanded {
+ display: none;
+}
+
+/* Style for autocomplete field */
+div.wicket-aa {
+ font-family: "Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana;
+ font-size: 12px;
+ background-color: white;
+ border-width: 1px;
+ border-color: #cccccc;
+ border-style: solid;
+ padding: 2px;
+ margin: 1px 0 0 0;
+ text-align:left;
+}
+div.wicket-aa ul {
+ list-style:none;
+ padding: 2px;
+ margin:0;
+}
+div.wicket-aa ul li.selected {
+ background-color: #FFFF00;
+ padding: 2px;
+ margin:0;
+}
+
+.notificationpanel {
+ margin: 0px;
+ padding: 0px;
+ border-radius: 5px;
+}
+
+.notificationpanel_bottom_left {
+ bottom: 100px;
+ left: 30px;
+}
+
+.notificationpanel_bottom_detail_form {
+ top: 540px;
+ right: 30px;
+}
+
+.notificationpanel_bottom_right {
+ bottom: 100px;
+ right: 30px;
+}
+
+.notificationpanel_top_right {
+ top: 15px;
+ right: 30px;
+}
+
+/* notification panel info style */
+.notificationpanel_border_200 {
+ color: green;
+ margin: 0px;
+ background:url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") repeat-x scroll 50% 50% #CCCCCC;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border: 1px solid gray;
+ box-shadow: 0px 0px 5px gray;
+}
+
+.notificationpanel_row_INFO {
+ list-style-type: none;
+ color: green;
+}
+
+.notificationpanel_row_INFO span {
+ list-style-type: none;
+ color: green;
+ background: url("../img/ok.png") no-repeat left;
+ border:0 none;
+ padding-left: 20px;
+}
+
+/* notification panel warning style */
+.notificationpanel_border_300 {
+ border: 1px solid orangered;
+ box-shadow: 0px 0px 5px gray;
+}
+
+.notificationpanel_row_WARNING {
+ color: orangered;
+ list-style-type: none;
+ border:0 none;
+ padding-left: 20px;
+}
+
+/* notification panel error style */
+.notificationpanel_border_400 {
+ color: red;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border: 1px solid gray;
+ box-shadow: 0px 0px 5px gray;
+ border-color: red;
+ background-image: -moz-linear-gradient(top, #FF8585 0%, #E60008 100%);
+ background-image: -webkit-linear-gradient(top, #FF8585 0%, #E60008 100%);
+ background-image: -o-linear-gradient(top, #FF8585 0%, #E60008 100%);
+ background-image: -ms-linear-gradient(top, #FF8585 0%, #E60008 100%);
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #FF8585), color-stop(1, #E60008));
+ font-weight: bold;
+}
+
+.notificationpanel_row_ERROR {
+ list-style-type: none;
+ color: black;
+}
+
+.notificationpanel_row_ERROR span {
+ border:0 none;
+}
+pre {
+ white-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */
+ white-space: -pre-wrap; /* Opera */
+ white-space: -o-pre-wrap; /* Opera */
+ white-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */
+ word-wrap: break-word; /* IE 5.5+ */
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/assign-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/assign-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/assign-icon.png
new file mode 100644
index 0000000..f9f2a33
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/assign-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/both-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/both-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/both-icon.png
new file mode 100644
index 0000000..0f98eec
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/both-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/bulk.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/bulk.png b/client/console/src/main/resources/META-INF/resources/img/actions/bulk.png
new file mode 100644
index 0000000..ea6d145
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/bulk.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/claim.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/claim.png b/client/console/src/main/resources/META-INF/resources/img/actions/claim.png
new file mode 100644
index 0000000..79332c0
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/claim.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/create.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/create.png b/client/console/src/main/resources/META-INF/resources/img/actions/create.png
new file mode 100644
index 0000000..3f8faf1
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/create.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/delete.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/delete.png b/client/console/src/main/resources/META-INF/resources/img/actions/delete.png
new file mode 100644
index 0000000..1207d8d
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/delete.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/deprovision-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/deprovision-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/deprovision-icon.png
new file mode 100644
index 0000000..4bc2f4e
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/deprovision-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/dryrun.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/dryrun.png b/client/console/src/main/resources/META-INF/resources/img/actions/dryrun.png
new file mode 100644
index 0000000..910b148
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/dryrun.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/edit.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/edit.png b/client/console/src/main/resources/META-INF/resources/img/actions/edit.png
new file mode 100644
index 0000000..80e00db
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/edit.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/enable.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/enable.png b/client/console/src/main/resources/META-INF/resources/img/actions/enable.png
new file mode 100644
index 0000000..39ba0ca
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/enable.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/execute.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/execute.png b/client/console/src/main/resources/META-INF/resources/img/actions/execute.png
new file mode 100644
index 0000000..443c719
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/execute.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/export.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/export.png b/client/console/src/main/resources/META-INF/resources/img/actions/export.png
new file mode 100644
index 0000000..038583b
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/export.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/link-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/link-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/link-icon.png
new file mode 100644
index 0000000..8c166af
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/link-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/manage-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/manage-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/manage-icon.png
new file mode 100644
index 0000000..2e8e190
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/manage-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/none-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/none-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/none-icon.png
new file mode 100644
index 0000000..cc49adb
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/none-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/propagation-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/propagation-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/propagation-icon.png
new file mode 100644
index 0000000..d7fa5e9
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/propagation-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/provision-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/provision-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/provision-icon.png
new file mode 100644
index 0000000..3f8faf1
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/provision-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/reactivate.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/reactivate.png b/client/console/src/main/resources/META-INF/resources/img/actions/reactivate.png
new file mode 100644
index 0000000..50503e2
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/reactivate.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/reload.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/reload.png b/client/console/src/main/resources/META-INF/resources/img/actions/reload.png
new file mode 100644
index 0000000..bbf878e
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/reload.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/reset.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/reset.png b/client/console/src/main/resources/META-INF/resources/img/actions/reset.png
new file mode 100644
index 0000000..bbf878e
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/reset.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/resources-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/resources-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/resources-icon.png
new file mode 100644
index 0000000..6240ba9
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/resources-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/roles-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/roles-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/roles-icon.png
new file mode 100644
index 0000000..9669486
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/roles-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/search.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/search.png b/client/console/src/main/resources/META-INF/resources/img/actions/search.png
new file mode 100644
index 0000000..3ac297e
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/search.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/select.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/select.png b/client/console/src/main/resources/META-INF/resources/img/actions/select.png
new file mode 100644
index 0000000..f2ea103
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/select.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/settings-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/settings-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/settings-icon.png
new file mode 100644
index 0000000..1da7e05
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/settings-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/suspend.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/suspend.png b/client/console/src/main/resources/META-INF/resources/img/actions/suspend.png
new file mode 100644
index 0000000..bd5f0bd
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/suspend.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/synchronization-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/synchronization-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/synchronization-icon.png
new file mode 100644
index 0000000..394b907
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/synchronization-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/unassign-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/unassign-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/unassign-icon.png
new file mode 100644
index 0000000..860dc49
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/unassign-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/unlink-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/unlink-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/unlink-icon.png
new file mode 100644
index 0000000..86700a5
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/unlink-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/user_template.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/user_template.png b/client/console/src/main/resources/META-INF/resources/img/actions/user_template.png
new file mode 100644
index 0000000..6db6de8
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/user_template.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/actions/users-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/actions/users-icon.png b/client/console/src/main/resources/META-INF/resources/img/actions/users-icon.png
new file mode 100644
index 0000000..cfab465
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/actions/users-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/add.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/add.png b/client/console/src/main/resources/META-INF/resources/img/add.png
new file mode 100644
index 0000000..043aba8
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/add.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/addAll.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/addAll.png b/client/console/src/main/resources/META-INF/resources/img/addAll.png
new file mode 100644
index 0000000..86633fc
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/addAll.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/busy.gif
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/busy.gif b/client/console/src/main/resources/META-INF/resources/img/busy.gif
new file mode 100644
index 0000000..e77264f
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/busy.gif differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/db_export.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/db_export.png b/client/console/src/main/resources/META-INF/resources/img/db_export.png
new file mode 100644
index 0000000..413cb06
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/db_export.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/disable.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/disable.png b/client/console/src/main/resources/META-INF/resources/img/disable.png
new file mode 100644
index 0000000..26fbe85
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/disable.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/down-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/down-icon.png b/client/console/src/main/resources/META-INF/resources/img/down-icon.png
new file mode 100644
index 0000000..6f818ee
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/down-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/favicon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/favicon.png b/client/console/src/main/resources/META-INF/resources/img/favicon.png
new file mode 100644
index 0000000..aa2f3e2
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/favicon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/file-download.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/file-download.png b/client/console/src/main/resources/META-INF/resources/img/file-download.png
new file mode 100644
index 0000000..ceae906
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/file-download.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/file-upload.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/file-upload.png b/client/console/src/main/resources/META-INF/resources/img/file-upload.png
new file mode 100644
index 0000000..d4a399e
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/file-upload.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/help.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/help.png b/client/console/src/main/resources/META-INF/resources/img/help.png
new file mode 100644
index 0000000..560064e
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/help.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/info.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/info.png b/client/console/src/main/resources/META-INF/resources/img/info.png
new file mode 100644
index 0000000..f1a4832
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/info.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/left-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/left-icon.png b/client/console/src/main/resources/META-INF/resources/img/left-icon.png
new file mode 100644
index 0000000..03b215c
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/left-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/loading.gif
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/loading.gif b/client/console/src/main/resources/META-INF/resources/img/loading.gif
new file mode 100644
index 0000000..85b99d4
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/loading.gif differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/logo.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/logo.png b/client/console/src/main/resources/META-INF/resources/img/logo.png
new file mode 100644
index 0000000..f05105e
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/logo.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/configuration.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/configuration.png b/client/console/src/main/resources/META-INF/resources/img/menu/configuration.png
new file mode 100644
index 0000000..7d4bb91
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/configuration.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/connectors.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/connectors.png b/client/console/src/main/resources/META-INF/resources/img/menu/connectors.png
new file mode 100644
index 0000000..8ae8705
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/connectors.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/logout.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/logout.png b/client/console/src/main/resources/META-INF/resources/img/menu/logout.png
new file mode 100644
index 0000000..e8ad795
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/logout.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/notsel/configuration.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/notsel/configuration.png b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/configuration.png
new file mode 100644
index 0000000..2c3bb8e
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/configuration.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/notsel/connectors.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/notsel/connectors.png b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/connectors.png
new file mode 100644
index 0000000..98394a9
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/connectors.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/notsel/logout.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/notsel/logout.png b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/logout.png
new file mode 100644
index 0000000..ffe0729
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/logout.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/notsel/reports.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/notsel/reports.png b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/reports.png
new file mode 100644
index 0000000..596ff39
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/reports.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/notsel/resources.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/notsel/resources.png b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/resources.png
new file mode 100644
index 0000000..98394a9
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/resources.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/notsel/roles.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/notsel/roles.png b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/roles.png
new file mode 100644
index 0000000..9b64b4b
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/roles.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/notsel/schema.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/notsel/schema.png b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/schema.png
new file mode 100644
index 0000000..ee1ad4c
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/schema.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/notsel/sf_body.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/notsel/sf_body.png b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/sf_body.png
new file mode 100644
index 0000000..0e3bc4c
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/sf_body.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/notsel/tasks.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/notsel/tasks.png b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/tasks.png
new file mode 100644
index 0000000..08cde6d
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/tasks.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/notsel/todo.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/notsel/todo.png b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/todo.png
new file mode 100644
index 0000000..26a10e3
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/todo.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/notsel/users.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/notsel/users.png b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/users.png
new file mode 100644
index 0000000..97bf71b
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/notsel/users.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/reports.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/reports.png b/client/console/src/main/resources/META-INF/resources/img/menu/reports.png
new file mode 100644
index 0000000..847fd2b
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/reports.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/resources.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/resources.png b/client/console/src/main/resources/META-INF/resources/img/menu/resources.png
new file mode 100644
index 0000000..8ae8705
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/resources.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/roles.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/roles.png b/client/console/src/main/resources/META-INF/resources/img/menu/roles.png
new file mode 100644
index 0000000..fba8be7
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/roles.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/schema.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/schema.png b/client/console/src/main/resources/META-INF/resources/img/menu/schema.png
new file mode 100644
index 0000000..378a83c
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/schema.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/tasks.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/tasks.png b/client/console/src/main/resources/META-INF/resources/img/menu/tasks.png
new file mode 100644
index 0000000..05bdc11
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/tasks.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/todo.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/todo.png b/client/console/src/main/resources/META-INF/resources/img/menu/todo.png
new file mode 100644
index 0000000..2fb374b
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/todo.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/menu/users.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/menu/users.png b/client/console/src/main/resources/META-INF/resources/img/menu/users.png
new file mode 100644
index 0000000..64264fa
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/menu/users.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/minus-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/minus-icon.png b/client/console/src/main/resources/META-INF/resources/img/minus-icon.png
new file mode 100644
index 0000000..4bc2f4e
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/minus-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/modeler.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/modeler.png b/client/console/src/main/resources/META-INF/resources/img/modeler.png
new file mode 100644
index 0000000..d33c4ef
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/modeler.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/moveDown.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/moveDown.png b/client/console/src/main/resources/META-INF/resources/img/moveDown.png
new file mode 100644
index 0000000..d6ce523
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/moveDown.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/moveUp.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/moveUp.png b/client/console/src/main/resources/META-INF/resources/img/moveUp.png
new file mode 100644
index 0000000..d9b2790
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/moveUp.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/ok.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/ok.png b/client/console/src/main/resources/META-INF/resources/img/ok.png
new file mode 100644
index 0000000..bc9d2f5
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/ok.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/ping.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/ping.png b/client/console/src/main/resources/META-INF/resources/img/ping.png
new file mode 100644
index 0000000..8ad053d
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/ping.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/plus-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/plus-icon.png b/client/console/src/main/resources/META-INF/resources/img/plus-icon.png
new file mode 100644
index 0000000..3f8faf1
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/plus-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/reload_30.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/reload_30.png b/client/console/src/main/resources/META-INF/resources/img/reload_30.png
new file mode 100644
index 0000000..f9b1e98
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/reload_30.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/remove.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/remove.png b/client/console/src/main/resources/META-INF/resources/img/remove.png
new file mode 100644
index 0000000..de5a5cf
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/remove.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/removeAll.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/removeAll.png b/client/console/src/main/resources/META-INF/resources/img/removeAll.png
new file mode 100644
index 0000000..f293962
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/removeAll.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/right-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/right-icon.png b/client/console/src/main/resources/META-INF/resources/img/right-icon.png
new file mode 100644
index 0000000..2cf0882
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/right-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/search.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/search.png b/client/console/src/main/resources/META-INF/resources/img/search.png
new file mode 100644
index 0000000..640c7e8
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/search.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/sf_testa.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/sf_testa.png b/client/console/src/main/resources/META-INF/resources/img/sf_testa.png
new file mode 100644
index 0000000..6539dbd
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/sf_testa.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/statuses/active.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/statuses/active.png b/client/console/src/main/resources/META-INF/resources/img/statuses/active.png
new file mode 100644
index 0000000..79332c0
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/statuses/active.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/statuses/inactive.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/statuses/inactive.png b/client/console/src/main/resources/META-INF/resources/img/statuses/inactive.png
new file mode 100644
index 0000000..68975bd
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/statuses/inactive.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/statuses/objectnotfound.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/statuses/objectnotfound.png b/client/console/src/main/resources/META-INF/resources/img/statuses/objectnotfound.png
new file mode 100644
index 0000000..a0a2933
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/statuses/objectnotfound.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/statuses/undefined.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/statuses/undefined.png b/client/console/src/main/resources/META-INF/resources/img/statuses/undefined.png
new file mode 100644
index 0000000..97188ba
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/statuses/undefined.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/success.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/success.png b/client/console/src/main/resources/META-INF/resources/img/success.png
new file mode 100644
index 0000000..e4b1df7
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/success.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/tab ok.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/tab ok.png b/client/console/src/main/resources/META-INF/resources/img/tab ok.png
new file mode 100644
index 0000000..8b6d0ee
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/tab ok.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/tab old.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/tab old.png b/client/console/src/main/resources/META-INF/resources/img/tab old.png
new file mode 100644
index 0000000..3d5f156
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/tab old.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/tab.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/tab.png b/client/console/src/main/resources/META-INF/resources/img/tab.png
new file mode 100644
index 0000000..2ee49dd
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/tab.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/up-icon.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/up-icon.png b/client/console/src/main/resources/META-INF/resources/img/up-icon.png
new file mode 100644
index 0000000..1a4dbdf
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/up-icon.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/warning.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/warning.png b/client/console/src/main/resources/META-INF/resources/img/warning.png
new file mode 100644
index 0000000..c98c1fd
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/warning.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/img/xml.png
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/img/xml.png b/client/console/src/main/resources/META-INF/resources/img/xml.png
new file mode 100644
index 0000000..110fdc4
Binary files /dev/null and b/client/console/src/main/resources/META-INF/resources/img/xml.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/web-fragment.xml
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/web-fragment.xml b/client/console/src/main/resources/META-INF/web-fragment.xml
new file mode 100644
index 0000000..f19df05
--- /dev/null
+++ b/client/console/src/main/resources/META-INF/web-fragment.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<web-fragment xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/web-fragment_3_1.xsd"
+ id="${pom.artifactId}" version="3.1">
+
+ <display-name>Apache Syncope ${syncope.version} Console</display-name>
+
+ <context-param>
+ <param-name>configuration</param-name>
+ <param-value>deployment</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>classpath:consoleContext.xml</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
+ </listener>
+
+ <filter>
+ <filter-name>SyncopeConsole</filter-name>
+ <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+ <init-param>
+ <param-name>filterMappingUrlPattern</param-name>
+ <param-value>/*</param-value>
+ </init-param>
+ <init-param>
+ <param-name>applicationFactoryClassName</param-name>
+ <param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value>
+ </init-param>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>SyncopeConsole</filter-name>
+ <url-pattern>/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+
+ <!-- SESSION TIMEOUT (MINUTES)-->
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+
+</web-fragment>
[11/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
new file mode 100644
index 0000000..3046a5d
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.model.wadl.Description;
+import org.apache.cxf.jaxrs.model.wadl.Descriptions;
+import org.apache.cxf.jaxrs.model.wadl.DocTarget;
+import org.apache.syncope.common.lib.mod.UserMod;
+import org.apache.syncope.common.lib.to.UserTO;
+
+/**
+ * REST operations for user self-management.
+ */
+@Path("users/self")
+public interface UserSelfService extends JAXRSService {
+
+ /**
+ * Returns the user making the service call.
+ *
+ * @return calling user data
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ UserTO read();
+
+ /**
+ * Self-registration for new user.
+ *
+ * @param userTO user to be created
+ * @param storePassword whether password shall be stored internally
+ * @return <tt>Response</tt> object featuring <tt>Location</tt> header of self-registered user as well as the user
+ * itself - {@link UserTO} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring <tt>Location</tt> header of self-registered user as well "
+ + "as the user itself - {@link UserTO} as <tt>Entity</tt>")
+ })
+ @POST
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response create(@NotNull UserTO userTO,
+ @DefaultValue("true") @QueryParam("storePassword") boolean storePassword);
+
+ /**
+ * Self-updates user.
+ *
+ * @param userKey id of user to be updated
+ * @param userMod modification to be applied to user matching the provided userKey
+ * @return <tt>Response</tt> object featuring the updated user - {@link UserTO} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring the updated user - <tt>UserTO</tt> as <tt>Entity</tt>")
+ })
+ @POST
+ @Path("{userKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response update(@NotNull @PathParam("userKey") Long userKey, @NotNull UserMod userMod);
+
+ /**
+ * Self-deletes user.
+ *
+ * @return <tt>Response</tt> object featuring the deleted user - {@link UserTO} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring the deleted user - <tt>UserTO</tt> as <tt>Entity</tt>")
+ })
+ @DELETE
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response delete();
+
+ /**
+ * Provides answer for the security question configured for user matching the given username, if any.
+ * If provided anwser matches the one stored for that user, a password reset token is internally generated,
+ * otherwise an error is returned.
+ *
+ * @param username username for which the security answer is provided
+ * @param securityAnswer actual answer text
+ */
+ @POST
+ @Path("requestPasswordReset")
+ void requestPasswordReset(@NotNull @QueryParam("username") String username, String securityAnswer);
+
+ /**
+ * Reset the password value for the user matching the provided token, if available and still valid.
+ * If the token actually matches one of users, and if it is still valid at the time of submission, the matching
+ * user's password value is set as provided. The new password value will need anyway to comply with all relevant
+ * password policies.
+ *
+ * @param token password reset token
+ * @param password new password to be set
+ */
+ @POST
+ @Path("confirmPasswordReset")
+ void confirmPasswordReset(@NotNull @QueryParam("token") String token, String password);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
new file mode 100644
index 0000000..ea1d197
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
@@ -0,0 +1,321 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import java.util.List;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.OPTIONS;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.model.wadl.Description;
+import org.apache.cxf.jaxrs.model.wadl.Descriptions;
+import org.apache.cxf.jaxrs.model.wadl.DocTarget;
+import org.apache.syncope.common.lib.mod.ResourceAssociationMod;
+import org.apache.syncope.common.lib.mod.StatusMod;
+import org.apache.syncope.common.lib.mod.UserMod;
+import org.apache.syncope.common.lib.to.BulkAction;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.PagedResult;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
+import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
+import org.apache.syncope.common.lib.wrap.ResourceName;
+
+/**
+ * REST operations for users.
+ */
+@Path("users")
+public interface UserService extends JAXRSService {
+
+ /**
+ * Gives the username for the provided user key.
+ *
+ * @param userKey user key
+ * @return <tt>Response</tt> object featuring HTTP header with username matching the given userKey
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring HTTP header with username matching the given userKey")
+ })
+ @OPTIONS
+ @Path("{userKey}/username")
+ Response getUsername(@NotNull @PathParam("userKey") Long userKey);
+
+ /**
+ * Gives the user key for the provided username.
+ *
+ * @param username username
+ * @return <tt>Response</tt> object featuring HTTP header with userKey matching the given username
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring HTTP header with userKey matching the given username")
+ })
+ @OPTIONS
+ @Path("{username}/userKey")
+ Response getUserId(@NotNull @PathParam("username") String username);
+
+ /**
+ * Reads the user matching the provided userKey.
+ *
+ * @param userKey id of user to be read
+ * @return User matching the provided userKey
+ */
+ @GET
+ @Path("{userKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ UserTO read(@NotNull @PathParam("userKey") Long userKey);
+
+ /**
+ * Returns a paged list of existing users.
+ *
+ * @return paged list of all existing users
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<UserTO> list();
+
+ /**
+ * Returns a paged list of existing users.
+ *
+ * @param orderBy list of ordering clauses, separated by comma
+ * @return paged list of all existing users
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<UserTO> list(@QueryParam(PARAM_ORDERBY) String orderBy);
+
+ /**
+ * Returns a paged list of existing users matching page/size conditions.
+ *
+ * @param page result page number
+ * @param size number of entries per page
+ * @return paged list of existing users matching page/size conditions
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<UserTO> list(
+ @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
+ @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
+
+ /**
+ * Returns a paged list of existing users matching page/size conditions.
+ *
+ * @param page result page number
+ * @param size number of entries per page
+ * @param orderBy list of ordering clauses, separated by comma
+ * @return paged list of existing users matching page/size conditions
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<UserTO> list(
+ @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
+ @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
+ @QueryParam(PARAM_ORDERBY) String orderBy);
+
+ /**
+ * Returns a paged list of users matching the provided FIQL search condition.
+ *
+ * @param fiql FIQL search expression
+ * @return paged list of users matching the provided FIQL search condition
+ */
+ @GET
+ @Path("search")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<UserTO> search(@NotNull @QueryParam(PARAM_FIQL) String fiql);
+
+ /**
+ * Returns a paged list of users matching the provided FIQL search condition.
+ *
+ * @param fiql FIQL search expression
+ * @param orderBy list of ordering clauses, separated by comma
+ * @return paged list of users matching the provided FIQL search condition
+ */
+ @GET
+ @Path("search")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<UserTO> search(@NotNull @QueryParam(PARAM_FIQL) String fiql, @QueryParam(PARAM_ORDERBY) String orderBy);
+
+ /**
+ * Returns a paged list of users matching the provided FIQL search condition.
+ *
+ * @param fiql FIQL search expression
+ * @param page result page number
+ * @param size number of entries per page
+ * @return paged list of users matching the provided FIQL search condition
+ */
+ @GET
+ @Path("search")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<UserTO> search(@QueryParam(PARAM_FIQL) String fiql,
+ @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
+ @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
+
+ /**
+ * Returns a paged list of users matching the provided FIQL search condition.
+ *
+ * @param fiql FIQL search expression
+ * @param page result page number
+ * @param size number of entries per page
+ * @param orderBy list of ordering clauses, separated by comma
+ * @return paged list of users matching the provided FIQL search condition
+ */
+ @GET
+ @Path("search")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<UserTO> search(@QueryParam(PARAM_FIQL) String fiql,
+ @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
+ @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
+ @QueryParam(PARAM_ORDERBY) String orderBy);
+
+ /**
+ * Creates a new user.
+ *
+ * @param userTO user to be created
+ * @param storePassword whether password shall be stored internally
+ * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created user as well as the user itself
+ * enriched with propagation status information - {@link UserTO} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring <tt>Location</tt> header of created user as well as the "
+ + "user itself enriched with propagation status information - <tt>UserTO</tt> as <tt>Entity</tt>")
+ })
+ @POST
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response create(@NotNull UserTO userTO,
+ @DefaultValue("true") @QueryParam("storePassword") boolean storePassword);
+
+ /**
+ * Updates user matching the provided userKey.
+ *
+ * @param userKey id of user to be updated
+ * @param userMod modification to be applied to user matching the provided userKey
+ * @return <tt>Response</tt> object featuring the updated user enriched with propagation status information
+ * - {@link UserTO} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring the updated user enriched with propagation status information - "
+ + "<tt>UserTO</tt> as <tt>Entity</tt>")
+ })
+ @POST
+ @Path("{userKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response update(@NotNull @PathParam("userKey") Long userKey, @NotNull UserMod userMod);
+
+ /**
+ * Performs a status update on user matching provided userKey.
+ *
+ * @param userKey id of user to be subjected to status update
+ * @param statusMod status update details
+ * @return <tt>Response</tt> object featuring the updated user enriched with propagation status information
+ * - {@link UserTO} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring the updated user enriched with propagation status information - "
+ + "<tt>UserTO</tt> as <tt>Entity</tt>")
+ })
+ @POST
+ @Path("{userKey}/status")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response status(@NotNull @PathParam("userKey") Long userKey, @NotNull StatusMod statusMod);
+
+ /**
+ * Deletes user matching provided userKey.
+ *
+ * @param userKey id of user to be deleted
+ * @return <tt>Response</tt> object featuring the deleted user enriched with propagation status information
+ * - {@link UserTO} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring the deleted user enriched with propagation status information - "
+ + "<tt>UserTO</tt> as <tt>Entity</tt>")
+ })
+ @DELETE
+ @Path("{userKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response delete(@NotNull @PathParam("userKey") Long userKey);
+
+ /**
+ * Executes resource-related operations on given user.
+ *
+ * @param userKey user key
+ * @param type resource de-association action type
+ * @param resourceNames external resources to be used for propagation-related operations
+ * @return <tt>Response</tt> object featuring {@link BulkActionResult} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
+ })
+ @POST
+ @Path("{userKey}/bulkDeassociation/{type}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response bulkDeassociation(@NotNull @PathParam("userKey") Long userKey,
+ @NotNull @PathParam("type") ResourceDeassociationActionType type,
+ @NotNull List<ResourceName> resourceNames);
+
+ /**
+ * Executes resource-related operations on given user.
+ *
+ * @param userKey user key.
+ * @param type resource association action type
+ * @param associationMod external resources to be used for propagation-related operations
+ * @return <tt>Response</tt> object featuring {@link BulkActionResult} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE, value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
+ })
+ @POST
+ @Path("{userKey}/bulkAssociation/{type}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response bulkAssociation(@NotNull @PathParam("userKey") Long userKey,
+ @NotNull @PathParam("type") ResourceAssociationActionType type,
+ @NotNull ResourceAssociationMod associationMod);
+
+ /**
+ * Executes the provided bulk action.
+ *
+ * @param bulkAction list of user keys against which the bulk action will be performed.
+ * @return Bulk action result
+ */
+ @POST
+ @Path("bulk")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ BulkActionResult bulk(@NotNull BulkAction bulkAction);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
new file mode 100644
index 0000000..256317d
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import java.util.List;
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.to.WorkflowFormTO;
+
+/**
+ * REST operations related to user workflow.
+ */
+@Path("userworkflow")
+public interface UserWorkflowService extends JAXRSService {
+
+ /**
+ * Returns a list of all available workflow forms.
+ *
+ * @return list of all available workflow forms
+ */
+ @GET
+ @Path("forms")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<WorkflowFormTO> getForms();
+
+ /**
+ * Returns a list of all available workflow forms with matching name, for the given user key.
+ *
+ * @param userKey user key
+ * @param name form name
+ * @return list of all available workflow forms with matching name, fir the given user key.
+ */
+ @GET
+ @Path("forms/{userKey}/{name}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<WorkflowFormTO> getFormsByName(
+ @NotNull @PathParam("userKey") final Long userKey, @NotNull @PathParam("name") final String name);
+
+ /**
+ * Returns a list of available forms for the given user key.
+ *
+ * @param userKey user key
+ * @return list of available forms for the given user key
+ */
+ @GET
+ @Path("forms/{userKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ WorkflowFormTO getFormForUser(@NotNull @PathParam("userKey") Long userKey);
+
+ /**
+ * Claims the form for the given task id.
+ *
+ * @param taskId workflow task id
+ * @return the workflow form for the given task id
+ */
+ @POST
+ @Path("forms/{taskId}/claim")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ WorkflowFormTO claimForm(@NotNull @PathParam("taskId") String taskId);
+
+ /**
+ * Submits a workflow form.
+ *
+ * @param form workflow form.
+ * @return updated user
+ */
+ @POST
+ @Path("forms")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ UserTO submitForm(@NotNull WorkflowFormTO form);
+
+ /**
+ * Executes workflow task for matching id.
+ *
+ * @param taskId workflow task id
+ * @param userTO argument to be passed to workflow task
+ * @return updated user
+ */
+ @POST
+ @Path("tasks/{taskId}/execute")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ UserTO executeTask(@NotNull @PathParam("taskId") String taskId, @NotNull UserTO userTO);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
new file mode 100644
index 0000000..92aa86b
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.rest.api.RESTHeaders;
+
+/**
+ * REST operations for workflow definition management.
+ */
+@Path("workflows/{kind}")
+public interface WorkflowService extends JAXRSService {
+
+ /**
+ * Exports workflow definition for matching kind.
+ *
+ * @param kind user or role
+ * @return workflow definition for matching kind
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response exportDefinition(@NotNull @PathParam("kind") SubjectType kind);
+
+ /**
+ * Exports workflow diagram representation.
+ *
+ * @param kind user or role
+ * @return workflow diagram representation
+ */
+ @GET
+ @Path("diagram.png")
+ @Produces({ RESTHeaders.MEDIATYPE_IMAGE_PNG })
+ Response exportDiagram(@NotNull @PathParam("kind") SubjectType kind);
+
+ /**
+ * Imports workflow definition for matching kind.
+ *
+ * @param kind user or role
+ * @param definition workflow definition for matching kind
+ */
+ @PUT
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ void importDefinition(@NotNull @PathParam("kind") SubjectType kind, @NotNull String definition);
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/AbstractBaseBean.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/AbstractBaseBean.java b/common/src/main/java/org/apache/syncope/common/AbstractBaseBean.java
deleted file mode 100644
index 1c870a1..0000000
--- a/common/src/main/java/org/apache/syncope/common/AbstractBaseBean.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common;
-
-import java.io.Serializable;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import org.apache.syncope.common.to.AbstractTaskTO;
-import org.apache.syncope.common.to.ReportTO;
-import org.apache.syncope.common.to.RoleTO;
-import org.apache.syncope.common.to.UserTO;
-
-@XmlType
-// Reporting here only classes used via PagedResult
-@XmlSeeAlso({ AbstractTaskTO.class, ReportTO.class, RoleTO.class, UserTO.class })
-public abstract class AbstractBaseBean implements Serializable {
-
- private static final long serialVersionUID = 3119542005279892164L;
-
- @Override
- public boolean equals(final Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
- }
-
- @Override
- public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
- }
-
- @Override
- public String toString() {
- return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/SyncopeClientCompositeException.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/SyncopeClientCompositeException.java b/common/src/main/java/org/apache/syncope/common/SyncopeClientCompositeException.java
deleted file mode 100644
index 70f1bee..0000000
--- a/common/src/main/java/org/apache/syncope/common/SyncopeClientCompositeException.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import org.apache.syncope.common.types.ClientExceptionType;
-
-public class SyncopeClientCompositeException extends SyncopeClientException {
-
- private static final long serialVersionUID = 7882118041134372129L;
-
- private final Set<SyncopeClientException> exceptions = new HashSet<SyncopeClientException>();
-
- protected SyncopeClientCompositeException() {
- super(ClientExceptionType.Composite);
- }
-
- public boolean hasExceptions() {
- return !exceptions.isEmpty();
- }
-
- public boolean hasException(final ClientExceptionType exceptionType) {
- return getException(exceptionType) != null;
- }
-
- public SyncopeClientException getException(final ClientExceptionType exceptionType) {
- boolean found = false;
- SyncopeClientException syncopeClientException = null;
- for (Iterator<SyncopeClientException> itor = exceptions.iterator(); itor.hasNext() && !found;) {
- syncopeClientException = itor.next();
- if (syncopeClientException.getType().equals(exceptionType)) {
- found = true;
- }
- }
-
- return found
- ? syncopeClientException
- : null;
- }
-
- public Set<SyncopeClientException> getExceptions() {
- return exceptions;
- }
-
- public boolean addException(final SyncopeClientException exception) {
- if (exception.getType() == null) {
- throw new IllegalArgumentException(exception + " does not have the right "
- + ClientExceptionType.class.getName() + " set");
- }
-
- return exceptions.add(exception);
- }
-
- @Override
- public String getMessage() {
- StringBuilder message = new StringBuilder();
-
- message.append("{");
- Iterator<SyncopeClientException> iter = getExceptions().iterator();
- while (iter.hasNext()) {
- SyncopeClientException e = iter.next();
- message.append("[");
- message.append(e.getMessage());
- message.append("]");
- if (iter.hasNext()) {
- message.append(", ");
- }
- }
- message.append("}");
-
- return message.toString();
- }
-
- @Override
- public String getLocalizedMessage() {
- return getMessage();
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/SyncopeClientException.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/SyncopeClientException.java b/common/src/main/java/org/apache/syncope/common/SyncopeClientException.java
deleted file mode 100644
index a003af7..0000000
--- a/common/src/main/java/org/apache/syncope/common/SyncopeClientException.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.syncope.common.types.ClientExceptionType;
-
-public class SyncopeClientException extends RuntimeException {
-
- private static final long serialVersionUID = 3380920886511913475L;
-
- private ClientExceptionType type;
-
- private final List<String> elements = new ArrayList<String>();
-
- public static SyncopeClientException build(final ClientExceptionType type) {
- if (type == ClientExceptionType.Composite) {
- throw new IllegalArgumentException("Composite exceptions must be obtained via buildComposite()");
- }
- return new SyncopeClientException(type);
- }
-
- public static SyncopeClientCompositeException buildComposite() {
- return new SyncopeClientCompositeException();
- }
-
- protected SyncopeClientException(final ClientExceptionType type) {
- super();
- setType(type);
- }
-
- public boolean isComposite() {
- return getType() == ClientExceptionType.Composite;
- }
-
- public SyncopeClientCompositeException asComposite() {
- if (!isComposite()) {
- throw new IllegalArgumentException("This is not a composite exception");
- }
-
- return (SyncopeClientCompositeException) this;
- }
-
- public ClientExceptionType getType() {
- return type;
- }
-
- public final void setType(final ClientExceptionType type) {
- this.type = type;
- }
-
- public List<String> getElements() {
- return elements;
- }
-
- public boolean isEmpty() {
- return elements.isEmpty();
- }
-
- public int size() {
- return elements.size();
- }
-
- @Override
- public String getMessage() {
- StringBuilder message = new StringBuilder();
-
- message.append(getType());
- message.append(" ");
- message.append(getElements());
-
- return message.toString();
- }
-
- @Override
- public String getLocalizedMessage() {
- return getMessage();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/SyncopeConstants.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/SyncopeConstants.java b/common/src/main/java/org/apache/syncope/common/SyncopeConstants.java
deleted file mode 100644
index c729cdd..0000000
--- a/common/src/main/java/org/apache/syncope/common/SyncopeConstants.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common;
-
-import java.util.regex.Pattern;
-
-public class SyncopeConstants {
-
- public static final String NAMESPACE = "http://syncope.apache.org/2.0";
-
- public static final String UNAUTHENTICATED = "unauthenticated";
-
- public static final String ANONYMOUS_ENTITLEMENT = "anonymous";
-
- public static final String ENUM_VALUES_SEPARATOR = ";";
-
- public static final String[] DATE_PATTERNS = {
- "yyyy-MM-dd'T'HH:mm:ssZ",
- "EEE, dd MMM yyyy HH:mm:ss z",
- "yyyy-MM-dd'T'HH:mm:ssz",
- "yyyy-MM-dd HH:mm:ss",
- "yyyy-MM-dd HH:mm:ss.S", // explicitly added to import date into MySql repository
- "yyyy-MM-dd" };
-
- public static final String DEFAULT_DATE_PATTERN = "yyyy-MM-dd'T'HH:mm:ssZ";
-
- public static final String DEFAULT_ENCODING = "UTF-8";
-
- public static final String ROOT_LOGGER = "ROOT";
-
- public static final Pattern EMAIL_PATTERN = Pattern.compile(
- "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*"
- + "@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
- Pattern.CASE_INSENSITIVE);
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/annotation/ClassList.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/annotation/ClassList.java b/common/src/main/java/org/apache/syncope/common/annotation/ClassList.java
deleted file mode 100644
index 5681695..0000000
--- a/common/src/main/java/org/apache/syncope/common/annotation/ClassList.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.annotation;
-
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-@Retention(RUNTIME)
-public @interface ClassList {
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/annotation/FormAttributeField.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/annotation/FormAttributeField.java b/common/src/main/java/org/apache/syncope/common/annotation/FormAttributeField.java
deleted file mode 100644
index cca70a1..0000000
--- a/common/src/main/java/org/apache/syncope/common/annotation/FormAttributeField.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.apache.syncope.common.types.IntMappingType;
-
-@Target({ ElementType.FIELD })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface FormAttributeField {
-
- boolean userSearch() default false;
-
- boolean roleSearch() default false;
-
- IntMappingType schema() default IntMappingType.UserSchema;
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/annotation/SchemaList.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/annotation/SchemaList.java b/common/src/main/java/org/apache/syncope/common/annotation/SchemaList.java
deleted file mode 100644
index ad98ae5..0000000
--- a/common/src/main/java/org/apache/syncope/common/annotation/SchemaList.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.annotation;
-
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-@Retention(RUNTIME)
-public @interface SchemaList {
-
- boolean extended() default false;
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/mod/AbstractAttributableMod.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/mod/AbstractAttributableMod.java b/common/src/main/java/org/apache/syncope/common/mod/AbstractAttributableMod.java
deleted file mode 100644
index 15dca15..0000000
--- a/common/src/main/java/org/apache/syncope/common/mod/AbstractAttributableMod.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.mod;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-
-/**
- * Abstract base class for objects that can have attributes removed, added or updated.
- *
- * Attributes can be regular attributes, derived attributes, virtual attributes and resources.
- */
-@XmlType
-public abstract class AbstractAttributableMod extends AbstractBaseBean {
-
- private static final long serialVersionUID = 3241118574016303198L;
-
- protected long id;
-
- protected final Set<AttributeMod> attrsToUpdate = new HashSet<AttributeMod>();
-
- protected final Set<String> attrsToRemove = new HashSet<String>();
-
- protected final Set<String> derAttrsToAdd = new HashSet<String>();
-
- protected final Set<String> derAttrsToRemove = new HashSet<String>();
-
- protected final Set<AttributeMod> virAttrsToUpdate = new HashSet<AttributeMod>();
-
- protected final Set<String> virAttrsToRemove = new HashSet<String>();
-
- public long getId() {
- return id;
- }
-
- public void setId(final long id) {
- this.id = id;
- }
-
- @XmlElementWrapper(name = "attributesToRemove")
- @XmlElement(name = "attribute")
- @JsonProperty("attributesToRemove")
- public Set<String> getAttrsToRemove() {
- return attrsToRemove;
- }
-
- @XmlElementWrapper(name = "attributesToUpdate")
- @XmlElement(name = "attributeMod")
- @JsonProperty("attributesToUpdate")
- public Set<AttributeMod> getAttrsToUpdate() {
- return attrsToUpdate;
- }
-
- @XmlElementWrapper(name = "derAttrsToAdd")
- @XmlElement(name = "attribute")
- @JsonProperty("derAttrsToAdd")
- public Set<String> getDerAttrsToAdd() {
- return derAttrsToAdd;
- }
-
- @XmlElementWrapper(name = "derAttrsToRemove")
- @XmlElement(name = "attribute")
- @JsonProperty("derAttrsToRemove")
- public Set<String> getDerAttrsToRemove() {
- return derAttrsToRemove;
- }
-
- @XmlElementWrapper(name = "virAttrsToRemove")
- @XmlElement(name = "attribute")
- @JsonProperty("virAttrsToRemove")
- public Set<String> getVirAttrsToRemove() {
- return virAttrsToRemove;
- }
-
- @XmlElementWrapper(name = "virAttrsToUpdate")
- @XmlElement(name = "attribute")
- @JsonProperty("virAttrsToUpdate")
- public Set<AttributeMod> getVirAttrsToUpdate() {
- return virAttrsToUpdate;
- }
-
- /**
- * @return true is all backing Sets are empty.
- */
- public boolean isEmpty() {
- return attrsToUpdate.isEmpty() && attrsToRemove.isEmpty()
- && derAttrsToAdd.isEmpty() && derAttrsToRemove.isEmpty()
- && virAttrsToUpdate.isEmpty() && virAttrsToRemove.isEmpty();
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/mod/AbstractSubjectMod.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/mod/AbstractSubjectMod.java b/common/src/main/java/org/apache/syncope/common/mod/AbstractSubjectMod.java
deleted file mode 100644
index 82def2f..0000000
--- a/common/src/main/java/org/apache/syncope/common/mod/AbstractSubjectMod.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.mod;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.HashSet;
-import java.util.Set;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlType
-public abstract class AbstractSubjectMod extends AbstractAttributableMod {
-
- private static final long serialVersionUID = -6404459635536484024L;
-
- protected final Set<String> resourcesToAdd = new HashSet<String>();
-
- protected final Set<String> resourcesToRemove = new HashSet<String>();
-
- @XmlElementWrapper(name = "resourcesToAdd")
- @XmlElement(name = "resource")
- @JsonProperty("resourcesToAdd")
- public Set<String> getResourcesToAdd() {
- return resourcesToAdd;
- }
-
- @XmlElementWrapper(name = "resourcesToRemove")
- @XmlElement(name = "resource")
- @JsonProperty("resourcesToRemove")
- public Set<String> getResourcesToRemove() {
- return resourcesToRemove;
- }
-
- @Override
- public boolean isEmpty() {
- return super.isEmpty() && resourcesToAdd.isEmpty() && resourcesToRemove.isEmpty();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/mod/AttributeMod.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/mod/AttributeMod.java b/common/src/main/java/org/apache/syncope/common/mod/AttributeMod.java
deleted file mode 100644
index 38f6f8b..0000000
--- a/common/src/main/java/org/apache/syncope/common/mod/AttributeMod.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.mod;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlRootElement
-@XmlType
-public class AttributeMod extends AbstractBaseBean {
-
- private static final long serialVersionUID = -913573979137431406L;
-
- private String schema;
-
- private List<String> valuesToBeAdded;
-
- private List<String> valuesToBeRemoved;
-
- public AttributeMod() {
- super();
-
- valuesToBeAdded = new ArrayList<String>();
- valuesToBeRemoved = new ArrayList<String>();
- }
-
- public String getSchema() {
- return schema;
- }
-
- public void setSchema(String schema) {
- this.schema = schema;
- }
-
- @XmlElementWrapper(name = "valuesToBeAdded")
- @XmlElement(name = "value")
- @JsonProperty("valuesToBeAdded")
- public List<String> getValuesToBeAdded() {
- return valuesToBeAdded;
- }
-
- @XmlElementWrapper(name = "valuesToBeRemoved")
- @XmlElement(name = "value")
- @JsonProperty("valuesToBeRemoved")
- public List<String> getValuesToBeRemoved() {
- return valuesToBeRemoved;
- }
-
- @JsonIgnore
- public boolean isEmpty() {
- return valuesToBeAdded.isEmpty() && valuesToBeRemoved.isEmpty();
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/mod/MembershipMod.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/mod/MembershipMod.java b/common/src/main/java/org/apache/syncope/common/mod/MembershipMod.java
deleted file mode 100644
index 8fa83bc..0000000
--- a/common/src/main/java/org/apache/syncope/common/mod/MembershipMod.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.mod;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement
-@XmlType
-public class MembershipMod extends AbstractAttributableMod {
-
- private static final long serialVersionUID = 2511869129977331525L;
-
- private long role;
-
- public long getRole() {
- return role;
- }
-
- public void setRole(long role) {
- this.role = role;
- }
-
- @JsonIgnore
- @Override
- public boolean isEmpty() {
- return super.isEmpty() && role == 0;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java b/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java
deleted file mode 100644
index 5be3289..0000000
--- a/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.mod;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-
-/**
- * This class is used to specify the willing to modify an external reference id. Use 'null' ReferenceMod to keep the
- * current reference id; use a ReferenceMod with a null id to try to reset the reference id; use a ReferenceMod with a
- * not null id to specify a new reference id.
- */
-@XmlRootElement(name = "referenceMod")
-@XmlType
-public class ReferenceMod extends AbstractBaseBean {
-
- private static final long serialVersionUID = -4188817853738067677L;
-
- private Long id;
-
- public ReferenceMod() {
- this.id = null;
- }
-
- public ReferenceMod(final Long id) {
- this.id = id;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setId(final Long id) {
- this.id = id;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/mod/ResourceAssociationMod.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/mod/ResourceAssociationMod.java b/common/src/main/java/org/apache/syncope/common/mod/ResourceAssociationMod.java
deleted file mode 100644
index 1a5335f..0000000
--- a/common/src/main/java/org/apache/syncope/common/mod/ResourceAssociationMod.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.mod;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.wrap.ResourceName;
-
-/**
- * This class is used to specify the willing to create associations between user and external references.
- * Password can be provided if required by an assign or provisioning operation.
- *
- * @see org.apache.syncope.common.types.ResourceAssociationActionType
- */
-@XmlRootElement(name = "resourceAssociationMod")
-@XmlType
-public class ResourceAssociationMod extends AbstractBaseBean {
-
- private static final long serialVersionUID = -4188817853738067678L;
-
- /**
- * Target external resources.
- */
- private final List<ResourceName> targetResources = new ArrayList<ResourceName>();
-
- /**
- * Indicate the willing to change password on target external resources.
- */
- private boolean changePwd;
-
- /**
- * Indicate the new password to be provisioned on target external resources.
- */
- private String password;
-
- @XmlElementWrapper(name = "resources")
- @XmlElement(name = "resource")
- @JsonProperty("resources")
- public List<ResourceName> getTargetResources() {
- return targetResources;
- }
-
- public boolean isChangePwd() {
- return changePwd;
- }
-
- public void setChangePwd(boolean changePwd) {
- this.changePwd = changePwd;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/mod/RoleMod.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/mod/RoleMod.java b/common/src/main/java/org/apache/syncope/common/mod/RoleMod.java
deleted file mode 100644
index cb24391..0000000
--- a/common/src/main/java/org/apache/syncope/common/mod/RoleMod.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.mod;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "roleMod")
-@XmlType
-public class RoleMod extends AbstractSubjectMod {
-
- private static final long serialVersionUID = 7455805264680210747L;
-
- private String name;
-
- private ReferenceMod userOwner;
-
- private ReferenceMod roleOwner;
-
- private Boolean inheritOwner;
-
- private Boolean inheritTemplates;
-
- private Boolean inheritAttrs;
-
- private Boolean inheritDerAttrs;
-
- private Boolean inheritVirAttrs;
-
- private Boolean inheritAccountPolicy;
-
- private Boolean inheritPasswordPolicy;
-
- private boolean modEntitlements;
-
- private List<String> entitlements = new ArrayList<String>();
-
- private boolean modRAttrTemplates;
-
- private List<String> rAttrTemplates = new ArrayList<String>();
-
- private boolean modRDerAttrTemplates;
-
- private List<String> rDerAttrTemplates = new ArrayList<String>();
-
- private boolean modRVirAttrTemplates;
-
- private List<String> rVirAttrTemplates = new ArrayList<String>();
-
- private boolean modMAttrTemplates;
-
- private List<String> mAttrTemplates = new ArrayList<String>();
-
- private boolean modMDerAttrTemplates;
-
- private List<String> mDerAttrTemplates = new ArrayList<String>();
-
- private boolean modMVirAttrTemplates;
-
- private List<String> mVirAttrTemplates = new ArrayList<String>();
-
- private ReferenceMod passwordPolicy;
-
- private ReferenceMod accountPolicy;
-
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- public ReferenceMod getUserOwner() {
- return userOwner;
- }
-
- public void setUserOwner(ReferenceMod userOwner) {
- this.userOwner = userOwner;
- }
-
- public ReferenceMod getRoleOwner() {
- return roleOwner;
- }
-
- public void setRoleOwner(ReferenceMod roleOwner) {
- this.roleOwner = roleOwner;
- }
-
- public Boolean getInheritOwner() {
- return inheritOwner;
- }
-
- public void setInheritOwner(Boolean inheritOwner) {
- this.inheritOwner = inheritOwner;
- }
-
- public Boolean getInheritTemplates() {
- return inheritTemplates;
- }
-
- public void setInheritTemplates(final Boolean inheritTemplates) {
- this.inheritTemplates = inheritTemplates;
- }
-
- public Boolean getInheritAttrs() {
- return inheritAttrs;
- }
-
- public void setInheritAttributes(final Boolean inheritAttrs) {
- this.inheritAttrs = inheritAttrs;
- }
-
- public Boolean getInheritDerAttrs() {
- return inheritDerAttrs;
- }
-
- public void setInheritDerAttrs(final Boolean inheritDerAttrs) {
- this.inheritDerAttrs = inheritDerAttrs;
- }
-
- public Boolean getInheritVirAttrs() {
- return inheritVirAttrs;
- }
-
- public void setInheritVirAttrs(final Boolean inheritVirAttrs) {
- this.inheritVirAttrs = inheritVirAttrs;
- }
-
- public boolean isModEntitlements() {
- return modEntitlements;
- }
-
- public void setModEntitlements(final boolean modEntitlements) {
- this.modEntitlements = modEntitlements;
- }
-
- @XmlElementWrapper(name = "entitlements")
- @XmlElement(name = "entitlement")
- @JsonProperty("entitlements")
- public List<String> getEntitlements() {
- return entitlements;
- }
-
- public boolean isModRAttrTemplates() {
- return modRAttrTemplates;
- }
-
- public void setModRAttrTemplates(final boolean modRAttrTemplates) {
- this.modRAttrTemplates = modRAttrTemplates;
- }
-
- @XmlElementWrapper(name = "rAttrTemplates")
- @XmlElement(name = "rAttrTemplate")
- @JsonProperty("rAttrTemplates")
- public List<String> getRAttrTemplates() {
- return rAttrTemplates;
- }
-
- public boolean isModRDerAttrTemplates() {
- return modRDerAttrTemplates;
- }
-
- public void setModRDerAttrTemplates(final boolean modRDerAttrTemplates) {
- this.modRDerAttrTemplates = modRDerAttrTemplates;
- }
-
- @XmlElementWrapper(name = "rDerAttrTemplates")
- @XmlElement(name = "rDerAttrTemplate")
- @JsonProperty("rDerAttrTemplates")
- public List<String> getRDerAttrTemplates() {
- return rDerAttrTemplates;
- }
-
- public boolean isModRVirAttrTemplates() {
- return modRVirAttrTemplates;
- }
-
- public void setModRVirAttrTemplates(final boolean modRVirAttrTemplates) {
- this.modRVirAttrTemplates = modRVirAttrTemplates;
- }
-
- @XmlElementWrapper(name = "rVirAttrTemplates")
- @XmlElement(name = "rVirAttrTemplate")
- @JsonProperty("rVirAttrTemplates")
- public List<String> getRVirAttrTemplates() {
- return rVirAttrTemplates;
- }
-
- public boolean isModMAttrTemplates() {
- return modMAttrTemplates;
- }
-
- public void setModMAttrTemplates(final boolean modMAttrTemplates) {
- this.modMAttrTemplates = modMAttrTemplates;
- }
-
- @XmlElementWrapper(name = "mAttrTemplates")
- @XmlElement(name = "mAttrTemplate")
- @JsonProperty("mAttrTemplates")
- public List<String> getMAttrTemplates() {
- return mAttrTemplates;
- }
-
- public boolean isModMDerAttrTemplates() {
- return modMDerAttrTemplates;
- }
-
- public void setModMDerAttrTemplates(final boolean modMDerAttrTemplates) {
- this.modMDerAttrTemplates = modMDerAttrTemplates;
- }
-
- @XmlElementWrapper(name = "mDerAttrTemplates")
- @XmlElement(name = "mDerAttrTemplate")
- @JsonProperty("mDerAttrTemplates")
- public List<String> getMDerAttrTemplates() {
- return mDerAttrTemplates;
- }
-
- public boolean isModMVirAttrTemplates() {
- return modMVirAttrTemplates;
- }
-
- public void setModMVirAttrTemplates(final boolean modMVirAttrTemplates) {
- this.modMVirAttrTemplates = modMVirAttrTemplates;
- }
-
- @XmlElementWrapper(name = "mVirAttrTemplates")
- @XmlElement(name = "mVirAttrTemplate")
- @JsonProperty("mVirAttrTemplates")
- public List<String> getMVirAttrTemplates() {
- return mVirAttrTemplates;
- }
-
- public ReferenceMod getPasswordPolicy() {
- return passwordPolicy;
- }
-
- public void setPasswordPolicy(final ReferenceMod passwordPolicy) {
- this.passwordPolicy = passwordPolicy;
- }
-
- public Boolean getInheritPasswordPolicy() {
- return inheritPasswordPolicy;
- }
-
- public void setInheritPasswordPolicy(final Boolean inheritPasswordPolicy) {
- this.inheritPasswordPolicy = inheritPasswordPolicy;
- }
-
- public ReferenceMod getAccountPolicy() {
- return accountPolicy;
- }
-
- public void setAccountPolicy(final ReferenceMod accountPolicy) {
- this.accountPolicy = accountPolicy;
- }
-
- public Boolean getInheritAccountPolicy() {
- return inheritAccountPolicy;
- }
-
- public void setInheritAccountPolicy(final Boolean inheritAccountPolicy) {
- this.inheritAccountPolicy = inheritAccountPolicy;
- }
-
- @JsonIgnore
- @Override
- public boolean isEmpty() {
- return super.isEmpty() && name == null && userOwner == null && roleOwner == null
- && inheritTemplates == null && inheritOwner == null
- && inheritAccountPolicy == null && inheritPasswordPolicy == null
- && inheritAttrs == null && inheritDerAttrs == null && inheritVirAttrs == null
- && accountPolicy == null && passwordPolicy == null && entitlements.isEmpty()
- && rAttrTemplates.isEmpty() && rDerAttrTemplates.isEmpty() && rVirAttrTemplates.isEmpty()
- && mAttrTemplates.isEmpty() && mDerAttrTemplates.isEmpty() && mVirAttrTemplates.isEmpty();
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/mod/StatusMod.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/mod/StatusMod.java b/common/src/main/java/org/apache/syncope/common/mod/StatusMod.java
deleted file mode 100644
index c4ae577..0000000
--- a/common/src/main/java/org/apache/syncope/common/mod/StatusMod.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.mod;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlRootElement(name = "statusMod")
-@XmlType
-public class StatusMod extends AbstractBaseBean {
-
- private static final long serialVersionUID = 3230910033784302656L;
-
- @XmlEnum
- @XmlType(name = "statusModType")
- public enum ModType {
-
- ACTIVATE,
- SUSPEND,
- REACTIVATE;
-
- }
-
- /**
- * Id of user to for which status update is requested.
- */
- private long id;
-
- private ModType type;
-
- /**
- * Update token (if required).
- */
- private String token;
-
- /**
- * Whether update should be performed on internal storage.
- */
- private boolean onSyncope = true;
-
- /**
- * External resources for which update is needed to be propagated.
- */
- private final List<String> resourceNames = new ArrayList<String>();
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public ModType getType() {
- return type;
- }
-
- public void setType(final ModType type) {
- this.type = type;
- }
-
- public String getToken() {
- return token;
- }
-
- public void setToken(final String token) {
- this.token = token;
- }
-
- public boolean isOnSyncope() {
- return onSyncope;
- }
-
- public void setOnSyncope(final boolean onSyncope) {
- this.onSyncope = onSyncope;
- }
-
- @XmlElementWrapper(name = "resources")
- @XmlElement(name = "resource")
- @JsonProperty("resources")
- public List<String> getResourceNames() {
- return resourceNames;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/mod/UserMod.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/mod/UserMod.java b/common/src/main/java/org/apache/syncope/common/mod/UserMod.java
deleted file mode 100644
index d4e39f2..0000000
--- a/common/src/main/java/org/apache/syncope/common/mod/UserMod.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.mod;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.HashSet;
-import java.util.Set;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "userMod")
-@XmlType
-public class UserMod extends AbstractSubjectMod {
-
- private static final long serialVersionUID = 3081848906558106204L;
-
- private String password;
-
- private String username;
-
- private final Set<MembershipMod> membershipsToAdd;
-
- private final Set<Long> membershipsToRemove;
-
- private StatusMod pwdPropRequest;
-
- private Long securityQuestion;
-
- private String securityAnswer;
-
- public UserMod() {
- super();
-
- membershipsToAdd = new HashSet<MembershipMod>();
- membershipsToRemove = new HashSet<Long>();
- }
-
- public String getUsername() {
- return username;
- }
-
- public void setUsername(final String username) {
- this.username = username;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(final String password) {
- this.password = password;
- }
-
- @XmlElementWrapper(name = "membershipsToAdd")
- @XmlElement(name = "membership")
- @JsonProperty("membershipsToAdd")
- public Set<MembershipMod> getMembershipsToAdd() {
- return membershipsToAdd;
- }
-
- @XmlElementWrapper(name = "membershipsToRemove")
- @XmlElement(name = "membership")
- @JsonProperty("membershipsToRemove")
- public Set<Long> getMembershipsToRemove() {
- return membershipsToRemove;
- }
-
- public StatusMod getPwdPropRequest() {
- return pwdPropRequest;
- }
-
- public void setPwdPropRequest(final StatusMod pwdPropRequest) {
- this.pwdPropRequest = pwdPropRequest;
- }
-
- public Long getSecurityQuestion() {
- return securityQuestion;
- }
-
- public void setSecurityQuestion(final Long securityQuestion) {
- this.securityQuestion = securityQuestion;
- }
-
- public String getSecurityAnswer() {
- return securityAnswer;
- }
-
- public void setSecurityAnswer(final String securityAnswer) {
- this.securityAnswer = securityAnswer;
- }
-
- @JsonIgnore
- @Override
- public boolean isEmpty() {
- return super.isEmpty()
- && password == null
- && username == null
- && membershipsToAdd.isEmpty()
- && membershipsToRemove.isEmpty()
- && pwdPropRequest == null
- && securityQuestion == null
- && securityAnswer == null;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/mod/package-info.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/mod/package-info.java b/common/src/main/java/org/apache/syncope/common/mod/package-info.java
deleted file mode 100644
index 2669ff1..0000000
--- a/common/src/main/java/org/apache/syncope/common/mod/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
-package org.apache.syncope.common.mod;
-
-import javax.xml.bind.annotation.XmlSchema;
-import org.apache.syncope.common.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/package-info.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/package-info.java b/common/src/main/java/org/apache/syncope/common/package-info.java
deleted file mode 100644
index 17fb64b..0000000
--- a/common/src/main/java/org/apache/syncope/common/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
-package org.apache.syncope.common;
-
-import javax.xml.bind.annotation.XmlSchema;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/report/AbstractReportletConf.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/report/AbstractReportletConf.java b/common/src/main/java/org/apache/syncope/common/report/AbstractReportletConf.java
deleted file mode 100644
index 6563c71..0000000
--- a/common/src/main/java/org/apache/syncope/common/report/AbstractReportletConf.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.report;
-
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlType
-@XmlSeeAlso({ StaticReportletConf.class, UserReportletConf.class, RoleReportletConf.class })
-public abstract class AbstractReportletConf extends AbstractBaseBean implements ReportletConf {
-
- private static final long serialVersionUID = -6130008602014516608L;
-
- private String name;
-
- public AbstractReportletConf() {
- this("");
- setName(getClass().getName());
- }
-
- public AbstractReportletConf(final String name) {
- this.name = name;
- }
-
- @Override
- public final String getName() {
- return name;
- }
-
- public final void setName(final String name) {
- this.name = name;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/report/ReportletConf.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/report/ReportletConf.java b/common/src/main/java/org/apache/syncope/common/report/ReportletConf.java
deleted file mode 100644
index 970ae87..0000000
--- a/common/src/main/java/org/apache/syncope/common/report/ReportletConf.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.report;
-
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-
-@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
-public interface ReportletConf {
-
- /**
- * Give name of related reportlet instance.
- *
- * @return name of this reportlet instance
- */
- String getName();
-}
[04/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/LICENSE
----------------------------------------------------------------------
diff --git a/console/LICENSE b/console/LICENSE
deleted file mode 100644
index b0d70b0..0000000
--- a/console/LICENSE
+++ /dev/null
@@ -1,708 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
-
-==
-
-For javax.annotation-api (http://www.oracle.com/):
-This is licensed under CDDL 1.0.
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that
-creates or contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the
-Original Software, prior Modifications used by a
-Contributor (if any), and the Modifications made by that
-particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or
-(b) Modifications, or (c) the combination of files
-containing Original Software with files containing
-Modifications, in each case including portions thereof.
-
-1.4. "Executable" means the Covered Software in any form
-other than Source Code.
-
-1.5. "Initial Developer" means the individual or entity
-that first makes Original Software available under this
-License.
-
-1.6. "Larger Work" means a work which combines Covered
-Software or portions thereof with code not governed by the
-terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the
-maximum extent possible, whether at the time of the initial
-grant or subsequently acquired, any and all of the rights
-conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable
-form of any of the following:
-
-A. Any file that results from an addition to,
-deletion from or modification of the contents of a
-file containing Original Software or previous
-Modifications;
-
-B. Any new file that contains any part of the
-Original Software or previous Modification; or
-
-C. Any new file that is contributed or otherwise made
-available under the terms of this License.
-
-1.10. "Original Software" means the Source Code and
-Executable form of computer software code that is
-originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned
-or hereafter acquired, including without limitation,
-method, process, and apparatus claims, in any patent
-Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer
-software code in which modifications are made and (b)
-associated documentation included in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal
-entity exercising rights under, and complying with all of
-the terms of, this License. For legal entities, "You"
-includes any entity which controls, is controlled by, or is
-under common control with You. For purposes of this
-definition, "control" means (a) the power, direct or
-indirect, to cause the direction or management of such
-entity, whether by contract or otherwise, or (b) ownership
-of more than fifty percent (50%) of the outstanding shares
-or beneficial ownership of such entity.
-
-2. License Grants.
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and
-subject to third party intellectual property claims, the
-Initial Developer hereby grants You a world-wide,
-royalty-free, non-exclusive license:
-
-(a) under intellectual property rights (other than
-patent or trademark) Licensable by Initial Developer,
-to use, reproduce, modify, display, perform,
-sublicense and distribute the Original Software (or
-portions thereof), with or without Modifications,
-and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making,
-using or selling of Original Software, to make, have
-made, use, practice, sell, and offer for sale, and/or
-otherwise dispose of the Original Software (or
-portions thereof).
-
-(c) The licenses granted in Sections 2.1(a) and (b)
-are effective on the date Initial Developer first
-distributes or otherwise makes the Original Software
-available to a third party under the terms of this
-License.
-
-(d) Notwithstanding Section 2.1(b) above, no patent
-license is granted: (1) for code that You delete from
-the Original Software, or (2) for infringements
-caused by: (i) the modification of the Original
-Software, or (ii) the combination of the Original
-Software with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and
-subject to third party intellectual property claims, each
-Contributor hereby grants You a world-wide, royalty-free,
-non-exclusive license:
-
-(a) under intellectual property rights (other than
-patent or trademark) Licensable by Contributor to
-use, reproduce, modify, display, perform, sublicense
-and distribute the Modifications created by such
-Contributor (or portions thereof), either on an
-unmodified basis, with other Modifications, as
-Covered Software and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making,
-using, or selling of Modifications made by that
-Contributor either alone and/or in combination with
-its Contributor Version (or portions of such
-combination), to make, use, sell, offer for sale,
-have made, and/or otherwise dispose of: (1)
-Modifications made by that Contributor (or portions
-thereof); and (2) the combination of Modifications
-made by that Contributor with its Contributor Version
-(or portions of such combination).
-
-(c) The licenses granted in Sections 2.2(a) and
-2.2(b) are effective on the date Contributor first
-distributes or otherwise makes the Modifications
-available to a third party.
-
-(d) Notwithstanding Section 2.2(b) above, no patent
-license is granted: (1) for any code that Contributor
-has deleted from the Contributor Version; (2) for
-infringements caused by: (i) third party
-modifications of Contributor Version, or (ii) the
-combination of Modifications made by that Contributor
-with other software (except as part of the
-Contributor Version) or other devices; or (3) under
-Patent Claims infringed by Covered Software in the
-absence of Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make
-available in Executable form must also be made available in
-Source Code form and that Source Code form must be
-distributed only under the terms of this License. You must
-include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or
-otherwise make available. You must inform recipients of any
-such Covered Software in Executable form as to how they can
-obtain such Covered Software in Source Code form in a
-reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You
-contribute are governed by the terms of this License. You
-represent that You believe Your Modifications are Your
-original creation(s) and/or You have sufficient rights to
-grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications
-that identifies You as the Contributor of the Modification.
-You may not remove or alter any copyright, patent or
-trademark notices contained within the Covered Software, or
-any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered
-Software in Source Code form that alters or restricts the
-applicable version of this License or the recipients'
-rights hereunder. You may choose to offer, and to charge a
-fee for, warranty, support, indemnity or liability
-obligations to one or more recipients of Covered Software.
-However, you may do so only on Your own behalf, and not on
-behalf of the Initial Developer or any Contributor. You
-must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by
-You alone, and You hereby agree to indemnify the Initial
-Developer and every Contributor for any liability incurred
-by the Initial Developer or such Contributor as a result of
-warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered
-Software under the terms of this License or under the terms
-of a license of Your choice, which may contain terms
-different from this License, provided that You are in
-compliance with the terms of this License and that the
-license for the Executable form does not attempt to limit
-or alter the recipient's rights in the Source Code form
-from the rights set forth in this License. If You
-distribute the Covered Software in Executable form under a
-different license, You must make it absolutely clear that
-any terms which differ from this License are offered by You
-alone, not by the Initial Developer or Contributor. You
-hereby agree to indemnify the Initial Developer and every
-Contributor for any liability incurred by the Initial
-Developer or such Contributor as a result of any such terms
-You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software
-with other code not governed by the terms of this License
-and distribute the Larger Work as a single product. In such
-a case, You must make sure the requirements of this License
-are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and
-may publish revised and/or new versions of this License
-from time to time. Each version will be given a
-distinguishing version number. Except as provided in
-Section 4.3, no one other than the license steward has the
-right to modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise
-make the Covered Software available under the terms of the
-version of the License under which You originally received
-the Covered Software. If the Initial Developer includes a
-notice in the Original Software prohibiting it from being
-distributed or otherwise made available under any
-subsequent version of the License, You must distribute and
-make the Covered Software available under the terms of the
-version of the License under which You originally received
-the Covered Software. Otherwise, You may also choose to
-use, distribute or otherwise make the Covered Software
-available under the terms of any subsequent version of the
-License published by the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a
-new license for Your Original Software, You may create and
-use a modified version of this License if You: (a) rename
-the license and remove any references to the name of the
-license steward (except to note that the license differs
-from this License); and (b) otherwise make it clear that
-the license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
-BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
-PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY
-COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
-INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF
-ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
-DISCLAIMER.
-
-6. TERMINATION.
-
-6.1. This License and the rights granted hereunder will
-terminate automatically if You fail to comply with terms
-herein and fail to cure such breach within 30 days of
-becoming aware of the breach. Provisions which, by their
-nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding
-declaratory judgment actions) against Initial Developer or
-a Contributor (the Initial Developer or Contributor against
-whom You assert such claim is referred to as "Participant")
-alleging that the Participant Software (meaning the
-Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the
-Initial Developer) directly or indirectly infringes any
-patent, then any and all rights granted directly or
-indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant)
-and all Contributors under Sections 2.1 and/or 2.2 of this
-License shall, upon 60 days notice from Participant
-terminate prospectively and automatically at the expiration
-of such 60 day notice period, unless if within such 60 day
-period You withdraw Your claim with respect to the
-Participant Software against such Participant either
-unilaterally or pursuant to a written agreement with
-Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2
-above, all end user licenses that have been validly granted
-by You or any distributor hereunder prior to termination
-(excluding licenses granted to You by any distributor)
-shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
-INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
-LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
-CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
-STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
-INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
-APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
-NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
-CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
-APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is
-defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
-computer software" (as that term is defined at 48 C.F.R. $
-252.227-7014(a)(1)) and "commercial computer software
-documentation" as such terms are used in 48 C.F.R. 12.212 (Sept.
-1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
-through 227.7202-4 (June 1995), all U.S. Government End Users
-acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes,
-any other FAR, DFAR, or other clause or provision that addresses
-Government rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject
-matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the
-extent necessary to make it enforceable. This License shall be
-governed by the law of the jurisdiction specified in a notice
-contained within the Original Software (except to the extent
-applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation
-relating to this License shall be subject to the jurisdiction of
-the courts located in the jurisdiction and venue specified in a
-notice contained within the Original Software, with the losing
-party responsible for costs, including, without limitation, court
-costs and reasonable attorneys' fees and expenses. The
-application of the United Nations Convention on Contracts for the
-International Sale of Goods is expressly excluded. Any law or
-regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the
-United States export administration regulations (and the export
-control laws and regulation of any other countries) when You use,
-distribute or otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or
-indirectly, out of its utilization of rights under this License
-and You agree to work with Initial Developer and Contributors to
-distribute such responsibility on an equitable basis. Nothing
-herein is intended or shall be deemed to constitute any admission
-of liability.
-
-==
-
-For AOP Alliance (http://aopalliance.sourceforge.net/):
-This is Public Domain.
-
-==
-
-For ASM (http://asm.ow2.org/):
-This is licensed under the BSD license.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted
-provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this list of
- conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of
- conditions and the following disclaimer in the documentation and/or other materials
- provided with the distribution.
- * Neither the name of the author nor the names of its contributors may be used to
- endorse or promote products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==
-
-For cglib (https://github.com/cglib/cglib):
-This is licensed under the AL 2.0, see above.
-
-==
-
-For CodeMirror (http://codemirror.net/):
-This is licensed under the terms of the MIT license.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-==
-
-For LMAX Disruptor (https://lmax-exchange.github.io/disruptor/):
-This is licensed under the AL 2.0, see above.
-
-==
-
-For javax.inject (http://code.google.com/p/atinject/):
-This is licensed under the AL 2.0, see above.
-
-==
-
-For Jackson (http://wiki.fasterxml.com/JacksonHome):
-This is licensed under the AL 2.0, see above.
-
-==
-
-For javax.ws.rs-api (http://www.oracle.com/):
-This is licensed under CDDL 1.0, see above.
-
-==
-
-For Joda Time (http://www.joda.org/joda-time/):
-This is licensed under the AL 2.0, see above.
-
-==
-
-For jQuery (http://jquery.com/):
-This is licensed under the terms of the MIT license, see above.
-
-==
-
-For jQuery UI (http://jqueryui.com/):
-This is licensed under the terms of the MIT license, see above.
-
-==
-
-For Simple Logging Facade for Java - SLF4J (http://www.slf4j.org/):
-This is licensed under the MIT license, see above.
-
-==
-
-For Spring Framework (http://projects.spring.io/spring-framework/):
-This is licensed under the AL 2.0, see above.
-
-==
-
-For StAX2 API (http://woodstox.codehaus.org/StAX2):
-This is licensed under the BSD license, see above.
-
-==
-
-For Bean Validation API (http://beanvalidation.org/):
-This is licensed under the AL 2.0, see above.
-
-==
-
-For Woodstox (http://woodstox.codehaus.org/):
-This is licensed under the AL 2.0, see above.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/NOTICE
----------------------------------------------------------------------
diff --git a/console/NOTICE b/console/NOTICE
deleted file mode 100644
index 356cdb9..0000000
--- a/console/NOTICE
+++ /dev/null
@@ -1,75 +0,0 @@
-Apache Syncope
-Copyright 2012-2015 The Apache Software Foundation
-
-This product includes software developed by:
-The Apache Software Foundation (http://www.apache.org/).
-
-The following copyright notice(s) were affixed to portions of this code
-with which this file is now or was at one time distributed.
-
-==
-
-This product includes software developed by Oracle Corporation.
-Copyright (C) 1999-2013 http://www.oracle.com/ and/or its affiliates.
-All rights reserved.
-
-==
-
-This product includes software developed by the AOP Alliance (Java/J2EE AOP standards).
-
-==
-
-This product includes software developed by the ASM project (http://asm.ow2.org/).
-Copyright (c) 2000-2011 INRIA, France Telecom
-All rights reserved.
-
-==
-
-This product includes the CodeMirror JavaScript component.
-Copyright (C) 2015 by Marijn Haverbeke <ma...@gmail.com> and others
-
-==
-
-This product includes software developed by the atinject Project.
-Copyright (c) 2009, http://code.google.com/p/atinject/
-All rights reserved.
-
-==
-
-This product includes software developed by the Jackson project (http://wiki.fasterxml.com/JacksonHome).
-
-==
-
-This product includes software developed by the Joda Time project (http://www.joda.org/joda-time/).
-
-==
-
-This product includes the jQuery Core JavaScript Library.
-Copyright 2007, 2015 jQuery Foundation and other contributors,
-https://jquery.org/
-
-==
-
-This product includes the jQuery UI JavaScript Library.
-Copyright 2007, 2015 jQuery Foundation and other contributors,
-https://jquery.org/
-
-==
-
-This products includes software developed by SLF4J (http://www.slf4j.org)
-Copyright (c) 2004-2013 QOS.ch.
-
-==
-
-This product includes software developed by SpringSource
-Copyright (c) 2004-2015 SpringSource
-All rights reserved.
-
-==
-
-This product includes software developed by the Bean Validation Project (http://beanvalidation.org).
-Copyright (c) Red Hat, Inc., Emmanuel Bernard
-
-==
-
-This product includes software developed by the Woodstox Project (http://woodstox.codehaus.org/).
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/pom.xml
----------------------------------------------------------------------
diff --git a/console/pom.xml b/console/pom.xml
deleted file mode 100644
index 5444b94..0000000
--- a/console/pom.xml
+++ /dev/null
@@ -1,741 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- </parent>
-
- <name>Apache Syncope Console</name>
- <description>Apache Syncope Console</description>
-
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-console</artifactId>
- <packaging>war</packaging>
-
- <distributionManagement>
- <site>
- <id>syncope.website</id>
- <name>Apache Syncope website</name>
- <url>${site.deploymentBaseUrl}/${project.artifactId}</url>
- </site>
- </distributionManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-client</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- </dependency>
- <dependency>
- <groupId>com.lmax</groupId>
- <artifactId>disruptor</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.wicket</groupId>
- <artifactId>wicket</artifactId>
- <type>pom</type>
- </dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
- <artifactId>wicket-extensions</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
- <artifactId>wicket-datetime</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
- <artifactId>wicket-spring</artifactId>
- <!-- exclude spring framework that wicket pulls in -->
- <exclusions>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
- <artifactId>wicket-auth-roles</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.fasterxml.jackson.jaxrs</groupId>
- <artifactId>jackson-jaxrs-json-provider</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.webjars</groupId>
- <artifactId>jquery-ui</artifactId>
- </dependency>
- <dependency>
- <groupId>org.webjars</groupId>
- <artifactId>codemirror</artifactId>
- </dependency>
-
- <!-- TEST -->
- <dependency>
- <groupId>org.activiti</groupId>
- <artifactId>activiti-webapp-explorer2</artifactId>
- <type>war</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-build-tools</artifactId>
- <version>${project.version}</version>
- <type>war</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <!-- SELENIUM INTEGRATION TEST -->
- <dependency>
- <groupId>org.seleniumhq.selenium</groupId>
- <artifactId>selenium-java</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.seleniumhq.selenium</groupId>
- <artifactId>selenium-api</artifactId>
- <scope>test</scope>
- </dependency>
- <!-- /SELENIUM INTEGRATION TEST -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>net.tirasa.connid.bundles.soap</groupId>
- <artifactId>wssample</artifactId>
- <type>war</type>
- <scope>test</scope>
- </dependency>
- <!-- /TEST -->
- </dependencies>
-
- <build>
- <finalName>${project.artifactId}</finalName>
-
- <plugins>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>set-bundles</id>
- <phase>process-test-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>setupActivitiModeler</id>
- <phase>process-resources</phase>
- <configuration>
- <target>
- <unzip src="${settings.localRepository}/org/activiti/activiti-webapp-explorer2/${activiti.version}/activiti-webapp-explorer2-${activiti.version}.war" dest="${project.build.directory}/activiti-webapp-explorer2" />
-
- <mkdir dir="${activiti-modeler.directory}" />
-
- <mkdir dir="${activiti-modeler.directory}/editor" />
- <copy todir="${activiti-modeler.directory}/editor">
- <fileset dir="${project.build.directory}/activiti-webapp-explorer2/editor">
- <exclude name="oryx.js" />
- </fileset>
- </copy>
- <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/plugins.xml" todir="${activiti-modeler.directory}/editor" />
- <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/stencilset.json" todir="${activiti-modeler.directory}/editor" />
-
- <mkdir dir="${activiti-modeler.directory}/explorer" />
- <copy todir="${activiti-modeler.directory}/explorer">
- <fileset dir="${project.build.directory}/activiti-webapp-explorer2/explorer" />
- </copy>
-
- <mkdir dir="${activiti-modeler.directory}/libs" />
- <copy todir="${activiti-modeler.directory}/libs">
- <fileset dir="${project.build.directory}/activiti-webapp-explorer2/libs" />
- </copy>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>setupTestWebapp</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <unzip src="${basedir}/../core/target/syncope.war" dest="${cargo.run.dir}" />
- <copy file="${basedir}/../core/target/test-classes/org/apache/syncope/core/sync/TestSyncActions.class" todir="${cargo.run.dir}/WEB-INF/classes/org/apache/syncope/core/sync" />
- <copy file="${basedir}/../core/target/test-classes/org/apache/syncope/core/sync/TestSyncRule.class" todir="${cargo.run.dir}/WEB-INF/classes/org/apache/syncope/core/sync" />
- <copy file="${basedir}/../core/target/test-classes/org/apache/syncope/core/rest/data/DoubleValueAttributableTransformer.class" todir="${cargo.run.dir}/WEB-INF/classes/org/apache/syncope/core/rest/data" />
- <copy file="${project.build.directory}/test-classes/db.jsp" todir="${cargo.run.dir}" />
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>setupCSV</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <copy file="${project.build.directory}/test-classes/test.csv" todir="${test.csvdir.path}" overwrite="true" />
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>com.google.code.maven-replacer-plugin</groupId>
- <artifactId>replacer</artifactId>
- <executions>
- <execution>
- <phase>process-resources</phase>
- <goals>
- <goal>replace</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <file>${activiti-modeler.directory}/editor/oryx.debug.js</file>
- <tokenValueMap>${basedir}/src/main/resources/oryx.debug.js-tokenValueMap.properties</tokenValueMap>
- <unescape>true</unescape>
- <regex>false</regex>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <container>
- <dependencies>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- </dependency>
- </dependencies>
- </container>
- <configuration>
- <type>standalone</type>
- <properties>
- <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port>
- <cargo.tomcat.ajp.port>${cargo.tomcat.ajp.port}</cargo.tomcat.ajp.port>
- <cargo.rmi.port>${cargo.rmi.port}</cargo.rmi.port>
- <cargo.jvmargs>-noverify ${javaagent} -Drebel.spring_plugin=true
- -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
- </properties>
- <configfiles>
- <configfile>
- <file>${project.build.directory}/test-classes/context.xml</file>
- <todir>conf/</todir>
- <tofile>context.xml</tofile>
- </configfile>
- </configfiles>
- </configuration>
- <deployables>
- <deployable>
- <location>${cargo.run.dir}</location>
- <properties>
- <context>syncope</context>
- </properties>
- </deployable>
- <deployable>
- <location>${project.build.directory}/${project.build.finalName}.war</location>
- <properties>
- <context>syncope-console</context>
- </properties>
- </deployable>
- <deployable>
- <groupId>net.tirasa.connid.bundles.soap</groupId>
- <artifactId>wssample</artifactId>
- <type>war</type>
- <properties>
- <context>wssample</context>
- </properties>
- </deployable>
- <deployable>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-build-tools</artifactId>
- <type>war</type>
- <properties>
- <context>syncope-build-tools</context>
- </properties>
- </deployable>
- </deployables>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <executions>
- <execution>
- <id>bundle-manifest</id>
- <phase>process-classes</phase>
- <goals>
- <goal>manifest</goal>
- </goals>
- <configuration>
- <instructions>
- <Bundle-Name>${project.name}</Bundle-Name>
- <Bundle-SymbolicName>org.apache.syncope.console</Bundle-SymbolicName>
- <Bundle-Version>${project.version}</Bundle-Version>
- <Export-Package>
- org.apache.syncope.console*;version=${project.version};-split-package:=merge-first
- </Export-Package>
- <Import-Package>
- javax.servlet,
- javax.xml*,
- org.w3c.dom,
- org.apache.commons.lang3;version="[3,4)",
- org.apache.syncope.client*;version=${project.version},
- org.apache.syncope.common*;version=${project.version},
- org.apache.wicket*;version="[6,7)",
- com.fasterxml.jackson*;version="[2.2.2,2.3)",
- org.springframework*;version="[3,4)",
- ch.qos.logback.classic;resolution:=optional,
- javax.swing.tree;resolution:=optional,
- org.slf4j;resolution:=optional
- </Import-Package>
- </instructions>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <webResources>
- <resource>
- <directory>src/main/webapp</directory>
- <includes>
- <include>WEB-INF/web.xml</include>
- </includes>
- <filtering>true</filtering>
- </resource>
- <resource>
- <directory>${project.build.outputDirectory}</directory>
- <includes>
- <include>META-INF/DEPENDENCIES*</include>
- </includes>
- </resource>
- <resource>
- <directory>${basedir}</directory>
- <targetPath>META-INF</targetPath>
- <includes>
- <include>LICENSE</include>
- <include>NOTICE</include>
- </includes>
- </resource>
- </webResources>
- <packagingExcludes>WEB-INF/classes/META-INF/LICENSE*,WEB-INF/classes/META-INF/NOTICE*,WEB-INF/classes/META-INF/DEPENDENCIES*</packagingExcludes>
- <archive>
- <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
- </plugin>
- </plugins>
-
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- <resource>
- <directory>..</directory>
- <targetPath>META-INF</targetPath>
- <includes>
- <include>LICENSE</include>
- <include>NOTICE</include>
- </includes>
- </resource>
- </resources>
-
- <testResources>
- <testResource>
- <directory>../core/src/test/resources</directory>
- <filtering>true</filtering>
- </testResource>
- <testResource>
- <directory>src/test/resources</directory>
- <filtering>true</filtering>
- </testResource>
- </testResources>
- </build>
-
- <profiles>
-
- <profile>
- <id>skipTests</id>
- <properties>
- <javaagent />
- </properties>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>set-bundles</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>setupTestWebapp</id>
- <phase>none</phase>
- </execution>
- <execution>
- <id>setupCSV</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <skipTests>${skipTests}</skipTests>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <skipTests>${skipTests}</skipTests>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>start-container</id>
- <phase>none</phase>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>debug</id>
-
- <properties>
- <skipTests>true</skipTests>
- </properties>
-
- <build>
- <defaultGoal>clean verify cargo:run</defaultGoal>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>testWebXML</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <touch millis="0" file="${project.build.directory}/test-classes/web.xml" />
- <war destfile="${project.build.directory}/${project.build.finalName}.war" update="true">
- <mappedresources>
- <fileset dir="${project.build.directory}/test-classes" includes="web.xml" />
- <globmapper from="web.xml" to="WEB-INF/web.xml" />
- </mappedresources>
- </war>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <configuration>
- <properties>
- <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
- -noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
- </properties>
- </configuration>
- </configuration>
- <executions>
- <execution>
- <id>start-container</id>
- <phase>none</phase>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>jrebel</id>
-
- <properties>
- <skipTests>true</skipTests>
- <javaagent>-javaagent:${env.REBEL_HOME}/jrebel.jar</javaagent>
- </properties>
-
- <build>
- <defaultGoal>clean verify cargo:run</defaultGoal>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>testWebXML</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <touch millis="0" file="${project.build.directory}/test-classes/web.xml" />
- <war destfile="${project.build.directory}/${project.build.finalName}.war" update="true">
- <mappedresources>
- <fileset dir="${project.build.directory}/test-classes" includes="web.xml" />
- <globmapper from="web.xml" to="WEB-INF/web.xml" />
- </mappedresources>
- </war>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.zeroturnaround</groupId>
- <artifactId>jrebel-maven-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>generate-rebel-xml</id>
- <phase>process-resources</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <configuration>
- <properties>
- <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
- -noverify ${javaagent} -Drebel.spring_plugin=true
- -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
- </properties>
- </configuration>
- </configuration>
- <executions>
- <execution>
- <id>start-container</id>
- <phase>none</phase>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>selenium</id>
-
- <properties>
- <javaagent />
- </properties>
-
- <build>
- <defaultGoal>clean verify</defaultGoal>
- <plugins>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>verify</id>
- <goals>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>start-container</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- <configuration>
- <wait>false</wait>
- </configuration>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java b/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java
deleted file mode 100644
index 9aba5f7..0000000
--- a/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console;
-
-import java.io.Serializable;
-import org.apache.syncope.common.to.UserTO;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.commons.XMLRolesReader;
-import org.apache.syncope.console.pages.Configuration;
-import org.apache.syncope.console.pages.InfoModalPage;
-import org.apache.syncope.console.pages.Login;
-import org.apache.syncope.console.pages.Logout;
-import org.apache.syncope.console.pages.Reports;
-import org.apache.syncope.console.pages.Resources;
-import org.apache.syncope.console.pages.Roles;
-import org.apache.syncope.console.pages.Schema;
-import org.apache.syncope.console.pages.Tasks;
-import org.apache.syncope.console.pages.Todo;
-import org.apache.syncope.console.pages.UserSelfModalPage;
-import org.apache.syncope.console.pages.Users;
-import org.apache.syncope.console.pages.WelcomePage;
-import org.apache.syncope.console.resources.FilesystemResource;
-import org.apache.syncope.console.resources.WorkflowDefGETResource;
-import org.apache.syncope.console.resources.WorkflowDefPUTResource;
-import org.apache.syncope.console.rest.UserSelfRestClient;
-import org.apache.wicket.Component;
-import org.apache.wicket.Page;
-import org.apache.wicket.RestartResponseAtInterceptPageException;
-import org.apache.wicket.Session;
-import org.apache.wicket.WicketRuntimeException;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
-import org.apache.wicket.authorization.IUnauthorizedComponentInstantiationListener;
-import org.apache.wicket.authorization.UnauthorizedInstantiationException;
-import org.apache.wicket.authroles.authorization.strategies.role.IRoleCheckingStrategy;
-import org.apache.wicket.authroles.authorization.strategies.role.RoleAuthorizationStrategy;
-import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.image.Image;
-import org.apache.wicket.markup.html.link.BookmarkablePageLink;
-import org.apache.wicket.protocol.http.WebApplication;
-import org.apache.wicket.request.Request;
-import org.apache.wicket.request.Response;
-import org.apache.wicket.request.resource.ContextRelativeResource;
-import org.apache.wicket.request.resource.IResource;
-import org.apache.wicket.request.resource.ResourceReference;
-import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-
-/**
- * SyncopeApplication class.
- */
-public class SyncopeApplication
- extends WebApplication
- implements IUnauthorizedComponentInstantiationListener, IRoleCheckingStrategy, Serializable {
-
- private static final long serialVersionUID = -2920378752291913495L;
-
- public static final String IMG_PREFIX = "/img/menu/";
-
- public static final String IMG_NOTSEL = "notsel/";
-
- private static final String ACTIVITI_MODELER_CONTEXT = "activiti-modeler";
-
- private static final int EDIT_PROFILE_WIN_HEIGHT = 550;
-
- private static final int EDIT_PROFILE_WIN_WIDTH = 800;
-
- @Override
- protected void init() {
- super.init();
-
- getComponentInstantiationListeners().add(new SpringComponentInjector(this));
-
- getResourceSettings().setThrowExceptionOnMissingResource(true);
-
- getSecuritySettings().setAuthorizationStrategy(new RoleAuthorizationStrategy(this));
- getSecuritySettings().setUnauthorizedComponentInstantiationListener(this);
-
- getMarkupSettings().setStripWicketTags(true);
- getMarkupSettings().setCompressWhitespace(true);
-
- getRequestCycleListeners().add(new SyncopeRequestCycleListener());
-
- final String activitiModelerDirectory = WebApplicationContextUtils.getWebApplicationContext(
- WebApplication.get().getServletContext()).getBean("activitiModelerDirectory", String.class);
- mountResource("/" + ACTIVITI_MODELER_CONTEXT, new ResourceReference(ACTIVITI_MODELER_CONTEXT) {
-
- private static final long serialVersionUID = -128426276529456602L;
-
- @Override
- public IResource getResource() {
- return new FilesystemResource(ACTIVITI_MODELER_CONTEXT, activitiModelerDirectory);
- }
-
- });
- mountResource("/workflowDefGET", new ResourceReference("workflowDefGET") {
-
- private static final long serialVersionUID = -128426276529456602L;
-
- @Override
- public IResource getResource() {
- return new WorkflowDefGETResource();
- }
- });
- mountResource("/workflowDefPUT", new ResourceReference("workflowDefPUT") {
-
- private static final long serialVersionUID = -128426276529456602L;
-
- @Override
- public IResource getResource() {
- return new WorkflowDefPUTResource();
- }
- });
- }
-
- public void setupNavigationPanel(final WebPage page, final XMLRolesReader xmlRolesReader, final boolean notsel) {
- final ModalWindow infoModal = new ModalWindow("infoModal");
- page.add(infoModal);
- infoModal.setInitialWidth(350);
- infoModal.setInitialHeight(300);
- infoModal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- infoModal.setCookieName("infoModal");
- infoModal.setPageCreator(new ModalWindow.PageCreator() {
-
- private static final long serialVersionUID = -7834632442532690940L;
-
- @Override
- public Page createPage() {
- return new InfoModalPage();
- }
- });
-
- final AjaxLink<Page> infoLink = new AjaxLink<Page>("infoLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- infoModal.show(target);
- }
- };
- page.add(infoLink);
-
- BookmarkablePageLink<Page> schemaLink = new BookmarkablePageLink<Page>("schema", Schema.class);
- MetaDataRoleAuthorizationStrategy.authorize(
- schemaLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Schema", "list"));
- page.add(schemaLink);
- schemaLink.add(new Image("schemaIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
- ? IMG_NOTSEL
- : "") + "schema" + Constants.PNG_EXT)));
-
- BookmarkablePageLink<Page> usersLink = new BookmarkablePageLink<Page>("users", Users.class);
- MetaDataRoleAuthorizationStrategy.authorize(
- usersLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Users", "list"));
- page.add(usersLink);
- usersLink.add(new Image("usersIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
- ? IMG_NOTSEL
- : "") + "users" + Constants.PNG_EXT)));
-
- BookmarkablePageLink<Page> rolesLink = new BookmarkablePageLink<Page>("roles", Roles.class);
- MetaDataRoleAuthorizationStrategy.authorize(
- rolesLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Roles", "list"));
- page.add(rolesLink);
- rolesLink.add(new Image("rolesIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
- ? IMG_NOTSEL
- : "") + "roles" + Constants.PNG_EXT)));
-
- BookmarkablePageLink<Page> resourcesLink = new BookmarkablePageLink<Page>("resources", Resources.class);
- MetaDataRoleAuthorizationStrategy.authorize(
- resourcesLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Resources", "list"));
- page.add(resourcesLink);
- resourcesLink.add(new Image("resourcesIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
- ? IMG_NOTSEL
- : "") + "resources" + Constants.PNG_EXT)));
-
- BookmarkablePageLink<Page> todoLink = new BookmarkablePageLink<Page>("todo", Todo.class);
- MetaDataRoleAuthorizationStrategy.authorize(
- todoLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Approval", "list"));
- page.add(todoLink);
- todoLink.add(new Image("todoIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
- ? IMG_NOTSEL
- : "") + "todo" + Constants.PNG_EXT)));
-
- BookmarkablePageLink<Page> reportLink = new BookmarkablePageLink<Page>("reports", Reports.class);
- MetaDataRoleAuthorizationStrategy.authorize(
- reportLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Reports", "list"));
- page.add(reportLink);
- reportLink.add(new Image("reportsIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
- ? IMG_NOTSEL
- : "") + "reports" + Constants.PNG_EXT)));
-
- BookmarkablePageLink<Page> configurationLink = new BookmarkablePageLink<Page>("configuration",
- Configuration.class);
- MetaDataRoleAuthorizationStrategy.authorize(
- configurationLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Configuration", "list"));
- page.add(configurationLink);
- configurationLink.add(new Image("configurationIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
- ? IMG_NOTSEL
- : "") + "configuration" + Constants.PNG_EXT)));
-
- BookmarkablePageLink<Page> taskLink = new BookmarkablePageLink<Page>("tasks", Tasks.class);
- MetaDataRoleAuthorizationStrategy.authorize(
- taskLink, WebPage.ENABLE, xmlRolesReader.getEntitlement("Tasks", "list"));
- page.add(taskLink);
- taskLink.add(new Image("tasksIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
- ? IMG_NOTSEL
- : "") + "tasks" + Constants.PNG_EXT)));
-
- page.add(new BookmarkablePageLink<Page>("logout", Logout.class));
- }
-
- public void setupEditProfileModal(final WebPage page, final UserSelfRestClient userSelfRestClient) {
- // Modal window for editing user profile
- final ModalWindow editProfileModalWin = new ModalWindow("editProfileModal");
- editProfileModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- editProfileModalWin.setInitialHeight(EDIT_PROFILE_WIN_HEIGHT);
- editProfileModalWin.setInitialWidth(EDIT_PROFILE_WIN_WIDTH);
- editProfileModalWin.setCookieName("edit-profile-modal");
- page.add(editProfileModalWin);
-
- final AjaxLink<Page> editProfileLink = new AjaxLink<Page>("editProfileLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- final UserTO userTO;
- if (SyncopeSession.get().isAuthenticated()) {
- try {
- userTO = userSelfRestClient.read();
- } catch (Exception e) {
- throw new WicketRuntimeException(e);
- }
- } else {
- userTO = new UserTO();
- }
-
- editProfileModalWin.setPageCreator(new ModalWindow.PageCreator() {
-
- private static final long serialVersionUID = -7834632442532690940L;
-
- @Override
- public Page createPage() {
- return new UserSelfModalPage(page.getPageReference(), editProfileModalWin, userTO);
- }
- });
-
- editProfileModalWin.show(target);
- }
- };
-
- editProfileLink.add(new Label("username", SyncopeSession.get().getUsername()));
-
- if ("admin".equals(SyncopeSession.get().getUsername())) {
- editProfileLink.setEnabled(false);
- }
-
- page.add(editProfileLink);
- }
-
- @Override
- public Session newSession(final Request request, final Response response) {
- return new SyncopeSession(request);
- }
-
- @Override
- public Class<? extends Page> getHomePage() {
- return SyncopeSession.get().isAuthenticated() ? WelcomePage.class : Login.class;
- }
-
- @Override
- public void onUnauthorizedInstantiation(final Component component) {
- SyncopeSession.get().invalidate();
-
- if (component instanceof Page) {
- throw new UnauthorizedInstantiationException(component.getClass());
- }
-
- throw new RestartResponseAtInterceptPageException(Login.class);
- }
-
- @Override
- public boolean hasAnyRole(final org.apache.wicket.authroles.authorization.strategies.role.Roles roles) {
- return SyncopeSession.get().hasAnyRole(roles);
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/SyncopeRequestCycleListener.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/SyncopeRequestCycleListener.java b/console/src/main/java/org/apache/syncope/console/SyncopeRequestCycleListener.java
deleted file mode 100644
index 94915b2..0000000
--- a/console/src/main/java/org/apache/syncope/console/SyncopeRequestCycleListener.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console;
-
-import java.security.AccessControlException;
-import javax.ws.rs.BadRequestException;
-import javax.xml.ws.WebServiceException;
-import org.apache.syncope.common.SyncopeClientException;
-import org.apache.syncope.console.pages.ErrorPage;
-import org.apache.wicket.Page;
-import org.apache.wicket.authorization.UnauthorizedInstantiationException;
-import org.apache.wicket.core.request.handler.PageProvider;
-import org.apache.wicket.core.request.handler.RenderPageRequestHandler;
-import org.apache.wicket.markup.html.pages.ExceptionErrorPage;
-import org.apache.wicket.model.StringResourceModel;
-import org.apache.wicket.protocol.http.PageExpiredException;
-import org.apache.wicket.request.IRequestHandler;
-import org.apache.wicket.request.cycle.AbstractRequestCycleListener;
-import org.apache.wicket.request.cycle.RequestCycle;
-import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SyncopeRequestCycleListener extends AbstractRequestCycleListener {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(SyncopeRequestCycleListener.class);
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IRequestHandler onException(final RequestCycle cycle, final Exception e) {
- LOG.error("Exception found", e);
-
- PageParameters errorParameters = new PageParameters();
- errorParameters.add("errorTitle", new StringResourceModel("alert", null).getString());
-
- final Page errorPage;
- if (e instanceof UnauthorizedInstantiationException) {
- errorParameters.add("errorMessage",
- new StringResourceModel("unauthorizedInstantiationException", null).getString());
-
- errorPage = new ErrorPage(errorParameters);
- } else if (e.getCause() instanceof AccessControlException) {
- errorParameters.add("errorMessage", new StringResourceModel("accessControlException", null).getString());
-
- errorPage = new ErrorPage(errorParameters);
- } else if (e instanceof PageExpiredException || !(SyncopeSession.get()).isAuthenticated()) {
- errorParameters.add("errorMessage", new StringResourceModel("pageExpiredException", null).getString());
-
- errorPage = new ErrorPage(errorParameters);
- } else if (e.getCause() instanceof BadRequestException || e.getCause() instanceof WebServiceException
- || e.getCause() instanceof SyncopeClientException) {
-
- errorParameters.add("errorMessage", new StringResourceModel("restClientException", null).getString());
-
- errorPage = new ErrorPage(errorParameters);
- } else {
- // redirect to default Wicket error page
- errorPage = new ExceptionErrorPage(e, null);
- }
-
- return new RenderPageRequestHandler(new PageProvider(errorPage));
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/SyncopeSession.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/SyncopeSession.java b/console/src/main/java/org/apache/syncope/console/SyncopeSession.java
deleted file mode 100644
index 53b03c0..0000000
--- a/console/src/main/java/org/apache/syncope/console/SyncopeSession.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console;
-
-import java.text.DateFormat;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import javax.ws.rs.core.EntityTag;
-import javax.ws.rs.core.MediaType;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.syncope.client.SyncopeClient;
-import org.apache.syncope.client.SyncopeClientFactoryBean;
-import org.apache.syncope.common.types.SubjectType;
-import org.apache.wicket.Session;
-import org.apache.wicket.authroles.authorization.strategies.role.Roles;
-import org.apache.wicket.protocol.http.WebApplication;
-import org.apache.wicket.protocol.http.WebSession;
-import org.apache.wicket.request.Request;
-import org.springframework.context.ApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-
-/**
- * Custom Syncope Session class.
- */
-public class SyncopeSession extends WebSession {
-
- private static final long serialVersionUID = 7743446298924805872L;
-
- public static final List<Locale> SUPPORTED_LOCALES = Arrays.asList(new Locale[] {
- Locale.ENGLISH, Locale.ITALIAN, new Locale("pt", "BR") });
-
- private String username;
-
- private String password;
-
- private String version;
-
- private Roles roles = new Roles();
-
- private final SyncopeClientFactoryBean clientFactory;
-
- private final String anonymousUser;
-
- private final String anonymousKey;
-
- private final Map<Integer, SyncopeClient> clients =
- Collections.synchronizedMap(new HashMap<Integer, SyncopeClient>());
-
- public static SyncopeSession get() {
- return (SyncopeSession) Session.get();
- }
-
- public SyncopeSession(final Request request) {
- super(request);
-
- final ApplicationContext ctx = WebApplicationContextUtils.
- getWebApplicationContext(WebApplication.get().getServletContext());
-
- clientFactory = ctx.getBean(SyncopeClientFactoryBean.class).
- setContentType(SyncopeClientFactoryBean.ContentType.JSON);
- anonymousUser = ctx.getBean("anonymousUser", String.class);
- anonymousKey = ctx.getBean("anonymousKey", String.class);
- }
-
- public void resetClients() {
- clients.clear();
- }
-
- public boolean isSelfRegAllowed() {
- SyncopeClient client = clients.isEmpty()
- ? clientFactory.createAnonymous()
- : clients.values().iterator().next();
- return client.isSelfRegAllowed();
- }
-
- public boolean isPwdResetAllowed() {
- SyncopeClient client = clients.isEmpty()
- ? clientFactory.createAnonymous()
- : clients.values().iterator().next();
- return client.isPwdResetAllowed();
- }
-
- public boolean isPwdResetRequiringSecurityQuestions() {
- SyncopeClient client = clients.isEmpty()
- ? clientFactory.createAnonymous()
- : clients.values().iterator().next();
- return client.isPwdResetRequiringSecurityQuestions();
- }
-
- public boolean isActivitiEnabledFor(final SubjectType type) {
- SyncopeClient client = clients.isEmpty()
- ? clientFactory.createAnonymous()
- : clients.values().iterator().next();
- return client.isActivitiEnabledFor(type);
- }
-
- public boolean isCamelEnabledFor(final SubjectType type) {
- SyncopeClient client = clients.isEmpty()
- ? clientFactory.createAnonymous()
- : clients.values().iterator().next();
- return client.isCamelEnabledFor(type);
- }
-
- public <T> T getService(final Class<T> service) {
- return getService(service, this.username, this.password);
- }
-
- public <T> T getService(final String etag, final Class<T> service) {
- T serviceInstance = getService(service, this.username, this.password);
- WebClient.client(serviceInstance).match(new EntityTag(etag), false);
-
- return serviceInstance;
- }
-
- public <T> void resetClient(final Class<T> service) {
- T serviceInstance = getService(service, this.username, this.password);
- WebClient.client(serviceInstance).reset();
- }
-
- public <T> T getService(final MediaType mediaType, final Class<T> serviceClass) {
- T service;
-
- synchronized (clientFactory) {
- SyncopeClientFactoryBean.ContentType preType = clientFactory.getContentType();
-
- clientFactory.setContentType(SyncopeClientFactoryBean.ContentType.fromString(mediaType.toString()));
- service = clientFactory.create(username, password).getService(serviceClass);
- clientFactory.setContentType(preType);
- }
-
- return service;
- }
-
- public <T> T getAnonymousService(final Class<T> serviceClass) {
- return getService(serviceClass, this.anonymousUser, this.anonymousKey);
- }
-
- public <T> T getService(final Class<T> serviceClass, final String username, final String password) {
- final int clientKey = new HashCodeBuilder().append(username).append(password).toHashCode();
-
- if (!clients.containsKey(clientKey)) {
- clients.put(clientKey, clientFactory.create(username, password));
- }
-
- return clients.get(clientKey).getService(serviceClass);
- }
-
- public String getUsername() {
- return username;
- }
-
- public void setUsername(final String username) {
- this.username = username;
- }
-
- public void setPassword(final String password) {
- this.password = password;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(final String version) {
- this.version = version;
- }
-
- public void setEntitlements(final String[] entitlements) {
- String[] defensiveCopy = entitlements.clone();
- roles = new Roles(defensiveCopy);
- }
-
- public Roles getEntitlements() {
- return roles;
- }
-
- public boolean isAuthenticated() {
- return getUsername() != null;
- }
-
- public boolean hasAnyRole(final Roles roles) {
- return this.roles.hasAnyRole(roles);
- }
-
- public DateFormat getDateFormat() {
- final Locale locale = getLocale() == null ? Locale.ENGLISH : getLocale();
-
- return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale);
- }
-}
[21/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/ActionDataTablePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ActionDataTablePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ActionDataTablePanel.html
new file mode 100644
index 0000000..5ad205f
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ActionDataTablePanel.html
@@ -0,0 +1,45 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <link rel="stylesheet" type="text/css" href="css/bulk.css" media="all"/>
+ </wicket:head>
+ <wicket:panel>
+
+ <form wicket:id="groupForm">
+ <span wicket:id="checkgroup">
+ <table class="ui-widget ui-widget-content table-hover" wicket:id="dataTable">[Data Table]</table>
+ </span>
+
+ <div id="actionRow" class="pageRowElement">
+ <div id="actions">
+ <div id="actionPanel" wicket:id="actionPanelContainer" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
+ <span wicket:id="actions">[Actions]</span>
+ </div>
+
+ <div id="cancelBtmForm">
+ <input type="button" wicket:id="cancel" id="cancel"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"/>
+ </div>
+ </div>
+ </div>
+ </form>
+
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AjaxDataTablePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AjaxDataTablePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AjaxDataTablePanel.html
new file mode 100644
index 0000000..f67ba10
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AjaxDataTablePanel.html
@@ -0,0 +1,47 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <link rel="stylesheet" type="text/css" href="css/bulk.css" media="all"/>
+ </wicket:head>
+ <wicket:panel>
+ <span wicket:id="tablePanel">[Table panel]</span>
+ <div wicket:id="bulkModal" />
+
+ <wicket:fragment wicket:id="bulkAvailable">
+ <form wicket:id="groupForm">
+ <span wicket:id="checkgroup">
+ <table class="ui-widget ui-widget-content table-hover" wicket:id="dataTable">[DataTable]</table>
+ </span>
+ </form>
+ <div class="bulkAction">
+ <div class="bulkActionCell" style="width: 40px">
+ <a href="#" wicket:id="bulkActionLink">
+ <img src="img/actions/bulk.png" alt="bulk action icon" title="Bulk action"/>
+ </a>
+ </div>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="bulkNotAvailable">
+ <table class="ui-widget ui-widget-content table-hover" wicket:id="dataTable">[DataTable]</table>
+ </wicket:fragment>
+
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel.html
new file mode 100644
index 0000000..4d459ce
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel.html
@@ -0,0 +1,98 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html>
+ <wicket:head>
+ <style>
+ div.information{
+ margin-top: 30px;
+ border: 1px solid #DDDDDD;
+ font-size: 8px;
+ color: #555555;
+ display: inline-table;
+ width: 100%;
+ clear: both;
+ float:none;
+ }
+
+ div.infolabel{
+ margin-left: 5px;
+ float:left;
+ width: 150px;
+ font-weight: bold
+ }
+
+ div.infoleft{
+ float:left;
+ display: inline-table;
+ width: 50%
+ }
+
+ div.inforight{
+ display: inline-table;
+ width: 50%
+ }
+
+ div.inforow{
+ display: inline-table;
+ width: 100%
+ }
+ </style>
+ </wicket:head>
+ <wicket:panel>
+ <div class="information">
+ <div class="infoleft">
+ <div class="infolabel">
+ <wicket:message key="creationDate"/>:
+ </div>
+ <div>
+ <span wicket:id="creationDate" />
+ </div>
+ </div>
+
+ <div class="inforight">
+ <div class="infolabel">
+ <wicket:message key="lastChangeDate"/>:
+ </div>
+ <div>
+ <span wicket:id="lastChangeDate" />
+ </div>
+ </div>
+
+ <div class="infoleft">
+ <div class="infolabel">
+ <wicket:message key="creator"/>:
+ </div>
+ <div>
+ <span wicket:id="creator" />
+ </div>
+ </div>
+
+ <div class="inforight">
+ <div class="infolabel">
+ <wicket:message key="lastModifier"/>:
+ </div>
+ <div>
+ <span wicket:id="lastModifier" />
+ </div>
+ </div>
+
+ <wicket:child />
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel.properties
new file mode 100644
index 0000000..54a0fcf
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+creationDate=Creation Date
+creator=Creator
+lastChangeDate=Last change date
+lastModifier=Last modifier
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel_it.properties
new file mode 100644
index 0000000..7fae3ab
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel_it.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+creationDate=Data Di Creazione
+creator=Creatore
+lastChangeDate=Data Di Ultima Modifica
+lastModifier=Ultimo Modificatore
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel_pt_BR.properties
new file mode 100644
index 0000000..689436f
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnnotatedBeanPanel_pt_BR.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+creationDate=Data de Cria\u00e7\u00e3o
+creator=Criador
+lastChangeDate=Data De \u00daltima Altera\u00e7\u00e3o
+lastModifier=\u00daltima Modificador
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel.html
new file mode 100644
index 0000000..9049435
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel.html
@@ -0,0 +1,58 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $("#attrTemplateTabs").tabs();
+ });
+ </script>
+ </wicket:head>
+ <wicket:panel>
+ <div id="attrTemplateTabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
+ <ul>
+ <li class="tabs-selected"><a href="#rplainattr"><wicket:message key="rplainattr"/></a></li>
+ <li><a href="#rderattr"><wicket:message key="rderattr"/></a></li>
+ <li><a href="#rvirattr"><wicket:message key="rvirattr"/></a></li>
+ <li><a href="#mplainattr"><wicket:message key="mplainattr"/></a></li>
+ <li><a href="#mderattr"><wicket:message key="mderattr"/></a></li>
+ <li><a href="#mvirattr"><wicket:message key="mvirattr"/></a></li>
+ </ul>
+
+ <div id="rplainattr">
+ <div wicket:id="rPlainAttrTemplates"/>
+ </div>
+ <div id="rderattr">
+ <div wicket:id="rDerAttrTemplates"/>
+ </div>
+ <div id="rvirattr">
+ <div wicket:id="rVirAttrTemplates"/>
+ </div>
+ <div id="mplainattr">
+ <div wicket:id="mPlainAttrTemplates"/>
+ </div>
+ <div id="mderattr">
+ <div wicket:id="mDerAttrTemplates"/>
+ </div>
+ <div id="mvirattr">
+ <div wicket:id="mVirAttrTemplates"/>
+ </div>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel.properties
new file mode 100644
index 0000000..94da979
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+rplainattr=Plain
+rderattr=Derived
+rvirattr=Virtual
+mplainattr=Plain (Membership)
+mderattr=Derived (Membership)
+mvirattr=Virtual (Membership)
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel_it.properties
new file mode 100644
index 0000000..d30ff59
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel_it.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+rplainattr=Normali
+rderattr=Derivati
+rvirattr=Virtuali
+mplainattr=Normali (Membership)
+mderattr=Derivati (Membership)
+mvirattr=Virtuali (Membership)
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel_pt_BR.properties
new file mode 100644
index 0000000..5fd7c3a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AttrTemplatesPanel_pt_BR.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+rplainattr=Normal
+rderattr=Derivado
+rvirattr=Virtual
+mplainattr=Normal (Membro)
+mderattr=Derivado (Membro)
+mvirattr=Virtual (Membro)
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/AuditEventsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AuditEventsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AuditEventsPanel.html
new file mode 100644
index 0000000..c86473a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AuditEventsPanel.html
@@ -0,0 +1,122 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style>
+ .container {
+ display: block;
+ width: 100%;
+ }
+
+ .label {
+ font-size: 12px;
+ vertical-align: middle;
+ font-family: Verdana,Tahoma,sans-serif;
+ display: table-cell;
+ width: 300px;
+ height: 20px;
+ }
+
+ .divtableheaderlabel {
+ font-weight: bold;
+ float: left;
+ margin-left: 5px;
+ display: table-cell;
+ width: 70px;
+ }
+
+ .divtableheadercell {
+ display: inline-table;
+ vertical-align: top;
+ text-align: right;
+ width: 105px;
+ height: 20px;
+ }
+
+ .divtablecheckcolumn {
+ display: table-cell;
+ vertical-align: top;
+ text-align: right;
+ width: 105px;
+ }
+
+ .divtablecheck {
+ width: 105px;
+ height: 20px;
+ }
+ </style>
+ </wicket:head>
+ <wicket:panel>
+ <div class="container">
+ <div style="display:inline-table;">
+ <div class="label">
+
+ </div>
+ <div style="display: table-cell">
+ <div class="divtableheadercell">
+ <div class="divtableheaderlabel">
+ <label wicket:id="successLabel"/>
+ </div>
+ <div style="display: table-cell">
+ <input type="checkbox" wicket:id="successSelector" style="margin-top: 0px;margin-bottom: 0px;"/>
+ </div>
+ </div>
+ </div>
+ <div style="display: table-cell">
+ <div class="divtableheadercell">
+ <div class="divtableheaderlabel">
+ <label wicket:id="failureLabel"/>
+ </div>
+ <div style="display: table-cell">
+ <input type="checkbox" wicket:id="failureSelector" style="margin-top: 0px;margin-bottom: 0px;"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="container">
+ <div class="label">
+ <div id="divtablerow-label" wicket:id="categoryView">
+ <div class="label">
+ <span wicket:id="subcategory">[subcategory]</span>
+ </div>
+ </div>
+ </div>
+
+ <div id="divtablerow-success" class="divtablecheckcolumn">
+ <span wicket:id="successGroup">
+ <div wicket:id="successView" class="divtablecheck">
+ <div class="divtableheaderlabel"> </div>
+ <input type="checkbox" wicket:id="successCheck"/>
+ </div>
+ </span>
+ </div>
+
+ <div id="divtablerow-failure" class="divtablecheckcolumn">
+ <span wicket:id="failureGroup">
+ <div wicket:id="failureView" class="divtablecheck">
+ <div class="divtableheaderlabel"> </div>
+ <input type="checkbox" wicket:id="failureCheck"/>
+ </div>
+ </span>
+ </div>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel.html
new file mode 100644
index 0000000..40d55ee
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel.html
@@ -0,0 +1,60 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <table class="ui-widget ui-widget-content ui-corner-all"
+ style="font-size: 1em;margin-top:2px;"
+ width="100%" cellpadding="2px" cellspacing="1px">
+ <thead>
+ <tr class="ui-widget-header">
+ <th><wicket:message key="derAttrToRemove"/></th>
+ <th><wicket:message key="derAttrName"/></th>
+ <th><wicket:message key="derAttrValue"/></th>
+ </tr>
+ </thead>
+
+ <tfoot>
+ <tr>
+ <td>
+ <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="addAttributeBtn"/>
+ </td>
+ </tr>
+ </tfoot>
+
+ <tbody wicket:id="derAttrContainer">
+ <tr wicket:id="attrs">
+ <td align="center" valign="middle">
+ <input type="checkbox" class="text ui-widget-content ui-corner-all" wicket:id="toRemove"/>
+ </td>
+
+ <td>
+ <select class="text ui-widget-content ui-corner-all"
+ style="width:100%" wicket:id="schema"/>
+ </td>
+
+ <td align="center" valign="middle">
+ <input type="text"
+ style="width:98%; padding-left: 0px; padding-right: 0px" wicket:id="value"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel.properties
new file mode 100644
index 0000000..a09c0b0
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+addAttributeBtn=Add
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel_it.properties
new file mode 100644
index 0000000..9a4df9c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel_it.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+addAttributeBtn=Aggiungi
+
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel_pt_BR.properties
new file mode 100644
index 0000000..a7ac4dc
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerAttrsPanel_pt_BR.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+addAttributeBtn=Adicionar
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/EventSelectionPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/EventSelectionPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/EventSelectionPanel.html
new file mode 100644
index 0000000..ac7c9fc
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/EventSelectionPanel.html
@@ -0,0 +1,125 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style>
+ .container {
+ display: block;
+ width: 100%;
+ }
+
+ .label {
+ font-size: 12px;
+ vertical-align: middle;
+ font-family: Verdana,Tahoma,sans-serif;
+ display: table-cell;
+ width: 300px;
+ height: 20px;
+ }
+
+ .divtableheaderlabel {
+ font-weight: bold;
+ float: left;
+ margin-left: 5px;
+ display: table-cell;
+ width: 70px;
+ }
+
+ .divtableheadercell {
+ display: inline-table;
+ vertical-align: top;
+ text-align: right;
+ width: 105px;
+ height: 20px;
+ }
+
+ .divtablecheckcolumn {
+ display: table-cell;
+ vertical-align: top;
+ text-align: right;
+ width: 105px;
+ }
+
+ .divtablecheck {
+ width: 105px;
+ height: 20px;
+ }
+
+ </style>
+ </wicket:head>
+ <wicket:panel>
+ <div class="eventSelectionWidzard">
+ <div class="container">
+ <div style="display:inline-table;">
+ <div class="label">
+
+ </div>
+ <div style="display: table-cell">
+ <div class="divtableheadercell">
+ <div class="divtableheaderlabel">
+ <label wicket:id="successLabel"/>
+ </div>
+ <div style="display: table-cell">
+ <input type="checkbox" wicket:id="successSelector" style="margin-top: 0px;margin-bottom: 0px;"/>
+ </div>
+ </div>
+ </div>
+ <div style="display: table-cell">
+ <div class="divtableheadercell">
+ <div class="divtableheaderlabel">
+ <label wicket:id="failureLabel"/>
+ </div>
+ <div style="display: table-cell">
+ <input type="checkbox" wicket:id="failureSelector" style="margin-top: 0px;margin-bottom: 0px;"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="container">
+ <div class="label">
+ <div id="divtablerow-label" wicket:id="categoryView">
+ <div class="label">
+ <span wicket:id="subcategory">[subcategory]</span>
+ </div>
+ </div>
+ </div>
+
+ <div id="divtablerow-success" class="divtablecheckcolumn">
+ <span wicket:id="successGroup">
+ <div wicket:id="successView" class="divtablecheck">
+ <div class="divtableheaderlabel"> </div>
+ <input type="checkbox" wicket:id="successCheck"/>
+ </div>
+ </span>
+ </div>
+
+ <div id="divtablerow-failure" class="divtablecheckcolumn">
+ <span wicket:id="failureGroup">
+ <div wicket:id="failureView" class="divtablecheck">
+ <div class="divtableheaderlabel"> </div>
+ <input type="checkbox" wicket:id="failureCheck"/>
+ </div>
+ </span>
+ </div>
+ </div>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/ImagePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ImagePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ImagePanel.html
new file mode 100644
index 0000000..63a568e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ImagePanel.html
@@ -0,0 +1,23 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <img wicket:id="img" />
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/JQueryUITabbedPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/JQueryUITabbedPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/JQueryUITabbedPanel.html
new file mode 100644
index 0000000..9f66972
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/JQueryUITabbedPanel.html
@@ -0,0 +1,41 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style>
+ li.selected {
+ margin-bottom: -1px !important;
+ padding-bottom: 1px !important;
+ }
+ </style>
+ </wicket:head>
+ <wicket:panel xmlns:wicket="http://wicket.apache.org">
+ <div>
+ <span wicket:id="tabs-container">
+ <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
+ <li wicket:id="tabs" class="ui-state-default ui-corner-top">
+ <a class="ui-tabs-anchor" href="#" wicket:id="link"><span wicket:id="title">[[tab title]]</span></a>
+ </li>
+ </ul>
+ </span>
+ <div wicket:id="panel" class="ui-tabs-panel ui-widget-content ui-corner-bottom"
+ style="border-width: 1px;border-top-width: 0px;">[panel]</div>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel.html
new file mode 100644
index 0000000..51840f4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel.html
@@ -0,0 +1,41 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div>
+ <div id="users-contain" class="ui-widget">
+ <span wicket:id="container">
+ <form wicket:id="form">
+ <div id="fields">
+ <span wicket:id="fields">[fields]</span>
+ </div>
+ <div style="margin: 20px 0px 0">
+ <input type="submit" style="padding: 7px 15px;"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"/>
+ <input type="button" style="padding: 7px 15px;"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </span>
+ </div>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel.properties
new file mode 100644
index 0000000..a7a1683
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+apply=Save
+cancel=Cancel
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel_it.properties
new file mode 100644
index 0000000..a7a1683
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel_it.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+apply=Save
+cancel=Cancel
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel_pt_BR.properties
new file mode 100644
index 0000000..a7a1683
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/LayoutsPanel_pt_BR.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+apply=Save
+cancel=Cancel
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/LoggerCategoryPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/LoggerCategoryPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/LoggerCategoryPanel.html
new file mode 100644
index 0000000..c98dcb5
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/LoggerCategoryPanel.html
@@ -0,0 +1,106 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style>
+
+ .events{
+ display: table-row;
+ width: 990px;
+ }
+
+ .selectedEvents{
+ display: inline-block;
+ height: 100px;
+ margin: 10px 10px 0 10px;
+ overflow-y: auto;
+ }
+
+ .eventSelection{
+ display: inline-table;
+ float: right;
+ width: 380px;
+ min-width: 380px;
+ }
+
+ .eventSelection div#eventElement{
+ display: table-row;
+ width:100%;
+ }
+ .eventSelection div#eventElement div#label{
+ display: table-cell;
+ }
+
+ .eventSelection div#eventElement div#value{
+ display: table-cell;
+ padding: 0 0 0 10px;
+ }
+ </style>
+ </wicket:head>
+ <wicket:panel>
+
+ <div class="events">
+ <div class="selectedEvents">
+ <span wicket:id="selectedEventsPanel">[selected events panel]</span>
+ </div>
+
+ <div class="eventSelection">
+ <div wicket:id="categoryContainer" style="display: block; margin: 10px 0px 20px 0px">
+ <div id="eventElement">
+ <div id="label">
+ <label wicket:id="typeLabel"/>
+ </div>
+ <div id="value">
+ <span wicket:id="type">[type]</span>
+ </div>
+ </div>
+ <div id="eventElement">
+ <div id="label">
+ <label wicket:id="categoryLabel"/>
+ </div>
+ <div id="value">
+ <span wicket:id="category">[category]</span>
+ </div>
+ </div>
+ <div id="eventElement">
+ <div id="label">
+ <label wicket:id="subcategoryLabel"/>
+ </div>
+ <div id="value">
+ <span wicket:id="subcategory">[sub-category]</span>
+ </div>
+ </div>
+ <div id="eventElement">
+ <div id="label">
+ <label wicket:id="customLabel"/>
+ </div>
+ <div id="value">
+ <span wicket:id="custom">[custom]</span>
+ <span wicket:id="customActions">[actions]</span>
+ </div>
+ </div>
+ </div>
+ <div wicket:id="eventsContainer" style="display: block">
+ <span wicket:id="eventsPanel">[events panel]</span>
+ </div>
+ </div>
+ </div>
+
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel.html
new file mode 100644
index 0000000..684225b
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel.html
@@ -0,0 +1,66 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <wicket:message key="membership_availability"/>
+ </p>
+
+ <div wicket:id="treeTable" style="float: left; width: 100%; margin:auto;" class="role-tree roleTable"/>
+
+ <div style="float: left; width: 100%;">
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="membership_text"/></p>
+
+ <table id="users" class="membershipTable"
+ style="font-size:1.1em" wicket:id="membershipsContainer"
+ cellpadding="5px" cellspacing="2px">
+ <thead>
+ <tr class="ui-widget-header">
+ <th><wicket:message key="id"/></th>
+ <th><wicket:message key="name"/></th>
+ <th><wicket:message key="edit"/></th>
+ <th><wicket:message key="delete"/></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr wicket:id="memberships">
+ <td>
+ <span wicket:id="roleId"/>
+ </td>
+ <td>
+ <span wicket:id="roleName"/>
+ </td>
+ <td>
+ <a href="#" wicket:id="editLink">
+ <wicket:message key="edit"/>
+ </a>
+ </td>
+ <td>
+ <a href="#" wicket:id="deleteLink">
+ <wicket:message key="delete"/>
+ </a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div wicket:id="membershipWin"/>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel.properties
new file mode 100644
index 0000000..11b0de6
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Role Id
+name=Role Name
+edit=Edit
+delete=Delete
+
+membership_availability=Available roles
+membership_text=Selected roles
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel_it.properties
new file mode 100644
index 0000000..e5751ae
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel_it.properties
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Id Ruolo
+edit=Modifica
+delete=Rimuovi
+name=Nome Ruolo
+
+membership_availability=Ruoli disponibili
+membership_text=Ruoli selezionati
+
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel_pt_BR.properties
new file mode 100644
index 0000000..b9ed029
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/MembershipsPanel_pt_BR.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Identificador da Fun\u00E7\u00E3o
+name=Nome da Fun\u00E7\u00E3o
+edit=Alterar
+delete=Excluir
+
+membership_availability=Fun\u00E7\u00F5es dispon\u00EDveis
+membership_text=Fun\u00E7\u00F5es selecionadas
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks.html
new file mode 100644
index 0000000..68cec92
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks.html
@@ -0,0 +1,38 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div id="users-contain" class="ui-widget" style="width:auto">
+ <span wicket:id="container">
+ <span wicket:id="datatable">[datatable]</span>
+ </span>
+
+ <span style="float:right">
+ <form wicket:id="PaginatorForm" style="display:inline">
+ <label><wicket:message key="displayRows"/></label>
+ <select class="text ui-widget-content ui-corner-all"
+ wicket:id="rowsChooser"/>
+ </form>
+ </span>
+ </div>
+ <div wicket:id="taskWin">
+ [Show modal window for viewing task]
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks.properties
new file mode 100644
index 0000000..d6bbd36
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Id
+execute=Execute
+detail=Detail
+delete=Delete
+edit=Edit
+sender=Sender
+recipients=Recipients
+traceLevel=Trace level
+subject=Subject
+latestExecStatus=Last status
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks_it.properties
new file mode 100644
index 0000000..da12f15
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks_it.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Id
+execute=Esegui
+detail=Dettagli
+delete=Rimuovi
+edit=Modifica
+sender=Mittente
+recipients=Destinatari
+traceLevel=Livello di tracciamento
+subject=Oggetto
+latestExecStatus=Ultimo stato
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks_pt_BR.properties
new file mode 100644
index 0000000..abed229
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/NotificationTasks_pt_BR.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Identificador
+execute=Executar
+detail=Detalhe
+delete=Excluir
+edit=Alterar
+sender=Enviar
+recipients=Destinat\u00E1rios
+traceLevel=N\u00EDvel do Trace
+subject=Assunto
+latestExecStatus=\u00DAltimo Estatus
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainAttrsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainAttrsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainAttrsPanel.html
new file mode 100644
index 0000000..61f699d
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainAttrsPanel.html
@@ -0,0 +1,44 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div class="tablerow" wicket:id="schemas">
+ <div class="tablecolumn_label short_dynamicsize">
+ <span wicket:id="name"/>
+ </div>
+
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="panel">
+ [panel for dynamic input type markup]
+ </span>
+ <a class="tooltips" wicket:id="questionMarkJexlHelp" href="#" alt="Click to help" title="Click to help">
+ <img src="img/help.png"/>
+ <span wicket:id="jexlHelp" class="tooltips">
+ <wicket:message key="jexl_info"/>
+ <ul>
+ <li><wicket:message key="jexl_ex1"/></li>
+ <li><wicket:message key="jexl_ex2"/></li>
+ </ul>
+ <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message key="jexl_syntax_url"/></a>
+ </span>
+ </a>
+ </div>
+ </div>
+ </wicket:panel>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel.html
new file mode 100644
index 0000000..8bae2f9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel.html
@@ -0,0 +1,42 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div>
+ <div id="users-contain" class="ui-widget">
+ <span wicket:id="container">
+ <table class="ui-widget ui-widget-content table-hover" wicket:id="datatable"/>
+ </span>
+
+ <span style="float:right">
+ <form wicket:id="PaginatorForm" style="display:inline">
+ <label><wicket:message key="displayRows"/></label>
+ <select class="text ui-widget-content ui-corner-all" wicket:id="rowsChooser"/>
+ </form>
+ </span>
+ </div>
+
+ <div wicket:id="editModalWin">[Show modal window for creating/editing password policy]</div>
+
+ <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="createLink">
+ <wicket:message key="create"/>
+ </a>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel.properties
new file mode 100644
index 0000000..afab11d
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel.properties
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Id
+description=Description
+type=Type
+title=Account Policies
+delete=Delete
+edit=Edit
+displayRows=Rows per page
+
+#-----------------------------
+# Policy Type
+#-----------------------------
+ACCOUNT=Account Policy
+GLOBAL_ACCOUNT=Global Account Policy
+PASSWORD=Password Policy
+GLOBAL_PASSWORD=Password Global Policy
+SYNC=Synchronization Policy
+GLOBAL_SYNC=Global Synchronization Policy
+#-----------------------------
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel_it.properties
new file mode 100644
index 0000000..fcbd7c2
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel_it.properties
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Id
+description=Descrizione
+type=Tipo
+title=Account Policy
+delete=Rimuovi
+edit=Modifica
+displayRows=Righe per pagina
+
+#-----------------------------
+# Policy Type
+#-----------------------------
+ACCOUNT=Account Policy
+GLOBAL_ACCOUNT=Account Policy globale
+PASSWORD=Password policy
+GLOBAL_PASSWORD=Password policy globale
+SYNC=Policy di sincronizzazione
+GLOBAL_SYNC=Policy di sincronizzazione globale
+#-----------------------------
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel_pt_BR.properties
new file mode 100644
index 0000000..caa7ae2
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PoliciesPanel_pt_BR.properties
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Identificador
+description=Descri\u00e7\u00e3o
+type=Tipo
+title=Pol\u00edticas de Conta
+delete=Excluir
+edit=Modificar
+displayRows=Linhas por p\u00e1gina
+
+#-----------------------------
+# Policy Type
+#-----------------------------
+ACCOUNT=Pol\u00edtica de Conta
+GLOBAL_ACCOUNT=Pol\u00edtica Global de Conta
+PASSWORD=Pol\u00edtica de Senha
+GLOBAL_PASSWORD=Pol\u00edtica Global de Senha
+SYNC=Pol\u00edtica de Sincroniza\u00e7\u00e3o
+GLOBAL_SYNC=Pol\u00edtica Global de Sincroniza\u00e7\u00e3o
+#-----------------------------
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/PolicyBeanPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PolicyBeanPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PolicyBeanPanel.html
new file mode 100644
index 0000000..b9df63e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PolicyBeanPanel.html
@@ -0,0 +1,39 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+
+ <div id="policyBeanTable">
+ <div class="tablerow" wicket:id="policies">
+ <div class="tablecolumn_check">
+ <span wicket:id="check">[check]</span>
+ </div>
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="label">
+ <span wicket:id="label">[label]</span>
+ </label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="field">[field]</span>
+ </div>
+ </div>
+ </div>
+
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks.html
new file mode 100644
index 0000000..cb8a564
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks.html
@@ -0,0 +1,37 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div id="users-contain" class="ui-widget" style="width:auto">
+ <span wicket:id="container">
+ <span wicket:id="datatable">[datatable]</span>
+ </span>
+ <span style="float:right">
+ <form wicket:id="PaginatorForm" style="display:inline">
+ <label><wicket:message key="displayRows"/></label>
+ <select class="text ui-widget-content ui-corner-all"
+ wicket:id="rowsChooser"/>
+ </form>
+ </span>
+ </div>
+ <div wicket:id="taskWin">
+ [Show modal window for viewing task]
+ </div>
+ </wicket:panel>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks.properties
new file mode 100644
index 0000000..e800242
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks.properties
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Id
+accountId=Account Id
+resource=Resource
+execute=Execute
+detail=Detail
+delete=Delete
+edit=Edit
+propagationMode=Propagation Mode
+propagationOperation=Propagation Operation
+latestExecStatus=Last status
+startDate=Start date
+endDate=End date
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks_it.properties
new file mode 100644
index 0000000..62f0177
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks_it.properties
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Id
+accountId=Account Id
+resource=Risorsa
+execute=Esegui
+detail=Dettagli
+delete=Rimuovi
+edit=Modifica
+propagationMode=Propagazione
+propagationOperation=Operazione
+latestExecStatus=Ultimo stato
+startDate=Data di avvio
+endDate=Data di conclusione
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks_pt_BR.properties
new file mode 100644
index 0000000..709dc9c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PropagationTasks_pt_BR.properties
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Identificador
+accountId=Identificador da Conta
+resource=Recurso
+execute=Executar
+detail=Detalhe
+delete=Excluir
+edit=Alterar
+propagationMode=Mode de Propaga\u00E7\u00E3o
+propagationOperation=Opera\u00E7\u00E3o de Propaga\u00E7\u00E3o
+latestExecStatus=\u00DAltimo Estatus
+startDate=Data inicial
+endDate=Data Final
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/PushTasksPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PushTasksPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PushTasksPanel.properties
new file mode 100644
index 0000000..497da5a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PushTasksPanel.properties
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Id
+name=Name
+description=Description
+resourceName=Resource Name
+lastExec=Last Execution
+nextExec=Next Execution
+detail=Detail
+delete=Delete
+edit=Edit
+execute=Execute
+executeDryRun=Dry run
+userTemplate=User template
+latestExecStatus=Last status
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/PushTasksPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PushTasksPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PushTasksPanel_it.properties
new file mode 100644
index 0000000..abb82a4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PushTasksPanel_it.properties
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Id
+name=Nome
+description=Descrizione
+resourceName=Nome Risorsa
+lastExec=Ultima Esecuzione
+nextExec=Prossima Esecuzione
+detail=Dettagli
+delete=Rimuovi
+edit=Modifica
+execute=Esegui
+executeDryRun=Esecuzione simulata
+userTemplate=Modello utente
+latestExecStatus=Ultimo stato
[38/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/Todo.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Todo.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Todo.java
new file mode 100644
index 0000000..1329fe4
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Todo.java
@@ -0,0 +1,245 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.PreferenceManager;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.rest.ApprovalRestClient;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.WorkflowFormTO;
+import org.apache.wicket.Page;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+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.util.SortableDataProvider;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class Todo extends BasePage {
+
+ private static final long serialVersionUID = -7122136682275797903L;
+
+ @SpringBean
+ private ApprovalRestClient restClient;
+
+ @SpringBean
+ private PreferenceManager prefMan;
+
+ private final ModalWindow window;
+
+ private static final int WIN_HEIGHT = 400;
+
+ private static final int WIN_WIDTH = 600;
+
+ private WebMarkupContainer container;
+
+ private int paginatorRows;
+
+ public Todo(final PageParameters parameters) {
+ super(parameters);
+
+ add(window = new ModalWindow("editApprovalWin"));
+
+ container = new WebMarkupContainer("approvalContainer");
+
+ MetaDataRoleAuthorizationStrategy.authorize(
+ container, RENDER, xmlRolesReader.getEntitlement("Approval", "list"));
+
+ paginatorRows = prefMan.getPaginatorRows(getRequest(), Constants.PREF_TODO_PAGINATOR_ROWS);
+
+ List<IColumn<WorkflowFormTO, String>> columns = new ArrayList<IColumn<WorkflowFormTO, String>>();
+ columns.add(new PropertyColumn<WorkflowFormTO, String>(
+ new ResourceModel("taskId"), "taskId", "taskId"));
+ columns.add(new PropertyColumn<WorkflowFormTO, String>(
+ new ResourceModel("key"), "key", "key"));
+ columns.add(new PropertyColumn<WorkflowFormTO, String>(
+ new ResourceModel("description"), "description", "description"));
+ columns.add(new DatePropertyColumn<WorkflowFormTO>(
+ new ResourceModel("createTime"), "createTime", "createTime"));
+ columns.add(new DatePropertyColumn<WorkflowFormTO>(
+ new ResourceModel("dueDate"), "dueDate", "dueDate"));
+ columns.add(new PropertyColumn<WorkflowFormTO, String>(new ResourceModel("owner"), "owner", "owner"));
+ columns.add(new AbstractColumn<WorkflowFormTO, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<WorkflowFormTO>> cellItem, final String componentId,
+ final IModel<WorkflowFormTO> model) {
+
+ final WorkflowFormTO formTO = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.claimForm(formTO.getTaskId());
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scee) {
+ error(getString(Constants.ERROR) + ": " + scee.getMessage());
+ }
+ feedbackPanel.refresh(target);
+ target.add(container);
+ }
+ }, ActionLink.ActionType.CLAIM, "Approval");
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ApprovalModalPage(Todo.this.getPageReference(), window, formTO);
+ }
+ });
+
+ window.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, "Approval",
+ SyncopeSession.get().getUsername().equals(formTO.getOwner()));
+
+ cellItem.add(panel);
+ }
+ });
+
+ final AjaxFallbackDefaultDataTable<WorkflowFormTO, String> approvalTable =
+ new AjaxFallbackDefaultDataTable<WorkflowFormTO, String>(
+ "approvalTable", columns, new ApprovalProvider(), paginatorRows);
+ container.add(approvalTable);
+
+ container.setOutputMarkupId(true);
+ add(container);
+
+ @SuppressWarnings("rawtypes")
+ Form approvalPaginatorForm = new Form("paginatorForm");
+
+ MetaDataRoleAuthorizationStrategy.authorize(approvalPaginatorForm, RENDER,
+ xmlRolesReader.getEntitlement("Approval", "list"));
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser",
+ new PropertyModel(this, "paginatorRows"), prefMan.getPaginatorChoices());
+
+ rowsChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ prefMan.set(getRequest(), getResponse(), Constants.PREF_TODO_PAGINATOR_ROWS,
+ String.valueOf(paginatorRows));
+ approvalTable.setItemsPerPage(paginatorRows);
+
+ target.add(container);
+ }
+ });
+
+ approvalPaginatorForm.add(rowsChooser);
+ add(approvalPaginatorForm);
+
+ window.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ window.setInitialHeight(WIN_HEIGHT);
+ window.setInitialWidth(WIN_WIDTH);
+ window.setCookieName("edit-approval-modal");
+
+ setWindowClosedCallback(window, container);
+ }
+
+ private class ApprovalProvider extends SortableDataProvider<WorkflowFormTO, String> {
+
+ private static final long serialVersionUID = -2311716167583335852L;
+
+ private final SortableDataProviderComparator<WorkflowFormTO> comparator;
+
+ public ApprovalProvider() {
+ super();
+ //Default sorting
+ setSort("key", SortOrder.ASCENDING);
+ comparator = new SortableDataProviderComparator<WorkflowFormTO>(this);
+ }
+
+ @Override
+ public Iterator<WorkflowFormTO> iterator(final long first, final long count) {
+ final List<WorkflowFormTO> list = restClient.getForms();
+
+ Collections.sort(list, comparator);
+
+ return list.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return restClient.getForms().size();
+ }
+
+ @Override
+ public IModel<WorkflowFormTO> model(final WorkflowFormTO configuration) {
+ return new AbstractReadOnlyModel<WorkflowFormTO>() {
+
+ private static final long serialVersionUID = -2566070996511906708L;
+
+ @Override
+ public WorkflowFormTO getObject() {
+ return configuration;
+ }
+ };
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/UserModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/UserModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/UserModalPage.java
new file mode 100644
index 0000000..0215538
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/UserModalPage.java
@@ -0,0 +1,229 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.panels.DerAttrsPanel;
+import org.apache.syncope.client.console.panels.MembershipsPanel;
+import org.apache.syncope.client.console.panels.PlainAttrsPanel;
+import org.apache.syncope.client.console.panels.ResourcesPanel;
+import org.apache.syncope.client.console.panels.SecurityQuestionPanel;
+import org.apache.syncope.client.console.panels.UserDetailsPanel;
+import org.apache.syncope.client.console.panels.VirAttrsPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+
+/**
+ * Modal window with User form.
+ */
+public abstract class UserModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 5002005009737457667L;
+
+ protected final PageReference pageRef;
+
+ protected final ModalWindow window;
+
+ protected UserTO userTO;
+
+ protected final Mode mode;
+
+ private Fragment fragment = null;
+
+ private final boolean resetPassword;
+
+ protected final AjaxCheckBoxPanel storePassword;
+
+ public UserModalPage(final PageReference callerPageRef, final ModalWindow window, final UserTO userTO,
+ final Mode mode, final boolean resetPassword) {
+
+ super();
+
+ this.pageRef = callerPageRef;
+ this.window = window;
+ this.userTO = userTO;
+ this.mode = mode;
+ this.resetPassword = resetPassword;
+
+ fragment = new Fragment("userModalFrag", "userModalEditFrag", this);
+ fragment.setOutputMarkupId(true);
+ add(fragment);
+
+ storePassword = new AjaxCheckBoxPanel("storePassword", "storePassword",
+ new Model<Boolean>(Boolean.TRUE));
+ }
+
+ public UserTO getUserTO() {
+ return userTO;
+ }
+
+ public void setUserTO(final UserTO userTO) {
+ this.userTO = userTO;
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ protected Form setupEditPanel() {
+ fragment.add(new Label("id", userTO.getKey() == 0
+ ? StringUtils.EMPTY
+ : userTO.getUsername()));
+
+ fragment.add(new Label("new", userTO.getKey() == 0
+ ? new ResourceModel("new")
+ : new Model(StringUtils.EMPTY)));
+
+ final Form form = new Form("UserForm");
+ form.setModel(new CompoundPropertyModel(userTO));
+
+ //--------------------------------
+ // User details
+ //--------------------------------
+ form.add(new UserDetailsPanel("details", userTO, form, resetPassword, mode == Mode.TEMPLATE));
+
+ form.add(new Label("statuspanel", ""));
+
+ form.add(new Label("pwdChangeInfo", ""));
+
+ form.add(new Label("securityQuestion", ""));
+ form.addOrReplace(new SecurityQuestionPanel("securityQuestion", userTO));
+
+ form.add(new Label("accountinformation", ""));
+ //--------------------------------
+
+ //--------------------------------
+ // Store password internally checkbox
+ //--------------------------------
+ final Fragment storePwdFragment = new Fragment("storePwdFrag", "storePwdCheck", form);
+ storePwdFragment.setOutputMarkupId(true);
+ final Label storePasswordLabel = new Label("storePasswordLabel", new ResourceModel("storePassword"));
+ storePwdFragment.add(storePasswordLabel);
+ storePwdFragment.add(storePassword);
+ form.add(userTO.getKey() == 0 && mode != Mode.TEMPLATE
+ ? storePwdFragment : new Fragment("storePwdFrag", "emptyFragment", form));
+ //--------------------------------
+
+ //--------------------------------
+ // Attributes panel
+ //--------------------------------
+ form.add(new PlainAttrsPanel("plainAttrs", userTO, form, mode));
+ //--------------------------------
+
+ //--------------------------------
+ // Derived attributes panel
+ //--------------------------------
+ form.add(new DerAttrsPanel("derAttrs", userTO));
+ //--------------------------------
+
+ //--------------------------------
+ // Virtual attributes panel
+ //--------------------------------
+ form.add(new VirAttrsPanel("virAttrs", userTO, mode == Mode.TEMPLATE));
+ //--------------------------------
+
+ //--------------------------------
+ // Resources panel
+ //--------------------------------
+ form.add(new ResourcesPanel.Builder("resources").attributableTO(userTO).build());
+ //--------------------------------
+
+ //--------------------------------
+ // Roles panel
+ //--------------------------------
+ form.add(new MembershipsPanel("memberships", userTO, mode, null, getPageReference()));
+ //--------------------------------
+
+ final AjaxButton submit = getOnSubmit();
+
+ if (mode == Mode.ADMIN) {
+ String allowedRoles = userTO.getKey() == 0
+ ? xmlRolesReader.getEntitlement("Users", "create")
+ : xmlRolesReader.getEntitlement("Users", "update");
+ MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER, allowedRoles);
+ }
+
+ fragment.add(form);
+ form.add(submit);
+ form.setDefaultButton(submit);
+
+ final AjaxButton cancel = new AjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = 530608535790823587L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ }
+ };
+
+ cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
+
+ return form;
+ }
+
+ protected AjaxButton getOnSubmit() {
+ return new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ try {
+ submitAction(target, form);
+
+ if (pageRef.getPage() instanceof BasePage) {
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ }
+
+ closeAction(target, form);
+ } catch (Exception e) {
+ LOG.error("While creating or updating user", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+ }
+
+ protected abstract void submitAction(AjaxRequestTarget target, Form<?> form);
+
+ protected abstract void closeAction(AjaxRequestTarget target, Form<?> form);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage.java
new file mode 100644
index 0000000..ae8a5da
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/UserOwnerSelectModalPage.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.AbstractSearchResultPanel;
+import org.apache.syncope.client.console.panels.SelectOnlyUserSearchResultPanel;
+import org.apache.syncope.client.console.panels.UserSearchPanel;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.Session;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.ResourceModel;
+
+public class UserOwnerSelectModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 2106489458494696439L;
+
+ public UserOwnerSelectModalPage(final PageReference pageRef, final ModalWindow window) {
+ super();
+
+ final SelectOnlyUserSearchResultPanel searchResult =
+ new SelectOnlyUserSearchResultPanel("searchResult", true, null, pageRef, window, userRestClient);
+ add(searchResult);
+
+ final Form<?> searchForm = new Form("searchForm");
+ add(searchForm);
+
+ final UserSearchPanel searchPanel = new UserSearchPanel.Builder("searchPanel").build();
+ searchForm.add(searchPanel);
+
+ searchForm.add(new IndicatingAjaxButton("search", new ResourceModel("search")) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ final String searchCond = searchPanel.buildFIQL();
+ doSearch(target, searchCond, searchResult);
+
+ Session.get().getFeedbackMessages().clear();
+ searchPanel.getSearchFeedback().refresh(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ searchPanel.getSearchFeedback().refresh(target);
+ }
+ });
+
+ }
+
+ private void doSearch(final AjaxRequestTarget target, final String fiql,
+ final AbstractSearchResultPanel resultsetPanel) {
+
+ if (fiql == null) {
+ error(getString(Constants.SEARCH_ERROR));
+ return;
+ }
+
+ resultsetPanel.search(fiql, target);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/UserSelfModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/UserSelfModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/UserSelfModalPage.java
new file mode 100644
index 0000000..087bd69
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/UserSelfModalPage.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.commons.lang3.SerializationUtils;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.rest.UserSelfRestClient;
+import org.apache.syncope.common.lib.AttributableOperations;
+import org.apache.syncope.common.lib.mod.UserMod;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+/**
+ * Modal window with User form.
+ */
+public class UserSelfModalPage extends UserModalPage {
+
+ private static final long serialVersionUID = 603212869211672852L;
+
+ @SpringBean
+ private UserSelfRestClient restClient;
+
+ private final UserTO initialUserTO;
+
+ public UserSelfModalPage(final PageReference callerPageRef, final ModalWindow window, final UserTO userTO) {
+ super(callerPageRef, window, userTO, Mode.SELF, userTO.getKey() != 0);
+
+ this.initialUserTO = SerializationUtils.clone(userTO);
+ setupEditPanel();
+ }
+
+ @Override
+ protected void submitAction(final AjaxRequestTarget target, final Form<?> form) {
+ final UserTO updatedUserTO = (UserTO) form.getModelObject();
+
+ if (updatedUserTO.getKey() == 0) {
+ restClient.create(updatedUserTO, storePassword.getModelObject());
+ } else {
+ final UserMod userMod = AttributableOperations.diff(updatedUserTO, initialUserTO);
+
+ // update user only if it has changed
+ if (!userMod.isEmpty()) {
+ restClient.update(userMod);
+ }
+ }
+ }
+
+ @Override
+ protected void closeAction(final AjaxRequestTarget target, final Form<?> form) {
+ setResponsePage(new ResultStatusModalPage.Builder(window, userTO).mode(mode).build());
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/UserTemplateModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/UserTemplateModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/UserTemplateModalPage.java
new file mode 100644
index 0000000..2b04035
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/UserTemplateModalPage.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.common.lib.to.SyncTaskTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.form.Form;
+
+/**
+ * Modal window with User form.
+ */
+public class UserTemplateModalPage extends UserModalPage {
+
+ private static final long serialVersionUID = 511003221213581368L;
+
+ private final SyncTaskTO syncTaskTO;
+
+ public UserTemplateModalPage(final PageReference callerPageRef, final ModalWindow window,
+ final SyncTaskTO syncTaskTO) {
+
+ super(callerPageRef, window, syncTaskTO.getUserTemplate() == null
+ ? new UserTO()
+ : syncTaskTO.getUserTemplate(), Mode.TEMPLATE, true);
+
+ this.syncTaskTO = syncTaskTO;
+
+ setupEditPanel();
+ }
+
+ @Override
+ protected void submitAction(final AjaxRequestTarget target, final Form form) {
+ syncTaskTO.setUserTemplate((UserTO) form.getModelObject());
+ taskRestClient.updateSyncTask(syncTaskTO);
+ }
+
+ @Override
+ protected void closeAction(final AjaxRequestTarget target, final Form form) {
+ window.close(target);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/Users.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Users.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Users.java
new file mode 100644
index 0000000..98f93bf
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Users.java
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.AbstractSearchResultPanel;
+import org.apache.syncope.client.console.panels.AbstractSearchResultPanel.EventDataWrapper;
+import org.apache.syncope.client.console.panels.UserSearchPanel;
+import org.apache.syncope.client.console.panels.UserSearchResultPanel;
+import org.apache.syncope.client.console.rest.UserRestClient;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.Page;
+import org.apache.wicket.Session;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class Users extends BasePage {
+
+ private static final long serialVersionUID = 134681165644474568L;
+
+ private final static int EDIT_MODAL_WIN_HEIGHT = 550;
+
+ private final static int EDIT_MODAL_WIN_WIDTH = 800;
+
+ @SpringBean
+ private UserRestClient restClient;
+
+ public Users(final PageParameters parameters) {
+ super(parameters);
+
+ // Modal window for editing user attributes
+ final ModalWindow editModalWin = new ModalWindow("editModal");
+ editModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editModalWin.setInitialHeight(EDIT_MODAL_WIN_HEIGHT);
+ editModalWin.setInitialWidth(EDIT_MODAL_WIN_WIDTH);
+ editModalWin.setCookieName("edit-modal");
+ add(editModalWin);
+
+ final AbstractSearchResultPanel searchResult =
+ new UserSearchResultPanel("searchResult", true, null, getPageReference(), restClient);
+ add(searchResult);
+
+ final AbstractSearchResultPanel listResult =
+ new UserSearchResultPanel("listResult", false, null, getPageReference(), restClient);
+ add(listResult);
+
+ // create new user
+ final AjaxLink<Void> createLink = new ClearIndicatingAjaxLink<Void>("createLink", getPageReference()) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ editModalWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new EditUserModalPage(Users.this.getPageReference(), editModalWin, new UserTO());
+ }
+ });
+
+ editModalWin.show(target);
+ }
+ };
+ MetaDataRoleAuthorizationStrategy.authorize(
+ createLink, ENABLE, xmlRolesReader.getEntitlement("Users", "create"));
+ add(createLink);
+
+ setWindowClosedReloadCallback(editModalWin);
+
+ final Form<?> searchForm = new Form<>("searchForm");
+ add(searchForm);
+
+ final UserSearchPanel searchPanel = new UserSearchPanel.Builder("searchPanel").build();
+ searchForm.add(searchPanel);
+
+ final ClearIndicatingAjaxButton searchButton =
+ new ClearIndicatingAjaxButton("search", new ResourceModel("search"), getPageReference()) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ final String fiql = searchPanel.buildFIQL();
+ LOG.debug("FIQL: " + fiql);
+
+ doSearch(target, fiql, searchResult);
+
+ Session.get().getFeedbackMessages().clear();
+ searchPanel.getSearchFeedback().refresh(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+
+ searchPanel.getSearchFeedback().refresh(target);
+ }
+ };
+
+ searchForm.add(searchButton);
+ searchForm.setDefaultButton(searchButton);
+ }
+
+ private void doSearch(final AjaxRequestTarget target, final String fiql,
+ final AbstractSearchResultPanel resultsetPanel) {
+
+ if (fiql == null) {
+ error(getString(Constants.SEARCH_ERROR));
+ return;
+ }
+
+ resultsetPanel.search(fiql, target);
+ }
+
+ private void setWindowClosedReloadCallback(final ModalWindow window) {
+ window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ final EventDataWrapper data = new EventDataWrapper();
+ data.setTarget(target);
+ data.setCreate(true);
+
+ send(getPage(), Broadcast.BREADTH, data);
+
+ if (isModalResult()) {
+ // reset modal result
+ setModalResult(false);
+ // set operation succeeded
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ // refresh feedback panel
+ feedbackPanel.refresh(target);
+ }
+ }
+ });
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ViewUserModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ViewUserModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ViewUserModalPage.java
new file mode 100644
index 0000000..d47e07f
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ViewUserModalPage.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.form.Form;
+
+public class ViewUserModalPage extends EditUserModalPage {
+
+ private static final long serialVersionUID = -8715255026876951611L;
+
+ public ViewUserModalPage(final PageReference callerPageRef, final ModalWindow window, final UserTO userTO) {
+ super(callerPageRef, window, userTO);
+ form.setEnabled(false);
+ form.get(CANCEL).setVisible(false);
+ }
+
+ @Override
+ protected AjaxButton getOnSubmit() {
+ AjaxButton submit = super.getOnSubmit();
+ submit.setVisible(false);
+ return submit;
+ }
+
+ @Override
+ protected void submitAction(final AjaxRequestTarget target, final Form form) {
+ // No submit allowed, read-only form
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/VirSchemaModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/VirSchemaModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/VirSchemaModalPage.java
new file mode 100644
index 0000000..425b9cb
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/VirSchemaModalPage.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.VirSchemaTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+
+/**
+ * Modal window with Schema form.
+ */
+public class VirSchemaModalPage extends AbstractSchemaModalPage<VirSchemaTO> {
+
+ private static final long serialVersionUID = 5979623248182851337L;
+
+ public VirSchemaModalPage(final AttributableType kind) {
+ super(kind);
+ }
+
+ @Override
+ public void setSchemaModalPage(final PageReference pageRef, final ModalWindow window,
+ VirSchemaTO schema, final boolean createFlag) {
+
+ if (schema == null) {
+ schema = new VirSchemaTO();
+ }
+
+ final Form<VirSchemaTO> schemaForm = new Form<>(FORM);
+
+ schemaForm.setModel(new CompoundPropertyModel<>(schema));
+
+ final AjaxTextFieldPanel name =
+ new AjaxTextFieldPanel("key", getString("key"), new PropertyModel<String>(schema, "key"));
+ name.addRequiredLabel();
+
+ name.setEnabled(createFlag);
+
+ final AjaxCheckBoxPanel readonly = new AjaxCheckBoxPanel("readonly", getString("readonly"),
+ new PropertyModel<Boolean>(schema, "readonly"));
+
+ final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ VirSchemaTO schemaTO = (VirSchemaTO) form.getDefaultModelObject();
+ try {
+ if (createFlag) {
+ schemaRestClient.createVirSchema(kind, schemaTO);
+ } else {
+ schemaRestClient.updateVirSchema(kind, schemaTO);
+ }
+ if (pageRef.getPage() instanceof BasePage) {
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ }
+
+ window.close(target);
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+
+ final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+ };
+
+ cancel.setDefaultFormProcessing(false);
+
+ String allowedRoles = createFlag
+ ? xmlRolesReader.getEntitlement("Schema", "create")
+ : xmlRolesReader.getEntitlement("Schema", "update");
+
+ MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, allowedRoles);
+
+ schemaForm.add(name);
+ schemaForm.add(readonly);
+
+ schemaForm.add(submit);
+ schemaForm.add(cancel);
+
+ add(schemaForm);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/WelcomePage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/WelcomePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/WelcomePage.java
new file mode 100644
index 0000000..d9f884d
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/WelcomePage.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.SyncopeApplication;
+import org.apache.syncope.client.console.commons.XMLRolesReader;
+import org.apache.syncope.client.console.rest.UserSelfRestClient;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+/**
+ * Welcome page to display after successful login.
+ */
+public class WelcomePage extends WebPage {
+
+ private static final long serialVersionUID = 8851399358753120581L;
+
+ @SpringBean
+ private XMLRolesReader xmlRolesReader;
+
+ @SpringBean
+ private UserSelfRestClient userSelfRestClient;
+
+ public WelcomePage(final PageParameters parameters) {
+ super(parameters);
+ setupNavigationPanel();
+ setupEditProfileModal();
+ }
+
+ //To prevent warning: "leaking this in constructor java"
+ private void setupNavigationPanel() {
+ ((SyncopeApplication) getApplication()).setupNavigationPanel(this, xmlRolesReader, false);
+ }
+
+ private void setupEditProfileModal() {
+ ((SyncopeApplication) getApplication()).setupEditProfileModal(this, userSelfRestClient);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
new file mode 100644
index 0000000..b5a8d10
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.rest.WorkflowRestClient;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.markup.html.form.Button;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.TextArea;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.apache.wicket.util.io.IOUtils;
+
+public class XMLEditorPopupPage extends BasePopupPage {
+
+ private static final long serialVersionUID = 5816041644635271734L;
+
+ @SpringBean
+ private WorkflowRestClient wfRestClient;
+
+ public XMLEditorPopupPage() {
+ Form wfForm = new Form("workflowDefForm");
+
+ String definition;
+ try {
+ definition = IOUtils.toString(wfRestClient.getDefinition(MediaType.APPLICATION_XML_TYPE));
+ } catch (IOException e) {
+ LOG.error("Could not get workflow definition", e);
+ definition = StringUtils.EMPTY;
+ }
+ final TextArea<String> workflowDefArea = new TextArea<String>("workflowDefArea", new Model<String>(definition));
+ wfForm.add(workflowDefArea);
+
+ AjaxButton submit =
+ new ClearIndicatingAjaxButton(APPLY, new Model<String>(getString(SUBMIT)), getPageReference()) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ try {
+ wfRestClient.updateDefinition(
+ MediaType.APPLICATION_XML_TYPE, workflowDefArea.getModelObject());
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scee) {
+ error(getString(Constants.ERROR) + ": " + scee.getMessage());
+ }
+ feedbackPanel.refresh(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+
+ final Button close = new Button("closePage", new Model<String>(getString(CANCEL)));
+
+ MetaDataRoleAuthorizationStrategy.authorize(
+ submit, ENABLE, xmlRolesReader.getEntitlement("Configuration", "workflowDefUpdate"));
+ wfForm.add(submit);
+ wfForm.add(close);
+ this.add(wfForm);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractExtensionPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractExtensionPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractExtensionPanel.java
new file mode 100644
index 0000000..a785e9f
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractExtensionPanel.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import org.apache.syncope.client.console.commons.XMLRolesReader;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public abstract class AbstractExtensionPanel extends Panel {
+
+ private static final long serialVersionUID = 4627828052717627159L;
+
+ @SpringBean
+ protected XMLRolesReader xmlRolesReader;
+
+ protected PageReference pageref;
+
+ public AbstractExtensionPanel(final String id, final PageReference pageref) {
+ super(id);
+ this.pageref = pageref;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractProvisioningTasksPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractProvisioningTasksPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractProvisioningTasksPanel.java
new file mode 100644
index 0000000..e066aac
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractProvisioningTasksPanel.java
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.PushTaskModalPage;
+import org.apache.syncope.client.console.pages.SyncTaskModalPage;
+import org.apache.syncope.client.console.pages.Tasks;
+import org.apache.syncope.client.console.pages.Tasks.TasksProvider;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.common.lib.to.AbstractProvisioningTaskTO;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.PushTaskTO;
+import org.apache.syncope.common.lib.to.SyncTaskTO;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.request.http.WebResponse;
+
+public abstract class AbstractProvisioningTasksPanel<T extends AbstractProvisioningTaskTO> extends AbstractTasks {
+
+ private static final long serialVersionUID = -8674781241465369244L;
+
+ private final int paginatorRows;
+
+ protected WebMarkupContainer container;
+
+ protected ModalWindow window;
+
+ protected AjaxDataTablePanel<AbstractTaskTO, String> table;
+
+ private final Class<T> reference;
+
+ public AbstractProvisioningTasksPanel(final String id, final PageReference pageRef, final Class<T> reference) {
+ super(id, pageRef);
+
+ this.reference = reference;
+
+ container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+ add(container);
+
+ window = new ModalWindow("taskWin");
+ window.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ window.setInitialHeight(WIN_HEIGHT);
+ window.setInitialWidth(WIN_WIDTH);
+ window.setCookieName(VIEW_TASK_WIN_COOKIE_NAME);
+ add(window);
+
+ ((Tasks) pageRef.getPage()).setWindowClosedCallback(window, container);
+
+ paginatorRows = prefMan.getPaginatorRows(getWebRequest(), Constants.PREF_SYNC_TASKS_PAGINATOR_ROWS);
+ }
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ if (event.getPayload() instanceof AbstractSearchResultPanel.EventDataWrapper) {
+ ((AbstractSearchResultPanel.EventDataWrapper) event.getPayload()).getTarget().add(container);
+ }
+ }
+
+ protected void initTasksTable() {
+
+ table = Tasks.updateTaskTable(
+ getColumns(),
+ new TasksProvider<T>(restClient, paginatorRows, getId(), this.reference),
+ container,
+ 0,
+ this.pageRef,
+ restClient);
+
+ Form paginatorForm = new Form("PaginatorForm");
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this, "paginatorRows"),
+ prefMan.getPaginatorChoices());
+
+ rowsChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ prefMan.set(getWebRequest(), (WebResponse) getResponse(), Constants.PREF_SYNC_TASKS_PAGINATOR_ROWS,
+ String.valueOf(paginatorRows));
+
+ table = Tasks.updateTaskTable(
+ getColumns(),
+ new TasksProvider<T>(restClient, paginatorRows, getId(), reference),
+ container,
+ table == null ? 0 : (int) table.getCurrentPage(),
+ pageRef,
+ restClient);
+
+ target.add(container);
+ }
+ });
+
+ paginatorForm.add(rowsChooser);
+ container.add(paginatorForm);
+
+ // create new task
+ AjaxLink<Void> createLink = new ClearIndicatingAjaxLink<Void>("createLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return reference.equals(SyncTaskTO.class)
+ ? new SyncTaskModalPage(window, new SyncTaskTO(), pageRef)
+ : new PushTaskModalPage(window, new PushTaskTO(), pageRef);
+ }
+ });
+
+ window.show(target);
+ }
+ };
+
+ MetaDataRoleAuthorizationStrategy.authorize(
+ createLink, RENDER, xmlRolesReader.getEntitlement(TASKS, "create"));
+
+ add(createLink);
+
+ }
+
+ protected abstract List<IColumn<AbstractTaskTO, String>> getColumns();
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchPanel.java
new file mode 100644
index 0000000..d610739
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchPanel.java
@@ -0,0 +1,401 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.math.NumberUtils;
+import org.apache.cxf.jaxrs.ext.search.ConditionType;
+import org.apache.cxf.jaxrs.ext.search.SearchBean;
+import org.apache.cxf.jaxrs.ext.search.SearchCondition;
+import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition;
+import org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser;
+import org.apache.syncope.client.console.rest.AuthRestClient;
+import org.apache.syncope.client.console.rest.ResourceRestClient;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.common.lib.search.RoleFiqlSearchConditionBuilder;
+import org.apache.syncope.common.lib.search.SearchableFields;
+import org.apache.syncope.common.lib.search.SpecialAttr;
+import org.apache.syncope.common.lib.search.SyncopeFiqlSearchConditionBuilder;
+import org.apache.syncope.common.lib.search.SyncopeProperty;
+import org.apache.syncope.common.lib.search.UserFiqlSearchConditionBuilder;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.wicket.feedback.FeedbackMessage;
+import org.apache.wicket.feedback.IFeedbackMessageFilter;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class AbstractSearchPanel extends Panel {
+
+ private static final long serialVersionUID = 5922413053568696414L;
+
+ /**
+ * Logger.
+ */
+ protected static final Logger LOG = LoggerFactory.getLogger(AbstractSearchPanel.class);
+
+ @SpringBean
+ protected SchemaRestClient schemaRestClient;
+
+ @SpringBean
+ protected ResourceRestClient resourceRestClient;
+
+ @SpringBean
+ protected AuthRestClient authRestClient;
+
+ protected IModel<List<String>> dnames;
+
+ protected IModel<List<String>> anames;
+
+ protected IModel<List<String>> resourceNames;
+
+ protected IModel<List<String>> entitlements;
+
+ protected IModel<List<SearchClause.Type>> types;
+
+ protected IModel<List<String>> roleNames;
+
+ protected NotificationPanel searchFeedback;
+
+ protected List<SearchClause> searchClauses;
+
+ protected WebMarkupContainer searchFormContainer;
+
+ protected AttributableType attributableType;
+
+ protected boolean required;
+
+ protected AbstractSearchPanel(final String id, final AttributableType attributableType) {
+ this(id, attributableType, null, true);
+ }
+
+ protected AbstractSearchPanel(final String id, final AttributableType attributableType,
+ final String fiql, final boolean required) {
+
+ super(id);
+ populate();
+
+ this.attributableType = attributableType;
+ this.required = required;
+
+ setOutputMarkupId(true);
+
+ searchFormContainer = new WebMarkupContainer("searchFormContainer");
+ searchFormContainer.setOutputMarkupId(true);
+
+ searchFeedback = new NotificationPanel("searchFeedback", "notificationpanel_top_right",
+ new IFeedbackMessageFilter() {
+
+ private static final long serialVersionUID = 6895024863321391672L;
+
+ @Override
+ public boolean accept(final FeedbackMessage message) {
+ boolean result;
+
+ // messages reported on the session have a null reporter
+ if (message.getReporter() == null) {
+ result = false;
+ } else {
+ // only accept messages coming from the children of the search form container
+ result = searchFormContainer.contains(message.getReporter(), true);
+ }
+
+ return result;
+ }
+ });
+ searchFeedback.setOutputMarkupId(true);
+ add(searchFeedback);
+
+ this.searchClauses = new ArrayList<>();
+ this.searchClauses.add(new SearchClause());
+ if (StringUtils.isNotBlank(fiql)) {
+ try {
+ FiqlParser<SearchBean> fiqlParser = new FiqlParser<>(
+ SearchBean.class, SyncopeFiqlSearchConditionBuilder.CONTEXTUAL_PROPERTIES);
+ List<SearchClause> parsed = getSearchClauses(fiqlParser.parse(fiql));
+
+ this.searchClauses.clear();
+ this.searchClauses.addAll(parsed);
+ } catch (Exception e) {
+ LOG.error("Unparseable FIQL expression '{}'", fiql, e);
+ }
+ }
+
+ searchFormContainer.add(new SearchView("searchView", searchClauses, searchFormContainer, required,
+ types, anames, dnames, roleNames, resourceNames, entitlements));
+ add(searchFormContainer);
+ }
+
+ protected void populate() {
+ dnames = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ return SearchableFields.get(
+ attributableType == AttributableType.USER ? SubjectType.USER : SubjectType.ROLE);
+ }
+ };
+
+ anames = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ return schemaRestClient.getPlainSchemaNames(attributableType);
+ }
+ };
+
+ resourceNames = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ List<ResourceTO> resourceTOs = resourceRestClient.getAll();
+
+ List<String> result = new ArrayList<>(resourceTOs.size());
+
+ for (ResourceTO resource : resourceTOs) {
+ result.add(resource.getKey());
+ }
+
+ return result;
+ }
+ };
+
+ entitlements = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ List<String> result = authRestClient.getOwnedEntitlements();
+ Collections.sort(result);
+ return result;
+ }
+ };
+ }
+
+ public NotificationPanel getSearchFeedback() {
+ return searchFeedback;
+ }
+
+ private SearchClause getPrimitiveSearchClause(final SearchCondition<SearchBean> sc) {
+ SearchClause searchClause = new SearchClause();
+
+ String property = sc.getCondition().getKeySet().iterator().next();
+ searchClause.setProperty(property);
+ String value = sc.getCondition().get(property);
+ searchClause.setValue(value);
+
+ if (SpecialAttr.ROLES.toString().equals(property)) {
+ searchClause.setType(SearchClause.Type.MEMBERSHIP);
+ for (String label : roleNames.getObject()) {
+ if (value.equals(label.substring(0, label.indexOf(' ')))) {
+ searchClause.setProperty(label);
+ }
+ }
+ } else if (SpecialAttr.RESOURCES.toString().equals(property)) {
+ searchClause.setType(SearchClause.Type.RESOURCE);
+ } else if (SpecialAttr.ENTITLEMENTS.toString().equals(property)) {
+ searchClause.setType(SearchClause.Type.ENTITLEMENT);
+ } else {
+ searchClause.setType(SearchClause.Type.ATTRIBUTE);
+ }
+
+ switch (sc.getConditionType()) {
+ case EQUALS:
+ searchClause.setComparator(SpecialAttr.NULL.toString().equals(value)
+ ? SearchClause.Comparator.IS_NULL : SearchClause.Comparator.EQUALS);
+ break;
+
+ case NOT_EQUALS:
+ searchClause.setComparator(SpecialAttr.NULL.toString().equals(value)
+ ? SearchClause.Comparator.IS_NOT_NULL : SearchClause.Comparator.NOT_EQUALS);
+ break;
+
+ case GREATER_OR_EQUALS:
+ searchClause.setComparator(SearchClause.Comparator.GREATER_OR_EQUALS);
+ break;
+
+ case GREATER_THAN:
+ searchClause.setComparator(SearchClause.Comparator.GREATER_THAN);
+ break;
+
+ case LESS_OR_EQUALS:
+ searchClause.setComparator(SearchClause.Comparator.LESS_OR_EQUALS);
+ break;
+
+ case LESS_THAN:
+ searchClause.setComparator(SearchClause.Comparator.LESS_THAN);
+ break;
+
+ default:
+ break;
+ }
+
+ return searchClause;
+ }
+
+ private List<SearchClause> getCompoundSearchClause(final SearchCondition<SearchBean> sc) {
+ List<SearchClause> clauses = new ArrayList<SearchClause>();
+
+ for (SearchCondition<SearchBean> searchCondition : sc.getSearchConditions()) {
+ if (searchCondition.getStatement() == null) {
+ clauses.addAll(getCompoundSearchClause(searchCondition));
+ } else {
+ SearchClause clause = getPrimitiveSearchClause(searchCondition);
+ if (sc.getConditionType() == ConditionType.AND) {
+ clause.setOperator(SearchClause.Operator.AND);
+ }
+ if (sc.getConditionType() == ConditionType.OR) {
+ clause.setOperator(SearchClause.Operator.OR);
+ }
+ clauses.add(clause);
+ }
+ }
+
+ return clauses;
+ }
+
+ private List<SearchClause> getSearchClauses(final SearchCondition<SearchBean> sc) {
+ List<SearchClause> clauses = new ArrayList<SearchClause>();
+
+ if (sc.getStatement() == null) {
+ clauses.addAll(getCompoundSearchClause(sc));
+ } else {
+ clauses.add(getPrimitiveSearchClause(sc));
+ }
+
+ return clauses;
+ }
+
+ protected abstract SyncopeFiqlSearchConditionBuilder getSearchConditionBuilder();
+
+ public String buildFIQL() {
+ LOG.debug("Generating FIQL from List<SearchClause>: {}", searchClauses);
+
+ if (searchClauses.isEmpty() || searchClauses.get(0).getType() == null) {
+ return StringUtils.EMPTY;
+ }
+
+ SyncopeFiqlSearchConditionBuilder builder = getSearchConditionBuilder();
+
+ CompleteCondition prevCondition;
+ CompleteCondition condition = null;
+ for (int i = 0; i < searchClauses.size(); i++) {
+ prevCondition = condition;
+
+ switch (searchClauses.get(i).getType()) {
+ case ENTITLEMENT:
+ condition = searchClauses.get(i).getComparator() == SearchClause.Comparator.EQUALS
+ ? ((RoleFiqlSearchConditionBuilder) builder).
+ hasEntitlements(searchClauses.get(i).getProperty())
+ : ((RoleFiqlSearchConditionBuilder) builder).
+ hasNotEntitlements(searchClauses.get(i).getProperty());
+ break;
+
+ case MEMBERSHIP:
+ Long roleId = NumberUtils.toLong(searchClauses.get(i).getProperty().split(" ")[0]);
+ condition = searchClauses.get(i).getComparator() == SearchClause.Comparator.EQUALS
+ ? ((UserFiqlSearchConditionBuilder) builder).hasRoles(roleId)
+ : ((UserFiqlSearchConditionBuilder) builder).hasNotRoles(roleId);
+ break;
+
+ case RESOURCE:
+ condition = searchClauses.get(i).getComparator() == SearchClause.Comparator.EQUALS
+ ? builder.hasResources(searchClauses.get(i).getProperty())
+ : builder.hasNotResources(searchClauses.get(i).getProperty());
+ break;
+
+ case ATTRIBUTE:
+ SyncopeProperty property = builder.is(searchClauses.get(i).getProperty());
+ switch (searchClauses.get(i).getComparator()) {
+ case IS_NULL:
+ condition = builder.isNull(searchClauses.get(i).getProperty());
+ break;
+
+ case IS_NOT_NULL:
+ condition = builder.isNotNull(searchClauses.get(i).getProperty());
+ break;
+
+ case LESS_THAN:
+ condition = StringUtils.isNumeric(searchClauses.get(i).getProperty())
+ ? property.lessThan(NumberUtils.toDouble(searchClauses.get(i).getValue()))
+ : property.lexicalBefore(searchClauses.get(i).getValue());
+ break;
+
+ case LESS_OR_EQUALS:
+ condition = StringUtils.isNumeric(searchClauses.get(i).getProperty())
+ ? property.lessOrEqualTo(NumberUtils.toDouble(searchClauses.get(i).getValue()))
+ : property.lexicalNotAfter(searchClauses.get(i).getValue());
+ break;
+
+ case GREATER_THAN:
+ condition = StringUtils.isNumeric(searchClauses.get(i).getProperty())
+ ? property.greaterThan(NumberUtils.toDouble(searchClauses.get(i).getValue()))
+ : property.lexicalAfter(searchClauses.get(i).getValue());
+ break;
+
+ case GREATER_OR_EQUALS:
+ condition = StringUtils.isNumeric(searchClauses.get(i).getProperty())
+ ? property.greaterOrEqualTo(NumberUtils.toDouble(searchClauses.get(i).getValue()))
+ : property.lexicalNotBefore(searchClauses.get(i).getValue());
+ break;
+
+ case NOT_EQUALS:
+ condition = property.notEqualTo(searchClauses.get(i).getValue());
+ break;
+
+ case EQUALS:
+ default:
+ condition = property.equalTo(searchClauses.get(i).getValue());
+ break;
+ }
+ default:
+ break;
+ }
+
+ if (i > 0) {
+ if (searchClauses.get(i).getOperator() == SearchClause.Operator.AND) {
+ condition = builder.and(prevCondition, condition);
+ }
+ if (searchClauses.get(i).getOperator() == SearchClause.Operator.OR) {
+ condition = builder.or(prevCondition, condition);
+ }
+ }
+ }
+
+ String fiql = condition == null ? StringUtils.EMPTY : condition.query();
+ LOG.debug("Generated FIQL: {}", fiql);
+ return fiql;
+ }
+}
[26/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage.properties
new file mode 100644
index 0000000..7ba550c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Bulk Action Result
+close=Close
+bulkActionResultLabel=Result
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage_it.properties
new file mode 100644
index 0000000..4268c00
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage_it.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Risultato esecuzion Bulk Action
+close=Chiudi
+bulkActionResultLabel=Esito
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage_pt_BR.properties
new file mode 100644
index 0000000..00c3a51
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BulkActionResultModalPage_pt_BR.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Resultado da A\u00E7\u00E3o Composta
+close=Fechar
+bulkActionResultLabel=Implantar
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage.html
new file mode 100644
index 0000000..4ce5575
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage.html
@@ -0,0 +1,39 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div style="margin: 5px;">
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <wicket:message key="title"/>
+ </p>
+ <form wicket:id="confForm">
+ <span wicket:id="paramAttrs"/>
+
+ <div style="bottom:0;margin:10px">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="submit"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage.properties
new file mode 100644
index 0000000..363bef4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Parameters
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage_it.properties
new file mode 100644
index 0000000..0fd85ae
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage_it.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Parametri
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage_pt_BR.properties
new file mode 100644
index 0000000..e7f3992
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfModalPage_pt_BR.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Par\u00e2metros
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration.html
new file mode 100644
index 0000000..931bf2b
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration.html
@@ -0,0 +1,230 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <script type="text/javascript">
+ $(document).ready(function () {
+ $("#policies").tabs();
+ $("#logs").tabs();
+ $("#layouts").tabs();
+ });
+ </script>
+ </wicket:head>
+
+ <wicket:extend>
+
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected">
+ <a href="#layouts"><span><wicket:message key="layouts"/></span></a>
+ </li>
+ <li><a href="#policies"><span><wicket:message key="policies"/></span></a></li>
+ <li><a href="#notifications"><span><wicket:message key="notifications"/></span></a></li>
+ <li><a href="#securityQuestions"><span><wicket:message key="securityQuestions"/></span></a></li>
+ <li><a href="#workflow"><span><wicket:message key="workflow"/></span></a></li>
+ <li><a href="#logs"><span><wicket:message key="logs"/></span></a></li>
+ <li><a href="#ext"><span><wicket:message key="ext"/></span></a></li>
+ </ul>
+ <div id="layouts">
+ <ul>
+ <li class="tabs-selected">
+ <a href="#adminUser"><span><wicket:message key="adminUser"/></span></a>
+ </li>
+ <li><a href="#selfUser"><span><wicket:message key="selfUser"/></span></a></li>
+ <li><a href="#adminRole"><span><wicket:message key="adminRole"/></span></a></li>
+ <li><a href="#selfRole"><span><wicket:message key="selfRole"/></span></a></li>
+ <li><a href="#adminMembership"><span><wicket:message key="adminMembership"/></span></a></li>
+ <li><a href="#selfMembership"><span><wicket:message key="selfMembership"/></span></a></li>
+ </ul>
+ <div id="adminUser" style="border-width: 1px;border-top-width: 0px;">
+ <span wicket:id="adminUserLayoutPanel">[admin user layout panel]</span>
+ </div>
+ <div id="selfUser" style="border-width: 1px;border-top-width: 0px;">
+ <span wicket:id="selfUserLayoutPanel">[self user layout panel]</span>
+ </div>
+ <div id="adminRole" style="border-width: 1px;border-top-width: 0px;">
+ <span wicket:id="adminRoleLayoutPanel">[admin role layout panel]</span>
+ </div>
+ <div id="selfRole" style="border-width: 1px;border-top-width: 0px;">
+ <span wicket:id="selfRoleLayoutPanel">[self role layout panel]</span>
+ </div>
+ <div id="adminMembership" style="border-width: 1px;border-top-width: 0px;">
+ <span wicket:id="adminMembershipLayoutPanel">[admin membership layout panel]</span>
+ </div>
+ <div id="selfMembership" style="border-width: 1px;border-top-width: 0px;">
+ <span wicket:id="selfMembershipLayoutPanel">[self membership layout panel]</span>
+ </div>
+ </div>
+ <div id="policies">
+ <ul>
+ <li class="tabs-selected">
+ <a href="#account"><span><wicket:message key="account"/></span></a>
+ </li>
+ <li><a href="#password"><span><wicket:message key="password"/></span></a></li>
+ <li><a href="#sync"><span><wicket:message key="sync"/></span></a></li>
+ </ul>
+ <div id="account" style="border-width: 1px;border-top-width: 0px;">
+ <span wicket:id="accountPoliciesPanel">[account policies]</span>
+ </div>
+ <div id="password" style="border-width: 1px;border-top-width: 0px;">
+ <span wicket:id="passwordPoliciesPanel">[password policies]</span>
+ </div>
+ <div id="sync" style="border-width: 1px;border-top-width: 0px;">
+ <span wicket:id="syncPoliciesPanel">[sync policies]</span>
+ </div>
+ </div>
+ <div id="notifications">
+ <div id="users-contain" class="ui-widget" style="width:inherit">
+ <span wicket:id="notificationContainer">
+ <table class="ui-widget ui-widget-content table-hover"
+ wicket:id="notificationTable"/>
+ </span>
+
+ <span style="float:right">
+ <form wicket:id="notificationPaginatorForm" style="display:inline">
+ <label><wicket:message key="displayRows"/></label>
+ <select class="text ui-widget-content ui-corner-all"
+ wicket:id="rowsChooser"/>
+ </form>
+ </span>
+ </div>
+
+ <div wicket:id="createNotificationWin">[Show modal window for creating notification]</div>
+ <div wicket:id="editNotificationWin">[Show modal window for editing notification]</div>
+
+ <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="createNotificationLink">
+ <wicket:message key="create"/>
+ </a>
+ </div>
+ <div id="securityQuestions">
+ <div id="users-contain" class="ui-widget" style="width:inherit">
+ <span wicket:id="securityQuestionContainer">
+ <table class="ui-widget ui-widget-content table-hover"
+ wicket:id="securityQuestionTable"/>
+ </span>
+ </div>
+
+ <div wicket:id="createSecurityQuestionWin">[Show modal window for creating security questions]</div>
+ <div wicket:id="editSecurityQuestionWin">[Show modal window for editing security questions]</div>
+
+ <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="createSecurityQuestionLink">
+ <wicket:message key="create"/>
+ </a>
+ </div>
+ <div id="workflow">
+ <div id="users-contain" class="ui-widget" style="width:inherit">
+ <span wicket:id="noActivitiEnabledForUsers"><i><wicket:message key="noActivitiEnabledForUsers"/></i></span>
+ <span wicket:id="workflowDefContainer">
+ <div style="float: left;">
+ <button wicket:id="activitiModeler" style="width: 122px">
+ <div style="display: table-row;">
+ <div style="display: table-cell">
+ <img src="img/modeler.png" alt="Activiti Modeler" title="Activiti Modeler"/>
+ </div>
+ <div style="display: table-cell;vertical-align:middle;font-size:62.5%;">
+ Activiti Modeler
+ </div>
+ </div>
+ </button>
+ </div>
+ <div>
+ <button wicket:id="xmlEditor" style="width: 122px">
+ <div style="display: table-row;">
+ <div style="display: table-cell">
+ <img src="img/xml.png" alt="XML editor" title="XML editor"/>
+ </div>
+ <div style="display: table-cell;vertical-align:middle;font-size:62.5%;">
+ XML editor
+ </div>
+ </div>
+ </button>
+ </div>
+ <img wicket:id="workflowDefDiagram" style="width: 100%;"/>
+ </span>
+ </div>
+ </div>
+ <div id="logs">
+ <ul>
+ <li class="tabs-selected">
+ <a href="#core"><span>Core</span></a>
+ </li>
+ <li><a href="#console"><span>Console</span></a></li>
+ </ul>
+ <div id="core" style="border-width: 1px;border-top-width: 0px;">
+ <div id="users-contain" class="ui-widget" style="width:inherit">
+ <span wicket:id="coreLoggerContainer">
+ <table class="ui-widget ui-widget-content table-hover">
+ <thead class="ui-widget-header">
+ <tr class="heaaders">
+ <th><wicket:message key="logger"/></th>
+ <th><wicket:message key="level"/></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr wicket:id="corelogger">
+ <td><span wicket:id="key"/></td>
+ <td id="level"><select wicket:id="level"/></td>
+ </tr>
+ </tbody>
+ </table>
+ </span>
+ </div>
+ </div>
+ <div id="console" style="border-width: 1px;border-top-width: 0px;">
+ <div id="users-contain" class="ui-widget" style="width:inherit">
+ <span wicket:id="consoleLoggerContainer">
+ <table class="ui-widget ui-widget-content table-hover">
+ <thead class="ui-widget-header">
+ <tr class="heaaders">
+ <th><wicket:message key="logger"/></th>
+ <th><wicket:message key="level"/></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr wicket:id="consolelogger">
+ <td><span wicket:id="key"/></td>
+ <td id="level"><select wicket:id="level"/></td>
+ </tr>
+ </tbody>
+ </table>
+ </span>
+ </div>
+ </div>
+ </div>
+ <div id="ext" wicket:id="extPanels">
+ </div>
+ <div>
+ <div wicket:id="parameters">
+ <a style="position: absolute; top: 2px; right:50px;" wicket:id="confLink">
+ <img src="img/actions/settings-icon.png" width="30" height="30"
+ alt="Parameters" title="title" wicket:message="title:parameters"/>
+ </a>
+ </div>
+ <div wicket:id="syncopeConfWin">[Show modal window for conf parameters]</div>
+
+ <a style="position: absolute; top: 2px; right:20px;" wicket:id="dbExportLink">
+ <img src="img/db_export.png" width="30" height="30"
+ alt="DB export" title="title" wicket:message="title:db_export"/>
+ </a>
+ </div>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration.properties
new file mode 100644
index 0000000..19d534f
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration.properties
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+parameters=Parameters
+password=Password
+account=Account
+sync=Synchronization
+notifications=Notifications
+workflow=Workflow
+coreLog=Core Log
+consoleLog=Console Log
+edit=Edit
+delete=Delete
+db_export=DB export
+logger=Logger
+level=Level
+events=Events
+template=Template
+traceLevel=Trace level
+subject=Subject
+noActivitiEnabledForUsers=Activiti not enabled for users
+policies=Policies
+logs=Logs
+active=Enabled
+apply=Save
+securityQuestions=Security Questions
+content=Text
+layouts=Layouts
+adminUser=Administrator User Form
+selfUser=Self User Form
+adminRole=Administrator Role Form
+selfRole=Self Role Form
+adminMembership=Administrator Membership Form
+selfMembership=Self Membership Form
+ext=Extensions
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration_it.properties
new file mode 100644
index 0000000..0f13761
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration_it.properties
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+parameters=Parametri
+password=Password
+account=Account
+sync=Sincronizzazione
+notifications=Notifiche
+workflow=Workflow
+coreLog=Log Core
+consoleLog=Log Console
+edit=Modifica
+delete=Rimuovi
+db_export=Esportazione DB
+logger=Logger
+level=Livello
+events=Eventi
+template=Modello
+traceLevel=Tracciamento
+subject=Oggetto
+noActivitiEnabledForUsers=Activiti non configurato per gli utenti
+policies=Politiche
+logs=Logs
+active=Abilitata
+apply=Salva
+securityQuestions=Domande di sicurezza
+content=Testo
+layouts=Layouts
+adminUser=Form Amministrazione Utente
+selfUser=Form Utente
+adminRole=Form Amministrazione Ruolo
+selfRole=Form Ruolo
+adminMembership=Form Amministrazione Membership
+selfMembership=Form Membership
+ext=Estensioni
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration_pt_BR.properties
new file mode 100644
index 0000000..63f19b7
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Configuration_pt_BR.properties
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+parameters=Par\u00e2metros
+password=Senha
+account=Conta
+sync=Sincroniza\u00e7\u00e3o
+notifications=Notifica\u00e7\u00f5es
+workflow=Fluxo de Trabalho
+coreLog=Log Central
+consoleLog=Log do Console
+edit=Editar
+delete=Excluir
+db_export=Exportar Banco de Dados
+logger=Logger
+level=N\u00edvel
+events=Eventos
+template=Template
+traceLevel=N\u00edvel de Trace
+subject=Assunto
+noActivitiEnabledForUsers=Activiti n\u00e3o habilitado para usu\u00e1rios
+policies=Pol\u00edticas
+logs=Logs
+active=Ativada
+apply=Salvar
+securityQuestions=Quest\u00f5es de seguran\u00e7a
+content=Texto
+layouts=Layouts
+adminUser=Forma do usu\u00e1rio de administra\u00e7\u00e3o
+selfUser=Forma Usu\u00e1rio
+adminRole=Forma Fun\u00e7\u00e3o de administra\u00e7\u00e3o
+selfRole=Form Fun\u00e7\u00e3o
+adminMembership=Forma de membro de administra\u00e7\u00e3o
+selfMembership=Forma Membro
+ext=Extens\u00f5es
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage.html
new file mode 100644
index 0000000..2471b30
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage.html
@@ -0,0 +1,55 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div>
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+ <form wicket:id="form">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="password"><wicket:message key="password"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="password">[password]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="confirmPassword"><wicket:message key="confirmPassword"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="confirmPassword">[confirmPassword]</span>
+ </div>
+ </div>
+ </div>
+
+ <div style="margin: 20px 10px 0">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage.properties
new file mode 100644
index 0000000..eb8d9f6
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Password reset
+submit=Submit
+password=Password
+confirmPassword=Password (confirm)
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage_it.properties
new file mode 100644
index 0000000..2254365
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage_it.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Password smarrita
+submit=Invia
+password=Password
+confirmPassword=Password (conferma)
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage_pt_BR.properties
new file mode 100644
index 0000000..fa270b9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConfirmPasswordResetModalPage_pt_BR.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Redefini\u00e7\u00e3o de senha
+submit=Apresentar
+password=Senha
+confirmPassword=Senha (confirmar)
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage.html
new file mode 100644
index 0000000..e6d4676
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage.html
@@ -0,0 +1,39 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+
+ <div style="margin: 5px;">
+ <form wicket:id="form">
+ <div id="formtable">
+ <div class="tablerow" wicket:id="propView">
+ <div class="tablecolumn_label medium_dynamicsize">
+ <span wicket:id="key">[key]</span>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="value">[value]</span>
+
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage.properties
new file mode 100644
index 0000000..109326f
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Resource data
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage_it.properties
new file mode 100644
index 0000000..0f4f94f
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage_it.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Dati sulla risorsa
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage_pt_BR.properties
new file mode 100644
index 0000000..daca223
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnObjectModalPage_pt_BR.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Dados do Recurso
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage.html
new file mode 100644
index 0000000..b85acb6
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage.html
@@ -0,0 +1,161 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <span wicket:id="new"/> <wicket:message key="title"/> <span wicket:id="key"/>
+ </p>
+ <div style="margin: 5px;">
+ <form wicket:id="form">
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#tabs-1"><span><wicket:message key="tab1"/></span></a></li>
+ <li><a href="#tabs-2"><span><wicket:message key="tab2"/></span></a></li>
+ <li><a href="#tabs-3"><span><wicket:message key="tab3"/></span></a></li>
+ </ul>
+ <div id="tabs-1">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="displayName"><wicket:message key="displayName"/></label>
+ </div>
+ <div class="tablecolumn_field short_dynamicsize">
+ <span wicket:id="displayName">[displayName]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="location"><wicket:message key="location"/></label>
+ </div>
+ <div class="tablecolumn_field short_dynamicsize">
+ <span wicket:id="location">[location]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="name"><wicket:message key="name"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="connectorName">[connectorName]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="version"><wicket:message key="version"/></label>
+ </div>
+ <div class="tablecolumn_field short_dynamicsize">
+ <span wicket:id="version">[version]</span>
+ </div>
+ </div>
+ </div>
+ <div style="display: table; border: 1px solid #BBBBBB;">
+ <div class="tablerow2 alt">
+ <div class="tablecolumn2_label short_dynamicsize">
+ <label for="connRequestTimeout"><wicket:message key="connRequestTimeout"/></label>
+ </div>
+ <div class="tablecolumn2_field short_dynamicsize">
+ <span wicket:id="connRequestTimeout">[connRequestTimeout]</span>
+ </div>
+ <div class="tablecolumn2_label short_dynamicsize">
+ <label for="poolMaxObjects"><wicket:message key="poolMaxObjects"/></label>
+ </div>
+ <div class="tablecolumn2_field short_dynamicsize">
+ <span wicket:id="poolMaxObjects">[poolMaxObjects]</span>
+ </div>
+ </div>
+ <div class="tablerow2">
+ <div class="tablecolumn2_label short_dynamicsize">
+ <label for="poolMinIdle"><wicket:message key="poolMinIdle"/></label>
+ </div>
+ <div class="tablecolumn2_field short_dynamicsize">
+ <span wicket:id="poolMinIdle">[poolMinIdle]</span>
+ </div>
+ <div class="tablecolumn2_label short_dynamicsize">
+ <label for="poolMaxIdle"><wicket:message key="poolMaxIdle"/></label>
+ </div>
+ <div class="tablecolumn2_field short_dynamicsize">
+ <span wicket:id="poolMaxIdle">[poolMaxIdle]</span>
+ </div>
+ </div>
+ <div class="tablerow2 alt">
+ <div class="tablecolumn2_label short_dynamicsize">
+ <label for="poolMaxWait"><wicket:message key="poolMaxWait"/></label>
+ </div>
+ <div class="tablecolumn2_field short_dynamicsize">
+ <span wicket:id="poolMaxWait">[poolMaxWait]</span>
+ </div>
+ <div class="tablecolumn2_label short_dynamicsize">
+ <label for="poolMinEvictableIdleTime"><wicket:message key="poolMinEvictableIdleTime"/></label>
+ </div>
+ <div class="tablecolumn2_field short_dynamicsize">
+ <span wicket:id="poolMinEvictableIdleTime">[poolMinEvictableIdleTime]</span>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="tabs-2">
+ <div id="formtable">
+ <span wicket:id="container">
+ <div style="border-bottom: 10px">
+ <div style="width: 40px; text-align: center; font-size: 7px">
+ <label for="version"><wicket:message key="overridable"/></label>
+ </div>
+ </div>
+ <form wicket:id="connectorPropForm">
+ <div class="tablerow connectorProp" wicket:id="connectorProperties">
+ <div class="tablecolumn_check" style="width: 27px; text-align: center; margin-right: 10px">
+ <span wicket:id="connPropAttrOverridable">[connPropAttrOverridable]</span>
+ </div>
+ <div class="tablecolumn_connPropAttr">
+ <span wicket:id="connPropAttrSchema">[connPropAttrSchema]</span>
+ </div>
+ <div class="tablecolumn_field veryshort_fixedsize">
+ <span wicket:id="panel">[panel]</span>
+ </div>
+ </div>
+ <div>
+ <a style="position: absolute; top: 2px; right:20px;" wicket:id="check">
+ <img src="img/ping.png"width="30" height="30"
+ alt="ping" title="title" wicket:message="title:check"/>
+ </a>
+ </div>
+ </form>
+ </span>
+ </div>
+ </div>
+ <div id="tabs-3">
+ <span wicket:id="capabilitiesPalette"/>
+ </div>
+ </div>
+
+ <div style="margin: 20px 10px 0">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage.properties
new file mode 100644
index 0000000..8500f1a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage.properties
@@ -0,0 +1,43 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=General
+tab2=Configuration
+tab3=Capabilities
+displayName=Display name
+bundleName=Bundle name
+version=Version
+connRequestTimeout=Request timeout (sec)
+action=Action
+edit=Edit
+edit_attribute=Edit attribute
+serviceName=Service name
+endpoint=Endpoint
+title=Connector
+overridable=Overridable
+property=Property
+value=Value
+
+success_connection=Successful connection
+error_connection=Connection failure
+check=Check connection
+location=Location
+poolMaxObjects=Max objects (idle+active)
+poolMinIdle=Min idle objects
+poolMaxIdle=Max idle objects
+poolMaxWait=Max waiting time (msec)
+poolMinEvictableIdleTime=Min eviction time (msec)
+new=New
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage_it.properties
new file mode 100644
index 0000000..96080c3
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage_it.properties
@@ -0,0 +1,43 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Generale
+tab2=Configurazione
+tab3=Capabilities
+bundleName=Bundle name
+version=Versione
+connRequestTimeout=Timeout richiesta (sec)
+action=Azione
+edit=Edit
+edit_attribute=Edit attribute
+serviceName=Nome servizio
+endpoint=Endpoint
+title=Connettore
+displayName=Nome visualizzato
+overridable=Sovrascrivibile
+property=Propriet\u00e0
+value=Valore
+
+success_connection=Connessione avvenuta con successo
+error_connection=Connessione non riuscita
+check=Verifica connessione
+location=Posizione
+poolMaxObjects=Max oggetti (attivi e non)
+poolMinIdle=Max oggetti attivi
+poolMaxIdle=Max oggetti inattivi
+poolMaxWait=Tempo max attesa
+poolMinEvictableIdleTime=Tempo min espulsione
+new=Nuovo
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage_pt_BR.properties
new file mode 100644
index 0000000..b688216
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ConnectorModalPage_pt_BR.properties
@@ -0,0 +1,43 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Geral
+tab2=Configura\u00e7\u00e3o
+tab3=Capacidades
+displayName=Mostrar Nome
+bundleName=Nome do Pacote
+version=Vers\u00e3o
+connRequestTimeout=Timeout da Requisi\u00e7\u00e3o (seg)
+action=A\u00e7\u00e3o
+edit=Alterar
+edit_attribute=Alterar Atributo
+serviceName=Nome de Servi\u00e7o
+endpoint=Endpoint
+title=Conector
+overridable=Alter\u00e1vel
+property=Propriedade
+value=Valor
+
+success_connection=Sucesso na Conex\u00e3o
+error_connection=Falha na Conex\u00e3o
+check=Verificar a Conex\u00e3o
+location=Localiza\u00e7\u00e3o
+poolMaxObjects=Max objects (idle+active)
+poolMinIdle=Min idle objects
+poolMaxIdle=Max idle objects
+poolMaxWait=Max waiting time (msec)
+poolMinEvictableIdleTime=Min eviction time (msec)
+new=Novo
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage.html
new file mode 100644
index 0000000..5665e0e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage.html
@@ -0,0 +1,64 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+ <div style="margin: 5px;">
+ <form wicket:id="form">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="key"><wicket:message key="key"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="key">[name]</span>
+ </div>
+ </div>
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="expression"><wicket:message key="expression"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="expression">[expression]</span>
+ <a class="tooltips" wicket:id="questionMarkJexlHelp" href="#" alt="Click to help" title="Click to help">
+ <img src="img/help.png"/>
+ <span wicket:id="jexlHelp" class="tooltips">
+ <wicket:message key="jexl_info"/>
+ <ul>
+ <li><wicket:message key="jexl_ex1"/></li>
+ <li><wicket:message key="jexl_ex2"/></li>
+ </ul>
+ <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message key="jexl_syntax_url"/></a>
+ </span>
+ </a>
+ </div>
+ </div>
+ </div>
+ <div style="margin: 10px 0px 0">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage.properties
new file mode 100644
index 0000000..e39980a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=All form fields are required.
+expression=Expression
+existing_schemas=Existing Schemas:
+edit_attribute=Edit attribute
+attributes=Derived attributes
+title=Derived Schema
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage_it.properties
new file mode 100644
index 0000000..425e118
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage_it.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=Tutti i campi sono richiesti.
+expression=Expression
+existing_schemas=Schemi presenti:
+edit_attribute=Modifica attributo
+attributes=Attributi derivati
+title=Schema Derivato
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage_pt_BR.properties
new file mode 100644
index 0000000..df3aff8
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DerSchemaModalPage_pt_BR.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+required_alert=Todos os campos do formaul\u00e1rio s\u00e3o obrigat\u00f3rios
+expression=Express\u00e3o
+existing_schemas=Esquemas Existentes\:
+edit_attribute=Alterar Atributo
+attributes=Atributos Derivados
+title=Esquema Derivado
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.html
new file mode 100644
index 0000000..998483d
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.html
@@ -0,0 +1,132 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style>
+ div.group{
+ width:450px;
+ }
+
+ div.group div{
+ width:150;
+ height: 25px;
+ float:left;
+ }
+
+ div.group div input {
+ width: 30px;
+ }
+
+ div#attributes-view {
+ display: block;
+ clear: both;
+ float: none;
+ overflow: auto;
+ margin-top: 0px;
+ margin-bottom: 20px;
+ margin-left: 10px;
+ margin-right: 10px;
+ }
+
+ .submit{
+ display: block;
+ clear: both;
+ float: none;
+ margin-left: 10px;
+ }
+
+ span.grouplabel{
+ display:block;
+ clear: both;
+ margin-left: 10px;
+ margin-bottom: 10px;
+ font-weight: bold;
+ }
+ </style>
+ </wicket:head>
+ <wicket:extend>
+ <form wicket:id="form">
+ <div id="attributes-view">
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <wicket:message key="title"/>
+ </p>
+
+ <span class="grouplabel"><wicket:message key="plainSchemas"/></span>
+ <span wicket:id="dCheckGroup">
+ <div class="group">
+ <div wicket:id="details">
+ <input type="checkbox" wicket:id="dcheck"/>
+ <span wicket:id="dname">[schema name]</span>
+ </div>
+ </div>
+ </span>
+
+ <span wicket:id="plainSchemas">[schemas]</span>
+
+ <span wicket:id="dschemas">[derived schemas]</span>
+
+ <span wicket:id="vschemas">[virtual schemas]</span>
+
+ </div>
+
+ <wicket:fragment wicket:id="sfragment">
+ <span wicket:id="psCheckGroup">
+ <div class="group">
+ <div wicket:id="plainSchemas">
+ <input type="checkbox" wicket:id="scheck"/>
+ <span wicket:id="sname">[schema name]</span>
+ </div>
+ </div>
+ </span>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="dsfragment">
+ <span class="grouplabel"><wicket:message key="derSchemas"/></span>
+ <span wicket:id="dsCheckGroup">
+ <div class="group">
+ <div wicket:id="derSchemas">
+ <input type="checkbox" wicket:id="dscheck"/>
+ <span wicket:id="dsname">[schema name]</span>
+ </div>
+ </div>
+ </span>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="vsfragment">
+ <span class="grouplabel"><wicket:message key="virSchemas"/></span>
+ <span wicket:id="vsCheckGroup">
+ <div class="group">
+ <div wicket:id="virSchemas">
+ <input type="checkbox" wicket:id="vscheck"/>
+ <span wicket:id="vsname">[schema name]</span>
+ </div>
+ </div>
+ </span>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="emptyFragment">
+ </wicket:fragment>
+
+ <div class="submit">
+ <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="submit"/>
+ <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="cancel"/>
+ </div>
+ </form>
+ </wicket:extend>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.properties
new file mode 100644
index 0000000..e7080ed
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.properties
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Change display attributes
+tooManySelections=Too many columns to be shown
+plainSchemas=User plain attributes
+derSchemas=User derived attributes
+virSchemas=User virtual attributes
+
+firstname=Firstname
+surname=Surname
+userId=User Id
+edit=Edit
+delete=Delete
+status=Status
+token=Token
+username=Username
+creationDate=Creation Date
+tokenValued=Valued
+tokenNotValued=Not valued
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage_it.properties
new file mode 100644
index 0000000..6ee5963
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage_it.properties
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Scegli attributi da visualizzare
+tooManySelections=Troppe colonne da visualizzare
+plainSchemas=Attributi normali utente
+derSchemas=Attributi derivati utente
+virSchemas=Attributi virtuali utente
+
+firstname=Nome
+surname=Cognome
+userId=User Id
+edit=Edit
+delete=Rimuovi
+status=Stato
+token=Token
+username=Username
+creationDate=Data Creazione
+tokenValued=Valorizzato
+tokenNotValued=Non valorizzato
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage_pt_BR.properties
new file mode 100644
index 0000000..7f2b8cb
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/DisplayAttributesModalPage_pt_BR.properties
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Alterar atributos mostrados
+tooManySelections=Muitas colunas para exibir
+plainSchemas=Atributo Normal de Usu\u00e1rios
+derSchemas=Atributos Derivados de Usu\u00e1rios
+virSchemas=Atributos virtuais de Usu\u00e1rios
+
+firstname=Nome
+surname=Sobrenome
+userId=Identificador de Usu\u00e1rio
+edit=Alterar
+delete=Excluir
+status=Estatus
+token=Token
+username=Nome do Usu\u00e1rio
+creationDate=Data de Cria\u00e7\u00e3o
+tokenValued=Valorado
+tokenNotValued=N\u00e3o Valorado
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ErrorPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ErrorPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ErrorPage.html
new file mode 100644
index 0000000..c1c7407
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ErrorPage.html
@@ -0,0 +1,53 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:head>
+ <style type="text/css">
+ .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {
+ background:url("../../css/images/ui-bg_glass_95_fef1ec_1x400.png") repeat-x scroll 50% 50% #FEF1EC;
+ border:1px solid #CD0A0A;
+ color:#CD0A0A;
+ width: 400px;
+ padding: 0px;
+ margin-top: 200px;
+ margin-left: auto;
+ margin-right: auto;
+ }
+ body {
+ background: url("../../css/images/ui-bg_diagonals-thick_20_666666_40x40.png")
+ repeat scroll 50% 50% #666666;
+ }
+ </style>
+</wicket:head>
+<wicket:extend>
+
+ <div class="ui-widget">
+ <div style="padding: 0pt 0.7em;" class="ui-state-error ui-corner-all">
+ <p><span style="float: left; margin-right: 0.3em;"
+ class="ui-icon ui-icon-alert"></span>
+ <strong><span wicket:id="errorTitle"/></strong>
+ <div><span wicket:id="errorMessage"/></div>
+ <p>
+ <a href="" wicket:id="home">
+ <wicket:message key="home"/>
+ </a>
+ </p>
+ </p>
+ </div>
+ </div>
+</wicket:extend>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/ExecMessageModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ExecMessageModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ExecMessageModalPage.html
new file mode 100644
index 0000000..bf00ee4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ExecMessageModalPage.html
@@ -0,0 +1,25 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:extend>
+ <div id="dialog">
+ <pre wicket:id="message">
+ [Task execution's message to show]
+ </pre>
+ </div>
+</wicket:extend>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/FailureMessageModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/FailureMessageModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/FailureMessageModalPage.html
new file mode 100644
index 0000000..db7c53d
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/FailureMessageModalPage.html
@@ -0,0 +1,36 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<!DOCTYPE html>
+<style>
+ .w_content_3 {
+ padding: 0;
+ color: #333333;
+ font-family: Verdana,Tahoma,sans-serif;
+ font-size: 62.5%;
+ }
+</style>
+<wicket:extend>
+ <div class="w_content_3">
+ <div>
+ <div style="margin: 1em">
+ <pre wicket:id="failureMessage"></pre>
+ </div>
+ </div>
+ </div>
+</wicket:extend>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/HomePage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/HomePage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/HomePage.html
new file mode 100644
index 0000000..2849c44
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/HomePage.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <body>
+
+ <wicket:extend>
+
+ <div>
+ <b>Syncope</b> Home-Page!
+ </div>
+
+ </wicket:extend>
+
+ </body>
+
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage.html
new file mode 100644
index 0000000..1124735
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage.html
@@ -0,0 +1,42 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:extend>
+ <div id="versionMP">
+ <div style="text-align: center;">
+ <a wicket:id="syncopeLink" target="_blank">
+ <img id="logo" src="img/logo.png" alt="syncope" title="syncope"/>
+ </a>
+ <div style="color: white;font-weight: bold;">Version: <span wicket:id="version"/></div>
+ </div>
+ <br/>
+ <div>
+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
+ </div>
+ <a wicket:id="licenseLink" target="_blank">http://www.apache.org/licenses/LICENSE-2.0</a>
+ <div>
+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.
+ </div>
+ </div>
+</wicket:extend>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage.properties
new file mode 100644
index 0000000..5f0020a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+info=Information
+syncopeSite=Apache Syncope Site
+version=Version
[40/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/Resources.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Resources.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Resources.java
new file mode 100644
index 0000000..0fabe59
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Resources.java
@@ -0,0 +1,723 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.PreferenceManager;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.panels.AbstractSearchResultPanel;
+import org.apache.syncope.client.console.panels.AjaxDataTablePanel;
+import org.apache.syncope.client.console.rest.ConnectorRestClient;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.LinkPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.ConnInstanceTO;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.attributes.AjaxCallListener;
+import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.StringResourceModel;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+/**
+ * Resources WebPage.
+ */
+public class Resources extends BasePage {
+
+ private static final long serialVersionUID = -3789252860990261728L;
+
+ private static final int WIN_HEIGHT = 600;
+
+ private static final int WIN_WIDTH = 1100;
+
+ @SpringBean
+ private ConnectorRestClient connectorRestClient;
+
+ @SpringBean
+ private PreferenceManager prefMan;
+
+ private final ModalWindow createResourceWin;
+
+ private final ModalWindow editResourceWin;
+
+ private final ModalWindow createConnectorWin;
+
+ private final ModalWindow editConnectorWin;
+
+ private final int resourcePaginatorRows;
+
+ private final int connectorPaginatorRows;
+
+ private WebMarkupContainer resourceContainer;
+
+ private WebMarkupContainer connectorContainer;
+
+ /**
+ * Modal window to be used for user status management.
+ */
+ protected final ModalWindow statusmodal = new ModalWindow("statusModal");
+
+ /**
+ * Schemas to be shown modal window height.
+ */
+ private final static int STATUS_MODAL_WIN_HEIGHT = 500;
+
+ /**
+ * Schemas to be shown modal window width.
+ */
+ private final static int STATUS_MODAL_WIN_WIDTH = 700;
+
+ public Resources(final PageParameters parameters) {
+ super(parameters);
+
+ add(createResourceWin = new ModalWindow("createResourceWin"));
+ add(editResourceWin = new ModalWindow("editResourceWin"));
+ add(createConnectorWin = new ModalWindow("createConnectorWin"));
+ add(editConnectorWin = new ModalWindow("editConnectorWin"));
+
+ statusmodal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ statusmodal.setInitialHeight(STATUS_MODAL_WIN_HEIGHT);
+ statusmodal.setInitialWidth(STATUS_MODAL_WIN_WIDTH);
+ statusmodal.setCookieName("status-modal");
+ add(statusmodal);
+
+ AjaxLink<Void> reloadLink = new ClearIndicatingAjaxLink<Void>("reloadLink", getPageReference()) {
+
+ private static final long serialVersionUID = 3109256773218160485L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ try {
+ connectorRestClient.reload();
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (Exception e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ }
+ feedbackPanel.refresh(target);
+ target.add(connectorContainer);
+ }
+
+ @Override
+ protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
+ super.updateAjaxAttributes(attributes);
+
+ final AjaxCallListener ajaxCallListener = new AjaxCallListener() {
+
+ private static final long serialVersionUID = 7160235486520935153L;
+
+ @Override
+ public CharSequence getPrecondition(final Component component) {
+ return "if (!confirm('" + getString("confirmReloadConnectors") + "')) "
+ + "{return false;} else {return true;}";
+ }
+ };
+ attributes.getAjaxCallListeners().add(ajaxCallListener);
+ }
+ };
+ MetaDataRoleAuthorizationStrategy.authorize(reloadLink, ENABLE, xmlRolesReader.getEntitlement(
+ "Connectors", "reload"));
+ add(reloadLink);
+
+ resourcePaginatorRows = prefMan.getPaginatorRows(getRequest(), Constants.PREF_RESOURCES_PAGINATOR_ROWS);
+ connectorPaginatorRows = prefMan.getPaginatorRows(getRequest(), Constants.PREF_CONNECTORS_PAGINATOR_ROWS);
+
+ setupResources();
+ setupConnectors();
+ }
+
+ private void setupResources() {
+ List<IColumn<ResourceTO, String>> columns = new ArrayList<>();
+
+ columns.add(new PropertyColumn<ResourceTO, String>(new StringResourceModel("key", this, null), "key", "key"));
+
+ columns.add(new AbstractColumn<ResourceTO, String>(
+ new StringResourceModel("connector", this, null, "connector")) {
+
+ private static final long serialVersionUID = 8263694778917279290L;
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<ResourceTO>> cellItem, final String componentId,
+ final IModel<ResourceTO> rowModel) {
+
+ final AjaxLink<String> editLink =
+ new ClearIndicatingAjaxLink<String>("link", getPageReference()) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+
+ editConnectorWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ConnectorModalPage(Resources.this.getPageReference(),
+ editConnectorWin,
+ connectorRestClient.read(rowModel.getObject().getConnectorId()));
+ }
+ });
+
+ editConnectorWin.show(target);
+ }
+ };
+ editLink.add(new Label("linkTitle", rowModel.getObject().getConnectorDisplayName()));
+
+ LinkPanel editConnPanel = new LinkPanel(componentId);
+ editConnPanel.add(editLink);
+
+ cellItem.add(editConnPanel);
+
+ MetaDataRoleAuthorizationStrategy.authorize(editConnPanel, ENABLE, xmlRolesReader.
+ getEntitlement(
+ "Connectors", "read"));
+ }
+ });
+
+ columns.add(new AbstractColumn<ResourceTO, String>(
+ new StringResourceModel("propagationPrimary", this, null)) {
+
+ private static final long serialVersionUID = -3503023501954863131L;
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<ResourceTO>> item,
+ final String componentId, final IModel<ResourceTO> model) {
+
+ item.add(new Label(componentId, ""));
+ item.add(new AttributeModifier("class", new Model<>(
+ Boolean.toString(model.getObject().isPropagationPrimary()))));
+ }
+
+ @Override
+ public String getCssClass() {
+ return "narrowcolumn";
+ }
+ });
+
+ columns.add(new PropertyColumn<ResourceTO, String>(new StringResourceModel(
+ "propagationPriority", this, null), "propagationPriority", "propagationPriority") {
+
+ @Override
+ public String getCssClass() {
+ return "narrowcolumn";
+ }
+ });
+
+ columns.add(new AbstractColumn<ResourceTO, String>(new StringResourceModel("actions", this, null, "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<ResourceTO>> cellItem, final String componentId,
+ final IModel<ResourceTO> model) {
+
+ final ResourceTO resourceTO = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ statusmodal.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ProvisioningModalPage<>(
+ getPageReference(), statusmodal, model.getObject(), UserTO.class);
+ }
+ });
+
+ statusmodal.show(target);
+ }
+ }, ActionLink.ActionType.MANAGE_USERS, "Resources");
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+
+ statusmodal.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ProvisioningModalPage<>(
+ getPageReference(), statusmodal, model.getObject(), RoleTO.class);
+ }
+ });
+
+ statusmodal.show(target);
+ }
+ }, ActionLink.ActionType.MANAGE_ROLES, "Resources");
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ resourceTO.setUsyncToken(null);
+ resourceTO.setRsyncToken(null);
+ try {
+ resourceRestClient.update(resourceTO);
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ":" + e.getMessage());
+
+ LOG.error("While resetting sync token from " + resourceTO.getKey(), e);
+ }
+
+ feedbackPanel.refresh(target);
+ target.add(resourceContainer);
+ }
+ }, ActionLink.ActionType.RESET, "Resources");
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ editResourceWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ResourceModalPage(Resources.this.getPageReference(),
+ editResourceWin, resourceTO, false);
+ }
+ });
+
+ editResourceWin.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, "Resources");
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ resourceRestClient.delete(resourceTO.getKey());
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+
+ LOG.error("While deleting resource " + resourceTO.getKey(), e);
+ }
+
+ feedbackPanel.refresh(target);
+ target.add(resourceContainer);
+ }
+ }, ActionLink.ActionType.DELETE, "Resources");
+
+ cellItem.add(panel);
+ }
+ });
+
+ final AjaxDataTablePanel<ResourceTO, String> table = new AjaxDataTablePanel<>(
+ "resourceDatatable",
+ columns,
+ (ISortableDataProvider<ResourceTO, String>) new ResourcesProvider(),
+ resourcePaginatorRows,
+ Arrays.asList(new ActionLink.ActionType[] { ActionLink.ActionType.DELETE }),
+ resourceRestClient,
+ "key",
+ "Resources",
+ getPageReference());
+
+ resourceContainer = new WebMarkupContainer("resourceContainer");
+ resourceContainer.add(table);
+ resourceContainer.setOutputMarkupId(true);
+
+ add(resourceContainer);
+
+ setWindowClosedCallback(createResourceWin, resourceContainer);
+ setWindowClosedCallback(editResourceWin, resourceContainer);
+
+ createResourceWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ createResourceWin.setInitialHeight(WIN_HEIGHT);
+ createResourceWin.setInitialWidth(WIN_WIDTH);
+ createResourceWin.setCookieName("create-res-modal");
+
+ editResourceWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editResourceWin.setInitialHeight(WIN_HEIGHT);
+ editResourceWin.setInitialWidth(WIN_WIDTH);
+ editResourceWin.setCookieName("edit-res-modal");
+
+ AjaxLink<Void> createResourceLink =
+ new ClearIndicatingAjaxLink<Void>("createResourceLink", getPageReference()) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ createResourceWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ final ResourceModalPage windows = new ResourceModalPage(Resources.this.
+ getPageReference(),
+ editResourceWin, new ResourceTO(), true);
+ return windows;
+ }
+ });
+
+ createResourceWin.show(target);
+ }
+ };
+
+ MetaDataRoleAuthorizationStrategy.authorize(createResourceLink, ENABLE, xmlRolesReader.getEntitlement(
+ "Resources", "create"));
+
+ add(createResourceLink);
+
+ @SuppressWarnings("rawtypes")
+ final Form paginatorForm = new Form("resourcePaginatorForm");
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this,
+ "resourcePaginatorRows"), prefMan.getPaginatorChoices());
+
+ rowsChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ prefMan.set(getRequest(), getResponse(), Constants.PREF_RESOURCES_PAGINATOR_ROWS,
+ String.valueOf(resourcePaginatorRows));
+
+ table.setItemsPerPage(resourcePaginatorRows);
+ target.add(resourceContainer);
+ }
+ });
+
+ paginatorForm.add(rowsChooser);
+ add(paginatorForm);
+ }
+
+ private void setupConnectors() {
+ List<IColumn<ConnInstanceTO, String>> columns = new ArrayList<>();
+
+ columns.add(new PropertyColumn<ConnInstanceTO, String>(
+ new StringResourceModel("key", this, null), "key", "key"));
+ columns.add(new PropertyColumn<ConnInstanceTO, String>(
+ new StringResourceModel("name", this, null), "connectorName", "connectorName"));
+ columns.add(new PropertyColumn<ConnInstanceTO, String>(
+ new StringResourceModel("displayName", this, null), "displayName", "displayName"));
+ columns.add(new PropertyColumn<ConnInstanceTO, String>(
+ new StringResourceModel("bundleName", this, null), "bundleName", "bundleName"));
+ columns.add(new PropertyColumn<ConnInstanceTO, String>(
+ new StringResourceModel("version", this, null), "version", "version"));
+ columns.add(new AbstractColumn<ConnInstanceTO, String>(new StringResourceModel("actions", this, null, "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<ConnInstanceTO>> cellItem, final String componentId,
+ final IModel<ConnInstanceTO> model) {
+
+ final ConnInstanceTO connectorTO = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ editConnectorWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ConnectorModalPage(Resources.this.getPageReference(), editConnectorWin,
+ connectorTO);
+ }
+ });
+
+ editConnectorWin.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, "Connectors");
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ connectorRestClient.delete(connectorTO.getKey());
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+
+ LOG.error("While deleting connector " + connectorTO.getKey(), e);
+ }
+
+ target.add(connectorContainer);
+ feedbackPanel.refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, "Connectors");
+
+ cellItem.add(panel);
+ }
+ });
+
+ final AjaxDataTablePanel<ConnInstanceTO, String> table = new AjaxDataTablePanel<ConnInstanceTO, String>(
+ "connectorDatatable",
+ columns,
+ (ISortableDataProvider<ConnInstanceTO, String>) new ConnectorsProvider(),
+ connectorPaginatorRows,
+ Arrays.asList(new ActionLink.ActionType[] { ActionLink.ActionType.DELETE }),
+ connectorRestClient,
+ "key",
+ "Connectors",
+ getPageReference());
+
+ connectorContainer = new WebMarkupContainer("connectorContainer");
+ connectorContainer.add(table);
+ connectorContainer.setOutputMarkupId(true);
+
+ MetaDataRoleAuthorizationStrategy.authorize(connectorContainer, RENDER, xmlRolesReader.getEntitlement(
+ "Connectors", "list"));
+
+ add(connectorContainer);
+
+ setWindowClosedCallback(createConnectorWin, connectorContainer);
+ setWindowClosedCallback(editConnectorWin, connectorContainer);
+
+ createConnectorWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ createConnectorWin.setInitialHeight(WIN_HEIGHT);
+ createConnectorWin.setInitialWidth(WIN_WIDTH);
+ createConnectorWin.setCookieName("create-conn-modal");
+
+ editConnectorWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editConnectorWin.setInitialHeight(WIN_HEIGHT);
+ editConnectorWin.setInitialWidth(WIN_WIDTH);
+ editConnectorWin.setCookieName("edit-conn-modal");
+
+ AjaxLink<Void> createConnectorLink =
+ new ClearIndicatingAjaxLink<Void>("createConnectorLink", getPageReference()) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ createConnectorWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ ConnectorModalPage form = new ConnectorModalPage(Resources.this.getPageReference(),
+ editConnectorWin, new ConnInstanceTO());
+ return form;
+ }
+ });
+
+ createConnectorWin.show(target);
+ }
+ };
+
+ MetaDataRoleAuthorizationStrategy.authorize(createConnectorLink, ENABLE, xmlRolesReader.getEntitlement(
+ "Connectors", "create"));
+
+ add(createConnectorLink);
+
+ @SuppressWarnings("rawtypes")
+ Form paginatorForm = new Form("connectorPaginatorForm");
+
+ MetaDataRoleAuthorizationStrategy.authorize(paginatorForm, RENDER, xmlRolesReader.getEntitlement(
+ "Connectors", "list"));
+
+ final DropDownChoice<Integer> rowsChooser = new DropDownChoice<Integer>(
+ "rowsChooser",
+ new PropertyModel<Integer>(this,
+ "connectorPaginatorRows"),
+ prefMan.getPaginatorChoices());
+
+ rowsChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(AjaxRequestTarget target) {
+ prefMan.set(getRequest(), getResponse(), Constants.PREF_CONNECTORS_PAGINATOR_ROWS,
+ String.valueOf(connectorPaginatorRows));
+ table.setItemsPerPage(connectorPaginatorRows);
+
+ target.add(connectorContainer);
+ }
+ });
+
+ paginatorForm.add(rowsChooser);
+ add(paginatorForm);
+ }
+
+ class ResourcesProvider extends SortableDataProvider<ResourceTO, String> {
+
+ private static final long serialVersionUID = -9055916672926643975L;
+
+ private final SortableDataProviderComparator<ResourceTO> comparator;
+
+ public ResourcesProvider() {
+ super();
+ //Default sorting
+ setSort("key", SortOrder.ASCENDING);
+ comparator = new SortableDataProviderComparator<>(this);
+ }
+
+ @Override
+ public Iterator<ResourceTO> iterator(final long first, final long count) {
+ List<ResourceTO> list = resourceRestClient.getAll();
+
+ Collections.sort(list, comparator);
+
+ return list.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return resourceRestClient.getAll().size();
+ }
+
+ @Override
+ public IModel<ResourceTO> model(final ResourceTO resource) {
+ return new AbstractReadOnlyModel<ResourceTO>() {
+
+ private static final long serialVersionUID = 8952474152465381634L;
+
+ @Override
+ public ResourceTO getObject() {
+ return resource;
+ }
+ };
+ }
+ }
+
+ private class ConnectorsProvider extends SortableDataProvider<ConnInstanceTO, String> {
+
+ private static final long serialVersionUID = 4445909568349448518L;
+
+ private final SortableDataProviderComparator<ConnInstanceTO> comparator;
+
+ public ConnectorsProvider() {
+ super();
+ //Default sorting
+ setSort("key", SortOrder.ASCENDING);
+ comparator = new SortableDataProviderComparator<>(this);
+ }
+
+ @Override
+ public Iterator<ConnInstanceTO> iterator(long first, long count) {
+ List<ConnInstanceTO> list = connectorRestClient.getAllConnectors();
+
+ Collections.sort(list, comparator);
+
+ return list.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return connectorRestClient.getAllConnectors().size();
+ }
+
+ @Override
+ public IModel<ConnInstanceTO> model(final ConnInstanceTO connector) {
+
+ return new AbstractReadOnlyModel<ConnInstanceTO>() {
+
+ private static final long serialVersionUID = -6033068018293569398L;
+
+ @Override
+ public ConnInstanceTO getObject() {
+ return connector;
+ }
+ };
+ }
+ }
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ if (event.getPayload() instanceof AbstractSearchResultPanel.EventDataWrapper) {
+ ((AbstractSearchResultPanel.EventDataWrapper) event.getPayload()).getTarget().add(resourceContainer);
+ ((AbstractSearchResultPanel.EventDataWrapper) event.getPayload()).getTarget().add(connectorContainer);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModalPage.java
new file mode 100644
index 0000000..b6ecb9e
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModalPage.java
@@ -0,0 +1,425 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.ConnIdSpecialAttributeName;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.commons.status.Status;
+import org.apache.syncope.client.console.commons.status.StatusUtils;
+import org.apache.syncope.common.lib.to.AbstractSubjectTO;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.ConnObjectTO;
+import org.apache.syncope.common.lib.to.PropagationStatus;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.PropagationTaskExecStatus;
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.behavior.Behavior;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.request.resource.ContextRelativeResource;
+
+/**
+ * Show user or role status after performing a successful operation.
+ */
+public class ResultStatusModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 2646115294319713723L;
+
+ private static final String IMG_PREFIX = "/img/statuses/";
+
+ private final AbstractSubjectTO subject;
+
+ private final Mode mode;
+
+ /**
+ * Status management utilities.
+ */
+ private final StatusUtils statusUtils;
+
+ public static class Builder implements Serializable {
+
+ private static final long serialVersionUID = 220361441802274899L;
+
+ private ModalWindow window;
+
+ private Mode mode;
+
+ private AbstractSubjectTO subject;
+
+ public Builder(final ModalWindow window, final AbstractSubjectTO attributable) {
+ this.window = window;
+ this.subject = attributable;
+ }
+
+ public ResultStatusModalPage.Builder mode(final Mode mode) {
+ this.mode = mode;
+ return this;
+ }
+
+ public ResultStatusModalPage build() {
+ return new ResultStatusModalPage(this);
+ }
+ }
+
+ private ResultStatusModalPage(final Builder builder) {
+ super();
+ this.subject = builder.subject;
+ statusUtils = new StatusUtils(this.userRestClient);
+ if (builder.mode == null) {
+ this.mode = Mode.ADMIN;
+ } else {
+ this.mode = builder.mode;
+ }
+
+ final BaseModalPage page = this;
+
+ final WebMarkupContainer container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+ add(container);
+
+ final Fragment fragment = new Fragment("resultFrag", mode == Mode.SELF
+ ? "userSelfResultFrag"
+ : "propagationResultFrag", this);
+ fragment.setOutputMarkupId(true);
+ container.add(fragment);
+
+ if (mode == Mode.ADMIN) {
+ // add Syncope propagation status
+ PropagationStatus syncope = new PropagationStatus();
+ syncope.setResource("Syncope");
+ syncope.setStatus(PropagationTaskExecStatus.SUCCESS);
+
+ List<PropagationStatus> propagations = new ArrayList<PropagationStatus>();
+ propagations.add(syncope);
+ propagations.addAll(subject.getPropagationStatusTOs());
+
+ fragment.add(new Label("info",
+ ((subject instanceof UserTO) && ((UserTO) subject).getUsername() != null)
+ ? ((UserTO) subject).getUsername()
+ : ((subject instanceof RoleTO) && ((RoleTO) subject).getName() != null)
+ ? ((RoleTO) subject).getName()
+ : String.valueOf(subject.getKey())));
+
+ final ListView<PropagationStatus> propRes = new ListView<PropagationStatus>("resources",
+ propagations) {
+
+ private static final long serialVersionUID = -1020475259727720708L;
+
+ @Override
+ protected void populateItem(final ListItem<PropagationStatus> item) {
+ final PropagationStatus propTO = (PropagationStatus) item.getDefaultModelObject();
+
+ final ListView attributes = getConnObjectView(propTO);
+
+ final Fragment attrhead;
+ if (attributes.getModelObject() == null || attributes.getModelObject().isEmpty()) {
+ attrhead = new Fragment("attrhead", "emptyAttrHeadFrag", page);
+ } else {
+ attrhead = new Fragment("attrhead", "attrHeadFrag", page);
+ }
+
+ item.add(attrhead);
+ item.add(attributes);
+
+ attrhead.add(new Label("resource", propTO.getResource()));
+
+ attrhead.add(new Label("propagation", propTO.getStatus() == null
+ ? "UNDEFINED" : propTO.getStatus().toString()));
+
+ final Image image;
+ final String alt, title;
+ final ModalWindow failureWindow = new ModalWindow("failureWindow");
+ final AjaxLink<?> failureWindowLink = new AjaxLink<Void>("showFailureWindow") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(AjaxRequestTarget target) {
+ failureWindow.show(target);
+ }
+ };
+
+ switch (propTO.getStatus()) {
+
+ case SUCCESS:
+ case SUBMITTED:
+ case CREATED:
+ image = new Image("icon",
+ new ContextRelativeResource(IMG_PREFIX + Status.ACTIVE.toString()
+ + Constants.PNG_EXT));
+ alt = "success icon";
+ title = "success";
+ failureWindow.setVisible(false);
+ failureWindowLink.setEnabled(false);
+ break;
+
+ default:
+ image = new Image("icon",
+ new ContextRelativeResource(IMG_PREFIX + Status.SUSPENDED.toString()
+ + Constants.PNG_EXT));
+ alt = "failure icon";
+ title = "failure";
+ }
+
+ image.add(new Behavior() {
+
+ private static final long serialVersionUID = 1469628524240283489L;
+
+ @Override
+ public void onComponentTag(final Component component, final ComponentTag tag) {
+ tag.put("alt", alt);
+ tag.put("title", title);
+ }
+ });
+ final FailureMessageModalPage executionFailureMessagePage;
+ if (propTO.getFailureReason() == null) {
+ executionFailureMessagePage =
+ new FailureMessageModalPage(failureWindow.getContentId(), StringUtils.EMPTY);
+ } else {
+ executionFailureMessagePage =
+ new FailureMessageModalPage(failureWindow.getContentId(), propTO.getFailureReason());
+ }
+
+ failureWindow.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return executionFailureMessagePage;
+ }
+ });
+ failureWindow.setCookieName("failureWindow");
+ failureWindow.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ failureWindowLink.add(image);
+ attrhead.add(failureWindowLink);
+ attrhead.add(failureWindow);
+ }
+ };
+ fragment.add(propRes);
+ }
+
+ final AjaxLink<Void> close = new IndicatingAjaxLink<Void>("close") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ builder.window.close(target);
+ }
+ };
+ container.add(close);
+
+ setOutputMarkupId(true);
+ }
+
+ /**
+ * Get remote attributes list view.
+ *
+ * @param propTO propagation TO.
+ * @return list view.
+ */
+ private ListView<String> getConnObjectView(final PropagationStatus propTO) {
+ final ConnObjectTO before = propTO.getBeforeObj();
+ final ConnObjectTO after = propTO.getAfterObj();
+
+ // sorted in reversed presentation order
+ final List<String> head = new ArrayList<String>();
+ if (subject instanceof UserTO) {
+ head.add(ConnIdSpecialAttributeName.PASSWORD);
+ head.add(ConnIdSpecialAttributeName.ENABLE);
+ }
+ head.add(ConnIdSpecialAttributeName.UID);
+ head.add(ConnIdSpecialAttributeName.NAME);
+
+ final Map<String, AttrTO> beforeAttrMap = before == null
+ ? Collections.<String, AttrTO>emptyMap()
+ : before.getPlainAttrMap();
+
+ final Map<String, AttrTO> afterAttrMap = after == null
+ ? Collections.<String, AttrTO>emptyMap()
+ : after.getPlainAttrMap();
+
+ final Set<String> attributes = new HashSet<String>();
+ attributes.addAll(beforeAttrMap.keySet());
+ attributes.addAll(afterAttrMap.keySet());
+
+ if (!(subject instanceof UserTO)) {
+ attributes.remove(ConnIdSpecialAttributeName.PASSWORD);
+ attributes.remove(ConnIdSpecialAttributeName.ENABLE);
+ }
+
+ final List<String> profile = new ArrayList<String>();
+ profile.addAll(attributes);
+ profile.removeAll(head);
+ Collections.sort(profile);
+
+ for (String attr : head) {
+ if (attributes.contains(attr)) {
+ profile.add(0, attr);
+ }
+ }
+
+ return new ListView<String>("attrs", profile) {
+
+ private static final long serialVersionUID = 4949588177564901031L;
+
+ @Override
+ protected void populateItem(final ListItem<String> item) {
+ String name = item.getModelObject();
+
+ final Fragment beforeValue;
+ final Fragment afterValue;
+ if (ConnIdSpecialAttributeName.ENABLE.equals(name)) {
+ beforeValue = getStatusIcon("beforeValue", propTO.getResource(), before);
+ afterValue = getStatusIcon("afterValue", propTO.getResource(), after);
+ } else {
+ beforeValue = getLabelValue("beforeValue", name, beforeAttrMap);
+ afterValue = getLabelValue("afterValue", name, afterAttrMap);
+ }
+
+ item.add(new Label("attrName", new ResourceModel(name, name)));
+
+ item.add(beforeValue);
+ item.add(afterValue);
+ }
+ };
+ }
+
+ /**
+ * Get fragment for attribute value (not remote status).
+ *
+ * @param id component id to be replaced with the fragment content.
+ * @param attrName remote attribute name
+ * @param attrMap remote attributes map.
+ * @return fragment.
+ */
+ private Fragment getLabelValue(final String id, final String attrName, final Map<String, AttrTO> attrMap) {
+ final String value;
+
+ final AttrTO attr = attrMap.get(attrName);
+
+ if (attr == null || attr.getValues() == null || attr.getValues().isEmpty()) {
+ value = "";
+ } else {
+ if (ConnIdSpecialAttributeName.PASSWORD.equals(attrName)) {
+ value = "********";
+ } else {
+ value = attr.getValues().size() > 1
+ ? attr.getValues().toString()
+ : attr.getValues().get(0);
+ }
+ }
+
+ Component label = new Label("value", value.length() > 50 ? value.substring(0, 50) + "..." : value).
+ add(new Behavior() {
+
+ private static final long serialVersionUID = 1469628524240283489L;
+
+ @Override
+ public void onComponentTag(final Component component, final ComponentTag tag) {
+ tag.put("title", value);
+ }
+ });
+
+ final Fragment frag = new Fragment(id, "attrValueFrag", this);
+ frag.add(label);
+
+ return frag;
+ }
+
+ /**
+ * Get fragment for user status icon.
+ *
+ * @param id component id to be replaced with the fragment content
+ * @param resourceName resource name
+ * @param objectTO connector object TO
+ * @return fragment.
+ */
+ private Fragment getStatusIcon(final String id, final String resourceName, final ConnObjectTO objectTO) {
+ final Image image;
+ final String alt, title;
+ switch (statusUtils.getStatusBean(
+ subject, resourceName, objectTO, this.subject instanceof RoleTO).getStatus()) {
+
+ case ACTIVE:
+ image = new Image("status",
+ new ContextRelativeResource(IMG_PREFIX + Status.ACTIVE.toString() + Constants.PNG_EXT));
+ alt = "active icon";
+ title = "Enabled";
+ break;
+
+ case SUSPENDED:
+ image = new Image("status",
+ new ContextRelativeResource(IMG_PREFIX + Status.SUSPENDED.toString() + Constants.PNG_EXT));
+ alt = "inactive icon";
+ title = "Disabled";
+ break;
+
+ default:
+ image = null;
+ alt = null;
+ title = null;
+ }
+
+ final Fragment frag;
+ if (image == null) {
+ frag = new Fragment(id, "emptyFrag", this);
+ } else {
+ image.add(new Behavior() {
+
+ private static final long serialVersionUID = 1469628524240283489L;
+
+ @Override
+ public void onComponentTag(final Component component, final ComponentTag tag) {
+ tag.put("alt", alt);
+ tag.put("title", title);
+ tag.put("width", "12px");
+ tag.put("height", "12px");
+ }
+ });
+
+ frag = new Fragment(id, "remoteStatusFrag", this);
+ frag.add(image);
+ }
+
+ return frag;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/RoleModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/RoleModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/RoleModalPage.java
new file mode 100644
index 0000000..3cb9148
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/RoleModalPage.java
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.lang3.SerializationUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.panels.RolePanel;
+import org.apache.syncope.common.lib.AttributableOperations;
+import org.apache.syncope.common.lib.mod.RoleMod;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.ResourceModel;
+
+/**
+ * Modal window with Role form.
+ */
+public class RoleModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = -1732493223434085205L;
+
+ protected final PageReference pageRef;
+
+ protected final ModalWindow window;
+
+ protected final Mode mode;
+
+ protected final boolean createFlag;
+
+ protected final RolePanel rolePanel;
+
+ protected RoleTO originalRoleTO;
+
+ public RoleModalPage(final PageReference pageRef, final ModalWindow window, final RoleTO roleTO) {
+ this(pageRef, window, roleTO, Mode.ADMIN);
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public RoleModalPage(final PageReference pageRef, final ModalWindow window, final RoleTO roleTO, final Mode mode) {
+ super();
+
+ this.pageRef = pageRef;
+ this.window = window;
+ this.mode = mode;
+
+ this.createFlag = roleTO.getKey() == 0;
+ if (!createFlag) {
+ originalRoleTO = SerializationUtils.clone(roleTO);
+ }
+
+ final Form<RoleTO> form = new Form<RoleTO>("roleForm");
+ form.setMultiPart(true);
+
+ add(new Label("displayName", roleTO.getKey() == 0 ? "" : roleTO.getDisplayName()));
+
+ form.setModel(new CompoundPropertyModel<RoleTO>(roleTO));
+
+ this.rolePanel = new RolePanel.Builder("rolePanel").form(form).roleTO(roleTO).
+ roleModalPageMode(mode).pageRef(getPageReference()).build();
+ form.add(rolePanel);
+
+ final AjaxButton submit = new IndicatingAjaxButton(SUBMIT, new ResourceModel(SUBMIT)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ try {
+ submitAction(target, form);
+
+ if (pageRef.getPage() instanceof BasePage) {
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ }
+
+ closeAction(target, form);
+ } catch (Exception e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+ form.add(submit);
+ form.setDefaultButton(submit);
+
+ final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ closeAction(target, form);
+ }
+ };
+ cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
+
+ MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, xmlRolesReader.getEntitlement("Roles",
+ createFlag
+ ? "create"
+ : "update"));
+
+ add(form);
+ }
+
+ protected void submitAction(final AjaxRequestTarget target, final Form<?> form) {
+ final RoleTO roleTO = (RoleTO) form.getDefaultModelObject();
+ final List<String> entitlementList = new ArrayList<String>(rolePanel.getSelectedEntitlements());
+ roleTO.getEntitlements().clear();
+ roleTO.getEntitlements().addAll(entitlementList);
+
+ RoleTO result;
+ if (createFlag) {
+ result = roleRestClient.create(roleTO);
+ } else {
+ RoleMod roleMod = AttributableOperations.diff(roleTO, originalRoleTO);
+
+ // update role just if it is changed
+ if (roleMod.isEmpty()) {
+ result = roleTO;
+ } else {
+ result = roleRestClient.update(originalRoleTO.getETagValue(), roleMod);
+ }
+ }
+
+ setResponsePage(new ResultStatusModalPage.Builder(window, result).build());
+ }
+
+ protected void closeAction(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/RoleSelectModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/RoleSelectModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/RoleSelectModalPage.java
new file mode 100644
index 0000000..26b1aea
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/RoleSelectModalPage.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.lang.reflect.Constructor;
+import javax.swing.tree.DefaultMutableTreeNode;
+import org.apache.syncope.client.console.commons.RoleTreeBuilder;
+import org.apache.syncope.client.console.wicket.markup.html.tree.DefaultMutableTreeNodeExpansion;
+import org.apache.syncope.client.console.wicket.markup.html.tree.DefaultMutableTreeNodeExpansionModel;
+import org.apache.syncope.client.console.wicket.markup.html.tree.TreeRoleProvider;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.wicket.Component;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.markup.html.repeater.tree.DefaultNestedTree;
+import org.apache.wicket.extensions.markup.html.repeater.tree.ITreeProvider;
+import org.apache.wicket.extensions.markup.html.repeater.tree.NestedTree;
+import org.apache.wicket.extensions.markup.html.repeater.tree.content.Folder;
+import org.apache.wicket.extensions.markup.html.repeater.tree.theme.WindowsTheme;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class RoleSelectModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 2106489458494696439L;
+
+ @SpringBean
+ private RoleTreeBuilder roleTreeBuilder;
+
+ private final NestedTree<DefaultMutableTreeNode> tree;
+
+ public RoleSelectModalPage(final PageReference pageRef, final ModalWindow window, final Class<?> payloadClass) {
+ super();
+
+ final ITreeProvider<DefaultMutableTreeNode> treeProvider = new TreeRoleProvider(roleTreeBuilder, true);
+ final DefaultMutableTreeNodeExpansionModel treeModel = new DefaultMutableTreeNodeExpansionModel();
+
+ tree = new DefaultNestedTree<DefaultMutableTreeNode>("treeTable", treeProvider, treeModel) {
+
+ private static final long serialVersionUID = 7137658050662575546L;
+
+ @Override
+ protected Component newContentComponent(final String id, final IModel<DefaultMutableTreeNode> node) {
+ final DefaultMutableTreeNode treeNode = node.getObject();
+ final RoleTO roleTO = (RoleTO) treeNode.getUserObject();
+
+ return new Folder<DefaultMutableTreeNode>(id, RoleSelectModalPage.this.tree, node) {
+
+ private static final long serialVersionUID = 9046323319920426493L;
+
+ @Override
+ protected boolean isClickable() {
+ return true;
+ }
+
+ @Override
+ protected IModel<?> newLabelModel(final IModel<DefaultMutableTreeNode> model) {
+ return new Model<>(roleTO.getDisplayName());
+ }
+
+ @Override
+ protected void onClick(final AjaxRequestTarget target) {
+ super.onClick(target);
+
+ try {
+ Constructor<?> constructor = payloadClass.getConstructor(Long.class);
+ Object payload = constructor.newInstance(roleTO.getKey());
+
+ send(pageRef.getPage(), Broadcast.BREADTH, payload);
+ } catch (Exception e) {
+ LOG.error("Could not send role select event", e);
+ }
+
+ window.close(target);
+ }
+ };
+ }
+ };
+ tree.add(new WindowsTheme());
+ tree.setOutputMarkupId(true);
+
+ DefaultMutableTreeNodeExpansion.get().expandAll();
+
+ this.add(tree);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/RoleTemplateModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/RoleTemplateModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/RoleTemplateModalPage.java
new file mode 100644
index 0000000..6639517
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/RoleTemplateModalPage.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.SyncTaskTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.form.Form;
+
+public class RoleTemplateModalPage extends RoleModalPage {
+
+ private static final long serialVersionUID = -3849135555203409845L;
+
+ private final SyncTaskTO syncTaskTO;
+
+ public RoleTemplateModalPage(final PageReference callerPageRef, final ModalWindow window,
+ final SyncTaskTO syncTaskTO) {
+
+ super(callerPageRef, window, syncTaskTO.getRoleTemplate() == null
+ ? new RoleTO()
+ : syncTaskTO.getRoleTemplate(), Mode.TEMPLATE);
+
+ this.syncTaskTO = syncTaskTO;
+ }
+
+ @Override
+ protected void submitAction(final AjaxRequestTarget target, final Form form) {
+ syncTaskTO.setRoleTemplate((RoleTO) form.getModelObject());
+ taskRestClient.updateSyncTask(syncTaskTO);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/Roles.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Roles.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Roles.java
new file mode 100644
index 0000000..8310792
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Roles.java
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.AbstractSearchResultPanel;
+import org.apache.syncope.client.console.panels.RoleSearchPanel;
+import org.apache.syncope.client.console.panels.RoleSearchResultPanel;
+import org.apache.syncope.client.console.panels.RoleSummaryPanel;
+import org.apache.syncope.client.console.rest.RoleRestClient;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.client.console.wicket.markup.html.tree.TreeRolePanel;
+import org.apache.wicket.Session;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+/**
+ * Roles WebPage.
+ */
+public class Roles extends BasePage {
+
+ private static final long serialVersionUID = -2147758241610831969L;
+
+ private static final int WIN_HEIGHT = 500;
+
+ private static final int WIN_WIDTH = 800;
+
+ @SpringBean
+ private RoleRestClient restClient;
+
+ private final ModalWindow editRoleWin;
+
+ private final WebMarkupContainer roleTabsContainer;
+
+ public Roles(final PageParameters parameters) {
+ super(parameters);
+
+ roleTabsContainer = new WebMarkupContainer("roleTabsContainer");
+ roleTabsContainer.setOutputMarkupId(true);
+ add(roleTabsContainer);
+
+ editRoleWin = new ModalWindow("editRoleWin");
+ editRoleWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editRoleWin.setInitialHeight(WIN_HEIGHT);
+ editRoleWin.setInitialWidth(WIN_WIDTH);
+ editRoleWin.setCookieName("edit-role-modal");
+ add(editRoleWin);
+
+ final TreeRolePanel treePanel = new TreeRolePanel("treePanel");
+ treePanel.setOutputMarkupId(true);
+ roleTabsContainer.add(treePanel);
+
+ final RoleSummaryPanel summaryPanel = new RoleSummaryPanel.Builder("summaryPanel")
+ .window(editRoleWin).callerPageRef(Roles.this.getPageReference()).build();
+ roleTabsContainer.add(summaryPanel);
+
+ editRoleWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ final RoleSummaryPanel summaryPanel = (RoleSummaryPanel) roleTabsContainer.get("summaryPanel");
+
+ final TreeNodeClickUpdate data = new TreeNodeClickUpdate(target,
+ summaryPanel == null || summaryPanel.getSelectedNode() == null
+ ? 0
+ : summaryPanel.getSelectedNode().getKey());
+
+ send(getPage(), Broadcast.BREADTH, data);
+
+ if (modalResult) {
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ feedbackPanel.refresh(target);
+ modalResult = false;
+ }
+
+ }
+ });
+
+ final AbstractSearchResultPanel searchResult =
+ new RoleSearchResultPanel("searchResult", true, null, getPageReference(), restClient);
+ add(searchResult);
+
+ final Form searchForm = new Form("searchForm");
+ add(searchForm);
+
+ final RoleSearchPanel searchPanel = new RoleSearchPanel.Builder("searchPanel").build();
+ searchForm.add(searchPanel);
+
+ searchForm.add(new ClearIndicatingAjaxButton("search", new ResourceModel("search"), getPageReference()) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ final String fiql = searchPanel.buildFIQL();
+ LOG.debug("Node condition {}", fiql);
+
+ doSearch(target, fiql, searchResult);
+
+ Session.get().getFeedbackMessages().clear();
+ searchPanel.getSearchFeedback().refresh(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ searchPanel.getSearchFeedback().refresh(target);
+ }
+ });
+ }
+
+ private void doSearch(final AjaxRequestTarget target, final String fiql,
+ final AbstractSearchResultPanel resultsetPanel) {
+
+ if (fiql == null) {
+ error(getString(Constants.SEARCH_ERROR));
+ return;
+ }
+
+ resultsetPanel.search(fiql, target);
+ }
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ super.onEvent(event);
+
+ if (event.getPayload() instanceof TreeNodeClickUpdate) {
+ final TreeNodeClickUpdate update = (TreeNodeClickUpdate) event.getPayload();
+
+ final RoleSummaryPanel summaryPanel = new RoleSummaryPanel.Builder("summaryPanel")
+ .window(editRoleWin).callerPageRef(Roles.this.getPageReference())
+ .selectedNodeId(update.getSelectedNodeId()).build();
+
+ roleTabsContainer.addOrReplace(summaryPanel);
+ update.getTarget().add(roleTabsContainer);
+ }
+ }
+
+ public static class TreeNodeClickUpdate {
+
+ private final AjaxRequestTarget target;
+
+ private Long selectedNodeId;
+
+ public TreeNodeClickUpdate(final AjaxRequestTarget target, final Long selectedNodeId) {
+ this.target = target;
+ this.selectedNodeId = selectedNodeId;
+ }
+
+ public AjaxRequestTarget getTarget() {
+ return target;
+ }
+
+ public Long getSelectedNodeId() {
+ return selectedNodeId;
+ }
+
+ public void setSelectedNodeId(final Long selectedNodeId) {
+ this.selectedNodeId = selectedNodeId;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/SchedTaskModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/SchedTaskModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/SchedTaskModalPage.java
new file mode 100644
index 0000000..6222717
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/SchedTaskModalPage.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.List;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.PropertyModel;
+
+/**
+ * Modal window with Task form (to stop and start execution).
+ */
+public class SchedTaskModalPage extends AbstractSchedTaskModalPage {
+
+ private static final long serialVersionUID = -2501860242590060867L;
+
+ public SchedTaskModalPage(final ModalWindow window, final SchedTaskTO taskTO, final PageReference callerPageRef) {
+
+ super(window, taskTO, callerPageRef);
+
+ final IModel<List<String>> classNames = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ return taskRestClient.getJobClasses();
+ }
+ };
+
+ final AjaxDropDownChoicePanel<String> className = new AjaxDropDownChoicePanel<String>("jobClassName",
+ getString("class"), new PropertyModel<String>(taskTO, "jobClassName"));
+ className.setChoices(classNames.getObject());
+ className.addRequiredLabel();
+ className.setEnabled(taskTO.getKey() == 0);
+ className.setStyleSheet("ui-widget-content ui-corner-all long_dynamicsize");
+ profile.add(className);
+ }
+
+ @Override
+ public void submitAction(final SchedTaskTO taskTO) {
+ if (taskTO.getKey() > 0) {
+ taskRestClient.updateSchedTask(taskTO);
+ } else {
+ taskRestClient.createSchedTask(taskTO);
+ }
+ }
+}
[12/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
new file mode 100644
index 0000000..1ab407d
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.types.AuditLoggerName;
+import org.apache.syncope.common.lib.types.LoggerLevel;
+import org.apache.syncope.common.lib.wrap.AbstractWrappable;
+
+public final class CollectionWrapper {
+
+ private CollectionWrapper() {
+ // empty constructor for static utility class
+ }
+
+ public static <E, T extends AbstractWrappable<E>> List<T> wrap(final E element, final Class<T> reference) {
+ return Collections.singletonList(AbstractWrappable.getInstance(reference, element));
+ }
+
+ public static <E, T extends AbstractWrappable<E>> List<T> wrap(
+ final Collection<E> collection, final Class<T> reference) {
+
+ List<T> response = new ArrayList<T>();
+ for (E element : collection) {
+ response.add(AbstractWrappable.getInstance(reference, element));
+ }
+ return response;
+ }
+
+ public static <T extends AbstractWrappable<String>> List<String> unwrap(final Collection<T> collection) {
+ List<String> response = new ArrayList<String>();
+ for (T item : collection) {
+ response.add(item.getElement());
+ }
+ return response;
+ }
+
+ public static List<AuditLoggerName> wrapLogger(final Collection<LoggerTO> logger) {
+ List<AuditLoggerName> respons = new ArrayList<AuditLoggerName>();
+ for (LoggerTO l : logger) {
+ try {
+ respons.add(AuditLoggerName.fromLoggerName(l.getKey()));
+ } catch (Exception ignore) {
+ // ignore
+ }
+ }
+ return respons;
+ }
+
+ public static List<LoggerTO> unwrapLogger(final Collection<AuditLoggerName> auditNames) {
+ List<LoggerTO> respons = new ArrayList<LoggerTO>();
+ for (AuditLoggerName l : auditNames) {
+ LoggerTO loggerTO = new LoggerTO();
+ loggerTO.setKey(l.toLoggerName());
+ loggerTO.setLevel(LoggerLevel.DEBUG);
+ respons.add(loggerTO);
+ }
+ return respons;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/Preference.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/Preference.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/Preference.java
new file mode 100644
index 0000000..5cda9cf
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/Preference.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api;
+
+/**
+ * Preferences available to be specified during requests.
+ *
+ * @see RESTHeaders#PREFER
+ * @see RESTHeaders#PREFERENCE_APPLIED
+ */
+public enum Preference {
+
+ NONE(""),
+ RETURN_CONTENT("return-content"),
+ RETURN_NO_CONTENT("return-no-content");
+
+ private String literal;
+
+ private Preference(final String literal) {
+ this.literal = literal;
+ }
+
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+ public static Preference fromString(final String literal) {
+ Preference result = null;
+
+ for (Preference preference : values()) {
+ if (preference.toString().equalsIgnoreCase(literal)) {
+ result = preference;
+ }
+ }
+
+ if (result == null) {
+ result = NONE;
+ }
+
+ return result;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/RESTHeaders.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/RESTHeaders.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/RESTHeaders.java
new file mode 100644
index 0000000..93ea67e
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/RESTHeaders.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api;
+
+/**
+ * Custom HTTP headers in use with REST services.
+ */
+public final class RESTHeaders {
+
+ /**
+ * UserId option key.
+ */
+ public static final String USER_ID = "Syncope.UserId";
+
+ /**
+ * Username option key.
+ */
+ public static final String USERNAME = "Syncope.Username";
+
+ /**
+ * HTTP header key for object ID assigned to an object after its creation.
+ */
+ public static final String RESOURCE_ID = "Syncope.Id";
+
+ /**
+ * Declares the type of exception being raised.
+ *
+ * @see org.apache.syncope.common.lib.types.ClientExceptionType
+ */
+ public static final String ERROR_CODE = "X-Application-Error-Code";
+
+ /**
+ * Declares additional information for the exception being raised.
+ */
+ public static final String ERROR_INFO = "X-Application-Error-Info";
+
+ /**
+ * Mediatype for PNG images, not defined in <tt>javax.ws.rs.core.MediaType</tt>.
+ *
+ * @see javax.ws.rs.core.MediaType
+ */
+ public static final String MEDIATYPE_IMAGE_PNG = "image/png";
+
+ /**
+ * Allows the client to specify a preference for the result to be returned from the server.
+ * <a href="http://msdn.microsoft.com/en-us/library/hh537533.aspx">More information</a>.
+ *
+ * @see Preference
+ */
+ public static final String PREFER = "Prefer";
+
+ /**
+ * Allowd the server to inform the client about the fact that a specified preference was applied.
+ * <a href="http://msdn.microsoft.com/en-us/library/hh554623.aspx">More information</a>.
+ *
+ * @see Preference
+ */
+ public static final String PREFERENCE_APPLIED = "Preference-Applied";
+
+ private RESTHeaders() {
+ // Empty constructor for static utility class.
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
new file mode 100644
index 0000000..3fa5f8a
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.ConfTO;
+
+/**
+ * REST operations for configuration.
+ */
+@Path("configurations")
+public interface ConfigurationService extends JAXRSService {
+
+ /**
+ * Exports internal storage content as downloadable XML file.
+ *
+ * @return internal storage content as downloadable XML file
+ */
+ @GET
+ @Path("stream")
+ Response export();
+
+ /**
+ * Returns all configuration parameters.
+ *
+ * @return all configuration parameters
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ ConfTO list();
+
+ /**
+ * Returns configuration parameter with matching key.
+ *
+ * @param key identifier of configuration to be read
+ * @return configuration parameter with matching key
+ */
+ @GET
+ @Path("{key}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ AttrTO read(@NotNull @PathParam("key") String key);
+
+ /**
+ * Creates / updates the configuration parameter with the given key.
+ *
+ * @param key parameter key
+ * @param value parameter value
+ */
+ @PUT
+ @Path("{key}")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ void set(@NotNull @PathParam("key") String key, @NotNull AttrTO value);
+
+ /**
+ * Deletes the configuration parameter with matching key.
+ *
+ * @param key configuration parameter key
+ */
+ @DELETE
+ @Path("{key}")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ void delete(@NotNull @PathParam("key") String key);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
new file mode 100644
index 0000000..91d982e
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
@@ -0,0 +1,201 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import java.util.List;
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.model.wadl.Description;
+import org.apache.cxf.jaxrs.model.wadl.Descriptions;
+import org.apache.cxf.jaxrs.model.wadl.DocTarget;
+import org.apache.syncope.common.lib.to.BulkAction;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.ConnBundleTO;
+import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
+import org.apache.syncope.common.lib.to.ConnInstanceTO;
+import org.apache.syncope.common.lib.to.PlainSchemaTO;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
+
+/**
+ * REST operations for connector bundles and instances.
+ */
+@Path("connectors")
+public interface ConnectorService extends JAXRSService {
+
+ /**
+ * Returns available connector bundles with property keys in selected language.
+ *
+ * @param lang language to select property keys; default language is English
+ * @return available connector bundles with property keys in selected language
+ */
+ @GET
+ @Path("bundles")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<ConnBundleTO> getBundles(@QueryParam("lang") String lang);
+
+ /**
+ * Returns configuration for given connector instance.
+ *
+ * @param connInstanceKey connector instance id to read configuration from
+ * @return configuration for given connector instance
+ */
+ @GET
+ @Path("{connInstanceKey}/configuration")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<ConnConfProperty> getConfigurationProperties(@NotNull @PathParam("connInstanceKey") Long connInstanceKey);
+
+ /**
+ * Returns schema names for connector bundle matching the given connector instance id.
+ *
+ * @param connInstanceKey connector instance id to be used for schema lookup
+ * @param connInstanceTO connector instance object to provide special configuration properties
+ * @param includeSpecial if set to true, special schema names (like '__PASSWORD__') will be included;
+ * default is false
+ * @return schema names for connector bundle matching the given connector instance id
+ */
+ @POST
+ @Path("{connInstanceKey}/schemaNames")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<PlainSchemaTO> getSchemaNames(@NotNull @PathParam("connInstanceKey") Long connInstanceKey,
+ @NotNull ConnInstanceTO connInstanceTO,
+ @QueryParam("includeSpecial") @DefaultValue("false") boolean includeSpecial);
+
+ /**
+ * Returns supported object classes for connector bundle matching the given connector instance id.
+ *
+ * @param connInstanceKey connector instance id to be used for schema lookup
+ * @param connInstanceTO connector instance object to provide special configuration properties
+ * @return supported object classes for connector bundle matching the given connector instance id
+ */
+ @POST
+ @Path("{connInstanceKey}/supportedObjectClasses")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<ConnIdObjectClassTO> getSupportedObjectClasses(
+ @NotNull @PathParam("connInstanceKey") Long connInstanceKey,
+ @NotNull ConnInstanceTO connInstanceTO);
+
+ /**
+ * Returns connector instance with matching id.
+ *
+ * @param connInstanceKey connector instance id to be read
+ * @return connector instance with matching id
+ */
+ @GET
+ @Path("{connInstanceKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ ConnInstanceTO read(@NotNull @PathParam("connInstanceKey") Long connInstanceKey);
+
+ /**
+ * Returns connector instance for matching resource.
+ *
+ * @param resourceName resource name to be used for connector lookup
+ * @return connector instance for matching resource
+ */
+ @GET
+ @Path("byResource/{resourceName}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ ConnInstanceTO readByResource(@NotNull @PathParam("resourceName") String resourceName);
+
+ /**
+ * Returns a list of all connector instances with property keys in the matching language.
+ *
+ * @param lang language to select property keys, null for default (English).
+ * An ISO 639 alpha-2 or alpha-3 language code, or a language subtag up to 8 characters in length.
+ * @return list of all connector instances with property keys in the matching language
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<ConnInstanceTO> list(@QueryParam("lang") String lang);
+
+ /**
+ * Creates a new connector instance.
+ *
+ * @param connInstanceTO connector instance to be created
+ * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created connector instance
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring <tt>Location</tt> header of created connector instance")
+ })
+ @POST
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response create(@NotNull ConnInstanceTO connInstanceTO);
+
+ /**
+ * Updates the connector instance matching the provided id.
+ *
+ * @param connInstanceKey connector instance id to be updated
+ * @param connInstanceTO connector instance to be stored
+ */
+ @PUT
+ @Path("{connInstanceKey}")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ void update(@NotNull @PathParam("connInstanceKey") Long connInstanceKey, @NotNull ConnInstanceTO connInstanceTO);
+
+ /**
+ * Deletes the connector instance matching the provided id.
+ *
+ * @param connInstanceKey connector instance id to be deleted
+ */
+ @DELETE
+ @Path("{connInstanceKey}")
+ void delete(@NotNull @PathParam("connInstanceKey") Long connInstanceKey);
+
+ /**
+ * @param connInstanceTO connector instance to be used for connection check
+ * @return true if connection could be established
+ */
+ @POST
+ @Path("check")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ boolean check(@NotNull ConnInstanceTO connInstanceTO);
+
+ /**
+ * Reload all connector bundles and instances.
+ */
+ @POST
+ @Path("reload")
+ void reload();
+
+ /**
+ * Executes the provided bulk action.
+ *
+ * @param bulkAction list of connector instance ids against which the bulk action will be performed.
+ * @return Bulk action result
+ */
+ @POST
+ @Path("bulk")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ BulkActionResult bulk(@NotNull BulkAction bulkAction);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/EntitlementService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/EntitlementService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/EntitlementService.java
new file mode 100644
index 0000000..44ad900
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/EntitlementService.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import java.util.List;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.wrap.EntitlementTO;
+
+/**
+ * REST operations for entitlements.
+ */
+@Path("entitlements")
+public interface EntitlementService extends JAXRSService {
+
+ /**
+ * Returns a list of all known entitlements.
+ *
+ * @return list of all known entitlements
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<EntitlementTO> getAllEntitlements();
+
+ /**
+ * Returns a list of entitlements assigned to user making the current request.
+ *
+ * @return list of entitlements assigned to user making the current request
+ */
+ @GET
+ @Path("own")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<EntitlementTO> getOwnEntitlements();
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/JAXRSService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/JAXRSService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/JAXRSService.java
new file mode 100644
index 0000000..7108b49
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/JAXRSService.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+public interface JAXRSService {
+
+ final String PARAM_FIQL = "fiql";
+
+ final String PARAM_PAGE = "page";
+
+ final String DEFAULT_PARAM_PAGE = "1";
+
+ final int DEFAULT_PARAM_PAGE_VALUE = Integer.valueOf(DEFAULT_PARAM_PAGE);
+
+ final String PARAM_SIZE = "size";
+
+ final String DEFAULT_PARAM_SIZE = "25";
+
+ final int DEFAULT_PARAM_SIZE_VALUE = Integer.valueOf(DEFAULT_PARAM_SIZE);
+
+ final String PARAM_ORDERBY = "orderby";
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
new file mode 100644
index 0000000..6ab40e7
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import java.util.List;
+import javax.validation.constraints.NotNull;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.to.EventCategoryTO;
+import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.types.LoggerType;
+
+/**
+ * REST operations for logging and auditing.
+ */
+@Path("logger")
+public interface LoggerService extends JAXRSService {
+
+ /**
+ * Returns a list of all managed events in audit.
+ *
+ * @return list of all managed events in audit
+ */
+ @GET
+ @Path("events")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<EventCategoryTO> events();
+
+ /**
+ * Returns logger with matching type and name.
+ *
+ * @param type LoggerType to be selected.
+ * @param name Logger name to be read
+ * @return logger with matching type and name
+ */
+ @GET
+ @Path("{type}/{name}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ LoggerTO read(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") final String name);
+
+ /**
+ * Returns a list of loggers with matching type.
+ *
+ * @param type LoggerType to be selected
+ * @return list of loggers with matching type
+ */
+ @GET
+ @Path("{type}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<LoggerTO> list(@NotNull @PathParam("type") LoggerType type);
+
+ /**
+ * Creates or updates (if existing) the logger with matching name.
+ *
+ * @param type LoggerType to be selected
+ * @param name Logger name to be updated
+ * @param logger Logger to be created or updated
+ */
+ @PUT
+ @Path("{type}/{name}")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ void update(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") String name,
+ @NotNull LoggerTO logger);
+
+ /**
+ * Deletes the logger with matching name.
+ *
+ * @param type LoggerType to be selected
+ * @param name Logger name to be deleted
+ */
+ @DELETE
+ @Path("{type}/{name}")
+ void delete(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") String name);
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
new file mode 100644
index 0000000..a210014
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import java.util.List;
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.model.wadl.Description;
+import org.apache.cxf.jaxrs.model.wadl.Descriptions;
+import org.apache.cxf.jaxrs.model.wadl.DocTarget;
+import org.apache.syncope.common.lib.to.NotificationTO;
+
+/**
+ * REST operations for notifications.
+ */
+@Path("notifications")
+public interface NotificationService extends JAXRSService {
+
+ /**
+ * Returns notification with matching id.
+ *
+ * @param notificationKey key of notification to be read
+ * @return notification with matching key
+ */
+ @GET
+ @Path("{notificationKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ NotificationTO read(@NotNull @PathParam("notificationKey") Long notificationKey);
+
+ /**
+ * Returns a list of all notifications.
+ *
+ * @return list of all notifications.
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<NotificationTO> list();
+
+ /**
+ * Creates a new notification.
+ *
+ * @param notificationTO Creates a new notification.
+ * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created notification
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring <tt>Location</tt> header of created notification")
+ })
+ @POST
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response create(@NotNull NotificationTO notificationTO);
+
+ /**
+ * Updates the notification matching the given key.
+ *
+ * @param notificationKey key of notification to be updated
+ * @param notificationTO notification to be stored
+ */
+ @PUT
+ @Path("{notificationKey}")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ void update(@NotNull @PathParam("notificationKey") Long notificationKey, @NotNull NotificationTO notificationTO);
+
+ /**
+ * Deletes the notification matching the given key.
+ *
+ * @param notificationKey key for notification to be deleted
+ */
+ @DELETE
+ @Path("{notificationKey}")
+ void delete(@NotNull @PathParam("notificationKey") Long notificationKey);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
new file mode 100644
index 0000000..c2a4e6a
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import java.util.List;
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.MatrixParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.model.wadl.Description;
+import org.apache.cxf.jaxrs.model.wadl.Descriptions;
+import org.apache.cxf.jaxrs.model.wadl.DocTarget;
+import org.apache.syncope.common.lib.to.AbstractPolicyTO;
+import org.apache.syncope.common.lib.types.PolicyType;
+
+/**
+ * REST operations for policies.
+ */
+@Path("policies")
+public interface PolicyService extends JAXRSService {
+
+ /**
+ * Returns the policy matching the given key.
+ *
+ * @param policyKey key of requested policy
+ * @param <T> response type (extending PolicyTO)
+ * @return policy with matching id
+ */
+ @GET
+ @Path("{policyKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractPolicyTO> T read(@NotNull @PathParam("policyKey") Long policyKey);
+
+ /**
+ * Returns the global policy for the given type.
+ *
+ * @param type PolicyType to read global policy from
+ * @param <T> response type (extending PolicyTO)
+ * @return global policy for matching type
+ */
+ @GET
+ @Path("global")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractPolicyTO> T readGlobal(@NotNull @MatrixParam("type") PolicyType type);
+
+ /**
+ * Returns a list of policies of the matching type.
+ *
+ * @param type Type selector for requested policies
+ * @param <T> response type (extending PolicyTO)
+ * @return list of policies with matching type
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractPolicyTO> List<T> list(@NotNull @MatrixParam("type") PolicyType type);
+
+ /**
+ * Create a new policy.
+ *
+ * @param policyTO Policy to be created (needs to match type)
+ * @param <T> response type (extending PolicyTO)
+ * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created policy
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE, value = "Featuring <tt>Location</tt> header of created policy")
+ })
+ @POST
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractPolicyTO> Response create(@NotNull T policyTO);
+
+ /**
+ * Updates policy matching the given key.
+ *
+ * @param policyKey key of policy to be updated
+ * @param policyTO Policy to replace existing policy
+ * @param <T> response type (extending PolicyTO)
+ */
+ @PUT
+ @Path("{policyKey}")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractPolicyTO> void update(@NotNull @PathParam("policyKey") Long policyKey, @NotNull T policyTO);
+
+ /**
+ * Delete policy matching the given key.
+ *
+ * @param policyKey key of policy to be deleted
+ * @param <T> response type (extending PolicyTO)
+ */
+ @DELETE
+ @Path("{policyKey}")
+ <T extends AbstractPolicyTO> void delete(@NotNull @PathParam("policyKey") Long policyKey);
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
new file mode 100644
index 0000000..1e9f943
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import java.util.List;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.model.wadl.Description;
+import org.apache.cxf.jaxrs.model.wadl.Descriptions;
+import org.apache.cxf.jaxrs.model.wadl.DocTarget;
+import org.apache.syncope.common.lib.to.PagedResult;
+import org.apache.syncope.common.lib.to.ReportExecTO;
+import org.apache.syncope.common.lib.to.ReportTO;
+import org.apache.syncope.common.lib.types.ReportExecExportFormat;
+import org.apache.syncope.common.lib.wrap.ReportletConfClass;
+
+/**
+ * REST operations for reports.
+ */
+@Path("reports")
+public interface ReportService extends JAXRSService {
+
+ /**
+ * Returns a list of available classes for reportlet configuration.
+ *
+ * @return list of available classes for reportlet configuration
+ */
+ @GET
+ @Path("reportletConfClasses")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<ReportletConfClass> getReportletConfClasses();
+
+ /**
+ * Returns report with matching key.
+ *
+ * @param reportKey key of report to be read
+ * @return report with matching key
+ */
+ @GET
+ @Path("{reportKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ ReportTO read(@NotNull @PathParam("reportKey") Long reportKey);
+
+ /**
+ * Returns report execution with matching key.
+ *
+ * @param executionKey report execution id to be selected
+ * @return report execution with matching key
+ */
+ @GET
+ @Path("executions/{executionKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ ReportExecTO readExecution(@NotNull @PathParam("executionKey") Long executionKey);
+
+ /**
+ * Returns a paged list of all existing reports.
+ *
+ * @return paged list of all existing reports
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<ReportTO> list();
+
+ /**
+ * Returns a paged list of all existing reports.
+ *
+ * @param orderBy list of ordering clauses, separated by comma
+ * @return paged list of all existing reports
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<ReportTO> list(@QueryParam(PARAM_ORDERBY) String orderBy);
+
+ /**
+ * Returns a paged list of all existing reports matching page/size conditions.
+ *
+ * @param page selected page in relation to size
+ * @param size number of entries per page
+ * @return paged list of existing reports matching page/size conditions
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<ReportTO> list(
+ @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
+ @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
+
+ /**
+ * Returns a paged list of all existing reports matching page/size conditions.
+ *
+ * @param page selected page in relation to size
+ * @param size number of entries per page
+ * @param orderBy list of ordering clauses, separated by comma
+ * @return paged list of existing reports matching page/size conditions
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<ReportTO> list(
+ @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
+ @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
+ @QueryParam(PARAM_ORDERBY) String orderBy);
+
+ /**
+ * Creates a new report.
+ *
+ * @param reportTO report to be created
+ * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created report
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE, value = "Featuring <tt>Location</tt> header of created report")
+ })
+ @POST
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response create(@NotNull ReportTO reportTO);
+
+ /**
+ * Updates report with matching key.
+ *
+ * @param reportKey id for report to be updated
+ * @param reportTO report to be stored
+ */
+ @PUT
+ @Path("{reportKey}")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ void update(@NotNull @PathParam("reportKey") Long reportKey, ReportTO reportTO);
+
+ /**
+ * Deletes report with matching key.
+ *
+ * @param reportKey Deletes report with matching key
+ */
+ @DELETE
+ @Path("{reportKey}")
+ void delete(@NotNull @PathParam("reportKey") Long reportKey);
+
+ /**
+ * Deletes report execution with matching key.
+ *
+ * @param executionKey key of execution report to be deleted
+ */
+ @DELETE
+ @Path("executions/{executionKey}")
+ void deleteExecution(@NotNull @PathParam("executionKey") Long executionKey);
+
+ /**
+ * Executes the report with matching key.
+ *
+ * @param reportKey key of report to be executed
+ * @return report execution result
+ */
+ @POST
+ @Path("{reportKey}/execute")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ ReportExecTO execute(@NotNull @PathParam("reportKey") Long reportKey);
+
+ /**
+ * Exports the report execution with matching key in the requested format.
+ *
+ * @param executionKey key of execution report to be selected
+ * @param fmt file-format selection
+ * @return a stream for content download
+ */
+ @GET
+ @Path("executions/{executionKey}/stream")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response exportExecutionResult(@NotNull @PathParam("executionKey") Long executionKey,
+ @QueryParam("format") ReportExecExportFormat fmt);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
new file mode 100644
index 0000000..9199d37
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import java.util.List;
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.model.wadl.Description;
+import org.apache.cxf.jaxrs.model.wadl.Descriptions;
+import org.apache.cxf.jaxrs.model.wadl.DocTarget;
+import org.apache.syncope.common.lib.to.BulkAction;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.ConnObjectTO;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
+import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.lib.wrap.SubjectKey;
+
+/**
+ * REST operations for external resources.
+ */
+@Path("resources")
+public interface ResourceService extends JAXRSService {
+
+ /**
+ * Returns connector object from the external resource, for the given type and key.
+ *
+ * @param resourceKey Name of resource to read connector object from
+ * @param type user / role
+ * @param key user key / role key
+ * @return connector object from the external resource, for the given type and key
+ */
+ @GET
+ @Path("{resourceKey}/{type}/{key}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ ConnObjectTO getConnectorObject(@NotNull @PathParam("resourceKey") String resourceKey,
+ @NotNull @PathParam("type") SubjectType type, @NotNull @PathParam("key") Long key);
+
+ /**
+ * Returns the resource with matching name.
+ *
+ * @param resourceKey Name of resource to be read
+ * @return resource with matching name
+ */
+ @GET
+ @Path("{resourceKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ ResourceTO read(@NotNull @PathParam("resourceKey") String resourceKey);
+
+ /**
+ * Returns a list of all resources.
+ *
+ * @return list of all resources
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<ResourceTO> list();
+
+ /**
+ * Creates a new resource.
+ *
+ * @param resourceTO Resource to be created
+ * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created resource
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring <tt>Location</tt> header of created resource")
+ })
+ @POST
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response create(@NotNull ResourceTO resourceTO);
+
+ /**
+ * Updates the resource matching the given name.
+ *
+ * @param resourceKey name of resource to be updated
+ * @param resourceTO resource to be stored
+ */
+ @PUT
+ @Path("{resourceKey}")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ void update(@NotNull @PathParam("resourceKey") String resourceKey, @NotNull ResourceTO resourceTO);
+
+ /**
+ * Deletes the resource matching the given name.
+ *
+ * @param resourceKey name of resource to be deleted
+ */
+ @DELETE
+ @Path("{resourceKey}")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ void delete(@NotNull @PathParam("resourceKey") String resourceKey);
+
+ /**
+ * Checks wether the connection to resource could be established.
+ *
+ * @param resourceTO resource to be checked
+ * @return true if connection to resource could be established
+ */
+ @POST
+ @Path("check")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ boolean check(@NotNull ResourceTO resourceTO);
+
+ /**
+ * De-associate users or roles (depending on the provided subject type) from the given resource.
+ *
+ * @param resourceKey name of resource
+ * @param subjectType subject type (user or role)
+ * @param type resource de-association action type
+ * @param subjectKeys users or roles against which the bulk action will be performed
+ * @return <tt>Response</tt> object featuring {@link BulkActionResult} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
+ })
+ @POST
+ @Path("{resourceKey}/bulkDeassociation/{subjType}/{type}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ BulkActionResult bulkDeassociation(@NotNull @PathParam("resourceKey") String resourceKey,
+ @NotNull @PathParam("subjType") SubjectType subjectType,
+ @NotNull @PathParam("type") ResourceDeassociationActionType type, @NotNull List<SubjectKey> subjectKeys);
+
+ /**
+ * Executes the provided bulk action.
+ *
+ * @param bulkAction list of resource names against which the bulk action will be performed
+ * @return Bulk action result
+ */
+ @POST
+ @Path("bulk")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ BulkActionResult bulk(@NotNull BulkAction bulkAction);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
new file mode 100644
index 0000000..5d1b737
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
@@ -0,0 +1,312 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import java.util.List;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.model.wadl.Description;
+import org.apache.cxf.jaxrs.model.wadl.Descriptions;
+import org.apache.cxf.jaxrs.model.wadl.DocTarget;
+import org.apache.syncope.common.lib.mod.RoleMod;
+import org.apache.syncope.common.lib.to.BulkAction;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.PagedResult;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
+import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
+import org.apache.syncope.common.lib.wrap.ResourceName;
+
+/**
+ * REST operations for roles.
+ */
+@Path("roles")
+public interface RoleService extends JAXRSService {
+
+ /**
+ * Returns children roles of given role.
+ *
+ * @param roleKey key of role to get children from
+ * @return children roles of given role
+ */
+ @GET
+ @Path("{roleKey}/children")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<RoleTO> children(@NotNull @PathParam("roleKey") Long roleKey);
+
+ /**
+ * Returns parent role of the given role (or null if no parent exists).
+ *
+ * @param roleKey key of role to get parent role from
+ * @return parent role of the given role (or null if no parent exists)
+ */
+ @GET
+ @Path("{roleKey}/parent")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ RoleTO parent(@NotNull @PathParam("roleKey") Long roleKey);
+
+ /**
+ * Reads the role matching the provided roleKey.
+ *
+ * @param roleKey key of role to be read
+ * @return role with matching id
+ */
+ @GET
+ @Path("{roleKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ RoleTO read(@NotNull @PathParam("roleKey") Long roleKey);
+
+ /**
+ * This method is similar to {@link #read(Long)}, but uses different authentication handling to ensure that a user
+ * can read his own roles.
+ *
+ * @param roleKey key of role to be read
+ * @return role with matching id
+ */
+ @Descriptions({
+ @Description(target = DocTarget.METHOD,
+ value = "This method is similar to <tt>read()</tt>, but uses different authentication handling to "
+ + "ensure that a user can read his own roles.")
+ })
+ @GET
+ @Path("{roleKey}/own")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ RoleTO readSelf(@NotNull @PathParam("roleKey") Long roleKey);
+
+ /**
+ * Returns a paged list of existing roles.
+ *
+ * @return paged list of all existing roles
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<RoleTO> list();
+
+ /**
+ * Returns a paged list of existing roles.
+ *
+ * @param orderBy list of ordering clauses, separated by comma
+ * @return paged list of all existing roles
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<RoleTO> list(@QueryParam(PARAM_ORDERBY) String orderBy);
+
+ /**
+ * Returns a paged list of existing roles matching page/size conditions.
+ *
+ * @param page result page number
+ * @param size number of entries per page
+ * @return paged list of existing roles matching page/size conditions
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<RoleTO> list(
+ @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
+ @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
+
+ /**
+ * Returns a paged list of existing roles matching page/size conditions.
+ *
+ * @param page result page number
+ * @param size number of entries per page
+ * @param orderBy list of ordering clauses, separated by comma
+ * @return paged list of existing roles matching page/size conditions
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<RoleTO> list(
+ @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
+ @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
+ @QueryParam(PARAM_ORDERBY) String orderBy);
+
+ /**
+ * Returns a paged list of roles matching the provided FIQL search condition.
+ *
+ * @param fiql FIQL search expression
+ * @return paged list of roles matching the provided FIQL search condition
+ */
+ @GET
+ @Path("search")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<RoleTO> search(@NotNull @QueryParam(PARAM_FIQL) String fiql);
+
+ /**
+ * Returns a paged list of roles matching the provided FIQL search condition.
+ *
+ * @param fiql FIQL search expression
+ * @param orderBy list of ordering clauses, separated by comma
+ * @return paged list of roles matching the provided FIQL search condition
+ */
+ @GET
+ @Path("search")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<RoleTO> search(
+ @NotNull @QueryParam(PARAM_FIQL) String fiql, @QueryParam(PARAM_ORDERBY) String orderBy);
+
+ /**
+ * Returns a paged list of roles matching the provided FIQL search condition.
+ *
+ * @param fiql FIQL search expression
+ * @param page result page number
+ * @param size number of entries per page
+ * @return paged list of roles matching the provided FIQL search condition
+ */
+ @GET
+ @Path("search")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<RoleTO> search(@QueryParam(PARAM_FIQL) String fiql,
+ @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
+ @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
+
+ /**
+ * Returns a paged list of roles matching the provided FIQL search condition.
+ *
+ * @param fiql FIQL search expression
+ * @param page result page number
+ * @param size number of entries per page
+ * @param orderBy list of ordering clauses, separated by comma
+ * @return paged list of roles matching the provided FIQL search condition
+ */
+ @GET
+ @Path("search")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ PagedResult<RoleTO> search(@QueryParam(PARAM_FIQL) String fiql,
+ @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
+ @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
+ @QueryParam(PARAM_ORDERBY) String orderBy);
+
+ /**
+ * Creates a new role.
+ *
+ * @param roleTO role to be created
+ * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created role as well as the role itself
+ * enriched with propagation status information - {@link RoleTO} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring <tt>Location</tt> header of created role as well as the "
+ + "role itself enriched with propagation status information - <tt>RoleTO</tt> as <tt>Entity</tt>")
+ })
+ @POST
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response create(@NotNull RoleTO roleTO);
+
+ /**
+ * Updates role matching the provided roleKey.
+ *
+ * @param roleKey key of role to be updated
+ * @param roleMod modification to be applied to role matching the provided roleKey
+ * @return <tt>Response</tt> object featuring the updated role enriched with propagation status information
+ * - {@link RoleTO} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring the updated role enriched with propagation status information - "
+ + "<tt>RoleTO</tt> as <tt>Entity</tt>")
+ })
+ @POST
+ @Path("{roleKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response update(@NotNull @PathParam("roleKey") Long roleKey, @NotNull RoleMod roleMod);
+
+ /**
+ * Deletes role matching provided roleKey.
+ *
+ * @param roleKey key of role to be deleted
+ * @return <tt>Response</tt> object featuring the deleted role enriched with propagation status information
+ * - {@link RoleTO} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring the deleted role enriched with propagation status information - "
+ + "<tt>RoleTO</tt> as <tt>Entity</tt>")
+ })
+ @DELETE
+ @Path("{roleKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response delete(@NotNull @PathParam("roleKey") Long roleKey);
+
+ /**
+ * Executes resource-related operations on given role.
+ *
+ * @param roleKey role id.
+ * @param type resource association action type
+ * @param resourceNames external resources to be used for propagation-related operations
+ * @return <tt>Response</tt> object featuring
+ * {@link BulkActionResult} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
+ })
+ @POST
+ @Path("{roleKey}/deassociate/{type}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response bulkDeassociation(@NotNull @PathParam("roleKey") Long roleKey,
+ @NotNull @PathParam("type") ResourceDeassociationActionType type,
+ @NotNull List<ResourceName> resourceNames);
+
+ /**
+ * Executes resource-related operations on given role.
+ *
+ * @param roleKey role id.
+ * @param type resource association action type
+ * @param resourceNames external resources to be used for propagation-related operations
+ * @return <tt>Response</tt> object featuring {@link BulkActionResult} as <tt>Entity</tt>
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
+ })
+ @POST
+ @Path("{roleKey}/associate/{type}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response bulkAssociation(@NotNull @PathParam("roleKey") Long roleKey,
+ @NotNull @PathParam("type") ResourceAssociationActionType type,
+ @NotNull List<ResourceName> resourceNames);
+
+ /**
+ * Executes the provided bulk action.
+ *
+ * @param bulkAction list of role ids against which the bulk action will be performed.
+ * @return Bulk action result
+ */
+ @POST
+ @Path("bulk")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ BulkActionResult bulk(@NotNull BulkAction bulkAction);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
new file mode 100644
index 0000000..d3f850b
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import java.util.List;
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.model.wadl.Description;
+import org.apache.cxf.jaxrs.model.wadl.Descriptions;
+import org.apache.cxf.jaxrs.model.wadl.DocTarget;
+import org.apache.syncope.common.lib.to.AbstractSchemaTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.SchemaType;
+
+/**
+ * REST operations for attribute schemas.
+ */
+@Path("schemas/{kind}/{type}")
+public interface SchemaService extends JAXRSService {
+
+ /**
+ * Returns schema matching the given kind, type and name.
+ *
+ * @param <T> actual SchemaTO
+ * @param attrType kind for schemas to be read
+ * @param schemaType type for schemas to be read
+ * @param schemaKey name of schema to be read
+ * @return schema matching the given kind, type and name
+ */
+ @GET
+ @Path("{key}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractSchemaTO> T read(@NotNull @PathParam("kind") AttributableType attrType,
+ @NotNull @PathParam("type") SchemaType schemaType, @NotNull @PathParam("key") String schemaKey);
+
+ /**
+ * Returns a list of schemas with matching kind and type.
+ *
+ * @param <T> actual SchemaTO
+ * @param attrType kind for schemas to be listed
+ * @param schemaType type for schemas to be listed
+ * @return list of schemas with matching kind and type
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractSchemaTO> List<T> list(
+ @NotNull @PathParam("kind") AttributableType attrType, @NotNull @PathParam("type") SchemaType schemaType);
+
+ /**
+ * Creates a new schema.
+ *
+ * @param <T> actual SchemaTO
+ * @param attrType kind for schema to be created
+ * @param schemaType type for schema to be created
+ * @param schemaTO schema to be created
+ * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created schema
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE, value = "Featuring <tt>Location</tt> header of created schema")
+ })
+ @POST
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractSchemaTO> Response create(@NotNull @PathParam("kind") AttributableType attrType,
+ @NotNull @PathParam("type") SchemaType schemaType, @NotNull T schemaTO);
+
+ /**
+ * Updates the schema matching the given kind, type and name.
+ *
+ * @param <T> actual SchemaTO
+ * @param attrType kind for schemas to be updated
+ * @param schemaType type for schemas to be updated
+ * @param schemaKey name of schema to be updated
+ * @param schemaTO updated schema to be stored
+ */
+ @PUT
+ @Path("{key}")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractSchemaTO> void update(@NotNull @PathParam("kind") AttributableType attrType,
+ @NotNull @PathParam("type") SchemaType schemaType,
+ @NotNull @PathParam("key") String schemaKey, @NotNull T schemaTO);
+
+ /**
+ * Deletes the schema matching the given kind, type and name.
+ *
+ * @param attrType kind for schema to be deleted
+ * @param schemaType type for schema to be deleted
+ * @param schemaKey name of schema to be deleted
+ */
+ @DELETE
+ @Path("{key}")
+ void delete(@NotNull @PathParam("kind") AttributableType attrType,
+ @NotNull @PathParam("type") SchemaType schemaType,
+ @NotNull @PathParam("key") String schemaKey);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
new file mode 100644
index 0000000..12a73cf
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import java.util.List;
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.model.wadl.Description;
+import org.apache.cxf.jaxrs.model.wadl.Descriptions;
+import org.apache.cxf.jaxrs.model.wadl.DocTarget;
+import org.apache.syncope.common.lib.to.SecurityQuestionTO;
+
+/**
+ * REST operations for configuration.
+ */
+@Path("securityQuestions")
+public interface SecurityQuestionService extends JAXRSService {
+
+ /**
+ * Returns a list of all security questions.
+ *
+ * @return list of all security questions
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ List<SecurityQuestionTO> list();
+
+ /**
+ * Returns security question with matching id.
+ *
+ * @param securityQuestionId security question id to be read
+ * @return security question with matching id
+ */
+ @GET
+ @Path("{securityQuestionId}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ SecurityQuestionTO read(@NotNull @PathParam("securityQuestionId") Long securityQuestionId);
+
+ /**
+ * Creates a new security question.
+ *
+ * @param securityQuestionTO security question to be created
+ * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created security question
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE,
+ value = "Featuring <tt>Location</tt> header of created security question")
+ })
+ @POST
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ Response create(@NotNull SecurityQuestionTO securityQuestionTO);
+
+ /**
+ * Updates the security question matching the provided id.
+ *
+ * @param securityQuestionId security question id to be updated
+ * @param securityQuestionTO security question to be stored
+ */
+ @PUT
+ @Path("{securityQuestionId}")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ void update(@NotNull @PathParam("securityQuestionId") Long securityQuestionId,
+ @NotNull SecurityQuestionTO securityQuestionTO);
+
+ /**
+ * Deletes the security question matching the provided id.
+ *
+ * @param securityQuestionId security question id to be deleted
+ */
+ @DELETE
+ @Path("{securityQuestionId}")
+ void delete(@NotNull @PathParam("securityQuestionId") Long securityQuestionId);
+
+ /**
+ * Ask for security question configured for the user matching the given username, if any.
+ *
+ * @param username username for which the security question is requested
+ * @return security question, if configured for the user matching the given username
+ */
+ @GET
+ @Path("byUser/{username}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ SecurityQuestionTO readByUser(@NotNull @PathParam("username") String username);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
new file mode 100644
index 0000000..cdd6dbc
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.to.SyncopeTO;
+
+@Path("")
+public interface SyncopeService extends JAXRSService {
+
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ SyncopeTO info();
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
new file mode 100644
index 0000000..24c9b0e
--- /dev/null
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.rest.api.service;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.MatrixParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.model.wadl.Description;
+import org.apache.cxf.jaxrs.model.wadl.Descriptions;
+import org.apache.cxf.jaxrs.model.wadl.DocTarget;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.BulkAction;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.PagedResult;
+import org.apache.syncope.common.lib.to.ReportExecTO;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.syncope.common.lib.types.TaskType;
+
+/**
+ * REST operations for tasks.
+ */
+@Path("tasks")
+public interface TaskService extends JAXRSService {
+
+ /**
+ * Returns the task matching the given key.
+ *
+ * @param taskKey key of task to be read
+ * @param <T> type of taskTO
+ * @return task with matching id
+ */
+ @GET
+ @Path("{taskKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractTaskTO> T read(@NotNull @PathParam("taskKey") Long taskKey);
+
+ /**
+ * Returns the task execution with the given id.
+ *
+ * @param executionKey key of task execution to be read
+ * @return task execution with matching Id
+ */
+ @GET
+ @Path("executions/{executionKey}")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ TaskExecTO readExecution(@NotNull @PathParam("executionKey") Long executionKey);
+
+ /**
+ * Returns a list of tasks with matching type.
+ *
+ * @param taskType type of tasks to be listed
+ * @param <T> type of taskTO
+ * @return list of tasks with matching type
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractTaskTO> PagedResult<T> list(@NotNull @MatrixParam("type") TaskType taskType);
+
+ /**
+ * Returns a list of tasks with matching type.
+ *
+ * @param taskType type of tasks to be listed
+ * @param orderBy list of ordering clauses, separated by comma
+ * @param <T> type of taskTO
+ * @return list of tasks with matching type
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractTaskTO> PagedResult<T> list(@NotNull @MatrixParam("type") TaskType taskType,
+ @QueryParam(PARAM_ORDERBY) String orderBy);
+
+ /**
+ * Returns a paged list of existing tasks matching type and page/size conditions.
+ *
+ * @param taskType type of tasks to be listed
+ * @param page page number of tasks in relation to page size
+ * @param size number of tasks listed per page
+ * @param orderBy list of ordering clauses, separated by comma
+ * @param <T> type of taskTO
+ * @return paged list of existing tasks matching type and page/size conditions
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractTaskTO> PagedResult<T> list(@NotNull @MatrixParam("type") TaskType taskType,
+ @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
+ @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
+ @QueryParam(PARAM_ORDERBY) String orderBy);
+
+ /**
+ * Returns a paged list of existing tasks matching type and page/size conditions.
+ *
+ * @param taskType type of tasks to be listed
+ * @param page page number of tasks in relation to page size
+ * @param size number of tasks listed per page
+ * @param <T> type of taskTO
+ * @return paged list of existing tasks matching type and page/size conditions
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends AbstractTaskTO> PagedResult<T> list(@MatrixParam("type") TaskType taskType,
+ @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
+ @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
+
+ /**
+ * Creates a new task.
+ *
+ * @param taskTO task to be created
+ * @param <T> type of taskTO
+ * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created task
+ */
+ @Descriptions({
+ @Description(target = DocTarget.RESPONSE, value = "Featuring <tt>Location</tt> header of created task")
+ })
+ @POST
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ <T extends SchedTaskTO> Response create(@NotNull T taskTO);
+
+ /**
+ * Updates the task matching the provided key.
+ *
+ * @param taskKey key of task to be updated
+ * @param taskTO updated task to be stored
+ */
+ @PUT
+ @Path("{taskKey}")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ void update(@NotNull @PathParam("taskKey") Long taskKey, @NotNull AbstractTaskTO taskTO);
+
+ /**
+ * Deletes the task matching the provided key.
+ *
+ * @param taskKey key of task to be deleted
+ */
+ @DELETE
+ @Path("{taskKey}")
+ void delete(@NotNull @PathParam("taskKey") Long taskKey);
+
+ /**
+ * Deletes the task execution matching the provided key.
+ *
+ * @param executionKey key of task execution to be deleted
+ */
+ @DELETE
+ @Path("executions/{executionKey}")
+ void deleteExecution(@NotNull @PathParam("executionKey") Long executionKey);
+
+ /**
+ * Executes the task matching the given id.
+ *
+ * @param taskKey key of task to be executed
+ * @param dryRun if true, task will only be simulated
+ * @return execution report for the task matching the given id
+ */
+ @POST
+ @Path("{taskKey}/execute")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ TaskExecTO execute(@NotNull @PathParam("taskKey") Long taskKey,
+ @QueryParam("dryRun") @DefaultValue("false") boolean dryRun);
+
+ /**
+ * Reports task execution result.
+ *
+ * @param executionKey key of task execution being reported
+ * @param reportExec execution being reported
+ */
+ @POST
+ @Path("executions/{executionKey}/report")
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ void report(@NotNull @PathParam("executionKey") Long executionKey, @NotNull ReportExecTO reportExec);
+
+ /**
+ * Executes the provided bulk action.
+ *
+ * @param bulkAction list of task ids against which the bulk action will be performed.
+ * @return Bulk action result
+ */
+ @POST
+ @Path("bulk")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ BulkActionResult bulk(@NotNull BulkAction bulkAction);
+}
[51/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
[SYNCOPE-620] Re-organization completed
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/2d194636
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/2d194636
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/2d194636
Branch: refs/heads/2_0_X
Commit: 2d19463622aa937832b5deca845606c75898b9fd
Parents: 50a9236
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Fri Feb 13 12:43:53 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Fri Feb 13 12:43:53 2015 +0100
----------------------------------------------------------------------
.travis.yml | 2 +-
archetype/pom.xml | 90 +-
.../archetype-resources/console/pom.xml | 284 +-
.../resources/archetype-resources/core/pom.xml | 289 +-
.../main/resources/archetype-resources/pom.xml | 110 +
archetype/src/main/resources/meta-pom.xml | 81 +-
build-tools/LICENSE | 737 ------
build-tools/NOTICE | 52 -
build-tools/pom.xml | 239 --
.../buildtools/ApacheDSRootDseServlet.java | 100 -
.../buildtools/ApacheDSStartStopListener.java | 254 --
.../buildtools/ConnIdStartStopListener.java | 103 -
.../syncope/buildtools/H2StartStopListener.java | 100 -
.../buildtools/JarSchemaLdifExtractor.java | 178 --
.../syncope/buildtools/LdifURLLoader.java | 127 -
.../buildtools/ServiceTimeoutServlet.java | 105 -
.../src/main/resources/applicationContext.xml | 33 -
build-tools/src/main/resources/content.ldif | 57 -
build-tools/src/main/resources/log4j.xml | 37 -
.../resources/org/apache/syncope/checkstyle.xml | 215 --
.../org/apache/syncope/java-formatter.xml | 310 ---
.../main/resources/org/apache/syncope/pmd.xml | 50 -
build-tools/src/main/resources/testdb.sql | 46 -
.../src/main/webapp/WEB-INF/glassfish-web.xml | 25 -
build-tools/src/main/webapp/WEB-INF/web.xml | 91 -
.../src/main/webapp/WEB-INF/weblogic.xml | 33 -
cli/pom.xml | 186 --
.../java/org/apache/syncope/cli/SyncopeAdm.java | 123 -
.../org/apache/syncope/cli/SyncopeServices.java | 45 -
.../syncope/cli/commands/AbstractCommand.java | 32 -
.../cli/commands/ConfigurationCommand.java | 212 --
.../cli/commands/EntitlementCommand.java | 73 -
.../syncope/cli/commands/LoggerCommand.java | 170 --
.../cli/commands/NotificationCommand.java | 95 -
.../syncope/cli/commands/PolicyCommand.java | 107 -
.../syncope/cli/commands/ReportCommand.java | 195 --
.../org/apache/syncope/cli/util/XmlUtils.java | 46 -
.../cli/validators/DebugLevelValidator.java | 61 -
cli/src/main/resources/log4j2.xml | 58 -
cli/src/main/resources/syncope.properties | 19 -
client/cli/pom.xml | 191 ++
.../apache/syncope/client/cli/SyncopeAdm.java | 123 +
.../syncope/client/cli/SyncopeServices.java | 45 +
.../client/cli/commands/AbstractCommand.java | 32 +
.../cli/commands/ConfigurationCommand.java | 209 ++
.../client/cli/commands/EntitlementCommand.java | 70 +
.../client/cli/commands/LoggerCommand.java | 168 ++
.../cli/commands/NotificationCommand.java | 92 +
.../client/cli/commands/PolicyCommand.java | 105 +
.../client/cli/commands/ReportCommand.java | 193 ++
.../syncope/client/cli/util/XmlUtils.java | 47 +
.../cli/validators/DebugLevelValidator.java | 61 +
client/cli/src/main/resources/log4j2.xml | 58 +
.../cli/src/main/resources/syncope.properties | 19 +
client/console/pom.xml | 112 +
.../syncope/client/console/BinaryPreview.java | 34 +
.../syncope/client/console/ExtensionPanel.java | 34 +
.../client/console/SyncopeApplication.java | 306 +++
.../console/SyncopeRequestCycleListener.java | 84 +
.../syncope/client/console/SyncopeSession.java | 185 ++
.../console/commons/ActionTableCheckGroup.java | 40 +
.../client/console/commons/AttrLayoutType.java | 105 +
.../commons/AttributableDataProvider.java | 101 +
.../console/commons/CloseOnESCBehavior.java | 55 +
.../commons/ConnIdSpecialAttributeName.java | 34 +
.../client/console/commons/Constants.java | 110 +
.../console/commons/DateFormatROModel.java | 50 +
.../console/commons/HttpResourceStream.java | 101 +
.../client/console/commons/JexlHelpUtil.java | 61 +
.../console/commons/MapChoiceRenderer.java | 43 +
.../syncope/client/console/commons/Mode.java | 27 +
.../console/commons/PreferenceManager.java | 177 ++
.../client/console/commons/PreviewUtil.java | 62 +
.../client/console/commons/RoleTreeBuilder.java | 116 +
.../client/console/commons/RoleUtils.java | 36 +
.../console/commons/SchemaModalPageFactory.java | 58 +
.../console/commons/SelectChoiceRenderer.java | 40 +
.../client/console/commons/SelectOption.java | 72 +
.../SortableAttributableProviderComparator.java | 122 +
.../commons/SortableDataProviderComparator.java | 66 +
.../client/console/commons/XMLRolesReader.java | 118 +
.../status/AbstractStatusBeanProvider.java | 69 +
.../commons/status/ConnObjectWrapper.java | 55 +
.../client/console/commons/status/Status.java | 45 +
.../console/commons/status/StatusBean.java | 103 +
.../console/commons/status/StatusUtils.java | 324 +++
.../client/console/init/ConsoleInitializer.java | 72 +
.../init/ImplementationClassNamesLoader.java | 109 +
.../client/console/init/MIMETypesLoader.java | 69 +
.../console/init/SyncopeConsoleLoader.java | 35 +
.../client/console/pages/AbstractBasePage.java | 131 +
.../pages/AbstractSchedTaskModalPage.java | 132 +
.../console/pages/AbstractSchemaModalPage.java | 45 +
.../console/pages/AbstractStatusModalPage.java | 30 +
.../pages/AbstractSyncTaskModalPage.java | 209 ++
.../console/pages/ActivitiModelerPopupPage.java | 27 +
.../client/console/pages/ApprovalModalPage.java | 286 ++
.../client/console/pages/BaseModalPage.java | 35 +
.../syncope/client/console/pages/BasePage.java | 111 +
.../client/console/pages/BasePopupPage.java | 25 +
.../console/pages/BulkActionModalPage.java | 166 ++
.../pages/BulkActionResultModalPage.java | 97 +
.../client/console/pages/ConfModalPage.java | 112 +
.../client/console/pages/Configuration.java | 814 ++++++
.../pages/ConfirmPasswordResetModalPage.java | 103 +
.../console/pages/ConnObjectModalPage.java | 101 +
.../console/pages/ConnectorModalPage.java | 479 ++++
.../console/pages/DerSchemaModalPage.java | 140 +
.../pages/DisplayAttributesModalPage.java | 273 ++
.../client/console/pages/EditUserModalPage.java | 105 +
.../syncope/client/console/pages/ErrorPage.java | 42 +
.../console/pages/ExecMessageModalPage.java | 32 +
.../console/pages/FailureMessageModalPage.java | 37 +
.../syncope/client/console/pages/HomePage.java | 33 +
.../client/console/pages/InfoModalPage.java | 43 +
.../syncope/client/console/pages/Login.java | 365 +++
.../syncope/client/console/pages/Logout.java | 38 +
.../console/pages/MembershipModalPage.java | 114 +
.../console/pages/NotificationModalPage.java | 441 ++++
.../pages/NotificationTaskModalPage.java | 69 +
.../console/pages/PlainSchemaModalPage.java | 456 ++++
.../client/console/pages/PolicyModalPage.java | 451 ++++
.../console/pages/PropagationTaskModalPage.java | 45 +
.../console/pages/ProvisioningModalPage.java | 250 ++
.../client/console/pages/PushTaskModalPage.java | 135 +
.../ReportExecResultDownloadModalPage.java | 73 +
.../client/console/pages/ReportModalPage.java | 640 +++++
.../console/pages/ReportletConfModalPage.java | 362 +++
.../syncope/client/console/pages/Reports.java | 412 +++
.../pages/RequestPasswordResetModalPage.java | 153 ++
.../client/console/pages/ResourceModalPage.java | 214 ++
.../syncope/client/console/pages/Resources.java | 723 +++++
.../console/pages/ResultStatusModalPage.java | 425 +++
.../client/console/pages/RoleModalPage.java | 162 ++
.../console/pages/RoleSelectModalPage.java | 105 +
.../console/pages/RoleTemplateModalPage.java | 50 +
.../syncope/client/console/pages/Roles.java | 186 ++
.../console/pages/SchedTaskModalPage.java | 68 +
.../syncope/client/console/pages/Schema.java | 467 ++++
.../pages/SecurityQuestionModalPage.java | 111 +
.../client/console/pages/StatusModalPage.java | 644 +++++
.../client/console/pages/SyncTaskModalPage.java | 73 +
.../client/console/pages/TaskModalPage.java | 253 ++
.../syncope/client/console/pages/Tasks.java | 230 ++
.../syncope/client/console/pages/Todo.java | 245 ++
.../client/console/pages/UserModalPage.java | 229 ++
.../console/pages/UserOwnerSelectModalPage.java | 81 +
.../client/console/pages/UserSelfModalPage.java | 72 +
.../console/pages/UserTemplateModalPage.java | 60 +
.../syncope/client/console/pages/Users.java | 166 ++
.../client/console/pages/ViewUserModalPage.java | 49 +
.../console/pages/VirSchemaModalPage.java | 126 +
.../client/console/pages/WelcomePage.java | 55 +
.../console/pages/XMLEditorPopupPage.java | 90 +
.../console/panels/AbstractExtensionPanel.java | 39 +
.../panels/AbstractProvisioningTasksPanel.java | 160 ++
.../console/panels/AbstractSearchPanel.java | 401 +++
.../panels/AbstractSearchResultPanel.java | 353 +++
.../client/console/panels/AbstractTasks.java | 55 +
.../console/panels/AccountInformationPanel.java | 73 +
.../console/panels/ActionDataTablePanel.java | 149 ++
.../console/panels/AjaxDataTablePanel.java | 142 +
.../console/panels/AnnotatedBeanPanel.java | 66 +
.../console/panels/AttrTemplatesPanel.java | 167 ++
.../client/console/panels/DataTablePanel.java | 113 +
.../client/console/panels/DerAttrsPanel.java | 206 ++
.../console/panels/EventSelectionPanel.java | 243 ++
.../client/console/panels/ImagePanel.java | 44 +
.../console/panels/JQueryUITabbedPanel.java | 45 +
.../client/console/panels/LayoutsPanel.java | 130 +
.../console/panels/LoggerCategoryPanel.java | 468 ++++
.../client/console/panels/MembershipsPanel.java | 256 ++
.../console/panels/NotificationPanel.java | 119 +
.../console/panels/NotificationTasks.java | 254 ++
.../client/console/panels/PlainAttrsPanel.java | 395 +++
.../client/console/panels/PoliciesPanel.java | 343 +++
.../client/console/panels/PolicyBeanPanel.java | 328 +++
.../client/console/panels/PropagationTasks.java | 264 ++
.../client/console/panels/PushTasksPanel.java | 184 ++
.../console/panels/ResourceConnConfPanel.java | 187 ++
.../console/panels/ResourceDetailsPanel.java | 306 +++
.../console/panels/ResourceMappingPanel.java | 644 +++++
.../console/panels/ResourceSecurityPanel.java | 189 ++
.../client/console/panels/ResourcesPanel.java | 178 ++
.../client/console/panels/RoleDetailsPanel.java | 435 +++
.../client/console/panels/RolePanel.java | 187 ++
.../client/console/panels/RoleSearchPanel.java | 101 +
.../console/panels/RoleSearchResultPanel.java | 172 ++
.../console/panels/RoleSecurityPanel.java | 198 ++
.../client/console/panels/RoleSummaryPanel.java | 153 ++
.../client/console/panels/RoleTabPanel.java | 195 ++
.../client/console/panels/SchedTasks.java | 286 ++
.../client/console/panels/SearchClause.java | 129 +
.../client/console/panels/SearchView.java | 461 ++++
.../console/panels/SecurityQuestionPanel.java | 98 +
.../panels/SelectOnlyUserSearchResultPanel.java | 93 +
.../console/panels/SelectedEventsPanel.java | 167 ++
.../client/console/panels/StatusPanel.java | 263 ++
.../client/console/panels/SyncTasksPanel.java | 226 ++
.../client/console/panels/UserDetailsPanel.java | 122 +
.../client/console/panels/UserSearchPanel.java | 113 +
.../console/panels/UserSearchResultPanel.java | 297 +++
.../client/console/panels/VirAttrsPanel.java | 295 +++
.../console/resources/FilesystemResource.java | 83 +
.../resources/WorkflowDefGETResource.java | 58 +
.../resources/WorkflowDefPUTResource.java | 74 +
.../console/rest/AbstractSubjectRestClient.java | 46 +
.../client/console/rest/ApprovalRestClient.java | 45 +
.../client/console/rest/AuthRestClient.java | 44 +
.../client/console/rest/BaseRestClient.java | 70 +
.../console/rest/ConfigurationRestClient.java | 97 +
.../console/rest/ConnectorRestClient.java | 217 ++
.../console/rest/ExecutionRestClient.java | 26 +
.../client/console/rest/InvalidPolicyType.java | 31 +
.../client/console/rest/LoggerRestClient.java | 92 +
.../console/rest/NotificationRestClient.java | 50 +
.../client/console/rest/PolicyRestClient.java | 104 +
.../client/console/rest/ReportRestClient.java | 108 +
.../client/console/rest/ResourceRestClient.java | 94 +
.../client/console/rest/RoleRestClient.java | 184 ++
.../client/console/rest/SchemaRestClient.java | 250 ++
.../rest/SecurityQuestionRestClient.java | 51 +
.../client/console/rest/TaskRestClient.java | 139 +
.../client/console/rest/UserRestClient.java | 228 ++
.../client/console/rest/UserSelfRestClient.java | 96 +
.../client/console/rest/WorkflowRestClient.java | 69 +
.../ajax/form/AbstractAjaxDownloadBehavior.java | 48 +
.../markup/html/ClearIndicatingAjaxButton.java | 76 +
.../markup/html/ClearIndicatingAjaxLink.java | 61 +
.../html/IndicatingOnConfirmAjaxLink.java | 58 +
.../html/repeater/data/table/ActionColumn.java | 59 +
.../repeater/data/table/ActionResultColumn.java | 77 +
.../html/repeater/data/table/AttrColumn.java | 85 +
.../data/table/CheckBoxGroupSelectorPanel.java | 34 +
.../html/repeater/data/table/CheckBoxPanel.java | 43 +
.../repeater/data/table/CheckGroupColumn.java | 54 +
.../repeater/data/table/CollectionPanel.java | 47 +
.../data/table/CollectionPropertyColumn.java | 54 +
.../repeater/data/table/DatePropertyColumn.java | 53 +
.../html/repeater/data/table/TokenColumn.java | 51 +
.../wicket/markup/head/MetaHeaderItem.java | 49 +
.../wicket/markup/html/CrontabContainer.java | 184 ++
.../markup/html/form/AbstractFieldPanel.java | 40 +
.../wicket/markup/html/form/ActionLink.java | 83 +
.../markup/html/form/ActionLinksPanel.java | 586 +++++
.../markup/html/form/AjaxCheckBoxPanel.java | 130 +
.../markup/html/form/AjaxDecoratedCheckbox.java | 55 +
.../html/form/AjaxDropDownChoicePanel.java | 87 +
.../markup/html/form/AjaxPalettePanel.java | 70 +
.../html/form/AjaxPasswordFieldPanel.java | 60 +
.../markup/html/form/AjaxTextFieldPanel.java | 98 +
.../markup/html/form/BinaryFieldPanel.java | 211 ++
.../form/CheckBoxMultipleChoiceFieldPanel.java | 46 +
.../wicket/markup/html/form/DateFieldPanel.java | 132 +
.../markup/html/form/DateTextFieldPanel.java | 88 +
.../markup/html/form/DateTimeFieldPanel.java | 195 ++
.../wicket/markup/html/form/FieldPanel.java | 199 ++
.../wicket/markup/html/form/LinkPanel.java | 39 +
.../markup/html/form/MappingPurposePanel.java | 133 +
.../markup/html/form/MultiFieldPanel.java | 172 ++
.../wicket/markup/html/form/NonI18nPalette.java | 44 +
.../markup/html/form/SelectableRecorder.java | 204 ++
.../markup/html/form/SpinnerFieldPanel.java | 197 ++
.../form/preview/AbstractBinaryPreviewer.java | 46 +
.../html/form/preview/BinaryCertPreviewer.java | 70 +
.../html/form/preview/BinaryImagePreviewer.java | 51 +
.../markup/html/link/VeilPopupSettings.java | 32 +
.../wicket/markup/html/list/AltListView.java | 59 +
.../html/list/ConnConfPropertyListView.java | 152 ++
.../tree/DefaultMutableTreeNodeExpansion.java | 160 ++
.../DefaultMutableTreeNodeExpansionModel.java | 36 +
.../wicket/markup/html/tree/TreeRolePanel.java | 121 +
.../markup/html/tree/TreeRoleProvider.java | 43 +
.../META-INF/cxf/org.apache.cxf.Logger | 1 +
.../resources/META-INF/resources/css/bulk.css | 97 +
.../META-INF/resources/css/fieldstyle.css | 191 ++
.../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 0 -> 251 bytes
.../css/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 0 -> 1310 bytes
.../ui-bg_flat_0_aaaaaa_40x100_greennotused.png | Bin 0 -> 1312 bytes
.../css/images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 -> 120 bytes
.../css/images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 105 bytes
.../css/images/ui-bg_glass_75_dadada_1x400.png | Bin 0 -> 111 bytes
.../css/images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 -> 110 bytes
.../css/images/ui-bg_glass_95_fef1ec_1x400.png | Bin 0 -> 119 bytes
.../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 0 -> 1244 bytes
...ghlight-soft_75_cccccc_1x100_greynotused.png | Bin 0 -> 101 bytes
...ui-bg_highlight-soft_75_cccccc_1x100_red.png | Bin 0 -> 257 bytes
.../css/images/ui-icons_222222_256x240.png | Bin 0 -> 4369 bytes
.../css/images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes
.../css/images/ui-icons_454545_256x240.png | Bin 0 -> 4369 bytes
.../css/images/ui-icons_888888_256x240.png | Bin 0 -> 4369 bytes
.../css/images/ui-icons_cd0a0a_256x240.png | Bin 0 -> 4369 bytes
.../resources/META-INF/resources/css/style.css | 550 ++++
.../resources/img/actions/assign-icon.png | Bin 0 -> 566 bytes
.../resources/img/actions/both-icon.png | Bin 0 -> 611 bytes
.../META-INF/resources/img/actions/bulk.png | Bin 0 -> 1182 bytes
.../META-INF/resources/img/actions/claim.png | Bin 0 -> 509 bytes
.../META-INF/resources/img/actions/create.png | Bin 0 -> 360 bytes
.../META-INF/resources/img/actions/delete.png | Bin 0 -> 530 bytes
.../resources/img/actions/deprovision-icon.png | Bin 0 -> 210 bytes
.../META-INF/resources/img/actions/dryrun.png | Bin 0 -> 891 bytes
.../META-INF/resources/img/actions/edit.png | Bin 0 -> 455 bytes
.../META-INF/resources/img/actions/enable.png | Bin 0 -> 715 bytes
.../META-INF/resources/img/actions/execute.png | Bin 0 -> 695 bytes
.../META-INF/resources/img/actions/export.png | Bin 0 -> 474 bytes
.../resources/img/actions/link-icon.png | Bin 0 -> 447 bytes
.../resources/img/actions/manage-icon.png | Bin 0 -> 611 bytes
.../resources/img/actions/none-icon.png | Bin 0 -> 521 bytes
.../resources/img/actions/propagation-icon.png | Bin 0 -> 362 bytes
.../resources/img/actions/provision-icon.png | Bin 0 -> 360 bytes
.../resources/img/actions/reactivate.png | Bin 0 -> 496 bytes
.../META-INF/resources/img/actions/reload.png | Bin 0 -> 491 bytes
.../META-INF/resources/img/actions/reset.png | Bin 0 -> 491 bytes
.../resources/img/actions/resources-icon.png | Bin 0 -> 634 bytes
.../resources/img/actions/roles-icon.png | Bin 0 -> 391 bytes
.../META-INF/resources/img/actions/search.png | Bin 0 -> 763 bytes
.../META-INF/resources/img/actions/select.png | Bin 0 -> 279 bytes
.../resources/img/actions/settings-icon.png | Bin 0 -> 153 bytes
.../META-INF/resources/img/actions/suspend.png | Bin 0 -> 504 bytes
.../img/actions/synchronization-icon.png | Bin 0 -> 406 bytes
.../resources/img/actions/unassign-icon.png | Bin 0 -> 573 bytes
.../resources/img/actions/unlink-icon.png | Bin 0 -> 509 bytes
.../resources/img/actions/user_template.png | Bin 0 -> 597 bytes
.../resources/img/actions/users-icon.png | Bin 0 -> 754 bytes
.../resources/META-INF/resources/img/add.png | Bin 0 -> 814 bytes
.../resources/META-INF/resources/img/addAll.png | Bin 0 -> 1037 bytes
.../resources/META-INF/resources/img/busy.gif | Bin 0 -> 2834 bytes
.../META-INF/resources/img/db_export.png | Bin 0 -> 16675 bytes
.../META-INF/resources/img/disable.png | Bin 0 -> 1001 bytes
.../META-INF/resources/img/down-icon.png | Bin 0 -> 418 bytes
.../META-INF/resources/img/favicon.png | Bin 0 -> 641 bytes
.../META-INF/resources/img/file-download.png | Bin 0 -> 967 bytes
.../META-INF/resources/img/file-upload.png | Bin 0 -> 949 bytes
.../resources/META-INF/resources/img/help.png | Bin 0 -> 808 bytes
.../resources/META-INF/resources/img/info.png | Bin 0 -> 575 bytes
.../META-INF/resources/img/left-icon.png | Bin 0 -> 451 bytes
.../META-INF/resources/img/loading.gif | Bin 0 -> 2530 bytes
.../resources/META-INF/resources/img/logo.png | Bin 0 -> 8913 bytes
.../resources/img/menu/configuration.png | Bin 0 -> 5670 bytes
.../META-INF/resources/img/menu/connectors.png | Bin 0 -> 5772 bytes
.../META-INF/resources/img/menu/logout.png | Bin 0 -> 5460 bytes
.../resources/img/menu/notsel/configuration.png | Bin 0 -> 5518 bytes
.../resources/img/menu/notsel/connectors.png | Bin 0 -> 6401 bytes
.../resources/img/menu/notsel/logout.png | Bin 0 -> 5720 bytes
.../resources/img/menu/notsel/reports.png | Bin 0 -> 6074 bytes
.../resources/img/menu/notsel/resources.png | Bin 0 -> 6401 bytes
.../resources/img/menu/notsel/roles.png | Bin 0 -> 5175 bytes
.../resources/img/menu/notsel/schema.png | Bin 0 -> 5544 bytes
.../resources/img/menu/notsel/sf_body.png | Bin 0 -> 303 bytes
.../resources/img/menu/notsel/tasks.png | Bin 0 -> 7461 bytes
.../META-INF/resources/img/menu/notsel/todo.png | Bin 0 -> 6996 bytes
.../resources/img/menu/notsel/users.png | Bin 0 -> 7637 bytes
.../META-INF/resources/img/menu/reports.png | Bin 0 -> 5553 bytes
.../META-INF/resources/img/menu/resources.png | Bin 0 -> 5772 bytes
.../META-INF/resources/img/menu/roles.png | Bin 0 -> 5020 bytes
.../META-INF/resources/img/menu/schema.png | Bin 0 -> 5217 bytes
.../META-INF/resources/img/menu/tasks.png | Bin 0 -> 5742 bytes
.../META-INF/resources/img/menu/todo.png | Bin 0 -> 5722 bytes
.../META-INF/resources/img/menu/users.png | Bin 0 -> 6006 bytes
.../META-INF/resources/img/minus-icon.png | Bin 0 -> 210 bytes
.../META-INF/resources/img/modeler.png | Bin 0 -> 3118 bytes
.../META-INF/resources/img/moveDown.png | Bin 0 -> 833 bytes
.../resources/META-INF/resources/img/moveUp.png | Bin 0 -> 834 bytes
.../resources/META-INF/resources/img/ok.png | Bin 0 -> 497 bytes
.../resources/META-INF/resources/img/ping.png | Bin 0 -> 22945 bytes
.../META-INF/resources/img/plus-icon.png | Bin 0 -> 360 bytes
.../META-INF/resources/img/reload_30.png | Bin 0 -> 611 bytes
.../resources/META-INF/resources/img/remove.png | Bin 0 -> 825 bytes
.../META-INF/resources/img/removeAll.png | Bin 0 -> 1034 bytes
.../META-INF/resources/img/right-icon.png | Bin 0 -> 411 bytes
.../resources/META-INF/resources/img/search.png | Bin 0 -> 763 bytes
.../META-INF/resources/img/sf_testa.png | Bin 0 -> 293 bytes
.../META-INF/resources/img/statuses/active.png | Bin 0 -> 509 bytes
.../resources/img/statuses/inactive.png | Bin 0 -> 477 bytes
.../resources/img/statuses/objectnotfound.png | Bin 0 -> 668 bytes
.../resources/img/statuses/undefined.png | Bin 0 -> 758 bytes
.../META-INF/resources/img/success.png | Bin 0 -> 1696 bytes
.../resources/META-INF/resources/img/tab ok.png | Bin 0 -> 2330 bytes
.../META-INF/resources/img/tab old.png | Bin 0 -> 734 bytes
.../resources/META-INF/resources/img/tab.png | Bin 0 -> 2098 bytes
.../META-INF/resources/img/up-icon.png | Bin 0 -> 421 bytes
.../META-INF/resources/img/warning.png | Bin 0 -> 1107 bytes
.../resources/META-INF/resources/img/xml.png | Bin 0 -> 2741 bytes
.../main/resources/META-INF/web-fragment.xml | 70 +
client/console/src/main/resources/MIMETypes | 671 +++++
.../src/main/resources/authorizations.xml | 333 +++
.../src/main/resources/console.properties | 22 +
.../src/main/resources/consoleContext.xml | 77 +
.../console/SyncopeApplication.properties | 55 +
.../console/SyncopeApplication_it.properties | 54 +
.../console/SyncopeApplication_pt_BR.properties | 54 +
.../console/pages/AbstractStatusModalPage.html | 122 +
.../pages/AbstractStatusModalPage.properties | 19 +
.../pages/AbstractStatusModalPage_it.properties | 19 +
.../AbstractStatusModalPage_pt_BR.properties | 19 +
.../console/pages/ActivitiModelerPopupPage.html | 65 +
.../client/console/pages/ApprovalModalPage.html | 52 +
.../console/pages/ApprovalModalPage.properties | 18 +
.../pages/ApprovalModalPage_it.properties | 18 +
.../pages/ApprovalModalPage_pt_BR.properties | 18 +
.../client/console/pages/BaseModalPage.html | 56 +
.../console/pages/BaseModalPage.properties | 20 +
.../console/pages/BaseModalPage_it.properties | 20 +
.../pages/BaseModalPage_pt_BR.properties | 20 +
.../syncope/client/console/pages/BasePage.html | 145 +
.../client/console/pages/BasePage.properties | 19 +
.../client/console/pages/BasePage_it.properties | 19 +
.../console/pages/BasePage_pt_BR.properties | 19 +
.../client/console/pages/BasePopupPage.html | 51 +
.../console/pages/BulkActionModalPage.html | 45 +
.../pages/BulkActionModalPage.properties | 17 +
.../pages/BulkActionModalPage_it.properties | 17 +
.../pages/BulkActionModalPage_pt_BR.properties | 17 +
.../pages/BulkActionResultModalPage.html | 57 +
.../pages/BulkActionResultModalPage.properties | 19 +
.../BulkActionResultModalPage_it.properties | 19 +
.../BulkActionResultModalPage_pt_BR.properties | 19 +
.../client/console/pages/ConfModalPage.html | 39 +
.../console/pages/ConfModalPage.properties | 17 +
.../console/pages/ConfModalPage_it.properties | 17 +
.../pages/ConfModalPage_pt_BR.properties | 17 +
.../client/console/pages/Configuration.html | 230 ++
.../console/pages/Configuration.properties | 48 +
.../console/pages/Configuration_it.properties | 48 +
.../pages/Configuration_pt_BR.properties | 48 +
.../pages/ConfirmPasswordResetModalPage.html | 55 +
.../ConfirmPasswordResetModalPage.properties | 20 +
.../ConfirmPasswordResetModalPage_it.properties | 20 +
...nfirmPasswordResetModalPage_pt_BR.properties | 20 +
.../console/pages/ConnObjectModalPage.html | 39 +
.../pages/ConnObjectModalPage.properties | 17 +
.../pages/ConnObjectModalPage_it.properties | 17 +
.../pages/ConnObjectModalPage_pt_BR.properties | 17 +
.../console/pages/ConnectorModalPage.html | 161 ++
.../console/pages/ConnectorModalPage.properties | 43 +
.../pages/ConnectorModalPage_it.properties | 43 +
.../pages/ConnectorModalPage_pt_BR.properties | 43 +
.../console/pages/DerSchemaModalPage.html | 64 +
.../console/pages/DerSchemaModalPage.properties | 22 +
.../pages/DerSchemaModalPage_it.properties | 22 +
.../pages/DerSchemaModalPage_pt_BR.properties | 22 +
.../pages/DisplayAttributesModalPage.html | 132 +
.../pages/DisplayAttributesModalPage.properties | 33 +
.../DisplayAttributesModalPage_it.properties | 33 +
.../DisplayAttributesModalPage_pt_BR.properties | 33 +
.../syncope/client/console/pages/ErrorPage.html | 53 +
.../console/pages/ExecMessageModalPage.html | 25 +
.../console/pages/FailureMessageModalPage.html | 36 +
.../syncope/client/console/pages/HomePage.html | 34 +
.../client/console/pages/InfoModalPage.html | 42 +
.../console/pages/InfoModalPage.properties | 19 +
.../console/pages/InfoModalPage_it.properties | 19 +
.../pages/InfoModalPage_pt_BR.properties | 19 +
.../syncope/client/console/pages/Login.html | 89 +
.../client/console/pages/Login.properties | 22 +
.../client/console/pages/Login_it.properties | 22 +
.../client/console/pages/Login_pt_BR.properties | 22 +
.../console/pages/MembershipModalPage.html | 55 +
.../pages/MembershipModalPage.properties | 35 +
.../pages/MembershipModalPage_it.properties | 35 +
.../pages/MembershipModalPage_pt_BR.properties | 35 +
.../console/pages/NotificationModalPage.html | 234 ++
.../pages/NotificationModalPage.properties | 40 +
.../pages/NotificationModalPage_it.properties | 40 +
.../NotificationModalPage_pt_BR.properties | 40 +
.../pages/NotificationTaskModalPage.html | 111 +
.../pages/NotificationTaskModalPage.properties | 32 +
.../NotificationTaskModalPage_it.properties | 32 +
.../NotificationTaskModalPage_pt_BR.properties | 32 +
.../console/pages/PlainSchemaModalPage.html | 172 ++
.../pages/PlainSchemaModalPage.properties | 38 +
.../pages/PlainSchemaModalPage_it.properties | 38 +
.../pages/PlainSchemaModalPage_pt_BR.properties | 38 +
.../client/console/pages/PolicyModalPage.html | 109 +
.../console/pages/PolicyModalPage.properties | 88 +
.../console/pages/PolicyModalPage_it.properties | 88 +
.../pages/PolicyModalPage_pt_BR.properties | 87 +
.../console/pages/PropagationTaskModalPage.html | 75 +
.../pages/PropagationTaskModalPage.properties | 28 +
.../PropagationTaskModalPage_it.properties | 28 +
.../PropagationTaskModalPage_pt_BR.properties | 28 +
.../client/console/pages/PushTaskModalPage.html | 228 ++
.../console/pages/PushTaskModalPage.properties | 45 +
.../pages/PushTaskModalPage_it.properties | 47 +
.../pages/PushTaskModalPage_pt_BR.properties | 45 +
.../client/console/pages/RecursivePanel.html | 28 +
.../ReportExecResultDownloadModalPage.html | 23 +
...ReportExecResultDownloadModalPage.properties | 18 +
...ortExecResultDownloadModalPage_it.properties | 18 +
...ExecResultDownloadModalPage_pt_BR.properties | 18 +
.../client/console/pages/ReportModalPage.html | 146 ++
.../console/pages/ReportModalPage.properties | 36 +
.../console/pages/ReportModalPage_it.properties | 36 +
.../pages/ReportModalPage_pt_BR.properties | 36 +
.../console/pages/ReportletConfModalPage.html | 85 +
.../pages/ReportletConfModalPage.properties | 22 +
.../pages/ReportletConfModalPage_it.properties | 22 +
.../ReportletConfModalPage_pt_BR.properties | 22 +
.../syncope/client/console/pages/Reports.html | 58 +
.../client/console/pages/Reports.properties | 24 +
.../client/console/pages/Reports_it.properties | 24 +
.../console/pages/Reports_pt_BR.properties | 24 +
.../pages/RequestPasswordResetModalPage.html | 64 +
.../RequestPasswordResetModalPage.properties | 21 +
.../RequestPasswordResetModalPage_it.properties | 21 +
...questPasswordResetModalPage_pt_BR.properties | 21 +
.../client/console/pages/ResourceModalPage.html | 64 +
.../console/pages/ResourceModalPage.properties | 60 +
.../pages/ResourceModalPage_it.properties | 60 +
.../pages/ResourceModalPage_pt_BR.properties | 60 +
.../syncope/client/console/pages/Resources.html | 99 +
.../client/console/pages/Resources.properties | 34 +
.../console/pages/Resources_it.properties | 34 +
.../console/pages/Resources_pt_BR.properties | 32 +
.../console/pages/ResultStatusModalPage.html | 226 ++
.../pages/ResultStatusModalPage.properties | 26 +
.../pages/ResultStatusModalPage_it.properties | 26 +
.../ResultStatusModalPage_pt_BR.properties | 26 +
.../client/console/pages/RoleModalPage.html | 52 +
.../console/pages/RoleModalPage.properties | 48 +
.../console/pages/RoleModalPage_it.properties | 50 +
.../pages/RoleModalPage_pt_BR.properties | 48 +
.../console/pages/RoleSelectModalPage.html | 22 +
.../syncope/client/console/pages/Roles.html | 80 +
.../client/console/pages/Roles.properties | 26 +
.../client/console/pages/Roles_it.properties | 26 +
.../client/console/pages/Roles_pt_BR.properties | 26 +
.../client/console/pages/RouteModalPage.html | 49 +
.../console/pages/RouteModalPage.properties | 18 +
.../console/pages/RouteModalPage_it.properties | 18 +
.../pages/RouteModalPage_pt_BR.properties | 18 +
.../console/pages/SchedTaskModalPage.html | 136 +
.../console/pages/SchedTaskModalPage.properties | 36 +
.../pages/SchedTaskModalPage_it.properties | 36 +
.../pages/SchedTaskModalPage_pt_BR.properties | 36 +
.../console/pages/Schema$SchemaTypePanel.html | 41 +
.../syncope/client/console/pages/Schema.html | 59 +
.../client/console/pages/Schema.properties | 35 +
.../client/console/pages/Schema_it.properties | 35 +
.../console/pages/Schema_pt_BR.properties | 35 +
.../pages/SecurityQuestionModalPage.html | 46 +
.../pages/SecurityQuestionModalPage.properties | 18 +
.../SecurityQuestionModalPage_it.properties | 18 +
.../SecurityQuestionModalPage_pt_BR.properties | 18 +
.../client/console/pages/SyncTaskModalPage.html | 205 ++
.../console/pages/SyncTaskModalPage.properties | 43 +
.../pages/SyncTaskModalPage_it.properties | 44 +
.../pages/SyncTaskModalPage_pt_BR.properties | 43 +
.../syncope/client/console/pages/Tasks.html | 46 +
.../client/console/pages/Tasks.properties | 21 +
.../client/console/pages/Tasks_it.properties | 21 +
.../client/console/pages/Tasks_pt_BR.properties | 21 +
.../syncope/client/console/pages/Todo.html | 45 +
.../client/console/pages/Todo.properties | 31 +
.../client/console/pages/Todo_it.properties | 31 +
.../client/console/pages/Todo_pt_BR.properties | 31 +
.../client/console/pages/UserModalPage.html | 97 +
.../console/pages/UserModalPage.properties | 52 +
.../console/pages/UserModalPage_it.properties | 53 +
.../pages/UserModalPage_pt_BR.properties | 52 +
.../console/pages/UserOwnerSelectModalPage.html | 38 +
.../pages/UserOwnerSelectModalPage.properties | 23 +
.../UserOwnerSelectModalPage_it.properties | 23 +
.../UserOwnerSelectModalPage_pt_BR.properties | 23 +
.../syncope/client/console/pages/Users.html | 72 +
.../client/console/pages/Users.properties | 26 +
.../client/console/pages/Users_it.properties | 26 +
.../client/console/pages/Users_pt_BR.properties | 26 +
.../console/pages/VirSchemaModalPage.html | 53 +
.../console/pages/VirSchemaModalPage.properties | 22 +
.../pages/VirSchemaModalPage_it.properties | 22 +
.../pages/VirSchemaModalPage_pt_BR.properties | 22 +
.../client/console/pages/WelcomePage.html | 70 +
.../client/console/pages/WelcomePage.properties | 18 +
.../console/pages/WelcomePage_it.properties | 18 +
.../console/pages/WelcomePage_pt_BR.properties | 18 +
.../console/pages/XMLEditorPopupPage.html | 82 +
.../console/pages/XMLEditorPopupPage.properties | 19 +
.../pages/XMLEditorPopupPage_it.properties | 19 +
.../pages/XMLEditorPopupPage_pt_BR.properties | 19 +
.../panels/AbstractProvisioningTasksPanel.html | 41 +
.../console/panels/AbstractSearchPanel.html | 50 +
.../panels/AbstractSearchResultPanel.html | 43 +
.../panels/AbstractSearchResultPanel.properties | 30 +
.../AbstractSearchResultPanel_it.properties | 30 +
.../AbstractSearchResultPanel_pt_BR.properties | 30 +
.../console/panels/AccountInformationPanel.html | 67 +
.../panels/AccountInformationPanel.properties | 22 +
.../AccountInformationPanel_it.properties | 23 +
.../AccountInformationPanel_pt_BR.properties | 23 +
.../console/panels/ActionDataTablePanel.html | 45 +
.../console/panels/AjaxDataTablePanel.html | 47 +
.../console/panels/AnnotatedBeanPanel.html | 98 +
.../panels/AnnotatedBeanPanel.properties | 20 +
.../panels/AnnotatedBeanPanel_it.properties | 20 +
.../panels/AnnotatedBeanPanel_pt_BR.properties | 20 +
.../console/panels/AttrTemplatesPanel.html | 58 +
.../panels/AttrTemplatesPanel.properties | 23 +
.../panels/AttrTemplatesPanel_it.properties | 23 +
.../panels/AttrTemplatesPanel_pt_BR.properties | 23 +
.../client/console/panels/AuditEventsPanel.html | 122 +
.../client/console/panels/DerAttrsPanel.html | 60 +
.../console/panels/DerAttrsPanel.properties | 17 +
.../console/panels/DerAttrsPanel_it.properties | 18 +
.../panels/DerAttrsPanel_pt_BR.properties | 17 +
.../console/panels/EventSelectionPanel.html | 125 +
.../client/console/panels/ImagePanel.html | 23 +
.../console/panels/JQueryUITabbedPanel.html | 41 +
.../client/console/panels/LayoutsPanel.html | 41 +
.../console/panels/LayoutsPanel.properties | 18 +
.../console/panels/LayoutsPanel_it.properties | 18 +
.../panels/LayoutsPanel_pt_BR.properties | 18 +
.../console/panels/LoggerCategoryPanel.html | 106 +
.../client/console/panels/MembershipsPanel.html | 66 +
.../console/panels/MembershipsPanel.properties | 23 +
.../panels/MembershipsPanel_it.properties | 24 +
.../panels/MembershipsPanel_pt_BR.properties | 23 +
.../console/panels/NotificationTasks.html | 38 +
.../console/panels/NotificationTasks.properties | 26 +
.../panels/NotificationTasks_it.properties | 26 +
.../panels/NotificationTasks_pt_BR.properties | 26 +
.../client/console/panels/PlainAttrsPanel.html | 44 +
.../client/console/panels/PoliciesPanel.html | 42 +
.../console/panels/PoliciesPanel.properties | 34 +
.../console/panels/PoliciesPanel_it.properties | 34 +
.../panels/PoliciesPanel_pt_BR.properties | 34 +
.../client/console/panels/PolicyBeanPanel.html | 39 +
.../client/console/panels/PropagationTasks.html | 37 +
.../console/panels/PropagationTasks.properties | 28 +
.../panels/PropagationTasks_it.properties | 28 +
.../panels/PropagationTasks_pt_BR.properties | 28 +
.../console/panels/PushTasksPanel.properties | 29 +
.../console/panels/PushTasksPanel_it.properties | 29 +
.../panels/PushTasksPanel_pt_BR.properties | 29 +
.../console/panels/ResourceConnConfPanel.html | 41 +
.../console/panels/ResourceDetailsPanel.html | 137 +
.../console/panels/ResourceMappingPanel.html | 125 +
.../console/panels/ResourceSecurityPanel.html | 56 +
.../panels/ResourceSecurityPanel.properties | 19 +
.../panels/ResourceSecurityPanel_it.properties | 19 +
.../ResourceSecurityPanel_pt_BR.properties | 19 +
.../client/console/panels/ResourcesPanel.html | 23 +
.../client/console/panels/RoleDetailsPanel.html | 107 +
.../console/panels/RoleDetailsPanel.properties | 22 +
.../panels/RoleDetailsPanel_it.properties | 22 +
.../panels/RoleDetailsPanel_pt_BR.properties | 22 +
.../client/console/panels/RolePanel.html | 88 +
.../client/console/panels/RolePanel.properties | 51 +
.../console/panels/RolePanel_it.properties | 53 +
.../console/panels/RolePanel_pt_BR.properties | 40 +
.../console/panels/RoleSecurityPanel.html | 66 +
.../console/panels/RoleSecurityPanel.properties | 20 +
.../panels/RoleSecurityPanel_it.properties | 20 +
.../panels/RoleSecurityPanel_pt_BR.properties | 20 +
.../client/console/panels/RoleSummaryPanel.html | 39 +
.../client/console/panels/RoleTabPanel.html | 64 +
.../console/panels/RoleTabPanel.properties | 27 +
.../console/panels/RoleTabPanel_it.properties | 27 +
.../panels/RoleTabPanel_pt_BR.properties | 27 +
.../client/console/panels/SchedTasks.html | 42 +
.../client/console/panels/SchedTasks.properties | 28 +
.../console/panels/SchedTasks_it.properties | 28 +
.../console/panels/SchedTasks_pt_BR.properties | 28 +
.../console/panels/SecurityQuestionPanel.html | 41 +
.../panels/SecurityQuestionPanel.properties | 18 +
.../panels/SecurityQuestionPanel_it.properties | 18 +
.../SecurityQuestionPanel_pt_BR.properties | 18 +
.../console/panels/SelectedEventsPanel.html | 33 +
.../client/console/panels/StatusPanel.html | 130 +
.../console/panels/StatusPanel.properties | 19 +
.../console/panels/StatusPanel_it.properties | 19 +
.../console/panels/StatusPanel_pt_BR.properties | 19 +
.../console/panels/SyncTasksPanel.properties | 29 +
.../console/panels/SyncTasksPanel_it.properties | 29 +
.../panels/SyncTasksPanel_pt_BR.properties | 29 +
.../client/console/panels/UserDetailsPanel.html | 71 +
.../console/panels/UserDetailsPanel.properties | 19 +
.../panels/UserDetailsPanel_it.properties | 19 +
.../panels/UserDetailsPanel_pt_BR.properties | 19 +
.../client/console/panels/VirAttrsPanel.html | 60 +
.../console/panels/VirAttrsPanel.properties | 19 +
.../console/panels/VirAttrsPanel_it.properties | 20 +
.../panels/VirAttrsPanel_pt_BR.properties | 19 +
.../data/table/CheckBoxGroupSelectorPanel.html | 21 +
.../html/repeater/data/table/CheckBoxPanel.html | 23 +
.../repeater/data/table/CollectionPanel.html | 25 +
.../markup/html/CrontabContainer.properties | 22 +
.../markup/html/CrontabContainer_it.properties | 22 +
.../html/CrontabContainer_pt_BR.properties | 22 +
.../markup/html/form/ActionLinksPanel.html | 163 ++
.../markup/html/form/AjaxCheckBoxPanel.html | 21 +
.../html/form/AjaxDropDownChoicePanel.html | 24 +
.../markup/html/form/AjaxNumberFieldPanel.html | 22 +
.../markup/html/form/AjaxPalettePanel.html | 23 +
.../html/form/AjaxPasswordFieldPanel.html | 22 +
.../markup/html/form/AjaxTextFieldPanel.html | 23 +
.../markup/html/form/BinaryFieldPanel.html | 44 +
.../form/CheckBoxMultipleChoiceFieldPanel.html | 23 +
.../markup/html/form/DateTextFieldPanel.html | 22 +
.../markup/html/form/DateTimeFieldPanel.html | 21 +
.../html/form/DateTimeFieldPanel.properties | 17 +
.../html/form/DateTimeFieldPanel_it.properties | 17 +
.../form/DateTimeFieldPanel_pt_BR.properties | 17 +
.../wicket/markup/html/form/FieldPanel.html | 34 +
.../wicket/markup/html/form/LinkPanel.html | 23 +
.../markup/html/form/MappingPurposePanel.html | 31 +
.../markup/html/form/MultiFieldPanel.html | 35 +
.../markup/html/form/MultiFieldPanel.properties | 22 +
.../html/form/MultiFieldPanel_it.properties | 22 +
.../html/form/MultiFieldPanel_pt_BR.properties | 22 +
.../wicket/markup/html/form/NonI18nPalette.html | 69 +
.../markup/html/form/SpinnerFieldPanel.html | 29 +
.../form/preview/AbstractBinaryPreviewer.html | 24 +
.../html/form/preview/BinaryCertPreviewer.html | 24 +
.../html/form/preview/BinaryImagePreviewer.html | 23 +
.../wicket/markup/html/tree/TreeRolePanel.html | 23 +
client/lib/pom.xml | 79 +
.../client/lib/RestClientExceptionMapper.java | 126 +
.../client/lib/RestClientFactoryBean.java | 67 +
.../syncope/client/lib/SyncopeClient.java | 214 ++
.../client/lib/SyncopeClientFactoryBean.java | 202 ++
client/pom.xml | 89 +-
.../apache/syncope/client/SyncopeClient.java | 305 ---
.../client/SyncopeClientFactoryBean.java | 204 --
.../client/rest/RestClientExceptionMapper.java | 126 -
.../client/rest/RestClientFactoryBean.java | 67 -
.../META-INF/cxf/org.apache.cxf.Logger | 1 -
common/lib/pom.xml | 94 +
.../syncope/common/lib/AbstractBaseBean.java | 54 +
.../common/lib/AttributableOperations.java | 508 ++++
.../lib/SyncopeClientCompositeException.java | 96 +
.../common/lib/SyncopeClientException.java | 97 +
.../syncope/common/lib/SyncopeConstants.java | 52 +
.../common/lib/annotation/ClassList.java | 26 +
.../lib/annotation/FormAttributeField.java | 36 +
.../common/lib/annotation/SchemaList.java | 28 +
.../common/lib/mod/AbstractAttributableMod.java | 111 +
.../common/lib/mod/AbstractSubjectMod.java | 56 +
.../apache/syncope/common/lib/mod/AttrMod.java | 76 +
.../syncope/common/lib/mod/MembershipMod.java | 46 +
.../syncope/common/lib/mod/ReferenceMod.java | 53 +
.../common/lib/mod/ResourceAssociationMod.java | 80 +
.../apache/syncope/common/lib/mod/RoleMod.java | 300 +++
.../syncope/common/lib/mod/StatusMod.java | 108 +
.../apache/syncope/common/lib/mod/UserMod.java | 123 +
.../syncope/common/lib/mod/package-info.java | 23 +
.../apache/syncope/common/lib/package-info.java | 22 +
.../lib/report/AbstractReportletConf.java | 51 +
.../common/lib/report/ReportletConf.java | 32 +
.../common/lib/report/RoleReportletConf.java | 109 +
.../common/lib/report/StaticReportletConf.java | 107 +
.../common/lib/report/UserReportletConf.java | 114 +
.../syncope/common/lib/report/package-info.java | 23 +
.../common/lib/search/OrderByClauseBuilder.java | 45 +
.../search/RoleFiqlSearchConditionBuilder.java | 90 +
.../syncope/common/lib/search/RoleProperty.java | 29 +
.../common/lib/search/SearchableFields.java | 69 +
.../syncope/common/lib/search/SpecialAttr.java | 50 +
.../SyncopeFiqlSearchConditionBuilder.java | 110 +
.../common/lib/search/SyncopeProperty.java | 37 +
.../search/UserFiqlSearchConditionBuilder.java | 95 +
.../syncope/common/lib/search/UserProperty.java | 29 +
.../syncope/common/lib/search/package-info.java | 23 +
.../common/lib/to/AbstractAnnotatedBean.java | 108 +
.../common/lib/to/AbstractAttributableTO.java | 86 +
.../syncope/common/lib/to/AbstractExecTO.java | 87 +
.../syncope/common/lib/to/AbstractPolicyTO.java | 89 +
.../lib/to/AbstractProvisioningTaskTO.java | 117 +
.../syncope/common/lib/to/AbstractSchemaTO.java | 44 +
.../common/lib/to/AbstractSubjectTO.java | 68 +
.../syncope/common/lib/to/AbstractTaskTO.java | 98 +
.../syncope/common/lib/to/AccountPolicyTO.java | 68 +
.../apache/syncope/common/lib/to/AttrTO.java | 92 +
.../syncope/common/lib/to/BulkAction.java | 70 +
.../syncope/common/lib/to/BulkActionResult.java | 134 +
.../apache/syncope/common/lib/to/ConfTO.java | 30 +
.../syncope/common/lib/to/ConnBundleTO.java | 95 +
.../common/lib/to/ConnIdObjectClassTO.java | 72 +
.../syncope/common/lib/to/ConnInstanceTO.java | 177 ++
.../syncope/common/lib/to/ConnObjectTO.java | 58 +
.../syncope/common/lib/to/ConnPoolConfTO.java | 81 +
.../syncope/common/lib/to/DerSchemaTO.java | 39 +
.../apache/syncope/common/lib/to/ErrorTO.java | 66 +
.../syncope/common/lib/to/EventCategoryTO.java | 89 +
.../apache/syncope/common/lib/to/LoggerTO.java | 51 +
.../syncope/common/lib/to/MappingItemTO.java | 134 +
.../apache/syncope/common/lib/to/MappingTO.java | 117 +
.../syncope/common/lib/to/MembershipTO.java | 49 +
.../syncope/common/lib/to/NotificationTO.java | 175 ++
.../common/lib/to/NotificationTaskTO.java | 105 +
.../syncope/common/lib/to/PagedResult.java | 98 +
.../syncope/common/lib/to/PasswordPolicyTO.java | 54 +
.../syncope/common/lib/to/PlainSchemaTO.java | 156 ++
.../common/lib/to/PropagationStatus.java | 152 ++
.../common/lib/to/PropagationTaskTO.java | 123 +
.../syncope/common/lib/to/PushTaskTO.java | 49 +
.../syncope/common/lib/to/ReportExecTO.java | 40 +
.../apache/syncope/common/lib/to/ReportTO.java | 151 ++
.../syncope/common/lib/to/ResourceTO.java | 270 ++
.../apache/syncope/common/lib/to/RoleTO.java | 258 ++
.../syncope/common/lib/to/SchedTaskTO.java | 101 +
.../common/lib/to/SecurityQuestionTO.java | 51 +
.../syncope/common/lib/to/SyncPolicyTO.java | 54 +
.../syncope/common/lib/to/SyncTaskTO.java | 59 +
.../apache/syncope/common/lib/to/SyncopeTO.java | 216 ++
.../syncope/common/lib/to/TaskExecTO.java | 39 +
.../apache/syncope/common/lib/to/UserTO.java | 183 ++
.../syncope/common/lib/to/VirSchemaTO.java | 38 +
.../common/lib/to/WorkflowFormPropertyTO.java | 119 +
.../syncope/common/lib/to/WorkflowFormTO.java | 152 ++
.../syncope/common/lib/to/package-info.java | 23 +
.../lib/types/AbstractCommonsLangType.java | 47 +
.../common/lib/types/AccountPolicySpec.java | 188 ++
.../common/lib/types/AttrSchemaType.java | 51 +
.../common/lib/types/AttributableType.java | 31 +
.../syncope/common/lib/types/AuditElements.java | 61 +
.../common/lib/types/AuditLoggerName.java | 222 ++
.../common/lib/types/CipherAlgorithm.java | 54 +
.../common/lib/types/ClientExceptionType.java | 102 +
.../lib/types/ConflictResolutionAction.java | 34 +
.../common/lib/types/ConnConfPropSchema.java | 122 +
.../common/lib/types/ConnConfProperty.java | 69 +
.../common/lib/types/ConnectorCapability.java | 39 +
.../common/lib/types/EntityViolationType.java | 73 +
.../common/lib/types/IntMappingType.java | 201 ++
.../syncope/common/lib/types/LoggerLevel.java | 49 +
.../syncope/common/lib/types/LoggerType.java | 46 +
.../common/lib/types/MappingPurpose.java | 28 +
.../syncope/common/lib/types/MatchingRule.java | 54 +
.../common/lib/types/PasswordPolicySpec.java | 367 +++
.../syncope/common/lib/types/PolicySpec.java | 25 +
.../syncope/common/lib/types/PolicyType.java | 65 +
.../common/lib/types/PropagationByResource.java | 364 +++
.../common/lib/types/PropagationMode.java | 29 +
.../lib/types/PropagationTaskExecStatus.java | 47 +
.../lib/types/ReportExecExportFormat.java | 32 +
.../common/lib/types/ReportExecStatus.java | 34 +
.../types/ResourceAssociationActionType.java | 39 +
.../types/ResourceDeassociationActionType.java | 39 +
.../common/lib/types/ResourceOperation.java | 31 +
.../syncope/common/lib/types/SchemaType.java | 68 +
.../syncope/common/lib/types/SubjectType.java | 34 +
.../common/lib/types/SyncPolicySpec.java | 97 +
.../syncope/common/lib/types/TaskType.java | 54 +
.../syncope/common/lib/types/TraceLevel.java | 43 +
.../common/lib/types/UnmatchingRule.java | 47 +
.../lib/types/WorkflowFormPropertyType.java | 32 +
.../syncope/common/lib/types/WorkflowTasks.java | 47 +
.../syncope/common/lib/types/package-info.java | 23 +
.../common/lib/wrap/AbstractWrappable.java | 46 +
.../syncope/common/lib/wrap/EntitlementTO.java | 30 +
.../common/lib/wrap/ReportletConfClass.java | 30 +
.../syncope/common/lib/wrap/ResourceName.java | 30 +
.../syncope/common/lib/wrap/SubjectKey.java | 25 +
.../syncope/common/lib/wrap/package-info.java | 23 +
.../org/apache/syncope/common/lib/JSONTest.java | 63 +
common/pom.xml | 287 +-
common/rest-api/pom.xml | 97 +
.../common/rest/api/CollectionWrapper.java | 80 +
.../syncope/common/rest/api/Preference.java | 59 +
.../syncope/common/rest/api/RESTHeaders.java | 79 +
.../rest/api/service/ConfigurationService.java | 89 +
.../rest/api/service/ConnectorService.java | 201 ++
.../rest/api/service/EntitlementService.java | 53 +
.../common/rest/api/service/JAXRSService.java | 39 +
.../common/rest/api/service/LoggerService.java | 98 +
.../rest/api/service/NotificationService.java | 97 +
.../common/rest/api/service/PolicyService.java | 117 +
.../common/rest/api/service/ReportService.java | 195 ++
.../rest/api/service/ResourceService.java | 162 ++
.../common/rest/api/service/RoleService.java | 312 +++
.../common/rest/api/service/SchemaService.java | 119 +
.../api/service/SecurityQuestionService.java | 110 +
.../common/rest/api/service/SyncopeService.java | 33 +
.../common/rest/api/service/TaskService.java | 211 ++
.../rest/api/service/UserSelfService.java | 127 +
.../common/rest/api/service/UserService.java | 321 +++
.../rest/api/service/UserWorkflowService.java | 108 +
.../rest/api/service/WorkflowService.java | 70 +
.../apache/syncope/common/AbstractBaseBean.java | 54 -
.../common/SyncopeClientCompositeException.java | 96 -
.../syncope/common/SyncopeClientException.java | 97 -
.../apache/syncope/common/SyncopeConstants.java | 52 -
.../syncope/common/annotation/ClassList.java | 26 -
.../common/annotation/FormAttributeField.java | 37 -
.../syncope/common/annotation/SchemaList.java | 28 -
.../common/mod/AbstractAttributableMod.java | 113 -
.../syncope/common/mod/AbstractSubjectMod.java | 56 -
.../apache/syncope/common/mod/AttributeMod.java | 78 -
.../syncope/common/mod/MembershipMod.java | 46 -
.../apache/syncope/common/mod/ReferenceMod.java | 54 -
.../common/mod/ResourceAssociationMod.java | 81 -
.../org/apache/syncope/common/mod/RoleMod.java | 301 ---
.../apache/syncope/common/mod/StatusMod.java | 108 -
.../org/apache/syncope/common/mod/UserMod.java | 123 -
.../apache/syncope/common/mod/package-info.java | 23 -
.../org/apache/syncope/common/package-info.java | 22 -
.../common/report/AbstractReportletConf.java | 51 -
.../syncope/common/report/ReportletConf.java | 32 -
.../common/report/RoleReportletConf.java | 110 -
.../common/report/StaticReportletConf.java | 109 -
.../common/report/UserReportletConf.java | 115 -
.../syncope/common/report/package-info.java | 23 -
.../syncope/common/reqres/BulkAction.java | 70 -
.../syncope/common/reqres/BulkActionResult.java | 134 -
.../apache/syncope/common/reqres/ErrorTO.java | 66 -
.../syncope/common/reqres/PagedResult.java | 98 -
.../syncope/common/reqres/package-info.java | 23 -
.../common/search/OrderByClauseBuilder.java | 45 -
.../search/RoleFiqlSearchConditionBuilder.java | 90 -
.../syncope/common/search/RoleProperty.java | 29 -
.../syncope/common/search/SearchableFields.java | 67 -
.../syncope/common/search/SpecialAttr.java | 50 -
.../SyncopeFiqlSearchConditionBuilder.java | 110 -
.../syncope/common/search/SyncopeProperty.java | 37 -
.../search/UserFiqlSearchConditionBuilder.java | 95 -
.../syncope/common/search/UserProperty.java | 29 -
.../common/services/ConfigurationService.java | 112 -
.../common/services/ConnectorService.java | 202 --
.../common/services/EntitlementService.java | 54 -
.../syncope/common/services/JAXRSService.java | 39 -
.../syncope/common/services/LoggerService.java | 99 -
.../common/services/NotificationService.java | 98 -
.../syncope/common/services/PolicyService.java | 128 -
.../syncope/common/services/ReportService.java | 195 --
.../common/services/ResourceService.java | 173 --
.../syncope/common/services/RoleService.java | 313 ---
.../syncope/common/services/RouteService.java | 76 -
.../syncope/common/services/SchemaService.java | 119 -
.../services/SecurityQuestionService.java | 110 -
.../syncope/common/services/TaskService.java | 245 --
.../common/services/UserSelfService.java | 145 -
.../syncope/common/services/UserService.java | 322 ---
.../common/services/UserWorkflowService.java | 110 -
.../common/services/WorkflowService.java | 90 -
.../common/to/AbstractAttributableTO.java | 86 -
.../syncope/common/to/AbstractExecTO.java | 89 -
.../syncope/common/to/AbstractPolicyTO.java | 91 -
.../syncope/common/to/AbstractSchemaTO.java | 45 -
.../syncope/common/to/AbstractSubjectTO.java | 68 -
.../syncope/common/to/AbstractSyncTaskTO.java | 117 -
.../syncope/common/to/AbstractSysInfoTO.java | 108 -
.../syncope/common/to/AbstractTaskTO.java | 100 -
.../syncope/common/to/AccountPolicyTO.java | 69 -
.../apache/syncope/common/to/AttributeTO.java | 94 -
.../org/apache/syncope/common/to/ConfTO.java | 30 -
.../apache/syncope/common/to/ConnBundleTO.java | 97 -
.../syncope/common/to/ConnIdObjectClassTO.java | 72 -
.../syncope/common/to/ConnInstanceTO.java | 177 --
.../apache/syncope/common/to/ConnObjectTO.java | 58 -
.../syncope/common/to/ConnPoolConfTO.java | 81 -
.../apache/syncope/common/to/DerSchemaTO.java | 39 -
.../syncope/common/to/EventCategoryTO.java | 89 -
.../org/apache/syncope/common/to/LoggerTO.java | 52 -
.../apache/syncope/common/to/MappingItemTO.java | 135 -
.../org/apache/syncope/common/to/MappingTO.java | 119 -
.../apache/syncope/common/to/MembershipTO.java | 49 -
.../syncope/common/to/NotificationTO.java | 177 --
.../syncope/common/to/NotificationTaskTO.java | 106 -
.../syncope/common/to/PasswordPolicyTO.java | 55 -
.../syncope/common/to/PropagationStatus.java | 154 --
.../syncope/common/to/PropagationTaskTO.java | 123 -
.../apache/syncope/common/to/PushTaskTO.java | 49 -
.../apache/syncope/common/to/ReportExecTO.java | 40 -
.../org/apache/syncope/common/to/ReportTO.java | 153 --
.../apache/syncope/common/to/ResourceTO.java | 270 --
.../org/apache/syncope/common/to/RoleTO.java | 258 --
.../org/apache/syncope/common/to/RouteTO.java | 70 -
.../apache/syncope/common/to/SchedTaskTO.java | 101 -
.../org/apache/syncope/common/to/SchemaTO.java | 156 --
.../syncope/common/to/SecurityQuestionTO.java | 51 -
.../apache/syncope/common/to/SyncPolicyTO.java | 55 -
.../apache/syncope/common/to/SyncTaskTO.java | 59 -
.../apache/syncope/common/to/TaskExecTO.java | 39 -
.../org/apache/syncope/common/to/UserTO.java | 183 --
.../apache/syncope/common/to/VirSchemaTO.java | 38 -
.../common/to/WorkflowFormPropertyTO.java | 121 -
.../syncope/common/to/WorkflowFormTO.java | 172 --
.../apache/syncope/common/to/package-info.java | 23 -
.../common/types/AbstractPolicySpec.java | 27 -
.../syncope/common/types/AccountPolicySpec.java | 190 --
.../syncope/common/types/AttributableType.java | 31 -
.../common/types/AttributeSchemaType.java | 51 -
.../syncope/common/types/AuditElements.java | 61 -
.../syncope/common/types/AuditLoggerName.java | 110 -
.../syncope/common/types/CipherAlgorithm.java | 54 -
.../common/types/ClientExceptionType.java | 107 -
.../common/types/ConflictResolutionAction.java | 38 -
.../common/types/ConnConfPropSchema.java | 125 -
.../syncope/common/types/ConnConfProperty.java | 70 -
.../syncope/common/types/ConnParameterType.java | 41 -
.../common/types/ConnectorCapability.java | 39 -
.../common/types/EntityViolationType.java | 72 -
.../syncope/common/types/IntMappingType.java | 201 --
.../syncope/common/types/LoggerLevel.java | 49 -
.../apache/syncope/common/types/LoggerType.java | 46 -
.../syncope/common/types/MappingPurpose.java | 28 -
.../syncope/common/types/MatchingRule.java | 54 -
.../common/types/PasswordPolicySpec.java | 367 ---
.../apache/syncope/common/types/PolicyType.java | 61 -
.../apache/syncope/common/types/Preference.java | 59 -
.../syncope/common/types/PropagationMode.java | 29 -
.../common/types/PropagationTaskExecStatus.java | 49 -
.../syncope/common/types/RESTHeaders.java | 115 -
.../common/types/ReportExecExportFormat.java | 32 -
.../syncope/common/types/ReportExecStatus.java | 34 -
.../types/ResourceAssociationActionType.java | 39 -
.../types/ResourceDeassociationActionType.java | 39 -
.../syncope/common/types/ResourceOperation.java | 31 -
.../apache/syncope/common/types/SchemaType.java | 68 -
.../syncope/common/types/SubjectType.java | 34 -
.../syncope/common/types/SyncPolicySpec.java | 97 -
.../apache/syncope/common/types/TaskType.java | 54 -
.../apache/syncope/common/types/TraceLevel.java | 43 -
.../syncope/common/types/UnmatchingRule.java | 47 -
.../common/types/WorkflowFormPropertyType.java | 32 -
.../syncope/common/types/WorkflowTasks.java | 47 -
.../syncope/common/types/package-info.java | 23 -
.../common/util/AttributableOperations.java | 508 ----
.../apache/syncope/common/util/BeanUtils.java | 201 --
.../syncope/common/util/CollectionWrapper.java | 80 -
.../syncope/common/util/LoggerEventUtils.java | 142 -
.../syncope/common/wrap/AbstractWrappable.java | 46 -
.../common/wrap/CorrelationRuleClass.java | 30 -
.../syncope/common/wrap/EntitlementTO.java | 30 -
.../apache/syncope/common/wrap/JobClass.java | 30 -
.../syncope/common/wrap/MailTemplate.java | 30 -
.../common/wrap/PropagationActionClass.java | 30 -
.../syncope/common/wrap/PushActionClass.java | 30 -
.../syncope/common/wrap/ReportletConfClass.java | 30 -
.../syncope/common/wrap/ResourceName.java | 30 -
.../apache/syncope/common/wrap/SubjectId.java | 25 -
.../syncope/common/wrap/SyncActionClass.java | 30 -
.../apache/syncope/common/wrap/Validator.java | 30 -
.../syncope/common/wrap/package-info.java | 23 -
.../org/apache/syncope/common/JSONTest.java | 63 -
console/LICENSE | 708 -----
console/NOTICE | 75 -
console/pom.xml | 741 ------
.../syncope/console/SyncopeApplication.java | 305 ---
.../console/SyncopeRequestCycleListener.java | 84 -
.../apache/syncope/console/SyncopeSession.java | 211 --
.../console/commons/ActionTableCheckGroup.java | 40 -
.../syncope/console/commons/AttrLayoutType.java | 105 -
.../commons/AttributableDataProvider.java | 105 -
.../console/commons/CloseOnESCBehavior.java | 54 -
.../console/commons/ConnIdAttribute.java | 35 -
.../commons/ConnIdSpecialAttributeName.java | 34 -
.../syncope/console/commons/Constants.java | 110 -
.../console/commons/DateFormatROModel.java | 50 -
.../console/commons/HttpResourceStream.java | 101 -
.../syncope/console/commons/JexlHelpUtil.java | 61 -
.../console/commons/MapChoiceRenderer.java | 43 -
.../apache/syncope/console/commons/Mode.java | 27 -
.../console/commons/PreferenceManager.java | 177 --
.../console/commons/RoleTreeBuilder.java | 116 -
.../syncope/console/commons/RoleUtils.java | 36 -
.../console/commons/SchemaModalPageFactory.java | 58 -
.../console/commons/SelectChoiceRenderer.java | 40 -
.../syncope/console/commons/SelectOption.java | 72 -
.../SortableAttributableProviderComparator.java | 123 -
.../commons/SortableDataProviderComparator.java | 66 -
.../syncope/console/commons/XMLRolesReader.java | 118 -
.../status/AbstractStatusBeanProvider.java | 69 -
.../commons/status/ConnObjectWrapper.java | 55 -
.../syncope/console/commons/status/Status.java | 45 -
.../console/commons/status/StatusBean.java | 103 -
.../console/commons/status/StatusUtils.java | 321 ---
.../console/init/MIMETypesInitializer.java | 63 -
.../init/PreviewPanelClassInitializer.java | 69 -
.../console/init/SpringContextInitializer.java | 45 -
.../console/markup/html/CrontabContainer.java | 184 --
.../console/markup/html/list/AltListView.java | 59 -
.../html/list/ConnConfPropertyListView.java | 152 --
.../syncope/console/pages/AbstractBasePage.java | 133 -
.../pages/AbstractSchedTaskModalPage.java | 132 -
.../console/pages/AbstractSchemaModalPage.java | 45 -
.../console/pages/AbstractStatusModalPage.java | 30 -
.../pages/AbstractSyncTaskModalPage.java | 209 --
.../console/pages/ActivitiModelerPopupPage.java | 27 -
.../console/pages/ApprovalModalPage.java | 285 --
.../syncope/console/pages/BaseModalPage.java | 35 -
.../apache/syncope/console/pages/BasePage.java | 111 -
.../syncope/console/pages/BasePopupPage.java | 25 -
.../console/pages/BulkActionModalPage.java | 166 --
.../pages/BulkActionResultModalPage.java | 97 -
.../syncope/console/pages/ConfModalPage.java | 112 -
.../syncope/console/pages/Configuration.java | 892 -------
.../pages/ConfirmPasswordResetModalPage.java | 103 -
.../console/pages/ConnObjectModalPage.java | 101 -
.../console/pages/ConnectorModalPage.java | 472 ----
.../console/pages/DerSchemaModalPage.java | 140 -
.../pages/DisplayAttributesModalPage.java | 273 --
.../console/pages/EditUserModalPage.java | 105 -
.../apache/syncope/console/pages/ErrorPage.java | 42 -
.../console/pages/ExecMessageModalPage.java | 32 -
.../console/pages/FailureMessageModalPage.java | 37 -
.../apache/syncope/console/pages/HomePage.java | 33 -
.../syncope/console/pages/InfoModalPage.java | 43 -
.../org/apache/syncope/console/pages/Login.java | 365 ---
.../apache/syncope/console/pages/Logout.java | 38 -
.../console/pages/MembershipModalPage.java | 114 -
.../console/pages/NotificationModalPage.java | 441 ----
.../pages/NotificationTaskModalPage.java | 69 -
.../console/pages/PlainSchemaModalPage.java | 456 ----
.../syncope/console/pages/PolicyModalPage.java | 451 ----
.../console/pages/PropagationTaskModalPage.java | 45 -
.../console/pages/ProvisioningModalPage.java | 250 --
.../console/pages/PushTaskModalPage.java | 135 -
.../ReportExecResultDownloadModalPage.java | 74 -
.../syncope/console/pages/ReportModalPage.java | 640 -----
.../console/pages/ReportletConfModalPage.java | 362 ---
.../apache/syncope/console/pages/Reports.java | 414 ---
.../pages/RequestPasswordResetModalPage.java | 153 --
.../console/pages/ResourceModalPage.java | 217 --
.../apache/syncope/console/pages/Resources.java | 731 ------
.../console/pages/ResultStatusModalPage.java | 426 ---
.../syncope/console/pages/RoleModalPage.java | 162 --
.../console/pages/RoleSelectModalPage.java | 105 -
.../console/pages/RoleTemplateModalPage.java | 50 -
.../org/apache/syncope/console/pages/Roles.java | 186 --
.../syncope/console/pages/RouteModalPage.java | 90 -
.../console/pages/SchedTaskModalPage.java | 68 -
.../apache/syncope/console/pages/Schema.java | 470 ----
.../pages/SecurityQuestionModalPage.java | 113 -
.../syncope/console/pages/StatusModalPage.java | 641 -----
.../console/pages/SyncTaskModalPage.java | 73 -
.../syncope/console/pages/TaskModalPage.java | 257 --
.../org/apache/syncope/console/pages/Tasks.java | 230 --
.../org/apache/syncope/console/pages/Todo.java | 245 --
.../syncope/console/pages/UserModalPage.java | 230 --
.../console/pages/UserOwnerSelectModalPage.java | 81 -
.../console/pages/UserSelfModalPage.java | 72 -
.../console/pages/UserTemplateModalPage.java | 60 -
.../org/apache/syncope/console/pages/Users.java | 166 --
.../console/pages/ViewUserModalPage.java | 49 -
.../console/pages/VirSchemaModalPage.java | 126 -
.../syncope/console/pages/WelcomePage.java | 55 -
.../console/pages/XMLEditorPopupPage.java | 90 -
.../pages/panels/AbstractSearchPanel.java | 401 ---
.../pages/panels/AbstractSearchResultPanel.java | 353 ---
.../pages/panels/AbstractSyncTasksPanel.java | 159 --
.../console/pages/panels/AbstractTasks.java | 55 -
.../pages/panels/AccountInformationPanel.java | 73 -
.../pages/panels/ActionDataTablePanel.java | 149 --
.../pages/panels/AjaxDataTablePanel.java | 142 -
.../pages/panels/AttrTemplatesPanel.java | 171 --
.../console/pages/panels/AttributesPanel.java | 397 ---
.../console/pages/panels/DataTablePanel.java | 113 -
.../pages/panels/DerivedAttributesPanel.java | 206 --
.../pages/panels/EventSelectionPanel.java | 243 --
.../console/pages/panels/ImagePanel.java | 43 -
.../pages/panels/JQueryUITabbedPanel.java | 45 -
.../console/pages/panels/LayoutsPanel.java | 130 -
.../pages/panels/LoggerCategoryPanel.java | 468 ----
.../console/pages/panels/MembershipsPanel.java | 256 --
.../console/pages/panels/NotificationPanel.java | 119 -
.../console/pages/panels/NotificationTasks.java | 254 --
.../console/pages/panels/PoliciesPanel.java | 343 ---
.../console/pages/panels/PolicyBeanPanel.java | 328 ---
.../console/pages/panels/PropagationTasks.java | 273 --
.../console/pages/panels/PushTasksPanel.java | 184 --
.../pages/panels/ResourceConnConfPanel.java | 187 --
.../pages/panels/ResourceDetailsPanel.java | 306 ---
.../pages/panels/ResourceMappingPanel.java | 644 -----
.../pages/panels/ResourceSecurityPanel.java | 189 --
.../console/pages/panels/ResourcesPanel.java | 178 --
.../console/pages/panels/RoleDetailsPanel.java | 435 ---
.../syncope/console/pages/panels/RolePanel.java | 188 --
.../console/pages/panels/RoleSearchPanel.java | 101 -
.../pages/panels/RoleSearchResultPanel.java | 175 --
.../console/pages/panels/RoleSecurityPanel.java | 198 --
.../console/pages/panels/RoleSummaryPanel.java | 153 --
.../console/pages/panels/RoleTabPanel.java | 195 --
.../console/pages/panels/SchedTasks.java | 286 --
.../console/pages/panels/SearchClause.java | 129 -
.../console/pages/panels/SearchView.java | 461 ----
.../pages/panels/SecurityQuestionPanel.java | 98 -
.../panels/SelectOnlyUserSearchResultPanel.java | 93 -
.../pages/panels/SelectedEventsPanel.java | 167 --
.../console/pages/panels/StatusPanel.java | 263 --
.../console/pages/panels/SyncTasksPanel.java | 226 --
.../console/pages/panels/SysInfoPanel.java | 67 -
.../console/pages/panels/UserDetailsPanel.java | 124 -
.../console/pages/panels/UserSearchPanel.java | 113 -
.../pages/panels/UserSearchResultPanel.java | 298 ---
.../pages/panels/VirtualAttributesPanel.java | 295 ---
.../syncope/console/preview/BinaryPreview.java | 34 -
.../syncope/console/preview/PreviewUtil.java | 67 -
.../console/preview/PreviewerClassScanner.java | 50 -
.../console/resources/FilesystemResource.java | 83 -
.../resources/WorkflowDefGETResource.java | 59 -
.../resources/WorkflowDefPUTResource.java | 74 -
.../console/rest/AbstractSubjectRestClient.java | 46 -
.../console/rest/ApprovalRestClient.java | 45 -
.../syncope/console/rest/AuthRestClient.java | 55 -
.../syncope/console/rest/BaseRestClient.java | 71 -
.../console/rest/ConfigurationRestClient.java | 100 -
.../console/rest/ConnectorRestClient.java | 217 --
.../console/rest/ExecutionRestClient.java | 26 -
.../syncope/console/rest/InvalidPolicyType.java | 31 -
.../syncope/console/rest/LoggerRestClient.java | 93 -
.../console/rest/NotificationRestClient.java | 51 -
.../syncope/console/rest/PolicyRestClient.java | 104 -
.../syncope/console/rest/ReportRestClient.java | 108 -
.../console/rest/ResourceRestClient.java | 101 -
.../syncope/console/rest/RoleRestClient.java | 185 --
.../syncope/console/rest/RouteRestClient.java | 63 -
.../syncope/console/rest/SchemaRestClient.java | 257 --
.../rest/SecurityQuestionRestClient.java | 51 -
.../syncope/console/rest/TaskRestClient.java | 170 --
.../syncope/console/rest/UserRestClient.java | 228 --
.../console/rest/UserSelfRestClient.java | 96 -
.../console/rest/WorkflowRestClient.java | 79 -
.../ajax/form/AbstractAjaxDownloadBehavior.java | 48 -
.../markup/html/ClearIndicatingAjaxButton.java | 76 -
.../markup/html/ClearIndicatingAjaxLink.java | 61 -
.../html/IndicatingOnConfirmAjaxLink.java | 58 -
.../html/repeater/data/table/ActionColumn.java | 59 -
.../repeater/data/table/ActionResultColumn.java | 77 -
.../html/repeater/data/table/AttrColumn.java | 86 -
.../data/table/CheckBoxGroupSelectorPanel.java | 34 -
.../html/repeater/data/table/CheckBoxPanel.java | 43 -
.../repeater/data/table/CheckGroupColumn.java | 54 -
.../repeater/data/table/CollectionPanel.java | 47 -
.../data/table/CollectionPropertyColumn.java | 54 -
.../repeater/data/table/DatePropertyColumn.java | 54 -
.../html/repeater/data/table/TokenColumn.java | 51 -
.../markup/html/form/AbstractFieldPanel.java | 40 -
.../wicket/markup/html/form/ActionLink.java | 83 -
.../markup/html/form/ActionLinksPanel.java | 586 -----
.../markup/html/form/AjaxCheckBoxPanel.java | 130 -
.../markup/html/form/AjaxDecoratedCheckbox.java | 55 -
.../html/form/AjaxDropDownChoicePanel.java | 87 -
.../markup/html/form/AjaxPalettePanel.java | 70 -
.../html/form/AjaxPasswordFieldPanel.java | 60 -
.../markup/html/form/AjaxTextFieldPanel.java | 98 -
.../markup/html/form/BinaryFieldPanel.java | 211 --
.../form/CheckBoxMultipleChoiceFieldPanel.java | 46 -
.../wicket/markup/html/form/DateFieldPanel.java | 133 -
.../markup/html/form/DateTextFieldPanel.java | 89 -
.../markup/html/form/DateTimeFieldPanel.java | 195 --
.../wicket/markup/html/form/FieldPanel.java | 199 --
.../wicket/markup/html/form/LinkPanel.java | 39 -
.../markup/html/form/MappingPurposePanel.java | 131 -
.../markup/html/form/MultiFieldPanel.java | 173 --
.../wicket/markup/html/form/NonI18nPalette.java | 44 -
.../markup/html/form/SelectableRecorder.java | 204 --
.../markup/html/form/SpinnerFieldPanel.java | 197 --
.../form/preview/AbstractBinaryPreviewer.java | 46 -
.../html/form/preview/BinaryCertPreviewer.java | 70 -
.../html/form/preview/BinaryImagePreviewer.java | 51 -
.../markup/html/link/VeilPopupSettings.java | 32 -
.../tree/DefaultMutableTreeNodeExpansion.java | 162 --
.../DefaultMutableTreeNodeExpansionModel.java | 36 -
.../wicket/markup/html/tree/TreeRolePanel.java | 122 -
.../markup/html/tree/TreeRoleProvider.java | 43 -
.../syncope/markup/head/MetaHeaderItem.java | 49 -
console/src/main/resources/MIMETypes | 671 -----
console/src/main/resources/authorizations.xml | 333 ---
console/src/main/resources/console.properties | 21 -
console/src/main/resources/consoleContext.xml | 82 -
console/src/main/resources/log4j2.xml | 66 -
.../console/SyncopeApplication.properties | 54 -
.../console/SyncopeApplication_it.properties | 53 -
.../console/SyncopeApplication_pt_BR.properties | 53 -
.../markup/html/CrontabContainer.properties | 22 -
.../markup/html/CrontabContainer_it.properties | 22 -
.../html/CrontabContainer_pt_BR.properties | 22 -
.../console/pages/AbstractStatusModalPage.html | 120 -
.../pages/AbstractStatusModalPage.properties | 19 -
.../pages/AbstractStatusModalPage_it.properties | 19 -
.../AbstractStatusModalPage_pt_BR.properties | 19 -
.../console/pages/ActivitiModelerPopupPage.html | 65 -
.../console/pages/ApprovalModalPage.html | 52 -
.../console/pages/ApprovalModalPage.properties | 18 -
.../pages/ApprovalModalPage_it.properties | 18 -
.../pages/ApprovalModalPage_pt_BR.properties | 18 -
.../syncope/console/pages/BaseModalPage.html | 56 -
.../console/pages/BaseModalPage.properties | 20 -
.../console/pages/BaseModalPage_it.properties | 20 -
.../pages/BaseModalPage_pt_BR.properties | 20 -
.../apache/syncope/console/pages/BasePage.html | 145 -
.../syncope/console/pages/BasePage.properties | 19 -
.../console/pages/BasePage_it.properties | 19 -
.../console/pages/BasePage_pt_BR.properties | 19 -
.../syncope/console/pages/BasePopupPage.html | 51 -
.../console/pages/BulkActionModalPage.html | 45 -
.../pages/BulkActionModalPage.properties | 17 -
.../pages/BulkActionModalPage_it.properties | 17 -
.../pages/BulkActionModalPage_pt_BR.properties | 17 -
.../pages/BulkActionResultModalPage.html | 57 -
.../pages/BulkActionResultModalPage.properties | 19 -
.../BulkActionResultModalPage_it.properties | 19 -
.../BulkActionResultModalPage_pt_BR.properties | 19 -
.../syncope/console/pages/ConfModalPage.html | 39 -
.../console/pages/ConfModalPage.properties | 17 -
.../console/pages/ConfModalPage_it.properties | 17 -
.../pages/ConfModalPage_pt_BR.properties | 17 -
.../syncope/console/pages/Configuration.html | 236 --
.../console/pages/Configuration.properties | 48 -
.../console/pages/Configuration_it.properties | 47 -
.../pages/Configuration_pt_BR.properties | 47 -
.../pages/ConfirmPasswordResetModalPage.html | 55 -
.../ConfirmPasswordResetModalPage.properties | 20 -
.../ConfirmPasswordResetModalPage_it.properties | 20 -
...nfirmPasswordResetModalPage_pt_BR.properties | 20 -
.../console/pages/ConnObjectModalPage.html | 39 -
.../pages/ConnObjectModalPage.properties | 17 -
.../pages/ConnObjectModalPage_it.properties | 17 -
.../pages/ConnObjectModalPage_pt_BR.properties | 17 -
.../console/pages/ConnectorModalPage.html | 159 --
.../console/pages/ConnectorModalPage.properties | 42 -
.../pages/ConnectorModalPage_it.properties | 42 -
.../pages/ConnectorModalPage_pt_BR.properties | 42 -
.../console/pages/DerSchemaModalPage.html | 64 -
.../console/pages/DerSchemaModalPage.properties | 22 -
.../pages/DerSchemaModalPage_it.properties | 22 -
.../pages/DerSchemaModalPage_pt_BR.properties | 22 -
.../pages/DisplayAttributesModalPage.html | 132 -
.../pages/DisplayAttributesModalPage.properties | 33 -
.../DisplayAttributesModalPage_it.properties | 33 -
.../DisplayAttributesModalPage_pt_BR.properties | 33 -
.../apache/syncope/console/pages/ErrorPage.html | 53 -
.../console/pages/ExecMessageModalPage.html | 25 -
.../console/pages/FailureMessageModalPage.html | 36 -
.../apache/syncope/console/pages/HomePage.html | 34 -
.../syncope/console/pages/InfoModalPage.html | 42 -
.../console/pages/InfoModalPage.properties | 19 -
.../console/pages/InfoModalPage_it.properties | 19 -
.../pages/InfoModalPage_pt_BR.properties | 19 -
.../org/apache/syncope/console/pages/Login.html | 89 -
.../syncope/console/pages/Login.properties | 22 -
.../syncope/console/pages/Login_it.properties | 22 -
.../console/pages/Login_pt_BR.properties | 22 -
.../console/pages/MembershipModalPage.html | 55 -
.../pages/MembershipModalPage.properties | 35 -
.../pages/MembershipModalPage_it.properties | 35 -
.../pages/MembershipModalPage_pt_BR.properties | 35 -
.../console/pages/NotificationModalPage.html | 234 --
.../pages/NotificationModalPage.properties | 40 -
.../pages/NotificationModalPage_it.properties | 40 -
.../NotificationModalPage_pt_BR.properties | 40 -
.../pages/NotificationTaskModalPage.html | 109 -
.../pages/NotificationTaskModalPage.properties | 32 -
.../NotificationTaskModalPage_it.properties | 32 -
.../NotificationTaskModalPage_pt_BR.properties | 32 -
.../console/pages/PlainSchemaModalPage.html | 172 --
.../pages/PlainSchemaModalPage.properties | 38 -
.../pages/PlainSchemaModalPage_it.properties | 38 -
.../pages/PlainSchemaModalPage_pt_BR.properties | 38 -
.../syncope/console/pages/PolicyModalPage.html | 109 -
.../console/pages/PolicyModalPage.properties | 88 -
.../console/pages/PolicyModalPage_it.properties | 88 -
.../pages/PolicyModalPage_pt_BR.properties | 87 -
.../console/pages/PropagationTaskModalPage.html | 73 -
.../pages/PropagationTaskModalPage.properties | 28 -
.../PropagationTaskModalPage_it.properties | 28 -
.../PropagationTaskModalPage_pt_BR.properties | 28 -
.../console/pages/PushTaskModalPage.html | 228 --
.../console/pages/PushTaskModalPage.properties | 45 -
.../pages/PushTaskModalPage_it.properties | 47 -
.../pages/PushTaskModalPage_pt_BR.properties | 45 -
.../syncope/console/pages/RecursivePanel.html | 28 -
.../ReportExecResultDownloadModalPage.html | 23 -
...ReportExecResultDownloadModalPage.properties | 18 -
...ortExecResultDownloadModalPage_it.properties | 18 -
...ExecResultDownloadModalPage_pt_BR.properties | 18 -
.../syncope/console/pages/ReportModalPage.html | 146 --
.../console/pages/ReportModalPage.properties | 36 -
.../console/pages/ReportModalPage_it.properties | 36 -
.../pages/ReportModalPage_pt_BR.properties | 36 -
.../console/pages/ReportletConfModalPage.html | 85 -
.../pages/ReportletConfModalPage.properties | 22 -
.../pages/ReportletConfModalPage_it.properties | 22 -
.../ReportletConfModalPage_pt_BR.properties | 22 -
.../apache/syncope/console/pages/Reports.html | 58 -
.../syncope/console/pages/Reports.properties | 24 -
.../syncope/console/pages/Reports_it.properties | 24 -
.../console/pages/Reports_pt_BR.properties | 24 -
.../pages/RequestPasswordResetModalPage.html | 64 -
.../RequestPasswordResetModalPage.properties | 21 -
.../RequestPasswordResetModalPage_it.properties | 21 -
...questPasswordResetModalPage_pt_BR.properties | 21 -
.../console/pages/ResourceModalPage.html | 64 -
.../console/pages/ResourceModalPage.properties | 60 -
.../pages/ResourceModalPage_it.properties | 60 -
.../pages/ResourceModalPage_pt_BR.properties | 60 -
.../apache/syncope/console/pages/Resources.html | 99 -
.../syncope/console/pages/Resources.properties | 34 -
.../console/pages/Resources_it.properties | 34 -
.../console/pages/Resources_pt_BR.properties | 32 -
.../console/pages/ResultStatusModalPage.html | 226 --
.../pages/ResultStatusModalPage.properties | 26 -
.../pages/ResultStatusModalPage_it.properties | 26 -
.../ResultStatusModalPage_pt_BR.properties | 26 -
.../syncope/console/pages/RoleModalPage.html | 52 -
.../console/pages/RoleModalPage.properties | 48 -
.../console/pages/RoleModalPage_it.properties | 48 -
.../pages/RoleModalPage_pt_BR.properties | 48 -
.../console/pages/RoleSelectModalPage.html | 22 -
.../org/apache/syncope/console/pages/Roles.html | 80 -
.../syncope/console/pages/Roles.properties | 26 -
.../syncope/console/pages/Roles_it.properties | 26 -
.../console/pages/Roles_pt_BR.properties | 26 -
.../syncope/console/pages/RouteModalPage.html | 49 -
.../console/pages/RouteModalPage.properties | 18 -
.../console/pages/RouteModalPage_it.properties | 18 -
.../pages/RouteModalPage_pt_BR.properties | 18 -
.../console/pages/SchedTaskModalPage.html | 136 -
.../console/pages/SchedTaskModalPage.properties | 36 -
.../pages/SchedTaskModalPage_it.properties | 36 -
.../pages/SchedTaskModalPage_pt_BR.properties | 36 -
.../console/pages/Schema$SchemaTypePanel.html | 41 -
.../apache/syncope/console/pages/Schema.html | 59 -
.../syncope/console/pages/Schema.properties | 35 -
.../syncope/console/pages/Schema_it.properties | 35 -
.../console/pages/Schema_pt_BR.properties | 35 -
.../pages/SecurityQuestionModalPage.html | 46 -
.../pages/SecurityQuestionModalPage.properties | 18 -
.../SecurityQuestionModalPage_it.properties | 18 -
.../SecurityQuestionModalPage_pt_BR.properties | 18 -
.../console/pages/SyncTaskModalPage.html | 205 --
.../console/pages/SyncTaskModalPage.properties | 43 -
.../pages/SyncTaskModalPage_it.properties | 44 -
.../pages/SyncTaskModalPage_pt_BR.properties | 43 -
.../org/apache/syncope/console/pages/Tasks.html | 46 -
.../syncope/console/pages/Tasks.properties | 21 -
.../syncope/console/pages/Tasks_it.properties | 21 -
.../console/pages/Tasks_pt_BR.properties | 21 -
.../org/apache/syncope/console/pages/Todo.html | 45 -
.../syncope/console/pages/Todo.properties | 31 -
.../syncope/console/pages/Todo_it.properties | 31 -
.../syncope/console/pages/Todo_pt_BR.properties | 31 -
.../syncope/console/pages/UserModalPage.html | 97 -
.../console/pages/UserModalPage.properties | 52 -
.../console/pages/UserModalPage_it.properties | 53 -
.../pages/UserModalPage_pt_BR.properties | 52 -
.../console/pages/UserOwnerSelectModalPage.html | 38 -
.../pages/UserOwnerSelectModalPage.properties | 23 -
.../UserOwnerSelectModalPage_it.properties | 23 -
.../UserOwnerSelectModalPage_pt_BR.properties | 23 -
.../org/apache/syncope/console/pages/Users.html | 72 -
.../syncope/console/pages/Users.properties | 26 -
.../syncope/console/pages/Users_it.properties | 26 -
.../console/pages/Users_pt_BR.properties | 26 -
.../console/pages/VirSchemaModalPage.html | 53 -
.../console/pages/VirSchemaModalPage.properties | 22 -
.../pages/VirSchemaModalPage_it.properties | 22 -
.../pages/VirSchemaModalPage_pt_BR.properties | 22 -
.../syncope/console/pages/WelcomePage.html | 70 -
.../console/pages/WelcomePage.properties | 18 -
.../console/pages/WelcomePage_it.properties | 18 -
.../console/pages/WelcomePage_pt_BR.properties | 18 -
.../console/pages/XMLEditorPopupPage.html | 82 -
.../console/pages/XMLEditorPopupPage.properties | 19 -
.../pages/XMLEditorPopupPage_it.properties | 19 -
.../pages/XMLEditorPopupPage_pt_BR.properties | 19 -
.../pages/panels/AbstractSearchPanel.html | 50 -
.../pages/panels/AbstractSearchResultPanel.html | 43 -
.../panels/AbstractSearchResultPanel.properties | 30 -
.../AbstractSearchResultPanel_it.properties | 30 -
.../AbstractSearchResultPanel_pt_BR.properties | 30 -
.../pages/panels/AbstractSyncTasksPanel.html | 41 -
.../pages/panels/AccountInformationPanel.html | 67 -
.../panels/AccountInformationPanel.properties | 22 -
.../AccountInformationPanel_it.properties | 23 -
.../AccountInformationPanel_pt_BR.properties | 23 -
.../pages/panels/ActionDataTablePanel.html | 45 -
.../pages/panels/AjaxDataTablePanel.html | 47 -
.../pages/panels/AttrTemplatesPanel.html | 58 -
.../pages/panels/AttrTemplatesPanel.properties | 23 -
.../panels/AttrTemplatesPanel_it.properties | 23 -
.../panels/AttrTemplatesPanel_pt_BR.properties | 23 -
.../console/pages/panels/AttributesPanel.html | 44 -
.../console/pages/panels/AuditEventsPanel.html | 122 -
.../pages/panels/DerivedAttributesPanel.html | 60 -
.../panels/DerivedAttributesPanel.properties | 17 -
.../panels/DerivedAttributesPanel_it.properties | 18 -
.../DerivedAttributesPanel_pt_BR.properties | 17 -
.../pages/panels/EventSelectionPanel.html | 125 -
.../console/pages/panels/ImagePanel.html | 23 -
.../pages/panels/JQueryUITabbedPanel.html | 41 -
.../console/pages/panels/LayoutsPanel.html | 41 -
.../pages/panels/LayoutsPanel.properties | 18 -
.../pages/panels/LayoutsPanel_it.properties | 18 -
.../pages/panels/LayoutsPanel_pt_BR.properties | 18 -
.../pages/panels/LoggerCategoryPanel.html | 106 -
.../console/pages/panels/MembershipsPanel.html | 66 -
.../pages/panels/MembershipsPanel.properties | 23 -
.../pages/panels/MembershipsPanel_it.properties | 24 -
.../panels/MembershipsPanel_pt_BR.properties | 23 -
.../console/pages/panels/NotificationTasks.html | 38 -
.../pages/panels/NotificationTasks.properties | 26 -
.../panels/NotificationTasks_it.properties | 26 -
.../panels/NotificationTasks_pt_BR.properties | 26 -
.../console/pages/panels/PoliciesPanel.html | 42 -
.../pages/panels/PoliciesPanel.properties | 34 -
.../pages/panels/PoliciesPanel_it.properties | 34 -
.../pages/panels/PoliciesPanel_pt_BR.properties | 34 -
.../console/pages/panels/PolicyBeanPanel.html | 39 -
.../console/pages/panels/PropagationTasks.html | 37 -
.../pages/panels/PropagationTasks.properties | 28 -
.../pages/panels/PropagationTasks_it.properties | 28 -
.../panels/PropagationTasks_pt_BR.properties | 28 -
.../pages/panels/PushTasksPanel.properties | 29 -
.../pages/panels/PushTasksPanel_it.properties | 29 -
.../panels/PushTasksPanel_pt_BR.properties | 29 -
.../pages/panels/ResourceConnConfPanel.html | 41 -
.../pages/panels/ResourceDetailsPanel.html | 137 -
.../pages/panels/ResourceMappingPanel.html | 125 -
.../pages/panels/ResourceSecurityPanel.html | 56 -
.../panels/ResourceSecurityPanel.properties | 19 -
.../panels/ResourceSecurityPanel_it.properties | 19 -
.../ResourceSecurityPanel_pt_BR.properties | 19 -
.../console/pages/panels/ResourcesPanel.html | 23 -
.../console/pages/panels/RoleDetailsPanel.html | 107 -
.../pages/panels/RoleDetailsPanel.properties | 22 -
.../pages/panels/RoleDetailsPanel_it.properties | 22 -
.../panels/RoleDetailsPanel_pt_BR.properties | 22 -
.../syncope/console/pages/panels/RolePanel.html | 88 -
.../console/pages/panels/RolePanel.properties | 51 -
.../pages/panels/RolePanel_it.properties | 53 -
.../pages/panels/RolePanel_pt_BR.properties | 40 -
.../console/pages/panels/RoleSecurityPanel.html | 66 -
.../pages/panels/RoleSecurityPanel.properties | 20 -
.../panels/RoleSecurityPanel_it.properties | 20 -
.../panels/RoleSecurityPanel_pt_BR.properties | 20 -
.../console/pages/panels/RoleSummaryPanel.html | 39 -
.../console/pages/panels/RoleTabPanel.html | 64 -
.../pages/panels/RoleTabPanel.properties | 27 -
.../pages/panels/RoleTabPanel_it.properties | 27 -
.../pages/panels/RoleTabPanel_pt_BR.properties | 27 -
.../console/pages/panels/SchedTasks.html | 42 -
.../console/pages/panels/SchedTasks.properties | 28 -
.../pages/panels/SchedTasks_it.properties | 28 -
.../pages/panels/SchedTasks_pt_BR.properties | 28 -
.../pages/panels/SecurityQuestionPanel.html | 41 -
.../panels/SecurityQuestionPanel.properties | 18 -
.../panels/SecurityQuestionPanel_it.properties | 18 -
.../SecurityQuestionPanel_pt_BR.properties | 18 -
.../pages/panels/SelectedEventsPanel.html | 33 -
.../console/pages/panels/StatusPanel.html | 130 -
.../console/pages/panels/StatusPanel.properties | 19 -
.../pages/panels/StatusPanel_it.properties | 19 -
.../pages/panels/StatusPanel_pt_BR.properties | 19 -
.../pages/panels/SyncTasksPanel.properties | 29 -
.../pages/panels/SyncTasksPanel_it.properties | 29 -
.../panels/SyncTasksPanel_pt_BR.properties | 29 -
.../console/pages/panels/SysInfoPanel.html | 98 -
.../pages/panels/SysInfoPanel.properties | 20 -
.../pages/panels/SysInfoPanel_it.properties | 20 -
.../pages/panels/SysInfoPanel_pt_BR.properties | 20 -
.../console/pages/panels/UserDetailsPanel.html | 71 -
.../pages/panels/UserDetailsPanel.properties | 19 -
.../pages/panels/UserDetailsPanel_it.properties | 19 -
.../panels/UserDetailsPanel_pt_BR.properties | 19 -
.../pages/panels/VirtualAttributesPanel.html | 60 -
.../panels/VirtualAttributesPanel.properties | 19 -
.../panels/VirtualAttributesPanel_it.properties | 20 -
.../VirtualAttributesPanel_pt_BR.properties | 19 -
.../syncope/console/pages/statuses/active.png | Bin 509 -> 0 bytes
.../syncope/console/pages/statuses/inactive.png | Bin 477 -> 0 bytes
.../console/pages/statuses/objectnotfound.png | Bin 668 -> 0 bytes
.../console/pages/statuses/undefined.png | Bin 758 -> 0 bytes
.../data/table/CheckBoxGroupSelectorPanel.html | 21 -
.../html/repeater/data/table/CheckBoxPanel.html | 23 -
.../repeater/data/table/CollectionPanel.html | 25 -
.../markup/html/form/ActionLinksPanel.html | 163 --
.../markup/html/form/AjaxCheckBoxPanel.html | 21 -
.../html/form/AjaxDropDownChoicePanel.html | 24 -
.../markup/html/form/AjaxNumberFieldPanel.html | 22 -
.../markup/html/form/AjaxPalettePanel.html | 23 -
.../html/form/AjaxPasswordFieldPanel.html | 22 -
.../markup/html/form/AjaxTextFieldPanel.html | 23 -
.../markup/html/form/BinaryFieldPanel.html | 44 -
.../form/CheckBoxMultipleChoiceFieldPanel.html | 23 -
.../markup/html/form/DateTextFieldPanel.html | 22 -
.../markup/html/form/DateTimeFieldPanel.html | 21 -
.../html/form/DateTimeFieldPanel.properties | 17 -
.../html/form/DateTimeFieldPanel_it.properties | 17 -
.../form/DateTimeFieldPanel_pt_BR.properties | 17 -
.../wicket/markup/html/form/FieldPanel.html | 34 -
.../wicket/markup/html/form/LinkPanel.html | 23 -
.../markup/html/form/MappingPurposePanel.html | 31 -
.../markup/html/form/MultiFieldPanel.html | 35 -
.../markup/html/form/MultiFieldPanel.properties | 22 -
.../html/form/MultiFieldPanel_it.properties | 22 -
.../html/form/MultiFieldPanel_pt_BR.properties | 22 -
.../wicket/markup/html/form/NonI18nPalette.html | 69 -
.../markup/html/form/SpinnerFieldPanel.html | 29 -
.../form/preview/AbstractBinaryPreviewer.html | 24 -
.../html/form/preview/BinaryCertPreviewer.html | 24 -
.../html/form/preview/BinaryImagePreviewer.html | 23 -
.../wicket/markup/html/tree/TreeRolePanel.html | 23 -
.../oryx.debug.js-tokenValueMap.properties | 35 -
.../src/main/webapp/WEB-INF/glassfish-web.xml | 25 -
.../WEB-INF/jboss-deployment-structure.xml | 37 -
console/src/main/webapp/WEB-INF/web.xml | 66 -
console/src/main/webapp/WEB-INF/weblogic.xml | 35 -
console/src/main/webapp/css/bulk.css | 97 -
console/src/main/webapp/css/fieldstyle.css | 191 --
.../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 251 -> 0 bytes
.../css/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 1310 -> 0 bytes
.../ui-bg_flat_0_aaaaaa_40x100_greennotused.png | Bin 1312 -> 0 bytes
.../css/images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 120 -> 0 bytes
.../css/images/ui-bg_glass_65_ffffff_1x400.png | Bin 105 -> 0 bytes
.../css/images/ui-bg_glass_75_dadada_1x400.png | Bin 111 -> 0 bytes
.../css/images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 110 -> 0 bytes
.../css/images/ui-bg_glass_95_fef1ec_1x400.png | Bin 119 -> 0 bytes
.../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 1244 -> 0 bytes
...ghlight-soft_75_cccccc_1x100_greynotused.png | Bin 101 -> 0 bytes
...ui-bg_highlight-soft_75_cccccc_1x100_red.png | Bin 257 -> 0 bytes
.../css/images/ui-icons_222222_256x240.png | Bin 4369 -> 0 bytes
.../css/images/ui-icons_2e83ff_256x240.png | Bin 4369 -> 0 bytes
.../css/images/ui-icons_454545_256x240.png | Bin 4369 -> 0 bytes
.../css/images/ui-icons_888888_256x240.png | Bin 4369 -> 0 bytes
.../css/images/ui-icons_cd0a0a_256x240.png | Bin 4369 -> 0 bytes
console/src/main/webapp/css/style.css | 550 ----
.../src/main/webapp/img/actions/assign-icon.png | Bin 566 -> 0 bytes
.../src/main/webapp/img/actions/both-icon.png | Bin 611 -> 0 bytes
console/src/main/webapp/img/actions/bulk.png | Bin 1182 -> 0 bytes
console/src/main/webapp/img/actions/claim.png | Bin 509 -> 0 bytes
console/src/main/webapp/img/actions/create.png | Bin 360 -> 0 bytes
console/src/main/webapp/img/actions/delete.png | Bin 530 -> 0 bytes
.../webapp/img/actions/deprovision-icon.png | Bin 210 -> 0 bytes
console/src/main/webapp/img/actions/dryrun.png | Bin 891 -> 0 bytes
console/src/main/webapp/img/actions/edit.png | Bin 455 -> 0 bytes
console/src/main/webapp/img/actions/enable.png | Bin 715 -> 0 bytes
console/src/main/webapp/img/actions/execute.png | Bin 695 -> 0 bytes
console/src/main/webapp/img/actions/export.png | Bin 474 -> 0 bytes
.../src/main/webapp/img/actions/link-icon.png | Bin 447 -> 0 bytes
.../src/main/webapp/img/actions/manage-icon.png | Bin 611 -> 0 bytes
.../src/main/webapp/img/actions/none-icon.png | Bin 521 -> 0 bytes
.../webapp/img/actions/propagation-icon.png | Bin 362 -> 0 bytes
.../main/webapp/img/actions/provision-icon.png | Bin 360 -> 0 bytes
.../src/main/webapp/img/actions/reactivate.png | Bin 496 -> 0 bytes
console/src/main/webapp/img/actions/reload.png | Bin 491 -> 0 bytes
console/src/main/webapp/img/actions/reset.png | Bin 491 -> 0 bytes
.../main/webapp/img/actions/resources-icon.png | Bin 634 -> 0 bytes
.../src/main/webapp/img/actions/roles-icon.png | Bin 391 -> 0 bytes
console/src/main/webapp/img/actions/search.png | Bin 763 -> 0 bytes
console/src/main/webapp/img/actions/select.png | Bin 279 -> 0 bytes
.../main/webapp/img/actions/settings-icon.png | Bin 153 -> 0 bytes
console/src/main/webapp/img/actions/suspend.png | Bin 504 -> 0 bytes
.../webapp/img/actions/synchronization-icon.png | Bin 406 -> 0 bytes
.../main/webapp/img/actions/unassign-icon.png | Bin 573 -> 0 bytes
.../src/main/webapp/img/actions/unlink-icon.png | Bin 509 -> 0 bytes
.../main/webapp/img/actions/user_template.png | Bin 597 -> 0 bytes
.../src/main/webapp/img/actions/users-icon.png | Bin 754 -> 0 bytes
console/src/main/webapp/img/add.png | Bin 814 -> 0 bytes
console/src/main/webapp/img/addAll.png | Bin 1037 -> 0 bytes
console/src/main/webapp/img/busy.gif | Bin 2834 -> 0 bytes
console/src/main/webapp/img/db_export.png | Bin 16675 -> 0 bytes
console/src/main/webapp/img/disable.png | Bin 1001 -> 0 bytes
console/src/main/webapp/img/down-icon.png | Bin 418 -> 0 bytes
console/src/main/webapp/img/favicon.ico | Bin 1406 -> 0 bytes
console/src/main/webapp/img/file-download.png | Bin 967 -> 0 bytes
console/src/main/webapp/img/file-upload.png | Bin 949 -> 0 bytes
console/src/main/webapp/img/help.png | Bin 808 -> 0 bytes
console/src/main/webapp/img/info.png | Bin 575 -> 0 bytes
console/src/main/webapp/img/left-icon.png | Bin 451 -> 0 bytes
console/src/main/webapp/img/loading.gif | Bin 2530 -> 0 bytes
console/src/main/webapp/img/logo.png | Bin 8913 -> 0 bytes
.../src/main/webapp/img/menu/configuration.png | Bin 5670 -> 0 bytes
console/src/main/webapp/img/menu/connectors.png | Bin 5772 -> 0 bytes
console/src/main/webapp/img/menu/logout.png | Bin 5460 -> 0 bytes
.../webapp/img/menu/notsel/configuration.png | Bin 5518 -> 0 bytes
.../main/webapp/img/menu/notsel/connectors.png | Bin 6401 -> 0 bytes
.../src/main/webapp/img/menu/notsel/logout.png | Bin 5720 -> 0 bytes
.../src/main/webapp/img/menu/notsel/reports.png | Bin 6074 -> 0 bytes
.../main/webapp/img/menu/notsel/resources.png | Bin 6401 -> 0 bytes
.../src/main/webapp/img/menu/notsel/roles.png | Bin 5175 -> 0 bytes
.../src/main/webapp/img/menu/notsel/schema.png | Bin 5544 -> 0 bytes
.../src/main/webapp/img/menu/notsel/sf_body.png | Bin 303 -> 0 bytes
.../src/main/webapp/img/menu/notsel/tasks.png | Bin 7461 -> 0 bytes
.../src/main/webapp/img/menu/notsel/todo.png | Bin 6996 -> 0 bytes
.../src/main/webapp/img/menu/notsel/users.png | Bin 7637 -> 0 bytes
console/src/main/webapp/img/menu/reports.png | Bin 5553 -> 0 bytes
console/src/main/webapp/img/menu/resources.png | Bin 5772 -> 0 bytes
console/src/main/webapp/img/menu/roles.png | Bin 5020 -> 0 bytes
console/src/main/webapp/img/menu/schema.png | Bin 5217 -> 0 bytes
console/src/main/webapp/img/menu/tasks.png | Bin 5742 -> 0 bytes
console/src/main/webapp/img/menu/todo.png | Bin 5722 -> 0 bytes
console/src/main/webapp/img/menu/users.png | Bin 6006 -> 0 bytes
console/src/main/webapp/img/minus-icon.png | Bin 210 -> 0 bytes
console/src/main/webapp/img/modeler.png | Bin 3118 -> 0 bytes
console/src/main/webapp/img/moveDown.png | Bin 833 -> 0 bytes
console/src/main/webapp/img/moveUp.png | Bin 834 -> 0 bytes
console/src/main/webapp/img/ok.png | Bin 497 -> 0 bytes
console/src/main/webapp/img/ping.png | Bin 22945 -> 0 bytes
console/src/main/webapp/img/plus-icon.png | Bin 360 -> 0 bytes
console/src/main/webapp/img/reload_30.png | Bin 611 -> 0 bytes
console/src/main/webapp/img/remove.png | Bin 825 -> 0 bytes
console/src/main/webapp/img/removeAll.png | Bin 1034 -> 0 bytes
console/src/main/webapp/img/right-icon.png | Bin 411 -> 0 bytes
console/src/main/webapp/img/search.png | Bin 763 -> 0 bytes
console/src/main/webapp/img/sf_testa.png | Bin 293 -> 0 bytes
console/src/main/webapp/img/success.png | Bin 1696 -> 0 bytes
console/src/main/webapp/img/tab ok.png | Bin 2330 -> 0 bytes
console/src/main/webapp/img/tab old.png | Bin 734 -> 0 bytes
console/src/main/webapp/img/tab.png | Bin 2098 -> 0 bytes
console/src/main/webapp/img/up-icon.png | Bin 421 -> 0 bytes
console/src/main/webapp/img/warning.png | Bin 1107 -> 0 bytes
console/src/main/webapp/img/xml.png | Bin 2741 -> 0 bytes
.../apache/syncope/console/AbstractTest.java | 81 -
.../syncope/console/AccessTestITCase.java | 80 -
.../console/ConfigurationTestITCase.java | 400 ---
.../syncope/console/ConnInstanceTestITCase.java | 234 --
.../syncope/console/EditProfileTestITCase.java | 91 -
.../syncope/console/ReportTestITCase.java | 113 -
.../syncope/console/ResourceTestITCase.java | 142 -
.../apache/syncope/console/RoleTestITCase.java | 210 --
.../syncope/console/SchemaTestITCase.java | 70 -
.../apache/syncope/console/TaskTestITCase.java | 118 -
.../apache/syncope/console/UserTestITCase.java | 184 --
console/src/test/resources/console.properties | 21 -
console/src/test/resources/web.xml | 66 -
core-upgrader/pom.xml | 82 -
.../syncope/upgrader/ContentUpgrader.java | 751 ------
.../upgrader/util/GuardedStringConverter.java | 128 -
.../syncope/upgrader/util/SyncopeDefParams.java | 51 -
.../syncope/upgrader/util/XMLDeserializer.java | 51 -
.../src/main/resources/mysql-upgrade.sql | 104 -
.../src/main/resources/postgresql-upgrade.sql | 101 -
.../src/main/resources/upgradeContext.xml | 35 -
core/LICENSE | 1053 --------
core/NOTICE | 131 -
core/logic/pom.xml | 181 ++
.../syncope/core/logic/AbstractLogic.java | 58 +
.../core/logic/AbstractResourceAssociator.java | 37 +
.../core/logic/AbstractSubjectLogic.java | 43 +
.../core/logic/AbstractTransactionalLogic.java | 31 +
.../syncope/core/logic/ConfigurationLogic.java | 112 +
.../syncope/core/logic/ConnectorLogic.java | 341 +++
.../syncope/core/logic/EntitlementLogic.java | 58 +
.../apache/syncope/core/logic/LoggerLogic.java | 307 +++
.../core/logic/LogicInvocationHandler.java | 108 +
.../syncope/core/logic/NotificationLogic.java | 127 +
.../apache/syncope/core/logic/PolicyLogic.java | 187 ++
.../apache/syncope/core/logic/ReportLogic.java | 391 +++
.../syncope/core/logic/ResourceLogic.java | 273 ++
.../apache/syncope/core/logic/RoleLogic.java | 405 +++
.../apache/syncope/core/logic/SchemaLogic.java | 325 +++
.../core/logic/SecurityQuestionLogic.java | 150 ++
.../apache/syncope/core/logic/SyncopeLogic.java | 168 ++
.../apache/syncope/core/logic/TaskLogic.java | 387 +++
.../logic/UnresolvedReferenceException.java | 35 +
.../apache/syncope/core/logic/UserLogic.java | 522 ++++
.../syncope/core/logic/UserWorkflowLogic.java | 131 +
.../syncope/core/logic/WorkflowLogic.java | 116 +
.../logic/audit/AuditConnectionFactory.java | 159 ++
.../init/ImplementationClassNamesLoader.java | 147 ++
.../core/logic/init/JobInstanceLoaderImpl.java | 271 ++
.../syncope/core/logic/init/LoggerLoader.java | 98 +
.../core/logic/init/LogicInitializer.java | 72 +
.../logic/notification/NotificationJob.java | 283 ++
.../core/logic/report/AbstractReportlet.java | 66 +
.../core/logic/report/ReportException.java | 32 +
.../syncope/core/logic/report/ReportJob.java | 203 ++
.../core/logic/report/ReportXMLConst.java | 44 +
.../syncope/core/logic/report/Reportlet.java | 47 +
.../core/logic/report/ReportletConfClass.java | 32 +
.../core/logic/report/RoleReportlet.java | 327 +++
.../core/logic/report/StaticReportlet.java | 120 +
.../core/logic/report/TextSerializer.java | 101 +
.../core/logic/report/UserReportlet.java | 359 +++
core/logic/src/main/resources/logic.properties | 18 +
core/logic/src/main/resources/logicContext.xml | 42 +
.../src/main/resources/report/report2csv.xsl | 36 +
.../src/main/resources/report/report2fo.xsl | 97 +
.../src/main/resources/report/report2html.xsl | 77 +
.../main/resources/report/roleReportlet2csv.xsl | 118 +
.../main/resources/report/roleReportlet2fo.xsl | 228 ++
.../resources/report/roleReportlet2html.xsl | 196 ++
.../resources/report/staticReportlet2csv.xsl | 81 +
.../resources/report/staticReportlet2fo.xsl | 84 +
.../resources/report/staticReportlet2html.xsl | 74 +
.../main/resources/report/userReportlet2csv.xsl | 119 +
.../main/resources/report/userReportlet2fo.xsl | 247 ++
.../resources/report/userReportlet2html.xsl | 219 ++
.../syncope/core/logic/NotificationTest.java | 644 +++++
core/logic/src/test/resources/logicTest.xml | 46 +
core/misc/pom.xml | 126 +
.../apache/syncope/core/misc/AuditManager.java | 109 +
.../syncope/core/misc/ConnObjectUtil.java | 767 ++++++
.../apache/syncope/core/misc/DataFormat.java | 117 +
.../apache/syncope/core/misc/ExceptionUtil.java | 47 +
.../apache/syncope/core/misc/MappingUtil.java | 738 ++++++
.../core/misc/jexl/ClassFreeUberspectImpl.java | 43 +
.../core/misc/jexl/EmptyClassLoader.java | 36 +
.../apache/syncope/core/misc/jexl/JexlUtil.java | 289 ++
.../core/misc/policy/AccountPolicyEnforcer.java | 102 +
.../misc/policy/AccountPolicyException.java | 32 +
.../InvalidPasswordPolicySpecException.java | 37 +
.../misc/policy/PasswordPolicyEnforcer.java | 197 ++
.../misc/policy/PasswordPolicyException.java | 32 +
.../misc/policy/PolicyEnforceException.java | 32 +
.../core/misc/policy/PolicyEnforcer.java | 30 +
.../core/misc/policy/PolicyEvaluator.java | 109 +
.../core/misc/policy/PolicyException.java | 32 +
.../syncope/core/misc/policy/PolicyPattern.java | 50 +
.../core/misc/search/SearchCondConverter.java | 50 +
.../core/misc/search/SearchCondVisitor.java | 203 ++
.../core/misc/security/AuthContextUtil.java | 74 +
.../syncope/core/misc/security/Encryptor.java | 256 ++
.../core/misc/security/PasswordGenerator.java | 321 +++
.../core/misc/security/SecureRandomUtil.java | 48 +
.../security/SyncopeAuthenticationProvider.java | 296 +++
.../security/SyncopeUserDetailsService.java | 102 +
.../security/UnauthorizedRoleException.java | 42 +
.../serialization/AttributeDeserializer.java | 84 +
.../misc/serialization/AttributeSerializer.java | 78 +
.../GuardedStringDeserializer.java | 94 +
.../serialization/GuardedStringSerializer.java | 90 +
.../core/misc/serialization/POJOHelper.java | 80 +
.../serialization/SyncTokenDeserializer.java | 65 +
.../misc/serialization/SyncTokenSerializer.java | 58 +
.../serialization/UnwrappedObjectMapper.java | 95 +
.../misc/spring/ApplicationContextProvider.java | 47 +
.../syncope/core/misc/spring/BeanUtils.java | 201 ++
.../misc/spring/ResourceWithFallbackLoader.java | 82 +
.../misc/src/main/resources/security.properties | 30 +
.../misc/src/main/resources/securityContext.xml | 68 +
.../misc/search/SearchCondConverterTest.java | 165 ++
.../core/misc/security/EncryptorTest.java | 58 +
.../misc/security/PasswordGeneratorTest.java | 124 +
core/persistence-api/pom.xml | 78 +
.../persistence/api/RoleEntitlementUtil.java | 88 +
.../core/persistence/api/SyncopeLoader.java | 35 +
.../validation/InvalidEntityException.java | 129 +
.../InvalidPlainAttrValueException.java | 43 +
.../validation/ParsingValidationException.java | 30 +
.../api/attrvalue/validation/Validator.java | 27 +
.../api/content/ContentExporter.java | 29 +
.../persistence/api/content/ContentLoader.java | 25 +
.../persistence/api/dao/AttrTemplateDAO.java | 34 +
.../core/persistence/api/dao/ConfDAO.java | 35 +
.../persistence/api/dao/ConnInstanceDAO.java | 34 +
.../syncope/core/persistence/api/dao/DAO.java | 32 +
.../core/persistence/api/dao/DerAttrDAO.java | 36 +
.../core/persistence/api/dao/DerSchemaDAO.java | 38 +
.../persistence/api/dao/DuplicateException.java | 35 +
.../persistence/api/dao/EntitlementDAO.java | 39 +
.../api/dao/ExternalResourceDAO.java | 47 +
.../core/persistence/api/dao/LoggerDAO.java | 37 +
.../core/persistence/api/dao/MembershipDAO.java | 41 +
.../persistence/api/dao/NotFoundException.java | 35 +
.../persistence/api/dao/NotificationDAO.java | 34 +
.../core/persistence/api/dao/PlainAttrDAO.java | 30 +
.../persistence/api/dao/PlainAttrValueDAO.java | 36 +
.../persistence/api/dao/PlainSchemaDAO.java | 38 +
.../core/persistence/api/dao/PolicyDAO.java | 48 +
.../core/persistence/api/dao/ReportDAO.java | 41 +
.../core/persistence/api/dao/ReportExecDAO.java | 41 +
.../core/persistence/api/dao/RoleDAO.java | 92 +
.../api/dao/SecurityQuestionDAO.java | 35 +
.../core/persistence/api/dao/SubjectDAO.java | 44 +
.../persistence/api/dao/SubjectSearchDAO.java | 86 +
.../core/persistence/api/dao/TaskDAO.java | 52 +
.../core/persistence/api/dao/TaskExecDAO.java | 44 +
.../core/persistence/api/dao/UserDAO.java | 68 +
.../core/persistence/api/dao/VirAttrDAO.java | 36 +
.../core/persistence/api/dao/VirSchemaDAO.java | 38 +
.../api/dao/search/AbstractSearchCond.java | 48 +
.../api/dao/search/AttributeCond.java | 84 +
.../api/dao/search/EntitlementCond.java | 39 +
.../api/dao/search/MembershipCond.java | 46 +
.../api/dao/search/OrderByClause.java | 69 +
.../api/dao/search/ResourceCond.java | 42 +
.../persistence/api/dao/search/SearchCond.java | 254 ++
.../persistence/api/dao/search/SubjectCond.java | 34 +
.../persistence/api/entity/AccountPolicy.java | 32 +
.../persistence/api/entity/AnnotatedEntity.java | 40 +
.../core/persistence/api/entity/Attr.java | 30 +
.../persistence/api/entity/AttrTemplate.java | 32 +
.../persistence/api/entity/Attributable.java | 48 +
.../api/entity/AttributableUtil.java | 91 +
.../api/entity/AttributableUtilFactory.java | 33 +
.../persistence/api/entity/ConnInstance.java | 71 +
.../persistence/api/entity/ConnPoolConf.java | 42 +
.../core/persistence/api/entity/DerAttr.java | 26 +
.../core/persistence/api/entity/DerSchema.java | 26 +
.../persistence/api/entity/Entitlement.java | 29 +
.../core/persistence/api/entity/Entity.java | 26 +
.../persistence/api/entity/EntityFactory.java | 28 +
.../core/persistence/api/entity/Exec.java | 45 +
.../api/entity/ExternalResource.java | 111 +
.../core/persistence/api/entity/Logger.java | 35 +
.../core/persistence/api/entity/Mapping.java | 42 +
.../persistence/api/entity/MappingItem.java | 57 +
.../persistence/api/entity/Notification.java | 82 +
.../persistence/api/entity/PasswordPolicy.java | 23 +
.../core/persistence/api/entity/PlainAttr.java | 37 +
.../api/entity/PlainAttrUniqueValue.java | 26 +
.../persistence/api/entity/PlainAttrValue.java | 62 +
.../persistence/api/entity/PlainSchema.java | 67 +
.../core/persistence/api/entity/Policy.java | 35 +
.../core/persistence/api/entity/PushPolicy.java | 23 +
.../core/persistence/api/entity/Report.java | 45 +
.../core/persistence/api/entity/ReportExec.java | 34 +
.../api/entity/ReportletConfInstance.java | 33 +
.../core/persistence/api/entity/Schema.java | 37 +
.../core/persistence/api/entity/Subject.java | 32 +
.../core/persistence/api/entity/SyncPolicy.java | 23 +
.../core/persistence/api/entity/VirAttr.java | 30 +
.../core/persistence/api/entity/VirSchema.java | 24 +
.../persistence/api/entity/conf/CPlainAttr.java | 39 +
.../api/entity/conf/CPlainAttrUniqueValue.java | 31 +
.../api/entity/conf/CPlainAttrValue.java | 28 +
.../api/entity/conf/CPlainSchema.java | 25 +
.../core/persistence/api/entity/conf/Conf.java | 39 +
.../api/entity/membership/MDerAttr.java | 34 +
.../api/entity/membership/MDerAttrTemplate.java | 25 +
.../api/entity/membership/MDerSchema.java | 25 +
.../api/entity/membership/MPlainAttr.java | 42 +
.../entity/membership/MPlainAttrTemplate.java | 25 +
.../membership/MPlainAttrUniqueValue.java | 31 +
.../api/entity/membership/MPlainAttrValue.java | 28 +
.../api/entity/membership/MPlainSchema.java | 25 +
.../api/entity/membership/MVirAttr.java | 34 +
.../api/entity/membership/MVirAttrTemplate.java | 25 +
.../api/entity/membership/MVirSchema.java | 25 +
.../api/entity/membership/Membership.java | 53 +
.../persistence/api/entity/role/RDerAttr.java | 34 +
.../api/entity/role/RDerAttrTemplate.java | 25 +
.../persistence/api/entity/role/RDerSchema.java | 25 +
.../persistence/api/entity/role/RMapping.java | 25 +
.../api/entity/role/RMappingItem.java | 29 +
.../persistence/api/entity/role/RPlainAttr.java | 42 +
.../api/entity/role/RPlainAttrTemplate.java | 25 +
.../api/entity/role/RPlainAttrUniqueValue.java | 31 +
.../api/entity/role/RPlainAttrValue.java | 28 +
.../api/entity/role/RPlainSchema.java | 25 +
.../persistence/api/entity/role/RVirAttr.java | 34 +
.../api/entity/role/RVirAttrTemplate.java | 25 +
.../persistence/api/entity/role/RVirSchema.java | 25 +
.../core/persistence/api/entity/role/Role.java | 168 ++
.../api/entity/task/NotificationTask.java | 55 +
.../api/entity/task/PropagationTask.java | 65 +
.../api/entity/task/ProvisioningTask.java | 58 +
.../persistence/api/entity/task/PushTask.java | 30 +
.../persistence/api/entity/task/SchedTask.java | 38 +
.../persistence/api/entity/task/SyncTask.java | 37 +
.../core/persistence/api/entity/task/Task.java | 34 +
.../persistence/api/entity/task/TaskExec.java | 28 +
.../persistence/api/entity/task/TaskUtil.java | 36 +
.../api/entity/task/TaskUtilFactory.java | 33 +
.../api/entity/user/SecurityQuestion.java | 28 +
.../persistence/api/entity/user/UDerAttr.java | 31 +
.../persistence/api/entity/user/UDerSchema.java | 25 +
.../persistence/api/entity/user/UMapping.java | 28 +
.../api/entity/user/UMappingItem.java | 29 +
.../persistence/api/entity/user/UPlainAttr.java | 38 +
.../api/entity/user/UPlainAttrUniqueValue.java | 31 +
.../api/entity/user/UPlainAttrValue.java | 28 +
.../api/entity/user/UPlainSchema.java | 25 +
.../persistence/api/entity/user/UVirAttr.java | 31 +
.../persistence/api/entity/user/UVirSchema.java | 25 +
.../core/persistence/api/entity/user/User.java | 150 ++
core/persistence-jpa/pom.xml | 222 ++
.../attrvalue/validation/AbstractValidator.java | 54 +
.../validation/AlwaysTrueValidator.java | 40 +
.../attrvalue/validation/BasicValidator.java | 54 +
.../validation/EmailAddressValidator.java | 42 +
.../jpa/content/AbstractContentDealer.java | 88 +
.../jpa/content/ContentLoaderHandler.java | 201 ++
.../jpa/content/MultiParentNode.java | 106 +
.../jpa/content/MultiParentNodeOp.java | 49 +
.../jpa/content/XMLContentExporter.java | 398 +++
.../jpa/content/XMLContentLoader.java | 94 +
.../core/persistence/jpa/dao/AbstractDAO.java | 117 +
.../persistence/jpa/dao/AbstractSubjectDAO.java | 347 +++
.../persistence/jpa/dao/JPAAttrTemplateDAO.java | 107 +
.../core/persistence/jpa/dao/JPAConfDAO.java | 109 +
.../persistence/jpa/dao/JPAConnInstanceDAO.java | 90 +
.../core/persistence/jpa/dao/JPADerAttrDAO.java | 86 +
.../persistence/jpa/dao/JPADerSchemaDAO.java | 132 +
.../persistence/jpa/dao/JPAEntitlementDAO.java | 88 +
.../jpa/dao/JPAExternalResourceDAO.java | 254 ++
.../core/persistence/jpa/dao/JPALoggerDAO.java | 69 +
.../persistence/jpa/dao/JPAMembershipDAO.java | 103 +
.../persistence/jpa/dao/JPANotificationDAO.java | 53 +
.../persistence/jpa/dao/JPAPlainAttrDAO.java | 76 +
.../jpa/dao/JPAPlainAttrValueDAO.java | 104 +
.../persistence/jpa/dao/JPAPlainSchemaDAO.java | 141 +
.../core/persistence/jpa/dao/JPAPolicyDAO.java | 150 ++
.../core/persistence/jpa/dao/JPAReportDAO.java | 90 +
.../persistence/jpa/dao/JPAReportExecDAO.java | 101 +
.../core/persistence/jpa/dao/JPARoleDAO.java | 584 +++++
.../jpa/dao/JPASecurityQuestionDAO.java | 71 +
.../jpa/dao/JPASubjectSearchDAO.java | 736 ++++++
.../core/persistence/jpa/dao/JPATaskDAO.java | 185 ++
.../persistence/jpa/dao/JPATaskExecDAO.java | 118 +
.../core/persistence/jpa/dao/JPAUserDAO.java | 287 ++
.../core/persistence/jpa/dao/JPAVirAttrDAO.java | 86 +
.../persistence/jpa/dao/JPAVirSchemaDAO.java | 131 +
.../persistence/jpa/dao/OrderBySupport.java | 47 +
.../core/persistence/jpa/dao/SearchSupport.java | 132 +
.../jpa/entity/AbstractAnnotatedEntity.java | 113 +
.../jpa/entity/AbstractAttrTemplate.java | 28 +
.../jpa/entity/AbstractAttributable.java | 106 +
.../persistence/jpa/entity/AbstractDerAttr.java | 52 +
.../jpa/entity/AbstractDerAttrTemplate.java | 41 +
.../jpa/entity/AbstractDerSchema.java | 85 +
.../persistence/jpa/entity/AbstractEntity.java | 111 +
.../persistence/jpa/entity/AbstractExec.java | 114 +
.../persistence/jpa/entity/AbstractMapping.java | 76 +
.../jpa/entity/AbstractMappingItem.java | 190 ++
.../jpa/entity/AbstractPlainAttr.java | 81 +
.../jpa/entity/AbstractPlainAttrTemplate.java | 27 +
.../jpa/entity/AbstractPlainAttrValue.java | 282 ++
.../jpa/entity/AbstractPlainSchema.java | 272 ++
.../persistence/jpa/entity/AbstractSubject.java | 64 +
.../persistence/jpa/entity/AbstractVirAttr.java | 62 +
.../jpa/entity/AbstractVirAttrTemplate.java | 41 +
.../jpa/entity/AbstractVirSchema.java | 89 +
.../jpa/entity/AnnotatedEntityListener.java | 54 +
.../jpa/entity/JPAAccountPolicy.java | 90 +
.../jpa/entity/JPAAttributableUtil.java | 879 +++++++
.../persistence/jpa/entity/JPAConnInstance.java | 268 ++
.../persistence/jpa/entity/JPAConnPoolConf.java | 107 +
.../persistence/jpa/entity/JPAEntitlement.java | 62 +
.../jpa/entity/JPAEntityFactory.java | 290 ++
.../jpa/entity/JPAExternalResource.java | 426 +++
.../core/persistence/jpa/entity/JPALogger.java | 80 +
.../persistence/jpa/entity/JPANotification.java | 262 ++
.../jpa/entity/JPAPasswordPolicy.java | 43 +
.../core/persistence/jpa/entity/JPAPolicy.java | 90 +
.../persistence/jpa/entity/JPAPushPolicy.java | 42 +
.../core/persistence/jpa/entity/JPAReport.java | 148 ++
.../persistence/jpa/entity/JPAReportExec.java | 87 +
.../jpa/entity/JPAReportletConfInstance.java | 77 +
.../jpa/entity/JPASecurityQuestion.java | 56 +
.../persistence/jpa/entity/JPASyncPolicy.java | 43 +
.../jpa/entity/JPAttributableUtilFactory.java | 85 +
.../jpa/entity/conf/JPACPlainAttr.java | 150 ++
.../entity/conf/JPACPlainAttrUniqueValue.java | 78 +
.../jpa/entity/conf/JPACPlainAttrValue.java | 64 +
.../jpa/entity/conf/JPACPlainSchema.java | 36 +
.../persistence/jpa/entity/conf/JPAConf.java | 116 +
.../jpa/entity/membership/JPAMDerAttr.java | 82 +
.../entity/membership/JPAMDerAttrTemplate.java | 67 +
.../jpa/entity/membership/JPAMDerSchema.java | 34 +
.../jpa/entity/membership/JPAMPlainAttr.java | 141 +
.../membership/JPAMPlainAttrTemplate.java | 77 +
.../membership/JPAMPlainAttrUniqueValue.java | 78 +
.../entity/membership/JPAMPlainAttrValue.java | 64 +
.../jpa/entity/membership/JPAMPlainSchema.java | 36 +
.../jpa/entity/membership/JPAMVirAttr.java | 81 +
.../entity/membership/JPAMVirAttrTemplate.java | 67 +
.../jpa/entity/membership/JPAMVirSchema.java | 36 +
.../jpa/entity/membership/JPAMembership.java | 195 ++
.../jpa/entity/role/JPARDerAttr.java | 82 +
.../jpa/entity/role/JPARDerAttrTemplate.java | 66 +
.../jpa/entity/role/JPARDerSchema.java | 34 +
.../jpa/entity/role/JPARMapping.java | 103 +
.../jpa/entity/role/JPARMappingItem.java | 58 +
.../jpa/entity/role/JPARPlainAttr.java | 140 +
.../jpa/entity/role/JPARPlainAttrTemplate.java | 75 +
.../entity/role/JPARPlainAttrUniqueValue.java | 78 +
.../jpa/entity/role/JPARPlainAttrValue.java | 64 +
.../jpa/entity/role/JPARPlainSchema.java | 36 +
.../jpa/entity/role/JPARVirAttr.java | 82 +
.../jpa/entity/role/JPARVirAttrTemplate.java | 66 +
.../jpa/entity/role/JPARVirSchema.java | 36 +
.../persistence/jpa/entity/role/JPARole.java | 593 +++++
.../entity/task/AbstractProvisioningTask.java | 168 ++
.../jpa/entity/task/JPANotificationTask.java | 160 ++
.../jpa/entity/task/JPAPropagationTask.java | 195 ++
.../jpa/entity/task/JPAPushTask.java | 82 +
.../jpa/entity/task/JPASchedTask.java | 89 +
.../jpa/entity/task/JPASyncTask.java | 110 +
.../persistence/jpa/entity/task/JPATask.java | 96 +
.../jpa/entity/task/JPATaskExec.java | 82 +
.../jpa/entity/task/JPATaskUtil.java | 152 ++
.../jpa/entity/task/JPATaskUtilFactory.java | 91 +
.../jpa/entity/user/JPAUDerAttr.java | 67 +
.../jpa/entity/user/JPAUDerSchema.java | 34 +
.../jpa/entity/user/JPAUMapping.java | 125 +
.../jpa/entity/user/JPAUMappingItem.java | 58 +
.../jpa/entity/user/JPAUPlainAttr.java | 147 ++
.../entity/user/JPAUPlainAttrUniqueValue.java | 79 +
.../jpa/entity/user/JPAUPlainAttrValue.java | 64 +
.../jpa/entity/user/JPAUPlainSchema.java | 36 +
.../jpa/entity/user/JPAUVirAttr.java | 67 +
.../jpa/entity/user/JPAUVirSchema.java | 36 +
.../persistence/jpa/entity/user/JPAUser.java | 538 ++++
...ltiJarAwarePersistenceUnitPostProcessor.java | 49 +
.../validation/entity/AbstractValidator.java | 46 +
.../validation/entity/ConnInstanceCheck.java | 41 +
.../entity/ConnInstanceValidator.java | 64 +
.../entity/EntityValidationListener.java | 77 +
.../entity/ExternalResourceCheck.java | 41 +
.../entity/ExternalResourceValidator.java | 130 +
.../validation/entity/NotificationCheck.java | 41 +
.../entity/NotificationValidator.java | 59 +
.../jpa/validation/entity/PlainAttrCheck.java | 41 +
.../validation/entity/PlainAttrValidator.java | 59 +
.../validation/entity/PlainAttrValueCheck.java | 41 +
.../entity/PlainAttrValueValidator.java | 98 +
.../jpa/validation/entity/PlainSchemaCheck.java | 41 +
.../validation/entity/PlainSchemaValidator.java | 61 +
.../jpa/validation/entity/PolicyCheck.java | 41 +
.../jpa/validation/entity/PolicyValidator.java | 59 +
.../validation/entity/PropagationTaskCheck.java | 41 +
.../entity/PropagationTaskValidator.java | 65 +
.../entity/ProvisioningTaskCheck.java | 41 +
.../entity/ProvisioningTaskValidator.java | 84 +
.../jpa/validation/entity/ReportCheck.java | 41 +
.../jpa/validation/entity/ReportValidator.java | 67 +
.../jpa/validation/entity/RoleCheck.java | 41 +
.../jpa/validation/entity/RoleValidator.java | 44 +
.../jpa/validation/entity/SchedTaskCheck.java | 41 +
.../validation/entity/SchedTaskValidator.java | 68 +
.../jpa/validation/entity/SchemaNameCheck.java | 41 +
.../validation/entity/SchemaNameValidator.java | 133 +
.../jpa/validation/entity/UserCheck.java | 42 +
.../jpa/validation/entity/UserValidator.java | 194 ++
.../resources/META-INF/spring-orm-oracle.xml | 323 +++
.../resources/META-INF/spring-orm-sqlserver.xml | 323 +++
.../src/main/resources/META-INF/spring-orm.xml | 371 +++
.../src/main/resources/audit/audit.sql | 24 +
.../main/resources/audit/audit_mysql_innodb.sql | 24 +
.../src/main/resources/audit/audit_oracle.sql | 38 +
.../main/resources/audit/audit_sqlserver.sql | 28 +
.../src/main/resources/content.xml | 183 ++
.../src/main/resources/indexes.xml | 40 +
.../src/main/resources/persistence.properties | 29 +
.../src/main/resources/persistenceContext.xml | 126 +
.../resources/persistenceContextEMFactory.xml | 67 +
.../src/main/resources/quartz/tables_h2.sql | 266 ++
.../main/resources/quartz/tables_mariadb.sql | 206 ++
.../src/main/resources/quartz/tables_mysql.sql | 206 ++
.../resources/quartz/tables_mysql_innodb.sql | 221 ++
.../src/main/resources/quartz/tables_oracle.sql | 208 ++
.../main/resources/quartz/tables_postgres.sql | 204 ++
.../main/resources/quartz/tables_sqlServer.sql | 296 +++
.../src/main/resources/views.xml | 149 ++
.../core/persistence/jpa/AbstractTest.java | 38 +
.../persistence/jpa/DummyConnectorRegistry.java | 47 +
.../core/persistence/jpa/TestInitializer.java | 37 +
.../core/persistence/jpa/entity/AttrTest.java | 235 ++
.../jpa/entity/AttributableSearchTest.java | 494 ++++
.../core/persistence/jpa/entity/ConfTest.java | 107 +
.../jpa/entity/ConnInstanceTest.java | 145 +
.../persistence/jpa/entity/DerAttrTest.java | 272 ++
.../persistence/jpa/entity/DerSchemaTest.java | 103 +
.../persistence/jpa/entity/EntitlementTest.java | 72 +
.../persistence/jpa/entity/MembershipTest.java | 84 +
.../jpa/entity/NotificationTest.java | 132 +
.../persistence/jpa/entity/PlainSchemaTest.java | 160 ++
.../core/persistence/jpa/entity/PolicyTest.java | 152 ++
.../core/persistence/jpa/entity/ReportTest.java | 83 +
.../persistence/jpa/entity/ResourceTest.java | 266 ++
.../core/persistence/jpa/entity/RoleTest.java | 142 +
.../jpa/entity/SecurityQuestionTest.java | 68 +
.../persistence/jpa/entity/TaskExecTest.java | 94 +
.../core/persistence/jpa/entity/TaskTest.java | 117 +
.../core/persistence/jpa/entity/UserTest.java | 250 ++
.../persistence/jpa/entity/VirAttrTest.java | 142 +
.../persistence/jpa/entity/VirSchemaTest.java | 102 +
.../persistence/jpa/relationship/AttrTest.java | 191 ++
.../relationship/AttributableSearchTest.java | 76 +
.../jpa/relationship/ConnInstanceTest.java | 103 +
.../jpa/relationship/DerSchemaTest.java | 58 +
.../jpa/relationship/EntitlementTest.java | 57 +
.../jpa/relationship/MembershipTest.java | 81 +
.../jpa/relationship/PlainSchemaTest.java | 157 ++
.../jpa/relationship/ReportTest.java | 120 +
.../jpa/relationship/ResourceTest.java | 298 +++
.../persistence/jpa/relationship/RoleTest.java | 145 +
.../jpa/relationship/SecurityQuestionTest.java | 61 +
.../persistence/jpa/relationship/TaskTest.java | 291 +++
.../persistence/jpa/relationship/UserTest.java | 72 +
.../resources/META-INF/persistence-enhance.xml | 31 +
.../src/test/resources/content.xml | 1125 ++++++++
.../src/test/resources/persistence.properties | 30 +
.../src/test/resources/persistenceTest.xml | 53 +
.../src/test/resources/simplelogger.properties | 17 +
core/pom.xml | 1506 +----------
core/provisioning-api/pom.xml | 65 +
.../api/AttributableTransformer.java | 33 +
.../provisioning/api/ConnIdBundleManager.java | 48 +
.../core/provisioning/api/ConnPoolConfUtil.java | 69 +
.../core/provisioning/api/Connector.java | 216 ++
.../core/provisioning/api/ConnectorFactory.java | 65 +
.../provisioning/api/ConnectorRegistry.java | 53 +
.../provisioning/api/ProvisioningManager.java | 42 +
.../api/RoleProvisioningManager.java | 37 +
.../core/provisioning/api/TimeoutException.java | 42 +
.../syncope/core/provisioning/api/URIUtil.java | 61 +
.../api/UserProvisioningManager.java | 57 +
.../core/provisioning/api/UserSuspender.java | 26 +
.../core/provisioning/api/WorkflowResult.java | 87 +
.../provisioning/api/cache/VirAttrCache.java | 65 +
.../provisioning/api/cache/VirAttrCacheKey.java | 79 +
.../api/cache/VirAttrCacheValue.java | 86 +
.../api/data/ConfigurationDataBinder.java | 34 +
.../api/data/ConnInstanceDataBinder.java | 48 +
.../api/data/NotificationDataBinder.java | 32 +
.../provisioning/api/data/PolicyDataBinder.java | 36 +
.../provisioning/api/data/ReportDataBinder.java | 34 +
.../api/data/ResourceDataBinder.java | 39 +
.../provisioning/api/data/RoleDataBinder.java | 36 +
.../provisioning/api/data/SchemaDataBinder.java | 49 +
.../api/data/SecurityQuestionDataBinder.java | 32 +
.../provisioning/api/data/TaskDataBinder.java | 39 +
.../provisioning/api/data/UserDataBinder.java | 43 +
.../provisioning/api/job/JobInstanceLoader.java | 41 +
.../core/provisioning/api/job/JobNamer.java | 72 +
.../provisioning/api/job/ProvisioningJob.java | 28 +
.../core/provisioning/api/job/PushJob.java | 26 +
.../core/provisioning/api/job/SyncJob.java | 26 +
.../core/provisioning/api/job/TaskJob.java | 43 +
.../api/notification/NotificationManager.java | 65 +
.../api/propagation/PropagationActions.java | 30 +
.../api/propagation/PropagationException.java | 51 +
.../api/propagation/PropagationManager.java | 249 ++
.../api/propagation/PropagationReporter.java | 58 +
.../propagation/PropagationTaskExecutor.java | 77 +
.../api/sync/ProvisioningActions.java | 40 +
.../api/sync/ProvisioningProfile.java | 81 +
.../api/sync/ProvisioningResult.java | 140 +
.../core/provisioning/api/sync/PushActions.java | 137 +
.../api/sync/RolePushResultHandler.java | 23 +
.../api/sync/RoleSyncResultHandler.java | 26 +
.../core/provisioning/api/sync/SyncActions.java | 175 ++
.../api/sync/SyncCorrelationRule.java | 36 +
.../api/sync/SyncopePushResultHandler.java | 26 +
.../api/sync/SyncopeResultHandler.java | 29 +
.../api/sync/SyncopeSyncResultHandler.java | 29 +
.../api/sync/UserPushResultHandler.java | 23 +
.../api/sync/UserSyncResultHandler.java | 23 +
core/provisioning-java/pom.xml | 156 ++
.../provisioning/java/AsyncConnectorFacade.java | 204 ++
.../java/ConnIdBundleManagerImpl.java | 296 +++
.../provisioning/java/ConnectorFacadeProxy.java | 599 +++++
.../provisioning/java/ConnectorManager.java | 185 ++
.../java/DefaultAttributableTransformer.java | 39 +
.../java/DefaultRoleProvisioningManager.java | 223 ++
.../java/DefaultUserProvisioningManager.java | 370 +++
.../provisioning/java/UserSuspenderImpl.java | 51 +
.../core/provisioning/java/VirAttrHandler.java | 308 +++
.../java/cache/DisabledVirAttrCache.java | 52 +
.../java/cache/MemoryVirAttrCache.java | 151 ++
.../data/AbstractAttributableDataBinder.java | 779 ++++++
.../java/data/ConfigurationDataBinderImpl.java | 79 +
.../java/data/ConnInstanceDataBinderImpl.java | 245 ++
.../java/data/NotificationDataBinderImpl.java | 66 +
.../java/data/PolicyDataBinderImpl.java | 189 ++
.../java/data/ReportDataBinderImpl.java | 142 +
.../java/data/ResourceDataBinderImpl.java | 362 +++
.../java/data/RoleDataBinderImpl.java | 411 +++
.../java/data/SchemaDataBinderImpl.java | 170 ++
.../data/SecurityQuestionDataBinderImpl.java | 55 +
.../java/data/TaskDataBinderImpl.java | 343 +++
.../java/data/UserDataBinderImpl.java | 411 +++
.../provisioning/java/job/AbstractTaskJob.java | 183 ++
.../java/job/AbstractTransactionalTaskJob.java | 35 +
.../core/provisioning/java/job/SampleJob.java | 52 +
.../java/job/SpringBeanJobFactory.java | 97 +
.../notification/NotificationManagerImpl.java | 416 +++
.../SpringVelocityResourceLoader.java | 84 +
.../notification/VelocityEngineFactoryBean.java | 105 +
.../AbstractPropagationTaskExecutor.java | 540 ++++
.../DBPasswordPropagationActions.java | 120 +
.../propagation/DefaultPropagationActions.java | 38 +
.../propagation/DefaultPropagationReporter.java | 94 +
.../LDAPMembershipPropagationActions.java | 113 +
.../LDAPPasswordPropagationActions.java | 125 +
.../PriorityPropagationTaskExecutor.java | 119 +
.../propagation/PropagationManagerImpl.java | 772 ++++++
.../java/sync/AbstractProvisioningJob.java | 375 +++
.../java/sync/AbstractPushResultHandler.java | 374 +++
.../java/sync/AbstractSyncResultHandler.java | 617 +++++
.../java/sync/AbstractSyncopeResultHandler.java | 126 +
.../java/sync/DBPasswordSyncActions.java | 139 +
.../java/sync/DefaultPushActions.java | 88 +
.../java/sync/DefaultSyncActions.java | 115 +
.../java/sync/LDAPMembershipSyncActions.java | 309 +++
.../java/sync/LDAPPasswordSyncActions.java | 123 +
.../provisioning/java/sync/PushJobImpl.java | 176 ++
.../java/sync/RolePushResultHandlerImpl.java | 155 ++
.../java/sync/RoleSyncResultHandlerImpl.java | 169 ++
.../provisioning/java/sync/SyncJobImpl.java | 219 ++
.../provisioning/java/sync/SyncUtilities.java | 414 +++
.../java/sync/UserPushResultHandlerImpl.java | 160 ++
.../java/sync/UserSyncResultHandlerImpl.java | 148 ++
.../src/main/resources/connid.properties | 17 +
.../src/main/resources/mail.properties | 25 +
.../mailTemplates/confirmPasswordReset.html.vm | 26 +
.../mailTemplates/confirmPasswordReset.txt.vm | 20 +
.../main/resources/mailTemplates/optin.html.vm | 72 +
.../main/resources/mailTemplates/optin.txt.vm | 51 +
.../mailTemplates/requestPasswordReset.html.vm | 31 +
.../mailTemplates/requestPasswordReset.txt.vm | 26 +
.../src/main/resources/provisioning.properties | 18 +
.../src/main/resources/provisioningContext.xml | 110 +
.../core/provisioning/java/AbstractTest.java | 33 +
.../provisioning/java/ConnectorManagerTest.java | 73 +
.../java/data/ResourceDataBinderTest.java | 152 ++
.../src/test/resources/provisioningTest.xml | 46 +
core/rest-cxf/pom.xml | 140 +
.../rest/cxf/QueryResourceInfoComparator.java | 114 +
.../rest/cxf/RestServiceExceptionMapper.java | 285 ++
.../rest/cxf/ThreadLocalCleanupListener.java | 44 +
.../syncope/core/rest/cxf/WADLServlet.java | 96 +
.../rest/cxf/service/AbstractServiceImpl.java | 227 ++
.../core/rest/cxf/service/AddETagFilter.java | 50 +
.../cxf/service/ConfigurationServiceImpl.java | 77 +
.../rest/cxf/service/ConnectorServiceImpl.java | 133 +
.../cxf/service/EntitlementServiceImpl.java | 44 +
.../rest/cxf/service/LoggerServiceImpl.java | 114 +
.../cxf/service/NotificationServiceImpl.java | 66 +
.../rest/cxf/service/PolicyServiceImpl.java | 118 +
.../rest/cxf/service/ReportServiceImpl.java | 131 +
.../rest/cxf/service/ResourceServiceImpl.java | 139 +
.../core/rest/cxf/service/RoleServiceImpl.java | 227 ++
.../rest/cxf/service/SchemaServiceImpl.java | 75 +
.../service/SecurityQuestionServiceImpl.java | 73 +
.../rest/cxf/service/SyncopeServiceImpl.java | 38 +
.../core/rest/cxf/service/TaskServiceImpl.java | 139 +
.../rest/cxf/service/UserSelfServiceImpl.java | 93 +
.../core/rest/cxf/service/UserServiceImpl.java | 251 ++
.../cxf/service/UserWorkflowServiceImpl.java | 64 +
.../rest/cxf/service/WorkflowServiceImpl.java | 96 +
.../META-INF/cxf/org.apache.cxf.Logger | 1 +
.../main/resources/META-INF/web-fragment.xml | 89 +
.../src/main/resources/restCXFContext.xml | 122 +
.../src/main/resources/wadl2html/index.xsl | 484 ++++
.../src/main/resources/wadl2html/schema.xsl | 148 ++
.../core/audit/AuditConnectionFactory.java | 158 --
.../apache/syncope/core/audit/AuditManager.java | 107 -
.../core/cache/DisabledVirAttrCache.java | 50 -
.../syncope/core/cache/MemoryVirAttrCache.java | 148 --
.../apache/syncope/core/cache/VirAttrCache.java | 65 -
.../syncope/core/cache/VirAttrCacheKey.java | 79 -
.../syncope/core/cache/VirAttrCacheValue.java | 86 -
.../syncope/core/connid/ConnObjectUtil.java | 770 ------
.../syncope/core/connid/ConnPoolConfUtil.java | 70 -
.../syncope/core/connid/PasswordGenerator.java | 322 ---
.../syncope/core/init/CamelRouteLoader.java | 133 -
.../syncope/core/init/ConnectorManager.java | 150 --
.../init/ImplementationClassNamesLoader.java | 142 -
.../syncope/core/init/JobInstanceLoader.java | 286 --
.../apache/syncope/core/init/LoggerLoader.java | 88 -
.../core/init/SpringContextInitializer.java | 69 -
.../core/init/ThreadLocalCleanupListener.java | 44 -
.../core/init/WorkflowAdapterLoader.java | 88 -
.../core/notification/NotificationJob.java | 276 --
.../core/notification/NotificationManager.java | 434 ---
.../core/persistence/SQLSchemaGenerator.java | 186 --
.../core/persistence/SysInfoListener.java | 54 -
.../core/persistence/beans/AbstractAttr.java | 92 -
.../persistence/beans/AbstractAttrTemplate.java | 47 -
.../beans/AbstractAttrUniqueValue.java | 28 -
.../persistence/beans/AbstractAttrValue.java | 282 --
.../persistence/beans/AbstractAttributable.java | 131 -
.../persistence/beans/AbstractBaseBean.java | 110 -
.../core/persistence/beans/AbstractDerAttr.java | 62 -
.../persistence/beans/AbstractDerSchema.java | 76 -
.../core/persistence/beans/AbstractExec.java | 102 -
.../core/persistence/beans/AbstractMapping.java | 89 -
.../persistence/beans/AbstractMappingItem.java | 181 --
.../persistence/beans/AbstractNormalSchema.java | 245 --
.../core/persistence/beans/AbstractSchema.java | 28 -
.../core/persistence/beans/AbstractSubject.java | 60 -
.../persistence/beans/AbstractSyncTask.java | 155 --
.../core/persistence/beans/AbstractSysInfo.java | 105 -
.../core/persistence/beans/AbstractVirAttr.java | 70 -
.../persistence/beans/AbstractVirSchema.java | 81 -
.../core/persistence/beans/AccountPolicy.java | 89 -
.../core/persistence/beans/CamelRoute.java | 80 -
.../core/persistence/beans/ConnInstance.java | 243 --
.../core/persistence/beans/ConnPoolConf.java | 78 -
.../core/persistence/beans/Entitlement.java | 53 -
.../persistence/beans/ExternalResource.java | 364 ---
.../core/persistence/beans/Notification.java | 233 --
.../persistence/beans/NotificationTask.java | 146 --
.../core/persistence/beans/PasswordPolicy.java | 41 -
.../syncope/core/persistence/beans/Policy.java | 78 -
.../core/persistence/beans/PropagationTask.java | 162 --
.../core/persistence/beans/PushPolicy.java | 41 -
.../core/persistence/beans/PushTask.java | 55 -
.../syncope/core/persistence/beans/Report.java | 145 -
.../core/persistence/beans/ReportExec.java | 74 -
.../beans/ReportletConfInstance.java | 66 -
.../core/persistence/beans/SchedTask.java | 73 -
.../persistence/beans/SecurityQuestion.java | 48 -
.../core/persistence/beans/SyncPolicy.java | 40 -
.../core/persistence/beans/SyncTask.java | 81 -
.../core/persistence/beans/SyncopeLogger.java | 70 -
.../syncope/core/persistence/beans/Task.java | 76 -
.../core/persistence/beans/TaskExec.java | 71 -
.../core/persistence/beans/conf/CAttr.java | 153 --
.../beans/conf/CAttrUniqueValue.java | 77 -
.../core/persistence/beans/conf/CAttrValue.java | 62 -
.../core/persistence/beans/conf/CSchema.java | 31 -
.../persistence/beans/conf/SyncopeConf.java | 133 -
.../persistence/beans/membership/MAttr.java | 139 -
.../beans/membership/MAttrTemplate.java | 58 -
.../beans/membership/MAttrUniqueValue.java | 78 -
.../beans/membership/MAttrValue.java | 62 -
.../persistence/beans/membership/MDerAttr.java | 69 -
.../beans/membership/MDerAttrTemplate.java | 58 -
.../beans/membership/MDerSchema.java | 31 -
.../persistence/beans/membership/MSchema.java | 31 -
.../persistence/beans/membership/MVirAttr.java | 70 -
.../beans/membership/MVirAttrTemplate.java | 58 -
.../beans/membership/MVirSchema.java | 31 -
.../beans/membership/Membership.java | 229 --
.../core/persistence/beans/package-info.java | 19 -
.../core/persistence/beans/role/RAttr.java | 136 -
.../persistence/beans/role/RAttrTemplate.java | 57 -
.../beans/role/RAttrUniqueValue.java | 77 -
.../core/persistence/beans/role/RAttrValue.java | 62 -
.../core/persistence/beans/role/RDerAttr.java | 70 -
.../beans/role/RDerAttrTemplate.java | 57 -
.../core/persistence/beans/role/RDerSchema.java | 29 -
.../core/persistence/beans/role/RMapping.java | 119 -
.../persistence/beans/role/RMappingItem.java | 57 -
.../core/persistence/beans/role/RSchema.java | 31 -
.../core/persistence/beans/role/RVirAttr.java | 69 -
.../beans/role/RVirAttrTemplate.java | 57 -
.../core/persistence/beans/role/RVirSchema.java | 31 -
.../persistence/beans/role/SyncopeRole.java | 588 -----
.../persistence/beans/user/SyncopeUser.java | 531 ----
.../core/persistence/beans/user/UAttr.java | 153 --
.../beans/user/UAttrUniqueValue.java | 77 -
.../core/persistence/beans/user/UAttrValue.java | 62 -
.../core/persistence/beans/user/UDerAttr.java | 63 -
.../core/persistence/beans/user/UDerSchema.java | 29 -
.../core/persistence/beans/user/UMapping.java | 136 -
.../persistence/beans/user/UMappingItem.java | 57 -
.../core/persistence/beans/user/USchema.java | 31 -
.../core/persistence/beans/user/UVirAttr.java | 62 -
.../core/persistence/beans/user/UVirSchema.java | 31 -
.../syncope/core/persistence/dao/AttrDAO.java | 30 -
.../core/persistence/dao/AttrTemplateDAO.java | 35 -
.../core/persistence/dao/AttrValueDAO.java | 37 -
.../syncope/core/persistence/dao/ConfDAO.java | 35 -
.../core/persistence/dao/ConnInstanceDAO.java | 35 -
.../core/persistence/dao/ConnectorRegistry.java | 43 -
.../syncope/core/persistence/dao/DAO.java | 32 -
.../core/persistence/dao/DerAttrDAO.java | 37 -
.../core/persistence/dao/DerSchemaDAO.java | 39 -
.../core/persistence/dao/EntitlementDAO.java | 40 -
.../syncope/core/persistence/dao/LoggerDAO.java | 38 -
.../core/persistence/dao/MembershipDAO.java | 39 -
.../core/persistence/dao/NotFoundException.java | 35 -
.../core/persistence/dao/NotificationDAO.java | 35 -
.../syncope/core/persistence/dao/PolicyDAO.java | 49 -
.../syncope/core/persistence/dao/ReportDAO.java | 42 -
.../core/persistence/dao/ReportExecDAO.java | 42 -
.../core/persistence/dao/ResourceDAO.java | 48 -
.../syncope/core/persistence/dao/RoleDAO.java | 78 -
.../syncope/core/persistence/dao/RouteDAO.java | 39 -
.../syncope/core/persistence/dao/SchemaDAO.java | 38 -
.../persistence/dao/SecurityQuestionDAO.java | 35 -
.../core/persistence/dao/SubjectDAO.java | 40 -
.../core/persistence/dao/SubjectSearchDAO.java | 81 -
.../syncope/core/persistence/dao/TaskDAO.java | 50 -
.../core/persistence/dao/TaskExecDAO.java | 44 -
.../syncope/core/persistence/dao/UserDAO.java | 63 -
.../core/persistence/dao/VirAttrDAO.java | 37 -
.../core/persistence/dao/VirSchemaDAO.java | 38 -
.../dao/impl/AbstractContentDealer.java | 88 -
.../persistence/dao/impl/AbstractDAOImpl.java | 117 -
.../dao/impl/AbstractSubjectDAOImpl.java | 335 ---
.../core/persistence/dao/impl/AttrDAOImpl.java | 51 -
.../dao/impl/AttrTemplateDAOImpl.java | 71 -
.../persistence/dao/impl/AttrValueDAOImpl.java | 64 -
.../core/persistence/dao/impl/ConfDAOImpl.java | 104 -
.../dao/impl/ConnInstanceDAOImpl.java | 89 -
.../persistence/dao/impl/ContentLoader.java | 89 -
.../persistence/dao/impl/DerAttrDAOImpl.java | 65 -
.../persistence/dao/impl/DerSchemaDAOImpl.java | 115 -
.../dao/impl/EntitlementDAOImpl.java | 86 -
.../persistence/dao/impl/LoggerDAOImpl.java | 68 -
.../persistence/dao/impl/MembershipDAOImpl.java | 85 -
.../dao/impl/NotificationDAOImpl.java | 52 -
.../persistence/dao/impl/OrderBySupport.java | 47 -
.../persistence/dao/impl/PolicyDAOImpl.java | 137 -
.../persistence/dao/impl/ReportDAOImpl.java | 92 -
.../persistence/dao/impl/ReportExecDAOImpl.java | 100 -
.../persistence/dao/impl/ResourceDAOImpl.java | 242 --
.../core/persistence/dao/impl/RoleDAOImpl.java | 537 ----
.../core/persistence/dao/impl/RouteDAOImpl.java | 74 -
.../persistence/dao/impl/SchemaDAOImpl.java | 118 -
.../persistence/dao/impl/SearchSupport.java | 132 -
.../dao/impl/SecurityQuestionDAOImpl.java | 70 -
.../dao/impl/SubjectSearchDAOImpl.java | 713 -----
.../core/persistence/dao/impl/TaskDAOImpl.java | 170 --
.../persistence/dao/impl/TaskExecDAOImpl.java | 121 -
.../core/persistence/dao/impl/UserDAOImpl.java | 228 --
.../persistence/dao/impl/VirAttrDAOImpl.java | 65 -
.../persistence/dao/impl/VirSchemaDAOImpl.java | 115 -
.../dao/search/AbstractSearchCond.java | 48 -
.../persistence/dao/search/AttributeCond.java | 84 -
.../persistence/dao/search/EntitlementCond.java | 39 -
.../persistence/dao/search/MembershipCond.java | 46 -
.../persistence/dao/search/OrderByClause.java | 69 -
.../persistence/dao/search/ResourceCond.java | 42 -
.../core/persistence/dao/search/SearchCond.java | 254 --
.../persistence/dao/search/SubjectCond.java | 34 -
.../persistence/dao/search/package-info.java | 19 -
.../validation/attrvalue/AbstractValidator.java | 53 -
.../attrvalue/AlwaysTrueValidator.java | 40 -
.../validation/attrvalue/BasicValidator.java | 52 -
.../attrvalue/EmailAddressValidator.java | 41 -
.../attrvalue/InvalidAttrValueException.java | 44 -
.../attrvalue/ParsingValidationException.java | 30 -
.../validation/attrvalue/Validator.java | 27 -
.../entity/AbstractSyncTaskCheck.java | 41 -
.../entity/AbstractSyncTaskValidator.java | 84 -
.../validation/entity/AbstractValidator.java | 46 -
.../validation/entity/AttrCheck.java | 41 -
.../validation/entity/AttrValidator.java | 59 -
.../validation/entity/AttrValueCheck.java | 41 -
.../validation/entity/AttrValueValidator.java | 88 -
.../validation/entity/ConnInstanceCheck.java | 41 -
.../entity/ConnInstanceValidator.java | 63 -
.../entity/EntityValidationListener.java | 52 -
.../entity/ExternalResourceCheck.java | 41 -
.../entity/ExternalResourceValidator.java | 130 -
.../entity/InvalidEntityException.java | 130 -
.../validation/entity/NotificationCheck.java | 41 -
.../entity/NotificationValidator.java | 59 -
.../validation/entity/PolicyCheck.java | 41 -
.../validation/entity/PolicyValidator.java | 54 -
.../validation/entity/PropagationTaskCheck.java | 41 -
.../entity/PropagationTaskValidator.java | 66 -
.../validation/entity/ReportCheck.java | 41 -
.../validation/entity/ReportValidator.java | 69 -
.../validation/entity/SchedTaskCheck.java | 41 -
.../validation/entity/SchedTaskValidator.java | 69 -
.../validation/entity/SchemaCheck.java | 41 -
.../validation/entity/SchemaNameCheck.java | 41 -
.../validation/entity/SchemaNameValidator.java | 135 -
.../validation/entity/SchemaValidator.java | 61 -
.../validation/entity/SyncopeRoleCheck.java | 41 -
.../validation/entity/SyncopeRoleValidator.java | 44 -
.../validation/entity/SyncopeUserCheck.java | 41 -
.../validation/entity/SyncopeUserValidator.java | 194 --
.../core/policy/AccountPolicyEnforcer.java | 105 -
.../core/policy/AccountPolicyException.java | 32 -
.../core/policy/PasswordPolicyEnforcer.java | 202 --
.../core/policy/PasswordPolicyException.java | 32 -
.../core/policy/PolicyEnforceException.java | 32 -
.../syncope/core/policy/PolicyEnforcer.java | 37 -
.../syncope/core/policy/PolicyEvaluator.java | 107 -
.../syncope/core/policy/PolicyPattern.java | 47 -
.../syncope/core/policy/UserSuspender.java | 26 -
.../syncope/core/propagation/Connector.java | 216 --
.../core/propagation/ConnectorFactory.java | 65 -
.../propagation/DefaultPropagationActions.java | 37 -
.../core/propagation/PropagationActions.java | 30 -
.../core/propagation/PropagationByResource.java | 365 ---
.../core/propagation/PropagationException.java | 51 -
.../core/propagation/PropagationReporter.java | 58 -
.../propagation/PropagationTaskExecutor.java | 78 -
.../core/propagation/TimeoutException.java | 42 -
.../impl/AbstractPropagationTaskExecutor.java | 527 ----
.../propagation/impl/AsyncConnectorFacade.java | 202 --
.../propagation/impl/ConnectorFacadeProxy.java | 600 -----
.../impl/DBPasswordPropagationActions.java | 122 -
.../impl/DefaultPropagationReporter.java | 94 -
.../impl/LDAPMembershipPropagationActions.java | 115 -
.../impl/LDAPPasswordPropagationActions.java | 127 -
.../impl/PriorityPropagationTaskExecutor.java | 119 -
.../propagation/impl/PropagationManager.java | 743 ------
.../syncope/core/propagation/package-info.java | 19 -
.../DefaultRoleProvisioningManager.java | 222 --
.../DefaultUserProvisioningManager.java | 371 ---
.../core/provisioning/ProvisioningManager.java | 42 -
.../provisioning/RoleProvisioningManager.java | 37 -
.../provisioning/UserProvisioningManager.java | 57 -
.../core/provisioning/camel/CamelDetector.java | 77 -
.../camel/CamelRoleProvisioningManager.java | 293 ---
.../camel/CamelUserProvisioningManager.java | 483 ----
.../provisioning/camel/SyncopeCamelContext.java | 141 -
.../DefaultRoleCreatePropagation.java | 80 -
.../DefaultRoleCreateSyncPropagation.java | 81 -
.../DefaultRoleDeletePropagation.java | 104 -
.../DefaultRoleDeprovisionPropagation.java | 79 -
.../DefaultRoleUpdatePropagation.java | 81 -
.../DefaultUserConfirmPwdResetPropagation.java | 62 -
.../DefaultUserCreatePropagation.java | 81 -
.../DefaultUserDeletePropagation.java | 75 -
.../DefaultUserDeprovisionPropagation.java | 79 -
.../DefaultUserStatusPropagation.java | 81 -
.../DefaultUserUpdateInSyncPropagation.java | 86 -
.../DefaultUserUpdatePropagation.java | 123 -
.../DefaultUserWFSuspendPropagation.java | 67 -
.../camel/processors/UserStatusOnSync.java | 75 -
.../syncope/core/quartz/AbstractTaskJob.java | 179 --
.../quartz/AbstractTransactionalTaskJob.java | 35 -
.../apache/syncope/core/quartz/SampleJob.java | 52 -
.../core/quartz/SpringBeanJobFactory.java | 96 -
.../org/apache/syncope/core/quartz/TaskJob.java | 29 -
.../syncope/core/quartz/package-info.java | 19 -
.../syncope/core/report/AbstractReportlet.java | 66 -
.../syncope/core/report/ReportException.java | 32 -
.../apache/syncope/core/report/ReportJob.java | 202 --
.../syncope/core/report/ReportXMLConst.java | 41 -
.../apache/syncope/core/report/Reportlet.java | 47 -
.../syncope/core/report/ReportletConfClass.java | 33 -
.../syncope/core/report/RoleReportlet.java | 328 ---
.../syncope/core/report/StaticReportlet.java | 120 -
.../syncope/core/report/UserReportlet.java | 359 ---
.../core/report/cocoon/TextSerializer.java | 101 -
.../apache/syncope/core/rest/WADLServlet.java | 96 -
.../rest/controller/AbstractController.java | 58 -
.../controller/AbstractResourceAssociator.java | 37 -
.../controller/AbstractSubjectController.java | 43 -
.../AbstractTransactionalController.java | 31 -
.../controller/ConfigurationController.java | 160 --
.../rest/controller/ConnectorController.java | 341 ---
.../core/rest/controller/ControllerHandler.java | 108 -
.../rest/controller/EntitlementController.java | 58 -
.../core/rest/controller/LoggerController.java | 305 ---
.../rest/controller/NotificationController.java | 127 -
.../core/rest/controller/PolicyController.java | 197 --
.../core/rest/controller/ReportController.java | 344 ---
.../rest/controller/ResourceController.java | 287 --
.../core/rest/controller/RoleController.java | 404 ---
.../core/rest/controller/RouteController.java | 104 -
.../core/rest/controller/SchemaController.java | 306 ---
.../controller/SecurityQuestionController.java | 150 --
.../core/rest/controller/TaskController.java | 404 ---
.../rest/controller/UnauthorizedException.java | 28 -
.../controller/UnauthorizedRoleException.java | 42 -
.../UnresolvedReferenceException.java | 35 -
.../core/rest/controller/UserController.java | 551 ----
.../rest/controller/UserWorkflowController.java | 126 -
.../rest/controller/WorkflowController.java | 117 -
.../data/AbstractAttributableDataBinder.java | 944 -------
.../core/rest/data/AttributableTransformer.java | 33 -
.../core/rest/data/ConfigurationDataBinder.java | 76 -
.../core/rest/data/ConnInstanceDataBinder.java | 239 --
.../data/DefaultAttributableTransformer.java | 38 -
.../core/rest/data/NotificationDataBinder.java | 57 -
.../core/rest/data/PolicyDataBinder.java | 203 --
.../core/rest/data/ReportDataBinder.java | 176 --
.../core/rest/data/ResourceDataBinder.java | 389 ---
.../syncope/core/rest/data/RoleDataBinder.java | 457 ----
.../syncope/core/rest/data/RouteDataBinder.java | 38 -
.../core/rest/data/SchemaDataBinder.java | 163 --
.../core/rest/data/SearchCondConverter.java | 50 -
.../core/rest/data/SearchCondVisitor.java | 203 --
.../rest/data/SecurityQuestionDataBinder.java | 46 -
.../syncope/core/rest/data/TaskDataBinder.java | 338 ---
.../core/rest/data/UnwrappedObjectMapper.java | 95 -
.../syncope/core/rest/data/UserDataBinder.java | 524 ----
.../rest/utils/QueryResourceInfoComparator.java | 114 -
.../rest/utils/RestServiceExceptionMapper.java | 276 --
.../syncope/core/security/AsymmetricCipher.java | 77 -
.../core/security/EncodePasswordCLI.java | 59 -
.../security/SyncopeAuthenticationProvider.java | 292 ---
.../security/SyncopeUserDetailsService.java | 103 -
.../core/services/AbstractServiceImpl.java | 227 --
.../syncope/core/services/AddETagFilter.java | 50 -
.../core/services/ConfigurationServiceImpl.java | 91 -
.../core/services/ConnectorServiceImpl.java | 133 -
.../core/services/EntitlementServiceImpl.java | 45 -
.../core/services/LoggerServiceImpl.java | 116 -
.../core/services/NotificationServiceImpl.java | 68 -
.../core/services/PolicyServiceImpl.java | 125 -
.../core/services/ReportServiceImpl.java | 131 -
.../core/services/ResourceServiceImpl.java | 146 --
.../syncope/core/services/RoleServiceImpl.java | 228 --
.../syncope/core/services/RouteServiceImpl.java | 86 -
.../core/services/SchemaServiceImpl.java | 77 -
.../services/SecurityQuestionServiceImpl.java | 73 -
.../syncope/core/services/TaskServiceImpl.java | 158 --
.../core/services/UserSelfServiceImpl.java | 100 -
.../syncope/core/services/UserServiceImpl.java | 251 --
.../core/services/UserWorkflowServiceImpl.java | 65 -
.../core/services/WorkflowServiceImpl.java | 117 -
.../syncope/core/sync/AbstractSyncActions.java | 43 -
.../syncope/core/sync/DefaultPushActions.java | 104 -
.../syncope/core/sync/DefaultSyncActions.java | 125 -
.../apache/syncope/core/sync/PushActions.java | 141 -
.../apache/syncope/core/sync/SyncActions.java | 176 --
.../syncope/core/sync/SyncCorrelationRule.java | 36 -
.../apache/syncope/core/sync/SyncProfile.java | 88 -
.../apache/syncope/core/sync/SyncResult.java | 140 -
.../apache/syncope/core/sync/SyncUtilities.java | 355 ---
.../impl/AbstractSubjectPushResultHandler.java | 376 ---
.../impl/AbstractSubjectSyncResultHandler.java | 634 -----
.../syncope/core/sync/impl/AbstractSyncJob.java | 372 ---
.../sync/impl/AbstractSyncopeResultHandler.java | 119 -
.../core/sync/impl/DBPasswordSyncActions.java | 142 -
.../sync/impl/LDAPMembershipSyncActions.java | 313 ---
.../core/sync/impl/LDAPPasswordSyncActions.java | 124 -
.../apache/syncope/core/sync/impl/PushJob.java | 176 --
.../core/sync/impl/RolePushResultHandler.java | 157 --
.../core/sync/impl/RoleSyncResultHandler.java | 175 --
.../apache/syncope/core/sync/impl/SyncJob.java | 222 --
.../core/sync/impl/UserPushResultHandler.java | 160 --
.../core/sync/impl/UserSyncResultHandler.java | 201 --
.../core/util/ApplicationContextProvider.java | 47 -
.../syncope/core/util/AttributableUtil.java | 875 -------
.../core/util/AttributeDeserializer.java | 84 -
.../syncope/core/util/AttributeSerializer.java | 78 -
.../syncope/core/util/ConnIdBundleManager.java | 284 --
.../syncope/core/util/ContentExporter.java | 381 ---
.../syncope/core/util/ContentLoaderHandler.java | 197 --
.../apache/syncope/core/util/DataFormat.java | 117 -
.../org/apache/syncope/core/util/Encryptor.java | 274 --
.../syncope/core/util/EntitlementUtil.java | 132 -
.../apache/syncope/core/util/ExceptionUtil.java | 47 -
.../core/util/GuardedStringDeserializer.java | 94 -
.../core/util/GuardedStringSerializer.java | 90 -
.../InvalidPasswordPolicySpecException.java | 37 -
.../apache/syncope/core/util/MappingUtil.java | 720 -----
.../apache/syncope/core/util/POJOHelper.java | 80 -
.../core/util/ResourceWithFallbackLoader.java | 82 -
.../apache/syncope/core/util/RouteManager.java | 42 -
.../syncope/core/util/SecureRandomUtil.java | 44 -
.../core/util/SpringVelocityResourceLoader.java | 84 -
.../core/util/SyncTokenDeserializer.java | 65 -
.../syncope/core/util/SyncTokenSerializer.java | 59 -
.../org/apache/syncope/core/util/TaskUtil.java | 172 --
.../org/apache/syncope/core/util/URIUtil.java | 61 -
.../core/util/VelocityEngineFactoryBean.java | 105 -
.../core/util/jexl/ClassFreeUberspectImpl.java | 43 -
.../core/util/jexl/EmptyClassLoader.java | 36 -
.../apache/syncope/core/util/jexl/JexlUtil.java | 279 --
.../core/util/multiparent/MultiParentNode.java | 106 -
.../util/multiparent/MultiParentNodeOp.java | 49 -
.../syncope/core/workflow/ActivitiDetector.java | 86 -
.../syncope/core/workflow/WorkflowAdapter.java | 110 -
.../core/workflow/WorkflowDefinitionFormat.java | 29 -
.../core/workflow/WorkflowException.java | 53 -
.../core/workflow/WorkflowInstanceLoader.java | 28 -
.../syncope/core/workflow/WorkflowResult.java | 87 -
.../core/workflow/WorkflowUserSuspender.java | 60 -
.../syncope/core/workflow/package-info.java | 19 -
.../role/AbstractRoleWorkflowAdapter.java | 63 -
.../workflow/role/NoOpRoleWorkflowAdapter.java | 133 -
.../core/workflow/role/RoleWorkflowAdapter.java | 78 -
.../user/AbstractUserWorkflowAdapter.java | 136 -
.../workflow/user/NoOpUserWorkflowAdapter.java | 237 --
.../core/workflow/user/UserWorkflowAdapter.java | 166 --
.../user/activiti/ActivitiImportUtils.java | 92 -
.../activiti/ActivitiUserWorkflowAdapter.java | 892 -------
.../user/activiti/ActivitiWorkflowLoader.java | 104 -
.../activiti/SyncopeEntitiesVariableType.java | 35 -
.../user/activiti/SyncopeGroupManager.java | 122 -
.../user/activiti/SyncopeGroupQueryImpl.java | 157 --
.../workflow/user/activiti/SyncopeSession.java | 26 -
.../user/activiti/SyncopeSessionFactory.java | 45 -
.../user/activiti/SyncopeUserManager.java | 171 --
.../user/activiti/SyncopeUserQueryImpl.java | 220 --
.../task/AbstractActivitiServiceTask.java | 48 -
.../user/activiti/task/AutoActivate.java | 31 -
.../workflow/user/activiti/task/Create.java | 47 -
.../workflow/user/activiti/task/Delete.java | 41 -
.../user/activiti/task/GenerateToken.java | 44 -
.../workflow/user/activiti/task/Notify.java | 63 -
.../user/activiti/task/PasswordReset.java | 45 -
.../workflow/user/activiti/task/Reactivate.java | 29 -
.../workflow/user/activiti/task/Suspend.java | 29 -
.../workflow/user/activiti/task/Update.java | 55 -
.../META-INF/cxf/org.apache.cxf.Logger | 1 -
core/src/main/resources/META-INF/orm.xml | 355 ---
core/src/main/resources/META-INF/orm.xml.oracle | 308 ---
.../main/resources/META-INF/orm.xml.sqlserver | 344 ---
.../resources/META-INF/spring-persistence.xml | 31 -
core/src/main/resources/audit/audit.sql | 24 -
.../main/resources/audit/audit_mysql_innodb.sql | 24 -
core/src/main/resources/audit/audit_oracle.sql | 38 -
.../main/resources/audit/audit_sqlserver.sql | 28 -
core/src/main/resources/connid.properties | 17 -
core/src/main/resources/content.xml | 186 --
core/src/main/resources/coreContext.xml | 158 --
core/src/main/resources/indexes.xml | 41 -
core/src/main/resources/log4j2.xml | 155 --
core/src/main/resources/mail.properties | 24 -
.../mailTemplates/confirmPasswordReset.html.vm | 26 -
.../mailTemplates/confirmPasswordReset.txt.vm | 20 -
.../main/resources/mailTemplates/optin.html.vm | 72 -
.../main/resources/mailTemplates/optin.txt.vm | 51 -
.../mailTemplates/requestPasswordReset.html.vm | 31 -
.../mailTemplates/requestPasswordReset.txt.vm | 26 -
core/src/main/resources/persistence.properties | 27 -
core/src/main/resources/persistenceContext.xml | 109 -
.../resources/persistenceContextEMFactory.xml | 56 -
core/src/main/resources/provisioning.properties | 18 -
core/src/main/resources/quartz/tables_h2.sql | 266 --
.../main/resources/quartz/tables_mariadb.sql | 206 --
core/src/main/resources/quartz/tables_mysql.sql | 206 --
.../resources/quartz/tables_mysql_innodb.sql | 221 --
.../src/main/resources/quartz/tables_oracle.sql | 208 --
.../main/resources/quartz/tables_postgres.sql | 204 --
.../main/resources/quartz/tables_sqlServer.sql | 296 ---
core/src/main/resources/report/report2csv.xsl | 36 -
core/src/main/resources/report/report2fo.xsl | 97 -
core/src/main/resources/report/report2html.xsl | 77 -
.../main/resources/report/roleReportlet2csv.xsl | 118 -
.../main/resources/report/roleReportlet2fo.xsl | 228 --
.../resources/report/roleReportlet2html.xsl | 196 --
.../resources/report/staticReportlet2csv.xsl | 81 -
.../resources/report/staticReportlet2fo.xsl | 84 -
.../resources/report/staticReportlet2html.xsl | 74 -
.../main/resources/report/userReportlet2csv.xsl | 119 -
.../main/resources/report/userReportlet2fo.xsl | 247 --
.../resources/report/userReportlet2html.xsl | 219 --
core/src/main/resources/rest.properties | 18 -
core/src/main/resources/restContext.xml | 130 -
core/src/main/resources/roleRoute.xml | 172 --
core/src/main/resources/schedulingContext.xml | 54 -
core/src/main/resources/security.properties | 30 -
core/src/main/resources/securityContext.xml | 63 -
core/src/main/resources/userRoute.xml | 309 ---
core/src/main/resources/userWorkflow.bpmn20.xml | 232 --
core/src/main/resources/views.xml | 149 --
core/src/main/resources/wadl2html/index.xsl | 484 ----
core/src/main/resources/wadl2html/schema.xsl | 148 --
core/src/main/resources/workflow.properties | 20 -
core/src/main/resources/workflowContext.xml | 82 -
core/src/main/webapp/WEB-INF/glassfish-web.xml | 33 -
.../WEB-INF/jboss-deployment-structure.xml | 38 -
core/src/main/webapp/WEB-INF/web.xml | 96 -
core/src/main/webapp/WEB-INF/weblogic.xml | 46 -
core/src/main/webapp/cacheStats.jsp | 190 --
.../apache/syncope/core/AbstractNonDAOTest.java | 33 -
.../org/apache/syncope/core/AbstractTest.java | 60 -
.../core/connid/PasswordGeneratorTest.java | 170 --
.../syncope/core/init/ConnectorManagerTest.java | 77 -
.../core/notification/NotificationTest.java | 604 -----
.../core/persistence/dao/AbstractDAOTest.java | 29 -
.../syncope/core/persistence/dao/AttrTest.java | 234 --
.../persistence/dao/AttributableSearchTest.java | 481 ----
.../syncope/core/persistence/dao/ConfTest.java | 105 -
.../core/persistence/dao/ConnInstanceTest.java | 141 -
.../core/persistence/dao/DerAttrTest.java | 266 --
.../core/persistence/dao/DerSchemaTest.java | 103 -
.../persistence/dao/DummyConnectorRegistry.java | 33 -
.../core/persistence/dao/EntitlementTest.java | 78 -
.../core/persistence/dao/MembershipTest.java | 81 -
.../core/persistence/dao/NotificationTest.java | 133 -
.../core/persistence/dao/PolicyTest.java | 151 --
.../core/persistence/dao/ReportTest.java | 81 -
.../core/persistence/dao/ResourceTest.java | 267 --
.../syncope/core/persistence/dao/RoleTest.java | 140 -
.../core/persistence/dao/SchemaTest.java | 160 --
.../persistence/dao/SecurityQuestionTest.java | 66 -
.../core/persistence/dao/TaskExecTest.java | 96 -
.../syncope/core/persistence/dao/TaskTest.java | 117 -
.../syncope/core/persistence/dao/UserTest.java | 209 --
.../core/persistence/dao/VirAttrTest.java | 137 -
.../core/persistence/dao/VirSchemaTest.java | 101 -
.../persistence/dao/impl/TestDbInitializer.java | 38 -
.../persistence/relationships/AttrTest.java | 192 --
.../relationships/AttributableSearchTest.java | 85 -
.../relationships/ConnInstanceTest.java | 103 -
.../relationships/DerSchemaTest.java | 59 -
.../relationships/MembershipTest.java | 81 -
.../persistence/relationships/ReportTest.java | 120 -
.../persistence/relationships/ResourceTest.java | 294 ---
.../persistence/relationships/RoleTest.java | 146 --
.../persistence/relationships/SchemaTest.java | 159 --
.../relationships/SecurityQuestionTest.java | 58 -
.../persistence/relationships/TaskTest.java | 199 --
.../persistence/relationships/UserTest.java | 73 -
.../core/policy/AccountPolicyEnforcerTest.java | 100 -
.../apache/syncope/core/rest/AbstractTest.java | 385 ---
.../core/rest/AuthenticationTestITCase.java | 442 ----
.../syncope/core/rest/CamelTestITCase.java | 161 --
.../core/rest/ConfigurationTestITCase.java | 219 --
.../syncope/core/rest/ConnectorTestITCase.java | 731 ------
.../core/rest/DerivedSchemaTestITCase.java | 151 --
.../syncope/core/rest/LoggerTestITCase.java | 215 --
.../core/rest/NotificationTestITCase.java | 173 --
.../syncope/core/rest/PolicyTestITCase.java | 239 --
.../syncope/core/rest/ReportTestITCase.java | 251 --
.../syncope/core/rest/ResourceTestITCase.java | 581 -----
.../syncope/core/rest/RoleTestITCase.java | 889 -------
.../syncope/core/rest/SchemaTestITCase.java | 318 ---
.../syncope/core/rest/SearchTestITCase.java | 181 --
.../core/rest/SecurityQuestionTestITCase.java | 99 -
.../syncope/core/rest/TaskTestITCase.java | 1388 ----------
.../syncope/core/rest/UserSelfTestITCase.java | 341 ---
.../syncope/core/rest/UserTestITCase.java | 2466 ------------------
.../core/rest/UserWorkflowTestITCase.java | 297 ---
.../syncope/core/rest/VirAttrTestITCase.java | 872 -------
.../core/rest/VirtualSchemaTestITCase.java | 123 -
.../syncope/core/rest/WorkflowTestITCase.java | 87 -
.../DoubleValueAttributableTransformer.java | 74 -
.../core/rest/data/ResourceDataBinderTest.java | 150 --
.../core/rest/data/SearchCondConverterTest.java | 165 --
.../syncope/core/security/EncryptorTest.java | 59 -
.../apache/syncope/core/sync/SyncTaskTest.java | 131 -
.../syncope/core/sync/TestSyncActions.java | 81 -
.../apache/syncope/core/sync/TestSyncRule.java | 36 -
core/src/test/resources/connid.properties | 23 -
core/src/test/resources/content.xml | 1143 --------
core/src/test/resources/context.xml | 23 -
core/src/test/resources/db.jsp | 36 -
core/src/test/resources/favicon.jpg | Bin 557 -> 0 bytes
.../test/resources/jboss/META-INF/MANIFEST.MF | 6 -
.../jboss/persistenceContextEMFactory.xml | 62 -
core/src/test/resources/mail.properties | 24 -
.../resources/mariadb/persistence.properties | 28 -
.../test/resources/mysql/persistence.properties | 28 -
.../noopworkflow/stripActivitiFromContent.xsl | 39 -
.../resources/noopworkflow/workflow.properties | 19 -
.../resources/noopworkflow/workflowContext.xml | 32 -
.../resources/oracle/persistence.properties | 28 -
core/src/test/resources/persistence.properties | 28 -
core/src/test/resources/persistenceTestEnv.xml | 73 -
.../resources/postgres/persistence.properties | 28 -
core/src/test/resources/rest.properties | 18 -
core/src/test/resources/restTestEnv.xml | 38 -
.../resources/sqlserver/persistence.properties | 28 -
core/src/test/resources/test.csv | 10 -
core/src/test/resources/testJDBCContext.xml | 33 -
core/src/test/resources/userWorkflow.bpmn20.xml | 577 ----
.../resources/weblogic/conninstance-reload.jsp | 48 -
core/workflow-activiti/pom.xml | 88 +
.../activiti/ActivitiDefinitionLoader.java | 103 +
.../workflow/activiti/ActivitiImportUtils.java | 92 +
.../activiti/ActivitiUserWorkflowAdapter.java | 892 +++++++
.../activiti/SyncopeEntitiesVariableType.java | 35 +
.../workflow/activiti/SyncopeGroupManager.java | 122 +
.../activiti/SyncopeGroupQueryImpl.java | 157 ++
.../core/workflow/activiti/SyncopeSession.java | 26 +
.../activiti/SyncopeSessionFactory.java | 45 +
.../workflow/activiti/SyncopeUserManager.java | 170 ++
.../workflow/activiti/SyncopeUserQueryImpl.java | 218 ++
.../task/AbstractActivitiServiceTask.java | 48 +
.../workflow/activiti/task/AutoActivate.java | 31 +
.../core/workflow/activiti/task/Create.java | 51 +
.../core/workflow/activiti/task/Delete.java | 40 +
.../workflow/activiti/task/GenerateToken.java | 43 +
.../core/workflow/activiti/task/Notify.java | 62 +
.../workflow/activiti/task/PasswordReset.java | 44 +
.../core/workflow/activiti/task/Reactivate.java | 29 +
.../core/workflow/activiti/task/Suspend.java | 29 +
.../core/workflow/activiti/task/Update.java | 54 +
.../src/main/resources/userWorkflow.bpmn20.xml | 232 ++
.../src/main/resources/workflow.properties | 20 +
.../main/resources/workflowActivitiContext.xml | 79 +
core/workflow-api/pom.xml | 60 +
.../core/workflow/api/RoleWorkflowAdapter.java | 71 +
.../core/workflow/api/UserWorkflowAdapter.java | 151 ++
.../core/workflow/api/WorkflowAdapter.java | 107 +
.../workflow/api/WorkflowDefinitionFormat.java | 29 +
.../core/workflow/api/WorkflowException.java | 51 +
.../syncope/core/workflow/api/package-info.java | 19 +
core/workflow-java/pom.xml | 69 +
.../java/AbstractRoleWorkflowAdapter.java | 66 +
.../java/AbstractUserWorkflowAdapter.java | 136 +
.../java/DefaultRoleWorkflowAdapter.java | 129 +
.../java/DefaultUserWorkflowAdapter.java | 233 ++
.../src/main/resources/workflow.properties | 20 +
.../src/main/resources/workflowContext.xml | 28 +
deb/console/LICENSE | 708 +++++
deb/console/NOTICE | 75 +
deb/console/pom.xml | 119 +-
deb/console/src/deb/control/conffiles | 2 +-
deb/console/src/deb/control/postinst | 2 +-
deb/console/src/deb/tomcat7/syncope-console.xml | 23 -
deb/console/src/deb/tomcat8/syncope-console.xml | 26 +
deb/core/LICENSE | 1053 ++++++++
deb/core/NOTICE | 131 +
deb/core/pom.xml | 195 +-
deb/core/src/deb/control/conffiles | 2 +-
deb/core/src/deb/control/control | 4 +-
deb/core/src/deb/control/postinst | 2 +-
deb/core/src/deb/tomcat7/syncope.xml | 45 -
deb/core/src/deb/tomcat8/syncope.xml | 48 +
deb/pom.xml | 2 +-
ext/camel/client-console/pom.xml | 77 +
.../console/pages/CamelRouteModalPage.java | 89 +
.../client/console/panels/CamelRoutePanel.java | 181 ++
.../console/rest/CamelRouteRestClient.java | 53 +
.../console/pages/CamelRouteModalPage.html | 66 +
.../pages/CamelRouteModalPage.properties | 17 +
.../pages/CamelRouteModalPage_it.properties | 17 +
.../pages/CamelRouteModalPage_pt_BR.properties | 17 +
.../client/console/panels/CamelRoutePanel.html | 28 +
ext/camel/common-lib/pom.xml | 60 +
.../syncope/common/lib/to/CamelRouteTO.java | 60 +
ext/camel/logic/pom.xml | 65 +
.../syncope/core/logic/CamelRouteLogic.java | 93 +
.../core/logic/init/CamelRouteLoader.java | 167 ++
ext/camel/persistence-api/pom.xml | 60 +
.../core/persistence/api/dao/CamelRouteDAO.java | 37 +
.../api/entity/CamelEntityFactory.java | 24 +
.../core/persistence/api/entity/CamelRoute.java | 34 +
ext/camel/persistence-jpa/pom.xml | 138 +
.../persistence/jpa/dao/JPACamelRouteDAO.java | 71 +
.../jpa/entity/JPACamelEntityFactory.java | 33 +
.../persistence/jpa/entity/JPACamelRoute.java | 79 +
ext/camel/pom.xml | 48 +
ext/camel/provisioning-api/pom.xml | 71 +
.../api/data/CamelRouteDataBinder.java | 29 +
ext/camel/provisioning-camel/pom.xml | 78 +
.../camel/AbstractCamelProvisioningManager.java | 103 +
.../camel/CamelRoleProvisioningManager.java | 174 ++
.../camel/CamelUserProvisioningManager.java | 342 +++
.../provisioning/camel/SyncopeCamelContext.java | 123 +
.../camel/data/CamelRouteDataBinderImpl.java | 48 +
.../processor/RoleCreateInSyncProcessor.java | 72 +
.../camel/processor/RoleCreateProcessor.java | 77 +
.../camel/processor/RoleDeleteProcessor.java | 105 +
.../processor/RoleDeprovisionProcessor.java | 78 +
.../camel/processor/RoleUpdateProcessor.java | 71 +
.../processor/UserConfirmPwdResetProcessor.java | 61 +
.../camel/processor/UserCreateProcessor.java | 76 +
.../camel/processor/UserDeleteProcessor.java | 72 +
.../processor/UserDeprovisionProcessor.java | 78 +
.../processor/UserInnerSuspendProcessor.java | 61 +
.../processor/UserSetStatusInSyncProcessor.java | 74 +
.../UserStatusPropagationProcessor.java | 76 +
.../processor/UserUpdateInSyncProcessor.java | 73 +
.../camel/processor/UserUpdateProcessor.java | 105 +
.../src/main/resources/provisioning.properties | 19 +
.../main/resources/provisioningCamelContext.xml | 39 +
.../src/main/resources/roleRoutes.xml | 140 +
.../src/main/resources/userRoutes.xml | 242 ++
ext/camel/rest-api/pom.xml | 65 +
.../rest/api/service/CamelRouteService.java | 55 +
ext/camel/rest-cxf/pom.xml | 70 +
.../rest/cxf/service/CamelRouteServiceImpl.java | 56 +
ext/pom.xml | 40 +
fit/build-tools/pom.xml | 164 ++
.../fit/buildtools/ApacheDSRootDseServlet.java | 99 +
.../buildtools/ApacheDSStartStopListener.java | 277 ++
.../fit/buildtools/ConnIdStartStopListener.java | 105 +
.../fit/buildtools/H2StartStopListener.java | 82 +
.../fit/buildtools/LdifInputStreamLoader.java | 131 +
.../fit/buildtools/ServiceTimeoutServlet.java | 105 +
.../src/main/resources/buildToolsContext.xml | 58 +
fit/build-tools/src/main/resources/content.ldif | 57 +
fit/build-tools/src/main/resources/log4j2.xml | 39 +
fit/build-tools/src/main/resources/testdb.sql | 46 +
fit/build-tools/src/main/webapp/WEB-INF/web.xml | 60 +
fit/console-reference/pom.xml | 546 ++++
.../src/main/resources/console.properties | 22 +
.../src/main/resources/context.xml | 23 +
.../src/main/resources/log4j2.xml | 66 +
.../oryx.debug.js-tokenValueMap.properties | 35 +
.../src/main/webapp/WEB-INF/glassfish-web.xml | 25 +
.../WEB-INF/jboss-deployment-structure.xml | 37 +
.../src/main/webapp/WEB-INF/weblogic.xml | 35 +
.../fit/console/reference/AbstractITCase.java | 70 +
.../fit/console/reference/AccessITCase.java | 80 +
.../console/reference/ConfigurationITCase.java | 402 +++
.../fit/console/reference/ConnectorITCase.java | 238 ++
.../console/reference/EditProfileITCase.java | 94 +
.../fit/console/reference/ReportITCase.java | 117 +
.../fit/console/reference/ResourceITCase.java | 144 +
.../fit/console/reference/RoleITCase.java | 211 ++
.../fit/console/reference/SchemaITCase.java | 70 +
.../fit/console/reference/TaskITCase.java | 123 +
.../fit/console/reference/UserITCase.java | 184 ++
fit/core-reference/pom.xml | 863 ++++++
.../DoubleValueAttributableTransformer.java | 75 +
.../fit/core/reference/TestSyncActions.java | 83 +
.../fit/core/reference/TestSyncRule.java | 37 +
.../main/resources/all/provisioning.properties | 19 +
.../src/main/resources/all/workflow.properties | 20 +
.../src/main/resources/connid.properties | 23 +
.../src/main/resources/context.xml | 23 +
.../src/main/resources/coreContext.xml | 57 +
.../jboss/persistenceContextEMFactory.xml | 73 +
.../src/main/resources/log4j2.xml | 135 +
.../src/main/resources/logic.properties | 18 +
.../resources/mariadb/persistence.properties | 30 +
.../main/resources/mysql/persistence.properties | 30 +
.../resources/oracle/persistence.properties | 30 +
.../resources/postgres/persistence.properties | 29 +
.../src/main/resources/provisioning.properties | 18 +
.../resources/sqlserver/persistence.properties | 30 +
.../src/main/resources/userWorkflow.bpmn20.xml | 577 ++++
.../src/main/resources/workflow.properties | 20 +
.../src/main/webapp/WEB-INF/glassfish-web.xml | 33 +
.../WEB-INF/jboss-deployment-structure.xml | 38 +
.../src/main/webapp/WEB-INF/weblogic.xml | 46 +
.../src/main/webapp/cacheStats.jsp | 190 ++
fit/core-reference/src/main/webapp/db.jsp | 36 +
.../fit/core/reference/AbstractITCase.java | 388 +++
.../fit/core/reference/AbstractTaskITCase.java | 137 +
.../fit/core/reference/ActivitiDetector.java | 32 +
.../core/reference/AuthenticationITCase.java | 440 ++++
.../fit/core/reference/CamelDetector.java | 32 +
.../fit/core/reference/CamelRouteITCase.java | 163 ++
.../fit/core/reference/ConfigurationITCase.java | 245 ++
.../fit/core/reference/ConnectorITCase.java | 730 ++++++
.../fit/core/reference/DerSchemaITCase.java | 151 ++
.../fit/core/reference/LoggerITCase.java | 215 ++
.../fit/core/reference/NotificationITCase.java | 172 ++
.../core/reference/NotificationTaskITCase.java | 155 ++
.../fit/core/reference/PlainSchemaITCase.java | 317 +++
.../fit/core/reference/PolicyITCase.java | 238 ++
.../core/reference/PropagationTaskITCase.java | 150 ++
.../fit/core/reference/PushTaskITCase.java | 353 +++
.../fit/core/reference/ReportITCase.java | 252 ++
.../fit/core/reference/ResourceITCase.java | 578 ++++
.../syncope/fit/core/reference/RoleITCase.java | 889 +++++++
.../fit/core/reference/SchedTaskITCase.java | 105 +
.../fit/core/reference/SearchITCase.java | 182 ++
.../core/reference/SecurityQuestionITCase.java | 99 +
.../fit/core/reference/SyncTaskITCase.java | 690 +++++
.../syncope/fit/core/reference/UserITCase.java | 2442 +++++++++++++++++
.../fit/core/reference/UserSelfITCase.java | 344 +++
.../fit/core/reference/UserWorkflowITCase.java | 299 +++
.../fit/core/reference/VirAttrITCase.java | 872 +++++++
.../fit/core/reference/VirSchemaITCase.java | 122 +
.../fit/core/reference/WorkflowITCase.java | 77 +
.../src/test/resources/addActivitiToContent.xsl | 50 +
.../src/test/resources/favicon.jpg | Bin 0 -> 557 bytes
fit/core-reference/src/test/resources/test.csv | 10 +
.../src/test/resources/testJDBCContext.xml | 33 +
fit/pom.xml | 42 +
installer/pom.xml | 39 +-
.../syncope/installer/files/CoreWebXml.java | 49 -
.../installer/files/PersistenceProperties.java | 4 +
.../installer/processes/BaseProcess.java | 2 +-
.../installer/processes/ContainerProcess.java | 37 +-
.../installer/processes/PersistenceProcess.java | 7 -
.../installer/utilities/DriverLoader.java | 2 +-
.../validators/PersistenceValidator.java | 13 +-
.../src/main/resources/configuration.properties | 31 -
.../src/main/resources/installer.properties | 26 +
installer/src/main/resources/izpack/install.xml | 3 +-
installer/src/main/resources/modelerPom.xml | 7 +-
pom.xml | 980 +++----
.../resources/org/apache/syncope/checkstyle.xml | 214 ++
.../org/apache/syncope/java-formatter.xml | 309 +++
src/main/resources/org/apache/syncope/pmd.xml | 49 +
standalone/pom.xml | 125 +-
syncope620/LICENSE | 202 --
syncope620/NOTICE | 8 -
syncope620/archetype/pom.xml | 218 --
.../META-INF/maven/archetype-metadata.xml | 56 -
.../archetype-resources/console/pom.xml | 276 --
.../resources/archetype-resources/core/pom.xml | 155 --
.../main/resources/archetype-resources/pom.xml | 110 -
.../archetype/src/main/resources/meta-pom.xml | 114 -
.../src/main/resources/properties2pom.xsl | 44 -
.../projects/default/archetype.properties | 21 -
.../test/resources/projects/default/goal.txt | 0
syncope620/client/cli/pom.xml | 191 --
.../apache/syncope/client/cli/SyncopeAdm.java | 123 -
.../syncope/client/cli/SyncopeServices.java | 45 -
.../client/cli/commands/AbstractCommand.java | 32 -
.../cli/commands/ConfigurationCommand.java | 209 --
.../client/cli/commands/EntitlementCommand.java | 70 -
.../client/cli/commands/LoggerCommand.java | 168 --
.../cli/commands/NotificationCommand.java | 92 -
.../client/cli/commands/PolicyCommand.java | 105 -
.../client/cli/commands/ReportCommand.java | 193 --
.../syncope/client/cli/util/XmlUtils.java | 47 -
.../cli/validators/DebugLevelValidator.java | 61 -
.../client/cli/src/main/resources/log4j2.xml | 58 -
.../cli/src/main/resources/syncope.properties | 19 -
syncope620/client/console/pom.xml | 112 -
.../syncope/client/console/BinaryPreview.java | 34 -
.../syncope/client/console/ExtensionPanel.java | 34 -
.../client/console/SyncopeApplication.java | 306 ---
.../console/SyncopeRequestCycleListener.java | 84 -
.../syncope/client/console/SyncopeSession.java | 185 --
.../console/commons/ActionTableCheckGroup.java | 40 -
.../client/console/commons/AttrLayoutType.java | 105 -
.../commons/AttributableDataProvider.java | 101 -
.../console/commons/CloseOnESCBehavior.java | 55 -
.../commons/ConnIdSpecialAttributeName.java | 34 -
.../client/console/commons/Constants.java | 110 -
.../console/commons/DateFormatROModel.java | 50 -
.../console/commons/HttpResourceStream.java | 101 -
.../client/console/commons/JexlHelpUtil.java | 61 -
.../console/commons/MapChoiceRenderer.java | 43 -
.../syncope/client/console/commons/Mode.java | 27 -
.../console/commons/PreferenceManager.java | 177 --
.../client/console/commons/PreviewUtil.java | 62 -
.../client/console/commons/RoleTreeBuilder.java | 116 -
.../client/console/commons/RoleUtils.java | 36 -
.../console/commons/SchemaModalPageFactory.java | 58 -
.../console/commons/SelectChoiceRenderer.java | 40 -
.../client/console/commons/SelectOption.java | 72 -
.../SortableAttributableProviderComparator.java | 122 -
.../commons/SortableDataProviderComparator.java | 66 -
.../client/console/commons/XMLRolesReader.java | 118 -
.../status/AbstractStatusBeanProvider.java | 69 -
.../commons/status/ConnObjectWrapper.java | 55 -
.../client/console/commons/status/Status.java | 45 -
.../console/commons/status/StatusBean.java | 103 -
.../console/commons/status/StatusUtils.java | 324 ---
.../client/console/init/ConsoleInitializer.java | 72 -
.../init/ImplementationClassNamesLoader.java | 109 -
.../client/console/init/MIMETypesLoader.java | 69 -
.../console/init/SyncopeConsoleLoader.java | 35 -
.../client/console/pages/AbstractBasePage.java | 131 -
.../pages/AbstractSchedTaskModalPage.java | 132 -
.../console/pages/AbstractSchemaModalPage.java | 45 -
.../console/pages/AbstractStatusModalPage.java | 30 -
.../pages/AbstractSyncTaskModalPage.java | 209 --
.../console/pages/ActivitiModelerPopupPage.java | 27 -
.../client/console/pages/ApprovalModalPage.java | 286 --
.../client/console/pages/BaseModalPage.java | 35 -
.../syncope/client/console/pages/BasePage.java | 111 -
.../client/console/pages/BasePopupPage.java | 25 -
.../console/pages/BulkActionModalPage.java | 166 --
.../pages/BulkActionResultModalPage.java | 97 -
.../client/console/pages/ConfModalPage.java | 112 -
.../client/console/pages/Configuration.java | 814 ------
.../pages/ConfirmPasswordResetModalPage.java | 103 -
.../console/pages/ConnObjectModalPage.java | 101 -
.../console/pages/ConnectorModalPage.java | 479 ----
.../console/pages/DerSchemaModalPage.java | 140 -
.../pages/DisplayAttributesModalPage.java | 273 --
.../client/console/pages/EditUserModalPage.java | 105 -
.../syncope/client/console/pages/ErrorPage.java | 42 -
.../console/pages/ExecMessageModalPage.java | 32 -
.../console/pages/FailureMessageModalPage.java | 37 -
.../syncope/client/console/pages/HomePage.java | 33 -
.../client/console/pages/InfoModalPage.java | 43 -
.../syncope/client/console/pages/Login.java | 365 ---
.../syncope/client/console/pages/Logout.java | 38 -
.../console/pages/MembershipModalPage.java | 114 -
.../console/pages/NotificationModalPage.java | 441 ----
.../pages/NotificationTaskModalPage.java | 69 -
.../console/pages/PlainSchemaModalPage.java | 456 ----
.../client/console/pages/PolicyModalPage.java | 451 ----
.../console/pages/PropagationTaskModalPage.java | 45 -
.../console/pages/ProvisioningModalPage.java | 250 --
.../client/console/pages/PushTaskModalPage.java | 135 -
.../ReportExecResultDownloadModalPage.java | 73 -
.../client/console/pages/ReportModalPage.java | 640 -----
.../console/pages/ReportletConfModalPage.java | 362 ---
.../syncope/client/console/pages/Reports.java | 412 ---
.../pages/RequestPasswordResetModalPage.java | 153 --
.../client/console/pages/ResourceModalPage.java | 214 --
.../syncope/client/console/pages/Resources.java | 723 -----
.../console/pages/ResultStatusModalPage.java | 425 ---
.../client/console/pages/RoleModalPage.java | 162 --
.../console/pages/RoleSelectModalPage.java | 105 -
.../console/pages/RoleTemplateModalPage.java | 50 -
.../syncope/client/console/pages/Roles.java | 186 --
.../console/pages/SchedTaskModalPage.java | 68 -
.../syncope/client/console/pages/Schema.java | 467 ----
.../pages/SecurityQuestionModalPage.java | 111 -
.../client/console/pages/StatusModalPage.java | 644 -----
.../client/console/pages/SyncTaskModalPage.java | 73 -
.../client/console/pages/TaskModalPage.java | 253 --
.../syncope/client/console/pages/Tasks.java | 230 --
.../syncope/client/console/pages/Todo.java | 245 --
.../client/console/pages/UserModalPage.java | 229 --
.../console/pages/UserOwnerSelectModalPage.java | 81 -
.../client/console/pages/UserSelfModalPage.java | 72 -
.../console/pages/UserTemplateModalPage.java | 60 -
.../syncope/client/console/pages/Users.java | 166 --
.../client/console/pages/ViewUserModalPage.java | 49 -
.../console/pages/VirSchemaModalPage.java | 126 -
.../client/console/pages/WelcomePage.java | 55 -
.../console/pages/XMLEditorPopupPage.java | 90 -
.../console/panels/AbstractExtensionPanel.java | 39 -
.../panels/AbstractProvisioningTasksPanel.java | 160 --
.../console/panels/AbstractSearchPanel.java | 401 ---
.../panels/AbstractSearchResultPanel.java | 353 ---
.../client/console/panels/AbstractTasks.java | 55 -
.../console/panels/AccountInformationPanel.java | 73 -
.../console/panels/ActionDataTablePanel.java | 149 --
.../console/panels/AjaxDataTablePanel.java | 142 -
.../console/panels/AnnotatedBeanPanel.java | 66 -
.../console/panels/AttrTemplatesPanel.java | 167 --
.../client/console/panels/DataTablePanel.java | 113 -
.../client/console/panels/DerAttrsPanel.java | 206 --
.../console/panels/EventSelectionPanel.java | 243 --
.../client/console/panels/ImagePanel.java | 44 -
.../console/panels/JQueryUITabbedPanel.java | 45 -
.../client/console/panels/LayoutsPanel.java | 130 -
.../console/panels/LoggerCategoryPanel.java | 468 ----
.../client/console/panels/MembershipsPanel.java | 256 --
.../console/panels/NotificationPanel.java | 119 -
.../console/panels/NotificationTasks.java | 254 --
.../client/console/panels/PlainAttrsPanel.java | 395 ---
.../client/console/panels/PoliciesPanel.java | 343 ---
.../client/console/panels/PolicyBeanPanel.java | 328 ---
.../client/console/panels/PropagationTasks.java | 264 --
.../client/console/panels/PushTasksPanel.java | 184 --
.../console/panels/ResourceConnConfPanel.java | 187 --
.../console/panels/ResourceDetailsPanel.java | 306 ---
.../console/panels/ResourceMappingPanel.java | 644 -----
.../console/panels/ResourceSecurityPanel.java | 189 --
.../client/console/panels/ResourcesPanel.java | 178 --
.../client/console/panels/RoleDetailsPanel.java | 435 ---
.../client/console/panels/RolePanel.java | 187 --
.../client/console/panels/RoleSearchPanel.java | 101 -
.../console/panels/RoleSearchResultPanel.java | 172 --
.../console/panels/RoleSecurityPanel.java | 198 --
.../client/console/panels/RoleSummaryPanel.java | 153 --
.../client/console/panels/RoleTabPanel.java | 195 --
.../client/console/panels/SchedTasks.java | 286 --
.../client/console/panels/SearchClause.java | 129 -
.../client/console/panels/SearchView.java | 461 ----
.../console/panels/SecurityQuestionPanel.java | 98 -
.../panels/SelectOnlyUserSearchResultPanel.java | 93 -
.../console/panels/SelectedEventsPanel.java | 167 --
.../client/console/panels/StatusPanel.java | 263 --
.../client/console/panels/SyncTasksPanel.java | 226 --
.../client/console/panels/UserDetailsPanel.java | 122 -
.../client/console/panels/UserSearchPanel.java | 113 -
.../console/panels/UserSearchResultPanel.java | 297 ---
.../client/console/panels/VirAttrsPanel.java | 295 ---
.../console/resources/FilesystemResource.java | 83 -
.../resources/WorkflowDefGETResource.java | 58 -
.../resources/WorkflowDefPUTResource.java | 74 -
.../console/rest/AbstractSubjectRestClient.java | 46 -
.../client/console/rest/ApprovalRestClient.java | 45 -
.../client/console/rest/AuthRestClient.java | 44 -
.../client/console/rest/BaseRestClient.java | 70 -
.../console/rest/ConfigurationRestClient.java | 97 -
.../console/rest/ConnectorRestClient.java | 217 --
.../console/rest/ExecutionRestClient.java | 26 -
.../client/console/rest/InvalidPolicyType.java | 31 -
.../client/console/rest/LoggerRestClient.java | 92 -
.../console/rest/NotificationRestClient.java | 50 -
.../client/console/rest/PolicyRestClient.java | 104 -
.../client/console/rest/ReportRestClient.java | 108 -
.../client/console/rest/ResourceRestClient.java | 94 -
.../client/console/rest/RoleRestClient.java | 184 --
.../client/console/rest/SchemaRestClient.java | 250 --
.../rest/SecurityQuestionRestClient.java | 51 -
.../client/console/rest/TaskRestClient.java | 139 -
.../client/console/rest/UserRestClient.java | 228 --
.../client/console/rest/UserSelfRestClient.java | 96 -
.../client/console/rest/WorkflowRestClient.java | 69 -
.../ajax/form/AbstractAjaxDownloadBehavior.java | 48 -
.../markup/html/ClearIndicatingAjaxButton.java | 76 -
.../markup/html/ClearIndicatingAjaxLink.java | 61 -
.../html/IndicatingOnConfirmAjaxLink.java | 58 -
.../html/repeater/data/table/ActionColumn.java | 59 -
.../repeater/data/table/ActionResultColumn.java | 77 -
.../html/repeater/data/table/AttrColumn.java | 85 -
.../data/table/CheckBoxGroupSelectorPanel.java | 34 -
.../html/repeater/data/table/CheckBoxPanel.java | 43 -
.../repeater/data/table/CheckGroupColumn.java | 54 -
.../repeater/data/table/CollectionPanel.java | 47 -
.../data/table/CollectionPropertyColumn.java | 54 -
.../repeater/data/table/DatePropertyColumn.java | 53 -
.../html/repeater/data/table/TokenColumn.java | 51 -
.../wicket/markup/head/MetaHeaderItem.java | 49 -
.../wicket/markup/html/CrontabContainer.java | 184 --
.../markup/html/form/AbstractFieldPanel.java | 40 -
.../wicket/markup/html/form/ActionLink.java | 83 -
.../markup/html/form/ActionLinksPanel.java | 586 -----
.../markup/html/form/AjaxCheckBoxPanel.java | 130 -
.../markup/html/form/AjaxDecoratedCheckbox.java | 55 -
.../html/form/AjaxDropDownChoicePanel.java | 87 -
.../markup/html/form/AjaxPalettePanel.java | 70 -
.../html/form/AjaxPasswordFieldPanel.java | 60 -
.../markup/html/form/AjaxTextFieldPanel.java | 98 -
.../markup/html/form/BinaryFieldPanel.java | 211 --
.../form/CheckBoxMultipleChoiceFieldPanel.java | 46 -
.../wicket/markup/html/form/DateFieldPanel.java | 132 -
.../markup/html/form/DateTextFieldPanel.java | 88 -
.../markup/html/form/DateTimeFieldPanel.java | 195 --
.../wicket/markup/html/form/FieldPanel.java | 199 --
.../wicket/markup/html/form/LinkPanel.java | 39 -
.../markup/html/form/MappingPurposePanel.java | 133 -
.../markup/html/form/MultiFieldPanel.java | 172 --
.../wicket/markup/html/form/NonI18nPalette.java | 44 -
.../markup/html/form/SelectableRecorder.java | 204 --
.../markup/html/form/SpinnerFieldPanel.java | 197 --
.../form/preview/AbstractBinaryPreviewer.java | 46 -
.../html/form/preview/BinaryCertPreviewer.java | 70 -
.../html/form/preview/BinaryImagePreviewer.java | 51 -
.../markup/html/link/VeilPopupSettings.java | 32 -
.../wicket/markup/html/list/AltListView.java | 59 -
.../html/list/ConnConfPropertyListView.java | 152 --
.../tree/DefaultMutableTreeNodeExpansion.java | 160 --
.../DefaultMutableTreeNodeExpansionModel.java | 36 -
.../wicket/markup/html/tree/TreeRolePanel.java | 121 -
.../markup/html/tree/TreeRoleProvider.java | 43 -
.../META-INF/cxf/org.apache.cxf.Logger | 1 -
.../resources/META-INF/resources/css/bulk.css | 97 -
.../META-INF/resources/css/fieldstyle.css | 191 --
.../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 251 -> 0 bytes
.../css/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 1310 -> 0 bytes
.../ui-bg_flat_0_aaaaaa_40x100_greennotused.png | Bin 1312 -> 0 bytes
.../css/images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 120 -> 0 bytes
.../css/images/ui-bg_glass_65_ffffff_1x400.png | Bin 105 -> 0 bytes
.../css/images/ui-bg_glass_75_dadada_1x400.png | Bin 111 -> 0 bytes
.../css/images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 110 -> 0 bytes
.../css/images/ui-bg_glass_95_fef1ec_1x400.png | Bin 119 -> 0 bytes
.../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 1244 -> 0 bytes
...ghlight-soft_75_cccccc_1x100_greynotused.png | Bin 101 -> 0 bytes
...ui-bg_highlight-soft_75_cccccc_1x100_red.png | Bin 257 -> 0 bytes
.../css/images/ui-icons_222222_256x240.png | Bin 4369 -> 0 bytes
.../css/images/ui-icons_2e83ff_256x240.png | Bin 4369 -> 0 bytes
.../css/images/ui-icons_454545_256x240.png | Bin 4369 -> 0 bytes
.../css/images/ui-icons_888888_256x240.png | Bin 4369 -> 0 bytes
.../css/images/ui-icons_cd0a0a_256x240.png | Bin 4369 -> 0 bytes
.../resources/META-INF/resources/css/style.css | 550 ----
.../resources/img/actions/assign-icon.png | Bin 566 -> 0 bytes
.../resources/img/actions/both-icon.png | Bin 611 -> 0 bytes
.../META-INF/resources/img/actions/bulk.png | Bin 1182 -> 0 bytes
.../META-INF/resources/img/actions/claim.png | Bin 509 -> 0 bytes
.../META-INF/resources/img/actions/create.png | Bin 360 -> 0 bytes
.../META-INF/resources/img/actions/delete.png | Bin 530 -> 0 bytes
.../resources/img/actions/deprovision-icon.png | Bin 210 -> 0 bytes
.../META-INF/resources/img/actions/dryrun.png | Bin 891 -> 0 bytes
.../META-INF/resources/img/actions/edit.png | Bin 455 -> 0 bytes
.../META-INF/resources/img/actions/enable.png | Bin 715 -> 0 bytes
.../META-INF/resources/img/actions/execute.png | Bin 695 -> 0 bytes
.../META-INF/resources/img/actions/export.png | Bin 474 -> 0 bytes
.../resources/img/actions/link-icon.png | Bin 447 -> 0 bytes
.../resources/img/actions/manage-icon.png | Bin 611 -> 0 bytes
.../resources/img/actions/none-icon.png | Bin 521 -> 0 bytes
.../resources/img/actions/propagation-icon.png | Bin 362 -> 0 bytes
.../resources/img/actions/provision-icon.png | Bin 360 -> 0 bytes
.../resources/img/actions/reactivate.png | Bin 496 -> 0 bytes
.../META-INF/resources/img/actions/reload.png | Bin 491 -> 0 bytes
.../META-INF/resources/img/actions/reset.png | Bin 491 -> 0 bytes
.../resources/img/actions/resources-icon.png | Bin 634 -> 0 bytes
.../resources/img/actions/roles-icon.png | Bin 391 -> 0 bytes
.../META-INF/resources/img/actions/search.png | Bin 763 -> 0 bytes
.../META-INF/resources/img/actions/select.png | Bin 279 -> 0 bytes
.../resources/img/actions/settings-icon.png | Bin 153 -> 0 bytes
.../META-INF/resources/img/actions/suspend.png | Bin 504 -> 0 bytes
.../img/actions/synchronization-icon.png | Bin 406 -> 0 bytes
.../resources/img/actions/unassign-icon.png | Bin 573 -> 0 bytes
.../resources/img/actions/unlink-icon.png | Bin 509 -> 0 bytes
.../resources/img/actions/user_template.png | Bin 597 -> 0 bytes
.../resources/img/actions/users-icon.png | Bin 754 -> 0 bytes
.../resources/META-INF/resources/img/add.png | Bin 814 -> 0 bytes
.../resources/META-INF/resources/img/addAll.png | Bin 1037 -> 0 bytes
.../resources/META-INF/resources/img/busy.gif | Bin 2834 -> 0 bytes
.../META-INF/resources/img/db_export.png | Bin 16675 -> 0 bytes
.../META-INF/resources/img/disable.png | Bin 1001 -> 0 bytes
.../META-INF/resources/img/down-icon.png | Bin 418 -> 0 bytes
.../META-INF/resources/img/favicon.png | Bin 641 -> 0 bytes
.../META-INF/resources/img/file-download.png | Bin 967 -> 0 bytes
.../META-INF/resources/img/file-upload.png | Bin 949 -> 0 bytes
.../resources/META-INF/resources/img/help.png | Bin 808 -> 0 bytes
.../resources/META-INF/resources/img/info.png | Bin 575 -> 0 bytes
.../META-INF/resources/img/left-icon.png | Bin 451 -> 0 bytes
.../META-INF/resources/img/loading.gif | Bin 2530 -> 0 bytes
.../resources/META-INF/resources/img/logo.png | Bin 8913 -> 0 bytes
.../resources/img/menu/configuration.png | Bin 5670 -> 0 bytes
.../META-INF/resources/img/menu/connectors.png | Bin 5772 -> 0 bytes
.../META-INF/resources/img/menu/logout.png | Bin 5460 -> 0 bytes
.../resources/img/menu/notsel/configuration.png | Bin 5518 -> 0 bytes
.../resources/img/menu/notsel/connectors.png | Bin 6401 -> 0 bytes
.../resources/img/menu/notsel/logout.png | Bin 5720 -> 0 bytes
.../resources/img/menu/notsel/reports.png | Bin 6074 -> 0 bytes
.../resources/img/menu/notsel/resources.png | Bin 6401 -> 0 bytes
.../resources/img/menu/notsel/roles.png | Bin 5175 -> 0 bytes
.../resources/img/menu/notsel/schema.png | Bin 5544 -> 0 bytes
.../resources/img/menu/notsel/sf_body.png | Bin 303 -> 0 bytes
.../resources/img/menu/notsel/tasks.png | Bin 7461 -> 0 bytes
.../META-INF/resources/img/menu/notsel/todo.png | Bin 6996 -> 0 bytes
.../resources/img/menu/notsel/users.png | Bin 7637 -> 0 bytes
.../META-INF/resources/img/menu/reports.png | Bin 5553 -> 0 bytes
.../META-INF/resources/img/menu/resources.png | Bin 5772 -> 0 bytes
.../META-INF/resources/img/menu/roles.png | Bin 5020 -> 0 bytes
.../META-INF/resources/img/menu/schema.png | Bin 5217 -> 0 bytes
.../META-INF/resources/img/menu/tasks.png | Bin 5742 -> 0 bytes
.../META-INF/resources/img/menu/todo.png | Bin 5722 -> 0 bytes
.../META-INF/resources/img/menu/users.png | Bin 6006 -> 0 bytes
.../META-INF/resources/img/minus-icon.png | Bin 210 -> 0 bytes
.../META-INF/resources/img/modeler.png | Bin 3118 -> 0 bytes
.../META-INF/resources/img/moveDown.png | Bin 833 -> 0 bytes
.../resources/META-INF/resources/img/moveUp.png | Bin 834 -> 0 bytes
.../resources/META-INF/resources/img/ok.png | Bin 497 -> 0 bytes
.../resources/META-INF/resources/img/ping.png | Bin 22945 -> 0 bytes
.../META-INF/resources/img/plus-icon.png | Bin 360 -> 0 bytes
.../META-INF/resources/img/reload_30.png | Bin 611 -> 0 bytes
.../resources/META-INF/resources/img/remove.png | Bin 825 -> 0 bytes
.../META-INF/resources/img/removeAll.png | Bin 1034 -> 0 bytes
.../META-INF/resources/img/right-icon.png | Bin 411 -> 0 bytes
.../resources/META-INF/resources/img/search.png | Bin 763 -> 0 bytes
.../META-INF/resources/img/sf_testa.png | Bin 293 -> 0 bytes
.../META-INF/resources/img/statuses/active.png | Bin 509 -> 0 bytes
.../resources/img/statuses/inactive.png | Bin 477 -> 0 bytes
.../resources/img/statuses/objectnotfound.png | Bin 668 -> 0 bytes
.../resources/img/statuses/undefined.png | Bin 758 -> 0 bytes
.../META-INF/resources/img/success.png | Bin 1696 -> 0 bytes
.../resources/META-INF/resources/img/tab ok.png | Bin 2330 -> 0 bytes
.../META-INF/resources/img/tab old.png | Bin 734 -> 0 bytes
.../resources/META-INF/resources/img/tab.png | Bin 2098 -> 0 bytes
.../META-INF/resources/img/up-icon.png | Bin 421 -> 0 bytes
.../META-INF/resources/img/warning.png | Bin 1107 -> 0 bytes
.../resources/META-INF/resources/img/xml.png | Bin 2741 -> 0 bytes
.../main/resources/META-INF/web-fragment.xml | 70 -
.../client/console/src/main/resources/MIMETypes | 671 -----
.../src/main/resources/authorizations.xml | 333 ---
.../src/main/resources/console.properties | 22 -
.../src/main/resources/consoleContext.xml | 77 -
.../console/SyncopeApplication.properties | 55 -
.../console/SyncopeApplication_it.properties | 54 -
.../console/SyncopeApplication_pt_BR.properties | 54 -
.../console/pages/AbstractStatusModalPage.html | 122 -
.../pages/AbstractStatusModalPage.properties | 19 -
.../pages/AbstractStatusModalPage_it.properties | 19 -
.../AbstractStatusModalPage_pt_BR.properties | 19 -
.../console/pages/ActivitiModelerPopupPage.html | 65 -
.../client/console/pages/ApprovalModalPage.html | 52 -
.../console/pages/ApprovalModalPage.properties | 18 -
.../pages/ApprovalModalPage_it.properties | 18 -
.../pages/ApprovalModalPage_pt_BR.properties | 18 -
.../client/console/pages/BaseModalPage.html | 56 -
.../console/pages/BaseModalPage.properties | 20 -
.../console/pages/BaseModalPage_it.properties | 20 -
.../pages/BaseModalPage_pt_BR.properties | 20 -
.../syncope/client/console/pages/BasePage.html | 145 -
.../client/console/pages/BasePage.properties | 19 -
.../client/console/pages/BasePage_it.properties | 19 -
.../console/pages/BasePage_pt_BR.properties | 19 -
.../client/console/pages/BasePopupPage.html | 51 -
.../console/pages/BulkActionModalPage.html | 45 -
.../pages/BulkActionModalPage.properties | 17 -
.../pages/BulkActionModalPage_it.properties | 17 -
.../pages/BulkActionModalPage_pt_BR.properties | 17 -
.../pages/BulkActionResultModalPage.html | 57 -
.../pages/BulkActionResultModalPage.properties | 19 -
.../BulkActionResultModalPage_it.properties | 19 -
.../BulkActionResultModalPage_pt_BR.properties | 19 -
.../client/console/pages/ConfModalPage.html | 39 -
.../console/pages/ConfModalPage.properties | 17 -
.../console/pages/ConfModalPage_it.properties | 17 -
.../pages/ConfModalPage_pt_BR.properties | 17 -
.../client/console/pages/Configuration.html | 230 --
.../console/pages/Configuration.properties | 48 -
.../console/pages/Configuration_it.properties | 48 -
.../pages/Configuration_pt_BR.properties | 48 -
.../pages/ConfirmPasswordResetModalPage.html | 55 -
.../ConfirmPasswordResetModalPage.properties | 20 -
.../ConfirmPasswordResetModalPage_it.properties | 20 -
...nfirmPasswordResetModalPage_pt_BR.properties | 20 -
.../console/pages/ConnObjectModalPage.html | 39 -
.../pages/ConnObjectModalPage.properties | 17 -
.../pages/ConnObjectModalPage_it.properties | 17 -
.../pages/ConnObjectModalPage_pt_BR.properties | 17 -
.../console/pages/ConnectorModalPage.html | 161 --
.../console/pages/ConnectorModalPage.properties | 43 -
.../pages/ConnectorModalPage_it.properties | 43 -
.../pages/ConnectorModalPage_pt_BR.properties | 43 -
.../console/pages/DerSchemaModalPage.html | 64 -
.../console/pages/DerSchemaModalPage.properties | 22 -
.../pages/DerSchemaModalPage_it.properties | 22 -
.../pages/DerSchemaModalPage_pt_BR.properties | 22 -
.../pages/DisplayAttributesModalPage.html | 132 -
.../pages/DisplayAttributesModalPage.properties | 33 -
.../DisplayAttributesModalPage_it.properties | 33 -
.../DisplayAttributesModalPage_pt_BR.properties | 33 -
.../syncope/client/console/pages/ErrorPage.html | 53 -
.../console/pages/ExecMessageModalPage.html | 25 -
.../console/pages/FailureMessageModalPage.html | 36 -
.../syncope/client/console/pages/HomePage.html | 34 -
.../client/console/pages/InfoModalPage.html | 42 -
.../console/pages/InfoModalPage.properties | 19 -
.../console/pages/InfoModalPage_it.properties | 19 -
.../pages/InfoModalPage_pt_BR.properties | 19 -
.../syncope/client/console/pages/Login.html | 89 -
.../client/console/pages/Login.properties | 22 -
.../client/console/pages/Login_it.properties | 22 -
.../client/console/pages/Login_pt_BR.properties | 22 -
.../console/pages/MembershipModalPage.html | 55 -
.../pages/MembershipModalPage.properties | 35 -
.../pages/MembershipModalPage_it.properties | 35 -
.../pages/MembershipModalPage_pt_BR.properties | 35 -
.../console/pages/NotificationModalPage.html | 234 --
.../pages/NotificationModalPage.properties | 40 -
.../pages/NotificationModalPage_it.properties | 40 -
.../NotificationModalPage_pt_BR.properties | 40 -
.../pages/NotificationTaskModalPage.html | 111 -
.../pages/NotificationTaskModalPage.properties | 32 -
.../NotificationTaskModalPage_it.properties | 32 -
.../NotificationTaskModalPage_pt_BR.properties | 32 -
.../console/pages/PlainSchemaModalPage.html | 172 --
.../pages/PlainSchemaModalPage.properties | 38 -
.../pages/PlainSchemaModalPage_it.properties | 38 -
.../pages/PlainSchemaModalPage_pt_BR.properties | 38 -
.../client/console/pages/PolicyModalPage.html | 109 -
.../console/pages/PolicyModalPage.properties | 88 -
.../console/pages/PolicyModalPage_it.properties | 88 -
.../pages/PolicyModalPage_pt_BR.properties | 87 -
.../console/pages/PropagationTaskModalPage.html | 75 -
.../pages/PropagationTaskModalPage.properties | 28 -
.../PropagationTaskModalPage_it.properties | 28 -
.../PropagationTaskModalPage_pt_BR.properties | 28 -
.../client/console/pages/PushTaskModalPage.html | 228 --
.../console/pages/PushTaskModalPage.properties | 45 -
.../pages/PushTaskModalPage_it.properties | 47 -
.../pages/PushTaskModalPage_pt_BR.properties | 45 -
.../client/console/pages/RecursivePanel.html | 28 -
.../ReportExecResultDownloadModalPage.html | 23 -
...ReportExecResultDownloadModalPage.properties | 18 -
...ortExecResultDownloadModalPage_it.properties | 18 -
...ExecResultDownloadModalPage_pt_BR.properties | 18 -
.../client/console/pages/ReportModalPage.html | 146 --
.../console/pages/ReportModalPage.properties | 36 -
.../console/pages/ReportModalPage_it.properties | 36 -
.../pages/ReportModalPage_pt_BR.properties | 36 -
.../console/pages/ReportletConfModalPage.html | 85 -
.../pages/ReportletConfModalPage.properties | 22 -
.../pages/ReportletConfModalPage_it.properties | 22 -
.../ReportletConfModalPage_pt_BR.properties | 22 -
.../syncope/client/console/pages/Reports.html | 58 -
.../client/console/pages/Reports.properties | 24 -
.../client/console/pages/Reports_it.properties | 24 -
.../console/pages/Reports_pt_BR.properties | 24 -
.../pages/RequestPasswordResetModalPage.html | 64 -
.../RequestPasswordResetModalPage.properties | 21 -
.../RequestPasswordResetModalPage_it.properties | 21 -
...questPasswordResetModalPage_pt_BR.properties | 21 -
.../client/console/pages/ResourceModalPage.html | 64 -
.../console/pages/ResourceModalPage.properties | 60 -
.../pages/ResourceModalPage_it.properties | 60 -
.../pages/ResourceModalPage_pt_BR.properties | 60 -
.../syncope/client/console/pages/Resources.html | 99 -
.../client/console/pages/Resources.properties | 34 -
.../console/pages/Resources_it.properties | 34 -
.../console/pages/Resources_pt_BR.properties | 32 -
.../console/pages/ResultStatusModalPage.html | 226 --
.../pages/ResultStatusModalPage.properties | 26 -
.../pages/ResultStatusModalPage_it.properties | 26 -
.../ResultStatusModalPage_pt_BR.properties | 26 -
.../client/console/pages/RoleModalPage.html | 52 -
.../console/pages/RoleModalPage.properties | 48 -
.../console/pages/RoleModalPage_it.properties | 50 -
.../pages/RoleModalPage_pt_BR.properties | 48 -
.../console/pages/RoleSelectModalPage.html | 22 -
.../syncope/client/console/pages/Roles.html | 80 -
.../client/console/pages/Roles.properties | 26 -
.../client/console/pages/Roles_it.properties | 26 -
.../client/console/pages/Roles_pt_BR.properties | 26 -
.../client/console/pages/RouteModalPage.html | 49 -
.../console/pages/RouteModalPage.properties | 18 -
.../console/pages/RouteModalPage_it.properties | 18 -
.../pages/RouteModalPage_pt_BR.properties | 18 -
.../console/pages/SchedTaskModalPage.html | 136 -
.../console/pages/SchedTaskModalPage.properties | 36 -
.../pages/SchedTaskModalPage_it.properties | 36 -
.../pages/SchedTaskModalPage_pt_BR.properties | 36 -
.../console/pages/Schema$SchemaTypePanel.html | 41 -
.../syncope/client/console/pages/Schema.html | 59 -
.../client/console/pages/Schema.properties | 35 -
.../client/console/pages/Schema_it.properties | 35 -
.../console/pages/Schema_pt_BR.properties | 35 -
.../pages/SecurityQuestionModalPage.html | 46 -
.../pages/SecurityQuestionModalPage.properties | 18 -
.../SecurityQuestionModalPage_it.properties | 18 -
.../SecurityQuestionModalPage_pt_BR.properties | 18 -
.../client/console/pages/SyncTaskModalPage.html | 205 --
.../console/pages/SyncTaskModalPage.properties | 43 -
.../pages/SyncTaskModalPage_it.properties | 44 -
.../pages/SyncTaskModalPage_pt_BR.properties | 43 -
.../syncope/client/console/pages/Tasks.html | 46 -
.../client/console/pages/Tasks.properties | 21 -
.../client/console/pages/Tasks_it.properties | 21 -
.../client/console/pages/Tasks_pt_BR.properties | 21 -
.../syncope/client/console/pages/Todo.html | 45 -
.../client/console/pages/Todo.properties | 31 -
.../client/console/pages/Todo_it.properties | 31 -
.../client/console/pages/Todo_pt_BR.properties | 31 -
.../client/console/pages/UserModalPage.html | 97 -
.../console/pages/UserModalPage.properties | 52 -
.../console/pages/UserModalPage_it.properties | 53 -
.../pages/UserModalPage_pt_BR.properties | 52 -
.../console/pages/UserOwnerSelectModalPage.html | 38 -
.../pages/UserOwnerSelectModalPage.properties | 23 -
.../UserOwnerSelectModalPage_it.properties | 23 -
.../UserOwnerSelectModalPage_pt_BR.properties | 23 -
.../syncope/client/console/pages/Users.html | 72 -
.../client/console/pages/Users.properties | 26 -
.../client/console/pages/Users_it.properties | 26 -
.../client/console/pages/Users_pt_BR.properties | 26 -
.../console/pages/VirSchemaModalPage.html | 53 -
.../console/pages/VirSchemaModalPage.properties | 22 -
.../pages/VirSchemaModalPage_it.properties | 22 -
.../pages/VirSchemaModalPage_pt_BR.properties | 22 -
.../client/console/pages/WelcomePage.html | 70 -
.../client/console/pages/WelcomePage.properties | 18 -
.../console/pages/WelcomePage_it.properties | 18 -
.../console/pages/WelcomePage_pt_BR.properties | 18 -
.../console/pages/XMLEditorPopupPage.html | 82 -
.../console/pages/XMLEditorPopupPage.properties | 19 -
.../pages/XMLEditorPopupPage_it.properties | 19 -
.../pages/XMLEditorPopupPage_pt_BR.properties | 19 -
.../panels/AbstractProvisioningTasksPanel.html | 41 -
.../console/panels/AbstractSearchPanel.html | 50 -
.../panels/AbstractSearchResultPanel.html | 43 -
.../panels/AbstractSearchResultPanel.properties | 30 -
.../AbstractSearchResultPanel_it.properties | 30 -
.../AbstractSearchResultPanel_pt_BR.properties | 30 -
.../console/panels/AccountInformationPanel.html | 67 -
.../panels/AccountInformationPanel.properties | 22 -
.../AccountInformationPanel_it.properties | 23 -
.../AccountInformationPanel_pt_BR.properties | 23 -
.../console/panels/ActionDataTablePanel.html | 45 -
.../console/panels/AjaxDataTablePanel.html | 47 -
.../console/panels/AnnotatedBeanPanel.html | 98 -
.../panels/AnnotatedBeanPanel.properties | 20 -
.../panels/AnnotatedBeanPanel_it.properties | 20 -
.../panels/AnnotatedBeanPanel_pt_BR.properties | 20 -
.../console/panels/AttrTemplatesPanel.html | 58 -
.../panels/AttrTemplatesPanel.properties | 23 -
.../panels/AttrTemplatesPanel_it.properties | 23 -
.../panels/AttrTemplatesPanel_pt_BR.properties | 23 -
.../client/console/panels/AuditEventsPanel.html | 122 -
.../client/console/panels/DerAttrsPanel.html | 60 -
.../console/panels/DerAttrsPanel.properties | 17 -
.../console/panels/DerAttrsPanel_it.properties | 18 -
.../panels/DerAttrsPanel_pt_BR.properties | 17 -
.../console/panels/EventSelectionPanel.html | 125 -
.../client/console/panels/ImagePanel.html | 23 -
.../console/panels/JQueryUITabbedPanel.html | 41 -
.../client/console/panels/LayoutsPanel.html | 41 -
.../console/panels/LayoutsPanel.properties | 18 -
.../console/panels/LayoutsPanel_it.properties | 18 -
.../panels/LayoutsPanel_pt_BR.properties | 18 -
.../console/panels/LoggerCategoryPanel.html | 106 -
.../client/console/panels/MembershipsPanel.html | 66 -
.../console/panels/MembershipsPanel.properties | 23 -
.../panels/MembershipsPanel_it.properties | 24 -
.../panels/MembershipsPanel_pt_BR.properties | 23 -
.../console/panels/NotificationTasks.html | 38 -
.../console/panels/NotificationTasks.properties | 26 -
.../panels/NotificationTasks_it.properties | 26 -
.../panels/NotificationTasks_pt_BR.properties | 26 -
.../client/console/panels/PlainAttrsPanel.html | 44 -
.../client/console/panels/PoliciesPanel.html | 42 -
.../console/panels/PoliciesPanel.properties | 34 -
.../console/panels/PoliciesPanel_it.properties | 34 -
.../panels/PoliciesPanel_pt_BR.properties | 34 -
.../client/console/panels/PolicyBeanPanel.html | 39 -
.../client/console/panels/PropagationTasks.html | 37 -
.../console/panels/PropagationTasks.properties | 28 -
.../panels/PropagationTasks_it.properties | 28 -
.../panels/PropagationTasks_pt_BR.properties | 28 -
.../console/panels/PushTasksPanel.properties | 29 -
.../console/panels/PushTasksPanel_it.properties | 29 -
.../panels/PushTasksPanel_pt_BR.properties | 29 -
.../console/panels/ResourceConnConfPanel.html | 41 -
.../console/panels/ResourceDetailsPanel.html | 137 -
.../console/panels/ResourceMappingPanel.html | 125 -
.../console/panels/ResourceSecurityPanel.html | 56 -
.../panels/ResourceSecurityPanel.properties | 19 -
.../panels/ResourceSecurityPanel_it.properties | 19 -
.../ResourceSecurityPanel_pt_BR.properties | 19 -
.../client/console/panels/ResourcesPanel.html | 23 -
.../client/console/panels/RoleDetailsPanel.html | 107 -
.../console/panels/RoleDetailsPanel.properties | 22 -
.../panels/RoleDetailsPanel_it.properties | 22 -
.../panels/RoleDetailsPanel_pt_BR.properties | 22 -
.../client/console/panels/RolePanel.html | 88 -
.../client/console/panels/RolePanel.properties | 51 -
.../console/panels/RolePanel_it.properties | 53 -
.../console/panels/RolePanel_pt_BR.properties | 40 -
.../console/panels/RoleSecurityPanel.html | 66 -
.../console/panels/RoleSecurityPanel.properties | 20 -
.../panels/RoleSecurityPanel_it.properties | 20 -
.../panels/RoleSecurityPanel_pt_BR.properties | 20 -
.../client/console/panels/RoleSummaryPanel.html | 39 -
.../client/console/panels/RoleTabPanel.html | 64 -
.../console/panels/RoleTabPanel.properties | 27 -
.../console/panels/RoleTabPanel_it.properties | 27 -
.../panels/RoleTabPanel_pt_BR.properties | 27 -
.../client/console/panels/SchedTasks.html | 42 -
.../client/console/panels/SchedTasks.properties | 28 -
.../console/panels/SchedTasks_it.properties | 28 -
.../console/panels/SchedTasks_pt_BR.properties | 28 -
.../console/panels/SecurityQuestionPanel.html | 41 -
.../panels/SecurityQuestionPanel.properties | 18 -
.../panels/SecurityQuestionPanel_it.properties | 18 -
.../SecurityQuestionPanel_pt_BR.properties | 18 -
.../console/panels/SelectedEventsPanel.html | 33 -
.../client/console/panels/StatusPanel.html | 130 -
.../console/panels/StatusPanel.properties | 19 -
.../console/panels/StatusPanel_it.properties | 19 -
.../console/panels/StatusPanel_pt_BR.properties | 19 -
.../console/panels/SyncTasksPanel.properties | 29 -
.../console/panels/SyncTasksPanel_it.properties | 29 -
.../panels/SyncTasksPanel_pt_BR.properties | 29 -
.../client/console/panels/UserDetailsPanel.html | 71 -
.../console/panels/UserDetailsPanel.properties | 19 -
.../panels/UserDetailsPanel_it.properties | 19 -
.../panels/UserDetailsPanel_pt_BR.properties | 19 -
.../client/console/panels/VirAttrsPanel.html | 60 -
.../console/panels/VirAttrsPanel.properties | 19 -
.../console/panels/VirAttrsPanel_it.properties | 20 -
.../panels/VirAttrsPanel_pt_BR.properties | 19 -
.../data/table/CheckBoxGroupSelectorPanel.html | 21 -
.../html/repeater/data/table/CheckBoxPanel.html | 23 -
.../repeater/data/table/CollectionPanel.html | 25 -
.../markup/html/CrontabContainer.properties | 22 -
.../markup/html/CrontabContainer_it.properties | 22 -
.../html/CrontabContainer_pt_BR.properties | 22 -
.../markup/html/form/ActionLinksPanel.html | 163 --
.../markup/html/form/AjaxCheckBoxPanel.html | 21 -
.../html/form/AjaxDropDownChoicePanel.html | 24 -
.../markup/html/form/AjaxNumberFieldPanel.html | 22 -
.../markup/html/form/AjaxPalettePanel.html | 23 -
.../html/form/AjaxPasswordFieldPanel.html | 22 -
.../markup/html/form/AjaxTextFieldPanel.html | 23 -
.../markup/html/form/BinaryFieldPanel.html | 44 -
.../form/CheckBoxMultipleChoiceFieldPanel.html | 23 -
.../markup/html/form/DateTextFieldPanel.html | 22 -
.../markup/html/form/DateTimeFieldPanel.html | 21 -
.../html/form/DateTimeFieldPanel.properties | 17 -
.../html/form/DateTimeFieldPanel_it.properties | 17 -
.../form/DateTimeFieldPanel_pt_BR.properties | 17 -
.../wicket/markup/html/form/FieldPanel.html | 34 -
.../wicket/markup/html/form/LinkPanel.html | 23 -
.../markup/html/form/MappingPurposePanel.html | 31 -
.../markup/html/form/MultiFieldPanel.html | 35 -
.../markup/html/form/MultiFieldPanel.properties | 22 -
.../html/form/MultiFieldPanel_it.properties | 22 -
.../html/form/MultiFieldPanel_pt_BR.properties | 22 -
.../wicket/markup/html/form/NonI18nPalette.html | 69 -
.../markup/html/form/SpinnerFieldPanel.html | 29 -
.../form/preview/AbstractBinaryPreviewer.html | 24 -
.../html/form/preview/BinaryCertPreviewer.html | 24 -
.../html/form/preview/BinaryImagePreviewer.html | 23 -
.../wicket/markup/html/tree/TreeRolePanel.html | 23 -
syncope620/client/lib/pom.xml | 79 -
.../client/lib/RestClientExceptionMapper.java | 126 -
.../client/lib/RestClientFactoryBean.java | 67 -
.../syncope/client/lib/SyncopeClient.java | 214 --
.../client/lib/SyncopeClientFactoryBean.java | 202 --
syncope620/client/pom.xml | 42 -
syncope620/common/lib/pom.xml | 94 -
.../syncope/common/lib/AbstractBaseBean.java | 54 -
.../common/lib/AttributableOperations.java | 508 ----
.../lib/SyncopeClientCompositeException.java | 96 -
.../common/lib/SyncopeClientException.java | 97 -
.../syncope/common/lib/SyncopeConstants.java | 52 -
.../common/lib/annotation/ClassList.java | 26 -
.../lib/annotation/FormAttributeField.java | 36 -
.../common/lib/annotation/SchemaList.java | 28 -
.../common/lib/mod/AbstractAttributableMod.java | 111 -
.../common/lib/mod/AbstractSubjectMod.java | 56 -
.../apache/syncope/common/lib/mod/AttrMod.java | 76 -
.../syncope/common/lib/mod/MembershipMod.java | 46 -
.../syncope/common/lib/mod/ReferenceMod.java | 53 -
.../common/lib/mod/ResourceAssociationMod.java | 80 -
.../apache/syncope/common/lib/mod/RoleMod.java | 300 ---
.../syncope/common/lib/mod/StatusMod.java | 108 -
.../apache/syncope/common/lib/mod/UserMod.java | 123 -
.../syncope/common/lib/mod/package-info.java | 23 -
.../apache/syncope/common/lib/package-info.java | 22 -
.../lib/report/AbstractReportletConf.java | 51 -
.../common/lib/report/ReportletConf.java | 32 -
.../common/lib/report/RoleReportletConf.java | 109 -
.../common/lib/report/StaticReportletConf.java | 107 -
.../common/lib/report/UserReportletConf.java | 114 -
.../syncope/common/lib/report/package-info.java | 23 -
.../common/lib/search/OrderByClauseBuilder.java | 45 -
.../search/RoleFiqlSearchConditionBuilder.java | 90 -
.../syncope/common/lib/search/RoleProperty.java | 29 -
.../common/lib/search/SearchableFields.java | 69 -
.../syncope/common/lib/search/SpecialAttr.java | 50 -
.../SyncopeFiqlSearchConditionBuilder.java | 110 -
.../common/lib/search/SyncopeProperty.java | 37 -
.../search/UserFiqlSearchConditionBuilder.java | 95 -
.../syncope/common/lib/search/UserProperty.java | 29 -
.../syncope/common/lib/search/package-info.java | 23 -
.../common/lib/to/AbstractAnnotatedBean.java | 108 -
.../common/lib/to/AbstractAttributableTO.java | 86 -
.../syncope/common/lib/to/AbstractExecTO.java | 87 -
.../syncope/common/lib/to/AbstractPolicyTO.java | 89 -
.../lib/to/AbstractProvisioningTaskTO.java | 117 -
.../syncope/common/lib/to/AbstractSchemaTO.java | 44 -
.../common/lib/to/AbstractSubjectTO.java | 68 -
.../syncope/common/lib/to/AbstractTaskTO.java | 98 -
.../syncope/common/lib/to/AccountPolicyTO.java | 68 -
.../apache/syncope/common/lib/to/AttrTO.java | 92 -
.../syncope/common/lib/to/BulkAction.java | 70 -
.../syncope/common/lib/to/BulkActionResult.java | 134 -
.../apache/syncope/common/lib/to/ConfTO.java | 30 -
.../syncope/common/lib/to/ConnBundleTO.java | 95 -
.../common/lib/to/ConnIdObjectClassTO.java | 72 -
.../syncope/common/lib/to/ConnInstanceTO.java | 177 --
.../syncope/common/lib/to/ConnObjectTO.java | 58 -
.../syncope/common/lib/to/ConnPoolConfTO.java | 81 -
.../syncope/common/lib/to/DerSchemaTO.java | 39 -
.../apache/syncope/common/lib/to/ErrorTO.java | 66 -
.../syncope/common/lib/to/EventCategoryTO.java | 89 -
.../apache/syncope/common/lib/to/LoggerTO.java | 51 -
.../syncope/common/lib/to/MappingItemTO.java | 134 -
.../apache/syncope/common/lib/to/MappingTO.java | 117 -
.../syncope/common/lib/to/MembershipTO.java | 49 -
.../syncope/common/lib/to/NotificationTO.java | 175 --
.../common/lib/to/NotificationTaskTO.java | 105 -
.../syncope/common/lib/to/PagedResult.java | 98 -
.../syncope/common/lib/to/PasswordPolicyTO.java | 54 -
.../syncope/common/lib/to/PlainSchemaTO.java | 156 --
.../common/lib/to/PropagationStatus.java | 152 --
.../common/lib/to/PropagationTaskTO.java | 123 -
.../syncope/common/lib/to/PushTaskTO.java | 49 -
.../syncope/common/lib/to/ReportExecTO.java | 40 -
.../apache/syncope/common/lib/to/ReportTO.java | 151 --
.../syncope/common/lib/to/ResourceTO.java | 270 --
.../apache/syncope/common/lib/to/RoleTO.java | 258 --
.../syncope/common/lib/to/SchedTaskTO.java | 101 -
.../common/lib/to/SecurityQuestionTO.java | 51 -
.../syncope/common/lib/to/SyncPolicyTO.java | 54 -
.../syncope/common/lib/to/SyncTaskTO.java | 59 -
.../apache/syncope/common/lib/to/SyncopeTO.java | 216 --
.../syncope/common/lib/to/TaskExecTO.java | 39 -
.../apache/syncope/common/lib/to/UserTO.java | 183 --
.../syncope/common/lib/to/VirSchemaTO.java | 38 -
.../common/lib/to/WorkflowFormPropertyTO.java | 119 -
.../syncope/common/lib/to/WorkflowFormTO.java | 152 --
.../syncope/common/lib/to/package-info.java | 23 -
.../lib/types/AbstractCommonsLangType.java | 47 -
.../common/lib/types/AccountPolicySpec.java | 188 --
.../common/lib/types/AttrSchemaType.java | 51 -
.../common/lib/types/AttributableType.java | 31 -
.../syncope/common/lib/types/AuditElements.java | 61 -
.../common/lib/types/AuditLoggerName.java | 222 --
.../common/lib/types/CipherAlgorithm.java | 54 -
.../common/lib/types/ClientExceptionType.java | 102 -
.../lib/types/ConflictResolutionAction.java | 34 -
.../common/lib/types/ConnConfPropSchema.java | 122 -
.../common/lib/types/ConnConfProperty.java | 69 -
.../common/lib/types/ConnectorCapability.java | 39 -
.../common/lib/types/EntityViolationType.java | 73 -
.../common/lib/types/IntMappingType.java | 201 --
.../syncope/common/lib/types/LoggerLevel.java | 49 -
.../syncope/common/lib/types/LoggerType.java | 46 -
.../common/lib/types/MappingPurpose.java | 28 -
.../syncope/common/lib/types/MatchingRule.java | 54 -
.../common/lib/types/PasswordPolicySpec.java | 367 ---
.../syncope/common/lib/types/PolicySpec.java | 25 -
.../syncope/common/lib/types/PolicyType.java | 65 -
.../common/lib/types/PropagationByResource.java | 364 ---
.../common/lib/types/PropagationMode.java | 29 -
.../lib/types/PropagationTaskExecStatus.java | 47 -
.../lib/types/ReportExecExportFormat.java | 32 -
.../common/lib/types/ReportExecStatus.java | 34 -
.../types/ResourceAssociationActionType.java | 39 -
.../types/ResourceDeassociationActionType.java | 39 -
.../common/lib/types/ResourceOperation.java | 31 -
.../syncope/common/lib/types/SchemaType.java | 68 -
.../syncope/common/lib/types/SubjectType.java | 34 -
.../common/lib/types/SyncPolicySpec.java | 97 -
.../syncope/common/lib/types/TaskType.java | 54 -
.../syncope/common/lib/types/TraceLevel.java | 43 -
.../common/lib/types/UnmatchingRule.java | 47 -
.../lib/types/WorkflowFormPropertyType.java | 32 -
.../syncope/common/lib/types/WorkflowTasks.java | 47 -
.../syncope/common/lib/types/package-info.java | 23 -
.../common/lib/wrap/AbstractWrappable.java | 46 -
.../syncope/common/lib/wrap/EntitlementTO.java | 30 -
.../common/lib/wrap/ReportletConfClass.java | 30 -
.../syncope/common/lib/wrap/ResourceName.java | 30 -
.../syncope/common/lib/wrap/SubjectKey.java | 25 -
.../syncope/common/lib/wrap/package-info.java | 23 -
.../org/apache/syncope/common/lib/JSONTest.java | 63 -
syncope620/common/pom.xml | 41 -
syncope620/common/rest-api/pom.xml | 97 -
.../common/rest/api/CollectionWrapper.java | 80 -
.../syncope/common/rest/api/Preference.java | 59 -
.../syncope/common/rest/api/RESTHeaders.java | 79 -
.../rest/api/service/ConfigurationService.java | 89 -
.../rest/api/service/ConnectorService.java | 201 --
.../rest/api/service/EntitlementService.java | 53 -
.../common/rest/api/service/JAXRSService.java | 39 -
.../common/rest/api/service/LoggerService.java | 98 -
.../rest/api/service/NotificationService.java | 97 -
.../common/rest/api/service/PolicyService.java | 117 -
.../common/rest/api/service/ReportService.java | 195 --
.../rest/api/service/ResourceService.java | 162 --
.../common/rest/api/service/RoleService.java | 312 ---
.../common/rest/api/service/SchemaService.java | 119 -
.../api/service/SecurityQuestionService.java | 110 -
.../common/rest/api/service/SyncopeService.java | 33 -
.../common/rest/api/service/TaskService.java | 211 --
.../rest/api/service/UserSelfService.java | 127 -
.../common/rest/api/service/UserService.java | 321 ---
.../rest/api/service/UserWorkflowService.java | 108 -
.../rest/api/service/WorkflowService.java | 70 -
syncope620/core/logic/pom.xml | 181 --
.../syncope/core/logic/AbstractLogic.java | 58 -
.../core/logic/AbstractResourceAssociator.java | 37 -
.../core/logic/AbstractSubjectLogic.java | 43 -
.../core/logic/AbstractTransactionalLogic.java | 31 -
.../syncope/core/logic/ConfigurationLogic.java | 112 -
.../syncope/core/logic/ConnectorLogic.java | 341 ---
.../syncope/core/logic/EntitlementLogic.java | 58 -
.../apache/syncope/core/logic/LoggerLogic.java | 307 ---
.../core/logic/LogicInvocationHandler.java | 108 -
.../syncope/core/logic/NotificationLogic.java | 127 -
.../apache/syncope/core/logic/PolicyLogic.java | 187 --
.../apache/syncope/core/logic/ReportLogic.java | 391 ---
.../syncope/core/logic/ResourceLogic.java | 273 --
.../apache/syncope/core/logic/RoleLogic.java | 405 ---
.../apache/syncope/core/logic/SchemaLogic.java | 325 ---
.../core/logic/SecurityQuestionLogic.java | 150 --
.../apache/syncope/core/logic/SyncopeLogic.java | 168 --
.../apache/syncope/core/logic/TaskLogic.java | 387 ---
.../logic/UnresolvedReferenceException.java | 35 -
.../apache/syncope/core/logic/UserLogic.java | 522 ----
.../syncope/core/logic/UserWorkflowLogic.java | 131 -
.../syncope/core/logic/WorkflowLogic.java | 116 -
.../logic/audit/AuditConnectionFactory.java | 159 --
.../init/ImplementationClassNamesLoader.java | 147 --
.../core/logic/init/JobInstanceLoaderImpl.java | 271 --
.../syncope/core/logic/init/LoggerLoader.java | 98 -
.../core/logic/init/LogicInitializer.java | 72 -
.../logic/notification/NotificationJob.java | 283 --
.../core/logic/report/AbstractReportlet.java | 66 -
.../core/logic/report/ReportException.java | 32 -
.../syncope/core/logic/report/ReportJob.java | 203 --
.../core/logic/report/ReportXMLConst.java | 44 -
.../syncope/core/logic/report/Reportlet.java | 47 -
.../core/logic/report/ReportletConfClass.java | 32 -
.../core/logic/report/RoleReportlet.java | 327 ---
.../core/logic/report/StaticReportlet.java | 120 -
.../core/logic/report/TextSerializer.java | 101 -
.../core/logic/report/UserReportlet.java | 359 ---
.../logic/src/main/resources/logic.properties | 18 -
.../logic/src/main/resources/logicContext.xml | 42 -
.../src/main/resources/report/report2csv.xsl | 36 -
.../src/main/resources/report/report2fo.xsl | 97 -
.../src/main/resources/report/report2html.xsl | 77 -
.../main/resources/report/roleReportlet2csv.xsl | 118 -
.../main/resources/report/roleReportlet2fo.xsl | 228 --
.../resources/report/roleReportlet2html.xsl | 196 --
.../resources/report/staticReportlet2csv.xsl | 81 -
.../resources/report/staticReportlet2fo.xsl | 84 -
.../resources/report/staticReportlet2html.xsl | 74 -
.../main/resources/report/userReportlet2csv.xsl | 119 -
.../main/resources/report/userReportlet2fo.xsl | 247 --
.../resources/report/userReportlet2html.xsl | 219 --
.../syncope/core/logic/NotificationTest.java | 644 -----
.../core/logic/src/test/resources/logicTest.xml | 46 -
syncope620/core/misc/pom.xml | 126 -
.../apache/syncope/core/misc/AuditManager.java | 109 -
.../syncope/core/misc/ConnObjectUtil.java | 767 ------
.../apache/syncope/core/misc/DataFormat.java | 117 -
.../apache/syncope/core/misc/ExceptionUtil.java | 47 -
.../apache/syncope/core/misc/MappingUtil.java | 738 ------
.../core/misc/jexl/ClassFreeUberspectImpl.java | 43 -
.../core/misc/jexl/EmptyClassLoader.java | 36 -
.../apache/syncope/core/misc/jexl/JexlUtil.java | 289 --
.../core/misc/policy/AccountPolicyEnforcer.java | 102 -
.../misc/policy/AccountPolicyException.java | 32 -
.../InvalidPasswordPolicySpecException.java | 37 -
.../misc/policy/PasswordPolicyEnforcer.java | 197 --
.../misc/policy/PasswordPolicyException.java | 32 -
.../misc/policy/PolicyEnforceException.java | 32 -
.../core/misc/policy/PolicyEnforcer.java | 30 -
.../core/misc/policy/PolicyEvaluator.java | 109 -
.../core/misc/policy/PolicyException.java | 32 -
.../syncope/core/misc/policy/PolicyPattern.java | 50 -
.../core/misc/search/SearchCondConverter.java | 50 -
.../core/misc/search/SearchCondVisitor.java | 203 --
.../core/misc/security/AuthContextUtil.java | 74 -
.../syncope/core/misc/security/Encryptor.java | 256 --
.../core/misc/security/PasswordGenerator.java | 321 ---
.../core/misc/security/SecureRandomUtil.java | 48 -
.../security/SyncopeAuthenticationProvider.java | 296 ---
.../security/SyncopeUserDetailsService.java | 102 -
.../security/UnauthorizedRoleException.java | 42 -
.../serialization/AttributeDeserializer.java | 84 -
.../misc/serialization/AttributeSerializer.java | 78 -
.../GuardedStringDeserializer.java | 94 -
.../serialization/GuardedStringSerializer.java | 90 -
.../core/misc/serialization/POJOHelper.java | 80 -
.../serialization/SyncTokenDeserializer.java | 65 -
.../misc/serialization/SyncTokenSerializer.java | 58 -
.../serialization/UnwrappedObjectMapper.java | 95 -
.../misc/spring/ApplicationContextProvider.java | 47 -
.../syncope/core/misc/spring/BeanUtils.java | 201 --
.../misc/spring/ResourceWithFallbackLoader.java | 82 -
.../misc/src/main/resources/security.properties | 30 -
.../misc/src/main/resources/securityContext.xml | 68 -
.../misc/search/SearchCondConverterTest.java | 165 --
.../core/misc/security/EncryptorTest.java | 58 -
.../misc/security/PasswordGeneratorTest.java | 124 -
syncope620/core/persistence-api/pom.xml | 78 -
.../persistence/api/RoleEntitlementUtil.java | 88 -
.../core/persistence/api/SyncopeLoader.java | 35 -
.../validation/InvalidEntityException.java | 129 -
.../InvalidPlainAttrValueException.java | 43 -
.../validation/ParsingValidationException.java | 30 -
.../api/attrvalue/validation/Validator.java | 27 -
.../api/content/ContentExporter.java | 29 -
.../persistence/api/content/ContentLoader.java | 25 -
.../persistence/api/dao/AttrTemplateDAO.java | 34 -
.../core/persistence/api/dao/ConfDAO.java | 35 -
.../persistence/api/dao/ConnInstanceDAO.java | 34 -
.../syncope/core/persistence/api/dao/DAO.java | 32 -
.../core/persistence/api/dao/DerAttrDAO.java | 36 -
.../core/persistence/api/dao/DerSchemaDAO.java | 38 -
.../persistence/api/dao/DuplicateException.java | 35 -
.../persistence/api/dao/EntitlementDAO.java | 39 -
.../api/dao/ExternalResourceDAO.java | 47 -
.../core/persistence/api/dao/LoggerDAO.java | 37 -
.../core/persistence/api/dao/MembershipDAO.java | 41 -
.../persistence/api/dao/NotFoundException.java | 35 -
.../persistence/api/dao/NotificationDAO.java | 34 -
.../core/persistence/api/dao/PlainAttrDAO.java | 30 -
.../persistence/api/dao/PlainAttrValueDAO.java | 36 -
.../persistence/api/dao/PlainSchemaDAO.java | 38 -
.../core/persistence/api/dao/PolicyDAO.java | 48 -
.../core/persistence/api/dao/ReportDAO.java | 41 -
.../core/persistence/api/dao/ReportExecDAO.java | 41 -
.../core/persistence/api/dao/RoleDAO.java | 92 -
.../api/dao/SecurityQuestionDAO.java | 35 -
.../core/persistence/api/dao/SubjectDAO.java | 44 -
.../persistence/api/dao/SubjectSearchDAO.java | 86 -
.../core/persistence/api/dao/TaskDAO.java | 52 -
.../core/persistence/api/dao/TaskExecDAO.java | 44 -
.../core/persistence/api/dao/UserDAO.java | 68 -
.../core/persistence/api/dao/VirAttrDAO.java | 36 -
.../core/persistence/api/dao/VirSchemaDAO.java | 38 -
.../api/dao/search/AbstractSearchCond.java | 48 -
.../api/dao/search/AttributeCond.java | 84 -
.../api/dao/search/EntitlementCond.java | 39 -
.../api/dao/search/MembershipCond.java | 46 -
.../api/dao/search/OrderByClause.java | 69 -
.../api/dao/search/ResourceCond.java | 42 -
.../persistence/api/dao/search/SearchCond.java | 254 --
.../persistence/api/dao/search/SubjectCond.java | 34 -
.../persistence/api/entity/AccountPolicy.java | 32 -
.../persistence/api/entity/AnnotatedEntity.java | 40 -
.../core/persistence/api/entity/Attr.java | 30 -
.../persistence/api/entity/AttrTemplate.java | 32 -
.../persistence/api/entity/Attributable.java | 48 -
.../api/entity/AttributableUtil.java | 91 -
.../api/entity/AttributableUtilFactory.java | 33 -
.../persistence/api/entity/ConnInstance.java | 71 -
.../persistence/api/entity/ConnPoolConf.java | 42 -
.../core/persistence/api/entity/DerAttr.java | 26 -
.../core/persistence/api/entity/DerSchema.java | 26 -
.../persistence/api/entity/Entitlement.java | 29 -
.../core/persistence/api/entity/Entity.java | 26 -
.../persistence/api/entity/EntityFactory.java | 28 -
.../core/persistence/api/entity/Exec.java | 45 -
.../api/entity/ExternalResource.java | 111 -
.../core/persistence/api/entity/Logger.java | 35 -
.../core/persistence/api/entity/Mapping.java | 42 -
.../persistence/api/entity/MappingItem.java | 57 -
.../persistence/api/entity/Notification.java | 82 -
.../persistence/api/entity/PasswordPolicy.java | 23 -
.../core/persistence/api/entity/PlainAttr.java | 37 -
.../api/entity/PlainAttrUniqueValue.java | 26 -
.../persistence/api/entity/PlainAttrValue.java | 62 -
.../persistence/api/entity/PlainSchema.java | 67 -
.../core/persistence/api/entity/Policy.java | 35 -
.../core/persistence/api/entity/PushPolicy.java | 23 -
.../core/persistence/api/entity/Report.java | 45 -
.../core/persistence/api/entity/ReportExec.java | 34 -
.../api/entity/ReportletConfInstance.java | 33 -
.../core/persistence/api/entity/Schema.java | 37 -
.../core/persistence/api/entity/Subject.java | 32 -
.../core/persistence/api/entity/SyncPolicy.java | 23 -
.../core/persistence/api/entity/VirAttr.java | 30 -
.../core/persistence/api/entity/VirSchema.java | 24 -
.../persistence/api/entity/conf/CPlainAttr.java | 39 -
.../api/entity/conf/CPlainAttrUniqueValue.java | 31 -
.../api/entity/conf/CPlainAttrValue.java | 28 -
.../api/entity/conf/CPlainSchema.java | 25 -
.../core/persistence/api/entity/conf/Conf.java | 39 -
.../api/entity/membership/MDerAttr.java | 34 -
.../api/entity/membership/MDerAttrTemplate.java | 25 -
.../api/entity/membership/MDerSchema.java | 25 -
.../api/entity/membership/MPlainAttr.java | 42 -
.../entity/membership/MPlainAttrTemplate.java | 25 -
.../membership/MPlainAttrUniqueValue.java | 31 -
.../api/entity/membership/MPlainAttrValue.java | 28 -
.../api/entity/membership/MPlainSchema.java | 25 -
.../api/entity/membership/MVirAttr.java | 34 -
.../api/entity/membership/MVirAttrTemplate.java | 25 -
.../api/entity/membership/MVirSchema.java | 25 -
.../api/entity/membership/Membership.java | 53 -
.../persistence/api/entity/role/RDerAttr.java | 34 -
.../api/entity/role/RDerAttrTemplate.java | 25 -
.../persistence/api/entity/role/RDerSchema.java | 25 -
.../persistence/api/entity/role/RMapping.java | 25 -
.../api/entity/role/RMappingItem.java | 29 -
.../persistence/api/entity/role/RPlainAttr.java | 42 -
.../api/entity/role/RPlainAttrTemplate.java | 25 -
.../api/entity/role/RPlainAttrUniqueValue.java | 31 -
.../api/entity/role/RPlainAttrValue.java | 28 -
.../api/entity/role/RPlainSchema.java | 25 -
.../persistence/api/entity/role/RVirAttr.java | 34 -
.../api/entity/role/RVirAttrTemplate.java | 25 -
.../persistence/api/entity/role/RVirSchema.java | 25 -
.../core/persistence/api/entity/role/Role.java | 168 --
.../api/entity/task/NotificationTask.java | 55 -
.../api/entity/task/PropagationTask.java | 65 -
.../api/entity/task/ProvisioningTask.java | 58 -
.../persistence/api/entity/task/PushTask.java | 30 -
.../persistence/api/entity/task/SchedTask.java | 38 -
.../persistence/api/entity/task/SyncTask.java | 37 -
.../core/persistence/api/entity/task/Task.java | 34 -
.../persistence/api/entity/task/TaskExec.java | 28 -
.../persistence/api/entity/task/TaskUtil.java | 36 -
.../api/entity/task/TaskUtilFactory.java | 33 -
.../api/entity/user/SecurityQuestion.java | 28 -
.../persistence/api/entity/user/UDerAttr.java | 31 -
.../persistence/api/entity/user/UDerSchema.java | 25 -
.../persistence/api/entity/user/UMapping.java | 28 -
.../api/entity/user/UMappingItem.java | 29 -
.../persistence/api/entity/user/UPlainAttr.java | 38 -
.../api/entity/user/UPlainAttrUniqueValue.java | 31 -
.../api/entity/user/UPlainAttrValue.java | 28 -
.../api/entity/user/UPlainSchema.java | 25 -
.../persistence/api/entity/user/UVirAttr.java | 31 -
.../persistence/api/entity/user/UVirSchema.java | 25 -
.../core/persistence/api/entity/user/User.java | 150 --
syncope620/core/persistence-jpa/pom.xml | 222 --
.../attrvalue/validation/AbstractValidator.java | 54 -
.../validation/AlwaysTrueValidator.java | 40 -
.../attrvalue/validation/BasicValidator.java | 54 -
.../validation/EmailAddressValidator.java | 42 -
.../jpa/content/AbstractContentDealer.java | 88 -
.../jpa/content/ContentLoaderHandler.java | 201 --
.../jpa/content/MultiParentNode.java | 106 -
.../jpa/content/MultiParentNodeOp.java | 49 -
.../jpa/content/XMLContentExporter.java | 398 ---
.../jpa/content/XMLContentLoader.java | 94 -
.../core/persistence/jpa/dao/AbstractDAO.java | 117 -
.../persistence/jpa/dao/AbstractSubjectDAO.java | 347 ---
.../persistence/jpa/dao/JPAAttrTemplateDAO.java | 107 -
.../core/persistence/jpa/dao/JPAConfDAO.java | 109 -
.../persistence/jpa/dao/JPAConnInstanceDAO.java | 90 -
.../core/persistence/jpa/dao/JPADerAttrDAO.java | 86 -
.../persistence/jpa/dao/JPADerSchemaDAO.java | 132 -
.../persistence/jpa/dao/JPAEntitlementDAO.java | 88 -
.../jpa/dao/JPAExternalResourceDAO.java | 254 --
.../core/persistence/jpa/dao/JPALoggerDAO.java | 69 -
.../persistence/jpa/dao/JPAMembershipDAO.java | 103 -
.../persistence/jpa/dao/JPANotificationDAO.java | 53 -
.../persistence/jpa/dao/JPAPlainAttrDAO.java | 76 -
.../jpa/dao/JPAPlainAttrValueDAO.java | 104 -
.../persistence/jpa/dao/JPAPlainSchemaDAO.java | 141 -
.../core/persistence/jpa/dao/JPAPolicyDAO.java | 150 --
.../core/persistence/jpa/dao/JPAReportDAO.java | 90 -
.../persistence/jpa/dao/JPAReportExecDAO.java | 101 -
.../core/persistence/jpa/dao/JPARoleDAO.java | 584 -----
.../jpa/dao/JPASecurityQuestionDAO.java | 71 -
.../jpa/dao/JPASubjectSearchDAO.java | 736 ------
.../core/persistence/jpa/dao/JPATaskDAO.java | 185 --
.../persistence/jpa/dao/JPATaskExecDAO.java | 118 -
.../core/persistence/jpa/dao/JPAUserDAO.java | 287 --
.../core/persistence/jpa/dao/JPAVirAttrDAO.java | 86 -
.../persistence/jpa/dao/JPAVirSchemaDAO.java | 131 -
.../persistence/jpa/dao/OrderBySupport.java | 47 -
.../core/persistence/jpa/dao/SearchSupport.java | 132 -
.../jpa/entity/AbstractAnnotatedEntity.java | 113 -
.../jpa/entity/AbstractAttrTemplate.java | 28 -
.../jpa/entity/AbstractAttributable.java | 106 -
.../persistence/jpa/entity/AbstractDerAttr.java | 52 -
.../jpa/entity/AbstractDerAttrTemplate.java | 41 -
.../jpa/entity/AbstractDerSchema.java | 85 -
.../persistence/jpa/entity/AbstractEntity.java | 111 -
.../persistence/jpa/entity/AbstractExec.java | 114 -
.../persistence/jpa/entity/AbstractMapping.java | 76 -
.../jpa/entity/AbstractMappingItem.java | 190 --
.../jpa/entity/AbstractPlainAttr.java | 81 -
.../jpa/entity/AbstractPlainAttrTemplate.java | 27 -
.../jpa/entity/AbstractPlainAttrValue.java | 282 --
.../jpa/entity/AbstractPlainSchema.java | 272 --
.../persistence/jpa/entity/AbstractSubject.java | 64 -
.../persistence/jpa/entity/AbstractVirAttr.java | 62 -
.../jpa/entity/AbstractVirAttrTemplate.java | 41 -
.../jpa/entity/AbstractVirSchema.java | 89 -
.../jpa/entity/AnnotatedEntityListener.java | 54 -
.../jpa/entity/JPAAccountPolicy.java | 90 -
.../jpa/entity/JPAAttributableUtil.java | 879 -------
.../persistence/jpa/entity/JPAConnInstance.java | 268 --
.../persistence/jpa/entity/JPAConnPoolConf.java | 107 -
.../persistence/jpa/entity/JPAEntitlement.java | 62 -
.../jpa/entity/JPAEntityFactory.java | 290 --
.../jpa/entity/JPAExternalResource.java | 426 ---
.../core/persistence/jpa/entity/JPALogger.java | 80 -
.../persistence/jpa/entity/JPANotification.java | 262 --
.../jpa/entity/JPAPasswordPolicy.java | 43 -
.../core/persistence/jpa/entity/JPAPolicy.java | 90 -
.../persistence/jpa/entity/JPAPushPolicy.java | 42 -
.../core/persistence/jpa/entity/JPAReport.java | 148 --
.../persistence/jpa/entity/JPAReportExec.java | 87 -
.../jpa/entity/JPAReportletConfInstance.java | 77 -
.../jpa/entity/JPASecurityQuestion.java | 56 -
.../persistence/jpa/entity/JPASyncPolicy.java | 43 -
.../jpa/entity/JPAttributableUtilFactory.java | 85 -
.../jpa/entity/conf/JPACPlainAttr.java | 150 --
.../entity/conf/JPACPlainAttrUniqueValue.java | 78 -
.../jpa/entity/conf/JPACPlainAttrValue.java | 64 -
.../jpa/entity/conf/JPACPlainSchema.java | 36 -
.../persistence/jpa/entity/conf/JPAConf.java | 116 -
.../jpa/entity/membership/JPAMDerAttr.java | 82 -
.../entity/membership/JPAMDerAttrTemplate.java | 67 -
.../jpa/entity/membership/JPAMDerSchema.java | 34 -
.../jpa/entity/membership/JPAMPlainAttr.java | 141 -
.../membership/JPAMPlainAttrTemplate.java | 77 -
.../membership/JPAMPlainAttrUniqueValue.java | 78 -
.../entity/membership/JPAMPlainAttrValue.java | 64 -
.../jpa/entity/membership/JPAMPlainSchema.java | 36 -
.../jpa/entity/membership/JPAMVirAttr.java | 81 -
.../entity/membership/JPAMVirAttrTemplate.java | 67 -
.../jpa/entity/membership/JPAMVirSchema.java | 36 -
.../jpa/entity/membership/JPAMembership.java | 195 --
.../jpa/entity/role/JPARDerAttr.java | 82 -
.../jpa/entity/role/JPARDerAttrTemplate.java | 66 -
.../jpa/entity/role/JPARDerSchema.java | 34 -
.../jpa/entity/role/JPARMapping.java | 103 -
.../jpa/entity/role/JPARMappingItem.java | 58 -
.../jpa/entity/role/JPARPlainAttr.java | 140 -
.../jpa/entity/role/JPARPlainAttrTemplate.java | 75 -
.../entity/role/JPARPlainAttrUniqueValue.java | 78 -
.../jpa/entity/role/JPARPlainAttrValue.java | 64 -
.../jpa/entity/role/JPARPlainSchema.java | 36 -
.../jpa/entity/role/JPARVirAttr.java | 82 -
.../jpa/entity/role/JPARVirAttrTemplate.java | 66 -
.../jpa/entity/role/JPARVirSchema.java | 36 -
.../persistence/jpa/entity/role/JPARole.java | 593 -----
.../entity/task/AbstractProvisioningTask.java | 168 --
.../jpa/entity/task/JPANotificationTask.java | 160 --
.../jpa/entity/task/JPAPropagationTask.java | 195 --
.../jpa/entity/task/JPAPushTask.java | 82 -
.../jpa/entity/task/JPASchedTask.java | 89 -
.../jpa/entity/task/JPASyncTask.java | 110 -
.../persistence/jpa/entity/task/JPATask.java | 96 -
.../jpa/entity/task/JPATaskExec.java | 82 -
.../jpa/entity/task/JPATaskUtil.java | 152 --
.../jpa/entity/task/JPATaskUtilFactory.java | 91 -
.../jpa/entity/user/JPAUDerAttr.java | 67 -
.../jpa/entity/user/JPAUDerSchema.java | 34 -
.../jpa/entity/user/JPAUMapping.java | 125 -
.../jpa/entity/user/JPAUMappingItem.java | 58 -
.../jpa/entity/user/JPAUPlainAttr.java | 147 --
.../entity/user/JPAUPlainAttrUniqueValue.java | 79 -
.../jpa/entity/user/JPAUPlainAttrValue.java | 64 -
.../jpa/entity/user/JPAUPlainSchema.java | 36 -
.../jpa/entity/user/JPAUVirAttr.java | 67 -
.../jpa/entity/user/JPAUVirSchema.java | 36 -
.../persistence/jpa/entity/user/JPAUser.java | 538 ----
...ltiJarAwarePersistenceUnitPostProcessor.java | 49 -
.../validation/entity/AbstractValidator.java | 46 -
.../validation/entity/ConnInstanceCheck.java | 41 -
.../entity/ConnInstanceValidator.java | 64 -
.../entity/EntityValidationListener.java | 77 -
.../entity/ExternalResourceCheck.java | 41 -
.../entity/ExternalResourceValidator.java | 130 -
.../validation/entity/NotificationCheck.java | 41 -
.../entity/NotificationValidator.java | 59 -
.../jpa/validation/entity/PlainAttrCheck.java | 41 -
.../validation/entity/PlainAttrValidator.java | 59 -
.../validation/entity/PlainAttrValueCheck.java | 41 -
.../entity/PlainAttrValueValidator.java | 98 -
.../jpa/validation/entity/PlainSchemaCheck.java | 41 -
.../validation/entity/PlainSchemaValidator.java | 61 -
.../jpa/validation/entity/PolicyCheck.java | 41 -
.../jpa/validation/entity/PolicyValidator.java | 59 -
.../validation/entity/PropagationTaskCheck.java | 41 -
.../entity/PropagationTaskValidator.java | 65 -
.../entity/ProvisioningTaskCheck.java | 41 -
.../entity/ProvisioningTaskValidator.java | 84 -
.../jpa/validation/entity/ReportCheck.java | 41 -
.../jpa/validation/entity/ReportValidator.java | 67 -
.../jpa/validation/entity/RoleCheck.java | 41 -
.../jpa/validation/entity/RoleValidator.java | 44 -
.../jpa/validation/entity/SchedTaskCheck.java | 41 -
.../validation/entity/SchedTaskValidator.java | 68 -
.../jpa/validation/entity/SchemaNameCheck.java | 41 -
.../validation/entity/SchemaNameValidator.java | 133 -
.../jpa/validation/entity/UserCheck.java | 42 -
.../jpa/validation/entity/UserValidator.java | 194 --
.../resources/META-INF/spring-orm-oracle.xml | 323 ---
.../resources/META-INF/spring-orm-sqlserver.xml | 323 ---
.../src/main/resources/META-INF/spring-orm.xml | 371 ---
.../src/main/resources/audit/audit.sql | 24 -
.../main/resources/audit/audit_mysql_innodb.sql | 24 -
.../src/main/resources/audit/audit_oracle.sql | 38 -
.../main/resources/audit/audit_sqlserver.sql | 28 -
.../src/main/resources/content.xml | 183 --
.../src/main/resources/indexes.xml | 40 -
.../src/main/resources/persistence.properties | 29 -
.../src/main/resources/persistenceContext.xml | 126 -
.../resources/persistenceContextEMFactory.xml | 67 -
.../src/main/resources/quartz/tables_h2.sql | 266 --
.../main/resources/quartz/tables_mariadb.sql | 206 --
.../src/main/resources/quartz/tables_mysql.sql | 206 --
.../resources/quartz/tables_mysql_innodb.sql | 221 --
.../src/main/resources/quartz/tables_oracle.sql | 208 --
.../main/resources/quartz/tables_postgres.sql | 204 --
.../main/resources/quartz/tables_sqlServer.sql | 296 ---
.../src/main/resources/views.xml | 149 --
.../core/persistence/jpa/AbstractTest.java | 38 -
.../persistence/jpa/DummyConnectorRegistry.java | 47 -
.../core/persistence/jpa/TestInitializer.java | 37 -
.../core/persistence/jpa/entity/AttrTest.java | 235 --
.../jpa/entity/AttributableSearchTest.java | 494 ----
.../core/persistence/jpa/entity/ConfTest.java | 107 -
.../jpa/entity/ConnInstanceTest.java | 145 -
.../persistence/jpa/entity/DerAttrTest.java | 272 --
.../persistence/jpa/entity/DerSchemaTest.java | 103 -
.../persistence/jpa/entity/EntitlementTest.java | 72 -
.../persistence/jpa/entity/MembershipTest.java | 84 -
.../jpa/entity/NotificationTest.java | 132 -
.../persistence/jpa/entity/PlainSchemaTest.java | 160 --
.../core/persistence/jpa/entity/PolicyTest.java | 152 --
.../core/persistence/jpa/entity/ReportTest.java | 83 -
.../persistence/jpa/entity/ResourceTest.java | 266 --
.../core/persistence/jpa/entity/RoleTest.java | 142 -
.../jpa/entity/SecurityQuestionTest.java | 68 -
.../persistence/jpa/entity/TaskExecTest.java | 94 -
.../core/persistence/jpa/entity/TaskTest.java | 117 -
.../core/persistence/jpa/entity/UserTest.java | 250 --
.../persistence/jpa/entity/VirAttrTest.java | 142 -
.../persistence/jpa/entity/VirSchemaTest.java | 102 -
.../persistence/jpa/relationship/AttrTest.java | 191 --
.../relationship/AttributableSearchTest.java | 76 -
.../jpa/relationship/ConnInstanceTest.java | 103 -
.../jpa/relationship/DerSchemaTest.java | 58 -
.../jpa/relationship/EntitlementTest.java | 57 -
.../jpa/relationship/MembershipTest.java | 81 -
.../jpa/relationship/PlainSchemaTest.java | 157 --
.../jpa/relationship/ReportTest.java | 120 -
.../jpa/relationship/ResourceTest.java | 298 ---
.../persistence/jpa/relationship/RoleTest.java | 145 -
.../jpa/relationship/SecurityQuestionTest.java | 61 -
.../persistence/jpa/relationship/TaskTest.java | 291 ---
.../persistence/jpa/relationship/UserTest.java | 72 -
.../resources/META-INF/persistence-enhance.xml | 31 -
.../src/test/resources/content.xml | 1125 --------
.../src/test/resources/persistence.properties | 30 -
.../src/test/resources/persistenceTest.xml | 53 -
.../src/test/resources/simplelogger.properties | 17 -
syncope620/core/pom.xml | 49 -
syncope620/core/provisioning-api/pom.xml | 65 -
.../api/AttributableTransformer.java | 33 -
.../provisioning/api/ConnIdBundleManager.java | 48 -
.../core/provisioning/api/ConnPoolConfUtil.java | 69 -
.../core/provisioning/api/Connector.java | 216 --
.../core/provisioning/api/ConnectorFactory.java | 65 -
.../provisioning/api/ConnectorRegistry.java | 53 -
.../provisioning/api/ProvisioningManager.java | 42 -
.../api/RoleProvisioningManager.java | 37 -
.../core/provisioning/api/TimeoutException.java | 42 -
.../syncope/core/provisioning/api/URIUtil.java | 61 -
.../api/UserProvisioningManager.java | 57 -
.../core/provisioning/api/UserSuspender.java | 26 -
.../core/provisioning/api/WorkflowResult.java | 87 -
.../provisioning/api/cache/VirAttrCache.java | 65 -
.../provisioning/api/cache/VirAttrCacheKey.java | 79 -
.../api/cache/VirAttrCacheValue.java | 86 -
.../api/data/ConfigurationDataBinder.java | 34 -
.../api/data/ConnInstanceDataBinder.java | 48 -
.../api/data/NotificationDataBinder.java | 32 -
.../provisioning/api/data/PolicyDataBinder.java | 36 -
.../provisioning/api/data/ReportDataBinder.java | 34 -
.../api/data/ResourceDataBinder.java | 39 -
.../provisioning/api/data/RoleDataBinder.java | 36 -
.../provisioning/api/data/SchemaDataBinder.java | 49 -
.../api/data/SecurityQuestionDataBinder.java | 32 -
.../provisioning/api/data/TaskDataBinder.java | 39 -
.../provisioning/api/data/UserDataBinder.java | 43 -
.../provisioning/api/job/JobInstanceLoader.java | 41 -
.../core/provisioning/api/job/JobNamer.java | 72 -
.../provisioning/api/job/ProvisioningJob.java | 28 -
.../core/provisioning/api/job/PushJob.java | 26 -
.../core/provisioning/api/job/SyncJob.java | 26 -
.../core/provisioning/api/job/TaskJob.java | 43 -
.../api/notification/NotificationManager.java | 65 -
.../api/propagation/PropagationActions.java | 30 -
.../api/propagation/PropagationException.java | 51 -
.../api/propagation/PropagationManager.java | 249 --
.../api/propagation/PropagationReporter.java | 58 -
.../propagation/PropagationTaskExecutor.java | 77 -
.../api/sync/ProvisioningActions.java | 40 -
.../api/sync/ProvisioningProfile.java | 81 -
.../api/sync/ProvisioningResult.java | 140 -
.../core/provisioning/api/sync/PushActions.java | 137 -
.../api/sync/RolePushResultHandler.java | 23 -
.../api/sync/RoleSyncResultHandler.java | 26 -
.../core/provisioning/api/sync/SyncActions.java | 175 --
.../api/sync/SyncCorrelationRule.java | 36 -
.../api/sync/SyncopePushResultHandler.java | 26 -
.../api/sync/SyncopeResultHandler.java | 29 -
.../api/sync/SyncopeSyncResultHandler.java | 29 -
.../api/sync/UserPushResultHandler.java | 23 -
.../api/sync/UserSyncResultHandler.java | 23 -
syncope620/core/provisioning-java/pom.xml | 156 --
.../provisioning/java/AsyncConnectorFacade.java | 204 --
.../java/ConnIdBundleManagerImpl.java | 296 ---
.../provisioning/java/ConnectorFacadeProxy.java | 599 -----
.../provisioning/java/ConnectorManager.java | 185 --
.../java/DefaultAttributableTransformer.java | 39 -
.../java/DefaultRoleProvisioningManager.java | 223 --
.../java/DefaultUserProvisioningManager.java | 370 ---
.../provisioning/java/UserSuspenderImpl.java | 51 -
.../core/provisioning/java/VirAttrHandler.java | 308 ---
.../java/cache/DisabledVirAttrCache.java | 52 -
.../java/cache/MemoryVirAttrCache.java | 151 --
.../data/AbstractAttributableDataBinder.java | 779 ------
.../java/data/ConfigurationDataBinderImpl.java | 79 -
.../java/data/ConnInstanceDataBinderImpl.java | 245 --
.../java/data/NotificationDataBinderImpl.java | 66 -
.../java/data/PolicyDataBinderImpl.java | 189 --
.../java/data/ReportDataBinderImpl.java | 142 -
.../java/data/ResourceDataBinderImpl.java | 362 ---
.../java/data/RoleDataBinderImpl.java | 411 ---
.../java/data/SchemaDataBinderImpl.java | 170 --
.../data/SecurityQuestionDataBinderImpl.java | 55 -
.../java/data/TaskDataBinderImpl.java | 343 ---
.../java/data/UserDataBinderImpl.java | 411 ---
.../provisioning/java/job/AbstractTaskJob.java | 183 --
.../java/job/AbstractTransactionalTaskJob.java | 35 -
.../core/provisioning/java/job/SampleJob.java | 52 -
.../java/job/SpringBeanJobFactory.java | 97 -
.../notification/NotificationManagerImpl.java | 416 ---
.../SpringVelocityResourceLoader.java | 84 -
.../notification/VelocityEngineFactoryBean.java | 105 -
.../AbstractPropagationTaskExecutor.java | 540 ----
.../DBPasswordPropagationActions.java | 120 -
.../propagation/DefaultPropagationActions.java | 38 -
.../propagation/DefaultPropagationReporter.java | 94 -
.../LDAPMembershipPropagationActions.java | 113 -
.../LDAPPasswordPropagationActions.java | 125 -
.../PriorityPropagationTaskExecutor.java | 119 -
.../propagation/PropagationManagerImpl.java | 772 ------
.../java/sync/AbstractProvisioningJob.java | 375 ---
.../java/sync/AbstractPushResultHandler.java | 374 ---
.../java/sync/AbstractSyncResultHandler.java | 617 -----
.../java/sync/AbstractSyncopeResultHandler.java | 126 -
.../java/sync/DBPasswordSyncActions.java | 139 -
.../java/sync/DefaultPushActions.java | 88 -
.../java/sync/DefaultSyncActions.java | 115 -
.../java/sync/LDAPMembershipSyncActions.java | 309 ---
.../java/sync/LDAPPasswordSyncActions.java | 123 -
.../provisioning/java/sync/PushJobImpl.java | 176 --
.../java/sync/RolePushResultHandlerImpl.java | 155 --
.../java/sync/RoleSyncResultHandlerImpl.java | 169 --
.../provisioning/java/sync/SyncJobImpl.java | 219 --
.../provisioning/java/sync/SyncUtilities.java | 414 ---
.../java/sync/UserPushResultHandlerImpl.java | 160 --
.../java/sync/UserSyncResultHandlerImpl.java | 148 --
.../src/main/resources/connid.properties | 17 -
.../src/main/resources/mail.properties | 25 -
.../mailTemplates/confirmPasswordReset.html.vm | 26 -
.../mailTemplates/confirmPasswordReset.txt.vm | 20 -
.../main/resources/mailTemplates/optin.html.vm | 72 -
.../main/resources/mailTemplates/optin.txt.vm | 51 -
.../mailTemplates/requestPasswordReset.html.vm | 31 -
.../mailTemplates/requestPasswordReset.txt.vm | 26 -
.../src/main/resources/provisioning.properties | 18 -
.../src/main/resources/provisioningContext.xml | 110 -
.../core/provisioning/java/AbstractTest.java | 33 -
.../provisioning/java/ConnectorManagerTest.java | 73 -
.../java/data/ResourceDataBinderTest.java | 152 --
.../src/test/resources/provisioningTest.xml | 46 -
syncope620/core/rest-cxf/pom.xml | 140 -
.../rest/cxf/QueryResourceInfoComparator.java | 114 -
.../rest/cxf/RestServiceExceptionMapper.java | 285 --
.../rest/cxf/ThreadLocalCleanupListener.java | 44 -
.../syncope/core/rest/cxf/WADLServlet.java | 96 -
.../rest/cxf/service/AbstractServiceImpl.java | 227 --
.../core/rest/cxf/service/AddETagFilter.java | 50 -
.../cxf/service/ConfigurationServiceImpl.java | 77 -
.../rest/cxf/service/ConnectorServiceImpl.java | 133 -
.../cxf/service/EntitlementServiceImpl.java | 44 -
.../rest/cxf/service/LoggerServiceImpl.java | 114 -
.../cxf/service/NotificationServiceImpl.java | 66 -
.../rest/cxf/service/PolicyServiceImpl.java | 118 -
.../rest/cxf/service/ReportServiceImpl.java | 131 -
.../rest/cxf/service/ResourceServiceImpl.java | 139 -
.../core/rest/cxf/service/RoleServiceImpl.java | 227 --
.../rest/cxf/service/SchemaServiceImpl.java | 75 -
.../service/SecurityQuestionServiceImpl.java | 73 -
.../rest/cxf/service/SyncopeServiceImpl.java | 38 -
.../core/rest/cxf/service/TaskServiceImpl.java | 139 -
.../rest/cxf/service/UserSelfServiceImpl.java | 93 -
.../core/rest/cxf/service/UserServiceImpl.java | 251 --
.../cxf/service/UserWorkflowServiceImpl.java | 64 -
.../rest/cxf/service/WorkflowServiceImpl.java | 96 -
.../META-INF/cxf/org.apache.cxf.Logger | 1 -
.../main/resources/META-INF/web-fragment.xml | 89 -
.../src/main/resources/restCXFContext.xml | 122 -
.../src/main/resources/wadl2html/index.xsl | 484 ----
.../src/main/resources/wadl2html/schema.xsl | 148 --
syncope620/core/workflow-activiti/pom.xml | 88 -
.../activiti/ActivitiDefinitionLoader.java | 103 -
.../workflow/activiti/ActivitiImportUtils.java | 92 -
.../activiti/ActivitiUserWorkflowAdapter.java | 892 -------
.../activiti/SyncopeEntitiesVariableType.java | 35 -
.../workflow/activiti/SyncopeGroupManager.java | 122 -
.../activiti/SyncopeGroupQueryImpl.java | 157 --
.../core/workflow/activiti/SyncopeSession.java | 26 -
.../activiti/SyncopeSessionFactory.java | 45 -
.../workflow/activiti/SyncopeUserManager.java | 170 --
.../workflow/activiti/SyncopeUserQueryImpl.java | 218 --
.../task/AbstractActivitiServiceTask.java | 48 -
.../workflow/activiti/task/AutoActivate.java | 31 -
.../core/workflow/activiti/task/Create.java | 51 -
.../core/workflow/activiti/task/Delete.java | 40 -
.../workflow/activiti/task/GenerateToken.java | 43 -
.../core/workflow/activiti/task/Notify.java | 62 -
.../workflow/activiti/task/PasswordReset.java | 44 -
.../core/workflow/activiti/task/Reactivate.java | 29 -
.../core/workflow/activiti/task/Suspend.java | 29 -
.../core/workflow/activiti/task/Update.java | 54 -
.../src/main/resources/userWorkflow.bpmn20.xml | 232 --
.../src/main/resources/workflow.properties | 20 -
.../main/resources/workflowActivitiContext.xml | 79 -
syncope620/core/workflow-api/pom.xml | 60 -
.../core/workflow/api/RoleWorkflowAdapter.java | 71 -
.../core/workflow/api/UserWorkflowAdapter.java | 151 --
.../core/workflow/api/WorkflowAdapter.java | 107 -
.../workflow/api/WorkflowDefinitionFormat.java | 29 -
.../core/workflow/api/WorkflowException.java | 51 -
.../syncope/core/workflow/api/package-info.java | 19 -
syncope620/core/workflow-java/pom.xml | 69 -
.../java/AbstractRoleWorkflowAdapter.java | 66 -
.../java/AbstractUserWorkflowAdapter.java | 136 -
.../java/DefaultRoleWorkflowAdapter.java | 129 -
.../java/DefaultUserWorkflowAdapter.java | 233 --
.../src/main/resources/workflow.properties | 20 -
.../src/main/resources/workflowContext.xml | 28 -
syncope620/deb/console/LICENSE | 708 -----
syncope620/deb/console/NOTICE | 75 -
syncope620/deb/console/pom.xml | 272 --
.../deb/console/src/deb/control/conffiles | 1 -
syncope620/deb/console/src/deb/control/control | 14 -
syncope620/deb/console/src/deb/control/postinst | 19 -
syncope620/deb/console/src/deb/control/postrm | 17 -
syncope620/deb/console/src/deb/control/preinst | 17 -
syncope620/deb/console/src/deb/control/prerm | 17 -
.../console/src/deb/tomcat8/syncope-console.xml | 26 -
syncope620/deb/core/LICENSE | 1053 --------
syncope620/deb/core/NOTICE | 131 -
syncope620/deb/core/pom.xml | 387 ---
syncope620/deb/core/src/deb/control/conffiles | 1 -
syncope620/deb/core/src/deb/control/control | 14 -
syncope620/deb/core/src/deb/control/postinst | 19 -
syncope620/deb/core/src/deb/control/postrm | 17 -
syncope620/deb/core/src/deb/control/preinst | 17 -
syncope620/deb/core/src/deb/control/prerm | 17 -
syncope620/deb/core/src/deb/tomcat8/syncope.xml | 48 -
.../deb/core/src/deb/utils/dbinit-postgresql.sh | 22 -
syncope620/deb/pom.xml | 68 -
syncope620/ext/camel/client-console/pom.xml | 77 -
.../console/pages/CamelRouteModalPage.java | 89 -
.../client/console/panels/CamelRoutePanel.java | 181 --
.../console/rest/CamelRouteRestClient.java | 53 -
.../console/pages/CamelRouteModalPage.html | 66 -
.../pages/CamelRouteModalPage.properties | 17 -
.../pages/CamelRouteModalPage_it.properties | 17 -
.../pages/CamelRouteModalPage_pt_BR.properties | 17 -
.../client/console/panels/CamelRoutePanel.html | 28 -
syncope620/ext/camel/common-lib/pom.xml | 60 -
.../syncope/common/lib/to/CamelRouteTO.java | 60 -
syncope620/ext/camel/logic/pom.xml | 65 -
.../syncope/core/logic/CamelRouteLogic.java | 93 -
.../core/logic/init/CamelRouteLoader.java | 167 --
syncope620/ext/camel/persistence-api/pom.xml | 60 -
.../core/persistence/api/dao/CamelRouteDAO.java | 37 -
.../api/entity/CamelEntityFactory.java | 24 -
.../core/persistence/api/entity/CamelRoute.java | 34 -
syncope620/ext/camel/persistence-jpa/pom.xml | 138 -
.../persistence/jpa/dao/JPACamelRouteDAO.java | 71 -
.../jpa/entity/JPACamelEntityFactory.java | 33 -
.../persistence/jpa/entity/JPACamelRoute.java | 79 -
syncope620/ext/camel/pom.xml | 48 -
syncope620/ext/camel/provisioning-api/pom.xml | 71 -
.../api/data/CamelRouteDataBinder.java | 29 -
syncope620/ext/camel/provisioning-camel/pom.xml | 78 -
.../camel/AbstractCamelProvisioningManager.java | 103 -
.../camel/CamelRoleProvisioningManager.java | 174 --
.../camel/CamelUserProvisioningManager.java | 342 ---
.../provisioning/camel/SyncopeCamelContext.java | 123 -
.../camel/data/CamelRouteDataBinderImpl.java | 48 -
.../processor/RoleCreateInSyncProcessor.java | 72 -
.../camel/processor/RoleCreateProcessor.java | 77 -
.../camel/processor/RoleDeleteProcessor.java | 105 -
.../processor/RoleDeprovisionProcessor.java | 78 -
.../camel/processor/RoleUpdateProcessor.java | 71 -
.../processor/UserConfirmPwdResetProcessor.java | 61 -
.../camel/processor/UserCreateProcessor.java | 76 -
.../camel/processor/UserDeleteProcessor.java | 72 -
.../processor/UserDeprovisionProcessor.java | 78 -
.../processor/UserInnerSuspendProcessor.java | 61 -
.../processor/UserSetStatusInSyncProcessor.java | 74 -
.../UserStatusPropagationProcessor.java | 76 -
.../processor/UserUpdateInSyncProcessor.java | 73 -
.../camel/processor/UserUpdateProcessor.java | 105 -
.../src/main/resources/provisioning.properties | 19 -
.../main/resources/provisioningCamelContext.xml | 39 -
.../src/main/resources/roleRoutes.xml | 140 -
.../src/main/resources/userRoutes.xml | 242 --
syncope620/ext/camel/rest-api/pom.xml | 65 -
.../rest/api/service/CamelRouteService.java | 55 -
syncope620/ext/camel/rest-cxf/pom.xml | 70 -
.../rest/cxf/service/CamelRouteServiceImpl.java | 56 -
syncope620/ext/pom.xml | 40 -
syncope620/fit/build-tools/pom.xml | 164 --
.../fit/buildtools/ApacheDSRootDseServlet.java | 99 -
.../buildtools/ApacheDSStartStopListener.java | 277 --
.../fit/buildtools/ConnIdStartStopListener.java | 105 -
.../fit/buildtools/H2StartStopListener.java | 82 -
.../fit/buildtools/LdifInputStreamLoader.java | 131 -
.../fit/buildtools/ServiceTimeoutServlet.java | 105 -
.../src/main/resources/buildToolsContext.xml | 58 -
.../build-tools/src/main/resources/content.ldif | 57 -
.../build-tools/src/main/resources/log4j2.xml | 39 -
.../build-tools/src/main/resources/testdb.sql | 46 -
.../build-tools/src/main/webapp/WEB-INF/web.xml | 60 -
syncope620/fit/console-reference/pom.xml | 546 ----
.../src/main/resources/console.properties | 22 -
.../src/main/resources/context.xml | 23 -
.../src/main/resources/log4j2.xml | 66 -
.../oryx.debug.js-tokenValueMap.properties | 35 -
.../src/main/webapp/WEB-INF/glassfish-web.xml | 25 -
.../WEB-INF/jboss-deployment-structure.xml | 37 -
.../src/main/webapp/WEB-INF/weblogic.xml | 35 -
.../fit/console/reference/AbstractITCase.java | 70 -
.../fit/console/reference/AccessITCase.java | 80 -
.../console/reference/ConfigurationITCase.java | 402 ---
.../fit/console/reference/ConnectorITCase.java | 238 --
.../console/reference/EditProfileITCase.java | 94 -
.../fit/console/reference/ReportITCase.java | 117 -
.../fit/console/reference/ResourceITCase.java | 144 -
.../fit/console/reference/RoleITCase.java | 211 --
.../fit/console/reference/SchemaITCase.java | 70 -
.../fit/console/reference/TaskITCase.java | 123 -
.../fit/console/reference/UserITCase.java | 184 --
syncope620/fit/core-reference/pom.xml | 863 ------
.../DoubleValueAttributableTransformer.java | 75 -
.../fit/core/reference/TestSyncActions.java | 83 -
.../fit/core/reference/TestSyncRule.java | 37 -
.../main/resources/all/provisioning.properties | 19 -
.../src/main/resources/all/workflow.properties | 20 -
.../src/main/resources/connid.properties | 23 -
.../src/main/resources/context.xml | 23 -
.../src/main/resources/coreContext.xml | 57 -
.../jboss/persistenceContextEMFactory.xml | 73 -
.../src/main/resources/log4j2.xml | 135 -
.../src/main/resources/logic.properties | 18 -
.../resources/mariadb/persistence.properties | 30 -
.../main/resources/mysql/persistence.properties | 30 -
.../resources/oracle/persistence.properties | 30 -
.../resources/postgres/persistence.properties | 29 -
.../src/main/resources/provisioning.properties | 18 -
.../resources/sqlserver/persistence.properties | 30 -
.../src/main/resources/userWorkflow.bpmn20.xml | 577 ----
.../src/main/resources/workflow.properties | 20 -
.../src/main/webapp/WEB-INF/glassfish-web.xml | 33 -
.../WEB-INF/jboss-deployment-structure.xml | 38 -
.../src/main/webapp/WEB-INF/weblogic.xml | 46 -
.../src/main/webapp/cacheStats.jsp | 190 --
.../fit/core-reference/src/main/webapp/db.jsp | 36 -
.../fit/core/reference/AbstractITCase.java | 388 ---
.../fit/core/reference/AbstractTaskITCase.java | 137 -
.../fit/core/reference/ActivitiDetector.java | 32 -
.../core/reference/AuthenticationITCase.java | 440 ----
.../fit/core/reference/CamelDetector.java | 32 -
.../fit/core/reference/CamelRouteITCase.java | 163 --
.../fit/core/reference/ConfigurationITCase.java | 245 --
.../fit/core/reference/ConnectorITCase.java | 730 ------
.../fit/core/reference/DerSchemaITCase.java | 151 --
.../fit/core/reference/LoggerITCase.java | 215 --
.../fit/core/reference/NotificationITCase.java | 172 --
.../core/reference/NotificationTaskITCase.java | 155 --
.../fit/core/reference/PlainSchemaITCase.java | 317 ---
.../fit/core/reference/PolicyITCase.java | 238 --
.../core/reference/PropagationTaskITCase.java | 150 --
.../fit/core/reference/PushTaskITCase.java | 353 ---
.../fit/core/reference/ReportITCase.java | 252 --
.../fit/core/reference/ResourceITCase.java | 578 ----
.../syncope/fit/core/reference/RoleITCase.java | 889 -------
.../fit/core/reference/SchedTaskITCase.java | 105 -
.../fit/core/reference/SearchITCase.java | 182 --
.../core/reference/SecurityQuestionITCase.java | 99 -
.../fit/core/reference/SyncTaskITCase.java | 690 -----
.../syncope/fit/core/reference/UserITCase.java | 2442 -----------------
.../fit/core/reference/UserSelfITCase.java | 344 ---
.../fit/core/reference/UserWorkflowITCase.java | 299 ---
.../fit/core/reference/VirAttrITCase.java | 872 -------
.../fit/core/reference/VirSchemaITCase.java | 122 -
.../fit/core/reference/WorkflowITCase.java | 77 -
.../src/test/resources/addActivitiToContent.xsl | 50 -
.../src/test/resources/favicon.jpg | Bin 557 -> 0 bytes
.../core-reference/src/test/resources/test.csv | 10 -
.../src/test/resources/testJDBCContext.xml | 33 -
syncope620/fit/pom.xml | 42 -
syncope620/installer/LICENSE | 426 ---
syncope620/installer/NOTICE | 73 -
syncope620/installer/pom.xml | 219 --
.../installer/containers/AbstractContainer.java | 31 -
.../syncope/installer/containers/Glassfish.java | 49 -
.../syncope/installer/containers/Tomcat.java | 84 -
.../installer/containers/jboss/JBoss.java | 79 -
.../containers/jboss/JBossAddResponse.java | 72 -
.../jboss/JBossDeployRequestContent.java | 70 -
.../syncope/installer/enums/Containers.java | 49 -
.../org/apache/syncope/installer/enums/DBs.java | 52 -
.../installer/files/ConsoleProperties.java | 31 -
.../installer/files/GlassfishCoreWebXml.java | 33 -
.../files/JBossDeploymentStructureXml.java | 28 -
.../syncope/installer/files/ModelerPom.java | 80 -
.../installer/files/ModelerTokenValueMap.java | 58 -
.../apache/syncope/installer/files/OrmXml.java | 381 ---
.../syncope/installer/files/ParentPom.java | 37 -
.../files/PersistenceContextEMFactoryXml.java | 31 -
.../installer/files/PersistenceProperties.java | 94 -
.../installer/processes/ArchetypeProcess.java | 134 -
.../installer/processes/BaseProcess.java | 54 -
.../installer/processes/ContainerProcess.java | 322 ---
.../installer/processes/PersistenceProcess.java | 93 -
.../installer/utilities/DriverLoader.java | 102 -
.../installer/utilities/FileSystemUtils.java | 171 --
.../syncope/installer/utilities/HttpUtils.java | 212 --
.../syncope/installer/utilities/InstallLog.java | 70 -
.../syncope/installer/utilities/JsonUtils.java | 48 -
.../syncope/installer/utilities/MavenUtils.java | 210 --
.../installer/utilities/PasswordGenerator.java | 41 -
.../installer/validators/AbstractValidator.java | 28 -
.../validators/ArchetypeValidator.java | 91 -
.../validators/ContainerValidator.java | 158 --
.../validators/PersistenceValidator.java | 134 -
.../src/main/resources/installer.properties | 26 -
.../main/resources/izpack/ProcessPanel.Spec.xml | 94 -
.../resources/izpack/html/prerequisites.html | 66 -
.../src/main/resources/izpack/html/welcome.html | 50 -
.../izpack/img/apache-syncope-vert.png | Bin 27925 -> 0 bytes
.../resources/izpack/img/welcome_background.jpg | Bin 80658 -> 0 bytes
.../src/main/resources/izpack/install.xml | 174 --
.../main/resources/izpack/userInputLang.xml_eng | 66 -
.../main/resources/izpack/userInputLang.xml_ita | 66 -
.../src/main/resources/izpack/userInputSpec.xml | 247 --
.../installer/src/main/resources/modelerPom.xml | 113 -
syncope620/pom.xml | 1488 -----------
.../resources/org/apache/syncope/checkstyle.xml | 214 --
.../org/apache/syncope/java-formatter.xml | 309 ---
.../main/resources/org/apache/syncope/pmd.xml | 49 -
syncope620/standalone/LICENSE | 1087 --------
syncope620/standalone/NOTICE | 142 -
syncope620/standalone/pom.xml | 267 --
.../standalone/src/assemble/standalone-zip.xml | 36 -
syncope620/standalone/src/main/resources/README | 15 -
.../standalone/src/main/resources/setenv.bat | 16 -
.../standalone/src/main/resources/setenv.sh | 16 -
4847 files changed, 162552 insertions(+), 329784 deletions(-)
----------------------------------------------------------------------
[25/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage_it.properties
new file mode 100644
index 0000000..5a2beea
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage_it.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+info=Informazioni
+syncopeSite=Sito di Apache Syncope
+version=Versione
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage_pt_BR.properties
new file mode 100644
index 0000000..abd4055
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/InfoModalPage_pt_BR.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+info=Informa\u00E7\u00E3o
+syncopeSite=Site do Apache Syncope
+version=Vers\u00E3o
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
new file mode 100644
index 0000000..78436de
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
@@ -0,0 +1,89 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+
+ <title>Apache Syncope - Login</title>
+
+ <link rel="shortcut icon" href="img/favicon.png" type="image/png"/>
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="all"/>
+
+ <script type="text/javascript">
+
+ var notificationShownTimes = 0;
+
+ function showNotification(componentId, messagecount) {
+ notificationShownTimes++;
+ timeout = 1700 + (messagecount * 500) + notificationShownTimes * 200;
+ $('div#' + componentId).fadeTo('normal', 1.0);
+ setTimeout("$('div#" + componentId + "').fadeOut('normal')", timeout);
+ }
+ </script>
+
+ </head>
+ <body style="text-align:center">
+ <div id="splash">
+ <img src="img/logo.png" alt="syncope" title="syncope" id="logo" />
+ <p style="border: none"> </p>
+ <div id="loginFeedbackDiv">
+ <div wicket:id="feedback">feedbackmessages will be put here</div>
+ </div>
+ <form wicket:id="login">
+ <label for="userId">
+ <wicket:message key="userId"/>
+ </label>
+ <input type="text" wicket:id="userId" id="userId" size="25" style="width: 180px" />
+ <br />
+ <label for="password" class="password">
+ <wicket:message key="password"/>
+ </label>
+ <input type="password" wicket:id="password" id="password" size="25" style="width: 180px" />
+ <br />
+ <select wicket:id="language" id="language"/>
+ <br />
+ <br />
+ <input type="submit" wicket:id="submit"/>
+ </form>
+
+ <div style="display: inline-table; margin: 10px; width:380px;">
+ <div style="display: inline-table-cell; text-align: left; float: left;" wicket:id="selfRegistration"/>
+ <div style="display: inline-table-cell; text-align: left; float: right;" wicket:id="passwordReset"/>
+ </div>
+
+ <wicket:fragment wicket:id="selfRegNotAllowed"/>
+ <wicket:fragment wicket:id="selfRegAllowed">
+ <span wicket:id="selfRegistration"/>
+ </wicket:fragment>
+
+ <div wicket:id="selfRegModal"></div>
+
+ <wicket:fragment wicket:id="pwdResetNotAllowed"/>
+ <wicket:fragment wicket:id="pwdResetAllowed">
+ <span wicket:id="passwordReset"/>
+ </wicket:fragment>
+
+ <div wicket:id="pwdResetReqModal"></div>
+ <div wicket:id="pwdResetConfModal"></div>
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.properties
new file mode 100644
index 0000000..9b31e6e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+userId=Username
+password=Password
+submit=Login
+login-error=Wrong username and/or password
+selfRegistration=Self registration
+passwordReset=Password reset
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login_it.properties
new file mode 100644
index 0000000..40f8c34
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login_it.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+userId=Username
+password=Password
+submit=Login
+login-error=Username e/o password errati
+selfRegistration=Registrati
+passwordReset=Password smarrita
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login_pt_BR.properties
new file mode 100644
index 0000000..fd312c4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login_pt_BR.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+userId=Usu\u00e1rio
+password=Senha
+submit=Login
+login-error=Usu\u00e1rio ou senha incorretos
+selfRegistration=Registrar-se
+passwordReset=Redefini\u00e7\u00e3o de senha
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage.html
new file mode 100644
index 0000000..9bc8cb7
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage.html
@@ -0,0 +1,55 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+ <form wicket:id="MembershipForm">
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><span><wicket:message key="tab1"/></span></a></li>
+ <li><a href="#tabs-2"><span><wicket:message key="tab2"/></span></a></li>
+ <li><a href="#tabs-3"><span><wicket:message key="tab3"/></span></a></li>
+ </ul>
+ <div id="tabs-1">
+ <div id="formtable">
+ <span wicket:id="plainAttrs">[membership plain attributes]</span>
+ <span wicket:id="systeminformation">[System Information]</span>
+ </div>
+
+ <script type="text/javascript">
+ $(function() {
+ $('#formtable div.tablerow:even').addClass("alt");
+ });
+ </script>
+ </div>
+ <div id="tabs-2">
+ <span wicket:id="derAttrs">[membership derived attributes]</span>
+ </div>
+
+ <div id="tabs-3">
+ <span wicket:id="virAttrs">[membership virtual attributes]</span>
+ </div>
+ </div>
+ <div style="margin: 20px 10px 0">
+ <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="submit"/>
+ <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="cancel"/>
+ </div>
+ </form>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage.properties
new file mode 100644
index 0000000..28db548
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage.properties
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Plain attributes
+tab2=Derived attributes
+tab3=Virtual attributes
+title=Roles
+add=+
+drop=-
+edit=Edit
+delete=Delete
+derAttrs=Derived Attributes
+derAttrToRemove=Delete
+derAttrName=Name
+derAttrValue=Derived value
+
+virAttrs=Virtual Attributes
+virAttrToRemove=Delete
+virAttrName=Name
+virAttrValue=Virtual value
+
+addAttributeBtn=Add
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage_it.properties
new file mode 100644
index 0000000..0776461
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage_it.properties
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Attributi normali
+tab2=Attributi derivati
+tab3=Attributi virtuali
+title=Ruoli
+add=+
+drop=-
+edit=Edit
+delete=Rimuovi
+derAttrs=Attributi derivati
+derAttrToRemove=Elimina
+derAttrName=Nome
+derAttrValue=Valore derivato
+
+virAttrs=Attributi virtuali
+virAttrToRemove=Elimina
+virAttrName=Nome
+virAttrValue=Valore virtuale
+
+addAttributeBtn=Aggiungi
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage_pt_BR.properties
new file mode 100644
index 0000000..481bc0c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/MembershipModalPage_pt_BR.properties
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Atributos Normal
+tab2=Atributos Derivados
+tab3=Atributos Virtuais
+title=Fun\u00e7\u00f5es
+add=+
+drop=-
+edit=Alterar
+delete=Excluir
+derAttrs=Atributos Derivados
+derAttrToRemove=Excluir
+derAttrName=Nome
+derAttrValue=Valor Derivado
+
+virAttrs=Atributos Virtuais
+virAttrToRemove=Excluir
+virAttrName=Nome
+virAttrValue=Valor Virtual
+
+addAttributeBtn=Adicionar
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage.html
new file mode 100644
index 0000000..2ee6802
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage.html
@@ -0,0 +1,234 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style>
+ div#tabs div#events{
+ min-width: 970px;
+ overflow: hidden;
+ }
+
+ div#userFilter {
+ border: 1px solid #DDDDDD;
+ }
+
+ div#userFilter div#title {
+ margin: 10px 0px 0px 8px;
+ }
+
+ div#userFilter div#warning {
+ margin: 1px 0px 5px 8px;
+ }
+
+ div#userFilter div#title label {
+ font-weight: bold;
+ }
+
+ div#userFilter div#warning label {
+ color: #E00000;
+ font-size: 8px;
+ }
+ </style>
+ </wicket:head>
+ <wicket:extend>
+ <div style="margin: 5px;">
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+ <form wicket:id="form">
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#notification"><span><wicket:message key="notification"/></span></a></li>
+ <li><a href="#events"><span><wicket:message key="events"/></span></a></li>
+ <li><a href="#about"><span><wicket:message key="about"/></span></a></li>
+ <li><a href="#recipients"><span><wicket:message key="recipients"/></span></a></li>
+ </ul>
+
+ <div id="notification">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="sender"><wicket:message key="sender"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="sender">[sender]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="subject"><wicket:message key="subject"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="subject">[subject]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="recipientAttrType"><wicket:message key="recipientAttrType"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="recipientAttrType">[recipientAttrType]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="recipientAttrName"><wicket:message key="recipientAttrName"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="recipientAttrName">[recipientAttrName]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="template"><wicket:message key="template"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="template">[template]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="traceLevel"><wicket:message key="traceLevel"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="traceLevel">[traceLevel]</span>
+ </div>
+ </div>
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_fixedsize">
+ <label for="isActive"><wicket:message key="isActive"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="isActive">[isActive]</span>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div id="events">
+ <span wicket:id="eventSelection"/>
+ </div>
+
+ <div id="about">
+ <span wicket:id="aboutContainer">
+ <div class="tablerow" style="width: auto;">
+ <div class="tablecolumn_field" style="width: auto; padding-right: 5px;">
+ <span wicket:id="checkAbout">[checkAbout]</span>
+ </div>
+ <div class="tablecolumn_label" style="width: 100%">
+ <label for="checkAbout"><wicket:message key="checkAbout"/></label>
+ </div>
+ </div>
+ <div class="tablerow" style="width: auto;">
+ <div class="tablecolumn_field" style="width: auto; padding-right: 5px;">
+ <span wicket:id="checkUserAbout">[checkUserAbout]</span>
+ </div>
+ <div class="tablecolumn_label" style="width: auto;">
+ <label for="checkUserAbout"><wicket:message key="checkUserAbout"/></label>
+ </div>
+ </div>
+ <div id="userFilter">
+ <div id="title">
+ <label for="userFilter"><wicket:message key="userFilter"/></label>
+ </div>
+ <div id="warning">
+ <label for="userFilter"><wicket:message key="userFilterWarning"/></label>
+ </div>
+ <div id="condition">
+ <span wicket:id="userAbout"/>
+ </div>
+ </div>
+ <div class="tablerow" style="width: auto;">
+ <div class="tablecolumn_field" style="width: auto; padding-right: 5px;">
+ <span wicket:id="checkRoleAbout">[checkRoleAbout]</span>
+ </div>
+ <div class="tablecolumn_label" style="width: auto;">
+ <label for="checkRoleAbout"><wicket:message key="checkRoleAbout"/></label>
+ </div>
+ </div>
+ <div id="userFilter">
+ <div id="title">
+ <label for="roleFilter"><wicket:message key="roleFilter"/></label>
+ </div>
+ <div id="warning">
+ <label for="roleFilter"><wicket:message key="roleFilterWarning"/></label>
+ </div>
+ <div id="condition">
+ <span wicket:id="roleAbout"/>
+ </div>
+ </div>
+ </span>
+ </div>
+
+ <div id="recipients">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label medium_dynamicsize">
+ <span wicket:id="checkStaticRecipients">[checkStaticRecipients]</span>
+ <label for="recipients"><wicket:message key="recipients"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="staticRecipients">[staticRecipients]</span>
+ </div>
+ </div>
+
+ <span wicket:id="recipientsContainer">
+ <div class="tablerow" style="width: auto;">
+ <div class="tablecolumn_field" style="width: auto; padding-right: 5px;">
+ <span wicket:id="checkRecipients">[checkRecipients]</span>
+ </div>
+ <div class="tablecolumn_label" style="width: auto;">
+ <label for="checkRecipients"><wicket:message key="checkRecipients"/></label>
+ </div>
+ </div>
+ <span wicket:id="recipients"/>
+ </span>
+ <div id="userFilter">
+ <div id="title">
+ <label for="userNotifications"><wicket:message key="userNotifications"/></label>
+ </div>
+ <div id="warning">
+ <label for="userNotificationsWarning"><wicket:message key="userNotificationsWarning"/></label>
+ </div>
+ <div class="tablerow" style="width: auto;">
+ <div class="tablecolumn_field" style="width: auto; padding-right: 5px;">
+ <span wicket:id="selfAsRecipient">[selfAsRecipient]</span>
+ </div>
+ <div class="tablecolumn_label" style="width: auto;">
+ <label for="selfAsRecipient"><wicket:message key="selfAsRecipient"/></label>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div style="margin: 20px 10px 0">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage.properties
new file mode 100644
index 0000000..f36d754
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage.properties
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Edit notification
+submit=Save
+subject=Subject
+sender=Sender
+template=Template
+traceLevel=Trace level
+notification=Notification
+about=About
+events=Events
+recipients=Recipients
+selfAsRecipient=Include users matching About
+recipientAttrType=Recipients e-mail attribute type
+recipientAttrName=Recipients e-mail attribute schema
+checkRecipients=Search recipients
+checkAbout=All
+userFilter=User filter
+userFilterWarning=Do not use this filter unless events are not targeted at users
+userNotifications=User notifications
+userNotificationsWarning=Do not select this checkbox unless events are not targeted at users
+roleFilter=Role filter
+roleFilterWarning=Do not use this filter unless events are not targeted at roles
+isActive=Enabled
+checkUserAbout=Users
+checkRoleAbout=Roles
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage_it.properties
new file mode 100644
index 0000000..6d3b2b6
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage_it.properties
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Gestisci notifiche
+submit=Salva
+subject=Oggetto
+sender=Mittente
+template=Modello
+traceLevel=Livello di tracciamento
+notification=Notifica
+about=Soggetti
+events=Eventi
+recipients=Destinatari
+selfAsRecipient=Includi i soggetti
+recipientAttrType=Tipo attributo e-mail destinatari
+recipientAttrName=Schema attributo e-mail destinatari
+checkRecipients=Cerca i destinatari
+checkAbout=Tutto
+userFilter=Filtro utenti
+userFilterWarning=Non usare questo filtro se gli eventi catturati non riguardano espressamente utenti
+userNotifications=Notifiche utente
+userNotificationsWarning=Non selezionare questa checkbox se gli eventi catturati non riguardano espressamente utenti
+roleFilter=Filtro ruoli
+roleFilterWarning=Non usare questo filtro se gli eventi catturati non riguardano espressamente i ruoli
+isActive=Abilitata
+checkUserAbout=Utenti
+checkRoleAbout=Ruoli
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage_pt_BR.properties
new file mode 100644
index 0000000..08879cb
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationModalPage_pt_BR.properties
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Alterar Notifica\u00e7\u00e3o
+submit=Salvar
+subject=Assunto
+sender=Remetente
+template=Template
+traceLevel=N\u00edvel de Trace
+notification=Notifica\u00e7\u00e3o
+about=Sobre
+events=Eventos
+recipients=Destinat\u00e1rios
+selfAsRecipient=Incluir usu\u00e1rios relacionados Sobre
+recipientAttrType=Tipo de atributo de destinat\u00e1rio de email.
+recipientAttrName=Destinat\u00e1rios de e-mail para atributos de esquema
+checkRecipients=Buscar Destinat\u00e1rios
+checkAbout=Todos
+userFilter=User filter
+userFilterWarning=N\u00e3o use este filtro n\u00e3o ser que os eventos n\u00e3o s\u00e3o direcionados a usu\u00e1rios
+userNotifications=Notifica\u00e7\u00f5es do usu\u00e1rio
+userNotificationsWarning=N\u00e3o selecione esta op\u00e7\u00e3o a menos que os eventos n\u00e3o s\u00e3o direcionados a usu\u00e1rios
+roleNotifications=Notifica\u00e7\u00f5es do fun\u00e7\u00f5es
+roleNotificationsWarning=N\u00e3o selecione esta op\u00e7\u00e3o a menos que os eventos n\u00e3o s\u00e3o direcionados a fun\u00e7\u00f5es
+isActive=Ativada
+checkUserAbout=Usu\u00e1rio
+checkRoleAbout=Fun\u00e7\u00e3o
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage.html
new file mode 100644
index 0000000..c406ce9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage.html
@@ -0,0 +1,111 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div id="dialog-form">
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+ <form wicket:id="form">
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#profile"><span><wicket:message key="profile"/></span></a></li>
+ <li><a href="#executions"><span><wicket:message key="executions"/></span></a></li>
+ </ul>
+ <div id="profile">
+ <div id="users-contain" class="ui-widget">
+ <span wicket:id="profile">
+ <div id="formtable">
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <span wicket:id="idLabel">[Id]</span>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="key">[key]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="sender"><wicket:message key="sender"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="sender">[sender]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="recipients"><wicket:message key="recipients"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="recipients">[recipients]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="subject"><wicket:message key="subject"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="subject">[subject]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="textBody"><wicket:message key="textBody"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <textarea wicket:id="textBody" cols="40" rows="10">[textBody]</textarea>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="htmlBody"><wicket:message key="htmlBody"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <textarea wicket:id="htmlBody" cols="40" rows="10">[textBody]</textarea>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="traceLevel"><wicket:message key="traceLevel"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="traceLevel">[traceLevel]</span>
+ </div>
+ </div>
+ </div>
+ </span>
+ </div>
+ </div>
+ <div id="executions" class="ui-widget">
+ <span wicket:id="executionContainer" id="executionContainer">
+ <table class="ui-widget ui-widget-content"
+ wicket:id="executionsTable" style="width: 100%"/>
+ </span>
+ </div>
+ </div>
+ </form>
+ </div>
+ <div wicket:id="taskExecMessageWin"/>
+ </wicket:extend>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage.properties
new file mode 100644
index 0000000..e9a3120
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage.properties
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Profile
+executions=Executions
+title=Title
+startDate=Start date
+endDate=End date
+status=Status
+message=Message
+taskExecutions=Task executions
+delete=Delete
+showMessage=Show message
+sender=Sender
+subject=Subject
+recipients=Recipients
+traceLevel=Trace level
+htmlBody=E-mail body (HTML)
+textBody=E-mail body (TEXT)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage_it.properties
new file mode 100644
index 0000000..c0fa5bd
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage_it.properties
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Profilo
+executions=Esecuzioni
+title=Task
+startDate=Data di avvio
+endDate=Data di conclusione
+status=Stato
+message=Messaggio
+taskExecutions=Esecuzione del task
+delete=Rimozione
+showMessage=Mostra
+sender=Mittente
+subject=Oggetto
+recipients=Destinatari
+traceLevel=Livello di tracciamento
+htmlBody=Corpo e-mail (HTML)
+textBody=Corpo e-mail (testo)
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage_pt_BR.properties
new file mode 100644
index 0000000..91aa59d
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/NotificationTaskModalPage_pt_BR.properties
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Perfil
+executions=Execu\u00E7\u00F5es
+title=T\u00EDtulo
+startDate=Data Inicial
+endDate=Data Final
+status=Estatus
+message=Mensagem
+taskExecutions=Execu\u00E7\u00E3o de Tarefas
+delete=Excluir
+showMessage=Exibir Mensagem
+sender=Rementente
+subject=Assunto
+recipients=Destinat\u00E1rios
+traceLevel=N\u00EDvel de Trace
+htmlBody=Corpo do e-mail (HTML)
+textBody=Corpo do E-mail (TEXT)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage.html
new file mode 100644
index 0000000..154419f
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage.html
@@ -0,0 +1,172 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+ <div style="margin: 5px;">
+ <form wicket:id="form">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="key"><wicket:message key="key"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="key">[name]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="type"><wicket:message key="type"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="type">[type]</span>
+ </div>
+ </div>
+
+ <div wicket:id="conversionParams">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="conversionPattern"><wicket:message key="conversionPattern"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="conversionPattern">[conversionPattern]</span>
+ </div>
+ </div>
+ </div>
+
+ <div wicket:id="typeParams">
+ <div wicket:id="enumParams">
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="enumerationValues"><wicket:message key="enumerationValues"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="enumerationValues">[enumerationValues]</span>
+ </div>
+ </div>
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="enumerationKeys"><wicket:message key="enumerationKeys"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="enumerationKeys">[enumerationKeys]</span>
+ </div>
+ </div>
+ </div>
+ <div wicket:id="encryptedParams">
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="secretKey"><wicket:message key="secretKey"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="secretKey">[secretKey]</span>
+ </div>
+ </div>
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="cipherAlgorithm"><wicket:message key="cipherAlgorithm"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="cipherAlgorithm">[cipherAlgorithm]</span>
+ </div>
+ </div>
+ </div>
+ <div wicket:id="binaryParams">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="mimeType"><wicket:message key="mimeType"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="mimeType">[mimeType]</span>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="validatorClass"><wicket:message key="validatorClass"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="validatorClass">[validatorClass]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="mandatoryCondition"><wicket:message key="mandatoryCondition"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <input type="text" class="ui-widget-content ui-corner-all"
+ id="mandatoryCondition" wicket:id="mandatoryCondition"/>
+ <a class="tooltips" wicket:id="questionMarkJexlHelp" href="#" alt="Click to help" title="Click to help">
+ <img src="img/help.png"/>
+ <span wicket:id="jexlHelp" class="tooltips">
+ <wicket:message key="jexl_info"/>
+ <ul>
+ <li><wicket:message key="jexl_ex1"/></li>
+ <li><wicket:message key="jexl_ex2"/></li>
+ </ul>
+ <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message key="jexl_syntax_url"/></a>
+ </span>
+ </a>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="uniqueConstraint" class="onerowlabel"><wicket:message key="uniqueConstraint"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="uniqueConstraint">[uniqueConstraint]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="multivalue" class="onerowlabel"><wicket:message key="multivalue"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="multivalue">[multivalue]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="readonly" class="onerowlabel"><wicket:message key="readonly"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="readonly">[readonly]</span>
+ </div>
+ </div>
+ </div>
+
+ <div style="margin: 10px 0px 0;">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage.properties
new file mode 100644
index 0000000..58c5708
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage.properties
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Attributes
+tab2=Derived attributes
+tab3=User attributes
+tab4=User derived attributes
+required_alert=All form fields are required.
+mandatoryCondition=Mandatory
+enumerationValues= Enumeration values
+enumerationKeys= Enumeration labels
+uniqueConstraint=Unique
+multivalue=Multivalue
+multivalueAndUniqueConstr.validation='Multivalue' and 'Unique constraint' options can't be both checked
+type=Type
+validatorClass=Validator class
+conversionPattern=Conversion pattern
+existing_schemas=Existing Schemas:
+action=Action
+edit_attribute=Edit attribute
+title=Schema
+readonly=Read-only
+secretKey=Secret key
+cipherAlgorithm=Cipher algorithm
+mimeType=MIME Type
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage_it.properties
new file mode 100644
index 0000000..74eed7d
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage_it.properties
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Attributi
+tab2=Attributi derivati
+tab3=Attributi utenti
+tab4=Attributi utenti derivati
+required_alert=Tutti i campi sono richiesti
+mandatoryCondition=Obbligatorio
+enumerationValues= Valori enumeration
+enumerationKeys= Label enumeration
+multivalue=Multivalore
+type=Tipo
+validatorClass=Validatore
+conversionPattern=Conversion pattern
+existing_schemas=Schema esistenti:
+action=Azione
+edit_attribute=Modifica attributo
+title=Schema
+readonly=Read-only
+uniqueConstraint=Univoco
+multivalueAndUniqueConstr.validation=Le opzioni 'Multivalore' e 'Vincolo unique' non possono essere entrambe impostate
+secretKey=Chiave segreta
+cipherAlgorithm=Algoritmo di cifratura
+mimeType=MIME Type
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage_pt_BR.properties
new file mode 100644
index 0000000..a026c17
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PlainSchemaModalPage_pt_BR.properties
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+tab1=Atributos
+tab2=Atributos derivados
+tab3=Atributos de usu\u00e1rios
+tab4=Atributos derivados de usu\u00e1rios
+required_alert=Todos os campos s\u00e3o obrigat\u00f3rios
+mandatoryCondition=obrigat\u00f3rio
+enumerationValues= Valores enumerados
+enumerationKeys= R\u00f3tulos de enumera\u00e7\u00e3o
+uniqueConstraint=\u00danico
+multivalue=Multivalorado
+multivalueAndUniqueConstr.validation=As op\u00e7\u00f5es 'Multivalorado' e 'Restri\u00e7\u00e3o \u00fanica' n\u00e3o podem serem ambas selecionadas
+type=Tipo
+validatorClass=Classe de Valida\u00e7\u00e3o
+conversionPattern=Padr\u00e3o de Convers\u00e3o
+existing_schemas=Esquemas Existentes\:
+action=A\u00e7\u00e3o
+edit_attribute=Editar Atributo
+title=Esquema
+readonly=Apenas leitura
+secretKey=Chave secreta
+cipherAlgorithm=Algoritmo de criptografia
+mimeType=MIME Type
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage.html
new file mode 100644
index 0000000..504d72c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage.html
@@ -0,0 +1,109 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div style="margin: 5px;">
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+
+ <form wicket:id="form">
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#info"><span><wicket:message key="policyInfo"/></span></a></li>
+ <li><a href="#specification"><span><wicket:message key="policySpecification"/></span></a></li>
+ <li><a href="#resources"><span><wicket:message key="resources"/></span></a></li>
+ <li><a href="#roles"><span><wicket:message key="roles"/></span></a></li>
+ </ul>
+
+ <div id="info">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_fixedsize">
+ <label for="key"><wicket:message key="key"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="key">[key]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_fixedsize">
+ <label for="type"><wicket:message key="type"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="type">[type]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_fixedsize">
+ <label for="description"><wicket:message key="description"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="description">[description]</span>
+ </div>
+ </div>
+
+ <span wicket:id="forAccountOnly"/>
+ </div>
+ </div>
+
+ <wicket:fragment wicket:id="authResourcesFragment">
+ <div class="tablerow">
+ <div class="tablecolumn_label short_fixedsize">
+ <label for="authResources"><wicket:message key="authResources"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="authResources">[resources]</span>
+ </div>
+ </div>
+ </wicket:fragment>
+ <wicket:fragment wicket:id="emptyFragment">
+ </wicket:fragment>
+
+ <div id="specification">
+ <span wicket:id="panel">[password policy panel]</span>
+ </div>
+
+ <div id="resources">
+ <div id="users-contain" class="ui-widget" style="width:inherit;">
+ <table class="ui-widget ui-widget-content table-hover" wicket:id="resources"/>
+ </div>
+ </div>
+
+ <div id="roles">
+ <div id="users-contain" class="ui-widget" style="width:inherit;">
+ <table class="ui-widget ui-widget-content table-hover" wicket:id="roles"/>
+ </div>
+ </div>
+ </div>
+
+ <div style="margin: 20px 10px 0">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="apply"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+
+ <div wicket:id="metaEditModalWin">[Show modal window for meta editing (resources, roles)]</div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage.properties
new file mode 100644
index 0000000..4e7722f
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage.properties
@@ -0,0 +1,88 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Policy management
+
+description=Description
+type=Type
+apply=Save
+
+policyInfo=Info
+policySpecification = Specification
+
+#-----------------------------
+# Password policy specification properties
+#-----------------------------
+minLength=Minimum size
+maxLength=Maximum size
+historyLength=History length
+prefixesNotPermitted=Prefixes not permitted
+suffixesNotPermitted=Suffixes not permitted
+wordsNotPermitted=Substrings not permitted
+schemasNotPermitted=Mustn't contain value of the following attributes
+digitRequired=Must contain one or more digits
+nonAlphanumericRequired=Non alphanumeric character required
+alphanumericRequired=Alphanumeric character required
+lowercaseRequired=Lowercase required
+uppercaseRequired=Uppercase required
+mustStartWithDigit=Must start with digit
+mustntStartWithDigit=Mustn't start with digit
+mustEndWithDigit=Must end with digit
+mustntEndWithDigit=Mustn't end with digit
+mustStartWithNonAlpha=Must start with non alphanumeric character
+mustStartWithAlpha=Must start with alphanumeric character
+mustntStartWithNonAlpha=Mustn't start with non alphanumeric character
+mustntStartWithAlpha=Mustn't start with alphanumeric character
+mustEndWithNonAlpha=Must end with non alphanumeric character
+mustEndWithAlpha=Must end with alphanumeric character
+mustntEndWithNonAlpha=Mustn't end with non alphanumeric character
+mustntEndWithAlpha=Mustn't end with alphanumeric character
+allowNullPassword=Password may be not stored internally
+#-----------------------------
+
+#-----------------------------
+# Account policy specification properties
+#-----------------------------
+allUpperCase=All upper case
+allLowerCase=All lower case
+pattern=Pattern (regex)
+propagateSuspension=Propagate suspension
+permittedLoginRetries=Maximum number of subsequent failed logins
+#-----------------------------
+
+#-----------------------------
+# Sync policy specification properties
+#-----------------------------
+uAltSearchSchemas=Alternative attributes for local search (users)
+rAltSearchSchemas=Alternative attributes for local search (roles)
+userJavaRule=Custom user correlation rule
+roleJavaRule=Custom role correlation rule
+conflictResolutionAction= Conflict resolution action
+#-----------------------------
+
+#-----------------------------
+# Policy Type
+#-----------------------------
+ACCOUNT=Account Policy
+GLOBAL_ACCOUNT=Global Account Policy
+PASSWORD=Password Policy
+GLOBAL_PASSWORD=Global Password Policy
+SYNC=Synchronization Policy
+GLOBAL_SYNC=Global Synchronization Policy
+#-----------------------------
+resources=Resources
+roles=Roles
+authResources=Authentication resources
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage_it.properties
new file mode 100644
index 0000000..4f8bf93
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage_it.properties
@@ -0,0 +1,88 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Gestione Policy
+
+description=Descrizione
+type=Tipo
+apply=Salva
+
+policyInfo=Info
+policySpecification = Specifica
+
+#-----------------------------
+# Password policy specification properties
+#-----------------------------
+minLength=Lunghezza minima
+maxLength=Lunghezza massima
+historyLength=Lunghezza storico
+prefixesNotPermitted=Prefissi non permessi
+suffixesNotPermitted=Suffissi non permessi
+wordsNotPermitted=Sottostringhe non permesse
+schemasNotPermitted=Non deve contenere i valore dei seguenti attributi
+digitRequired=Numero richiesto
+lowercaseRequired=Lettera minuscola richiesta
+uppercaseRequired=Lettera maiuscola richiesta
+mustStartWithDigit=Deve iniziare con un numero
+mustntStartWithDigit=Non deve iniziare con un numero
+mustEndWithDigit=Deve terminare con un numero
+mustntEndWithDigit=Non deve terminare con un numero
+mustStartWithNonAlpha=Deve iniziare con un carattere non alfanumerico
+mustStartWithAlpha=Deve iniziare con un carattere alfanumerico
+mustntStartWithNonAlpha=Non deve iniziare con un carattere non alfanumerico
+mustntStartWithAlpha=Non deve iniziare con un carattere alfanumerico
+mustEndWithNonAlpha=Deve terminare con un carattere non alfanumerico
+mustEndWithAlpha=Deve terminare con un carattere alfanumerico
+mustntEndWithNonAlpha=Non deve terminare con un carattere non alfanumerico
+mustntEndWithAlpha=Non deve terminare con un carattere alfanumerico
+allowNullPassword=La password pu\u00f2 non essere memorizzata internamente
+#-----------------------------
+
+#-----------------------------
+# Account policy specification properties
+#-----------------------------
+allUpperCase=Tutte maiuscole
+allLowerCase=Tutte minuscole
+pattern=Pattern (regex)
+propagateSuspension=Propagare sospensione
+permittedLoginRetries=Numero massimo di login consecutivi falliti
+#-----------------------------
+
+#-----------------------------
+# Sync policy specification properties
+#-----------------------------
+uAltSearchSchemas=Attributi alternativi per ricerca locale (utenti)
+conflictResolutionAction= Azione di risoluzione dei conflitti
+#-----------------------------
+
+#-----------------------------
+# Policy Type
+#-----------------------------
+ACCOUNT=Policy utente
+GLOBAL_ACCOUNT=Policy utente globale
+PASSWORD=Password policy
+GLOBAL_PASSWORD=Password policy globale
+SYNC=Policy di sincronizzazione
+GLOBAL_SYNC=Policy globale di sincronizzazione
+#-----------------------------
+nonAlphanumericRequired=Carattere non alfanumerico richiesto
+alphanumericRequired=Carattere alfanumerico richiesto
+rAltSearchSchemas=Attributi alternativi per ricerca locale (ruoli)
+userJavaRule=Regola di correlazione (utenti)
+roleJavaRule=Regola di correlazione (ruoli)
+resources=Risorse
+roles=Ruoli
+authResources=Risorse di autenticazione
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage_pt_BR.properties
new file mode 100644
index 0000000..075756a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PolicyModalPage_pt_BR.properties
@@ -0,0 +1,87 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+title=Gerenciamento de Pol\u00edtica
+
+description=Descri\u00e7\u00e3o
+type=Tipo
+apply=Salvar
+
+policyInfo=Info
+policySpecification = Especifica\u00e7\u00e3o
+
+#-----------------------------
+# Password policy specification properties
+#-----------------------------
+minLength=Tamanho m\u00ednimo
+maxLength=Tamanho M\u00e1ximo
+historyLength=Tamanho do Hist\u00f3rico
+prefixesNotPermitted=Prefixos n\u00e3o permitidos
+suffixesNotPermitted=sufixos n\u00e3o permitidos
+wordsNotPermitted=Substrings n\u00e3o permitidas
+schemasNotPermitted=N\u00e3o deve conter valores dos seguintes atributos
+digitRequired=Precisa possuir um ou mais d\u00edgitos
+nonAlphanumericRequired=Caractere n\u00e3o alfanum\u00e9rico requerido
+alphanumericRequired=Caractere alfanum\u00e9rico requerido
+lowercaseRequired=Requerido em letra min\u00fascula
+uppercaseRequired=Requerido em letra mai\u00fascula
+mustStartWithDigit=Precisa come\u00e7ar com um d\u00edgito
+mustntStartWithDigit=N\u00e3o deve come\u00e7\u00e3r com um d\u00edgito
+mustEndWithDigit=Precisa terminar com um d\u00edgito
+mustntEndWithDigit=N\u00e3o deve terminar com um d\u00edgito
+mustStartWithNonAlpha=Precisa come\u00e7ar com um caractere n\u00e3o alfanum\u00e9rico
+mustStartWithAlpha=Precisa come\u00e7ar com um caracter alfanum\u00e9rico
+mustntStartWithNonAlpha=N\u00e3o deve come\u00e7ar com um caractere n\u00e3o alfanum\u00e9rico
+mustntStartWithAlpha=N\u00e3o deve come\u00e7ar com um caractere alfanum\u00e9rico
+mustEndWithNonAlpha=Precisa terminar com um caractere n\u00e3o alfanum\u00e9rico
+mustEndWithAlpha=Precisa terminar com um caractere alfanum\u00e9rico
+mustntEndWithNonAlpha=N\u00e3o deve terminar com um caractere n\u00e3o alfanum\u00e9rico
+mustntEndWithAlpha=N\u00e3o precisa terminar com um caracter alfanum\u00e9rico
+allowNullPassword=A senha n\u00e3o pode ser armazenado internamente
+#-----------------------------
+
+#-----------------------------
+# Account policy specification properties
+#-----------------------------
+allUpperCase=Todos em letras mai\u00fasculas
+allLowerCase=todos em letras min\u00fasculas
+pattern=Pattern (regex)
+propagateSuspension=Suspender propaga\u00e7\u00e3o
+permittedLoginRetries=N\u00famero m\u00e1ximo de subsequentes falhas de login
+#-----------------------------
+
+#-----------------------------
+# Sync policy specification properties
+#-----------------------------
+uAltSearchSchemas=Atributos alternativos para busca local (usu\u00e1rios)
+rAltSearchSchemas=Atributos alternativos para busca local (fun\u00e7\u00f5es)
+userJavaRule=Regra customizada de correla\u00e7\u00e3o de usu\u00e1rio
+roleJavaRule=Regra de correla\u00e7\u00e3o de fun\u00e7\u00e3o customizada
+conflictResolutionAction= A\u00e7\u00e3o de resolu\u00e7\u00e3o de conflito
+#-----------------------------
+
+#-----------------------------
+# Policy Type
+#-----------------------------
+ACCOUNT=Pol\u00edtica de Conta
+GLOBAL_ACCOUNT=Pol\u00edtica Global de Conta
+PASSWORD=Plo\u00edtica de Senha
+GLOBAL_PASSWORD=Pol\u00edtica Global de Senha
+SYNC=Pol\u00edtica de Sincroniza\u00e7\u00e3o
+GLOBAL_SYNC=Pol\u00edtica Global de sincroniza\u00e7\u00e3o
+resources=Recursos
+roles=Fun\u00e7\u00f5es
+authResources=Recursos de autentica\u00e7\u00e3o
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage.html
new file mode 100644
index 0000000..67ac588
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage.html
@@ -0,0 +1,75 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div id="dialog-form">
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+ <form wicket:id="form">
+ <div id="tabs">
+ <ul>
+ <li class="tabs-selected"><a href="#profile"><span><wicket:message key="profile"/></span></a></li>
+ <li><a href="#executions"><span><wicket:message key="executions"/></span></a></li>
+ </ul>
+ <div id="profile">
+ <div id="users-contain" class="ui-widget">
+ <span wicket:id="profile">
+ <div id="formtable">
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <span wicket:id="idLabel">[Id]</span>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="key">[key]</span>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="accountId"><wicket:message key="accountId"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="accountId">[accountId]</span>
+ </div>
+ </div>
+
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="resource"><wicket:message key="resource"/></label>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="resource">[resource]</span>
+ </div>
+ </div>
+ </div>
+ </span>
+ </div>
+ </div>
+ <div id="executions" class="ui-widget">
+ <span wicket:id="executionContainer" id="executionContainer">
+ <table class="ui-widget ui-widget-content"
+ wicket:id="executionsTable" style="width: 100%"/>
+ </span>
+ </div>
+ </div>
+ </form>
+ </div>
+ <div wicket:id="taskExecMessageWin"/>
+ </wicket:extend>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage.properties
new file mode 100644
index 0000000..1b035f7
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage.properties
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Profile
+executions=Executions
+title=Task
+accountId=Account id
+resource=Resource
+startDate=Start date
+endDate=End date
+status=Status
+message=Message
+taskExecutions=Task executions
+delete=Delete
+showMessage=Show
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage_it.properties
new file mode 100644
index 0000000..770680b
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/PropagationTaskModalPage_it.properties
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+profile=Profilo
+executions=Esecuzioni
+title=Task
+accountId=Id account
+resource=Risorsa
+startDate=Data di avvio
+endDate=Data di conclusione
+status=Stato
+message=Messaggio
+taskExecutions=Esecuzione del task
+delete=Rimozione
+showMessage=Mostra
[32/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
new file mode 100644
index 0000000..132bb66
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
@@ -0,0 +1,297 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.DisplayAttributesModalPage;
+import org.apache.syncope.client.console.pages.EditUserModalPage;
+import org.apache.syncope.client.console.pages.ResultStatusModalPage;
+import org.apache.syncope.client.console.pages.StatusModalPage;
+import org.apache.syncope.client.console.rest.AbstractSubjectRestClient;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.rest.UserRestClient;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.TokenColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+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.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.springframework.util.ReflectionUtils;
+
+public class UserSearchResultPanel extends AbstractSearchResultPanel {
+
+ private static final long serialVersionUID = -905187144506842332L;
+
+ private final static String PAGEID = "Users";
+
+ @SpringBean
+ private SchemaRestClient schemaRestClient;
+
+ private final List<String> pSchemaNames;
+
+ private final List<String> dSchemaNames;
+
+ private final List<String> vSchemaNames;
+
+ public <T extends AbstractAttributableTO> UserSearchResultPanel(final String id, final boolean filtered,
+ final String fiql, final PageReference callerRef, final AbstractSubjectRestClient restClient) {
+
+ super(id, filtered, fiql, callerRef, restClient);
+
+ this.pSchemaNames = schemaRestClient.getPlainSchemaNames(AttributableType.USER);
+ this.dSchemaNames = schemaRestClient.getDerSchemaNames(AttributableType.USER);
+ this.vSchemaNames = schemaRestClient.getVirSchemaNames(AttributableType.USER);
+
+ initResultTable();
+ }
+
+ @Override
+ protected List<IColumn<AbstractAttributableTO, String>> getColumns() {
+ final List<IColumn<AbstractAttributableTO, String>> columns = new ArrayList<>();
+
+ for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_DETAILS_VIEW)) {
+ final Field field = ReflectionUtils.findField(UserTO.class, name);
+
+ if ("token".equalsIgnoreCase(name)) {
+ columns.add(new TokenColumn("token"));
+ } else if (field != null && field.getType().equals(Date.class)) {
+ columns.add(new DatePropertyColumn<AbstractAttributableTO>(new ResourceModel(name, name), name, name));
+ } else {
+ columns.add(
+ new PropertyColumn<AbstractAttributableTO, String>(new ResourceModel(name, name), name, name));
+ }
+ }
+
+ for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_ATTRIBUTES_VIEW)) {
+ if (pSchemaNames.contains(name)) {
+ columns.add(new AttrColumn(name, SchemaType.PLAIN));
+ }
+ }
+
+ for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_DERIVED_ATTRIBUTES_VIEW)) {
+ if (dSchemaNames.contains(name)) {
+ columns.add(new AttrColumn(name, SchemaType.DERIVED));
+ }
+ }
+
+ for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW)) {
+ if (vSchemaNames.contains(name)) {
+ columns.add(new AttrColumn(name, SchemaType.VIRTUAL));
+ }
+ }
+
+ // Add defaults in case of no selection
+ if (columns.isEmpty()) {
+ for (String name : DisplayAttributesModalPage.DEFAULT_SELECTION) {
+ columns.add(
+ new PropertyColumn<AbstractAttributableTO, String>(new ResourceModel(name, name), name, name));
+ }
+
+ prefMan.setList(getRequest(), getResponse(), Constants.PREF_USERS_DETAILS_VIEW,
+ Arrays.asList(DisplayAttributesModalPage.DEFAULT_SELECTION));
+ }
+
+ columns.add(new ActionColumn<AbstractAttributableTO, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = -3503023501954863131L;
+
+ @Override
+ public ActionLinksPanel getActions(final String componentId, final IModel<AbstractAttributableTO> model) {
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, page.getPageReference());
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ statusmodal.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new StatusModalPage<UserTO>(
+ page.getPageReference(), statusmodal, (UserTO) model.getObject());
+ }
+ });
+
+ statusmodal.show(target);
+ }
+ }, ActionLink.ActionType.MANAGE_RESOURCES, PAGEID);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ statusmodal.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new StatusModalPage<UserTO>(
+ page.getPageReference(), statusmodal, (UserTO) model.getObject(), true);
+ }
+ });
+
+ statusmodal.show(target);
+ }
+ }, ActionLink.ActionType.ENABLE, PAGEID);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ editmodal.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ // SYNCOPE-294: re-read userTO before edit
+ UserTO userTO = ((UserRestClient) restClient).read(model.getObject().getKey());
+ return new EditUserModalPage(page.getPageReference(), editmodal, userTO);
+ }
+ });
+
+ editmodal.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, PAGEID);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ final UserTO userTO = (UserTO) restClient.
+ delete(model.getObject().getETagValue(), model.getObject().getKey());
+
+ page.setModalResult(true);
+
+ editmodal.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ResultStatusModalPage.Builder(editmodal, userTO).build();
+ }
+ });
+
+ editmodal.show(target);
+ } catch (SyncopeClientException scce) {
+ error(getString(Constants.OPERATION_ERROR) + ": " + scce.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }, ActionLink.ActionType.DELETE, PAGEID);
+
+ return panel;
+ }
+
+ @Override
+ public ActionLinksPanel getHeader(final String componentId) {
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(), page.getPageReference());
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ displaymodal.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new DisplayAttributesModalPage(page.getPageReference(), displaymodal,
+ pSchemaNames, dSchemaNames, vSchemaNames);
+ }
+ });
+
+ displaymodal.show(target);
+ }
+ }, ActionLink.ActionType.CHANGE_VIEW, PAGEID);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (target != null) {
+ target.add(container);
+ }
+ }
+ }, ActionLink.ActionType.RELOAD, PAGEID, "list");
+
+ return panel;
+ }
+ });
+
+ return columns;
+ }
+
+ @Override
+ protected <T extends AbstractAttributableTO> Collection<ActionType> getBulkActions() {
+ final List<ActionType> bulkActions = new ArrayList<ActionType>();
+
+ bulkActions.add(ActionType.DELETE);
+ bulkActions.add(ActionType.SUSPEND);
+ bulkActions.add(ActionType.REACTIVATE);
+
+ return bulkActions;
+ }
+
+ @Override
+ protected String getPageId() {
+ return PAGEID;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/VirAttrsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/VirAttrsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/VirAttrsPanel.java
new file mode 100644
index 0000000..34d21d5
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/VirAttrsPanel.java
@@ -0,0 +1,295 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.AttrTemplatesPanel.RoleAttrTemplatesChange;
+import org.apache.syncope.client.console.rest.RoleRestClient;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDecoratedCheckbox;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.MembershipTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.to.VirSchemaTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.attributes.AjaxCallListener;
+import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.ChoiceRenderer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class VirAttrsPanel extends Panel {
+
+ private static final long serialVersionUID = -7982691107029848579L;
+
+ @SpringBean
+ private SchemaRestClient schemaRestClient;
+
+ @SpringBean
+ private RoleRestClient roleRestClient;
+
+ private final AttrTemplatesPanel attrTemplates;
+
+ private final Map<String, VirSchemaTO> schemas = new TreeMap<String, VirSchemaTO>();
+
+ public <T extends AbstractAttributableTO> VirAttrsPanel(final String id, final T entityTO,
+ final boolean templateMode) {
+
+ this(id, entityTO, templateMode, null);
+ }
+
+ public <T extends AbstractAttributableTO> VirAttrsPanel(final String id, final T entityTO,
+ final boolean templateMode, final AttrTemplatesPanel attrTemplates) {
+
+ super(id);
+ this.attrTemplates = attrTemplates;
+ this.setOutputMarkupId(true);
+
+ final IModel<List<String>> virSchemas = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ private void filter(final List<VirSchemaTO> schemaTOs, final Set<String> allowed) {
+ for (ListIterator<VirSchemaTO> itor = schemaTOs.listIterator(); itor.hasNext();) {
+ VirSchemaTO schema = itor.next();
+ if (!allowed.contains(schema.getKey())) {
+ itor.remove();
+ }
+ }
+ }
+
+ @Override
+ protected List<String> load() {
+ List<VirSchemaTO> schemaTOs;
+
+ if (entityTO instanceof RoleTO) {
+ final RoleTO roleTO = (RoleTO) entityTO;
+
+ schemaTOs = schemaRestClient.getVirSchemas(AttributableType.ROLE);
+ Set<String> allowed;
+ if (attrTemplates == null) {
+ allowed = new HashSet<String>(roleTO.getRVirAttrTemplates());
+ } else {
+ allowed = new HashSet<String>(attrTemplates.getSelected(
+ AttrTemplatesPanel.Type.rVirAttrTemplates));
+ if (roleTO.isInheritTemplates() && roleTO.getParent() != 0) {
+ allowed.addAll(roleRestClient.read(roleTO.getParent()).getRVirAttrTemplates());
+ }
+ }
+ filter(schemaTOs, allowed);
+ } else if (entityTO instanceof UserTO) {
+ schemaTOs = schemaRestClient.getVirSchemas(AttributableType.USER);
+ } else {
+ schemaTOs = schemaRestClient.getVirSchemas(AttributableType.MEMBERSHIP);
+ Set<String> allowed = new HashSet<String>(
+ roleRestClient.read(((MembershipTO) entityTO).getRoleId()).getMVirAttrTemplates());
+ filter(schemaTOs, allowed);
+ }
+
+ schemas.clear();
+
+ for (VirSchemaTO schemaTO : schemaTOs) {
+ schemas.put(schemaTO.getKey(), schemaTO);
+ }
+
+ return new ArrayList<>(schemas.keySet());
+ }
+ };
+
+ final WebMarkupContainer attributesContainer = new WebMarkupContainer("virAttrContainer");
+ attributesContainer.setOutputMarkupId(true);
+ add(attributesContainer);
+
+ AjaxButton addAttributeBtn = new IndicatingAjaxButton("addAttributeBtn", new ResourceModel("addAttributeBtn")) {
+
+ private static final long serialVersionUID = -4804368561204623354L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ entityTO.getVirAttrs().add(new AttrTO());
+ target.add(attributesContainer);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ target.add(attributesContainer);
+ }
+ };
+
+ add(addAttributeBtn.setDefaultFormProcessing(Boolean.FALSE));
+
+ ListView<AttrTO> attributes = new ListView<AttrTO>("attrs",
+ new PropertyModel<List<? extends AttrTO>>(entityTO, "virAttrs")) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ @SuppressWarnings("unchecked")
+ protected void populateItem(final ListItem<AttrTO> item) {
+ final AttrTO attributeTO = item.getModelObject();
+
+ item.add(new AjaxDecoratedCheckbox("toRemove", new Model<Boolean>(Boolean.FALSE)) {
+
+ private static final long serialVersionUID = 7170946748485726506L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ entityTO.getVirAttrs().remove(attributeTO);
+ target.add(attributesContainer);
+ }
+
+ @Override
+ protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
+ super.updateAjaxAttributes(attributes);
+
+ final AjaxCallListener ajaxCallListener = new AjaxCallListener() {
+
+ private static final long serialVersionUID = 7160235486520935153L;
+
+ @Override
+ public CharSequence getPrecondition(final Component component) {
+ return "if (!confirm('" + getString("confirmDelete") + "')) return false;";
+ }
+ };
+ attributes.getAjaxCallListeners().add(ajaxCallListener);
+ }
+ });
+
+ if (attributeTO.getValues().isEmpty()) {
+ attributeTO.getValues().add("");
+ }
+
+ if (attributeTO.getSchema() != null) {
+ VirSchemaTO attributeSchema = schemas.get(attributeTO.getSchema());
+ if (attributeSchema != null) {
+ attributeTO.setReadonly(attributeSchema.isReadonly());
+ }
+ }
+
+ final AjaxTextFieldPanel panel;
+ final MultiFieldPanel multiPanel;
+ if (templateMode) {
+ panel = new AjaxTextFieldPanel("values", "values", new Model<String>());
+ panel.setReadOnly(attributeTO.isReadonly());
+ multiPanel = null;
+ } else {
+ panel = new AjaxTextFieldPanel("panel", "values", new Model<String>(null));
+ panel.setReadOnly(attributeTO.isReadonly());
+ multiPanel = new MultiFieldPanel("values",
+ new PropertyModel<List<String>>(attributeTO, "values"), panel);
+ }
+
+ final DropDownChoice<String> schemaChoice = new DropDownChoice<String>("schema",
+ new PropertyModel<String>(attributeTO, "schema"), virSchemas,
+ new ChoiceRenderer<String>() {
+
+ private static final long serialVersionUID = 3109256773218160485L;
+
+ @Override
+ public Object getDisplayValue(final String object) {
+ final StringBuilder text = new StringBuilder(object);
+ if (templateMode) {
+ text.append(" (JEXL)");
+ }
+ return text.toString();
+ }
+ });
+
+ schemaChoice.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_BLUR) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ attributeTO.setSchema(schemaChoice.getModelObject());
+
+ VirSchemaTO virSchema = schemas.get(attributeTO.getSchema());
+ if (virSchema != null) {
+ attributeTO.setReadonly(virSchema.isReadonly());
+ panel.setReadOnly(attributeTO.isReadonly());
+ }
+
+ if (multiPanel != null) {
+ multiPanel.getView().setEnabled(false);
+ }
+ }
+ });
+
+ schemaChoice.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ target.add(attributesContainer);
+ }
+ });
+
+ schemaChoice.setOutputMarkupId(true);
+ schemaChoice.setRequired(true);
+ item.add(schemaChoice);
+
+ if (templateMode) {
+ item.add(panel);
+ } else {
+ item.add(multiPanel);
+ }
+ }
+ };
+
+ attributesContainer.add(attributes);
+ }
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ if ((event.getPayload() instanceof RoleAttrTemplatesChange)) {
+ final RoleAttrTemplatesChange update = (RoleAttrTemplatesChange) event.getPayload();
+ if (attrTemplates != null && update.getType() == AttrTemplatesPanel.Type.rVirAttrTemplates) {
+ update.getTarget().add(this);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/resources/FilesystemResource.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/resources/FilesystemResource.java b/client/console/src/main/java/org/apache/syncope/client/console/resources/FilesystemResource.java
new file mode 100644
index 0000000..8a95de6
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/resources/FilesystemResource.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.resources;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import org.apache.wicket.request.resource.AbstractResource;
+import org.apache.wicket.util.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Mounts directory on local filesystem as subcontext.
+ */
+public class FilesystemResource extends AbstractResource {
+
+ private static final long serialVersionUID = -4791087117785935198L;
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(FilesystemResource.class);
+
+ private final String baseCtx;
+
+ private final String basePath;
+
+ public FilesystemResource(final String baseCtx, final String basePath) {
+ this.baseCtx = baseCtx;
+ this.basePath = basePath;
+ }
+
+ @Override
+ protected ResourceResponse newResourceResponse(final Attributes attributes) {
+ ResourceResponse response = new ResourceResponse();
+
+ final File baseDir = new File(basePath);
+ if (baseDir.exists() && baseDir.canRead() && baseDir.isDirectory()) {
+ String reqPath = attributes.getRequest().getUrl().getPath();
+ final String subPath = reqPath.substring(reqPath.indexOf(baseCtx) + baseCtx.length()).
+ replace('/', File.separatorChar);
+ LOG.debug("Request for {}", subPath);
+
+ response.setWriteCallback(new WriteCallback() {
+
+ @Override
+ public void writeData(final Attributes attributes) throws IOException {
+ FileInputStream resourceIS = null;
+ try {
+ resourceIS = new FileInputStream(new File(baseDir, subPath));
+ IOUtils.copy(resourceIS, attributes.getResponse().getOutputStream());
+ } catch (IOException e) {
+ LOG.error("Could not read from {}", baseDir.getAbsolutePath() + subPath, e);
+ } finally {
+ IOUtils.closeQuietly(resourceIS);
+ }
+ }
+ });
+ } else {
+ LOG.error("{} not found, not readable or not a directory", basePath);
+ }
+
+ return response;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefGETResource.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefGETResource.java b/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefGETResource.java
new file mode 100644
index 0000000..2104745
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefGETResource.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.resources;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import org.apache.syncope.client.console.rest.WorkflowRestClient;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.request.resource.AbstractResource;
+import org.apache.wicket.util.io.IOUtils;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ * Mirror REST resource for obtaining user workflow definition in JSON (used by Activiti Modeler).
+ *
+ * @see org.apache.syncope.common.services.WorkflowService#exportDefinition(org.apache.syncope.common.types.SubjectType)
+ */
+public class WorkflowDefGETResource extends AbstractResource {
+
+ private static final long serialVersionUID = 4637304868056148970L;
+
+ @Override
+ protected ResourceResponse newResourceResponse(final Attributes attributes) {
+ ResourceResponse response = new ResourceResponse();
+ response.disableCaching();
+ response.setContentType(MediaType.APPLICATION_JSON);
+
+ response.setWriteCallback(new WriteCallback() {
+
+ @Override
+ public void writeData(final Attributes attributes) throws IOException {
+ IOUtils.copy(WebApplicationContextUtils.getWebApplicationContext(
+ WebApplication.get().getServletContext()).getBean(WorkflowRestClient.class).
+ getDefinition(MediaType.APPLICATION_JSON_TYPE),
+ attributes.getResponse().getOutputStream());
+ }
+ });
+
+ return response;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefPUTResource.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefPUTResource.java b/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefPUTResource.java
new file mode 100644
index 0000000..add6485
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefPUTResource.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.resources;
+
+import java.io.IOException;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.MediaType;
+import org.apache.cxf.common.util.UrlUtils;
+import org.apache.syncope.client.console.rest.WorkflowRestClient;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.request.resource.AbstractResource;
+import org.apache.wicket.util.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ * Mirror REST resource for putting user workflow definition in JSON (used by Activiti Modeler).
+ *
+ * @see org.apache.syncope.common.services.WorkflowService#importDefinition(
+ * org.apache.syncope.common.types.SubjectType, java.lang.String)
+ */
+public class WorkflowDefPUTResource extends AbstractResource {
+
+ private static final long serialVersionUID = 2964542005207297944L;
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(WorkflowDefPUTResource.class);
+
+ @Override
+ protected ResourceResponse newResourceResponse(final Attributes attributes) {
+ String definition = null;
+ try {
+ HttpServletRequest request = (HttpServletRequest) attributes.getRequest().getContainerRequest();
+ String requestBody = IOUtils.toString(request.getInputStream());
+ String[] split = requestBody.split("&");
+ for (int i = 0; i < split.length && definition == null; i++) {
+ String keyValue = split[i];
+ if (keyValue.startsWith("json_xml=")) {
+ definition = UrlUtils.urlDecode(keyValue.split("=")[1]);
+ }
+ }
+ } catch (IOException e) {
+ LOG.error("Could not extract workflow definition from request", e);
+ }
+
+ WebApplicationContextUtils.getWebApplicationContext(WebApplication.get().getServletContext()).
+ getBean(WorkflowRestClient.class).
+ updateDefinition(MediaType.APPLICATION_JSON_TYPE, definition);
+
+ ResourceResponse response = new ResourceResponse();
+ response.setStatusCode(204);
+ return response;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractSubjectRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractSubjectRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractSubjectRestClient.java
new file mode 100644
index 0000000..a18a0a9
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractSubjectRestClient.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.List;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.BulkAction;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.ConnObjectTO;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
+
+public abstract class AbstractSubjectRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = 1962529678091410544L;
+
+ public abstract int count();
+
+ public abstract List<? extends AbstractAttributableTO> list(int page, int size, final SortParam<String> sort);
+
+ public abstract int searchCount(String fiql);
+
+ public abstract List<? extends AbstractAttributableTO> search(String fiql,
+ int page, int size, final SortParam<String> sort);
+
+ public abstract ConnObjectTO getConnectorObject(String resourceName, Long id);
+
+ public abstract AbstractAttributableTO delete(String etag, Long id);
+
+ public abstract BulkActionResult bulkAction(BulkAction action);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/ApprovalRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/ApprovalRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/ApprovalRestClient.java
new file mode 100644
index 0000000..dc9d12f
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/ApprovalRestClient.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.List;
+import org.apache.syncope.common.lib.to.WorkflowFormTO;
+import org.apache.syncope.common.rest.api.service.UserWorkflowService;
+import org.springframework.stereotype.Component;
+
+/**
+ * Console client for invoking Rest Todo services.
+ */
+@Component
+public class ApprovalRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = -4785231164900813921L;
+
+ public List<WorkflowFormTO> getForms() {
+ return getService(UserWorkflowService.class).getForms();
+ }
+
+ public WorkflowFormTO claimForm(final String taskId) {
+ return getService(UserWorkflowService.class).claimForm(taskId);
+ }
+
+ public void submitForm(final WorkflowFormTO form) {
+ getService(UserWorkflowService.class).submitForm(form);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/AuthRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/AuthRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/AuthRestClient.java
new file mode 100644
index 0000000..01e6838
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/AuthRestClient.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.common.rest.api.CollectionWrapper;
+import org.apache.syncope.common.rest.api.service.EntitlementService;
+import org.springframework.stereotype.Component;
+
+/**
+ * Console client for invoking Rest Resources services.
+ */
+@Component
+public class AuthRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = 2999780105004742914L;
+
+ public List<String> getAllEntitlements() {
+ return new ArrayList<>(
+ CollectionWrapper.unwrap(getService(EntitlementService.class).getAllEntitlements()));
+ }
+
+ public List<String> getOwnedEntitlements() {
+ return new ArrayList<>(
+ CollectionWrapper.unwrap(getService(EntitlementService.class).getOwnEntitlements()));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
new file mode 100644
index 0000000..ddab7af
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.io.Serializable;
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.syncope.client.lib.SyncopeClient;
+import org.apache.syncope.common.lib.search.OrderByClauseBuilder;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class BaseRestClient implements Serializable {
+
+ /**
+ * Logger.
+ */
+ protected static final Logger LOG = LoggerFactory.getLogger(BaseRestClient.class);
+
+ private static final long serialVersionUID = 1523999867826481989L;
+
+ protected <T> T getAnonymousService(final Class<T> serviceClass) {
+ return SyncopeSession.get().getAnonymousService(serviceClass);
+ }
+
+ protected <T> T getService(final Class<T> serviceClass) {
+ return SyncopeSession.get().getService(serviceClass);
+ }
+
+ protected <T> T getService(final String etag, final Class<T> serviceClass) {
+ return SyncopeSession.get().getService(etag, serviceClass);
+ }
+
+ protected <T> void resetClient(final Class<T> serviceClass) {
+ SyncopeSession.get().resetClient(serviceClass);
+ }
+
+ protected String toOrderBy(final SortParam<String> sort) {
+ OrderByClauseBuilder builder = SyncopeClient.getOrderByClauseBuilder();
+
+ String property = sort.getProperty();
+ if (property.indexOf('#') != -1) {
+ property = property.substring(property.indexOf('#') + 1);
+ }
+
+ if (sort.isAscending()) {
+ builder.asc(property);
+ } else {
+ builder.desc(property);
+ }
+
+ return builder.build();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java
new file mode 100644
index 0000000..ca00ea8
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.Iterator;
+import java.util.List;
+import javax.ws.rs.core.Response;
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.syncope.client.console.commons.AttrLayoutType;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.ConfTO;
+import org.apache.syncope.common.rest.api.service.ConfigurationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Component
+public class ConfigurationRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = 7692363064029538722L;
+
+ @Autowired
+ private SchemaRestClient schemaRestClient;
+
+ public ConfTO list() {
+ ConfTO conf = getService(ConfigurationService.class).list();
+
+ for (Iterator<AttrTO> it = conf.getPlainAttrs().iterator(); it.hasNext();) {
+ AttrTO attr = it.next();
+ for (AttrLayoutType type : AttrLayoutType.values()) {
+ if (type.getConfKey().equals(attr.getSchema())) {
+ it.remove();
+ }
+ }
+ }
+
+ return conf;
+ }
+
+ public AttrTO read(final String key) {
+ try {
+ return getService(ConfigurationService.class).read(key);
+ } catch (SyncopeClientException e) {
+ LOG.error("While reading a configuration schema", e);
+ }
+ return null;
+ }
+
+ public AttrTO readAttrLayout(final AttrLayoutType type) {
+ if (type == null) {
+ return null;
+ }
+
+ AttrTO attrLayout = read(type.getConfKey());
+ if (attrLayout == null) {
+ attrLayout = new AttrTO();
+ attrLayout.setSchema(type.getConfKey());
+ }
+ if (attrLayout.getValues().isEmpty()) {
+ attrLayout.getValues().addAll(schemaRestClient.getPlainSchemaNames(type.getAttrType()));
+ }
+
+ return attrLayout;
+ }
+
+ public void set(final AttrTO attributeTO) {
+ getService(ConfigurationService.class).set(attributeTO.getSchema(), attributeTO);
+ }
+
+ public void delete(final String key) {
+ getService(ConfigurationService.class).delete(key);
+ }
+
+ public List<String> getMailTemplates() {
+ return SyncopeSession.get().getSyncopeTO().getMailTemplates();
+ }
+
+ public Response dbExport() {
+ return getService(ConfigurationService.class).export();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/ConnectorRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/ConnectorRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/ConnectorRestClient.java
new file mode 100644
index 0000000..d9a729d
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/ConnectorRestClient.java
@@ -0,0 +1,217 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.BulkAction;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.ConnBundleTO;
+import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
+import org.apache.syncope.common.lib.to.ConnInstanceTO;
+import org.apache.syncope.common.lib.to.PlainSchemaTO;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.syncope.common.rest.api.service.ConnectorService;
+import org.apache.syncope.common.rest.api.service.ResourceService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Component;
+
+/**
+ * Console client for invoking Rest Connectors services.
+ */
+@Component
+public class ConnectorRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = -6870366819966266617L;
+
+ public List<ConnInstanceTO> getAllConnectors() {
+ List<ConnInstanceTO> connectors = Collections.<ConnInstanceTO>emptyList();
+ try {
+ connectors = getService(ConnectorService.class).list(SyncopeSession.get().getLocale().toString());
+ } catch (Exception e) {
+ LOG.error("While reading connectors", e);
+ }
+ return connectors;
+ }
+
+ public void create(final ConnInstanceTO connectorTO) {
+ Set<ConnConfProperty> filteredConf = filterProperties(connectorTO.getConfiguration());
+ connectorTO.getConfiguration().clear();
+ connectorTO.getConfiguration().addAll(filteredConf);
+ getService(ConnectorService.class).create(connectorTO);
+ }
+
+ /**
+ * Load an already existent connector by its name.
+ *
+ * @param connectorInstanceId the id
+ * @return ConnInstanceTO
+ */
+ public ConnInstanceTO read(final Long connectorInstanceId) {
+ ConnInstanceTO connectorTO = null;
+
+ try {
+ connectorTO = getService(ConnectorService.class).read(connectorInstanceId);
+ } catch (SyncopeClientException e) {
+ LOG.error("While reading a connector", e);
+ }
+
+ return connectorTO;
+ }
+
+ public void update(final ConnInstanceTO connectorTO) {
+ Set<ConnConfProperty> filteredConf = filterProperties(connectorTO.getConfiguration());
+ connectorTO.getConfiguration().clear();
+ connectorTO.getConfiguration().addAll(filteredConf);
+ getService(ConnectorService.class).update(connectorTO.getKey(), connectorTO);
+ }
+
+ public ConnInstanceTO delete(final Long id) {
+ ConnInstanceTO instanceTO = getService(ConnectorService.class).read(id);
+ getService(ConnectorService.class).delete(id);
+ return instanceTO;
+ }
+
+ public List<ConnBundleTO> getAllBundles() {
+ List<ConnBundleTO> bundles = Collections.<ConnBundleTO>emptyList();
+
+ try {
+ bundles = getService(ConnectorService.class).getBundles(SyncopeSession.get().getLocale().toString());
+ } catch (SyncopeClientException e) {
+ LOG.error("While getting connector bundles", e);
+ }
+
+ return bundles;
+ }
+
+ /**
+ * Get all configuration properties for the given connector instance.
+ *
+ * @param connectorId the connector id
+ * @return List of ConnConfProperty, or an empty list in case none found
+ */
+ public List<ConnConfProperty> getConnectorProperties(final Long connectorId) {
+ List<ConnConfProperty> properties = null;
+
+ try {
+ properties = getService(ConnectorService.class).getConfigurationProperties(connectorId);
+ } catch (SyncopeClientException e) {
+ LOG.error("While getting connector configuration properties", e);
+ }
+
+ return properties;
+ }
+
+ private Set<ConnConfProperty> filterProperties(final Set<ConnConfProperty> properties) {
+ Set<ConnConfProperty> newProperties = new HashSet<ConnConfProperty>();
+
+ for (ConnConfProperty property : properties) {
+ ConnConfProperty prop = new ConnConfProperty();
+ prop.setSchema(property.getSchema());
+ prop.setOverridable(property.isOverridable());
+
+ final List<Object> parsed = new ArrayList<Object>();
+ if (property.getValues() != null) {
+ for (Object obj : property.getValues()) {
+ if (obj != null && !obj.toString().isEmpty()) {
+ parsed.add(obj);
+ }
+ }
+ }
+ prop.getValues().addAll(parsed);
+ newProperties.add(prop);
+ }
+ return newProperties;
+ }
+
+ /**
+ * Test connector connection.
+ *
+ * @param connectorTO connector
+ * @return Connection status
+ */
+ public boolean check(final ConnInstanceTO connectorTO) {
+ ConnInstanceTO toBeChecked = new ConnInstanceTO();
+ BeanUtils.copyProperties(connectorTO, toBeChecked, new String[] { "configuration", "configurationMap" });
+ toBeChecked.getConfiguration().addAll(filterProperties(connectorTO.getConfiguration()));
+
+ boolean check = false;
+ try {
+ check = getService(ConnectorService.class).check(toBeChecked);
+ } catch (Exception e) {
+ LOG.error("While checking {}", toBeChecked, e);
+ }
+
+ return check;
+ }
+
+ public boolean check(final ResourceTO resourceTO) {
+ boolean check = false;
+ try {
+ check = getService(ResourceService.class).check(resourceTO);
+ } catch (Exception e) {
+ LOG.error("Connector not found {}", resourceTO.getConnectorId(), e);
+ }
+
+ return check;
+ }
+
+ public List<String> getSchemaNames(final ConnInstanceTO connectorTO) {
+ List<String> schemaNames = new ArrayList<String>();
+ try {
+ List<PlainSchemaTO> response = getService(ConnectorService.class).
+ getSchemaNames(connectorTO.getKey(), connectorTO, false);
+ for (PlainSchemaTO schema : response) {
+ schemaNames.add(schema.getKey());
+ }
+ } catch (Exception e) {
+ LOG.error("While getting schema names", e);
+ } finally {
+ // re-order schema names list
+ Collections.sort(schemaNames);
+ }
+
+ return schemaNames;
+ }
+
+ public List<ConnIdObjectClassTO> getSupportedObjectClasses(final ConnInstanceTO connectorTO) {
+ List<ConnIdObjectClassTO> result = Collections.emptyList();
+ try {
+ result = getService(ConnectorService.class).getSupportedObjectClasses(connectorTO.getKey(), connectorTO);
+ } catch (Exception e) {
+ LOG.error("While getting supported object classes", e);
+ }
+
+ return result;
+ }
+
+ public void reload() {
+ getService(ConnectorService.class).reload();
+ }
+
+ public BulkActionResult bulkAction(final BulkAction action) {
+ return getService(ConnectorService.class).bulk(action);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/ExecutionRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/ExecutionRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/ExecutionRestClient.java
new file mode 100644
index 0000000..f78a682
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/ExecutionRestClient.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+public interface ExecutionRestClient {
+
+ void startExecution(long executionCollectorId);
+
+ void deleteExecution(long executionId);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/InvalidPolicyType.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/InvalidPolicyType.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/InvalidPolicyType.java
new file mode 100644
index 0000000..6c7959c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/InvalidPolicyType.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+public class InvalidPolicyType extends RuntimeException {
+
+ private static final long serialVersionUID = -1230154509336169378L;
+
+ public InvalidPolicyType() {
+ }
+
+ public InvalidPolicyType(final String msg) {
+ super(msg);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/LoggerRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/LoggerRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/LoggerRestClient.java
new file mode 100644
index 0000000..a8b40ac
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/LoggerRestClient.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.apache.syncope.common.lib.to.EventCategoryTO;
+import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.types.AuditLoggerName;
+import org.apache.syncope.common.lib.types.LoggerLevel;
+import org.apache.syncope.common.lib.types.LoggerType;
+import org.apache.syncope.common.rest.api.CollectionWrapper;
+import org.apache.syncope.common.rest.api.service.LoggerService;
+import org.springframework.stereotype.Component;
+
+@Component
+public class LoggerRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = 4579786978763032240L;
+
+ public List<LoggerTO> listLogs() {
+ return getService(LoggerService.class).list(LoggerType.LOG);
+ }
+
+ public List<AuditLoggerName> listAudits() {
+ return CollectionWrapper.wrapLogger(getService(LoggerService.class).list(LoggerType.AUDIT));
+ }
+
+ public Map<String, Set<AuditLoggerName>> listAuditsByCategory() {
+ Map<String, Set<AuditLoggerName>> result = new HashMap<String, Set<AuditLoggerName>>();
+ for (AuditLoggerName auditLoggerName : listAudits()) {
+ if (!result.containsKey(auditLoggerName.getCategory())) {
+ result.put(auditLoggerName.getCategory(), new HashSet<AuditLoggerName>());
+ }
+
+ result.get(auditLoggerName.getCategory()).add(auditLoggerName);
+ }
+
+ return result;
+ }
+
+ public void setLogLevel(final String name, final LoggerLevel level) {
+ LoggerTO loggerTO = new LoggerTO();
+ loggerTO.setKey(name);
+ loggerTO.setLevel(level);
+ getService(LoggerService.class).update(LoggerType.LOG, name, loggerTO);
+ }
+
+ public void enableAudit(final AuditLoggerName auditLoggerName) {
+ String name = auditLoggerName.toLoggerName();
+ LoggerTO loggerTO = new LoggerTO();
+ loggerTO.setKey(name);
+ loggerTO.setLevel(LoggerLevel.DEBUG);
+ getService(LoggerService.class).update(LoggerType.AUDIT, name, loggerTO);
+ }
+
+ public void deleteLog(final String name) {
+ getService(LoggerService.class).delete(LoggerType.LOG, name);
+ }
+
+ public void disableAudit(final AuditLoggerName auditLoggerName) {
+ getService(LoggerService.class).delete(LoggerType.AUDIT, auditLoggerName.toLoggerName());
+ }
+
+ public List<EventCategoryTO> listEvents() {
+ try {
+ return getService(LoggerService.class).events();
+ } catch (Exception e) {
+ return Collections.<EventCategoryTO>emptyList();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/NotificationRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/NotificationRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/NotificationRestClient.java
new file mode 100644
index 0000000..687ade0
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/NotificationRestClient.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.List;
+import org.apache.syncope.common.lib.to.NotificationTO;
+import org.apache.syncope.common.rest.api.service.NotificationService;
+import org.springframework.stereotype.Component;
+
+@Component
+public class NotificationRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = 6328933265096511690L;
+
+ public List<NotificationTO> getAllNotifications() {
+ return getService(NotificationService.class).list();
+ }
+
+ public NotificationTO read(final Long id) {
+ return getService(NotificationService.class).read(id);
+ }
+
+ public void create(final NotificationTO notificationTO) {
+ getService(NotificationService.class).create(notificationTO);
+ }
+
+ public void update(final NotificationTO notificationTO) {
+ getService(NotificationService.class).update(notificationTO.getKey(), notificationTO);
+ }
+
+ public void delete(final Long id) {
+ getService(NotificationService.class).delete(id);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/PolicyRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/PolicyRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/PolicyRestClient.java
new file mode 100644
index 0000000..eb9e7cb
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/PolicyRestClient.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.syncope.common.lib.to.AbstractPolicyTO;
+import org.apache.syncope.common.lib.types.PolicyType;
+import org.apache.syncope.common.rest.api.service.PolicyService;
+import org.springframework.stereotype.Component;
+
+/**
+ * Console client for invoking Rest Policy services.
+ */
+@Component
+public class PolicyRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = -1392090291817187902L;
+
+ public <T extends AbstractPolicyTO> T getGlobalPolicy(final PolicyType type) {
+ T policy = null;
+ try {
+ policy = getService(PolicyService.class).readGlobal(type);
+ } catch (Exception e) {
+ LOG.warn("No global " + type + " policy found", e);
+ }
+ return policy;
+ }
+
+ public <T extends AbstractPolicyTO> T getPolicy(final Long id) {
+ T policy = null;
+ try {
+ policy = getService(PolicyService.class).read(id);
+ } catch (Exception e) {
+ LOG.warn("No policy found for id {}", id, e);
+ }
+ return policy;
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T extends AbstractPolicyTO> List<T> getPolicies(final PolicyType type, final boolean includeGlobal) {
+ final List<T> res = new ArrayList<>();
+
+ try {
+ res.addAll((List<T>) getService(PolicyService.class).list(type));
+ } catch (Exception ignore) {
+ LOG.debug("No policy found", ignore);
+ }
+
+ if (includeGlobal) {
+ try {
+ AbstractPolicyTO globalPolicy = getGlobalPolicy(type);
+ if (globalPolicy != null) {
+ res.add(0, (T) globalPolicy);
+ }
+ } catch (Exception ignore) {
+ LOG.warn("No global policy found", ignore);
+ }
+ }
+
+ return res;
+ }
+
+ public <T extends AbstractPolicyTO> void createPolicy(final T policy) {
+ getService(PolicyService.class).create(policy);
+ }
+
+ public <T extends AbstractPolicyTO> void updatePolicy(final T policy) {
+ getService(PolicyService.class).update(policy.getKey(), policy);
+ }
+
+ public void delete(final Long id, final Class<? extends AbstractPolicyTO> policyClass) {
+ getService(PolicyService.class).delete(id);
+ }
+
+ public List<String> getCorrelationRuleClasses() {
+ List<String> rules = null;
+
+ try {
+ rules = SyncopeSession.get().getSyncopeTO().getSyncCorrelationRules();
+ } catch (Exception e) {
+ LOG.error("While getting all correlation rule classes", e);
+ }
+
+ return rules;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java
new file mode 100644
index 0000000..81b58ac
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.ReportTO;
+import org.apache.syncope.common.lib.types.ReportExecExportFormat;
+import org.apache.syncope.common.lib.wrap.ReportletConfClass;
+import org.apache.syncope.common.rest.api.service.ReportService;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
+import org.springframework.stereotype.Component;
+
+@Component
+public class ReportRestClient extends BaseRestClient implements ExecutionRestClient {
+
+ private static final long serialVersionUID = 1644689667998953604L;
+
+ public List<String> getReportletConfClasses() {
+ List<String> result = new ArrayList<String>();
+
+ try {
+ List<ReportletConfClass> reportletConfClasses = getService(ReportService.class).getReportletConfClasses();
+ for (ReportletConfClass clazz : reportletConfClasses) {
+ result.add(clazz.getElement());
+ }
+ } catch (SyncopeClientException e) {
+ LOG.error("While getting available reportlet classes", e);
+ }
+
+ return result;
+ }
+
+ public ReportTO read(final Long reportId) {
+ return getService(ReportService.class).read(reportId);
+ }
+
+ public List<ReportTO> list() {
+ return getService(ReportService.class).list().getResult();
+ }
+
+ public List<ReportTO> list(final int page, final int size, final SortParam<String> sort) {
+ return getService(ReportService.class).list(page, size, toOrderBy(sort)).getResult();
+ }
+
+ public int count() {
+ return getService(ReportService.class).list(1, 1).getTotalCount();
+ }
+
+ public void create(final ReportTO reportTO) {
+ getService(ReportService.class).create(reportTO);
+ }
+
+ public void update(final ReportTO reportTO) {
+ getService(ReportService.class).update(reportTO.getKey(), reportTO);
+ }
+
+ /**
+ * Delete specified report.
+ *
+ * @param reportId report to delete
+ */
+ public void delete(final Long reportId) {
+ getService(ReportService.class).delete(reportId);
+ }
+
+ /**
+ * Start execution for the specified report.
+ *
+ * @param reportId report id
+ */
+ @Override
+ public void startExecution(final long reportId) {
+ getService(ReportService.class).execute(reportId);
+ }
+
+ /**
+ * Delete specified report execution.
+ *
+ * @param reportExecId report execution id
+ */
+ @Override
+ public void deleteExecution(final long reportExecId) {
+ getService(ReportService.class).deleteExecution(reportExecId);
+ }
+
+ public Response exportExecutionResult(final Long executionId, final ReportExecExportFormat fmt) {
+ return getService(ReportService.class).exportExecutionResult(executionId, fmt);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java
new file mode 100644
index 0000000..5ed1f45
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.List;
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.BulkAction;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
+import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.lib.wrap.SubjectKey;
+import org.apache.syncope.common.rest.api.service.ResourceService;
+import org.springframework.stereotype.Component;
+
+/**
+ * Console client for invoking Rest Resources services.
+ */
+@Component
+public class ResourceRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = -6898907679835668987L;
+
+ public List<String> getPropagationActionsClasses() {
+ return SyncopeSession.get().getSyncopeTO().getPropagationActions();
+ }
+
+ public List<ResourceTO> getAll() {
+ List<ResourceTO> resources = null;
+
+ try {
+ resources = getService(ResourceService.class).list();
+ } catch (SyncopeClientException e) {
+ LOG.error("While reading all resources", e);
+ }
+
+ return resources;
+ }
+
+ public void create(final ResourceTO resourceTO) {
+ getService(ResourceService.class).create(resourceTO);
+ }
+
+ public ResourceTO read(final String name) {
+ ResourceTO resourceTO = null;
+
+ try {
+ resourceTO = getService(ResourceService.class).read(name);
+ } catch (SyncopeClientException e) {
+ LOG.error("While reading a resource", e);
+ }
+ return resourceTO;
+ }
+
+ public void update(final ResourceTO resourceTO) {
+ getService(ResourceService.class).update(resourceTO.getKey(), resourceTO);
+ }
+
+ public void delete(final String name) {
+ getService(ResourceService.class).delete(name);
+ }
+
+ public BulkActionResult bulkAction(final BulkAction action) {
+ return getService(ResourceService.class).bulk(action);
+ }
+
+ public BulkActionResult bulkAssociationAction(
+ final String resourceName, final Class<? extends AbstractAttributableTO> typeRef,
+ final ResourceDeassociationActionType type, final List<SubjectKey> subjtectIds) {
+
+ return getService(ResourceService.class).bulkDeassociation(resourceName,
+ UserTO.class.isAssignableFrom(typeRef) ? SubjectType.USER : SubjectType.ROLE,
+ type, subjtectIds);
+ }
+}
[43/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java
new file mode 100644
index 0000000..6f89ec3
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java
@@ -0,0 +1,273 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.PreferenceManager;
+import org.apache.syncope.common.lib.search.SearchableFields;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Check;
+import org.apache.wicket.markup.html.form.CheckGroup;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+/**
+ * Modal window with Display attributes form.
+ */
+@SuppressWarnings({ "unchecked", "rawtypes" })
+public class DisplayAttributesModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = -4274117450918385110L;
+
+ /**
+ * Max allowed selections.
+ */
+ private static final int MAX_SELECTIONS = 9;
+
+ public static final String[] DEFAULT_SELECTION = { "key", "username", "status" };
+
+ @SpringBean
+ private PreferenceManager prefMan;
+
+ private final List<String> selectedDetails;
+
+ private final List<String> selectedPlainSchemas;
+
+ private final List<String> selectedDerSchemas;
+
+ private final List<String> selectedVirSchemas;
+
+ public DisplayAttributesModalPage(final PageReference pageRef, final ModalWindow window,
+ final List<String> schemaNames, final List<String> dSchemaNames, final List<String> vSchemaNames) {
+
+ super();
+
+ final IModel<List<String>> fnames = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ return SearchableFields.get(UserTO.class);
+ }
+ };
+
+ final IModel<List<String>> names = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ return schemaNames;
+ }
+ };
+
+ final IModel<List<String>> dsnames = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ return dSchemaNames;
+ }
+ };
+
+ final IModel<List<String>> vsnames = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ return vSchemaNames;
+ }
+ };
+
+ final Form form = new Form(FORM);
+ form.setModel(new CompoundPropertyModel(this));
+
+ selectedDetails = prefMan.getList(getRequest(), Constants.PREF_USERS_DETAILS_VIEW);
+
+ selectedPlainSchemas = prefMan.getList(getRequest(), Constants.PREF_USERS_ATTRIBUTES_VIEW);
+
+ selectedDerSchemas = prefMan.getList(getRequest(), Constants.PREF_USERS_DERIVED_ATTRIBUTES_VIEW);
+
+ selectedVirSchemas = prefMan.getList(getRequest(), Constants.PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW);
+
+ final CheckGroup dgroup = new CheckGroup("dCheckGroup", new PropertyModel(this, "selectedDetails"));
+ form.add(dgroup);
+
+ final ListView<String> details = new ListView<String>("details", fnames) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ protected void populateItem(final ListItem<String> item) {
+ item.add(new Check("dcheck", item.getModel()));
+ item.add(new Label("dname", new ResourceModel(item.getModelObject(), item.getModelObject())));
+ }
+ };
+ dgroup.add(details);
+
+ if (names.getObject() == null || names.getObject().isEmpty()) {
+ final Fragment fragment = new Fragment("plainSchemas", "emptyFragment", form);
+ form.add(fragment);
+
+ selectedPlainSchemas.clear();
+ } else {
+ final Fragment fragment = new Fragment("plainSchemas", "sfragment", form);
+ form.add(fragment);
+
+ final CheckGroup sgroup = new CheckGroup("psCheckGroup", new PropertyModel(this, "selectedPlainSchemas"));
+ fragment.add(sgroup);
+
+ final ListView<String> schemas = new ListView<String>("plainSchemas", names) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ protected void populateItem(final ListItem<String> item) {
+ item.add(new Check("scheck", item.getModel()));
+ item.add(new Label("sname", new ResourceModel(item.getModelObject(), item.getModelObject())));
+ }
+ };
+ sgroup.add(schemas);
+ }
+
+ if (dsnames.getObject() == null || dsnames.getObject().isEmpty()) {
+ final Fragment fragment = new Fragment("dschemas", "emptyFragment", form);
+ form.add(fragment);
+
+ selectedDerSchemas.clear();
+ } else {
+ final Fragment fragment = new Fragment("dschemas", "dsfragment", form);
+ form.add(fragment);
+
+ final CheckGroup dsgroup = new CheckGroup("dsCheckGroup", new PropertyModel(this, "selectedDerSchemas"));
+ fragment.add(dsgroup);
+
+ final ListView<String> derSchemas = new ListView<String>("derSchemas", dsnames) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ protected void populateItem(ListItem<String> item) {
+ item.add(new Check("dscheck", item.getModel()));
+ item.add(new Label("dsname", new ResourceModel(item.getModelObject(), item.getModelObject())));
+ }
+ };
+ dsgroup.add(derSchemas);
+ }
+
+ if (vsnames.getObject() == null || vsnames.getObject().isEmpty()) {
+ final Fragment fragment = new Fragment("vschemas", "emptyFragment", form);
+ form.add(fragment);
+
+ selectedVirSchemas.clear();
+ } else {
+ final Fragment fragment = new Fragment("vschemas", "vsfragment", form);
+ form.add(fragment);
+
+ final CheckGroup vsgroup = new CheckGroup("vsCheckGroup", new PropertyModel(this, "selectedVirSchemas"));
+ fragment.add(vsgroup);
+
+ final ListView<String> virSchemas = new ListView<String>("virSchemas", vsnames) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ protected void populateItem(ListItem<String> item) {
+ item.add(new Check("vscheck", item.getModel()));
+ item.add(new Label("vsname", new ResourceModel(item.getModelObject(), item.getModelObject())));
+ }
+ };
+ vsgroup.add(virSchemas);
+ }
+
+ final AjaxButton submit = new IndicatingAjaxButton(SUBMIT, new ResourceModel(SUBMIT)) {
+
+ private static final long serialVersionUID = -4804368561204623354L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ if (selectedDetails.size() + selectedPlainSchemas.size() + selectedVirSchemas.size() + selectedDerSchemas.
+ size()
+ > MAX_SELECTIONS) {
+
+ error(getString("tooManySelections"));
+ onError(target, form);
+ } else {
+ final Map<String, List<String>> prefs = new HashMap<String, List<String>>();
+
+ prefs.put(Constants.PREF_USERS_DETAILS_VIEW, selectedDetails);
+
+ prefs.put(Constants.PREF_USERS_ATTRIBUTES_VIEW, selectedPlainSchemas);
+
+ prefs.put(Constants.PREF_USERS_DERIVED_ATTRIBUTES_VIEW, selectedDerSchemas);
+
+ prefs.put(Constants.PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW, selectedVirSchemas);
+
+ prefMan.setList(getRequest(), getResponse(), prefs);
+
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+
+ window.close(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+
+ form.add(submit);
+
+ final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+ };
+
+ cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
+
+ add(form);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/EditUserModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/EditUserModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/EditUserModalPage.java
new file mode 100644
index 0000000..af502d2
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/EditUserModalPage.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import org.apache.commons.lang3.SerializationUtils;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.commons.status.StatusBean;
+import org.apache.syncope.client.console.panels.AccountInformationPanel;
+import org.apache.syncope.client.console.panels.MembershipsPanel;
+import org.apache.syncope.client.console.panels.ResourcesPanel;
+import org.apache.syncope.client.console.panels.StatusPanel;
+import org.apache.syncope.common.lib.AttributableOperations;
+import org.apache.syncope.common.lib.mod.UserMod;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.ResourceModel;
+
+/**
+ * Modal window with User form.
+ */
+public class EditUserModalPage extends UserModalPage {
+
+ private static final long serialVersionUID = -6479209496805705739L;
+
+ protected Form form;
+
+ private final UserTO initialUserTO;
+
+ private StatusPanel statusPanel;
+
+ public EditUserModalPage(final PageReference pageRef, final ModalWindow window, final UserTO userTO) {
+ super(pageRef, window, userTO, Mode.ADMIN, true);
+
+ this.initialUserTO = SerializationUtils.clone(userTO);
+
+ form = setupEditPanel();
+
+ // add resource assignment details in case of update
+ if (userTO.getKey() != 0) {
+ form.addOrReplace(new Label("pwdChangeInfo", new ResourceModel("pwdChangeInfo")));
+
+ statusPanel = new StatusPanel("statuspanel", userTO, new ArrayList<StatusBean>(), getPageReference());
+ statusPanel.setOutputMarkupId(true);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ statusPanel, RENDER, xmlRolesReader.getEntitlement("Resources", "getConnectorObject"));
+ form.addOrReplace(statusPanel);
+
+ form.addOrReplace(new AccountInformationPanel("accountinformation", userTO));
+
+ form.addOrReplace(new ResourcesPanel.Builder("resources").attributableTO(userTO).
+ statusPanel(statusPanel).build());
+
+ form.addOrReplace(new MembershipsPanel("memberships", userTO, mode, statusPanel, getPageReference()));
+ }
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ protected void submitAction(final AjaxRequestTarget target, final Form form) {
+ final UserTO updatedUserTO = (UserTO) form.getModelObject();
+
+ if (updatedUserTO.getKey() == 0) {
+ userTO = userRestClient.create(updatedUserTO, storePassword.getModelObject());
+ } else {
+ final UserMod userMod = AttributableOperations.diff(updatedUserTO, initialUserTO);
+
+ if (statusPanel != null) {
+ userMod.setPwdPropRequest(statusPanel.getStatusMod());
+ }
+
+ // update user just if it is changed
+ if (!userMod.isEmpty()) {
+ userTO = userRestClient.update(initialUserTO.getETagValue(), userMod);
+ }
+ }
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ protected void closeAction(final AjaxRequestTarget target, final Form form) {
+ setResponsePage(new ResultStatusModalPage.Builder(window, userTO).mode(mode).build());
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ErrorPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ErrorPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ErrorPage.java
new file mode 100644
index 0000000..db46171
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ErrorPage.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.wicket.Page;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Error WebPage.
+ */
+public class ErrorPage extends BasePage {
+
+ private static final long serialVersionUID = -390761262038796657L;
+
+ public ErrorPage(final PageParameters parameters) {
+ super(parameters);
+
+ add(new Label("errorTitle", new Model<String>(parameters.get("errorTitle").toString())));
+ add(new Label("errorMessage", new Model<String>(parameters.get("errorMessage").toString())));
+
+ add(new BookmarkablePageLink<Page>("home", getApplication().getHomePage()));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ExecMessageModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ExecMessageModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ExecMessageModalPage.java
new file mode 100644
index 0000000..e39f3fc
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ExecMessageModalPage.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.model.Model;
+
+public class ExecMessageModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 3163146190501510888L;
+
+ public ExecMessageModalPage(final String message) {
+ final Label dialogContent = new Label("message", new Model<String>(message));
+ add(dialogContent.setOutputMarkupId(true));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/FailureMessageModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/FailureMessageModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/FailureMessageModalPage.java
new file mode 100644
index 0000000..c0ee7ec
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/FailureMessageModalPage.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.model.Model;
+
+public class FailureMessageModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 9216117990503199258L;
+
+ public FailureMessageModalPage(final String message, final String failureMessage) {
+ final Label executionFailureMessage;
+ if (!failureMessage.isEmpty()) {
+ executionFailureMessage = new Label("failureMessage", new Model<String>(failureMessage));
+ } else {
+ executionFailureMessage = new Label("failureMessage");
+ }
+ add(executionFailureMessage.setOutputMarkupId(true));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/HomePage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/HomePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/HomePage.java
new file mode 100644
index 0000000..7b4ba68
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/HomePage.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Syncope Home-Page.
+ */
+public class HomePage extends BasePage {
+
+ private static final long serialVersionUID = -6712990478380766293L;
+
+ public HomePage(final PageParameters parameters) {
+ super(parameters);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/InfoModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/InfoModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/InfoModalPage.java
new file mode 100644
index 0000000..83e0163
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/InfoModalPage.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.ExternalLink;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class InfoModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 5558354927844399580L;
+
+ @SpringBean(name = "site")
+ private String siteUrl;
+
+ @SpringBean(name = "license")
+ private String licenseUrl;
+
+ public InfoModalPage() {
+ super();
+
+ add(new ExternalLink("syncopeLink", siteUrl));
+ add(new ExternalLink("licenseLink", licenseUrl));
+ add(new Label("version", SyncopeSession.get().getVersion()));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
new file mode 100644
index 0000000..deaa359
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
@@ -0,0 +1,365 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.security.AccessControlException;
+import java.util.List;
+import java.util.Locale;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.NotificationPanel;
+import org.apache.syncope.client.console.rest.UserSelfRestClient;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.LinkPanel;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.wrap.EntitlementTO;
+import org.apache.syncope.common.rest.api.CollectionWrapper;
+import org.apache.syncope.common.rest.api.service.EntitlementService;
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.JavaScriptHeaderItem;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.ChoiceRenderer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.PasswordTextField;
+import org.apache.wicket.markup.html.form.StatelessForm;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.request.cycle.RequestCycle;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+/**
+ * Syncope Login page.
+ */
+public class Login extends WebPage {
+
+ private static final long serialVersionUID = -3744389270366566218L;
+
+ private final static int SELF_REG_WIN_HEIGHT = 550;
+
+ private final static int SELF_REG_WIN_WIDTH = 800;
+
+ private final static int PWD_RESET_WIN_HEIGHT = 300;
+
+ private final static int PWD_RESET_WIN_WIDTH = 800;
+
+ @SpringBean(name = "version")
+ private String version;
+
+ @SpringBean(name = "anonymousUser")
+ private String anonymousUser;
+
+ @SpringBean(name = "anonymousKey")
+ private String anonymousKey;
+
+ @SpringBean
+ private UserSelfRestClient userSelfRestClient;
+
+ private final StatelessForm<Void> form;
+
+ private final TextField<String> userIdField;
+
+ private final TextField<String> passwordField;
+
+ private final DropDownChoice<Locale> languageSelect;
+
+ private final NotificationPanel feedbackPanel;
+
+ public Login(final PageParameters parameters) {
+ super(parameters);
+ setStatelessHint(true);
+
+ feedbackPanel = new NotificationPanel(Constants.FEEDBACK);
+ add(feedbackPanel);
+
+ form = new StatelessForm<Void>("login");
+
+ userIdField = new TextField<String>("userId", new Model<String>());
+ userIdField.setMarkupId("userId");
+ form.add(userIdField);
+
+ passwordField = new PasswordTextField("password", new Model<String>());
+ passwordField.setMarkupId("password");
+ form.add(passwordField);
+
+ languageSelect = new LocaleDropDown("language");
+
+ form.add(languageSelect);
+
+ AjaxButton submitButton = new AjaxButton("submit", new Model<String>(getString("submit"))) {
+
+ private static final long serialVersionUID = 429178684321093953L;
+
+ @Override
+ protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
+ try {
+ if (anonymousUser.equals(userIdField.getRawInput())) {
+ throw new AccessControlException("Illegal username");
+ }
+
+ authenticate(userIdField.getRawInput(), passwordField.getRawInput());
+
+ setResponsePage(WelcomePage.class, parameters);
+ } catch (AccessControlException e) {
+ error(getString("login-error"));
+ feedbackPanel.refresh(target);
+ SyncopeSession.get().resetClients();
+ }
+ }
+ };
+
+ submitButton.setDefaultFormProcessing(false);
+ form.add(submitButton);
+
+ add(form);
+
+ // Modal window for self registration
+ final ModalWindow selfRegModalWin = new ModalWindow("selfRegModal");
+ selfRegModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ selfRegModalWin.setInitialHeight(SELF_REG_WIN_HEIGHT);
+ selfRegModalWin.setInitialWidth(SELF_REG_WIN_WIDTH);
+ selfRegModalWin.setCookieName("self-reg-modal");
+ add(selfRegModalWin);
+
+ Fragment selfRegFrag;
+ if (userSelfRestClient.isSelfRegistrationAllowed()) {
+ selfRegFrag = new Fragment("selfRegistration", "selfRegAllowed", this);
+
+ final AjaxLink<Void> selfRegLink = new ClearIndicatingAjaxLink<Void>("link", getPageReference()) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ selfRegModalWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ // anonymous authentication needed for self-registration
+ authenticate(anonymousUser, anonymousKey);
+
+ return new UserSelfModalPage(Login.this.getPageReference(), selfRegModalWin, new UserTO());
+ }
+ });
+
+ selfRegModalWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 251794406325329768L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ SyncopeSession.get().invalidate();
+ }
+ });
+
+ selfRegModalWin.show(target);
+ }
+ };
+ selfRegLink.add(new Label("linkTitle", getString("selfRegistration")));
+
+ Panel panel = new LinkPanel("selfRegistration", new ResourceModel("selfRegistration"));
+ panel.add(selfRegLink);
+ selfRegFrag.add(panel);
+ } else {
+ selfRegFrag = new Fragment("selfRegistration", "selfRegNotAllowed", this);
+ }
+ add(selfRegFrag);
+
+ // Modal window for password reset request
+ final ModalWindow pwdResetReqModalWin = new ModalWindow("pwdResetReqModal");
+ pwdResetReqModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ pwdResetReqModalWin.setInitialHeight(PWD_RESET_WIN_HEIGHT);
+ pwdResetReqModalWin.setInitialWidth(PWD_RESET_WIN_WIDTH);
+ pwdResetReqModalWin.setCookieName("pwd-reset-req-modal");
+ add(pwdResetReqModalWin);
+
+ Fragment pwdResetFrag;
+ if (userSelfRestClient.isPasswordResetAllowed()) {
+ pwdResetFrag = new Fragment("passwordReset", "pwdResetAllowed", this);
+
+ final AjaxLink<Void> pwdResetLink = new ClearIndicatingAjaxLink<Void>("link", getPageReference()) {
+
+ private static final long serialVersionUID = -6957616042924610290L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ pwdResetReqModalWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ // anonymous authentication needed for password reset request
+ authenticate(anonymousUser, anonymousKey);
+
+ return new RequestPasswordResetModalPage(pwdResetReqModalWin);
+ }
+ });
+
+ pwdResetReqModalWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ SyncopeSession.get().invalidate();
+ setResponsePage(Login.class);
+ }
+ });
+
+ pwdResetReqModalWin.show(target);
+ }
+ };
+ pwdResetLink.add(new Label("linkTitle", getString("passwordReset")));
+
+ Panel panel = new LinkPanel("passwordReset", new ResourceModel("passwordReset"));
+ panel.add(pwdResetLink);
+ pwdResetFrag.add(panel);
+ } else {
+ pwdResetFrag = new Fragment("passwordReset", "pwdResetNotAllowed", this);
+ }
+ add(pwdResetFrag);
+
+ // Modal window for password reset confirm - automatically shown when token is available as request parameter
+ final String pwdResetToken = RequestCycle.get().getRequest().getRequestParameters().
+ getParameterValue(Constants.PARAM_PASSWORD_RESET_TOKEN).toOptionalString();
+ final ModalWindow pwdResetConfModalWin = new ModalWindow("pwdResetConfModal");
+ if (StringUtils.isNotBlank(pwdResetToken)) {
+ pwdResetConfModalWin.add(new AbstractDefaultAjaxBehavior() {
+
+ private static final long serialVersionUID = 3109256773218160485L;
+
+ @Override
+ protected void respond(final AjaxRequestTarget target) {
+ ModalWindow window = (ModalWindow) getComponent();
+ window.show(target);
+ }
+
+ @Override
+ public void renderHead(final Component component, final IHeaderResponse response) {
+ response.render(JavaScriptHeaderItem.forScript(getCallbackScript(), null));
+ }
+ });
+ }
+ pwdResetConfModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ pwdResetConfModalWin.setInitialHeight(PWD_RESET_WIN_HEIGHT);
+ pwdResetConfModalWin.setInitialWidth(PWD_RESET_WIN_WIDTH);
+ pwdResetConfModalWin.setCookieName("pwd-reset-conf-modal");
+ pwdResetConfModalWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ // anonymous authentication needed for password reset confirm
+ authenticate(anonymousUser, anonymousKey);
+
+ return new ConfirmPasswordResetModalPage(pwdResetConfModalWin, pwdResetToken);
+ }
+ });
+ pwdResetConfModalWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ SyncopeSession.get().invalidate();
+ setResponsePage(Login.class);
+ }
+ });
+ add(pwdResetConfModalWin);
+ }
+
+ private void authenticate(final String username, final String password) {
+ List<EntitlementTO> entitlements = SyncopeSession.get().
+ getService(EntitlementService.class, username, password).getOwnEntitlements();
+
+ SyncopeSession.get().setUsername(username);
+ SyncopeSession.get().setPassword(password);
+ SyncopeSession.get().setEntitlements(CollectionWrapper.unwrap(entitlements).toArray(new String[0]));
+ SyncopeSession.get().setVersion(version);
+ }
+
+ /**
+ * Inner class which implements (custom) Locale DropDownChoice component.
+ */
+ private class LocaleDropDown extends DropDownChoice<Locale> {
+
+ private static final long serialVersionUID = 2349382679992357202L;
+
+ private class LocaleRenderer extends ChoiceRenderer<Locale> {
+
+ private static final long serialVersionUID = -3657529581555164741L;
+
+ @Override
+ public String getDisplayValue(final Locale locale) {
+ return locale.getDisplayName(getLocale());
+ }
+ }
+
+ public LocaleDropDown(final String id) {
+ super(id, SyncopeSession.SUPPORTED_LOCALES);
+
+ setChoiceRenderer(new LocaleRenderer());
+ setModel(new IModel<Locale>() {
+
+ private static final long serialVersionUID = -6985170095629312963L;
+
+ @Override
+ public Locale getObject() {
+ return getSession().getLocale();
+ }
+
+ @Override
+ public void setObject(final Locale object) {
+ getSession().setLocale(object);
+ }
+
+ @Override
+ public void detach() {
+ // Empty.
+ }
+ });
+
+ // set default value to English
+ getModel().setObject(Locale.ENGLISH);
+ }
+
+ @Override
+ protected boolean wantOnSelectionChangedNotifications() {
+ return true;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/Logout.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Logout.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Logout.java
new file mode 100644
index 0000000..acf313b
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Logout.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Syncope Logout.
+ */
+public class Logout extends BasePage {
+
+ private static final long serialVersionUID = -2143007520243939450L;
+
+ public Logout(final PageParameters parameters) {
+ super(parameters);
+
+ SyncopeSession.get().invalidate();
+
+ setResponsePage(getApplication().getHomePage());
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/MembershipModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/MembershipModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/MembershipModalPage.java
new file mode 100644
index 0000000..f2e2189
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/MembershipModalPage.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.panels.AnnotatedBeanPanel;
+import org.apache.syncope.client.console.panels.DerAttrsPanel;
+import org.apache.syncope.client.console.panels.PlainAttrsPanel;
+import org.apache.syncope.client.console.panels.VirAttrsPanel;
+import org.apache.syncope.common.lib.to.MembershipTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.ResourceModel;
+
+public class MembershipModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = -4360802478081432549L;
+
+ private final AjaxButton submit;
+
+ public MembershipModalPage(final PageReference pageRef, final ModalWindow window, final MembershipTO membershipTO,
+ final Mode mode) {
+
+ final Form<MembershipTO> form = new Form<MembershipTO>("MembershipForm");
+
+ final UserTO userTO = ((UserModalPage) pageRef.getPage()).getUserTO();
+
+ form.setModel(new CompoundPropertyModel<MembershipTO>(membershipTO));
+
+ submit = new AjaxButton(SUBMIT, new ResourceModel(SUBMIT)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form form) {
+ userTO.getMemberships().remove(membershipTO);
+ userTO.getMemberships().add(membershipTO);
+
+ ((UserModalPage) pageRef.getPage()).setUserTO(userTO);
+
+ window.close(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+
+ form.add(submit);
+ form.setDefaultButton(submit);
+
+ final IndicatingAjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ ((UserModalPage) pageRef.getPage()).setUserTO(userTO);
+ window.close(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ }
+ };
+
+ cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
+
+ //--------------------------------
+ // Attributes panel
+ //--------------------------------
+ form.add(new PlainAttrsPanel("plainAttrs", membershipTO, form, mode));
+ form.add(new AnnotatedBeanPanel("systeminformation", membershipTO));
+ //--------------------------------
+
+ //--------------------------------
+ // Derived attributes container
+ //--------------------------------
+ form.add(new DerAttrsPanel("derAttrs", membershipTO));
+ //--------------------------------
+
+ //--------------------------------
+ // Virtual attributes container
+ //--------------------------------
+ form.add(new VirAttrsPanel("virAttrs", membershipTO, mode == Mode.TEMPLATE));
+ //--------------------------------
+
+ add(form);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/NotificationModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/NotificationModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/NotificationModalPage.java
new file mode 100644
index 0000000..782c907
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/NotificationModalPage.java
@@ -0,0 +1,441 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.LoggerCategoryPanel;
+import org.apache.syncope.client.console.panels.RoleSearchPanel;
+import org.apache.syncope.client.console.panels.UserSearchPanel;
+import org.apache.syncope.client.console.rest.LoggerRestClient;
+import org.apache.syncope.client.console.rest.NotificationRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.NotificationTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.IntMappingType;
+import org.apache.syncope.common.lib.types.TraceLevel;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.apache.wicket.validation.validator.EmailAddressValidator;
+
+class NotificationModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = -1975312550059578553L;
+
+ @SpringBean
+ private NotificationRestClient restClient;
+
+ @SpringBean
+ private LoggerRestClient loggerRestClient;
+
+ public NotificationModalPage(final PageReference pageRef, final ModalWindow window,
+ final NotificationTO notificationTO, final boolean createFlag) {
+
+ final Form<NotificationTO> form =
+ new Form<NotificationTO>(FORM, new CompoundPropertyModel<NotificationTO>(notificationTO));
+
+ final AjaxTextFieldPanel sender = new AjaxTextFieldPanel("sender", getString("sender"),
+ new PropertyModel<String>(notificationTO, "sender"));
+ sender.addRequiredLabel();
+ sender.addValidator(EmailAddressValidator.getInstance());
+ form.add(sender);
+
+ final AjaxTextFieldPanel subject = new AjaxTextFieldPanel("subject", getString("subject"),
+ new PropertyModel<String>(notificationTO, "subject"));
+ subject.addRequiredLabel();
+ form.add(subject);
+
+ final AjaxDropDownChoicePanel<String> template = new AjaxDropDownChoicePanel<String>(
+ "template", getString("template"),
+ new PropertyModel<String>(notificationTO, "template"));
+ template.setChoices(confRestClient.getMailTemplates());
+ template.addRequiredLabel();
+ form.add(template);
+
+ final AjaxDropDownChoicePanel<TraceLevel> traceLevel = new AjaxDropDownChoicePanel<TraceLevel>(
+ "traceLevel", getString("traceLevel"),
+ new PropertyModel<TraceLevel>(notificationTO, "traceLevel"));
+ traceLevel.setChoices(Arrays.asList(TraceLevel.values()));
+ traceLevel.addRequiredLabel();
+ form.add(traceLevel);
+
+ final AjaxCheckBoxPanel isActive = new AjaxCheckBoxPanel("isActive",
+ getString("isActive"), new PropertyModel<Boolean>(notificationTO, "active"));
+ if (createFlag) {
+ isActive.getField().setDefaultModelObject(Boolean.TRUE);
+ }
+ form.add(isActive);
+
+ final WebMarkupContainer aboutContainer = new WebMarkupContainer("aboutContainer");
+ aboutContainer.setOutputMarkupId(true);
+
+ form.add(aboutContainer);
+
+ final AjaxCheckBoxPanel checkAbout = new AjaxCheckBoxPanel("checkAbout", "checkAbout", new Model<Boolean>(
+ notificationTO.getUserAbout() == null && notificationTO.getRoleAbout() == null));
+ aboutContainer.add(checkAbout);
+
+ final AjaxCheckBoxPanel checkUserAbout = new AjaxCheckBoxPanel("checkUserAbout", "checkUserAbout",
+ new Model<Boolean>(notificationTO.getUserAbout() != null));
+ aboutContainer.add(checkUserAbout);
+
+ final AjaxCheckBoxPanel checkRoleAbout = new AjaxCheckBoxPanel("checkRoleAbout", "checkRoleAbout",
+ new Model<Boolean>(notificationTO.getRoleAbout() != null));
+ aboutContainer.add(checkRoleAbout);
+
+ final UserSearchPanel userAbout =
+ new UserSearchPanel.Builder("userAbout").fiql(notificationTO.getUserAbout()).build();
+ aboutContainer.add(userAbout);
+ userAbout.setEnabled(checkUserAbout.getModelObject());
+
+ final RoleSearchPanel roleAbout =
+ new RoleSearchPanel.Builder("roleAbout").fiql(notificationTO.getRoleAbout()).build();
+ aboutContainer.add(roleAbout);
+ roleAbout.setEnabled(checkRoleAbout.getModelObject());
+
+ checkAbout.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ if (checkAbout.getModelObject()) {
+ checkUserAbout.setModelObject(Boolean.FALSE);
+ checkRoleAbout.setModelObject(Boolean.FALSE);
+ userAbout.setEnabled(Boolean.FALSE);
+ roleAbout.setEnabled(Boolean.FALSE);
+ } else {
+ checkAbout.setModelObject(Boolean.TRUE);
+ }
+ target.add(aboutContainer);
+ }
+ });
+
+ checkUserAbout.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ if (checkUserAbout.getModelObject()) {
+ checkAbout.setModelObject(!checkUserAbout.getModelObject());
+ checkRoleAbout.setModelObject(!checkUserAbout.getModelObject());
+ roleAbout.setEnabled(Boolean.FALSE);
+ } else {
+ checkUserAbout.setModelObject(Boolean.TRUE);
+ }
+ userAbout.setEnabled(Boolean.TRUE);
+ target.add(aboutContainer);
+ }
+ });
+
+ checkRoleAbout.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ if (checkRoleAbout.getModelObject()) {
+ checkAbout.setModelObject(Boolean.FALSE);
+ checkUserAbout.setModelObject(Boolean.FALSE);
+ userAbout.setEnabled(Boolean.FALSE);
+ } else {
+ checkRoleAbout.setModelObject(Boolean.TRUE);
+ }
+ roleAbout.setEnabled(Boolean.TRUE);
+ target.add(aboutContainer);
+ }
+ });
+
+ final AjaxDropDownChoicePanel<IntMappingType> recipientAttrType = new AjaxDropDownChoicePanel<IntMappingType>(
+ "recipientAttrType", new ResourceModel("recipientAttrType", "recipientAttrType").getObject(),
+ new PropertyModel<IntMappingType>(notificationTO, "recipientAttrType"));
+ recipientAttrType.setChoices(new ArrayList<IntMappingType>(
+ IntMappingType.getAttributeTypes(AttributableType.USER,
+ EnumSet.of(IntMappingType.UserId, IntMappingType.Password))));
+ recipientAttrType.setRequired(true);
+ form.add(recipientAttrType);
+
+ final AjaxDropDownChoicePanel<String> recipientAttrName = new AjaxDropDownChoicePanel<String>(
+ "recipientAttrName", new ResourceModel("recipientAttrName", "recipientAttrName").getObject(),
+ new PropertyModel<String>(notificationTO, "recipientAttrName"));
+ recipientAttrName.setChoices(getSchemaNames(recipientAttrType.getModelObject()));
+ recipientAttrName.setRequired(true);
+ form.add(recipientAttrName);
+
+ recipientAttrType.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ recipientAttrName.setChoices(getSchemaNames(recipientAttrType.getModelObject()));
+ target.add(recipientAttrName);
+ }
+ });
+
+ form.add(new LoggerCategoryPanel(
+ "eventSelection",
+ loggerRestClient.listEvents(),
+ new PropertyModel<List<String>>(notificationTO, "events"),
+ getPageReference(),
+ "Notification") {
+
+ private static final long serialVersionUID = 6429053774964787735L;
+
+ @Override
+ protected String[] getListRoles() {
+ return new String[] {};
+ }
+
+ @Override
+ protected String[] getChangeRoles() {
+ return new String[] {};
+ }
+ });
+
+ final WebMarkupContainer recipientsContainer = new WebMarkupContainer("recipientsContainer");
+ recipientsContainer.setOutputMarkupId(true);
+
+ form.add(recipientsContainer);
+
+ final AjaxCheckBoxPanel checkStaticRecipients = new AjaxCheckBoxPanel("checkStaticRecipients",
+ "recipients", new Model<Boolean>(!notificationTO.getStaticRecipients().isEmpty()));
+ form.add(checkStaticRecipients);
+
+ if (createFlag) {
+ checkStaticRecipients.getField().setDefaultModelObject(Boolean.FALSE);
+ }
+
+ final AjaxTextFieldPanel staticRecipientsFieldPanel =
+ new AjaxTextFieldPanel("panel", "staticRecipients", new Model<String>(null));
+ staticRecipientsFieldPanel.addValidator(EmailAddressValidator.getInstance());
+ staticRecipientsFieldPanel.setRequired(checkStaticRecipients.getModelObject());
+
+ if (notificationTO.getStaticRecipients().isEmpty()) {
+ notificationTO.getStaticRecipients().add(null);
+ }
+
+ final MultiFieldPanel<String> staticRecipients = new MultiFieldPanel<String>("staticRecipients",
+ new PropertyModel<List<String>>(notificationTO, "staticRecipients"), staticRecipientsFieldPanel);
+ staticRecipients.setEnabled(checkStaticRecipients.getModelObject());
+ form.add(staticRecipients);
+
+ final AjaxCheckBoxPanel checkRecipients =
+ new AjaxCheckBoxPanel("checkRecipients", "checkRecipients",
+ new Model<Boolean>(notificationTO.getRecipients() == null ? false : true));
+ recipientsContainer.add(checkRecipients);
+
+ if (createFlag) {
+ checkRecipients.getField().setDefaultModelObject(Boolean.TRUE);
+ }
+
+ final UserSearchPanel recipients =
+ new UserSearchPanel.Builder("recipients").fiql(notificationTO.getRecipients()).build();
+
+ recipients.setEnabled(checkRecipients.getModelObject());
+ recipientsContainer.add(recipients);
+
+ final AjaxCheckBoxPanel selfAsRecipient = new AjaxCheckBoxPanel("selfAsRecipient",
+ getString("selfAsRecipient"), new PropertyModel<Boolean>(notificationTO, "selfAsRecipient"));
+ form.add(selfAsRecipient);
+
+ if (createFlag) {
+ selfAsRecipient.getField().setDefaultModelObject(Boolean.FALSE);
+ }
+
+ selfAsRecipient.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ if (!selfAsRecipient.getModelObject()
+ && !checkRecipients.getModelObject()
+ && !checkStaticRecipients.getModelObject()) {
+
+ checkRecipients.getField().setDefaultModelObject(Boolean.TRUE);
+ target.add(checkRecipients);
+ recipients.setEnabled(checkRecipients.getModelObject());
+ target.add(recipients);
+ target.add(recipientsContainer);
+ }
+ }
+ });
+
+ checkRecipients.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ if (!checkRecipients.getModelObject()
+ && !selfAsRecipient.getModelObject()
+ && !checkStaticRecipients.getModelObject()) {
+
+ checkStaticRecipients.getField().setDefaultModelObject(Boolean.TRUE);
+ target.add(checkStaticRecipients);
+ staticRecipients.setEnabled(Boolean.TRUE);
+ target.add(staticRecipients);
+ staticRecipientsFieldPanel.setRequired(Boolean.TRUE);
+ target.add(staticRecipientsFieldPanel);
+ }
+ recipients.setEnabled(checkRecipients.getModelObject());
+ target.add(recipients);
+ target.add(recipientsContainer);
+ }
+ });
+
+ checkStaticRecipients.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ if (!checkStaticRecipients.getModelObject()
+ && !selfAsRecipient.getModelObject()
+ && !checkRecipients.getModelObject()) {
+ checkRecipients.getField().setDefaultModelObject(Boolean.TRUE);
+ checkRecipients.setEnabled(Boolean.TRUE);
+ target.add(checkRecipients);
+ }
+ staticRecipients.setEnabled(checkStaticRecipients.getModelObject());
+ staticRecipientsFieldPanel.setRequired(checkStaticRecipients.getModelObject());
+ recipients.setEnabled(checkRecipients.getModelObject());
+ target.add(staticRecipientsFieldPanel);
+ target.add(staticRecipients);
+ target.add(recipients);
+ target.add(recipientsContainer);
+ }
+ });
+
+ AjaxButton submit = new IndicatingAjaxButton(APPLY, new Model<String>(getString(SUBMIT))) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ notificationTO.setUserAbout(
+ !checkAbout.getModelObject() && checkUserAbout.getModelObject() ? userAbout.buildFIQL() : null);
+ notificationTO.setRoleAbout(
+ !checkAbout.getModelObject()
+ && checkRoleAbout.getModelObject() ? roleAbout.buildFIQL() : null);
+ notificationTO.setRecipients(checkRecipients.getModelObject() ? recipients.buildFIQL() : null);
+ notificationTO.getStaticRecipients().removeAll(Collections.singleton(null));
+
+ try {
+ if (createFlag) {
+ restClient.create(notificationTO);
+ } else {
+ restClient.update(notificationTO);
+ }
+ info(getString(Constants.OPERATION_SUCCEEDED));
+
+ Configuration callerPage = (Configuration) pageRef.getPage();
+ callerPage.setModalResult(true);
+
+ window.close(target);
+ } catch (SyncopeClientException scee) {
+ error(getString(Constants.ERROR) + ": " + scee.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+
+ final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+ };
+
+ cancel.setDefaultFormProcessing(false);
+
+ String allowedRoles = createFlag
+ ? xmlRolesReader.getEntitlement("Notification", "create")
+ : xmlRolesReader.getEntitlement("Notification", "update");
+ MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, allowedRoles);
+
+ form.add(submit);
+ form.setDefaultButton(submit);
+
+ form.add(cancel);
+
+ add(form);
+ }
+
+ private List<String> getSchemaNames(final IntMappingType type) {
+ final List<String> result;
+
+ if (type == null) {
+ result = Collections.<String>emptyList();
+ } else {
+ switch (type) {
+ case UserPlainSchema:
+ result = schemaRestClient.getPlainSchemaNames(AttributableType.USER);
+ break;
+
+ case UserDerivedSchema:
+ result = schemaRestClient.getDerSchemaNames(AttributableType.USER);
+ break;
+
+ case UserVirtualSchema:
+ result = schemaRestClient.getVirSchemaNames(AttributableType.USER);
+ break;
+
+ case Username:
+ result = Collections.singletonList("Username");
+ break;
+
+ default:
+ result = Collections.<String>emptyList();
+ }
+ }
+
+ return result;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/NotificationTaskModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/NotificationTaskModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/NotificationTaskModalPage.java
new file mode 100644
index 0000000..70f63d6
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/NotificationTaskModalPage.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.NotificationTaskTO;
+import org.apache.wicket.markup.html.form.ListMultipleChoice;
+import org.apache.wicket.markup.html.form.TextArea;
+import org.apache.wicket.model.PropertyModel;
+
+public class NotificationTaskModalPage extends TaskModalPage {
+
+ private static final long serialVersionUID = -4399606755452034216L;
+
+ public NotificationTaskModalPage(final AbstractTaskTO taskTO) {
+ super(taskTO);
+
+ final AjaxTextFieldPanel sender = new AjaxTextFieldPanel("sender", getString("sender"),
+ new PropertyModel<String>(taskTO, "sender"));
+ sender.setEnabled(false);
+ profile.add(sender);
+
+ if (taskTO instanceof NotificationTaskTO) {
+ final ListMultipleChoice<String> recipients = new ListMultipleChoice<>("recipients",
+ new ArrayList<>(((NotificationTaskTO) taskTO).getRecipients()));
+ recipients.setMaxRows(5);
+ recipients.setEnabled(false);
+ profile.add(recipients);
+ }
+
+ final AjaxTextFieldPanel subject = new AjaxTextFieldPanel("subject", getString("subject"),
+ new PropertyModel<String>(taskTO, "subject"));
+ subject.setEnabled(false);
+ profile.add(subject);
+
+ final TextArea<String> textBody = new TextArea<String>("textBody",
+ new PropertyModel<String>(taskTO, "textBody"));
+ textBody.setEnabled(false);
+ profile.add(textBody);
+
+ final TextArea<String> htmlBody = new TextArea<String>("htmlBody",
+ new PropertyModel<String>(taskTO, "htmlBody"));
+ htmlBody.setEnabled(false);
+ profile.add(htmlBody);
+
+ final AjaxTextFieldPanel traceLevel = new AjaxTextFieldPanel("traceLevel", getString("traceLevel"),
+ new PropertyModel<String>(taskTO, "traceLevel"));
+ traceLevel.setEnabled(false);
+ profile.add(traceLevel);
+ }
+}
[06/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java b/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java
deleted file mode 100644
index cf343a6..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.commons.lang3.ObjectUtils;
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlRootElement
-@XmlType
-public class ConnConfProperty extends AbstractBaseBean implements Comparable<ConnConfProperty> {
-
- private static final long serialVersionUID = -8391413960221862238L;
-
- private ConnConfPropSchema schema;
-
- private final List<Object> values = new ArrayList<Object>();
-
- private boolean overridable;
-
- public ConnConfPropSchema getSchema() {
- return schema;
- }
-
- public void setSchema(final ConnConfPropSchema schema) {
- this.schema = schema;
- }
-
- @XmlElementWrapper(name = "values")
- @XmlElement(name = "value")
- @JsonProperty("values")
- public List<Object> getValues() {
- return values;
- }
-
- public boolean isOverridable() {
- return overridable;
- }
-
- public void setOverridable(final boolean overridable) {
- this.overridable = overridable;
- }
-
- @Override
- public int compareTo(final ConnConfProperty connConfProperty) {
- return ObjectUtils.compare(this.getSchema(), connConfProperty.getSchema());
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/ConnParameterType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/ConnParameterType.java b/common/src/main/java/org/apache/syncope/common/types/ConnParameterType.java
deleted file mode 100644
index 397f9bb..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/ConnParameterType.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum ConnParameterType {
-
- /**
- * Connector parameter type:
- */
- OVERRIDABLE(true),
- NOT_OVERRIDABLE(false);
-
- private boolean overridable;
-
- ConnParameterType(final boolean overridable) {
- this.overridable = overridable;
- }
-
- public boolean getOverridable() {
- return overridable;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/ConnectorCapability.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/ConnectorCapability.java b/common/src/main/java/org/apache/syncope/common/types/ConnectorCapability.java
deleted file mode 100644
index dfb25ed..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/ConnectorCapability.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-/**
- * Enum of all possible capabilities that a connector instance can expose.
- */
-@XmlEnum
-public enum ConnectorCapability {
-
- AUTHENTICATE,
- ONE_PHASE_CREATE,
- TWO_PHASES_CREATE,
- ONE_PHASE_UPDATE,
- TWO_PHASES_UPDATE,
- ONE_PHASE_DELETE,
- TWO_PHASES_DELETE,
- SEARCH,
- SYNC;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java b/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java
deleted file mode 100644
index 814ed57..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum EntityViolationType {
-
- Standard(""),
- InvalidAccountPolicy("org.apache.syncope.core.validation.accountpolicy"),
- InvalidConnInstanceLocation("org.apache.syncope.core.validation.conninstance.location"),
- InvalidConnPoolConf("org.apache.syncope.core.validation.conninstance.poolConf"),
- InvalidMapping("org.apache.syncope.core.validation.mapping"),
- InvalidMSchema("org.apache.syncope.core.validation.attrvalue.mSchema"),
- InvalidMDerSchema("org.apache.syncope.core.validation.attrvalue.mDerSchema"),
- InvalidMVirSchema("org.apache.syncope.core.validation.attrvalue.mVirSchema"),
- InvalidName("org.apache.syncope.core.validation.name"),
- InvalidNotification("org.apache.syncope.core.validation.notification"),
- InvalidPassword("org.apache.syncope.core.validation.syncopeuser.password"),
- InvalidPasswordPolicy("org.apache.syncope.core.validation.passwordpolicy"),
- InvalidPolicy("org.apache.syncope.core.validation.policy"),
- InvalidPropagationTask("org.apache.syncope.core.validation.propagationtask"),
- InvalidRSchema("org.apache.syncope.core.validation.attrvalue.rSchema"),
- InvalidRDerSchema("org.apache.syncope.core.validation.attrvalue.rDerSchema"),
- InvalidRVirSchema("org.apache.syncope.core.validation.attrvalue.rVirSchema"),
- InvalidReport("org.apache.syncope.core.validation.report"),
- InvalidResource("org.apache.syncope.core.validation.externalresource"),
- InvalidRoleOwner("org.apache.syncope.core.validation.syncoperole.owner"),
- InvalidSchemaEncrypted("org.apache.syncope.core.validation.schema.encrypted"),
- InvalidSchemaEnum("org.apache.syncope.core.validation.schema.enum"),
- InvalidSchemaMultivalueUnique("org.apache.syncope.core.validation.schema.multivalueUnique"),
- InvalidSchedTask("org.apache.syncope.core.validation.schedtask"),
- InvalidSyncTask("org.apache.syncope.core.validation.synctask"),
- InvalidSyncPolicy("org.apache.syncope.core.validation.syncpolicy"),
- InvalidUSchema("org.apache.syncope.core.validation.attrvalue.uSchema"),
- InvalidUDerSchema("org.apache.syncope.core.validation.attrvalue.derSchema"),
- InvalidUVirSchema("org.apache.syncope.core.validation.attrvalue.uVirSchema"),
- InvalidUsername("org.apache.syncope.core.validation.syncopeuser.username"),
- InvalidValueList("org.apache.syncope.core.validation.attr.valueList"),
- MoreThanOneNonNull("org.apache.syncope.core.validation.attrvalue.moreThanOneNonNull");
-
- private String message;
-
- EntityViolationType(final String message) {
- this.message = message;
- }
-
- public void setMessage(final String message) {
- this.message = message;
- }
-
- public String getMessage() {
- return message;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/IntMappingType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/IntMappingType.java b/common/src/main/java/org/apache/syncope/common/types/IntMappingType.java
deleted file mode 100644
index c9b9624..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/IntMappingType.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import java.util.Collection;
-import java.util.EnumSet;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-/**
- * Internal attribute mapping type.
- */
-@XmlEnum
-public enum IntMappingType {
-
- // Unfortunately enum type cannot be extended ...
- // -------------------------
- // User attribute types (the same in UserMappingType)
- // -------------------------
- UserSchema(AttributableType.USER),
- UserDerivedSchema(AttributableType.USER),
- UserVirtualSchema(AttributableType.USER),
- UserId(AttributableType.USER),
- Username(AttributableType.USER),
- Password(AttributableType.USER),
- // -------------------------
- // Role attribute types (the same in RoleMappingType)
- // -------------------------
- RoleSchema(AttributableType.ROLE),
- RoleDerivedSchema(AttributableType.ROLE),
- RoleVirtualSchema(AttributableType.ROLE),
- RoleId(AttributableType.ROLE),
- RoleName(AttributableType.ROLE),
- RoleOwnerSchema(AttributableType.ROLE),
- // -------------------------
- // Membership attribute types (the same in MembershipMappingType)
- // -------------------------
- MembershipSchema(AttributableType.MEMBERSHIP),
- MembershipDerivedSchema(AttributableType.MEMBERSHIP),
- MembershipVirtualSchema(AttributableType.MEMBERSHIP),
- MembershipId(AttributableType.MEMBERSHIP);
-
- private AttributableType attributableType;
-
- private IntMappingType(final AttributableType attributableType) {
- this.attributableType = attributableType;
- }
-
- public AttributableType getAttributableType() {
- return attributableType;
- }
-
- /**
- * Get attribute types for a certain attributable type.
- *
- * @param attributableType attributable type
- * @param toBeFiltered types to be filtered from the result.
- * @return set of attribute types.
- */
- public static Set<IntMappingType> getAttributeTypes(
- final AttributableType attributableType, final Collection<IntMappingType> toBeFiltered) {
-
- final Set<IntMappingType> res = getAttributeTypes(attributableType);
- res.removeAll(toBeFiltered);
-
- return res;
- }
-
- /**
- * Get attribute types for a certain attributable type.
- *
- * @param attributableType attributable type
- * @return set of attribute types.
- */
- public static Set<IntMappingType> getAttributeTypes(final AttributableType attributableType) {
- final EnumSet<?> enumset;
-
- switch (attributableType) {
- case ROLE:
- enumset = EnumSet.allOf(RoleMappingType.class);
- break;
-
- case MEMBERSHIP:
- enumset = EnumSet.allOf(MembershipMappingType.class);
- break;
-
- case USER:
- default:
- enumset = EnumSet.allOf(UserMappingType.class);
- }
-
- final Set<IntMappingType> result = new HashSet<IntMappingType>(enumset.size());
- for (Object obj : enumset) {
- result.add(IntMappingType.valueOf(obj.toString()));
- }
-
- return result;
- }
-
- public static Set<IntMappingType> getEmbedded() {
- return EnumSet.of(
- IntMappingType.UserId, IntMappingType.Username, IntMappingType.Password,
- IntMappingType.RoleId, IntMappingType.RoleName, IntMappingType.RoleOwnerSchema,
- IntMappingType.MembershipId);
- }
-
- /**
- * Check if attribute type belongs to the specified attributable type set.
- *
- * @param attributableType attributable type.
- * @param type attribute type.
- * @return true if attribute type belongs to the specified attributable type set.
- */
- public static boolean contains(final AttributableType attributableType, final String type) {
- switch (attributableType) {
- case ROLE:
- for (RoleMappingType c : RoleMappingType.values()) {
- if (c.name().equals(type)) {
- return true;
- }
- }
- break;
-
- case MEMBERSHIP:
- for (MembershipMappingType c : MembershipMappingType.values()) {
- if (c.name().equals(type)) {
- return true;
- }
- }
- break;
-
- case USER:
- default:
- for (UserMappingType c : UserMappingType.values()) {
- if (c.name().equals(type)) {
- return true;
- }
- }
- break;
- }
- return false;
- }
-
- /**
- * User attribute types.
- */
- private enum UserMappingType {
-
- UserSchema,
- UserDerivedSchema,
- UserVirtualSchema,
- UserId,
- Username,
- Password;
-
- }
-
- /**
- * Role attribute types.
- */
- private enum RoleMappingType {
-
- RoleSchema,
- RoleDerivedSchema,
- RoleVirtualSchema,
- RoleId,
- RoleName,
- RoleOwnerSchema;
-
- }
-
- /**
- * Membership attribute types.
- */
- private enum MembershipMappingType {
-
- MembershipSchema,
- MembershipDerivedSchema,
- MembershipVirtualSchema,
- MembershipId;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/LoggerLevel.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/LoggerLevel.java b/common/src/main/java/org/apache/syncope/common/types/LoggerLevel.java
deleted file mode 100644
index 85b8383..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/LoggerLevel.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-import org.apache.logging.log4j.Level;
-
-@XmlEnum
-public enum LoggerLevel {
-
- OFF(Level.OFF),
- FATAL(Level.FATAL),
- ERROR(Level.ERROR),
- WARN(Level.WARN),
- INFO(Level.INFO),
- DEBUG(Level.DEBUG),
- TRACE(Level.TRACE),
- ALL(Level.ALL);
-
- private Level level;
-
- LoggerLevel(final Level level) {
- this.level = level;
- }
-
- public Level getLevel() {
- return level;
- }
-
- public static LoggerLevel fromLevel(final Level level) {
- return LoggerLevel.valueOf(level.name());
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/LoggerType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/LoggerType.java b/common/src/main/java/org/apache/syncope/common/types/LoggerType.java
deleted file mode 100644
index dcb21b7..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/LoggerType.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum LoggerType {
-
- /**
- * This type describes a common logger used to handle system and application events.
- */
- LOG(""),
- /**
- * Audit logger only focus on security related events, usually logging how did what and when.
- * In case of a security incident audit loggers should allow an administrator to recall all
- * actions a certain user has done.
- */
- AUDIT("syncope.audit");
-
- private String prefix;
-
- LoggerType(final String prefix) {
- this.prefix = prefix;
- }
-
- public String getPrefix() {
- return prefix;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/MappingPurpose.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/MappingPurpose.java b/common/src/main/java/org/apache/syncope/common/types/MappingPurpose.java
deleted file mode 100644
index a2435cb..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/MappingPurpose.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-public enum MappingPurpose {
-
- BOTH,
- SYNCHRONIZATION,
- PROPAGATION,
- NONE
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/MatchingRule.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/MatchingRule.java b/common/src/main/java/org/apache/syncope/common/types/MatchingRule.java
deleted file mode 100644
index 51933fc..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/MatchingRule.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-/**
- * Sync/Push task matching rule.
- */
-@XmlEnum
-public enum MatchingRule {
-
- /**
- * Do not perform any action.
- */
- IGNORE,
- /**
- * Update matching entity.
- */
- UPDATE,
- /**
- * Delete resource entity.
- */
- DEPROVISION,
- /**
- * Unlink resource and delete resource entity.
- */
- UNASSIGN,
- /**
- * Just unlink resource without performing any (de-)provisioning operation.
- */
- UNLINK,
- /**
- * Just link resource without performing any (de-)provisioning operation.
- */
- LINK
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java b/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java
deleted file mode 100644
index ae93ca6..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.annotation.SchemaList;
-
-@XmlType
-public class PasswordPolicySpec extends AbstractPolicySpec {
-
- private static final long serialVersionUID = -7988778083915548547L;
-
- /**
- * History length.
- */
- private int historyLength;
-
- /**
- * Minimum length.
- */
- private int maxLength;
-
- /**
- * Maximum length.
- */
- private int minLength;
-
- /**
- * Substrings not permitted.
- */
- private List<String> wordsNotPermitted;
-
- /**
- * User attribute values not permitted.
- */
- @SchemaList
- private List<String> schemasNotPermitted;
-
- /**
- * Specify if one or more non alphanumeric characters are required.
- */
- private boolean nonAlphanumericRequired;
-
- /**
- * Specify if one or more alphanumeric characters are required.
- */
- private boolean alphanumericRequired;
-
- /**
- * Specify if one or more digits are required.
- */
- private boolean digitRequired;
-
- /**
- * Specify if one or more lowercase alphabetic characters are required.
- */
- private boolean lowercaseRequired;
-
- /**
- * Specify if one or more uppercase alphabetic characters are required.
- */
- private boolean uppercaseRequired;
-
- /**
- * Specify if must start with a digit.
- */
- private boolean mustStartWithDigit;
-
- /**
- * Specify if mustn't start with a digit.
- */
- private boolean mustntStartWithDigit;
-
- /**
- * Specify if must end with a digit.
- */
- private boolean mustEndWithDigit;
-
- /**
- * Specify if mustn't end with a digit.
- */
- private boolean mustntEndWithDigit;
-
- /**
- * Specify if must start with a non alphanumeric character.
- */
- private boolean mustStartWithNonAlpha;
-
- /**
- * Specify if must start with a alphanumeric character.
- */
- private boolean mustStartWithAlpha;
-
- /**
- * Specify if mustn't start with a non alphanumeric character.
- */
- private boolean mustntStartWithNonAlpha;
-
- /**
- * Specify if mustn't start with a alphanumeric character.
- */
- private boolean mustntStartWithAlpha;
-
- /**
- * Specify if must end with a non alphanumeric character.
- */
- private boolean mustEndWithNonAlpha;
-
- /**
- * Specify if must end with a alphanumeric character.
- */
- private boolean mustEndWithAlpha;
-
- /**
- * Specify if mustn't end with a non alphanumeric character.
- */
- private boolean mustntEndWithNonAlpha;
-
- /**
- * Specify if mustn't end with a alphanumeric character.
- */
- private boolean mustntEndWithAlpha;
-
- /**
- * Specify if password shall not be stored internally.
- */
- private boolean allowNullPassword;
-
- /**
- * Substrings not permitted as prefix.
- */
- private List<String> prefixesNotPermitted;
-
- /**
- * Substrings not permitted as suffix.
- */
- private List<String> suffixesNotPermitted;
-
- public boolean isDigitRequired() {
- return digitRequired;
- }
-
- public void setDigitRequired(final boolean digitRequired) {
- this.digitRequired = digitRequired;
- }
-
- public boolean isLowercaseRequired() {
- return lowercaseRequired;
- }
-
- public void setLowercaseRequired(final boolean lowercaseRequired) {
- this.lowercaseRequired = lowercaseRequired;
- }
-
- public int getMaxLength() {
- return maxLength;
- }
-
- public void setMaxLength(final int maxLength) {
- this.maxLength = maxLength;
- }
-
- public int getMinLength() {
- return minLength;
- }
-
- public void setMinLength(final int minLength) {
- this.minLength = minLength;
- }
-
- public boolean isMustEndWithDigit() {
- return mustEndWithDigit;
- }
-
- public void setMustEndWithDigit(final boolean mustEndWithDigit) {
- this.mustEndWithDigit = mustEndWithDigit;
- }
-
- public boolean isMustEndWithNonAlpha() {
- return mustEndWithNonAlpha;
- }
-
- public void setMustEndWithNonAlpha(final boolean mustEndWithNonAlpha) {
- this.mustEndWithNonAlpha = mustEndWithNonAlpha;
- }
-
- public boolean isMustStartWithDigit() {
- return mustStartWithDigit;
- }
-
- public void setMustStartWithDigit(final boolean mustStartWithDigit) {
- this.mustStartWithDigit = mustStartWithDigit;
- }
-
- public boolean isMustStartWithNonAlpha() {
- return mustStartWithNonAlpha;
- }
-
- public void setMustStartWithNonAlpha(final boolean mustStartWithNonAlpha) {
- this.mustStartWithNonAlpha = mustStartWithNonAlpha;
- }
-
- public boolean isMustntEndWithDigit() {
- return mustntEndWithDigit;
- }
-
- public void setMustntEndWithDigit(final boolean mustntEndWithDigit) {
- this.mustntEndWithDigit = mustntEndWithDigit;
- }
-
- public boolean isMustntEndWithNonAlpha() {
- return mustntEndWithNonAlpha;
- }
-
- public void setMustntEndWithNonAlpha(final boolean mustntEndWithNonAlpha) {
- this.mustntEndWithNonAlpha = mustntEndWithNonAlpha;
- }
-
- public boolean isMustntStartWithDigit() {
- return mustntStartWithDigit;
- }
-
- public void setMustntStartWithDigit(final boolean mustntStartWithDigit) {
- this.mustntStartWithDigit = mustntStartWithDigit;
- }
-
- public boolean isMustntStartWithNonAlpha() {
- return mustntStartWithNonAlpha;
- }
-
- public void setMustntStartWithNonAlpha(final boolean mustntStartWithNonAlpha) {
- this.mustntStartWithNonAlpha = mustntStartWithNonAlpha;
- }
-
- public boolean isNonAlphanumericRequired() {
- return nonAlphanumericRequired;
- }
-
- public void setNonAlphanumericRequired(final boolean nonAlphanumericRequired) {
- this.nonAlphanumericRequired = nonAlphanumericRequired;
- }
-
- @XmlElementWrapper(name = "prefixesNotPermitted")
- @XmlElement(name = "prefix")
- @JsonProperty("prefixesNotPermitted")
- public List<String> getPrefixesNotPermitted() {
- if (prefixesNotPermitted == null) {
- prefixesNotPermitted = new ArrayList<String>();
- }
- return prefixesNotPermitted;
- }
-
- @XmlElementWrapper(name = "schemasNotPermitted")
- @XmlElement(name = "schema")
- @JsonProperty("schemasNotPermitted")
- public List<String> getSchemasNotPermitted() {
- if (schemasNotPermitted == null) {
- schemasNotPermitted = new ArrayList<String>();
- }
- return schemasNotPermitted;
- }
-
- @XmlElementWrapper(name = "suffixesNotPermitted")
- @XmlElement(name = "suffix")
- @JsonProperty("suffixesNotPermitted")
- public List<String> getSuffixesNotPermitted() {
- if (suffixesNotPermitted == null) {
- suffixesNotPermitted = new ArrayList<String>();
- }
- return suffixesNotPermitted;
- }
-
- public boolean isUppercaseRequired() {
- return uppercaseRequired;
- }
-
- public void setUppercaseRequired(final boolean uppercaseRequired) {
- this.uppercaseRequired = uppercaseRequired;
- }
-
- @XmlElementWrapper(name = "wordsNotPermitted")
- @XmlElement(name = "word")
- @JsonProperty("wordsNotPermitted")
- public List<String> getWordsNotPermitted() {
- if (wordsNotPermitted == null) {
- wordsNotPermitted = new ArrayList<String>();
- }
- return wordsNotPermitted;
- }
-
- public boolean isAlphanumericRequired() {
- return alphanumericRequired;
- }
-
- public void setAlphanumericRequired(final boolean alphanumericRequired) {
- this.alphanumericRequired = alphanumericRequired;
- }
-
- public boolean isMustEndWithAlpha() {
- return mustEndWithAlpha;
- }
-
- public void setMustEndWithAlpha(final boolean mustEndWithAlpha) {
- this.mustEndWithAlpha = mustEndWithAlpha;
- }
-
- public boolean isMustStartWithAlpha() {
- return mustStartWithAlpha;
- }
-
- public void setMustStartWithAlpha(final boolean mustStartWithAlpha) {
- this.mustStartWithAlpha = mustStartWithAlpha;
- }
-
- public boolean isMustntEndWithAlpha() {
- return mustntEndWithAlpha;
- }
-
- public void setMustntEndWithAlpha(final boolean mustntEndWithAlpha) {
- this.mustntEndWithAlpha = mustntEndWithAlpha;
- }
-
- public boolean isMustntStartWithAlpha() {
- return mustntStartWithAlpha;
- }
-
- public void setMustntStartWithAlpha(final boolean mustntStartWithAlpha) {
- this.mustntStartWithAlpha = mustntStartWithAlpha;
- }
-
- public int getHistoryLength() {
- return historyLength;
- }
-
- public void setHistoryLength(final int historyLength) {
- this.historyLength = historyLength;
- }
-
- public boolean isAllowNullPassword() {
- return allowNullPassword;
- }
-
- public void setAllowNullPassword(final boolean allowNullPassword) {
- this.allowNullPassword = allowNullPassword;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/PolicyType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/PolicyType.java b/common/src/main/java/org/apache/syncope/common/types/PolicyType.java
deleted file mode 100644
index 72b5d5c..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/PolicyType.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum PolicyType {
-
- /**
- * Account policy like:
- * password expire time, change password at first access, ...
- */
- ACCOUNT("Account Policy"),
- GLOBAL_ACCOUNT("Account Global Policy"),
- /**
- * Password policy regarding password syntax.
- */
- PASSWORD("Password Policy"),
- GLOBAL_PASSWORD("Password Global Policy"),
- /**
- * SYNC policy regarding account conflicts resolution.
- */
- SYNC("Synchronization Policy"),
- GLOBAL_SYNC("Synchronization Global Policy"),
- /**
- * PUSH policy regarding account conflicts resolution.
- */
- PUSH("Push Policy"),
- GLOBAL_PUSH("Push Global Policy");
-
- private String description;
-
- PolicyType(final String description) {
- this.description = description;
- }
-
- public String getDescription() {
- return description;
- }
-
- public static PolicyType fromString(final String value) {
- return PolicyType.valueOf(value.toUpperCase());
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/Preference.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/Preference.java b/common/src/main/java/org/apache/syncope/common/types/Preference.java
deleted file mode 100644
index eedc0bd..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/Preference.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-/**
- * Preferences available to be specified during requests.
- *
- * @see RESTHeaders#PREFER
- * @see RESTHeaders#PREFERENCE_APPLIED
- */
-public enum Preference {
-
- NONE(""),
- RETURN_CONTENT("return-content"),
- RETURN_NO_CONTENT("return-no-content");
-
- private String literal;
-
- private Preference(final String literal) {
- this.literal = literal;
- }
-
- @Override
- public String toString() {
- return literal;
- }
-
- public static Preference fromString(final String literal) {
- Preference result = null;
-
- for (Preference preference : values()) {
- if (preference.toString().equalsIgnoreCase(literal)) {
- result = preference;
- }
- }
-
- if (result == null) {
- result = NONE;
- }
-
- return result;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/PropagationMode.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/PropagationMode.java b/common/src/main/java/org/apache/syncope/common/types/PropagationMode.java
deleted file mode 100644
index 59f3ade..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/PropagationMode.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum PropagationMode {
-
- ONE_PHASE,
- TWO_PHASES
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/PropagationTaskExecStatus.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/PropagationTaskExecStatus.java b/common/src/main/java/org/apache/syncope/common/types/PropagationTaskExecStatus.java
deleted file mode 100644
index a85f132..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/PropagationTaskExecStatus.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-/**
- * Status of a propagation task execution.
- *
- * CREATED -> SUBMITTED or UBSUBMITTED (depending on the external resource to
- * return success or failure).
- * SUBMITTED -> SUCCESS or FAILURE (depending on the external resource to
- * report success or failure).
- *
- * @see org.apache.syncope.common.to.TaskExecTO
- */
-@XmlEnum
-public enum PropagationTaskExecStatus {
-
- CREATED,
- SUBMITTED,
- UNSUBMITTED,
- SUCCESS,
- FAILURE;
-
- public boolean isSuccessful() {
- return this == SUCCESS || this == SUBMITTED;
- }
-
- public static PropagationTaskExecStatus fromString(final String value) {
- return PropagationTaskExecStatus.valueOf(value.toUpperCase());
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/RESTHeaders.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/RESTHeaders.java b/common/src/main/java/org/apache/syncope/common/types/RESTHeaders.java
deleted file mode 100644
index 3e7cdc3..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/RESTHeaders.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-/**
- * Custom HTTP headers in use with REST services.
- */
-public final class RESTHeaders {
-
- /**
- * UserId option key.
- */
- public static final String USER_ID = "Syncope.UserId";
-
- /**
- * Username option key.
- */
- public static final String USERNAME = "Syncope.Username";
-
- /**
- * Option key stating if user request create is allowed or not.
- */
- public static final String SELFREG_ALLOWED = "Syncope.SelfRegistration.Allowed";
-
- /**
- * Option key stating if password reset is allowed or not.
- */
- public static final String PWDRESET_ALLOWED = "Syncope.PasswordReset.Allowed";
-
- /**
- * Option key stating if password reset requires security question or not.
- */
- public static final String PWDRESET_NEEDS_SECURITYQUESTIONS = "Syncope.PasswordReset.SecurityQuestions";
-
- /**
- * Option key stating if Activiti workflow adapter is in use for users.
- */
- public static final String ACTIVITI_USER_ENABLED = "Syncope.Activiti.User.Enabled";
-
- /**
- * Option key stating if Activiti workflow adapter is in use for roles.
- */
- public static final String ACTIVITI_ROLE_ENABLED = "Syncope.Activiti.Role.Enabled";
-
- /**
- * Option key stating if Camel is the current provisioning manager engine.
- */
- public static final String CAMEL_USER_PROVISIONING_MANAGER ="Syncope.Provisioning.Camel.User.Enabled";
-
- /**
- * Option key stating if Camel is the current provisioning manager engine.
- */
- public static final String CAMEL_ROLE_PROVISIONING_MANAGER ="Syncope.Provisioning.Camel.Role.Enabled";
-
-
- /**
- * HTTP header key for object ID assigned to an object after its creation.
- */
- public static final String RESOURCE_ID = "Syncope.Id";
-
- /**
- * Declares the type of exception being raised.
- *
- * @see ClientExceptionType
- */
- public static final String ERROR_CODE = "X-Application-Error-Code";
-
- /**
- * Declares additional information for the exception being raised.
- */
- public static final String ERROR_INFO = "X-Application-Error-Info";
-
- /**
- * Mediatype for PNG images, not defined in <tt>javax.ws.rs.core.MediaType</tt>.
- *
- * @see javax.ws.rs.core.MediaType
- */
- public static final String MEDIATYPE_IMAGE_PNG = "image/png";
-
- /**
- * Allows the client to specify a preference for the result to be returned from the server.
- * <a href="http://msdn.microsoft.com/en-us/library/hh537533.aspx">More information</a>.
- *
- * @see Preference
- */
- public static final String PREFER = "Prefer";
-
- /**
- * Allowd the server to inform the client about the fact that a specified preference was applied.
- * <a href="http://msdn.microsoft.com/en-us/library/hh554623.aspx">More information</a>.
- *
- * @see Preference
- */
- public static final String PREFERENCE_APPLIED = "Preference-Applied";
-
- private RESTHeaders() {
- // Empty constructor for static utility class.
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/ReportExecExportFormat.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/ReportExecExportFormat.java b/common/src/main/java/org/apache/syncope/common/types/ReportExecExportFormat.java
deleted file mode 100644
index 8eddcc5..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/ReportExecExportFormat.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum ReportExecExportFormat {
-
- XML,
- HTML,
- PDF,
- RTF,
- CSV
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/ReportExecStatus.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/ReportExecStatus.java b/common/src/main/java/org/apache/syncope/common/types/ReportExecStatus.java
deleted file mode 100644
index 5a5600a..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/ReportExecStatus.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum ReportExecStatus {
-
- STARTED,
- RUNNING,
- SUCCESS,
- FAILURE;
-
- public static ReportExecStatus fromString(final String value) {
- return ReportExecStatus.valueOf(value.toUpperCase());
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/ResourceAssociationActionType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/ResourceAssociationActionType.java b/common/src/main/java/org/apache/syncope/common/types/ResourceAssociationActionType.java
deleted file mode 100644
index ce604c7..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/ResourceAssociationActionType.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum ResourceAssociationActionType {
-
- /**
- * Add association between user/role on Syncope and external resource(s) without any propagation.
- */
- LINK,
- /**
- * Add user/role into external resource(s).
- */
- PROVISION,
- /**
- * Assign (link + provision) external resource(s) with user/role.
- */
- ASSIGN
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/ResourceDeassociationActionType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/ResourceDeassociationActionType.java b/common/src/main/java/org/apache/syncope/common/types/ResourceDeassociationActionType.java
deleted file mode 100644
index c357c1d..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/ResourceDeassociationActionType.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum ResourceDeassociationActionType {
-
- /**
- * Remove association between user/role on Syncope and external resource(s) without any propagation.
- */
- UNLINK,
- /**
- * Remove user/role from external resource(s).
- */
- DEPROVISION,
- /**
- * Unassign (unlink + de-provision) external resource(s) from user/role.
- */
- UNASSIGN
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/ResourceOperation.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/ResourceOperation.java b/common/src/main/java/org/apache/syncope/common/types/ResourceOperation.java
deleted file mode 100644
index 0a59853..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/ResourceOperation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum ResourceOperation {
-
- CREATE,
- UPDATE,
- DELETE,
- NONE
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/SchemaType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/SchemaType.java b/common/src/main/java/org/apache/syncope/common/types/SchemaType.java
deleted file mode 100644
index 0507037..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/SchemaType.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-import org.apache.syncope.common.to.AbstractSchemaTO;
-import org.apache.syncope.common.to.DerSchemaTO;
-import org.apache.syncope.common.to.SchemaTO;
-import org.apache.syncope.common.to.VirSchemaTO;
-
-@XmlEnum
-public enum SchemaType {
-
- /**
- * Standard schema for normal attributes to be stored within syncope.
- */
- NORMAL(SchemaTO.class),
- /**
- * Derived schema calculated based on other attributes.
- */
- DERIVED(DerSchemaTO.class),
- /**
- * Virtual schema for attributes fetched from remote resources only.
- */
- VIRTUAL(VirSchemaTO.class);
-
- private final Class<? extends AbstractSchemaTO> toClass;
-
- SchemaType(final Class<? extends AbstractSchemaTO> toClass) {
- this.toClass = toClass;
- }
-
- public Class<? extends AbstractSchemaTO> getToClass() {
- return toClass;
- }
-
- public static SchemaType fromToClass(final Class<? extends AbstractSchemaTO> toClass) {
- SchemaType schemaType = null;
-
- if (SchemaTO.class.equals(toClass)) {
- schemaType = SchemaType.NORMAL;
- } else if (DerSchemaTO.class.equals(toClass)) {
- schemaType = SchemaType.DERIVED;
- } else if (VirSchemaTO.class.equals(toClass)) {
- schemaType = SchemaType.VIRTUAL;
- } else {
- throw new IllegalArgumentException("Unexpected class: " + toClass.getName());
- }
-
- return schemaType;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/SubjectType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/SubjectType.java b/common/src/main/java/org/apache/syncope/common/types/SubjectType.java
deleted file mode 100644
index 427fc49..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/SubjectType.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum SubjectType {
-
- USER,
- ROLE;
-
- public AttributableType asAttributableType() {
- return this == USER
- ? AttributableType.USER
- : AttributableType.ROLE;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/SyncPolicySpec.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/SyncPolicySpec.java b/common/src/main/java/org/apache/syncope/common/types/SyncPolicySpec.java
deleted file mode 100644
index f57dd42..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/SyncPolicySpec.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.annotation.ClassList;
-import org.apache.syncope.common.annotation.SchemaList;
-
-@XmlType
-public class SyncPolicySpec extends AbstractPolicySpec {
-
- private static final long serialVersionUID = -3144027171719498127L;
-
- /**
- * SyncopeUser attributes and fields for matching during synchronization.
- */
- @SchemaList(extended = true)
- private final List<String> uAltSearchSchemas = new ArrayList<String>();
-
- @ClassList
- private String userJavaRule;
-
- /**
- * SyncopeRole attributes and fields for matching during synchronization.
- */
- @SchemaList(extended = true)
- private final List<String> rAltSearchSchemas = new ArrayList<String>();
-
- @ClassList
- private String roleJavaRule;
-
- /**
- * Conflict resolution action.
- */
- private ConflictResolutionAction conflictResolutionAction;
-
- public ConflictResolutionAction getConflictResolutionAction() {
- return conflictResolutionAction == null
- ? ConflictResolutionAction.IGNORE
- : conflictResolutionAction;
- }
-
- public void setConflictResolutionAction(final ConflictResolutionAction conflictResolutionAction) {
- this.conflictResolutionAction = conflictResolutionAction;
- }
-
- @XmlElementWrapper(name = "userAltSearchSchemas")
- @XmlElement(name = "userAltSearchSchema")
- @JsonProperty("userAltSearchSchemas")
- public List<String> getuAltSearchSchemas() {
- return uAltSearchSchemas;
- }
-
- @XmlElementWrapper(name = "roleAltSearchSchemas")
- @XmlElement(name = "roleAltSearchSchema")
- @JsonProperty("roleAltSearchSchemas")
- public List<String> getrAltSearchSchemas() {
- return rAltSearchSchemas;
- }
-
- public String getRoleJavaRule() {
- return roleJavaRule;
- }
-
- public void setRoleJavaRule(final String roleJavaRule) {
- this.roleJavaRule = roleJavaRule;
- }
-
- public String getUserJavaRule() {
- return userJavaRule;
- }
-
- public void setUserJavaRule(final String userJavaRule) {
- this.userJavaRule = userJavaRule;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/TaskType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/TaskType.java b/common/src/main/java/org/apache/syncope/common/types/TaskType.java
deleted file mode 100644
index 8999d94..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/TaskType.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum TaskType {
-
- PROPAGATION("propagation"),
- NOTIFICATION("notification"),
- SCHEDULED("sched"),
- SYNCHRONIZATION("sync"),
- PUSH("push");
-
- private String name;
-
- private TaskType(final String name) {
- this.name = name;
- }
-
- @Override
- public String toString() {
- return name;
- }
-
- public static TaskType fromString(final String name) {
- if (name != null) {
- for (TaskType t : TaskType.values()) {
- if (t.name.equalsIgnoreCase(name)) {
- return t;
- }
- }
- }
-
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/TraceLevel.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/TraceLevel.java b/common/src/main/java/org/apache/syncope/common/types/TraceLevel.java
deleted file mode 100644
index 63a4e5c..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/TraceLevel.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum TraceLevel {
-
- /**
- * No details at all.
- */
- NONE,
- /**
- * Only failed entries.
- */
- FAILURES,
- /**
- * Only an overall summary.
- */
- SUMMARY,
- /**
- * All available information, including per-entry information.
- */
- ALL
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/UnmatchingRule.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/UnmatchingRule.java b/common/src/main/java/org/apache/syncope/common/types/UnmatchingRule.java
deleted file mode 100644
index d57aacf..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/UnmatchingRule.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-/**
- * Sync/Push task un-matching rule.
- */
-@XmlEnum
-public enum UnmatchingRule {
-
- /**
- * Do not perform any action.
- */
- IGNORE,
- /**
- * Link the resource and create entity.
- */
- ASSIGN,
- /**
- * Create entity without linking the resource.
- */
- PROVISION,
- /**
- * Just unlink resource without performing any (de-)provisioning operation.
- * In case of sync task UNLINK and IGNORE will coincide.
- */
- UNLINK
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/WorkflowFormPropertyType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/WorkflowFormPropertyType.java b/common/src/main/java/org/apache/syncope/common/types/WorkflowFormPropertyType.java
deleted file mode 100644
index cfd473f..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/WorkflowFormPropertyType.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum WorkflowFormPropertyType {
-
- String,
- Long,
- Enum,
- Date,
- Boolean
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/WorkflowTasks.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/WorkflowTasks.java b/common/src/main/java/org/apache/syncope/common/types/WorkflowTasks.java
deleted file mode 100644
index cc01bc6..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/WorkflowTasks.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.types;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class WorkflowTasks {
-
- private List<String> tasks;
-
- public WorkflowTasks() {
- this.tasks = new ArrayList<String>();
- }
-
- public WorkflowTasks(final Collection<String> tasks) {
- this();
- this.tasks.addAll(tasks);
- }
-
- public List<String> getTasks() {
- return tasks;
- }
-
- public void setTasks(final List<String> tasks) {
- this.tasks = tasks;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/types/package-info.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/types/package-info.java b/common/src/main/java/org/apache/syncope/common/types/package-info.java
deleted file mode 100644
index b9bb6dd..0000000
--- a/common/src/main/java/org/apache/syncope/common/types/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
-package org.apache.syncope.common.types;
-
-import javax.xml.bind.annotation.XmlSchema;
-import org.apache.syncope.common.SyncopeConstants;
[35/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/PolicyBeanPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/PolicyBeanPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/PolicyBeanPanel.java
new file mode 100644
index 0000000..67d6684
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/PolicyBeanPanel.java
@@ -0,0 +1,328 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.beans.PropertyDescriptor;
+import java.io.Serializable;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.rest.PolicyRestClient;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AbstractFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.list.AltListView;
+import org.apache.syncope.common.lib.annotation.ClassList;
+import org.apache.syncope.common.lib.annotation.SchemaList;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.PolicySpec;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.model.util.ListModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.util.ClassUtils;
+
+public class PolicyBeanPanel extends Panel {
+
+ private static final long serialVersionUID = -3035998190456928143L;
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(PolicyBeanPanel.class);
+
+ @SpringBean
+ private SchemaRestClient schemaRestClient;
+
+ @SpringBean
+ private PolicyRestClient policyRestClient;
+
+ final IModel<List<String>> userSchemas = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = -2012833443695917883L;
+
+ @Override
+ protected List<String> load() {
+ return schemaRestClient.getPlainSchemaNames(AttributableType.USER);
+ }
+ };
+
+ final IModel<List<String>> roleSchemas = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ return schemaRestClient.getPlainSchemaNames(AttributableType.ROLE);
+ }
+ };
+
+ final IModel<List<String>> correlationRules = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ return policyRestClient.getCorrelationRuleClasses();
+ }
+ };
+
+ public PolicyBeanPanel(final String id, final PolicySpec policy) {
+ super(id);
+
+ final List<FieldWrapper> items = new ArrayList<>();
+
+ for (Field field : policy.getClass().getDeclaredFields()) {
+ if (!"serialVersionUID".equals(field.getName())) {
+ FieldWrapper fieldWrapper = new FieldWrapper();
+ fieldWrapper.setName(field.getName());
+ fieldWrapper.setType(field.getType());
+
+ final SchemaList schemaList = field.getAnnotation(SchemaList.class);
+ fieldWrapper.setSchemaList(schemaList);
+
+ final ClassList classList = field.getAnnotation(ClassList.class);
+ fieldWrapper.setClassList(classList);
+
+ items.add(fieldWrapper);
+ }
+ }
+
+ final ListView<FieldWrapper> policies = new AltListView<FieldWrapper>("policies", items) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ protected void populateItem(final ListItem<FieldWrapper> item) {
+ final FieldWrapper field = item.getModelObject();
+
+ final PropertyDescriptor propDesc = BeanUtils.getPropertyDescriptor(policy.getClass(), field.getName());
+
+ item.add(new Label("label", new ResourceModel(field.getName())));
+
+ AbstractFieldPanel component;
+ try {
+ if (field.getClassList() != null) {
+ component = new AjaxDropDownChoicePanel("field", field.getName(), new PropertyModel(policy,
+ field.getName()));
+
+ final List<String> rules = correlationRules.getObject();
+
+ if (rules != null && !rules.isEmpty()) {
+ ((AjaxDropDownChoicePanel) component).setChoices(correlationRules.getObject());
+ }
+
+ item.add(component);
+
+ item.add(getActivationControl(
+ component,
+ propDesc.getReadMethod().invoke(policy, new Object[] {}) != null,
+ null,
+ null));
+
+ } else if (field.getType().isEnum()) {
+ component = new AjaxDropDownChoicePanel("field", field.getName(), new PropertyModel(policy,
+ field.getName()));
+
+ final Serializable[] values = (Serializable[]) field.getType().getEnumConstants();
+
+ if (values != null && values.length > 0) {
+ ((AjaxDropDownChoicePanel) component).setChoices(Arrays.asList(values));
+ }
+
+ item.add(component);
+
+ item.add(getActivationControl(
+ component,
+ (Enum<?>) propDesc.getReadMethod().invoke(policy, new Object[] {}) != null,
+ values[0],
+ values[0]));
+
+ } else if (ClassUtils.isAssignable(Boolean.class, field.getType())) {
+ item.add(new AjaxCheckBoxPanel("check", field.getName(),
+ new PropertyModel<Boolean>(policy, field.getName())));
+
+ item.add(new Label("field", new Model(null)));
+ } else if (Collection.class.isAssignableFrom(field.getType())) {
+ if (field.getSchemaList() != null) {
+ final List<String> values = new ArrayList<>();
+ if (field.getName().charAt(0) == 'r') {
+ values.addAll(roleSchemas.getObject());
+
+ if (field.getSchemaList().extended()) {
+ values.add("name");
+ }
+ } else {
+ values.addAll(userSchemas.getObject());
+
+ if (field.getSchemaList().extended()) {
+ values.add("key");
+ values.add("username");
+ }
+ }
+
+ component = new AjaxPalettePanel("field", new PropertyModel(policy, field.getName()),
+ new ListModel<>(values));
+ item.add(component);
+
+ Collection<?> collection = (Collection) propDesc.getReadMethod().invoke(policy);
+ item.add(getActivationControl(component,
+ !collection.isEmpty(), new ArrayList<String>(), new ArrayList<String>()));
+ } else {
+ final FieldPanel panel = new AjaxTextFieldPanel("panel", field.getName(),
+ new Model<String>(null));
+ panel.setRequired(true);
+
+ component = new MultiFieldPanel<String>("field",
+ new PropertyModel(policy, field.getName()), panel);
+
+ item.add(component);
+
+ final List<String> reinitializedValue = new ArrayList<String>();
+
+ reinitializedValue.add("");
+
+ item.add(getActivationControl(component,
+ !((Collection) propDesc.getReadMethod().invoke(policy, new Object[] {})).isEmpty(),
+ new ArrayList<String>(), (Serializable) reinitializedValue));
+ }
+ } else if (ClassUtils.isAssignable(Number.class, field.getType())) {
+ component = new SpinnerFieldPanel<Number>("field", field.getName(),
+ (Class<Number>) field.getType(), new PropertyModel<Number>(policy, field.getName()),
+ null, null);
+ item.add(component);
+
+ item.add(getActivationControl(component,
+ (Integer) propDesc.getReadMethod().invoke(policy, new Object[] {}) > 0, 0, 0));
+ } else if (field.getType().equals(String.class)) {
+ component = new AjaxTextFieldPanel("field", field.getName(),
+ new PropertyModel(policy, field.getName()));
+
+ item.add(component);
+
+ item.add(getActivationControl(component,
+ propDesc.getReadMethod().invoke(policy, new Object[] {}) != null, null, null));
+ } else {
+ item.add(new AjaxCheckBoxPanel("check", field.getName(), new Model()));
+ item.add(new Label("field", new Model(null)));
+ }
+ } catch (Exception e) {
+ LOG.error("Error retrieving policy fields", e);
+ }
+ }
+ };
+
+ add(policies);
+ }
+
+ private <T extends Serializable> AjaxCheckBoxPanel getActivationControl(final AbstractFieldPanel<T> panel,
+ final Boolean checked, final T defaultModelObject, final T reinitializedValue) {
+
+ final AjaxCheckBoxPanel check = new AjaxCheckBoxPanel("check", "check", new Model<Boolean>(checked));
+
+ panel.setEnabled(checked);
+
+ check.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ if (check.getModelObject()) {
+ panel.setEnabled(true);
+ panel.setModelObject(reinitializedValue);
+ } else {
+ panel.setModelObject(defaultModelObject);
+ panel.setEnabled(false);
+ }
+
+ target.add(panel);
+ }
+ });
+
+ return check;
+ }
+
+ private static class FieldWrapper implements Serializable {
+
+ private static final long serialVersionUID = -6770429509752964215L;
+
+ private Class<?> type;
+
+ private String name;
+
+ private transient SchemaList schemaList;
+
+ private transient ClassList classList;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public Class<?> getType() {
+ return type;
+ }
+
+ public void setType(final Class<?> type) {
+ this.type = type;
+ }
+
+ public SchemaList getSchemaList() {
+ return schemaList;
+ }
+
+ public void setSchemaList(final SchemaList schemaList) {
+ this.schemaList = schemaList;
+ }
+
+ public ClassList getClassList() {
+ return classList;
+ }
+
+ public void setClassList(ClassList classList) {
+ this.classList = classList;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/PropagationTasks.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/PropagationTasks.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/PropagationTasks.java
new file mode 100644
index 0000000..41fdb03
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/PropagationTasks.java
@@ -0,0 +1,264 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.PropagationTaskModalPage;
+import org.apache.syncope.client.console.pages.Tasks;
+import org.apache.syncope.client.console.pages.Tasks.TasksProvider;
+import org.apache.syncope.client.console.panels.AbstractSearchResultPanel.EventDataWrapper;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.PropagationTaskTO;
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+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.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.StringResourceModel;
+import org.apache.wicket.request.http.WebResponse;
+
+/**
+ * Tasks page.
+ */
+public class PropagationTasks extends AbstractTasks {
+
+ private static final long serialVersionUID = 4984337552918213290L;
+
+ private int paginatorRows;
+
+ private WebMarkupContainer container;
+
+ private boolean operationResult = false;
+
+ private ModalWindow window;
+
+ private AjaxDataTablePanel<AbstractTaskTO, String> table;
+
+ public PropagationTasks(final String id, final PageReference pageRef) {
+ super(id, pageRef);
+
+ container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+ add(container);
+
+ add(window = new ModalWindow("taskWin"));
+
+ paginatorRows = prefMan.getPaginatorRows(getWebRequest(), Constants.PREF_PROPAGATION_TASKS_PAGINATOR_ROWS);
+
+ table = Tasks.updateTaskTable(
+ getColumns(),
+ new TasksProvider<PropagationTaskTO>(restClient, paginatorRows, getId(), PropagationTaskTO.class),
+ container,
+ 0,
+ pageRef,
+ restClient);
+
+ window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ target.add(container);
+ if (operationResult) {
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(getPage().get(Constants.FEEDBACK));
+ operationResult = false;
+ }
+ }
+ });
+
+ window.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ window.setInitialHeight(WIN_HEIGHT);
+ window.setInitialWidth(WIN_WIDTH);
+ window.setCookieName(VIEW_TASK_WIN_COOKIE_NAME);
+
+ @SuppressWarnings("rawtypes")
+ Form paginatorForm = new Form("PaginatorForm");
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ final DropDownChoice rowsChooser = new DropDownChoice(
+ "rowsChooser", new PropertyModel(this, "paginatorRows"), prefMan.getPaginatorChoices());
+
+ rowsChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ prefMan.set(getWebRequest(), (WebResponse) getResponse(),
+ Constants.PREF_PROPAGATION_TASKS_PAGINATOR_ROWS, String.valueOf(paginatorRows));
+
+ table = Tasks.updateTaskTable(
+ getColumns(),
+ new TasksProvider<>(restClient, paginatorRows, getId(), PropagationTaskTO.class),
+ container,
+ table == null ? 0 : (int) table.getCurrentPage(),
+ pageRef,
+ restClient);
+
+ target.add(container);
+ }
+ });
+
+ paginatorForm.add(rowsChooser);
+ add(paginatorForm);
+ }
+
+ private List<IColumn<AbstractTaskTO, String>> getColumns() {
+ final List<IColumn<AbstractTaskTO, String>> columns = new ArrayList<>();
+
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("key", this, null), "key", "key"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("resource", this, null), "resource", "resource"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("accountId", this, null), "accountId", "accountId"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("propagationMode", this, null), "propagationMode", "propagationMode"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(new StringResourceModel(
+ "propagationOperation", this, null), "propagationOperation", "propagationOperation"));
+ columns.add(new DatePropertyColumn<AbstractTaskTO>(
+ new StringResourceModel("startDate", this, null), "startDate", "startDate"));
+ columns.add(new DatePropertyColumn<AbstractTaskTO>(
+ new StringResourceModel("endDate", this, null), "endDate", "endDate"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("latestExecStatus", this, null), "latestExecStatus", "latestExecStatus"));
+ columns.add(new ActionColumn<AbstractTaskTO, String>(new StringResourceModel("actions", this, null, "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public ActionLinksPanel getActions(final String componentId, final IModel<AbstractTaskTO> model) {
+
+ final AbstractTaskTO taskTO = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, pageRef);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new PropagationTaskModalPage(taskTO);
+ }
+ });
+
+ window.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.startExecution(taskTO.getKey(), false);
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ target.add(container);
+ }
+ }, ActionLink.ActionType.EXECUTE, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.delete(taskTO.getKey(), PropagationTaskTO.class);
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+ target.add(container);
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, TASKS);
+
+ return panel;
+ }
+
+ @Override
+ public Component getHeader(final String componentId) {
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(), pageRef);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (target != null) {
+ target.add(table);
+ }
+ }
+ }, ActionLink.ActionType.RELOAD, TASKS, "list");
+
+ return panel;
+ }
+ });
+
+ return columns;
+ }
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ if (event.getPayload() instanceof EventDataWrapper) {
+ ((EventDataWrapper) event.getPayload()).getTarget().add(container);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/PushTasksPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/PushTasksPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/PushTasksPanel.java
new file mode 100644
index 0000000..a93000d
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/PushTasksPanel.java
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.PushTaskModalPage;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.PushTaskTO;
+import org.apache.syncope.common.lib.to.SyncTaskTO;
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+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.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.StringResourceModel;
+
+public class PushTasksPanel extends AbstractProvisioningTasksPanel<PushTaskTO> {
+
+ private static final long serialVersionUID = -2492299671757861889L;
+
+ public PushTasksPanel(final String id, final PageReference pageRef) {
+ super(id, pageRef, PushTaskTO.class);
+ initTasksTable();
+ }
+
+ @Override
+ protected List<IColumn<AbstractTaskTO, String>> getColumns() {
+ final List<IColumn<AbstractTaskTO, String>> pushTasksColumns = new ArrayList<IColumn<AbstractTaskTO, String>>();
+
+ pushTasksColumns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("key", this, null), "key", "key"));
+ pushTasksColumns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("name", this, null), "name", "name"));
+ pushTasksColumns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("description", this, null), "description", "description"));
+ pushTasksColumns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("resourceName", this, null), "resource", "resource"));
+ pushTasksColumns.add(new DatePropertyColumn<AbstractTaskTO>(
+ new StringResourceModel("lastExec", this, null), "lastExec", "lastExec"));
+ pushTasksColumns.add(new DatePropertyColumn<AbstractTaskTO>(
+ new StringResourceModel("nextExec", this, null), "nextExec", "nextExec"));
+ pushTasksColumns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("latestExecStatus", this, null), "latestExecStatus", "latestExecStatus"));
+
+ pushTasksColumns.add(
+ new ActionColumn<AbstractTaskTO, String>(new StringResourceModel("actions", this, null, "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public ActionLinksPanel getActions(final String componentId, final IModel<AbstractTaskTO> model) {
+
+ final PushTaskTO taskTO = (PushTaskTO) model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, pageRef);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new PushTaskModalPage(window, taskTO, pageRef);
+ }
+ });
+
+ window.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.startExecution(taskTO.getKey(), false);
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+
+ target.add(container);
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ }
+ }, ActionLink.ActionType.EXECUTE, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.startExecution(taskTO.getKey(), true);
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+
+ target.add(container);
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ }
+ }, ActionLink.ActionType.DRYRUN, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.delete(taskTO.getKey(), SyncTaskTO.class);
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+ target.add(container);
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, TASKS);
+
+ return panel;
+ }
+
+ @Override
+ public Component getHeader(final String componentId) {
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(), pageRef);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (target != null) {
+ target.add(table);
+ }
+ }
+ }, ActionLink.ActionType.RELOAD, TASKS, "list");
+
+ return panel;
+ }
+ });
+
+ return pushTasksColumns;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
new file mode 100644
index 0000000..b3e63c5
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.syncope.client.console.pages.BaseModalPage;
+import org.apache.syncope.client.console.pages.ResourceModalPage.ResourceEvent;
+import org.apache.syncope.client.console.panels.ResourceDetailsPanel.DetailsModEvent;
+import org.apache.syncope.client.console.rest.ConnectorRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel.MultiValueSelectorEvent;
+import org.apache.syncope.client.console.wicket.markup.html.list.ConnConfPropertyListView;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class ResourceConnConfPanel extends Panel {
+
+ private static final long serialVersionUID = -7982691107029848579L;
+
+ @SpringBean
+ private ConnectorRestClient restClient;
+
+ private final ResourceTO resourceTO;
+
+ private final boolean createFlag;
+
+ private List<ConnConfProperty> connConfProperties;
+
+ private WebMarkupContainer connConfPropContainer;
+
+ private AjaxButton check;
+
+ public ResourceConnConfPanel(final String id, final ResourceTO resourceTO, final boolean createFlag) {
+ super(id);
+ setOutputMarkupId(true);
+
+ this.createFlag = createFlag;
+ this.resourceTO = resourceTO;
+
+ connConfProperties = getConnConfProperties();
+
+ connConfPropContainer = new WebMarkupContainer("connectorPropertiesContainer");
+ connConfPropContainer.setOutputMarkupId(true);
+ add(connConfPropContainer);
+
+ /*
+ * the list of overridable connector properties
+ */
+ final ListView<ConnConfProperty> connPropView = new ConnConfPropertyListView("connectorProperties",
+ new PropertyModel<List<ConnConfProperty>>(this, "connConfProperties"),
+ false, resourceTO.getConnConfProperties());
+ connPropView.setOutputMarkupId(true);
+ connConfPropContainer.add(connPropView);
+
+ check = new IndicatingAjaxButton("check", new ResourceModel("check")) {
+
+ private static final long serialVersionUID = -4199438518229098169L;
+
+ @Override
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ final ResourceTO resourceTO = (ResourceTO) form.getModelObject();
+
+ if (restClient.check(resourceTO)) {
+ info(getString("success_connection"));
+ } else {
+ error(getString("error_connection"));
+ }
+
+ ((BaseModalPage) getPage()).getFeedbackPanel().refresh(target);
+ }
+ };
+
+ check.setEnabled(!connConfProperties.isEmpty());
+ connConfPropContainer.add(check);
+ }
+
+ /**
+ * Get overridable properties.
+ *
+ * @return overridable properties.
+ */
+ private List<ConnConfProperty> getConnConfProperties() {
+ final List<ConnConfProperty> props = new ArrayList<ConnConfProperty>();
+ final Long connectorId = resourceTO.getConnectorId();
+ if (connectorId != null && connectorId > 0) {
+ for (ConnConfProperty property : restClient.getConnectorProperties(connectorId)) {
+ if (property.isOverridable()) {
+ props.add(property);
+ }
+ }
+ }
+ if (createFlag || resourceTO.getConnConfProperties().isEmpty()) {
+ resourceTO.getConnConfProperties().clear();
+ } else {
+ Map<String, ConnConfProperty> valuedProps = new HashMap<String, ConnConfProperty>();
+ for (ConnConfProperty prop : resourceTO.getConnConfProperties()) {
+ valuedProps.put(prop.getSchema().getName(), prop);
+ }
+
+ for (int i = 0; i < props.size(); i++) {
+ if (valuedProps.containsKey(props.get(i).getSchema().getName())) {
+ props.set(i, valuedProps.get(props.get(i).getSchema().getName()));
+ }
+ }
+ }
+
+ // re-order properties
+ Collections.sort(props);
+
+ return props;
+ }
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ AjaxRequestTarget target = null;
+ if (event.getPayload() instanceof DetailsModEvent) {
+ // connector change: update properties and forward event
+ target = ((ResourceEvent) event.getPayload()).getTarget();
+
+ connConfProperties = getConnConfProperties();
+ check.setEnabled(!connConfProperties.isEmpty());
+
+ target.add(connConfPropContainer);
+ } else if (event.getPayload() instanceof MultiValueSelectorEvent) {
+ // multi value connector property change: forward event
+ target = ((MultiValueSelectorEvent) event.getPayload()).getTarget();
+ }
+
+ if (target != null) {
+ send(getPage(), Broadcast.BREADTH, new ConnConfModEvent(target, connConfProperties));
+ }
+ }
+
+ /**
+ * Connector configuration properties modification event.
+ */
+ public static class ConnConfModEvent extends ResourceEvent {
+
+ private List<ConnConfProperty> configuration;
+
+ /**
+ * Constructor.
+ *
+ * @param target request target.
+ * @param configuration connector configuration properties.
+ */
+ public ConnConfModEvent(final AjaxRequestTarget target, final List<ConnConfProperty> configuration) {
+ super(target);
+ this.configuration = configuration;
+ }
+
+ public List<ConnConfProperty> getConfiguration() {
+ return configuration;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
new file mode 100644
index 0000000..3bff23f
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
@@ -0,0 +1,306 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.Arrays;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.ResourceModalPage.ResourceEvent;
+import org.apache.syncope.client.console.rest.ConnectorRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
+import org.apache.syncope.common.lib.to.ConnInstanceTO;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.types.PropagationMode;
+import org.apache.syncope.common.lib.types.TraceLevel;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.ChoiceRenderer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ResourceDetailsPanel extends Panel {
+
+ private static final long serialVersionUID = -7982691107029848579L;
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(ResourceDetailsPanel.class);
+
+ @SpringBean
+ private ConnectorRestClient connRestClient;
+
+ private ConnInstanceTO connInstanceTO;
+
+ public ResourceDetailsPanel(final String id, final ResourceTO resourceTO, final List<String> actionClassNames,
+ final boolean createFlag) {
+
+ super(id);
+ setOutputMarkupId(true);
+
+ final AjaxTextFieldPanel resourceName = new AjaxTextFieldPanel("name", new ResourceModel("name", "name").
+ getObject(), new PropertyModel<String>(resourceTO, "key"));
+
+ resourceName.setEnabled(createFlag);
+ resourceName.addRequiredLabel();
+ add(resourceName);
+
+ final AjaxCheckBoxPanel enforceMandatoryCondition = new AjaxCheckBoxPanel("enforceMandatoryCondition",
+ new ResourceModel("enforceMandatoryCondition", "enforceMandatoryCondition").getObject(),
+ new PropertyModel<Boolean>(resourceTO, "enforceMandatoryCondition"));
+ add(enforceMandatoryCondition);
+
+ final AjaxCheckBoxPanel propagationPrimary = new AjaxCheckBoxPanel("propagationPrimary", new ResourceModel(
+ "propagationPrimary", "propagationPrimary").getObject(), new PropertyModel<Boolean>(resourceTO,
+ "propagationPrimary"));
+ add(propagationPrimary);
+
+ final SpinnerFieldPanel<Integer> propagationPriority =
+ new SpinnerFieldPanel<>("propagationPriority", "propagationPriority", Integer.class,
+ new PropertyModel<Integer>(resourceTO, "propagationPriority"), null, null);
+ add(propagationPriority);
+
+ final AjaxDropDownChoicePanel<PropagationMode> propagationMode = new AjaxDropDownChoicePanel<>(
+ "propagationMode", new ResourceModel("propagationMode", "propagationMode").getObject(),
+ new PropertyModel<PropagationMode>(resourceTO, "propagationMode"));
+ propagationMode.setChoices(Arrays.asList(PropagationMode.values()));
+ add(propagationMode);
+
+ final AjaxCheckBoxPanel randomPwdIfNotProvided = new AjaxCheckBoxPanel("randomPwdIfNotProvided",
+ new ResourceModel("randomPwdIfNotProvided", "randomPwdIfNotProvided").getObject(),
+ new PropertyModel<Boolean>(resourceTO, "randomPwdIfNotProvided"));
+ add(randomPwdIfNotProvided);
+
+ final WebMarkupContainer propagationActionsClassNames = new WebMarkupContainer("propagationActionsClassNames");
+ propagationActionsClassNames.setOutputMarkupId(true);
+ add(propagationActionsClassNames);
+
+ final AjaxLink<Void> first = new IndicatingAjaxLink<Void>("first") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ resourceTO.getPropagationActionsClassNames().add(StringUtils.EMPTY);
+ setVisible(false);
+ target.add(propagationActionsClassNames);
+ }
+ };
+ first.setOutputMarkupPlaceholderTag(true);
+ first.setVisible(resourceTO.getPropagationActionsClassNames().isEmpty());
+ propagationActionsClassNames.add(first);
+
+ final ListView<String> actionsClasses = new ListView<String>("actionsClasses",
+ new PropertyModel<List<String>>(resourceTO, "propagationActionsClassNames")) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ protected void populateItem(final ListItem<String> item) {
+ final String className = item.getModelObject();
+
+ final DropDownChoice<String> actionsClass = new DropDownChoice<>(
+ "actionsClass", new Model<>(className), actionClassNames);
+ actionsClass.setNullValid(true);
+ actionsClass.setRequired(true);
+ actionsClass.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_BLUR) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ resourceTO.getPropagationActionsClassNames().
+ set(item.getIndex(), actionsClass.getModelObject());
+ }
+ });
+ actionsClass.setRequired(true);
+ actionsClass.setOutputMarkupId(true);
+ actionsClass.setRequired(true);
+ item.add(actionsClass);
+
+ AjaxLink<Void> minus = new IndicatingAjaxLink<Void>("drop") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ resourceTO.getPropagationActionsClassNames().remove(className);
+ first.setVisible(resourceTO.getPropagationActionsClassNames().isEmpty());
+ target.add(propagationActionsClassNames);
+ }
+ };
+ item.add(minus);
+
+ final AjaxLink<Void> plus = new IndicatingAjaxLink<Void>("add") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ resourceTO.getPropagationActionsClassNames().add(StringUtils.EMPTY);
+ target.add(propagationActionsClassNames);
+ }
+ };
+ plus.setOutputMarkupPlaceholderTag(true);
+ plus.setVisible(item.getIndex() == resourceTO.getPropagationActionsClassNames().size() - 1);
+ item.add(plus);
+ }
+ };
+ propagationActionsClassNames.add(actionsClasses);
+
+ final AjaxDropDownChoicePanel<TraceLevel> createTraceLevel = new AjaxDropDownChoicePanel<>(
+ "createTraceLevel", new ResourceModel("createTraceLevel", "createTraceLevel").getObject(),
+ new PropertyModel<TraceLevel>(resourceTO, "createTraceLevel"));
+ createTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
+ add(createTraceLevel);
+
+ final AjaxDropDownChoicePanel<TraceLevel> updateTraceLevel = new AjaxDropDownChoicePanel<>(
+ "updateTraceLevel", new ResourceModel("updateTraceLevel", "updateTraceLevel").getObject(),
+ new PropertyModel<TraceLevel>(resourceTO, "updateTraceLevel"));
+ updateTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
+ add(updateTraceLevel);
+
+ final AjaxDropDownChoicePanel<TraceLevel> deleteTraceLevel = new AjaxDropDownChoicePanel<>(
+ "deleteTraceLevel", new ResourceModel("deleteTraceLevel", "deleteTraceLevel").getObject(),
+ new PropertyModel<TraceLevel>(resourceTO, "deleteTraceLevel"));
+ deleteTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
+ add(deleteTraceLevel);
+
+ final AjaxDropDownChoicePanel<TraceLevel> syncTraceLevel = new AjaxDropDownChoicePanel<>(
+ "syncTraceLevel", new ResourceModel("syncTraceLevel", "syncTraceLevel").getObject(),
+ new PropertyModel<TraceLevel>(resourceTO, "syncTraceLevel"));
+ syncTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
+ add(syncTraceLevel);
+
+ final IModel<List<ConnInstanceTO>> connectors = new LoadableDetachableModel<List<ConnInstanceTO>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<ConnInstanceTO> load() {
+ return connRestClient.getAllConnectors();
+ }
+ };
+
+ connInstanceTO = getConectorInstanceTO(connectors.getObject(), resourceTO);
+
+ final AjaxDropDownChoicePanel<ConnInstanceTO> conn = new AjaxDropDownChoicePanel<>("connector",
+ new ResourceModel("connector", "connector").getObject(),
+ new PropertyModel<ConnInstanceTO>(this, "connInstanceTO"));
+ conn.setChoices(connectors.getObject());
+ conn.setChoiceRenderer(new ChoiceRenderer("displayName", "key"));
+
+ conn.getField().setModel(new IModel<ConnInstanceTO>() {
+
+ private static final long serialVersionUID = -4202872830392400310L;
+
+ @Override
+ public ConnInstanceTO getObject() {
+ return connInstanceTO;
+ }
+
+ @Override
+ public void setObject(final ConnInstanceTO connector) {
+ resourceTO.setConnectorId(connector.getKey());
+ connInstanceTO = connector;
+ }
+
+ @Override
+ public void detach() {
+ }
+ });
+
+ conn.addRequiredLabel();
+ conn.setEnabled(createFlag);
+
+ conn.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ send(getPage(), Broadcast.BREADTH, new DetailsModEvent(target));
+ }
+ });
+
+ add(conn);
+ }
+
+ /**
+ * Get the connetorTO linked to the resource.
+ *
+ * @param connectorTOs list of all connectors.
+ * @param resourceTO resource.
+ * @return selected connector instance: in case of no connectors available, null; in case of new resource
+ * specification, the first on connector available
+ */
+ private ConnInstanceTO getConectorInstanceTO(final List<ConnInstanceTO> connectorTOs, final ResourceTO resourceTO) {
+ if (connectorTOs.isEmpty()) {
+ resourceTO.setConnectorId(null);
+ return null;
+ } else {
+ // use the first element as default
+ ConnInstanceTO res = connectorTOs.get(0);
+
+ for (ConnInstanceTO to : connectorTOs) {
+ if (Long.valueOf(to.getKey()).equals(resourceTO.getConnectorId())) {
+ res = to;
+ }
+ }
+
+ // in case of no match
+ resourceTO.setConnectorId(res.getKey());
+
+ return res;
+ }
+ }
+
+ /**
+ * Connector instance modification event.
+ */
+ public static class DetailsModEvent extends ResourceEvent {
+
+ /**
+ * Constructor.
+ *
+ * @param target request target.
+ */
+ public DetailsModEvent(final AjaxRequestTarget target) {
+ super(target);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
new file mode 100644
index 0000000..ecd7e0c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
@@ -0,0 +1,644 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.JexlHelpUtil;
+import org.apache.syncope.client.console.panels.ResourceConnConfPanel.ConnConfModEvent;
+import org.apache.syncope.client.console.rest.ConnectorRestClient;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDecoratedCheckbox;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MappingPurposePanel;
+import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
+import org.apache.syncope.common.lib.to.ConnInstanceTO;
+import org.apache.syncope.common.lib.to.MappingItemTO;
+import org.apache.syncope.common.lib.to.MappingTO;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.syncope.common.lib.types.IntMappingType;
+import org.apache.syncope.common.lib.types.MappingPurpose;
+import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.attributes.AjaxCallListener;
+import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+/**
+ * Resource mapping panel.
+ */
+public class ResourceMappingPanel extends Panel {
+
+ private static final long serialVersionUID = -7982691107029848579L;
+
+ /**
+ * Mapping field style sheet.
+ */
+ private static final String FIELD_STYLE = "ui-widget-content ui-corner-all short_fixedsize";
+
+ /**
+ * Mapping field style sheet.
+ */
+ private static final String DEF_FIELD_STYLE = "ui-widget-content ui-corner-all";
+
+ /**
+ * Mapping field style sheet.
+ */
+ private static final String SHORT_FIELD_STYLE = "ui-widget-content ui-corner-all veryshort_fixedsize";
+
+ /**
+ * Schema rest client.
+ */
+ @SpringBean
+ private SchemaRestClient schemaRestClient;
+
+ /**
+ * ConnInstance rest client.
+ */
+ @SpringBean
+ private ConnectorRestClient connRestClient;
+
+ /**
+ * Resource schema name.
+ */
+ private final List<String> schemaNames;
+
+ /**
+ * Add mapping button.
+ */
+ private final AjaxButton addMappingBtn;
+
+ /**
+ * All mappings.
+ */
+ private final ListView<MappingItemTO> mappings;
+
+ /**
+ * External resource to be updated.
+ */
+ private final ResourceTO resourceTO;
+
+ /**
+ * User / role.
+ */
+ private final AttributableType attrType;
+
+ /**
+ * Mapping container.
+ */
+ private final WebMarkupContainer mappingContainer;
+
+ /**
+ * AccountLink container.
+ */
+ private final WebMarkupContainer accountLinkContainer;
+
+ private final AjaxCheckBoxPanel accountLinkCheckbox;
+
+ private MappingTO getMapping() {
+ MappingTO result = null;
+
+ if (AttributableType.USER == this.attrType) {
+ if (this.resourceTO.getUmapping() == null) {
+ this.resourceTO.setUmapping(new MappingTO());
+ }
+ result = this.resourceTO.getUmapping();
+ }
+ if (AttributableType.ROLE == this.attrType) {
+ if (this.resourceTO.getRmapping() == null) {
+ this.resourceTO.setRmapping(new MappingTO());
+ }
+ result = this.resourceTO.getRmapping();
+ }
+
+ return result;
+ }
+
+ /**
+ * Attribute Mapping Panel.
+ *
+ * @param id panel id
+ * @param resourceTO external resource
+ * @param attrType USER / ROLE
+ */
+ public ResourceMappingPanel(final String id, final ResourceTO resourceTO, final AttributableType attrType) {
+ super(id);
+ setOutputMarkupId(true);
+
+ this.resourceTO = resourceTO;
+ this.attrType = attrType;
+
+ this.mappingContainer = new WebMarkupContainer("mappingContainer");
+ this.mappingContainer.setOutputMarkupId(true);
+ add(this.mappingContainer);
+
+ this.accountLinkContainer = new WebMarkupContainer("accountLinkContainer");
+ this.accountLinkContainer.setOutputMarkupId(true);
+ add(this.accountLinkContainer);
+
+ if (this.resourceTO.getConnectorId() != null && this.resourceTO.getConnectorId() > 0) {
+ schemaNames = getSchemaNames(this.resourceTO.getConnectorId(), this.resourceTO.getConnConfProperties());
+
+ setEnabled();
+ } else {
+ schemaNames = Collections.<String>emptyList();
+ }
+
+ final WebMarkupContainer jexlHelp = JexlHelpUtil.getJexlHelpWebContainer("jexlHelp");
+
+ AjaxLink<Void> questionMarkJexlHelp = JexlHelpUtil.getAjaxLink(jexlHelp, "questionMarkJexlHelp");
+ mappingContainer.add(questionMarkJexlHelp);
+ questionMarkJexlHelp.add(jexlHelp);
+
+ final Label passwordLabel = new Label("passwordLabel", new ResourceModel("password"));
+ mappingContainer.add(passwordLabel);
+ if (AttributableType.USER != ResourceMappingPanel.this.attrType) {
+ passwordLabel.setVisible(false);
+ }
+
+ Collections.sort(getMapping().getItems(), new Comparator<MappingItemTO>() {
+
+ @Override
+ public int compare(final MappingItemTO left, final MappingItemTO right) {
+ int compared;
+ if (left == null && right == null) {
+ compared = 0;
+ } else if (left == null) {
+ compared = 1;
+ } else if (right == null) {
+ compared = -1;
+ } else if (left.getPurpose() == MappingPurpose.BOTH && right.getPurpose() != MappingPurpose.BOTH) {
+ compared = -1;
+ } else if (left.getPurpose() != MappingPurpose.BOTH && right.getPurpose() == MappingPurpose.BOTH) {
+ compared = 1;
+ } else if (left.getPurpose() == MappingPurpose.PROPAGATION
+ && (right.getPurpose() == MappingPurpose.SYNCHRONIZATION || right.getPurpose()
+ == MappingPurpose.NONE)) {
+ compared = -1;
+ } else if (left.getPurpose() == MappingPurpose.SYNCHRONIZATION
+ && right.getPurpose() == MappingPurpose.PROPAGATION) {
+ compared = 1;
+ } else if (left.getPurpose() == MappingPurpose.SYNCHRONIZATION
+ && right.getPurpose() == MappingPurpose.NONE) {
+ compared = -1;
+ } else if (left.getPurpose() == MappingPurpose.NONE
+ && right.getPurpose() != MappingPurpose.NONE) {
+ compared = 1;
+ } else if (left.isAccountid()) {
+ compared = -1;
+ } else if (right.isAccountid()) {
+ compared = 1;
+ } else if (left.isPassword()) {
+ compared = -1;
+ } else if (right.isPassword()) {
+ compared = 1;
+ } else {
+ compared = left.getIntAttrName().compareTo(right.getIntAttrName());
+ }
+ return compared;
+ }
+ });
+
+ mappings = new ListView<MappingItemTO>("mappings", getMapping().getItems()) {
+
+ private static final long serialVersionUID = 4949588177564901031L;
+
+ @Override
+ protected void populateItem(final ListItem<MappingItemTO> item) {
+ final MappingItemTO mapItem = item.getModelObject();
+ if (mapItem.getPurpose() == null) {
+ mapItem.setPurpose(MappingPurpose.BOTH);
+ }
+
+ AttributableType entity = null;
+ if (mapItem.getIntMappingType() != null) {
+ entity = mapItem.getIntMappingType().getAttributableType();
+ }
+
+ final List<IntMappingType> attrTypes = new ArrayList<IntMappingType>(getAttributeTypes(entity));
+
+ item.add(new AjaxDecoratedCheckbox("toRemove", new Model<Boolean>(Boolean.FALSE)) {
+
+ private static final long serialVersionUID = 7170946748485726506L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ int index = -1;
+ for (int i = 0; i < getMapping().getItems().size() && index == -1; i++) {
+ if (mapItem.equals(getMapping().getItems().get(i))) {
+ index = i;
+ }
+ }
+
+ if (index != -1) {
+ getMapping().getItems().remove(index);
+ item.getParent().removeAll();
+ target.add(ResourceMappingPanel.this);
+ }
+ }
+
+ @Override
+ protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
+ super.updateAjaxAttributes(attributes);
+
+ final AjaxCallListener ajaxCallListener = new AjaxCallListener() {
+
+ private static final long serialVersionUID = 7160235486520935153L;
+
+ @Override
+ public CharSequence getPrecondition(final Component component) {
+ return "if (!confirm('" + getString("confirmDelete") + "')) return false;";
+ }
+ };
+ attributes.getAjaxCallListeners().add(ajaxCallListener);
+ }
+ });
+
+ final AjaxDropDownChoicePanel<String> intAttrNames =
+ new AjaxDropDownChoicePanel<String>("intAttrNames", getString("intAttrNames"),
+ new PropertyModel<String>(mapItem, "intAttrName"), false);
+ intAttrNames.setChoices(schemaNames);
+ intAttrNames.setRequired(true);
+ intAttrNames.setStyleSheet(FIELD_STYLE);
+ intAttrNames.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ }
+ });
+ item.add(intAttrNames);
+
+ final AjaxDropDownChoicePanel<IntMappingType> intMappingTypes =
+ new AjaxDropDownChoicePanel<IntMappingType>("intMappingTypes",
+ new ResourceModel("intMappingTypes", "intMappingTypes").getObject(),
+ new PropertyModel<IntMappingType>(mapItem, "intMappingType"));
+ intMappingTypes.setRequired(true);
+ intMappingTypes.setChoices(attrTypes);
+ intMappingTypes.setStyleSheet(FIELD_STYLE);
+ item.add(intMappingTypes);
+
+ final AjaxDropDownChoicePanel<AttributableType> entitiesPanel =
+ new AjaxDropDownChoicePanel<AttributableType>("entities",
+ new ResourceModel("entities", "entities").getObject(), new Model<AttributableType>(
+ entity));
+ entitiesPanel.setChoices(attrType == AttributableType.ROLE
+ ? Collections.<AttributableType>singletonList(AttributableType.ROLE)
+ : Arrays.asList(AttributableType.values()));
+ entitiesPanel.setStyleSheet(DEF_FIELD_STYLE);
+ entitiesPanel.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ attrTypes.clear();
+ attrTypes.addAll(getAttributeTypes(entitiesPanel.getModelObject()));
+ intMappingTypes.setChoices(attrTypes);
+
+ intAttrNames.setChoices(Collections.<String>emptyList());
+
+ target.add(intMappingTypes.getField());
+ target.add(intAttrNames.getField());
+ }
+ });
+ item.add(entitiesPanel);
+
+ final FieldPanel<String> extAttrNames = new AjaxTextFieldPanel("extAttrName",
+ new ResourceModel("extAttrNames", "extAttrNames").getObject(),
+ new PropertyModel<String>(mapItem, "extAttrName"));
+ ((AjaxTextFieldPanel) extAttrNames).setChoices(schemaNames);
+
+ boolean required = false;
+ if (mapItem.isPassword()) {
+ ((AjaxTextFieldPanel) extAttrNames).setModelObject(null);
+ } else {
+ required = true;
+ }
+ extAttrNames.setRequired(required);
+ extAttrNames.setEnabled(required);
+ extAttrNames.setStyleSheet(FIELD_STYLE);
+ item.add(extAttrNames);
+
+ final AjaxTextFieldPanel mandatory = new AjaxTextFieldPanel("mandatoryCondition",
+ new ResourceModel("mandatoryCondition", "mandatoryCondition").getObject(),
+ new PropertyModel<String>(mapItem, "mandatoryCondition"));
+ mandatory.setChoices(Arrays.asList(new String[] { "true", "false" }));
+ mandatory.setStyleSheet(SHORT_FIELD_STYLE);
+ item.add(mandatory);
+
+ final AjaxCheckBoxPanel accountId = new AjaxCheckBoxPanel("accountId",
+ new ResourceModel("accountId", "accountId").getObject(),
+ new PropertyModel<Boolean>(mapItem, "accountid"));
+ accountId.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ if (accountId.getModelObject()) {
+ mapItem.setMandatoryCondition("true");
+ mandatory.setEnabled(false);
+ } else {
+ mapItem.setMandatoryCondition("false");
+ mandatory.setEnabled(true);
+ }
+ target.add(mandatory);
+ }
+ });
+ item.add(accountId);
+
+ final AjaxCheckBoxPanel password = new AjaxCheckBoxPanel("password",
+ new ResourceModel("password", "password").getObject(),
+ new PropertyModel<Boolean>(mapItem, "password"));
+ password.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ extAttrNames.setEnabled(!mapItem.isAccountid() && !password.getModelObject());
+ extAttrNames.setModelObject(null);
+ extAttrNames.setRequired(!password.getModelObject());
+ target.add(extAttrNames);
+
+ setAccountId(intMappingTypes.getModelObject(), accountId, password);
+ target.add(accountId);
+ }
+ });
+ item.add(password);
+ if (AttributableType.USER != ResourceMappingPanel.this.attrType) {
+ password.setVisible(false);
+ }
+
+ final WebMarkupContainer purpose = new WebMarkupContainer("purpose");
+ purpose.setOutputMarkupId(Boolean.TRUE);
+
+ final MappingPurposePanel panel = new MappingPurposePanel("purposeActions",
+ new PropertyModel<MappingPurpose>(mapItem, "purpose"), purpose);
+
+ purpose.add(panel);
+
+ item.add(purpose);
+
+ intMappingTypes.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ setAttrNames(intMappingTypes.getModelObject(), intAttrNames);
+ target.add(intAttrNames);
+
+ setAccountId(intMappingTypes.getModelObject(), accountId, password);
+ target.add(accountId);
+ }
+ });
+
+ setAttrNames(mapItem.getIntMappingType(), intAttrNames);
+ setAccountId(mapItem.getIntMappingType(), accountId, password);
+ }
+ };
+
+ mappings.setReuseItems(true);
+ mappingContainer.add(mappings);
+
+ addMappingBtn = new IndicatingAjaxButton("addMappingBtn", new ResourceModel("add")) {
+
+ private static final long serialVersionUID = -4804368561204623354L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ getMapping().getItems().add(new MappingItemTO());
+ target.add(ResourceMappingPanel.this);
+ }
+ };
+ addMappingBtn.setDefaultFormProcessing(false);
+ addMappingBtn.setEnabled(this.resourceTO.getConnectorId() != null && this.resourceTO.getConnectorId() > 0);
+ mappingContainer.add(addMappingBtn);
+
+ boolean accountLinkEnabled = false;
+ if (getMapping().getAccountLink() != null) {
+ accountLinkEnabled = true;
+ }
+ accountLinkCheckbox = new AjaxCheckBoxPanel("accountLinkCheckbox",
+ new ResourceModel("accountLinkCheckbox", "accountLinkCheckbox").getObject(),
+ new Model<Boolean>(Boolean.valueOf(accountLinkEnabled)));
+ accountLinkCheckbox.setEnabled(true);
+
+ accountLinkContainer.add(accountLinkCheckbox);
+
+ final AjaxTextFieldPanel accountLink = new AjaxTextFieldPanel("accountLink",
+ new ResourceModel("accountLink", "accountLink").getObject(),
+ new PropertyModel<String>(getMapping(), "accountLink"));
+ accountLink.setEnabled(accountLinkEnabled);
+ accountLinkContainer.add(accountLink);
+
+ accountLinkCheckbox.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ if (accountLinkCheckbox.getModelObject()) {
+ accountLink.setEnabled(Boolean.TRUE);
+ accountLink.setModelObject("");
+ } else {
+ accountLink.setEnabled(Boolean.FALSE);
+ accountLink.setModelObject("");
+ }
+
+ target.add(accountLink);
+ }
+ });
+ }
+
+ private List<String> getSchemaNames(final Long connectorId, final Set<ConnConfProperty> conf) {
+ final ConnInstanceTO connInstanceTO = new ConnInstanceTO();
+ connInstanceTO.setKey(connectorId);
+ connInstanceTO.getConfiguration().addAll(conf);
+
+ return connRestClient.getSchemaNames(connInstanceTO);
+ }
+
+ private void setEnabled() {
+ final ConnInstanceTO connInstanceTO = new ConnInstanceTO();
+ connInstanceTO.setKey(this.resourceTO.getConnectorId());
+ connInstanceTO.getConfiguration().addAll(this.resourceTO.getConnConfProperties());
+
+ List<ConnIdObjectClassTO> objectClasses = connRestClient.getSupportedObjectClasses(connInstanceTO);
+
+ boolean enabled = objectClasses.isEmpty()
+ || (AttributableType.USER == attrType && objectClasses.contains(ConnIdObjectClassTO.ACCOUNT))
+ || (AttributableType.ROLE == attrType && objectClasses.contains(ConnIdObjectClassTO.GROUP));
+ this.mappingContainer.setEnabled(enabled);
+ this.mappingContainer.setVisible(enabled);
+ this.accountLinkContainer.setEnabled(enabled);
+ this.accountLinkContainer.setVisible(enabled);
+
+ if (!enabled) {
+ getMapping().getItems().clear();
+ getMapping().setAccountLink(null);
+ if (this.accountLinkCheckbox != null) {
+ this.accountLinkCheckbox.setModelObject(null);
+ }
+ }
+ }
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ if (event.getPayload() instanceof ConnConfModEvent) {
+ final AjaxRequestTarget target = ((ConnConfModEvent) event.getPayload()).getTarget();
+
+ final List<ConnConfProperty> conf = ((ConnConfModEvent) event.getPayload()).getConfiguration();
+
+ mappings.removeAll();
+
+ addMappingBtn.setEnabled(resourceTO.getConnectorId() != null && resourceTO.getConnectorId() > 0);
+
+ schemaNames.clear();
+ schemaNames.addAll(getSchemaNames(resourceTO.getConnectorId(), new HashSet<ConnConfProperty>(conf)));
+
+ setEnabled();
+
+ target.add(this);
+ }
+ }
+
+ /**
+ * Set attribute names for a drop down choice list.
+ *
+ * @param type attribute type.
+ * @param toBeUpdated drop down choice to be updated.
+ */
+ private void setAttrNames(final IntMappingType type, final AjaxDropDownChoicePanel<String> toBeUpdated) {
+ toBeUpdated.setRequired(true);
+ toBeUpdated.setEnabled(true);
+
+ if (type == null || type.getAttributableType() == null) {
+ toBeUpdated.setChoices(Collections.<String>emptyList());
+ } else {
+ switch (type) {
+ // user attribute names
+ case UserPlainSchema:
+ case RolePlainSchema:
+ case MembershipPlainSchema:
+ toBeUpdated.setChoices(schemaRestClient.getPlainSchemaNames(type.getAttributableType()));
+ break;
+
+ case UserDerivedSchema:
+ case RoleDerivedSchema:
+ case MembershipDerivedSchema:
+ toBeUpdated.setChoices(schemaRestClient.getDerSchemaNames(type.getAttributableType()));
+ break;
+
+ case UserVirtualSchema:
+ case RoleVirtualSchema:
+ case MembershipVirtualSchema:
+ toBeUpdated.setChoices(schemaRestClient.getVirSchemaNames(type.getAttributableType()));
+ break;
+
+ case UserId:
+ case Password:
+ case Username:
+ case RoleId:
+ case RoleName:
+ default:
+ toBeUpdated.setRequired(false);
+ toBeUpdated.setEnabled(false);
+ toBeUpdated.setChoices(Collections.<String>emptyList());
+ }
+ }
+ }
+
+ /**
+ * Enable/Disable accountId checkbox.
+ *
+ * @param type attribute type.
+ * @param accountId accountId checkbox.
+ * @param password password checkbox.
+ */
+ private void setAccountId(final IntMappingType type, final AjaxCheckBoxPanel accountId,
+ final AjaxCheckBoxPanel password) {
+
+ if (type != null && type.getAttributableType() != null) {
+ switch (type) {
+ case UserVirtualSchema:
+ case RoleVirtualSchema:
+ case MembershipVirtualSchema:
+ // Virtual accountId is not permitted
+ case Password:
+ // AccountId cannot be derived from password.
+ accountId.setReadOnly(true);
+ accountId.setModelObject(false);
+ break;
+
+ default:
+ if (password.getModelObject()) {
+ accountId.setReadOnly(true);
+ accountId.setModelObject(false);
+ } else {
+ accountId.setReadOnly(false);
+ }
+ }
+ }
+ }
+
+ /**
+ * Get all attribute types from a selected attribute type.
+ *
+ * @param entity entity.
+ * @return all attribute types.
+ */
+ private List<IntMappingType> getAttributeTypes(final AttributableType entity) {
+ final List<IntMappingType> res = new ArrayList<IntMappingType>();
+
+ if (entity != null) {
+ res.addAll(IntMappingType.getAttributeTypes(AttributableType.valueOf(entity.name())));
+ }
+
+ return res;
+ }
+}
[31/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/RoleRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/RoleRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/RoleRestClient.java
new file mode 100644
index 0000000..5cffe09
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/RoleRestClient.java
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.List;
+
+import javax.ws.rs.core.Response;
+import org.apache.syncope.client.console.commons.status.StatusBean;
+import org.apache.syncope.client.console.commons.status.StatusUtils;
+import org.apache.syncope.common.lib.mod.RoleMod;
+import org.apache.syncope.common.lib.to.BulkAction;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.ConnObjectTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
+import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
+import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.lib.wrap.ResourceName;
+import org.apache.syncope.common.rest.api.CollectionWrapper;
+import org.apache.syncope.common.rest.api.service.ResourceService;
+import org.apache.syncope.common.rest.api.service.RoleService;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
+import org.springframework.stereotype.Component;
+
+/**
+ * Console client for invoking Rest Role's services.
+ */
+@Component
+public class RoleRestClient extends AbstractSubjectRestClient {
+
+ private static final long serialVersionUID = -8549081557283519638L;
+
+ @Override
+ public int count() {
+ return getService(RoleService.class).list(1, 1).getTotalCount();
+ }
+
+ public List<RoleTO> list() {
+ return getService(RoleService.class).list(1, 1000).getResult();
+ }
+
+ @Override
+ public List<RoleTO> list(final int page, final int size, final SortParam<String> sort) {
+ return getService(RoleService.class).list(page, size, toOrderBy(sort)).getResult();
+ }
+
+ @Override
+ public int searchCount(final String fiql) {
+ return getService(RoleService.class).search(fiql, 1, 1).getTotalCount();
+ }
+
+ @Override
+ public List<RoleTO> search(final String fiql, final int page, final int size, final SortParam<String> sort) {
+ return getService(RoleService.class).search(fiql, page, size, toOrderBy(sort)).getResult();
+ }
+
+ @Override
+ public ConnObjectTO getConnectorObject(final String resourceName, final Long id) {
+ return getService(ResourceService.class).getConnectorObject(resourceName, SubjectType.ROLE, id);
+ }
+
+ public RoleTO create(final RoleTO roleTO) {
+ Response response = getService(RoleService.class).create(roleTO);
+ return response.readEntity(RoleTO.class);
+ }
+
+ public RoleTO read(final Long id) {
+ return getAnonymousService(RoleService.class).read(id);
+ }
+
+ public RoleTO update(final String etag, final RoleMod roleMod) {
+ RoleTO result;
+ synchronized (this) {
+ RoleService service = getService(etag, RoleService.class);
+ result = service.update(roleMod.getKey(), roleMod).readEntity(RoleTO.class);
+ resetClient(RoleService.class);
+ }
+ return result;
+ }
+
+ @Override
+ public RoleTO delete(final String etag, final Long id) {
+ RoleTO result;
+ synchronized (this) {
+ RoleService service = getService(etag, RoleService.class);
+ result = service.delete(id).readEntity(RoleTO.class);
+ resetClient(RoleService.class);
+ }
+ return result;
+ }
+
+ @Override
+ public BulkActionResult bulkAction(final BulkAction action) {
+ return getService(RoleService.class).bulk(action);
+ }
+
+ public void unlink(final String etag, final long roleId, final List<StatusBean> statuses) {
+ synchronized (this) {
+ RoleService service = getService(etag, RoleService.class);
+ service.bulkDeassociation(roleId, ResourceDeassociationActionType.UNLINK,
+ CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceName.class));
+ resetClient(RoleService.class);
+ }
+ }
+
+ public void link(final String etag, final long roleId, final List<StatusBean> statuses) {
+ synchronized (this) {
+ RoleService service = getService(etag, RoleService.class);
+ service.bulkAssociation(roleId, ResourceAssociationActionType.LINK,
+ CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceName.class));
+ resetClient(RoleService.class);
+ }
+ }
+
+ public BulkActionResult deprovision(final String etag, final long roleId, final List<StatusBean> statuses) {
+ BulkActionResult result;
+ synchronized (this) {
+ RoleService service = getService(etag, RoleService.class);
+ result = service.bulkDeassociation(roleId, ResourceDeassociationActionType.DEPROVISION,
+ CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceName.class)).
+ readEntity(BulkActionResult.class);
+ resetClient(RoleService.class);
+ }
+ return result;
+ }
+
+ public BulkActionResult provision(final String etag, final long roleId, final List<StatusBean> statuses) {
+ BulkActionResult result;
+ synchronized (this) {
+ RoleService service = getService(etag, RoleService.class);
+ result = service.bulkAssociation(roleId, ResourceAssociationActionType.PROVISION,
+ CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceName.class)).
+ readEntity(BulkActionResult.class);
+ resetClient(RoleService.class);
+ }
+ return result;
+ }
+
+ public BulkActionResult unassign(final String etag, final long roleId, final List<StatusBean> statuses) {
+ BulkActionResult result;
+ synchronized (this) {
+ RoleService service = getService(etag, RoleService.class);
+ result = service.bulkDeassociation(roleId, ResourceDeassociationActionType.UNASSIGN,
+ CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceName.class)).
+ readEntity(BulkActionResult.class);
+ resetClient(RoleService.class);
+ }
+ return result;
+ }
+
+ public BulkActionResult assign(final String etag, final long roleId, final List<StatusBean> statuses) {
+ BulkActionResult result;
+ synchronized (this) {
+ RoleService service = getService(etag, RoleService.class);
+ result = service.bulkAssociation(roleId, ResourceAssociationActionType.ASSIGN,
+ CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceName.class)).
+ readEntity(BulkActionResult.class);
+ resetClient(RoleService.class);
+ }
+ return result;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java
new file mode 100644
index 0000000..378f98d
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java
@@ -0,0 +1,250 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.ListIterator;
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.syncope.client.console.commons.AttrLayoutType;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AbstractSchemaTO;
+import org.apache.syncope.common.lib.to.DerSchemaTO;
+import org.apache.syncope.common.lib.to.PlainSchemaTO;
+import org.apache.syncope.common.lib.to.VirSchemaTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.syncope.common.rest.api.service.SchemaService;
+import org.springframework.stereotype.Component;
+
+/**
+ * Console client for invoking rest schema services.
+ */
+@Component
+public class SchemaRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = -2479730152700312373L;
+
+ public void filter(
+ final List<? extends AbstractSchemaTO> schemaTOs, final Collection<String> allowed, final boolean exclude) {
+
+ for (ListIterator<? extends AbstractSchemaTO> itor = schemaTOs.listIterator(); itor.hasNext();) {
+ AbstractSchemaTO schema = itor.next();
+ if (exclude) {
+ if (!allowed.contains(schema.getKey())) {
+ itor.remove();
+ }
+ } else {
+ if (allowed.contains(schema.getKey())) {
+ itor.remove();
+ }
+ }
+ }
+ }
+
+ public List<? extends AbstractSchemaTO> getSchemas(final AttributableType attrType, final SchemaType schemaType) {
+ List<? extends AbstractSchemaTO> schemas = Collections.emptyList();
+
+ try {
+ schemas = getService(SchemaService.class).list(attrType, schemaType);
+ } catch (SyncopeClientException e) {
+ LOG.error("While getting all schemas for {} and {}", attrType, schemaType, e);
+ }
+
+ if (attrType == AttributableType.CONFIGURATION) {
+ filter(schemas, AttrLayoutType.confKeys(), false);
+ }
+
+ return schemas;
+ }
+
+ public List<PlainSchemaTO> getSchemas(final AttributableType type) {
+ List<PlainSchemaTO> schemas = null;
+
+ try {
+ schemas = getService(SchemaService.class).list(type, SchemaType.PLAIN);
+ } catch (SyncopeClientException e) {
+ LOG.error("While getting all schemas", e);
+ }
+
+ return schemas;
+ }
+
+ public List<String> getSchemaNames(final AttributableType attrType, final SchemaType schemaType) {
+ final List<String> schemaNames = new ArrayList<>();
+
+ try {
+ final List<? extends AbstractSchemaTO> schemas = getSchemas(attrType, schemaType);
+ for (AbstractSchemaTO schemaTO : schemas) {
+ schemaNames.add(schemaTO.getKey());
+ }
+ } catch (SyncopeClientException e) {
+ LOG.error("While getting all user schema names", e);
+ }
+
+ return schemaNames;
+ }
+
+ public List<String> getPlainSchemaNames(final AttributableType type) {
+ final List<String> schemaNames = new ArrayList<>();
+
+ try {
+ final List<PlainSchemaTO> schemas = getSchemas(type);
+ for (PlainSchemaTO schemaTO : schemas) {
+ schemaNames.add(schemaTO.getKey());
+ }
+ } catch (SyncopeClientException e) {
+ LOG.error("While getting all user schema names", e);
+ }
+
+ return schemaNames;
+ }
+
+ public List<DerSchemaTO> getDerSchemas(final AttributableType type) {
+ List<DerSchemaTO> userDerSchemas = null;
+
+ try {
+ userDerSchemas = getService(SchemaService.class).list(type, SchemaType.DERIVED);
+ } catch (SyncopeClientException e) {
+ LOG.error("While getting all user derived schemas", e);
+ }
+
+ return userDerSchemas;
+ }
+
+ public List<String> getDerSchemaNames(final AttributableType type) {
+ final List<String> userDerSchemasNames = new ArrayList<>();
+
+ try {
+ final List<DerSchemaTO> userDerSchemas = getService(SchemaService.class).list(type, SchemaType.DERIVED);
+
+ for (DerSchemaTO schemaTO : userDerSchemas) {
+ userDerSchemasNames.add(schemaTO.getKey());
+ }
+ } catch (SyncopeClientException e) {
+ LOG.error("While getting all {} derived schema names", type, e);
+ }
+
+ return userDerSchemasNames;
+ }
+
+ public List<VirSchemaTO> getVirSchemas(final AttributableType type) {
+ List<VirSchemaTO> userVirSchemas = null;
+
+ try {
+ userVirSchemas = getService(SchemaService.class).list(type, SchemaType.VIRTUAL);
+ } catch (SyncopeClientException e) {
+ LOG.error("While getting all {} virtual schemas", type, e);
+ }
+
+ return userVirSchemas;
+ }
+
+ public List<String> getVirSchemaNames(final AttributableType type) {
+ final List<String> userVirSchemasNames = new ArrayList<String>();
+
+ try {
+ @SuppressWarnings("unchecked")
+ final List<VirSchemaTO> userVirSchemas = getService(SchemaService.class).list(type, SchemaType.VIRTUAL);
+ for (VirSchemaTO schemaTO : userVirSchemas) {
+ userVirSchemasNames.add(schemaTO.getKey());
+ }
+ } catch (SyncopeClientException e) {
+ LOG.error("While getting all user derived schema names", e);
+ }
+
+ return userVirSchemasNames;
+ }
+
+ public void createPlainSchema(final AttributableType type, final PlainSchemaTO schemaTO) {
+ getService(SchemaService.class).create(type, SchemaType.PLAIN, schemaTO);
+ }
+
+ public PlainSchemaTO readPlainSchema(final AttributableType type, final String name) {
+ PlainSchemaTO schema = null;
+
+ try {
+ schema = getService(SchemaService.class).read(type, SchemaType.PLAIN, name);
+ } catch (SyncopeClientException e) {
+ LOG.error("While reading a user schema", e);
+ }
+ return schema;
+ }
+
+ public void updatePlainSchema(final AttributableType type, final PlainSchemaTO schemaTO) {
+ getService(SchemaService.class).update(type, SchemaType.PLAIN, schemaTO.getKey(), schemaTO);
+ }
+
+ public PlainSchemaTO deletePlainSchema(final AttributableType type, final String name) {
+ PlainSchemaTO response = getService(SchemaService.class).read(type, SchemaType.PLAIN, name);
+ getService(SchemaService.class).delete(type, SchemaType.PLAIN, name);
+ return response;
+ }
+
+ public void createDerSchema(final AttributableType type, final DerSchemaTO schemaTO) {
+ getService(SchemaService.class).create(type, SchemaType.DERIVED, schemaTO);
+ }
+
+ public DerSchemaTO readDerSchema(final AttributableType type, final String name) {
+ DerSchemaTO derivedSchemaTO = null;
+ try {
+ derivedSchemaTO = getService(SchemaService.class).read(type, SchemaType.DERIVED, name);
+ } catch (SyncopeClientException e) {
+ LOG.error("While reading a derived user schema", e);
+ }
+ return derivedSchemaTO;
+ }
+
+ public void updateVirSchema(final AttributableType type, final VirSchemaTO schemaTO) {
+ getService(SchemaService.class).update(type, SchemaType.VIRTUAL, schemaTO.getKey(), schemaTO);
+ }
+
+ public DerSchemaTO deleteDerSchema(final AttributableType type, final String name) {
+ DerSchemaTO schemaTO = getService(SchemaService.class).read(type, SchemaType.DERIVED, name);
+ getService(SchemaService.class).delete(type, SchemaType.DERIVED, name);
+ return schemaTO;
+ }
+
+ public void createVirSchema(final AttributableType type, final VirSchemaTO schemaTO) {
+ getService(SchemaService.class).create(type, SchemaType.VIRTUAL, schemaTO);
+ }
+
+ public void updateDerSchema(final AttributableType type, final DerSchemaTO schemaTO) {
+ getService(SchemaService.class).update(type, SchemaType.DERIVED, schemaTO.getKey(), schemaTO);
+ }
+
+ public VirSchemaTO deleteVirSchema(final AttributableType type, final String name) {
+ VirSchemaTO schemaTO = getService(SchemaService.class).read(type, SchemaType.VIRTUAL, name);
+ getService(SchemaService.class).delete(type, SchemaType.VIRTUAL, name);
+ return schemaTO;
+ }
+
+ public List<String> getAllValidatorClasses() {
+ List<String> response = null;
+
+ try {
+ response = SyncopeSession.get().getSyncopeTO().getValidators();
+ } catch (SyncopeClientException e) {
+ LOG.error("While getting all validators", e);
+ }
+ return response;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/SecurityQuestionRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/SecurityQuestionRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/SecurityQuestionRestClient.java
new file mode 100644
index 0000000..119b3b5
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/SecurityQuestionRestClient.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.List;
+import org.apache.syncope.common.lib.to.SecurityQuestionTO;
+import org.apache.syncope.common.rest.api.service.SecurityQuestionService;
+import org.springframework.stereotype.Component;
+
+@Component
+public class SecurityQuestionRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = -3167730221361895176L;
+
+ public List<SecurityQuestionTO> list() {
+ return getService(SecurityQuestionService.class).list();
+ }
+
+ public void create(final SecurityQuestionTO securityQuestionTO) {
+ getService(SecurityQuestionService.class).create(securityQuestionTO);
+ }
+
+ public void update(final SecurityQuestionTO securityQuestionTO) {
+ getService(SecurityQuestionService.class).update(securityQuestionTO.getKey(), securityQuestionTO);
+ }
+
+ public void delete(final Long securityQuestionId) {
+ getService(SecurityQuestionService.class).delete(securityQuestionId);
+ }
+
+ public SecurityQuestionTO readByUser(final String username) {
+ return getService(SecurityQuestionService.class).readByUser(username);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
new file mode 100644
index 0000000..541b5cd
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
@@ -0,0 +1,139 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.List;
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.BulkAction;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.NotificationTaskTO;
+import org.apache.syncope.common.lib.to.PropagationTaskTO;
+import org.apache.syncope.common.lib.to.PushTaskTO;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.syncope.common.lib.to.SyncTaskTO;
+import org.apache.syncope.common.lib.types.TaskType;
+import org.apache.syncope.common.rest.api.service.TaskService;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
+import org.springframework.stereotype.Component;
+
+/**
+ * Console client for invoking Rest Tasks services.
+ */
+@Component
+public class TaskRestClient extends BaseRestClient implements ExecutionRestClient {
+
+ private static final long serialVersionUID = 6284485820911028843L;
+
+ public List<String> getJobClasses() {
+ return SyncopeSession.get().getSyncopeTO().getTaskJobs();
+ }
+
+ public List<String> getSyncActionsClasses() {
+ return SyncopeSession.get().getSyncopeTO().getSyncActions();
+ }
+
+ public List<String> getPushActionsClasses() {
+ return SyncopeSession.get().getSyncopeTO().getPushActions();
+ }
+
+ /**
+ * Return the number of tasks.
+ *
+ * @param kind of task (propagation, sched, sync).
+ * @return number of stored tasks.
+ */
+ public int count(final String kind) {
+ return getService(TaskService.class).list(TaskType.fromString(kind), 1, 1).getTotalCount();
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T extends AbstractTaskTO> List<T> list(final Class<T> reference,
+ final int page, final int size, final SortParam<String> sort) {
+
+ return (List<T>) getService(TaskService.class).list(getTaskType(reference), page, size, toOrderBy(sort)).
+ getResult();
+ }
+
+ private TaskType getTaskType(final Class<?> reference) {
+ TaskType result = null;
+ if (PropagationTaskTO.class.equals(reference)) {
+ result = TaskType.PROPAGATION;
+ } else if (NotificationTaskTO.class.equals(reference)) {
+ result = TaskType.NOTIFICATION;
+ } else if (SchedTaskTO.class.equals(reference)) {
+ result = TaskType.SCHEDULED;
+ } else if (SyncTaskTO.class.equals(reference)) {
+ result = TaskType.SYNCHRONIZATION;
+ } else if (PushTaskTO.class.equals(reference)) {
+ result = TaskType.PUSH;
+ }
+ return result;
+ }
+
+ public PropagationTaskTO readPropagationTask(final Long taskId) {
+ return getService(TaskService.class).read(taskId);
+ }
+
+ public NotificationTaskTO readNotificationTask(final Long taskId) {
+ return getService(TaskService.class).read(taskId);
+ }
+
+ public <T extends SchedTaskTO> T readSchedTask(final Class<T> reference, final Long taskId) {
+ return getService(TaskService.class).read(taskId);
+ }
+
+ public void delete(final Long taskId, final Class<? extends AbstractTaskTO> taskToClass) {
+ getService(TaskService.class).delete(taskId);
+ }
+
+ @Override
+ public void startExecution(final long taskId) {
+ startExecution(taskId, false);
+ }
+
+ public void startExecution(final long taskId, final boolean dryRun) {
+ getService(TaskService.class).execute(taskId, dryRun);
+ }
+
+ @Override
+ public void deleteExecution(final long taskExecId) {
+ getService(TaskService.class).deleteExecution(taskExecId);
+ }
+
+ public void createSyncTask(final SyncTaskTO taskTO) {
+ getService(TaskService.class).create(taskTO);
+ }
+
+ public void createSchedTask(final SchedTaskTO taskTO) {
+ getService(TaskService.class).create(taskTO);
+ }
+
+ public void updateSchedTask(final SchedTaskTO taskTO) {
+ getService(TaskService.class).update(taskTO.getKey(), taskTO);
+ }
+
+ public void updateSyncTask(final SyncTaskTO taskTO) {
+ getService(TaskService.class).update(taskTO.getKey(), taskTO);
+ }
+
+ public BulkActionResult bulkAction(final BulkAction action) {
+ return getService(TaskService.class).bulk(action);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
new file mode 100644
index 0000000..bca0e28
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
@@ -0,0 +1,228 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.util.List;
+import javax.ws.rs.core.Response;
+import org.apache.syncope.client.console.commons.status.StatusBean;
+import org.apache.syncope.client.console.commons.status.StatusUtils;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.mod.ResourceAssociationMod;
+import org.apache.syncope.common.lib.mod.StatusMod;
+import org.apache.syncope.common.lib.mod.UserMod;
+import org.apache.syncope.common.lib.to.BulkAction;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.ConnObjectTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
+import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
+import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.lib.wrap.ResourceName;
+import org.apache.syncope.common.rest.api.CollectionWrapper;
+import org.apache.syncope.common.rest.api.service.ResourceService;
+import org.apache.syncope.common.rest.api.service.UserService;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
+import org.springframework.stereotype.Component;
+
+/**
+ * Console client for invoking rest users services.
+ */
+@Component
+public class UserRestClient extends AbstractSubjectRestClient {
+
+ private static final long serialVersionUID = -1575748964398293968L;
+
+ @Override
+ public int count() {
+ return getService(UserService.class).list(1, 1).getTotalCount();
+ }
+
+ @Override
+ public List<UserTO> list(final int page, final int size, final SortParam<String> sort) {
+ return getService(UserService.class).list(page, size, toOrderBy(sort)).getResult();
+ }
+
+ public UserTO create(final UserTO userTO, final boolean storePassword) {
+ Response response = getService(UserService.class).create(userTO, storePassword);
+ return response.readEntity(UserTO.class);
+ }
+
+ public UserTO update(final String etag, final UserMod userMod) {
+ UserTO result;
+ synchronized (this) {
+ UserService service = getService(etag, UserService.class);
+ result = service.update(userMod.getKey(), userMod).readEntity(UserTO.class);
+ resetClient(UserService.class);
+ }
+ return result;
+ }
+
+ @Override
+ public UserTO delete(final String etag, final Long id) {
+ UserTO result;
+ synchronized (this) {
+ UserService service = getService(etag, UserService.class);
+ result = service.delete(id).readEntity(UserTO.class);
+ resetClient(UserService.class);
+ }
+ return result;
+ }
+
+ public UserTO read(final Long id) {
+ UserTO userTO = null;
+ try {
+ userTO = getService(UserService.class).read(id);
+ } catch (SyncopeClientException e) {
+ LOG.error("While reading a user", e);
+ }
+ return userTO;
+ }
+
+ @Override
+ public int searchCount(final String fiql) {
+ return getService(UserService.class).search(fiql, 1, 1).getTotalCount();
+ }
+
+ @Override
+ public List<UserTO> search(final String fiql, final int page, final int size, final SortParam<String> sort) {
+ return getService(UserService.class).search(fiql, page, size, toOrderBy(sort)).getResult();
+ }
+
+ @Override
+ public ConnObjectTO getConnectorObject(final String resourceName, final Long id) {
+ return getService(ResourceService.class).getConnectorObject(resourceName, SubjectType.USER, id);
+ }
+
+ public void suspend(final String etag, final long userId, final List<StatusBean> statuses) {
+ StatusMod statusMod = StatusUtils.buildStatusMod(statuses, false);
+ statusMod.setType(StatusMod.ModType.SUSPEND);
+ synchronized (this) {
+ UserService service = getService(etag, UserService.class);
+ service.status(userId, statusMod);
+ resetClient(UserService.class);
+ }
+ }
+
+ public void reactivate(final String etag, final long userId, final List<StatusBean> statuses) {
+ StatusMod statusMod = StatusUtils.buildStatusMod(statuses, true);
+ statusMod.setType(StatusMod.ModType.REACTIVATE);
+ synchronized (this) {
+ UserService service = getService(etag, UserService.class);
+ service.status(userId, statusMod);
+ resetClient(UserService.class);
+ }
+ }
+
+ @Override
+ public BulkActionResult bulkAction(final BulkAction action) {
+ return getService(UserService.class).bulk(action);
+ }
+
+ public void unlink(final String etag, final long userId, final List<StatusBean> statuses) {
+ synchronized (this) {
+ UserService service = getService(etag, UserService.class);
+ service.bulkDeassociation(userId, ResourceDeassociationActionType.UNLINK,
+ CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceName.class));
+ resetClient(UserService.class);
+ }
+ }
+
+ public void link(final String etag, final long userId, final List<StatusBean> statuses) {
+ synchronized (this) {
+ UserService service = getService(etag, UserService.class);
+
+ final ResourceAssociationMod associationMod = new ResourceAssociationMod();
+ associationMod.getTargetResources().addAll(
+ CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceName.class));
+ service.bulkAssociation(userId, ResourceAssociationActionType.LINK, associationMod);
+
+ resetClient(UserService.class);
+ }
+ }
+
+ public BulkActionResult deprovision(final String etag, final long userId, final List<StatusBean> statuses) {
+ BulkActionResult result;
+ synchronized (this) {
+ UserService service = getService(etag, UserService.class);
+ result = service.bulkDeassociation(userId, ResourceDeassociationActionType.DEPROVISION,
+ CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceName.class)).
+ readEntity(BulkActionResult.class);
+ resetClient(UserService.class);
+ }
+ return result;
+ }
+
+ public BulkActionResult provision(final String etag, final long userId,
+ final List<StatusBean> statuses, final boolean changepwd, final String password) {
+
+ BulkActionResult result;
+ synchronized (this) {
+ UserService service = getService(etag, UserService.class);
+
+ final ResourceAssociationMod associationMod = new ResourceAssociationMod();
+ associationMod.getTargetResources().addAll(
+ CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceName.class));
+ associationMod.setChangePwd(changepwd);
+ associationMod.setPassword(password);
+
+ result = service.bulkAssociation(userId, ResourceAssociationActionType.PROVISION, associationMod).
+ readEntity(BulkActionResult.class);
+ resetClient(UserService.class);
+ }
+ return result;
+ }
+
+ public BulkActionResult unassign(final String etag, final long userId, final List<StatusBean> statuses) {
+ BulkActionResult result;
+ synchronized (this) {
+ UserService service = getService(etag, UserService.class);
+ result = service.bulkDeassociation(userId, ResourceDeassociationActionType.UNASSIGN,
+ CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceName.class)).
+ readEntity(BulkActionResult.class);
+ resetClient(UserService.class);
+ }
+ return result;
+ }
+
+ public BulkActionResult assign(final String etag, final long userId,
+ final List<StatusBean> statuses, final boolean changepwd, final String password) {
+
+ BulkActionResult result;
+ synchronized (this) {
+ UserService service = getService(etag, UserService.class);
+
+ final ResourceAssociationMod associationMod = new ResourceAssociationMod();
+ associationMod.getTargetResources().addAll(
+ CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceName.class));
+ associationMod.setChangePwd(changepwd);
+ associationMod.setPassword(password);
+
+ result = service.bulkAssociation(userId, ResourceAssociationActionType.ASSIGN, associationMod).
+ readEntity(BulkActionResult.class);
+ resetClient(UserService.class);
+ }
+ return result;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/UserSelfRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/UserSelfRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/UserSelfRestClient.java
new file mode 100644
index 0000000..1bb1079
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/UserSelfRestClient.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.mod.UserMod;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.rest.api.service.UserSelfService;
+import org.springframework.stereotype.Component;
+
+@Component
+public class UserSelfRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = 2994691796924731295L;
+
+ public boolean isSelfRegistrationAllowed() {
+ Boolean result = null;
+ try {
+ result = SyncopeSession.get().getSyncopeTO().isSelfRegAllowed();
+ } catch (SyncopeClientException e) {
+ LOG.error("While seeking if self registration is allowed", e);
+ }
+
+ return result == null
+ ? false
+ : result.booleanValue();
+ }
+
+ public UserTO read() {
+ return getService(UserSelfService.class).read();
+ }
+
+ public void create(final UserTO userTO, final boolean storePassword) {
+ getService(UserSelfService.class).create(userTO, storePassword);
+ }
+
+ public void update(final UserMod userMod) {
+ getService(UserSelfService.class).update(userMod.getKey(), userMod);
+ }
+
+ public void delete() {
+ getService(UserSelfService.class).delete();
+ }
+
+ public boolean isPasswordResetAllowed() {
+ Boolean result = null;
+ try {
+ result = SyncopeSession.get().getSyncopeTO().isPwdResetAllowed();
+ } catch (SyncopeClientException e) {
+ LOG.error("While seeking if password reset is allowed", e);
+ }
+
+ return result == null
+ ? false
+ : result.booleanValue();
+ }
+
+ public boolean isPwdResetRequiringSecurityQuestions() {
+ Boolean result = null;
+ try {
+ result = SyncopeSession.get().getSyncopeTO().isPwdResetRequiringSecurityQuestions();
+ } catch (SyncopeClientException e) {
+ LOG.error("While seeking if password reset requires security question", e);
+ }
+
+ return result == null
+ ? false
+ : result.booleanValue();
+ }
+
+ public void requestPasswordReset(final String username, final String securityAnswer) {
+ getService(UserSelfService.class).requestPasswordReset(username, securityAnswer);
+ }
+
+ public void confirmPasswordReset(final String token, final String password) {
+ getService(UserSelfService.class).confirmPasswordReset(token, password);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/rest/WorkflowRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/WorkflowRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/WorkflowRestClient.java
new file mode 100644
index 0000000..f3bf60c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/WorkflowRestClient.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.rest;
+
+import java.io.InputStream;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.rest.api.RESTHeaders;
+import org.apache.syncope.common.rest.api.service.WorkflowService;
+import org.springframework.stereotype.Component;
+
+@Component
+public class WorkflowRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = 5049285686167071017L;
+
+ private WorkflowService getService(final MediaType mediaType) {
+ return SyncopeSession.get().getService(mediaType, WorkflowService.class);
+ }
+
+ public InputStream getDefinition(final MediaType mediaType) {
+ Response response = getService(mediaType).exportDefinition(SubjectType.USER);
+
+ return (InputStream) response.getEntity();
+ }
+
+ public byte[] getDiagram() {
+ WorkflowService service = getService(WorkflowService.class);
+ WebClient.client(service).accept(RESTHeaders.MEDIATYPE_IMAGE_PNG);
+ Response response = service.exportDiagram(SubjectType.USER);
+
+ byte[] diagram;
+ try {
+ diagram = IOUtils.readBytesFromStream((InputStream) response.getEntity());
+ } catch (Exception e) {
+ LOG.error("Could not get workflow diagram", e);
+ diagram = new byte[0];
+ }
+ return diagram;
+ }
+
+ public boolean isActivitiEnabledForUsers() {
+ return SyncopeSession.get().getSyncopeTO().getUserWorkflowAdapter().indexOf("Activiti") != -1;
+ }
+
+ public void updateDefinition(final MediaType mediaType, final String definition) {
+ getService(mediaType).importDefinition(SubjectType.USER, definition);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java
new file mode 100644
index 0000000..8074d37
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.ajax.form;
+
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.behavior.AbstractAjaxBehavior;
+import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler;
+import org.apache.wicket.util.resource.IResourceStream;
+
+public abstract class AbstractAjaxDownloadBehavior extends AbstractAjaxBehavior {
+
+ private static final long serialVersionUID = 6833760760338614245L;
+
+ /**
+ * Call this method to initiate the download.
+ */
+ public void initiate(final AjaxRequestTarget target) {
+ CharSequence url = getCallbackUrl();
+
+ target.appendJavaScript("window.location.href='" + url + "'");
+ }
+
+ @Override
+ public void onRequest() {
+ getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent(
+ new ResourceStreamRequestHandler(getResourceStream(), getFileName()));
+ }
+
+ protected abstract String getFileName();
+
+ protected abstract IResourceStream getResourceStream();
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/ClearIndicatingAjaxButton.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/ClearIndicatingAjaxButton.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/ClearIndicatingAjaxButton.java
new file mode 100644
index 0000000..314f66c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/ClearIndicatingAjaxButton.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.ajax.markup.html;
+
+import org.apache.syncope.client.console.pages.BasePage;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.IModel;
+
+public abstract class ClearIndicatingAjaxButton extends IndicatingAjaxButton {
+
+ private static final long serialVersionUID = 7206379812788748287L;
+
+ private final PageReference pageRef;
+
+ private boolean reloadFeebackPanel = true;
+
+ public ClearIndicatingAjaxButton(final String id, final PageReference pageRef) {
+ super(id);
+ this.pageRef = pageRef;
+ }
+
+ public ClearIndicatingAjaxButton(final String id, Form<?> form, final PageReference pageRef) {
+ super(id, form);
+ this.pageRef = pageRef;
+ }
+
+ public ClearIndicatingAjaxButton(final String id, IModel<String> model, final PageReference pageRef) {
+ super(id, model);
+ this.pageRef = pageRef;
+ }
+
+ public ClearIndicatingAjaxButton(final String id, final IModel<String> model, final Form<?> form,
+ final PageReference pageRef) {
+
+ super(id, model, form);
+ this.pageRef = pageRef;
+ }
+
+ protected abstract void onSubmitInternal(AjaxRequestTarget target, Form<?> form);
+
+ public ClearIndicatingAjaxButton feedbackPanelAutomaticReload(boolean reloadFeedbackPanel) {
+ this.reloadFeebackPanel = reloadFeedbackPanel;
+ return this;
+ }
+
+ @Override
+ protected final void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ super.onSubmit(target, form);
+
+ Page page = pageRef.getPage();
+ if (reloadFeebackPanel && page instanceof BasePage) {
+ target.add(((BasePage) page).getFeedbackPanel());
+ }
+ onSubmitInternal(target, form);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java
new file mode 100644
index 0000000..5bb5642
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.ajax.markup.html;
+
+import org.apache.syncope.client.console.pages.BasePage;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
+import org.apache.wicket.model.IModel;
+
+public abstract class ClearIndicatingAjaxLink<T> extends IndicatingAjaxLink<T> {
+
+ private static final long serialVersionUID = 7913625094362339643L;
+
+ private final PageReference pageRef;
+
+ private boolean reloadFeedbackPanel = true;
+
+ public ClearIndicatingAjaxLink(final String id, final PageReference pageRef) {
+ super(id);
+ this.pageRef = pageRef;
+ }
+
+ public ClearIndicatingAjaxLink(final String id, final IModel<T> model, final PageReference pageRef) {
+ super(id, model);
+ this.pageRef = pageRef;
+ }
+
+ public ClearIndicatingAjaxLink<T> feedbackPanelAutomaticReload(boolean reloadFeedbackPanel) {
+ this.reloadFeedbackPanel = reloadFeedbackPanel;
+ return this;
+ }
+
+ protected abstract void onClickInternal(AjaxRequestTarget target);
+
+ @Override
+ public final void onClick(final AjaxRequestTarget target) {
+ Page page = pageRef.getPage();
+ if (reloadFeedbackPanel && page instanceof BasePage) {
+ target.add(((BasePage) page).getFeedbackPanel());
+ }
+ onClickInternal(target);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/IndicatingOnConfirmAjaxLink.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/IndicatingOnConfirmAjaxLink.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/IndicatingOnConfirmAjaxLink.java
new file mode 100644
index 0000000..86db915
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/IndicatingOnConfirmAjaxLink.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.ajax.markup.html;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.attributes.AjaxCallListener;
+import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
+
+public abstract class IndicatingOnConfirmAjaxLink<T> extends ClearIndicatingAjaxLink<T> {
+
+ private static final long serialVersionUID = 2228670850922265663L;
+
+ private final String msg;
+
+ public IndicatingOnConfirmAjaxLink(final String id, final PageReference pageRef) {
+ this(id, pageRef, "confirmDelete");
+ }
+
+ public IndicatingOnConfirmAjaxLink(final String id, final PageReference pageRef, final String msg) {
+ super(id, pageRef);
+ this.msg = msg;
+ }
+
+ @Override
+ protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
+ super.updateAjaxAttributes(attributes);
+
+ final AjaxCallListener ajaxCallListener = new AjaxCallListener() {
+
+ private static final long serialVersionUID = 7160235486520935153L;
+
+ @Override
+ public CharSequence getPrecondition(final Component component) {
+ return "if (!confirm('"
+ + getString(IndicatingOnConfirmAjaxLink.this.msg)
+ + "')) {return false;} else {return true;}";
+ }
+ };
+ attributes.getAjaxCallListeners().add(ajaxCallListener);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/ActionColumn.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/ActionColumn.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/ActionColumn.java
new file mode 100644
index 0000000..b9dfa62
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/ActionColumn.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
+
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.wicket.Component;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class ActionColumn<T, S> extends AbstractColumn<T, S> {
+
+ private static final long serialVersionUID = 7955560320949560725L;
+
+ /**
+ * Logger.
+ */
+ protected static final Logger LOG = LoggerFactory.getLogger(ActionColumn.class);
+
+ public ActionColumn(final IModel<String> displayModel) {
+ super(displayModel);
+ }
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public Component getHeader(final String componentId) {
+ return super.getHeader(componentId);
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<T>> item, final String componentId, final IModel<T> rowModel) {
+ item.add(getActions(componentId, rowModel));
+ }
+
+ public abstract ActionLinksPanel getActions(final String componentId, final IModel<T> rowModel);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/ActionResultColumn.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/ActionResultColumn.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/ActionResultColumn.java
new file mode 100644
index 0000000..a2c40ff
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/ActionResultColumn.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
+
+import java.beans.PropertyDescriptor;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.BulkActionResult.Status;
+import org.apache.wicket.Component;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+
+public class ActionResultColumn<T, S> extends AbstractColumn<T, S> {
+
+ private static final long serialVersionUID = 7955560320949560716L;
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(ActionResultColumn.class);
+
+ private final BulkActionResult results;
+
+ private final String idFieldName;
+
+ public ActionResultColumn(final BulkActionResult results, final String idFieldName) {
+ super(new Model<String>());
+ this.results = results;
+ this.idFieldName = idFieldName;
+ }
+
+ @Override
+ public String getCssClass() {
+ return "bulkResultColumn";
+ }
+
+ @Override
+ public Component getHeader(final String componentId) {
+ return new Label(componentId, new ResourceModel("bulkActionResultLabel", "Result"));
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<T>> item, final String componentId, final IModel<T> rowModel) {
+ try {
+ final PropertyDescriptor propDesc =
+ BeanUtils.getPropertyDescriptor(rowModel.getObject().getClass(), idFieldName);
+ final Object id = propDesc.getReadMethod().invoke(rowModel.getObject(), new Object[0]);
+ final Status status = id == null ? null : results.getResultMap().get(id.toString());
+ item.add(new Label(componentId, status == null ? Status.SUCCESS : status.toString()));
+ } catch (Exception e) {
+ LOG.error("Errore retrieving target id value", e);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/AttrColumn.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/AttrColumn.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/AttrColumn.java
new file mode 100644
index 0000000..b40d7c8
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/AttrColumn.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
+
+import java.util.List;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
+
+public class AttrColumn extends AbstractColumn<AbstractAttributableTO, String> {
+
+ private static final long serialVersionUID = 2624734332447371372L;
+
+ private final String name;
+
+ private final SchemaType schemaType;
+
+ public AttrColumn(final String name, final SchemaType schemaType) {
+ // set sortProperty to schematype#name (e.g. derivedSchema#cn,
+ // for use with SortableUserProviderComparator.AttrModel#getObject)
+ super(new ResourceModel(name, name), schemaType.name() + "#" + name);
+ this.name = name;
+ this.schemaType = schemaType;
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<AbstractAttributableTO>> cellItem, final String componentId,
+ final IModel<AbstractAttributableTO> rowModel) {
+
+ List<String> values = null;
+
+ switch (schemaType) {
+ case PLAIN:
+ if (rowModel.getObject().getPlainAttrMap().containsKey(name)) {
+ values = rowModel.getObject().getPlainAttrMap().get(name).getValues();
+ }
+ break;
+
+ case VIRTUAL:
+ if (rowModel.getObject().getVirAttrMap().containsKey(name)) {
+ values = rowModel.getObject().getVirAttrMap().get(name).getValues();
+ }
+ break;
+
+ case DERIVED:
+ if (rowModel.getObject().getDerAttrMap().containsKey(name)) {
+ values = rowModel.getObject().getDerAttrMap().get(name).getValues();
+ }
+ break;
+
+ default:
+ }
+
+ if (values == null || values.isEmpty()) {
+ cellItem.add(new Label(componentId, ""));
+ } else {
+ if (values.size() == 1) {
+ cellItem.add(new Label(componentId, values.get(0)));
+ } else {
+ cellItem.add(new Label(componentId, values.toString()));
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxGroupSelectorPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxGroupSelectorPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxGroupSelectorPanel.java
new file mode 100644
index 0000000..8f880b7
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxGroupSelectorPanel.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
+
+import org.apache.wicket.markup.html.form.CheckGroup;
+import org.apache.wicket.markup.html.form.CheckGroupSelector;
+import org.apache.wicket.markup.html.panel.Panel;
+
+public class CheckBoxGroupSelectorPanel<T> extends Panel {
+
+ private static final long serialVersionUID = 4062106303929176865L;
+
+ public CheckBoxGroupSelectorPanel(final String componentId, final CheckGroup<T> group) {
+
+ super(componentId);
+ add(new CheckGroupSelector("groupselector", group));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxPanel.java
new file mode 100644
index 0000000..db87192
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxPanel.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
+
+import org.apache.syncope.client.console.commons.ActionTableCheckGroup;
+import org.apache.wicket.markup.html.form.Check;
+import org.apache.wicket.markup.html.form.CheckGroup;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+
+public class CheckBoxPanel<T> extends Panel {
+
+ private static final long serialVersionUID = 4062106303929176865L;
+
+ private final Check<T> check;
+
+ public CheckBoxPanel(final String componentId, final IModel<T> model, final CheckGroup<T> checkGroup) {
+ super(componentId, model);
+ this.check = new Check<T>("check", model, checkGroup);
+ if (checkGroup instanceof ActionTableCheckGroup) {
+ boolean checkable = ((ActionTableCheckGroup<T>) checkGroup).isCheckable(model.getObject());
+ this.check.setEnabled(checkable);
+ this.check.setVisible(checkable);
+ }
+ add(this.check);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckGroupColumn.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckGroupColumn.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckGroupColumn.java
new file mode 100644
index 0000000..cf13f3c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckGroupColumn.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.markup.html.form.CheckGroup;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+public class CheckGroupColumn<T, S> extends AbstractColumn<T, S> {
+
+ private static final long serialVersionUID = 7955560320949560715L;
+
+ private final CheckGroup<T> group;
+
+ public CheckGroupColumn(final CheckGroup<T> checkGroup) {
+ super(new Model<String>());
+ this.group = checkGroup;
+ }
+
+ @Override
+ public String getCssClass() {
+ return "checkGroupColumn";
+ }
+
+ @Override
+ public Component getHeader(final String componentId) {
+ return new CheckBoxGroupSelectorPanel<T>(componentId, group);
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<T>> item, final String componentId, final IModel<T> rowModel) {
+ item.add(new CheckBoxPanel<T>(componentId, rowModel, group));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPanel.java
new file mode 100644
index 0000000..f04fa5a
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPanel.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
+
+import java.util.List;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.ResourceModel;
+
+public class CollectionPanel extends Panel {
+
+ private static final long serialVersionUID = -4042497356836230377L;
+
+ @SuppressWarnings("unchecked")
+ public CollectionPanel(final String id, final List values) {
+ super(id);
+
+ add(new ListView("collection", values) {
+
+ private static final long serialVersionUID = 4949588177564901031L;
+
+ @Override
+ protected void populateItem(final ListItem item) {
+ final String value = item.getModelObject() == null ? null : item.getModelObject().toString();
+ item.add(new Label("item", new ResourceModel(value, value)));
+ }
+ });
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPropertyColumn.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPropertyColumn.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPropertyColumn.java
new file mode 100644
index 0000000..a5fd774
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPropertyColumn.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+
+public class CollectionPropertyColumn<T> extends PropertyColumn<T, String> {
+
+ private static final long serialVersionUID = 8077865338230121496L;
+
+ public CollectionPropertyColumn(
+ final IModel<String> displayModel,
+ final String sortProperty,
+ final String propertyExpression) {
+ super(displayModel, sortProperty, propertyExpression);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void populateItem(
+ final Item<ICellPopulator<T>> cellItem, final String componentId, final IModel<T> rowModel) {
+
+ final Object value = getDataModel(rowModel).getObject();
+
+ if (value instanceof Collection) {
+ final List values = new ArrayList((Collection) value);
+ Collections.sort(values);
+ cellItem.add(new CollectionPanel(componentId, values));
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/DatePropertyColumn.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/DatePropertyColumn.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/DatePropertyColumn.java
new file mode 100644
index 0000000..f767aa2
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/DatePropertyColumn.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
+
+import java.util.Date;
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+
+/**
+ * Format column's value as date string.
+ */
+public class DatePropertyColumn<T> extends PropertyColumn<T, String> {
+
+ private static final long serialVersionUID = 3527840552172947705L;
+
+ public DatePropertyColumn(final IModel<String> displayModel, final String sortProperty,
+ final String propertyExpression) {
+
+ super(displayModel, sortProperty, propertyExpression);
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<T>> item, final String componentId, final IModel<T> rowModel) {
+
+ IModel<Object> date = getDataModel(rowModel);
+
+ String convertedDate = "";
+ if (date.getObject() instanceof Date) {
+ convertedDate = SyncopeSession.get().getDateFormat().format(date.getObject());
+ }
+ item.add(new Label(componentId, convertedDate));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/TokenColumn.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/TokenColumn.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/TokenColumn.java
new file mode 100644
index 0000000..094e450
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/TokenColumn.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
+
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
+import org.springframework.util.StringUtils;
+
+public class TokenColumn extends AbstractColumn<AbstractAttributableTO, String> {
+
+ private static final long serialVersionUID = 8077865338230121496L;
+
+ public TokenColumn(final String name) {
+ super(new ResourceModel(name, name), name);
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<AbstractAttributableTO>> cellItem, final String componentId,
+ final IModel<AbstractAttributableTO> rowModel) {
+
+ if (rowModel.getObject() instanceof UserTO) {
+ if (StringUtils.hasText(((UserTO) rowModel.getObject()).getToken())) {
+ cellItem.add(new Label(componentId, new ResourceModel("tokenValued", "tokenValued")));
+ } else {
+ cellItem.add(new Label(componentId, new ResourceModel("tokenNotValued", "tokenNotValued")));
+ }
+ }
+ }
+}
[37/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
new file mode 100644
index 0000000..6139ee4
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
@@ -0,0 +1,353 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.Collection;
+import java.util.List;
+import org.apache.syncope.client.console.commons.AttributableDataProvider;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.PreferenceManager;
+import org.apache.syncope.client.console.commons.XMLRolesReader;
+import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.rest.AbstractSubjectRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.event.IEventSource;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class AbstractSearchResultPanel extends Panel implements IEventSource {
+
+ private static final long serialVersionUID = -9170191461250434024L;
+
+ /**
+ * Logger.
+ */
+ protected static final Logger LOG = LoggerFactory.getLogger(AbstractSearchResultPanel.class);
+
+ /**
+ * Edit modal window height.
+ */
+ private final static int EDIT_MODAL_WIN_HEIGHT = 550;
+
+ /**
+ * Edit modal window width.
+ */
+ private final static int EDIT_MODAL_WIN_WIDTH = 800;
+
+ /**
+ * Schemas to be shown modal window height.
+ */
+ private final static int DISPLAYATTRS_MODAL_WIN_HEIGHT = 550;
+
+ /**
+ * Schemas to be shown modal window width.
+ */
+ private final static int DISPLAYATTRS_MODAL_WIN_WIDTH = 550;
+
+ /**
+ * Schemas to be shown modal window height.
+ */
+ private final static int STATUS_MODAL_WIN_HEIGHT = 500;
+
+ /**
+ * Schemas to be shown modal window width.
+ */
+ private final static int STATUS_MODAL_WIN_WIDTH = 700;
+
+ /**
+ * Application preferences.
+ */
+ @SpringBean
+ protected PreferenceManager prefMan;
+
+ /**
+ * Role reader for authorizations management.
+ */
+ @SpringBean
+ protected XMLRolesReader xmlRolesReader;
+
+ protected final AbstractSubjectRestClient restClient;
+
+ /**
+ * Number of rows per page.
+ */
+ private final int rows;
+
+ /**
+ * Container used to refresh table.
+ */
+ protected final WebMarkupContainer container;
+
+ /**
+ * Feedback panel specified by the caller.
+ */
+ protected final NotificationPanel feedbackPanel;
+
+ /**
+ * Specify if results are about a filtered search or not. Using this attribute it is possible to use this panel to
+ * show results about user list and user search.
+ */
+ private final boolean filtered;
+
+ /**
+ * Filter used in case of filtered search.
+ */
+ private String fiql;
+
+ /**
+ * Result table.
+ */
+ private AjaxDataTablePanel<AbstractAttributableTO, String> resultTable;
+
+ /**
+ * Data provider used to search for users.
+ */
+ private AttributableDataProvider dataProvider;
+
+ /**
+ * Modal window to be used for user profile editing. Global visibility is required ...
+ */
+ protected final ModalWindow editmodal = new ModalWindow("editModal");
+
+ /**
+ * Modal window to be used for attributes choosing to display in tables.
+ */
+ protected final ModalWindow displaymodal = new ModalWindow("displayModal");
+
+ /**
+ * Modal window to be used for user status management.
+ */
+ protected final ModalWindow statusmodal = new ModalWindow("statusModal");
+
+ /**
+ * Owner page.
+ */
+ protected final AbstractBasePage page;
+
+ protected <T extends AbstractAttributableTO> AbstractSearchResultPanel(final String id, final boolean filtered,
+ final String fiql, final PageReference pageRef, final AbstractSubjectRestClient restClient) {
+
+ super(id);
+
+ setOutputMarkupId(true);
+
+ this.page = (AbstractBasePage) pageRef.getPage();
+
+ this.filtered = filtered;
+ this.fiql = fiql;
+ this.feedbackPanel = page.getFeedbackPanel();
+
+ this.restClient = restClient;
+
+ editmodal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editmodal.setInitialHeight(EDIT_MODAL_WIN_HEIGHT);
+ editmodal.setInitialWidth(EDIT_MODAL_WIN_WIDTH);
+ editmodal.setCookieName("edit-modal");
+ add(editmodal);
+
+ displaymodal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ displaymodal.setInitialHeight(DISPLAYATTRS_MODAL_WIN_HEIGHT);
+ displaymodal.setInitialWidth(DISPLAYATTRS_MODAL_WIN_WIDTH);
+ displaymodal.setCookieName("display-modal");
+ add(displaymodal);
+
+ statusmodal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ statusmodal.setInitialHeight(STATUS_MODAL_WIN_HEIGHT);
+ statusmodal.setInitialWidth(STATUS_MODAL_WIN_WIDTH);
+ statusmodal.setCookieName("status-modal");
+ add(statusmodal);
+
+ // Container for user search result
+ container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+ add(container);
+
+ rows = prefMan.getPaginatorRows(getRequest(), Constants.PREF_USERS_PAGINATOR_ROWS);
+ }
+
+ protected void initResultTable() {
+ // ---------------------------
+ // Result table initialization
+ // ---------------------------
+ updateResultTable(false);
+ // ---------------------------
+
+ // ---------------------------
+ // Rows-per-page selector
+ // ---------------------------
+ final Form<?> paginatorForm = new Form<>("paginator");
+ container.add(paginatorForm);
+
+ final DropDownChoice<Integer> rowsChooser = new DropDownChoice<>(
+ "rowsChooser", new PropertyModel<Integer>(this, "rows"), prefMan.getPaginatorChoices());
+
+ rowsChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ prefMan.set(getRequest(), getResponse(), Constants.PREF_USERS_PAGINATOR_ROWS, String.valueOf(rows));
+
+ final EventDataWrapper data = new EventDataWrapper();
+ data.setTarget(target);
+ data.setRows(rows);
+
+ send(getParent(), Broadcast.BREADTH, data);
+ }
+ });
+ paginatorForm.add(rowsChooser);
+ // ---------------------------
+
+ setWindowClosedReloadCallback(statusmodal);
+ setWindowClosedReloadCallback(editmodal);
+ setWindowClosedReloadCallback(displaymodal);
+ }
+
+ public void search(final String fiql, final AjaxRequestTarget target) {
+ this.fiql = fiql;
+ dataProvider.setFIQL(fiql);
+ target.add(container);
+ }
+
+ private void updateResultTable(final boolean create) {
+ updateResultTable(create, rows);
+ }
+
+ private void updateResultTable(final boolean create, final int rows) {
+ dataProvider = new AttributableDataProvider(restClient, rows, filtered);
+ dataProvider.setFIQL(fiql);
+
+ final int currentPage = resultTable != null
+ ? (create
+ ? (int) resultTable.getPageCount() - 1
+ : (int) resultTable.getCurrentPage())
+ : 0;
+
+ resultTable = new AjaxDataTablePanel<>(
+ "resultTable",
+ getColumns(),
+ dataProvider,
+ rows,
+ getBulkActions(),
+ restClient,
+ "key",
+ getPageId(),
+ page.getPageReference());
+
+ resultTable.setCurrentPage(currentPage);
+
+ resultTable.setOutputMarkupId(true);
+
+ container.addOrReplace(resultTable);
+ }
+
+ protected abstract List<IColumn<AbstractAttributableTO, String>> getColumns();
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ if (event.getPayload() instanceof EventDataWrapper) {
+ final EventDataWrapper data = (EventDataWrapper) event.getPayload();
+
+ if (data.getRows() < 1) {
+ updateResultTable(data.isCreate());
+ } else {
+ updateResultTable(data.isCreate(), data.getRows());
+ }
+
+ data.getTarget().add(container);
+ }
+ }
+
+ private void setWindowClosedReloadCallback(final ModalWindow window) {
+ window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ final EventDataWrapper data = new EventDataWrapper();
+ data.setTarget(target);
+ data.setRows(rows);
+
+ send(getParent(), Broadcast.BREADTH, data);
+
+ if (page.isModalResult()) {
+ // reset modal result
+ page.setModalResult(false);
+ // set operation succeeded
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ // refresh feedback panel
+ feedbackPanel.refresh(target);
+ }
+ }
+ });
+ }
+
+ public static class EventDataWrapper {
+
+ private AjaxRequestTarget target;
+
+ private boolean create;
+
+ private int rows;
+
+ public AjaxRequestTarget getTarget() {
+ return target;
+ }
+
+ public void setTarget(final AjaxRequestTarget target) {
+ this.target = target;
+ }
+
+ public boolean isCreate() {
+ return create;
+ }
+
+ public void setCreate(boolean create) {
+ this.create = create;
+ }
+
+ public int getRows() {
+ return rows;
+ }
+
+ public void setRows(int rows) {
+ this.rows = rows;
+ }
+ }
+
+ protected abstract <T extends AbstractAttributableTO> Collection<ActionLink.ActionType> getBulkActions();
+
+ protected abstract String getPageId();
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractTasks.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractTasks.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractTasks.java
new file mode 100644
index 0000000..381f878
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractTasks.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import org.apache.syncope.client.console.commons.PreferenceManager;
+import org.apache.syncope.client.console.commons.XMLRolesReader;
+import org.apache.syncope.client.console.rest.TaskRestClient;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public abstract class AbstractTasks extends Panel {
+
+ private static final long serialVersionUID = -1190836516156843561L;
+
+ protected static final String VIEW_TASK_WIN_COOKIE_NAME = "view-task-win";
+
+ protected static final int WIN_HEIGHT = 500;
+
+ protected static final int WIN_WIDTH = 700;
+
+ protected static final String TASKS = "Tasks";
+
+ protected PageReference pageRef;
+
+ @SpringBean
+ protected TaskRestClient restClient;
+
+ @SpringBean
+ protected PreferenceManager prefMan;
+
+ @SpringBean
+ protected XMLRolesReader xmlRolesReader;
+
+ public AbstractTasks(final String id, final PageReference pageRef) {
+ super(id);
+ this.pageRef = pageRef;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/AccountInformationPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AccountInformationPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AccountInformationPanel.java
new file mode 100644
index 0000000..3bc7dd8
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AccountInformationPanel.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.model.Model;
+
+public class AccountInformationPanel extends AnnotatedBeanPanel {
+
+ private static final long serialVersionUID = 4228064224811390808L;
+
+ public <T extends AbstractAttributableTO> AccountInformationPanel(final String id, final UserTO userTO) {
+ super(id, userTO);
+
+ // ------------------------
+ // Change password date
+ // ------------------------
+ add(new Label("changePwdDate", new Model<String>(userTO.getChangePwdDate() == null
+ ? StringUtils.EMPTY
+ : SyncopeSession.get().getDateFormat().format(userTO.getChangePwdDate()))));
+ // ------------------------
+
+ // ------------------------
+ // Last login date
+ // ------------------------
+ add(new Label("lastLoginDate", new Model<String>(userTO.getLastLoginDate() == null
+ ? StringUtils.EMPTY
+ : SyncopeSession.get().getDateFormat().format(userTO.getLastLoginDate()))));
+ // ------------------------
+
+ // ------------------------
+ // Failed logins
+ // ------------------------
+ add(new Label("failedLogins", new Model<Integer>(userTO.getFailedLogins())));
+ // ------------------------
+
+ // ------------------------
+ // Token
+ // ------------------------
+ add(new Label("token", new Model<String>(userTO.getToken() == null
+ ? StringUtils.EMPTY
+ : userTO.getToken())));
+ // ------------------------
+
+ // ------------------------
+ // Token expire time
+ // ------------------------
+ add(new Label("tokenExpireTime", new Model<String>(userTO.getTokenExpireTime() == null
+ ? StringUtils.EMPTY
+ : SyncopeSession.get().getDateFormat().format(userTO.getTokenExpireTime()))));
+ // ------------------------
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java
new file mode 100644
index 0000000..bfade98
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.Collection;
+import java.util.List;
+import org.apache.syncope.client.console.commons.ActionTableCheckGroup;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.CheckGroupColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+
+public class ActionDataTablePanel<T, S> extends DataTablePanel<T, S> {
+
+ private static final long serialVersionUID = -8826989026203543957L;
+
+ private static final String CANCEL = "cancel";
+
+ private final Form<T> bulkActionForm;
+
+ private final ActionLinksPanel actionPanel;
+
+ private final PageReference pageRef;
+
+ public ActionDataTablePanel(
+ final String id,
+ final List<IColumn<T, S>> columns,
+ final ISortableDataProvider<T, S> dataProvider,
+ final int rowsPerPage,
+ final PageReference pageRef) {
+
+ super(id);
+
+ this.pageRef = pageRef;
+
+ bulkActionForm = new Form<T>("groupForm");
+ add(bulkActionForm);
+
+ group = new ActionTableCheckGroup<T>("checkgroup", model) {
+
+ private static final long serialVersionUID = -8667764190925075389L;
+
+ @Override
+ public boolean isCheckable(final T element) {
+ return isElementEnabled(element);
+ }
+ };
+ group.add(new AjaxFormChoiceComponentUpdatingBehavior() {
+
+ private static final long serialVersionUID = -151291731388673682L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ // triggers AJAX form submit
+ }
+ });
+ bulkActionForm.add(group);
+
+ columns.add(0, new CheckGroupColumn<T, S>(group));
+ dataTable = new AjaxFallbackDefaultDataTable<T, S>("dataTable", columns, dataProvider, rowsPerPage);
+ group.add(dataTable);
+
+ final WebMarkupContainer actionPanelContainer = new WebMarkupContainer("actionPanelContainer");
+ bulkActionForm.add(actionPanelContainer);
+
+ actionPanel = new ActionLinksPanel("actions", new Model(), pageRef);
+ actionPanelContainer.add(actionPanel);
+
+ if (dataTable.getRowCount() == 0) {
+ actionPanelContainer.add(new AttributeModifier("style", "display: none"));
+ }
+
+ bulkActionForm.add(new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), pageRef) {
+
+ private static final long serialVersionUID = -2341391430136818025L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ // ignore
+ }
+ }.setVisible(false).setEnabled(false));
+ }
+
+ public void addAction(final ActionLink action, final ActionType type, final String pageId) {
+ actionPanel.add(action, type, pageId);
+ }
+
+ public void addAction(final ActionLink action, final ActionType type, final String pageId, final String actionId) {
+ actionPanel.add(action, type, pageId, actionId);
+ }
+
+ public void addAction(final ActionLink action, final ActionType type, final String pageId, final boolean enabled) {
+ actionPanel.add(action, type, pageId, enabled);
+ }
+
+ public void addCancelButton(final ModalWindow window) {
+
+ final AjaxButton cancel = new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), pageRef) {
+
+ private static final long serialVersionUID = -2341391430136818025L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+ }.feedbackPanelAutomaticReload(false);
+
+ cancel.setDefaultFormProcessing(false);
+ bulkActionForm.addOrReplace(cancel);
+ }
+
+ public Collection<T> getModelObject() {
+ return group.getModelObject();
+ }
+
+ public boolean isElementEnabled(final T element) {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java
new file mode 100644
index 0000000..563bd17
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.Collection;
+import java.util.List;
+import org.apache.syncope.client.console.rest.BaseRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.panels.AbstractSearchResultPanel.EventDataWrapper;
+import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.CheckGroupColumn;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.client.console.pages.BulkActionModalPage;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
+import org.apache.wicket.markup.html.form.CheckGroup;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Fragment;
+
+public class AjaxDataTablePanel<T, S> extends DataTablePanel<T, S> {
+
+ private static final long serialVersionUID = -7264400471578272966L;
+
+ public AjaxDataTablePanel(
+ final String id,
+ final List<IColumn<T, S>> columns,
+ final ISortableDataProvider<T, S> dataProvider,
+ final int rowsPerPage,
+ final Collection<ActionLink.ActionType> actions,
+ final BaseRestClient bulkActionExecutor,
+ final String itemIdField,
+ final String pageId,
+ final PageReference pageRef) {
+
+ super(id);
+
+ final ModalWindow bulkModalWin = new ModalWindow("bulkModal");
+ bulkModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ bulkModalWin.setInitialHeight(600);
+ bulkModalWin.setInitialWidth(900);
+ bulkModalWin.setCookieName("bulk-modal");
+ add(bulkModalWin);
+
+ bulkModalWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487149L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ final EventDataWrapper data = new EventDataWrapper();
+ data.setTarget(target);
+ data.setRows(rowsPerPage);
+
+ send(pageRef.getPage(), Broadcast.BREADTH, data);
+
+ final AbstractBasePage page = (AbstractBasePage) pageRef.getPage();
+
+ if (page.isModalResult()) {
+ // reset modal result
+ page.setModalResult(false);
+ // set operation succeeded
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ // refresh feedback panel
+ target.add(page.getFeedbackPanel());
+ }
+ }
+ });
+
+ Fragment fragment = new Fragment("tablePanel", "bulkAvailable", this);
+ add(fragment);
+
+ Form<T> bulkActionForm = new Form<>("groupForm");
+ fragment.add(bulkActionForm);
+
+ group = new CheckGroup<>("checkgroup", model);
+ group.add(new AjaxFormChoiceComponentUpdatingBehavior() {
+
+ private static final long serialVersionUID = -151291731388673682L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ // triggers AJAX form submit
+ }
+ });
+ bulkActionForm.add(group);
+
+ columns.add(0, new CheckGroupColumn<T, S>(group));
+ dataTable = new AjaxFallbackDefaultDataTable<>("dataTable", columns, dataProvider, rowsPerPage);
+ group.add(dataTable);
+
+ fragment.add(new ClearIndicatingAjaxButton("bulkActionLink", bulkActionForm, pageRef) {
+
+ private static final long serialVersionUID = 382302811235019988L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ bulkModalWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690941L;
+
+ @Override
+ public Page createPage() {
+ return new BulkActionModalPage<>(
+ bulkModalWin,
+ group.getModelObject(),
+ columns,
+ actions,
+ bulkActionExecutor,
+ itemIdField,
+ pageId);
+ }
+ });
+
+ bulkModalWin.show(target);
+ }
+ });
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/AnnotatedBeanPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnnotatedBeanPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnnotatedBeanPanel.java
new file mode 100644
index 0000000..714cb5f
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnnotatedBeanPanel.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import org.apache.syncope.client.console.SyncopeSession;
+import org.apache.syncope.common.lib.to.AbstractAnnotatedBean;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
+
+public class AnnotatedBeanPanel extends Panel {
+
+ private static final long serialVersionUID = 4228064224811390809L;
+
+ public <T extends AbstractAttributableTO> AnnotatedBeanPanel(
+ final String id, final AbstractAnnotatedBean sysInfoTO) {
+
+ super(id);
+
+ // ------------------------
+ // Creation date
+ // ------------------------
+ add(new Label("creationDate", new Model<String>(sysInfoTO.getCreationDate() != null
+ ? SyncopeSession.get().getDateFormat().format(sysInfoTO.getCreationDate()) : "")));
+ // ------------------------
+
+ // ------------------------
+ // Last change date
+ // ------------------------
+ add(new Label("lastChangeDate", new Model<String>(sysInfoTO.getLastChangeDate() != null
+ ? SyncopeSession.get().getDateFormat().format(sysInfoTO.getCreationDate()) : "")));
+ // ------------------------
+
+ // ------------------------
+ // Creator
+ // ------------------------
+ add(new Label("creator", new Model<String>(sysInfoTO.getCreator() != null
+ ? sysInfoTO.getCreator() : "")));
+ // ------------------------
+
+ // ------------------------
+ // Last modifier
+ // ------------------------
+ add(new Label("lastModifier", new Model<String>(sysInfoTO.getLastModifier() != null
+ ? sysInfoTO.getLastModifier() : "")));
+ // ------------------------
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/AttrTemplatesPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AttrTemplatesPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AttrTemplatesPanel.java
new file mode 100644
index 0000000..1601ca7
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AttrTemplatesPanel.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.SelectChoiceRenderer;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.NonI18nPalette;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.extensions.markup.html.form.palette.component.Recorder;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.util.ListModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class AttrTemplatesPanel extends Panel {
+
+ public enum Type {
+
+ rPlainAttrTemplates,
+ rDerAttrTemplates,
+ rVirAttrTemplates,
+ mPlainAttrTemplates,
+ mDerAttrTemplates,
+ mVirAttrTemplates;
+
+ }
+
+ private static final long serialVersionUID = 1016028222120619000L;
+
+ @SpringBean
+ private SchemaRestClient schemaRestClient;
+
+ private final RoleTO roleTO;
+
+ private final NonI18nPalette<String> rPlainAttrTemplates;
+
+ private final NonI18nPalette<String> rDerAttrTemplates;
+
+ private final NonI18nPalette<String> rVirAttrTemplates;
+
+ public AttrTemplatesPanel(final String id, final RoleTO roleTO) {
+ super(id);
+ this.roleTO = roleTO;
+
+ rPlainAttrTemplates = buildPalette(Type.rPlainAttrTemplates,
+ schemaRestClient.getSchemaNames(AttributableType.ROLE, SchemaType.PLAIN));
+ this.add(rPlainAttrTemplates);
+ rDerAttrTemplates = buildPalette(Type.rDerAttrTemplates,
+ schemaRestClient.getSchemaNames(AttributableType.ROLE, SchemaType.DERIVED));
+ this.add(rDerAttrTemplates);
+ rVirAttrTemplates = buildPalette(Type.rVirAttrTemplates,
+ schemaRestClient.getSchemaNames(AttributableType.ROLE, SchemaType.VIRTUAL));
+ this.add(rVirAttrTemplates);
+
+ this.add(buildPalette(Type.mPlainAttrTemplates,
+ schemaRestClient.getSchemaNames(AttributableType.MEMBERSHIP, SchemaType.PLAIN)));
+ this.add(buildPalette(Type.mDerAttrTemplates,
+ schemaRestClient.getSchemaNames(AttributableType.MEMBERSHIP, SchemaType.DERIVED)));
+ this.add(buildPalette(Type.mVirAttrTemplates,
+ schemaRestClient.getSchemaNames(AttributableType.MEMBERSHIP, SchemaType.VIRTUAL)));
+ }
+
+ private NonI18nPalette<String> buildPalette(final Type type, final List<String> allSchemas) {
+ if (allSchemas != null && !allSchemas.isEmpty()) {
+ Collections.sort(allSchemas);
+ }
+ ListModel<String> availableSchemas = new ListModel<>(allSchemas);
+
+ return new NonI18nPalette<String>(type.name(), new PropertyModel<List<String>>(roleTO, type.name()),
+ availableSchemas, new SelectChoiceRenderer<String>(), 8, false, true) {
+
+ private static final long serialVersionUID = 2295567122085510330L;
+
+ @Override
+ protected Recorder<String> newRecorderComponent() {
+ final Recorder<String> recorder = super.newRecorderComponent();
+
+ switch (type) {
+ case rPlainAttrTemplates:
+ case rDerAttrTemplates:
+ case rVirAttrTemplates:
+ recorder.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ send(getPage(), Broadcast.BREADTH, new RoleAttrTemplatesChange(type, target));
+ }
+ });
+ break;
+
+ default:
+ }
+
+ return recorder;
+ }
+ };
+ }
+
+ public Collection<String> getSelected(final Type type) {
+ Collection<String> selected;
+ switch (type) {
+ case rPlainAttrTemplates:
+ selected = this.rPlainAttrTemplates.getModelCollection();
+ break;
+
+ case rDerAttrTemplates:
+ selected = this.rDerAttrTemplates.getModelCollection();
+ break;
+
+ case rVirAttrTemplates:
+ selected = this.rVirAttrTemplates.getModelCollection();
+ break;
+
+ default:
+ selected = Collections.emptyList();
+ }
+
+ return selected;
+ }
+
+ public static class RoleAttrTemplatesChange {
+
+ private final Type type;
+
+ private final AjaxRequestTarget target;
+
+ public RoleAttrTemplatesChange(final Type type, final AjaxRequestTarget target) {
+ this.type = type;
+ this.target = target;
+ }
+
+ public Type getType() {
+ return type;
+ }
+
+ public AjaxRequestTarget getTarget() {
+ return target;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/DataTablePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/DataTablePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/DataTablePanel.java
new file mode 100644
index 0000000..a5f6588
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/DataTablePanel.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import org.apache.wicket.Component;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.DataGridView;
+import org.apache.wicket.markup.html.form.CheckGroup;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class DataTablePanel<T, S> extends Panel {
+
+ private static final long serialVersionUID = -7264400471578272966L;
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(DataTablePanel.class);
+
+ protected CheckGroup<T> group;
+
+ protected AjaxFallbackDefaultDataTable<T, S> dataTable;
+
+ protected IModel<Collection<T>> model;
+
+ public DataTablePanel(final String id) {
+ super(id);
+
+ model = new IModel<Collection<T>>() {
+
+ private static final long serialVersionUID = 4886729136344643465L;
+
+ private Collection<T> values = new HashSet<T>();
+
+ @Override
+ public Collection<T> getObject() {
+ // Someone or something call this method to change the model: this is not the right behavior.
+ // Return a copy of the model object in order to avoid SYNCOPE-465
+ return new HashSet<T>(values);
+ }
+
+ @Override
+ public void setObject(final Collection<T> selected) {
+ final Collection<T> all = getGroupModelObjects();
+ values.removeAll(all);
+ values.addAll(selected);
+ }
+
+ @Override
+ public void detach() {
+ }
+ };
+ }
+
+ public final void setCurrentPage(final long page) {
+ dataTable.setCurrentPage(page);
+ }
+
+ public final long getRowCount() {
+ return dataTable.getRowCount();
+ }
+
+ public final long getCurrentPage() {
+ return dataTable.getCurrentPage();
+ }
+
+ public final long getPageCount() {
+ return dataTable.getPageCount();
+ }
+
+ public void setItemsPerPage(final int resourcePaginatorRows) {
+ dataTable.setItemsPerPage(resourcePaginatorRows);
+ }
+
+ protected Collection<T> getGroupModelObjects() {
+ final Set<T> res = new HashSet<T>();
+
+ final Component rows = group.get("dataTable:body:rows");
+ if (rows instanceof DataGridView) {
+ @SuppressWarnings("unchecked")
+ final Iterator<Item<T>> iter = ((DataGridView<T>) rows).getItems();
+
+ while (iter.hasNext()) {
+ res.add(iter.next().getModelObject());
+ }
+ }
+ return res;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/DerAttrsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/DerAttrsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/DerAttrsPanel.java
new file mode 100644
index 0000000..d68038f
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/DerAttrsPanel.java
@@ -0,0 +1,206 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.AttrTemplatesPanel.RoleAttrTemplatesChange;
+import org.apache.syncope.client.console.rest.RoleRestClient;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDecoratedCheckbox;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.MembershipTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.attributes.AjaxCallListener;
+import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
+import org.apache.wicket.ajax.attributes.IAjaxCallListener;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class DerAttrsPanel extends Panel {
+
+ private static final long serialVersionUID = -5387344116983102292L;
+
+ @SpringBean
+ private SchemaRestClient schemaRestClient;
+
+ @SpringBean
+ private RoleRestClient roleRestClient;
+
+ private final AttrTemplatesPanel attrTemplates;
+
+ public <T extends AbstractAttributableTO> DerAttrsPanel(final String id, final T entityTO) {
+ this(id, entityTO, null);
+ }
+
+ public <T extends AbstractAttributableTO> DerAttrsPanel(final String id, final T entityTO,
+ final AttrTemplatesPanel attrTemplates) {
+
+ super(id);
+ this.attrTemplates = attrTemplates;
+ setOutputMarkupId(true);
+
+ final IModel<List<String>> derSchemas = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ List<String> derSchemaNames;
+
+ if (entityTO instanceof RoleTO) {
+ final RoleTO roleTO = (RoleTO) entityTO;
+
+ if (attrTemplates == null) {
+ derSchemaNames = roleTO.getRDerAttrTemplates();
+ } else {
+ derSchemaNames = new ArrayList<>(
+ attrTemplates.getSelected(AttrTemplatesPanel.Type.rDerAttrTemplates));
+ if (roleTO.isInheritTemplates() && roleTO.getParent() != 0) {
+ derSchemaNames.addAll(roleRestClient.read(roleTO.getParent()).getRDerAttrTemplates());
+ }
+ }
+ } else if (entityTO instanceof UserTO) {
+ derSchemaNames = schemaRestClient.getDerSchemaNames(AttributableType.USER);
+ } else {
+ derSchemaNames = roleRestClient.read(((MembershipTO) entityTO).getRoleId()).getMDerAttrTemplates();
+ }
+
+ return derSchemaNames;
+ }
+ };
+
+ final WebMarkupContainer attributesContainer = new WebMarkupContainer("derAttrContainer");
+
+ attributesContainer.setOutputMarkupId(true);
+ add(attributesContainer);
+
+ AjaxButton addAttributeBtn = new IndicatingAjaxButton("addAttributeBtn", new ResourceModel("addAttributeBtn")) {
+
+ private static final long serialVersionUID = -4804368561204623354L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ entityTO.getDerAttrs().add(new AttrTO());
+ target.add(attributesContainer);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ target.add(attributesContainer);
+ }
+ };
+ add(addAttributeBtn.setDefaultFormProcessing(false));
+
+ ListView<AttrTO> attributes = new ListView<AttrTO>("attrs",
+ new PropertyModel<List<? extends AttrTO>>(entityTO, "derAttrs")) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ protected void populateItem(final ListItem<AttrTO> item) {
+ final AttrTO attributeTO = item.getModelObject();
+
+ item.add(new AjaxDecoratedCheckbox("toRemove", new Model<>(Boolean.FALSE)) {
+
+ private static final long serialVersionUID = 7170946748485726506L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ entityTO.getDerAttrs().remove(attributeTO);
+ target.add(attributesContainer);
+ }
+
+ @Override
+ protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
+ super.updateAjaxAttributes(attributes);
+
+ IAjaxCallListener ajaxCallListener = new AjaxCallListener() {
+
+ private static final long serialVersionUID = 7160235486520935153L;
+
+ @Override
+ public CharSequence getPrecondition(final Component component) {
+ return "if (!confirm('" + getString("confirmDelete") + "')) return false;";
+ }
+ };
+ attributes.getAjaxCallListeners().add(ajaxCallListener);
+ }
+ });
+
+ final DropDownChoice<String> schemaChoice = new DropDownChoice<String>("schema",
+ new PropertyModel<String>(attributeTO, "schema"), derSchemas);
+ schemaChoice.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_BLUR) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ attributeTO.setSchema(schemaChoice.getModelObject());
+ }
+ });
+ schemaChoice.setRequired(true);
+ schemaChoice.setOutputMarkupId(true);
+ schemaChoice.setRequired(true);
+ item.add(schemaChoice);
+
+ final List<String> values = attributeTO.getValues();
+ if (values == null || values.isEmpty()) {
+ item.add(new TextField<String>("value",
+ new Model<String>(null)).setVisible(false));
+ } else {
+ item.add(new TextField<String>("value",
+ new Model<String>(values.get(0))).setEnabled(false));
+ }
+ }
+ };
+ attributesContainer.add(attributes);
+ }
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ if ((event.getPayload() instanceof RoleAttrTemplatesChange)) {
+ final RoleAttrTemplatesChange update = (RoleAttrTemplatesChange) event.getPayload();
+ if (attrTemplates != null && update.getType() == AttrTemplatesPanel.Type.rDerAttrTemplates) {
+ update.getTarget().add(this);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/EventSelectionPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/EventSelectionPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/EventSelectionPanel.java
new file mode 100644
index 0000000..5332cb5
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/EventSelectionPanel.java
@@ -0,0 +1,243 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.wicket.markup.html.list.AltListView;
+import org.apache.syncope.common.lib.to.EventCategoryTO;
+import org.apache.syncope.common.lib.types.AuditElements;
+import org.apache.syncope.common.lib.types.AuditLoggerName;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Check;
+import org.apache.wicket.markup.html.form.CheckGroup;
+import org.apache.wicket.markup.html.form.CheckGroupSelector;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class EventSelectionPanel extends Panel {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(EventSelectionPanel.class);
+
+ private static final long serialVersionUID = 752233163798301002L;
+
+ private final Set<String> selected = new HashSet<String>();
+
+ public EventSelectionPanel(
+ final String id, final EventCategoryTO eventCategoryTO, final IModel<List<String>> model) {
+ super(id);
+ setOutputMarkupId(true);
+
+ final List<String> events = getEvents(eventCategoryTO);
+
+ // needed to avoid model reset: model have to be managed into SelectedEventsPanel
+ selected.addAll(model.getObject());
+
+ final CheckGroup<String> successGroup = new CheckGroup<String>(
+ "successGroup",
+ selected);
+
+ successGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {
+
+ private static final long serialVersionUID = -151291731388673682L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+
+ final Set<String> toBeRemoved = new HashSet<>();
+ final Set<String> toBeAdded = new HashSet<>();
+
+ for (String event : getEvents(eventCategoryTO)) {
+ final String eventString = AuditLoggerName.buildEvent(
+ eventCategoryTO.getType(),
+ eventCategoryTO.getCategory(),
+ eventCategoryTO.getSubcategory(),
+ event,
+ AuditElements.Result.SUCCESS);
+
+ if (successGroup.getModelObject().contains(eventString)) {
+ toBeAdded.add(eventString);
+ } else {
+ toBeRemoved.add(eventString);
+ }
+ }
+
+ send(EventSelectionPanel.this.getPage(), Broadcast.BREADTH,
+ new SelectedEventsPanel.EventSelectionChanged(target, toBeAdded, toBeRemoved));
+ }
+ });
+
+ successGroup.setVisible(!events.isEmpty());
+ add(successGroup);
+
+ add(new Label("successLabel", new ResourceModel("Success", "Success"))).setVisible(!events.isEmpty());
+
+ final CheckGroupSelector successSelector = new CheckGroupSelector("successSelector", successGroup);
+ successSelector.setVisible(!events.isEmpty());
+ add(successSelector);
+
+ final ListView<String> categoryView = new AltListView<String>("categoryView", events) {
+
+ private static final long serialVersionUID = 4949588177564901031L;
+
+ @Override
+ protected void populateItem(final ListItem<String> item) {
+ final String subcategory = item.getModelObject();
+
+ item.add(new Label("subcategory", new ResourceModel(subcategory, subcategory)));
+ }
+ };
+ add(categoryView);
+
+ final ListView<String> successView = new AltListView<String>("successView", events) {
+
+ private static final long serialVersionUID = 4949588177564901031L;
+
+ @Override
+ protected void populateItem(final ListItem<String> item) {
+ final String event = item.getModelObject();
+
+ final Check<String> successCheck = new Check<>("successCheck",
+ new Model<String>(AuditLoggerName.buildEvent(
+ eventCategoryTO.getType(),
+ eventCategoryTO.getCategory(),
+ eventCategoryTO.getSubcategory(),
+ event,
+ AuditElements.Result.SUCCESS)),
+ successGroup);
+ item.add(successCheck);
+ }
+ };
+ successGroup.add(successView);
+
+ final CheckGroup<String> failureGroup = new CheckGroup<String>(
+ "failureGroup",
+ selected);
+
+ failureGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {
+
+ private static final long serialVersionUID = -151291731388673682L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+
+ final Set<String> toBeRemoved = new HashSet<>();
+ final Set<String> toBeAdded = new HashSet<>();
+
+ for (String event : getEvents(eventCategoryTO)) {
+ final String eventString = AuditLoggerName.buildEvent(
+ eventCategoryTO.getType(),
+ eventCategoryTO.getCategory(),
+ eventCategoryTO.getSubcategory(),
+ event,
+ AuditElements.Result.FAILURE);
+
+ if (failureGroup.getModelObject().contains(eventString)) {
+ toBeAdded.add(eventString);
+ } else {
+ toBeRemoved.add(eventString);
+ }
+ }
+
+ send(EventSelectionPanel.this.getPage(), Broadcast.BREADTH,
+ new SelectedEventsPanel.EventSelectionChanged(target, toBeAdded, toBeRemoved));
+ }
+ });
+
+ failureGroup.setVisible(!events.isEmpty());
+ add(failureGroup);
+
+ add(new Label("failureLabel", new ResourceModel("Failure", "Failure"))).setVisible(!events.isEmpty());
+
+ final CheckGroupSelector failureSelector = new CheckGroupSelector("failureSelector", failureGroup);
+ failureSelector.setVisible(!events.isEmpty());
+ add(failureSelector);
+
+ final ListView<String> failureView = new AltListView<String>("failureView", events) {
+
+ private static final long serialVersionUID = 4949588177564901031L;
+
+ @Override
+ protected void populateItem(final ListItem<String> item) {
+ final String event = item.getModelObject();
+
+ final Check<String> failureCheck = new Check<>("failureCheck",
+ new Model<String>(AuditLoggerName.buildEvent(
+ eventCategoryTO.getType(),
+ eventCategoryTO.getCategory(),
+ eventCategoryTO.getSubcategory(),
+ event,
+ AuditElements.Result.FAILURE)),
+ failureGroup);
+ item.add(failureCheck);
+ }
+ };
+ failureGroup.add(failureView);
+ }
+
+ private List<String> getEvents(final EventCategoryTO eventCategoryTO) {
+ final List<String> res;
+
+ res = eventCategoryTO.getEvents();
+
+ if (res.isEmpty()) {
+ if ((AuditElements.EventCategoryType.PROPAGATION == eventCategoryTO.getType()
+ || AuditElements.EventCategoryType.SYNCHRONIZATION == eventCategoryTO.getType()
+ || AuditElements.EventCategoryType.PUSH == eventCategoryTO.getType())
+ && StringUtils.isEmpty(eventCategoryTO.getCategory())) {
+ res.add(eventCategoryTO.getType().toString());
+ } else if (AuditElements.EventCategoryType.TASK == eventCategoryTO.getType()
+ && StringUtils.isNotEmpty(eventCategoryTO.getCategory())) {
+ res.add(eventCategoryTO.getCategory());
+ }
+ } else {
+ Collections.sort(res);
+ }
+
+ return res;
+ }
+
+ /**
+ * To be extended in order to add actions on events.
+ *
+ * @param event event.
+ */
+ protected abstract void onEventAction(final IEvent<?> event);
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ onEventAction(event);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/ImagePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ImagePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ImagePanel.java
new file mode 100644
index 0000000..7969c63
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ImagePanel.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.behavior.Behavior;
+import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.request.resource.ContextRelativeResource;
+
+public class ImagePanel extends Panel {
+
+ private static final long serialVersionUID = 5564818820574092960L;
+
+ final Image img;
+
+ public ImagePanel(final String id, final ContextRelativeResource img) {
+ super(id);
+ this.img = new Image("img", img);
+ add(this.img);
+ }
+
+ @Override
+ public Component add(final Behavior... behaviors) {
+ this.img.add(behaviors);
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/JQueryUITabbedPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/JQueryUITabbedPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/JQueryUITabbedPanel.java
new file mode 100644
index 0000000..d898ba6
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/JQueryUITabbedPanel.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.List;
+import org.apache.wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel;
+import org.apache.wicket.extensions.markup.html.tabs.ITab;
+
+/**
+ * AjaxTabbedPanel with JQueryUI styling.
+ */
+public class JQueryUITabbedPanel<T extends ITab> extends AjaxTabbedPanel<T> {
+
+ private static final long serialVersionUID = -5059184710433341333L;
+
+ public JQueryUITabbedPanel(final String id, final List<T> tabs) {
+ super(id, tabs);
+ }
+
+ @Override
+ protected String getTabContainerCssClass() {
+ return "";
+ }
+
+ @Override
+ protected String getSelectedTabCssClass() {
+ return "ui-state-active selected";
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/LayoutsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/LayoutsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/LayoutsPanel.java
new file mode 100644
index 0000000..26f1894
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/LayoutsPanel.java
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.List;
+import org.apache.syncope.client.console.commons.AttrLayoutType;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.SelectChoiceRenderer;
+import org.apache.syncope.client.console.commons.XMLRolesReader;
+import org.apache.syncope.client.console.rest.ConfigurationRestClient;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.model.util.ListModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LayoutsPanel extends Panel {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(LayoutsPanel.class);
+
+ private static final long serialVersionUID = -6804066913177804275L;
+
+ private static final String CANCEL = "cancel";
+
+ private static final String APPLY = "apply";
+
+ @SpringBean
+ protected XMLRolesReader xmlRolesReader;
+
+ @SpringBean
+ private SchemaRestClient schemaRestClient;
+
+ @SpringBean
+ private ConfigurationRestClient confRestClient;
+
+ @SuppressWarnings("unchecked")
+ public LayoutsPanel(final String id, final AttrLayoutType attrLayoutType, final NotificationPanel feedbackPanel) {
+ super(id);
+
+ final WebMarkupContainer container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+
+ final Form<String> form = new Form<String>("form");
+ form.setOutputMarkupId(true);
+
+ final AttrTO attrLayout = confRestClient.readAttrLayout(attrLayoutType);
+ form.setModel(new CompoundPropertyModel(attrLayout.getValues()));
+
+ final List<String> fields = schemaRestClient.getPlainSchemaNames(attrLayoutType.getAttrType());
+ final ListModel<String> selectedFields =
+ new ListModel<String>(attrLayout.getValues().isEmpty() ? fields : attrLayout.getValues());
+ final ListModel<String> availableFields = new ListModel<String>(fields);
+
+ form.add(new AjaxPalettePanel<String>("fields", selectedFields, availableFields,
+ new SelectChoiceRenderer<String>(), true, true));
+
+ final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(APPLY)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ try {
+ confRestClient.set(attrLayout);
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (Exception e) {
+ LOG.error("While saving layout configuration", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ }
+ feedbackPanel.refresh(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ error(getString(Constants.ERROR) + ": While saving layout configuration");
+ feedbackPanel.refresh(target);
+ }
+ };
+
+ form.add(submit);
+
+ final IndicatingAjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ target.add(container);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ }
+ };
+
+ cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
+ container.add(form);
+ add(container);
+ }
+}
[19/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/SyncTasksPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SyncTasksPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SyncTasksPanel.properties
new file mode 100644
index 0000000..497da5a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SyncTasksPanel.properties
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Id
+name=Name
+description=Description
+resourceName=Resource Name
+lastExec=Last Execution
+nextExec=Next Execution
+detail=Detail
+delete=Delete
+edit=Edit
+execute=Execute
+executeDryRun=Dry run
+userTemplate=User template
+latestExecStatus=Last status
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/SyncTasksPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SyncTasksPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SyncTasksPanel_it.properties
new file mode 100644
index 0000000..abb82a4
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SyncTasksPanel_it.properties
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Id
+name=Nome
+description=Descrizione
+resourceName=Nome Risorsa
+lastExec=Ultima Esecuzione
+nextExec=Prossima Esecuzione
+detail=Dettagli
+delete=Rimuovi
+edit=Modifica
+execute=Esegui
+executeDryRun=Esecuzione simulata
+userTemplate=Modello utente
+latestExecStatus=Ultimo stato
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/SyncTasksPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SyncTasksPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SyncTasksPanel_pt_BR.properties
new file mode 100644
index 0000000..054af39
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SyncTasksPanel_pt_BR.properties
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+id=Identificador
+name=Nome
+description=Descri\u00e7\u00e3o
+resourceName=Nome do Recurso
+lastExec=\u00daltima Execu\u00e7\u00e3o
+nextExec=Pr\u00f3xima Execu\u00e7\u00e3o
+detail=Detalhe
+delete=Remove
+edit=Alterar
+execute=Executar
+executeDryRun=Executar (Ensaio)
+userTemplate=Usar Template
+latestExecStatus=\u00daltimo Estatus
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel.html
new file mode 100644
index 0000000..3f54a1a
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel.html
@@ -0,0 +1,71 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <wicket:message key="username"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="username"/>
+ <a class="tooltips" wicket:id="usernameQuestionMarkJexlHelp" href="#" alt="Click to help" title="Click to help"><img src="img/help.png"/>
+ <span wicket:id="usernameJexlHelp" class="tooltips">
+ <wicket:message key="jexl_info"/>
+ <ul>
+ <li><wicket:message key="jexl_ex1"/></li>
+ <li><wicket:message key="jexl_ex2"/></li>
+ </ul>
+ <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message key="jexl_syntax_url"/></a>
+ </span>
+ </a>
+ </div>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <wicket:message key="password"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="password"/>
+ <span wicket:id="mandatory_pwd"></span>
+ <a class="tooltips" wicket:id="pwdQuestionMarkJexlHelp" href="#" alt="Click to help" title="Click to help">
+ <img src="img/help.png"/>
+ <span wicket:id="pwdJexlHelp" class="tooltips">
+ <wicket:message key="jexl_info"/>
+ <ul>
+ <li><wicket:message key="jexl_ex1"/></li>
+ <li><wicket:message key="jexl_ex2"/></li>
+ </ul>
+ <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message key="jexl_syntax_url"/></a>
+ </span>
+ </a>
+ </div>
+ </div>
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <span wicket:id="confirmPasswordLabel"/>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="confirmPassword"/>
+ </div>
+ </div>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel.properties
new file mode 100644
index 0000000..f07fe03
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+username=Username
+password=Password
+confirmPassword=Password (confirm)
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel_it.properties
new file mode 100644
index 0000000..741d7dd
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel_it.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+username=Username
+password=Password
+confirmPassword=Password (conferma)
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel_pt_BR.properties
new file mode 100644
index 0000000..9debd26
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDetailsPanel_pt_BR.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+username=Nome do Usu\u00E1rio
+password=Senha
+confirmPassword=Senha (confirmar)
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel.html
new file mode 100644
index 0000000..5b3454e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel.html
@@ -0,0 +1,60 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <table class="ui-widget ui-widget-content ui-corner-all"
+ style="font-size: 1em;margin-top:2px;"
+ width="100%" cellpadding="2px" cellspacing="1px">
+ <thead>
+ <tr class="ui-widget-header">
+ <th><wicket:message key="virAttrToRemove"/></th>
+ <th><wicket:message key="virAttrName"/></th>
+ <th><wicket:message key="virAttrValue"/></th>
+ </tr>
+ </thead>
+
+ <tfoot>
+ <tr>
+ <td>
+ <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="addAttributeBtn" />
+ </td>
+ </tr>
+ </tfoot>
+
+ <tbody wicket:id="virAttrContainer">
+ <tr wicket:id="attrs">
+ <td align="center" valign="top">
+ <input type="checkbox" class="text ui-widget-content ui-corner-all" wicket:id="toRemove"/>
+ </td>
+
+ <td align="center" valign="top">
+ <select class="text ui-widget-content ui-corner-all"
+ style="width:100%" wicket:id="schema"/>
+ </td>
+
+ <td align="center " valign="top">
+ <span wicket:id="values" style="text-align:left;display:block;width:95%">[values]</span>
+ </td>
+
+ </tr>
+ </tbody>
+ </table>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel.properties
new file mode 100644
index 0000000..4f686f7
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+addAttributeBtn=Add
+add=+
+drop=-
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel_it.properties
new file mode 100644
index 0000000..f639bf5
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel_it.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+addAttributeBtn=Aggiungi
+add=+
+drop=-
+
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel_pt_BR.properties
new file mode 100644
index 0000000..bde1908
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirAttrsPanel_pt_BR.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+addAttributeBtn=Adicionar
+add=+
+drop=-
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxGroupSelectorPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxGroupSelectorPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxGroupSelectorPanel.html
new file mode 100644
index 0000000..fde1840
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxGroupSelectorPanel.html
@@ -0,0 +1,21 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:panel>
+ <input wicket:id="groupselector" type="checkbox"/>
+</wicket:panel>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxPanel.html
new file mode 100644
index 0000000..23156a2
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CheckBoxPanel.html
@@ -0,0 +1,23 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <input wicket:id="check" type="checkbox"/>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPanel.html
new file mode 100644
index 0000000..56220a9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPanel.html
@@ -0,0 +1,25 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div id="collection" wicket:id="collection">
+ <span id="item" wicket:id="item"/>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer.properties
new file mode 100644
index 0000000..d41c779
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+selOpt1=Unschedule
+selOpt2=Every 5 minutes
+selOpt3=Fire at 12pm (noon) every day
+selOpt4=Fire at 12am (midnight) every first day of the month
+selOpt5=Fire at 12am (midnight) every last day of the month
+selOpt6=Fire at 12am (midnight) every Monday
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer_it.properties
new file mode 100644
index 0000000..5514ce9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer_it.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+selOpt1=Non schedulato
+selOpt2=Ogni 5 minuti
+selOpt3=Lanciato ogni giorno a mezzanotte
+selOpt4=Lanciato ogni primo giorno del mese a mezzogiorno
+selOpt5=Lanciato ogni ultimo giorno del mese a mezzogiorno
+selOpt6=Lanciato ogni Luned\u00ec a mezzogiorno
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer_pt_BR.properties
new file mode 100644
index 0000000..f621f92
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer_pt_BR.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+selOpt1=N\u00E3o Agendado
+selOpt2=A cada 5 minutos
+selOpt3=Acionar \u00E0s 12\:00 todos os dias
+selOpt4=Acionar \u00E0s 24\:00 sempre no primeiro dia de cada m\u00EAs
+selOpt5=Acionar \u00E0s 24\:00 sempre no \u00FAltimo dia de cada m\u00EAs
+selOpt6=Acionar \u00E0s 24\:00 de toda Segunda Feira
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.html
new file mode 100644
index 0000000..7630854
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.html
@@ -0,0 +1,163 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style>
+ span#actionLink{
+ margin-left: 1px;
+ margin-right: 1px;
+ }
+ </style>
+ </wicket:head>
+ <wicket:panel>
+ <span wicket:id="panelClaim">[plus]</span>
+ <span wicket:id="panelManageResources">[plus]</span>
+ <span wicket:id="panelManageUsers">[plus]</span>
+ <span wicket:id="panelManageRoles">[plus]</span>
+ <span wicket:id="panelDryRun">[plus]</span>
+ <span wicket:id="panelExecute">[plus]</span>
+ <span wicket:id="panelEnable">[plus]</span>
+ <span wicket:id="panelSearch">[plus]</span>
+ <span wicket:id="panelCreate">[plus]</span>
+ <span wicket:id="panelUserTemplate">[plus]</span>
+ <span wicket:id="panelRoleTemplate">[plus]</span>
+ <span wicket:id="panelReset">[plus]</span>
+ <span wicket:id="panelEdit">[plus]</span>
+ <span wicket:id="panelExport">[plus]</span>
+ <span wicket:id="panelDelete">[plus]</span>
+ <span wicket:id="panelSelect">[plus]</span>
+ <span wicket:id="panelSuspend">[plus]</span>
+ <span wicket:id="panelReactivate">[plus]</span>
+ <span wicket:id="panelReload">[plus]</span>
+ <span wicket:id="panelChangeView">[plus]</span>
+ <span wicket:id="panelUnlink">[plus]</span>
+ <span wicket:id="panelLink">[plus]</span>
+ <span wicket:id="panelUnassign">[plus]</span>
+ <span wicket:id="panelAssign">[plus]</span>
+ <span wicket:id="panelDeprovision">[plus]</span>
+ <span wicket:id="panelProvision">[plus]</span>
+
+ <wicket:fragment wicket:id="fragmentClaim">
+ <a href="#" wicket:id="claimLink"><img id="actionLink" src="img/actions/claim.png" alt="claim icon" title="Claim"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentManageResources">
+ <a href="#" wicket:id="manageResourcesLink"><img id="actionLink" src="img/actions/resources-icon.png" alt="manage resources icon" title="Manage resources"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentManageUsers">
+ <a href="#" wicket:id="manageUsersLink"><img id="actionLink" src="img/actions/users-icon.png" alt="manage users icon" title="Manage users"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentManageRoles">
+ <a href="#" wicket:id="manageRolesLink"><img id="actionLink" src="img/actions/roles-icon.png" alt="manage roles icon" title="Manage roles"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentCreate">
+ <a href="#" wicket:id="createLink"><img id="actionLink" src="img/actions/create.png" alt="create icon" title="Create"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentSearch">
+ <a href="#" wicket:id="searchLink"><img id="actionLink" src="img/actions/search.png" alt="search icon" title="Search and modify"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentEnable">
+ <a href="#" wicket:id="enableLink"><img id="actionLink" src="img/actions/enable.png" alt="enable icon" title="Enable / Disable"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentEdit">
+ <a href="#" wicket:id="editLink"><img id="actionLink" src="img/actions/edit.png" alt="edit icon" title="Edit"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentReset">
+ <a href="#" wicket:id="resetLink"><img id="actionLink" src="img/actions/reset.png" alt="reset icon" title="Reset sync token"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentUserTemplate">
+ <a href="#" wicket:id="userTemplateLink"><img id="actionLink" src="img/actions/user_template.png" alt="user template icon" title="Specify user template"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentRoleTemplate">
+ <a href="#" wicket:id="roleTemplateLink"><img id="actionLink" src="img/actions/roles-icon.png" alt="role template icon" title="Specify role template"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentDelete">
+ <a href="#" wicket:id="deleteLink"><img id="actionLink" src="img/actions/delete.png" alt="delete icon" title="Delete"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentDryRun">
+ <a href="#" wicket:id="dryRunLink"><img id="actionLink" src="img/actions/dryrun.png" alt="dryrun icon" title="DryRun"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentExecute">
+ <a href="#" wicket:id="executeLink"><img id="actionLink" src="img/actions/execute.png" alt="execute icon" title="Execute"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentSelect">
+ <a href="#" wicket:id="selectLink"><img id="actionLink" src="img/actions/select.png" alt="select icon" title="Select"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentExport">
+ <a href="#" wicket:id="exportLink"><img id="actionLink" src="img/actions/export.png" alt="export icon" title="Export"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentSuspend">
+ <a href="#" wicket:id="suspendLink"><img id="actionLink" src="img/actions/suspend.png" alt="suspend icon" title="Suspend"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentReactivate">
+ <a href="#" wicket:id="reactivateLink"><img id="actionLink" src="img/actions/reactivate.png" alt="reactivate icon" title="Reactivate"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentReload">
+ <a href="#" wicket:id="reloadLink"><img id="actionLink" src="img/actions/reload.png" alt="reload icon" title="Reload"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentChangeView">
+ <a href="#" wicket:id="changeViewLink"><img id="actionLink" src="img/actions/settings-icon.png" alt="Change view icon" title="Change view"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentUnlink">
+ <a href="#" wicket:id="unlinkLink"><img id="actionLink" src="img/actions/unlink-icon.png" alt="Unlink icon" title="Unlink"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentLink">
+ <a href="#" wicket:id="linkLink"><img id="actionLink" src="img/actions/link-icon.png" alt="Link icon" title="Link"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentUnassign">
+ <a href="#" wicket:id="unassignLink"><img id="actionLink" src="img/actions/unassign-icon.png" alt="Unassign icon" title="Unassign"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentAssign">
+ <a href="#" wicket:id="assignLink"><img id="actionLink" src="img/actions/assign-icon.png" alt="Assign icon" title="Assign"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentDeprovision">
+ <a href="#" wicket:id="deprovisionLink"><img id="actionLink" src="img/actions/deprovision-icon.png" alt="De-provision icon" title="De-provision"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="fragmentProvision">
+ <a href="#" wicket:id="provisionLink"><img id="actionLink" src="img/actions/provision-icon.png" alt="Provision icon" title="Provision"/></a>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="emptyFragment">
+ </wicket:fragment>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.html
new file mode 100644
index 0000000..fc7596f
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.html
@@ -0,0 +1,21 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:extend>
+ <input type="checkbox" class="checkbox" wicket:id="checkboxField"/>
+</wicket:extend>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html
new file mode 100644
index 0000000..12d5bf2
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html
@@ -0,0 +1,24 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <select class="ui-widget-content ui-corner-all medium_dynamicsize"
+ wicket:id="dropDownChoiceField" />
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxNumberFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxNumberFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxNumberFieldPanel.html
new file mode 100644
index 0000000..3a719d1
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxNumberFieldPanel.html
@@ -0,0 +1,22 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:extend>
+ <input type="text" class="ui-widget-content ui-corner-all medium_dynamicsize"
+ wicket:id="numberField" />
+</wicket:extend>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.html
new file mode 100644
index 0000000..1833140
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.html
@@ -0,0 +1,23 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <span wicket:id="paletteField">[Palette]</span>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.html
new file mode 100644
index 0000000..1f7b8f3
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.html
@@ -0,0 +1,22 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:extend>
+ <input type="password" class="ui-widget-content ui-corner-all long_dynamicsize"
+ wicket:id="passwordField" />
+</wicket:extend>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.html
new file mode 100644
index 0000000..e6f1d7c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.html
@@ -0,0 +1,23 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <input type="text" class="ui-widget-content ui-corner-all long_dynamicsize" wicket:id="textField"/>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.html
new file mode 100644
index 0000000..6b2556f
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.html
@@ -0,0 +1,44 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <input style="display: none;" wicket:id="textField"/>
+ <span style="margin-right: 20px;">
+ <div style="display: table-cell;">
+ <form wicket:id="uploadForm" encType="multipart/form-data" method="post" accept-charset="UTF-8">
+ <input wicket:id="fileUpload" type="file"/>
+ <div style="top: -25px; left: 100%; position: relative; vertical-align: middle;">
+ <a href="#" wicket:id="uploadLink"><img src="img/file-upload.png" alt="upload" title="upload" style="vertical-align: middle;"/></a>
+ <a href="#" wicket:id="downloadLink"><img src="img/file-download.png" alt="download" title="download" style="vertical-align: middle;"/></a>
+ <a href="#" wicket:id="resetLink"><img src="img/disable.png" alt="disable" title="remove value" style="vertical-align: middle;"/></a>
+ <span wicket:id="preview"/>
+ </div>
+ <span wicket:id="previewContainer">
+ <span wicket:id="panelPreview">[panelPreview]</span>
+ <wicket:fragment wicket:id="previewFragment">
+ <div wicket:id = "previewer" class="ui-widget-content ui-corner-all"></div>
+ </wicket:fragment>
+ <wicket:fragment wicket:id="emptyFragment">
+ </wicket:fragment>
+ </span>
+ </form>
+ </div>
+ </span>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.html
new file mode 100644
index 0000000..52f1da9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.html
@@ -0,0 +1,23 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html>
+ <wicket:panel>
+ <span wicket:id="checkBoxMultipleChoice" />
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.html
new file mode 100644
index 0000000..caaf991
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.html
@@ -0,0 +1,22 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:extend>
+ <input type="text" class="text ui-widget-content ui-corner-all date_size"
+ wicket:id="field"/>
+</wicket:extend>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.html
new file mode 100644
index 0000000..e3a191b
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.html
@@ -0,0 +1,21 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:extend>
+ <span wicket:id="field"/>
+</wicket:extend>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.properties
new file mode 100644
index 0000000..9a39f4c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+field.DateTimeFieldPanel$DateTimeFormValidator=Field '${label0}' must be fully valued
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_it.properties
new file mode 100644
index 0000000..c524834
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_it.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+field.DateTimeFieldPanel$DateTimeFormValidator=Il campo '${label0}' dev'essere completamente valorizzato
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_pt_BR.properties
new file mode 100644
index 0000000..95be437
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_pt_BR.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+field.DateTimeFieldPanel$DateTimeFormValidator=Campo'${label0}' precisa ser preenchido
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.html
new file mode 100644
index 0000000..55a77e1
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.html
@@ -0,0 +1,34 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head></wicket:head>
+ <wicket:panel>
+
+ <wicket:fragment wicket:id="requiredFragment">
+ <span wicket:id="requiredLabel"/>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="notRequiredFragment">
+ </wicket:fragment>
+
+ <wicket:child />
+
+ <span wicket:id="required"/>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/LinkPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/LinkPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/LinkPanel.html
new file mode 100644
index 0000000..c4b75f0
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/LinkPanel.html
@@ -0,0 +1,23 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:panel>
+ <a href="#" wicket:id="link">
+ <span wicket:id="linkTitle"/>
+ </a>
+</wicket:panel>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MappingPurposePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MappingPurposePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MappingPurposePanel.html
new file mode 100644
index 0000000..963a087
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MappingPurposePanel.html
@@ -0,0 +1,31 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+
+ <a href="#" wicket:id="propagationPurposeLink"><img id="action" src="img/actions/propagation-icon.png" alt="Propagation icon" title="Propagation"/></a>
+
+ <a href="#" wicket:id="synchronizationPurposeLink"><img id="action" src="img/actions/synchronization-icon.png" alt="Synchronization icon" title="Synchronization"/></a>
+
+ <a href="#" wicket:id="bothPurposeLink"><img id="action" src="img/actions/both-icon.png" alt="Both icon" title="Both"/></a>
+
+ <a href="#" wicket:id="nonePurposeLink"><img id="action" src="img/actions/none-icon.png" alt="None icon" title="None"/></a>
+
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
new file mode 100644
index 0000000..2208220
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
@@ -0,0 +1,35 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <span wicket:id="multiValueContainer">
+ <span wicket:id="view">
+ <span wicket:id="panel">[form field]</span>
+ <a wicket:id="drop"><img src="img/minus-icon.png" alt="remove icon" class="drop_button" /></a>
+ <span wicket:id="panelPlus">[plus]</span>
+ <br />
+ </span>
+ <wicket:fragment wicket:id="fragmentPlus">
+ <a wicket:id="add"><img src="img/plus-icon.png" alt="add icon" class="add_button" /></a>
+ </wicket:fragment>
+ <wicket:fragment wicket:id="emptyFragment">
+ </wicket:fragment>
+ </span>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.properties
new file mode 100644
index 0000000..958e9e0
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+minLength=Minimum password size
+maxLength=Maximum password size
+historyLength=Password history length
+digitRequired=Password must contain one or more digits
+prefixesNotPermitted=Password prefixes not permitted
+apply=Save
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel_it.properties
new file mode 100644
index 0000000..398d634
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel_it.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+minLength=Lunghezza minima password
+maxLength=Lunghezza massima password
+historyLength=Lunghezza storico password
+digitRequired=La password deve contenere uno o pi\u00f9 numeri
+prefixesNotPermitted=Prefissi password non permessi
+apply=Salva
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel_pt_BR.properties
new file mode 100644
index 0000000..d4f5693
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel_pt_BR.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+minLength=Tamanho m\u00EDnimo de senha
+maxLength=Tamanho m\u00E1ximo de senha
+historyLength=Tamanho dos hist\u00F3rico de senha
+digitRequired=Senha precisa contar um ou mais d\u00EDgitos
+prefixesNotPermitted=Prefixos de senha n\u00E3o permitidos
+apply=Salvar
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.html
new file mode 100644
index 0000000..5800d77
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.html
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+
+ <div style="display: inline-table;">
+ <input type="hidden" wicket:id="recorder"/>
+
+ <div style="display: table-row">
+ <div id="choices" style="display: table-cell; text-align: center; font-weight: bold;">
+ <span wicket:id="availableHeader">[available header]</span>
+ </div>
+
+ <div id="buttons" style="display: table-cell;">
+ </div>
+
+ <div id="selections" style="display: table-cell; text-align: center; font-weight: bold;">
+ <span wicket:id="selectedHeader">[selected header]</span>
+ </div>
+ </div>
+
+ <div style="display: table-row">
+ <div id="choices" style="display: table-cell;">
+ <select class="choicesSelect" style="min-width: 100px;" wicket:id="choices">[choices]</select>
+ </div>
+
+ <div id="buttons" style="display: table-cell; width: 30px; text-align: center; vertical-align: middle;">
+ <div style="padding-bottom: 2px;">
+ <a wicket:id="addAllButton"><img src="img/addAll.png" alt="remove icon"/></a>
+ </div>
+ <div style="padding-top: 2px; padding-bottom: 2px;">
+ <a wicket:id="removeAllButton"><img src="img/removeAll.png" alt="move up icon"/></a>
+ </div>
+ <div style="padding-top: 2px; padding-bottom: 2px;">
+ <a wicket:id="addButton"><img src="img/add.png" alt="add icon"/></a>
+ </div>
+ <div style="padding-top: 2px; padding-bottom: 2px;">
+ <a wicket:id="removeButton"><img src="img/remove.png" alt="remove icon"/></a>
+ </div>
+ <div style="padding-top: 2px; padding-bottom: 2px;">
+ <a wicket:id="moveUpButton"><img src="img/moveUp.png" alt="move up icon"/></a>
+ </div>
+ <div style="padding-top: 2px;">
+ <a wicket:id="moveDownButton"><img src="img/moveDown.png" alt="move down icon"/></a>
+ </div>
+ </div>
+
+ <div id="selections" style="display: table-cell;">
+ <select class="selectionSelect" style="min-width: 100px;" wicket:id="selection">[selection]</select>
+ </div>
+ </div>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.html
new file mode 100644
index 0000000..a6f0e51
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.html
@@ -0,0 +1,29 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <script type="text/javascript" wicket:id="spinnerFieldJS">
+ </script>
+ <div style="display: inline-table;">
+ <div style="display: table-cell;">
+ <input wicket:id="spinnerField"/>
+ </div>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/AbstractBinaryPreviewer.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/AbstractBinaryPreviewer.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/AbstractBinaryPreviewer.html
new file mode 100644
index 0000000..81e0797
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/AbstractBinaryPreviewer.html
@@ -0,0 +1,24 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head></wicket:head>
+ <wicket:panel>
+ <wicket:child />
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryCertPreviewer.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryCertPreviewer.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryCertPreviewer.html
new file mode 100644
index 0000000..9733b29
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryCertPreviewer.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div wicket:id = "certCommonName">[certCommonName]</div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryImagePreviewer.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryImagePreviewer.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryImagePreviewer.html
new file mode 100644
index 0000000..3b891b0
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryImagePreviewer.html
@@ -0,0 +1,23 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div><img wicket:id = "previewImage"/></div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/tree/TreeRolePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/tree/TreeRolePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/tree/TreeRolePanel.html
new file mode 100644
index 0000000..8294ed0
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/tree/TreeRolePanel.html
@@ -0,0 +1,23 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<wicket:panel>
+ <div class="roleTable" wicket:id="treeContainer">
+ <div wicket:id="treeTable" class="role-tree"/>
+ </div>
+</wicket:panel>
[14/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncopeTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncopeTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncopeTO.java
new file mode 100644
index 0000000..b7d767b
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncopeTO.java
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlRootElement(name = "syncope")
+@XmlType
+public class SyncopeTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -7941853999417673827L;
+
+ private String version;
+
+ private boolean selfRegAllowed;
+
+ private boolean pwdResetAllowed;
+
+ private boolean pwdResetRequiringSecurityQuestions;
+
+ private final List<String> connIdLocations = new ArrayList<>();
+
+ private String attributableTransformer;
+
+ private String userWorkflowAdapter;
+
+ private String roleWorkflowAdapter;
+
+ private String userProvisioningManager;
+
+ private String roleProvisioningManager;
+
+ private final List<String> reportlets = new ArrayList<>();
+
+ private final List<String> taskJobs = new ArrayList<>();
+
+ private final List<String> propagationActions = new ArrayList<>();
+
+ private final List<String> syncActions = new ArrayList<>();
+
+ private final List<String> pushActions = new ArrayList<>();
+
+ private final List<String> syncCorrelationRules = new ArrayList<>();
+
+ private final List<String> pushCorrelationRules = new ArrayList<>();
+
+ private final List<String> validators = new ArrayList<>();
+
+ private final List<String> mailTemplates = new ArrayList<>();
+
+ public String getVersion() {
+ return version;
+ }
+
+ public boolean isSelfRegAllowed() {
+ return selfRegAllowed;
+ }
+
+ public boolean isPwdResetAllowed() {
+ return pwdResetAllowed;
+ }
+
+ public boolean isPwdResetRequiringSecurityQuestions() {
+ return pwdResetRequiringSecurityQuestions;
+ }
+
+ @XmlElementWrapper(name = "connIdLocations")
+ @XmlElement(name = "connIdLocation")
+ @JsonProperty("connIdLocations")
+ public List<String> getConnIdLocations() {
+ return connIdLocations;
+ }
+
+ public String getAttributableTransformer() {
+ return attributableTransformer;
+ }
+
+ public String getUserWorkflowAdapter() {
+ return userWorkflowAdapter;
+ }
+
+ public String getRoleWorkflowAdapter() {
+ return roleWorkflowAdapter;
+ }
+
+ public String getUserProvisioningManager() {
+ return userProvisioningManager;
+ }
+
+ public String getRoleProvisioningManager() {
+ return roleProvisioningManager;
+ }
+
+ @XmlElementWrapper(name = "reportlets")
+ @XmlElement(name = "reportlet")
+ @JsonProperty("reportlets")
+ public List<String> getReportlets() {
+ return reportlets;
+ }
+
+ @XmlElementWrapper(name = "taskJobs")
+ @XmlElement(name = "taskJob")
+ @JsonProperty("taskJobs")
+ public List<String> getTaskJobs() {
+ return taskJobs;
+ }
+
+ @XmlElementWrapper(name = "propagationActions")
+ @XmlElement(name = "propagationAction")
+ @JsonProperty("propagationActions")
+ public List<String> getPropagationActions() {
+ return propagationActions;
+ }
+
+ @XmlElementWrapper(name = "syncActions")
+ @XmlElement(name = "syncAction")
+ @JsonProperty("syncActions")
+ public List<String> getSyncActions() {
+ return syncActions;
+ }
+
+ @XmlElementWrapper(name = "pushActions")
+ @XmlElement(name = "pushAction")
+ @JsonProperty("pushActions")
+ public List<String> getPushActions() {
+ return pushActions;
+ }
+
+ @XmlElementWrapper(name = "syncCorrelationRules")
+ @XmlElement(name = "syncCorrelationRule")
+ @JsonProperty("syncCorrelationRules")
+ public List<String> getSyncCorrelationRules() {
+ return syncCorrelationRules;
+ }
+
+ @XmlElementWrapper(name = "pushCorrelationRules")
+ @XmlElement(name = "pushCorrelationRule")
+ @JsonProperty("pushCorrelationRules")
+ public List<String> getPushCorrelationRules() {
+ return pushCorrelationRules;
+ }
+
+ @XmlElementWrapper(name = "validators")
+ @XmlElement(name = "validator")
+ @JsonProperty("validators")
+ public List<String> getValidators() {
+ return validators;
+ }
+
+ @XmlElementWrapper(name = "mailTemplates")
+ @XmlElement(name = "mailTemplate")
+ @JsonProperty("mailTemplates")
+ public List<String> getMailTemplates() {
+ return mailTemplates;
+ }
+
+ public void setVersion(final String version) {
+ this.version = version;
+ }
+
+ public void setSelfRegAllowed(final boolean selfRegAllowed) {
+ this.selfRegAllowed = selfRegAllowed;
+ }
+
+ public void setPwdResetAllowed(final boolean pwdResetAllowed) {
+ this.pwdResetAllowed = pwdResetAllowed;
+ }
+
+ public void setPwdResetRequiringSecurityQuestions(final boolean pwdResetRequiringSecurityQuestions) {
+ this.pwdResetRequiringSecurityQuestions = pwdResetRequiringSecurityQuestions;
+ }
+
+ public void setAttributableTransformer(final String attributableTransformer) {
+ this.attributableTransformer = attributableTransformer;
+ }
+
+ public void setUserWorkflowAdapter(final String userWorkflowAdapter) {
+ this.userWorkflowAdapter = userWorkflowAdapter;
+ }
+
+ public void setRoleWorkflowAdapter(final String roleWorkflowAdapter) {
+ this.roleWorkflowAdapter = roleWorkflowAdapter;
+ }
+
+ public void setUserProvisioningManager(final String userProvisioningManager) {
+ this.userProvisioningManager = userProvisioningManager;
+ }
+
+ public void setRoleProvisioningManager(final String roleProvisioningManager) {
+ this.roleProvisioningManager = roleProvisioningManager;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/TaskExecTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/TaskExecTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/TaskExecTO.java
new file mode 100644
index 0000000..467c35e
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/TaskExecTO.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "taskExec")
+@XmlType
+public class TaskExecTO extends AbstractExecTO {
+
+ private static final long serialVersionUID = -5401795154606268973L;
+
+ private long task;
+
+ public long getTask() {
+ return task;
+ }
+
+ public void setTask(final long task) {
+ this.task = task;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java
new file mode 100644
index 0000000..aceefe1
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+@XmlRootElement(name = "user")
+@XmlType
+public class UserTO extends AbstractSubjectTO {
+
+ private static final long serialVersionUID = 7791304495192615740L;
+
+ private String password;
+
+ private final List<MembershipTO> memberships = new ArrayList<>();
+
+ private String status;
+
+ private String token;
+
+ private Date tokenExpireTime;
+
+ private String username;
+
+ private Date lastLoginDate;
+
+ private Date changePwdDate;
+
+ private Integer failedLogins;
+
+ private Long securityQuestion;
+
+ private String securityAnswer;
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(final String password) {
+ this.password = password;
+ }
+
+ @XmlElementWrapper(name = "memberships")
+ @XmlElement(name = "membership")
+ @JsonProperty("memberships")
+ public List<MembershipTO> getMemberships() {
+ return memberships;
+ }
+
+ @JsonIgnore
+ public Map<Long, MembershipTO> getMembershipMap() {
+ Map<Long, MembershipTO> result;
+
+ if (getMemberships() == null) {
+ result = Collections.emptyMap();
+ } else {
+ result = new HashMap<>(getMemberships().size());
+ for (MembershipTO membership : getMemberships()) {
+ result.put(membership.getRoleId(), membership);
+ }
+ result = Collections.unmodifiableMap(result);
+ }
+
+ return result;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(final String status) {
+ this.status = status;
+ }
+
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(final String token) {
+ this.token = token;
+ }
+
+ public Date getTokenExpireTime() {
+ return tokenExpireTime == null
+ ? null
+ : new Date(tokenExpireTime.getTime());
+ }
+
+ public void setTokenExpireTime(final Date tokenExpireTime) {
+ if (tokenExpireTime != null) {
+ this.tokenExpireTime = new Date(tokenExpireTime.getTime());
+ }
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(final String username) {
+ this.username = username;
+ }
+
+ public Date getChangePwdDate() {
+ return changePwdDate;
+ }
+
+ public Integer getFailedLogins() {
+ return failedLogins;
+ }
+
+ public Date getLastLoginDate() {
+ return lastLoginDate;
+ }
+
+ public void setChangePwdDate(final Date changePwdDate) {
+ this.changePwdDate = changePwdDate;
+ }
+
+ public void setFailedLogins(final Integer failedLogins) {
+ this.failedLogins = failedLogins;
+ }
+
+ public void setLastLoginDate(final Date lastLoginDate) {
+ this.lastLoginDate = lastLoginDate;
+ }
+
+ public Long getSecurityQuestion() {
+ return securityQuestion;
+ }
+
+ public void setSecurityQuestion(final Long securityQuestion) {
+ this.securityQuestion = securityQuestion;
+ }
+
+ public String getSecurityAnswer() {
+ return securityAnswer;
+ }
+
+ public void setSecurityAnswer(final String securityAnswer) {
+ this.securityAnswer = securityAnswer;
+ }
+
+ @Override
+ public String toString() {
+ return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) {
+
+ @Override
+ protected boolean accept(final Field f) {
+ return super.accept(f) && !f.getName().equals("password");
+ }
+ }.toString();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/VirSchemaTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/VirSchemaTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/VirSchemaTO.java
new file mode 100644
index 0000000..1a9d3bd
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/VirSchemaTO.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "virtualSchema")
+public class VirSchemaTO extends AbstractSchemaTO {
+
+ private static final long serialVersionUID = -8198557479659701343L;
+
+ private boolean readonly;
+
+ public boolean isReadonly() {
+ return readonly;
+ }
+
+ public void setReadonly(final boolean readonly) {
+ this.readonly = readonly;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormPropertyTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormPropertyTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormPropertyTO.java
new file mode 100644
index 0000000..5b67c92
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormPropertyTO.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.WorkflowFormPropertyType;
+
+@XmlRootElement(name = "workflowFormProperty")
+@XmlType
+public class WorkflowFormPropertyTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 9139969592634304261L;
+
+ private String id;
+
+ private String name;
+
+ private WorkflowFormPropertyType type;
+
+ private String value;
+
+ private boolean readable;
+
+ private boolean writable;
+
+ private boolean required;
+
+ private String datePattern;
+
+ private final Map<String, String> enumValues = new HashMap<>();
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(final String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public boolean isReadable() {
+ return readable;
+ }
+
+ public void setReadable(final boolean readable) {
+ this.readable = readable;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ public void setRequired(final boolean required) {
+ this.required = required;
+ }
+
+ public WorkflowFormPropertyType getType() {
+ return type;
+ }
+
+ public void setType(final WorkflowFormPropertyType type) {
+ this.type = type;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(final String value) {
+ this.value = value;
+ }
+
+ public boolean isWritable() {
+ return writable;
+ }
+
+ public void setWritable(final boolean writable) {
+ this.writable = writable;
+ }
+
+ public String getDatePattern() {
+ return datePattern;
+ }
+
+ public void setDatePattern(final String datePattern) {
+ this.datePattern = datePattern;
+ }
+
+ public Map<String, String> getEnumValues() {
+ return enumValues;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormTO.java
new file mode 100644
index 0000000..90dc7c2
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormTO.java
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlRootElement(name = "workflowForm")
+@XmlType
+public class WorkflowFormTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -7044543391316529128L;
+
+ private long userKey;
+
+ private String taskId;
+
+ private String key;
+
+ private String description;
+
+ private Date createTime;
+
+ private Date dueDate;
+
+ private String owner;
+
+ private final List<WorkflowFormPropertyTO> properties = new ArrayList<>();
+
+ public long getUserKey() {
+ return userKey;
+ }
+
+ public void setUserKey(long userKey) {
+ this.userKey = userKey;
+ }
+
+ public String getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(final String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(final String key) {
+ this.key = key;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(final Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(final String description) {
+ this.description = description;
+ }
+
+ public Date getDueDate() {
+ return dueDate;
+ }
+
+ public void setDueDate(final Date dueDate) {
+ this.dueDate = dueDate;
+ }
+
+ public String getOwner() {
+ return owner;
+ }
+
+ public void setOwner(final String owner) {
+ this.owner = owner;
+ }
+
+ @XmlElementWrapper(name = "workflowFormProperties")
+ @XmlElement(name = "workflowFormProperty")
+ @JsonProperty("workflowFormProperties")
+ public List<WorkflowFormPropertyTO> getProperties() {
+ return properties;
+ }
+
+ public boolean addProperty(final WorkflowFormPropertyTO property) {
+ return properties.contains(property)
+ ? true
+ : properties.add(property);
+ }
+
+ public boolean removeProperty(final WorkflowFormPropertyTO property) {
+ return properties.remove(property);
+ }
+
+ @JsonIgnore
+ public Map<String, WorkflowFormPropertyTO> getPropertyMap() {
+ Map<String, WorkflowFormPropertyTO> result = new HashMap<>();
+ for (WorkflowFormPropertyTO prop : getProperties()) {
+ result.put(prop.getId(), prop);
+ }
+ result = Collections.unmodifiableMap(result);
+
+ return result;
+ }
+
+ @JsonIgnore
+ public Map<String, String> getPropertiesForSubmit() {
+ Map<String, String> props = new HashMap<>();
+ for (WorkflowFormPropertyTO prop : getProperties()) {
+ if (prop.isWritable()) {
+ props.put(prop.getId(), prop.getValue());
+ }
+ }
+
+ return props;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/package-info.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/package-info.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/package-info.java
new file mode 100644
index 0000000..b02ed8f
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+package org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlSchema;
+import org.apache.syncope.common.lib.SyncopeConstants;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/AbstractCommonsLangType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AbstractCommonsLangType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AbstractCommonsLangType.java
new file mode 100644
index 0000000..1953010
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AbstractCommonsLangType.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+@XmlType
+public abstract class AbstractCommonsLangType implements Serializable {
+
+ private static final long serialVersionUID = 3119542005279892164L;
+
+ @Override
+ public boolean equals(final Object obj) {
+ return EqualsBuilder.reflectionEquals(this, obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return HashCodeBuilder.reflectionHashCode(this);
+ }
+
+ @Override
+ public String toString() {
+ return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/AccountPolicySpec.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AccountPolicySpec.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AccountPolicySpec.java
new file mode 100644
index 0000000..8d5a792
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AccountPolicySpec.java
@@ -0,0 +1,188 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.annotation.SchemaList;
+
+@XmlType
+public class AccountPolicySpec implements PolicySpec {
+
+ private static final long serialVersionUID = 3259256974414758406L;
+
+ /**
+ * Minimum length.
+ */
+ private int maxLength;
+
+ /**
+ * Maximum length.
+ */
+ private int minLength;
+
+ /**
+ * Pattern (regular expression) that must match.
+ */
+ private String pattern;
+
+ /**
+ * Substrings not permitted.
+ */
+ private List<String> wordsNotPermitted;
+
+ /**
+ * User attribute values not permitted.
+ */
+ @SchemaList
+ private List<String> schemasNotPermitted;
+
+ /**
+ * Substrings not permitted as prefix.
+ */
+ private List<String> prefixesNotPermitted;
+
+ /**
+ * Substrings not permitted as suffix.
+ */
+ private List<String> suffixesNotPermitted;
+
+ /**
+ * Specify if one or more lowercase characters are permitted.
+ */
+ private boolean allUpperCase;
+
+ /**
+ * Specify if one or more uppercase characters are permitted.
+ */
+ private boolean allLowerCase;
+
+ /**
+ * Specify if, when reached the maximum allowed number of subsequent login failures, user shall be suspended.
+ */
+ private boolean propagateSuspension;
+
+ /**
+ * Number of permitted login retries.
+ * 0 disabled; >0 enabled.
+ * If the number of subsequent failed logins will be greater then this value
+ * the account will be suspended (lock-out).
+ */
+ private int permittedLoginRetries;
+
+ public boolean isAllLowerCase() {
+ return allLowerCase;
+ }
+
+ public void setAllLowerCase(final boolean allLowerCase) {
+ this.allLowerCase = allLowerCase;
+ }
+
+ public boolean isAllUpperCase() {
+ return allUpperCase;
+ }
+
+ public void setAllUpperCase(final boolean allUpperCase) {
+ this.allUpperCase = allUpperCase;
+ }
+
+ public int getMaxLength() {
+ return maxLength;
+ }
+
+ public void setMaxLength(final int maxLength) {
+ this.maxLength = maxLength;
+ }
+
+ public int getMinLength() {
+ return minLength;
+ }
+
+ public void setMinLength(final int minLength) {
+ this.minLength = minLength;
+ }
+
+ public String getPattern() {
+ return pattern;
+ }
+
+ public void setPattern(final String pattern) {
+ this.pattern = pattern;
+ }
+
+ @XmlElementWrapper(name = "prefixesNotPermitted")
+ @XmlElement(name = "prefix")
+ @JsonProperty("prefixesNotPermitted")
+ public List<String> getPrefixesNotPermitted() {
+ if (prefixesNotPermitted == null) {
+ prefixesNotPermitted = new ArrayList<String>();
+ }
+ return prefixesNotPermitted;
+ }
+
+ @XmlElementWrapper(name = "schemasNotPermitted")
+ @XmlElement(name = "schema")
+ @JsonProperty("schemasNotPermitted")
+ public List<String> getSchemasNotPermitted() {
+ if (schemasNotPermitted == null) {
+ schemasNotPermitted = new ArrayList<String>();
+ }
+ return schemasNotPermitted;
+ }
+
+ @XmlElementWrapper(name = "suffixesNotPermitted")
+ @XmlElement(name = "suffix")
+ @JsonProperty("suffixesNotPermitted")
+ public List<String> getSuffixesNotPermitted() {
+ if (suffixesNotPermitted == null) {
+ suffixesNotPermitted = new ArrayList<String>();
+ }
+ return suffixesNotPermitted;
+ }
+
+ @XmlElementWrapper(name = "wordsNotPermitted")
+ @XmlElement(name = "word")
+ @JsonProperty("wordsNotPermitted")
+ public List<String> getWordsNotPermitted() {
+ if (wordsNotPermitted == null) {
+ wordsNotPermitted = new ArrayList<String>();
+ }
+ return wordsNotPermitted;
+ }
+
+ public boolean isPropagateSuspension() {
+ return propagateSuspension;
+ }
+
+ public void setPropagateSuspension(final boolean propagateSuspension) {
+ this.propagateSuspension = propagateSuspension;
+ }
+
+ public int getPermittedLoginRetries() {
+ return permittedLoginRetries;
+ }
+
+ public void setPermittedLoginRetries(final int permittedLoginRetries) {
+ this.permittedLoginRetries = permittedLoginRetries;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java
new file mode 100644
index 0000000..2fc937b
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import java.util.Date;
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum AttrSchemaType {
+
+ String(String.class),
+ Long(Long.class),
+ Double(Double.class),
+ Boolean(Boolean.class),
+ Date(Date.class),
+ Enum(Enum.class),
+ Encrypted(byte[].class),
+ Binary(byte[].class);
+
+ final private Class<?> type;
+
+ AttrSchemaType(final Class<?> type) {
+ this.type = type;
+ }
+
+ public Class<?> getType() {
+ return type;
+ }
+
+ public boolean isConversionPatternNeeded() {
+ return this == AttrSchemaType.Date
+ || this == AttrSchemaType.Double
+ || this == AttrSchemaType.Long;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/AttributableType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AttributableType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AttributableType.java
new file mode 100644
index 0000000..6b989df
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AttributableType.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum AttributableType {
+
+ USER,
+ ROLE,
+ MEMBERSHIP,
+ CONFIGURATION;
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java
new file mode 100644
index 0000000..40ff86a
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlEnum;
+import org.apache.commons.lang3.StringUtils;
+
+public final class AuditElements implements Serializable {
+
+ private static final long serialVersionUID = -4385059255522273254L;
+
+ private AuditElements() {
+ }
+
+ @XmlEnum
+ public enum EventCategoryType {
+
+ REST(StringUtils.EMPTY),
+ TASK(StringUtils.EMPTY),
+ PROPAGATION("PropagationTask"),
+ SYNCHRONIZATION("SyncTask"),
+ PUSH("PushTask"),
+ CUSTOM(StringUtils.EMPTY);
+
+ private final String value;
+
+ EventCategoryType(final String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return value;
+ }
+ }
+
+ @XmlEnum
+ public enum Result {
+
+ SUCCESS,
+ FAILURE
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java
new file mode 100644
index 0000000..d491037
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java
@@ -0,0 +1,222 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.text.ParseException;
+import java.util.AbstractMap;
+import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.to.EventCategoryTO;
+import org.apache.syncope.common.lib.types.AuditElements.EventCategoryType;
+import org.apache.syncope.common.lib.types.AuditElements.Result;
+
+public class AuditLoggerName extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -647989486671786839L;
+
+ private final AuditElements.EventCategoryType type;
+
+ private final String category;
+
+ private final String subcategory;
+
+ private final String event;
+
+ private final Result result;
+
+ @JsonCreator
+ public AuditLoggerName(
+ @JsonProperty("type") final AuditElements.EventCategoryType type,
+ @JsonProperty("category") final String category,
+ @JsonProperty("subcategory") final String subcategory,
+ @JsonProperty("event") final String event,
+ @JsonProperty("result") final Result result)
+ throws IllegalArgumentException {
+
+ this.type = type == null ? AuditElements.EventCategoryType.CUSTOM : type;
+ this.category = category;
+ this.subcategory = subcategory;
+ this.event = event;
+ this.result = result == null ? Result.SUCCESS : result;
+ }
+
+ public AuditElements.EventCategoryType getType() {
+ return type;
+ }
+
+ public String getEvent() {
+ return event;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public Result getResult() {
+ return result;
+ }
+
+ public String getSubcategory() {
+ return subcategory;
+ }
+
+ public String toLoggerName() {
+ return new StringBuilder().append(LoggerType.AUDIT.getPrefix()).append('.').
+ append(buildEvent(type, category, subcategory, event, result)).toString();
+ }
+
+ @SuppressWarnings("unchecked")
+ public static AuditLoggerName fromLoggerName(final String loggerName)
+ throws IllegalArgumentException, ParseException {
+
+ if (StringUtils.isBlank(loggerName)) {
+ throw new IllegalArgumentException("Null value not permitted");
+ }
+
+ if (!loggerName.startsWith(LoggerType.AUDIT.getPrefix())) {
+ throw new ParseException("Audit logger name must start with " + LoggerType.AUDIT.getPrefix(), 0);
+ }
+
+ final Map.Entry<EventCategoryTO, Result> eventCategory = parseEventCategory(
+ loggerName.replaceAll(LoggerType.AUDIT.getPrefix() + ".", ""));
+
+ return new AuditLoggerName(
+ eventCategory.getKey().getType(),
+ eventCategory.getKey().getCategory(),
+ eventCategory.getKey().getSubcategory(),
+ eventCategory.getKey().getEvents().isEmpty()
+ ? StringUtils.EMPTY : eventCategory.getKey().getEvents().iterator().next(),
+ eventCategory.getValue());
+ }
+
+ public static Map.Entry<EventCategoryTO, Result> parseEventCategory(final String event) {
+ final EventCategoryTO eventCategoryTO = new EventCategoryTO();
+
+ Result condition = null;
+
+ if (StringUtils.isNotEmpty(event)) {
+ final String[] elements = event.substring(1, event.length() - 1).split("\\]:\\[");
+
+ if (elements.length == 1) {
+ eventCategoryTO.setType(EventCategoryType.CUSTOM);
+ condition = Result.SUCCESS;
+ eventCategoryTO.getEvents().add(event);
+ } else {
+ EventCategoryType type;
+
+ if (EventCategoryType.PROPAGATION.toString().equals(elements[0])) {
+ type = EventCategoryType.PROPAGATION;
+ } else if (EventCategoryType.SYNCHRONIZATION.toString().equals(elements[0])) {
+ type = EventCategoryType.SYNCHRONIZATION;
+ } else if (EventCategoryType.PUSH.toString().equals(elements[0])) {
+ type = EventCategoryType.PUSH;
+ } else {
+ try {
+ type = EventCategoryType.valueOf(elements[0]);
+ } catch (Exception e) {
+ type = EventCategoryType.CUSTOM;
+ }
+ }
+
+ eventCategoryTO.setType(type);
+
+ eventCategoryTO.setCategory(StringUtils.isNotEmpty(elements[1]) ? elements[1] : null);
+
+ eventCategoryTO.setSubcategory(StringUtils.isNotEmpty(elements[2]) ? elements[2] : null);
+
+ if (elements.length > 3 && StringUtils.isNotEmpty(elements[3])) {
+ eventCategoryTO.getEvents().add(elements[3]);
+ }
+
+ if (elements.length > 4) {
+ condition = Result.valueOf(elements[4].toUpperCase());
+ }
+ }
+ }
+
+ return new AbstractMap.SimpleEntry< EventCategoryTO, Result>(eventCategoryTO, condition);
+ }
+
+ /**
+ * Build event string with the following syntax [type]:[category]:[subcategory]:[event]:[maybe result value cond].
+ *
+ * @param type event type.
+ * @param category event category.
+ * @param subcategory event subcategory.
+ * @param event event.
+ * @param resultValueCondition result value condition.
+ * @return event string.
+ */
+ public static String buildEvent(
+ final AuditElements.EventCategoryType type,
+ final String category,
+ final String subcategory,
+ final String event,
+ final AuditElements.Result resultValueCondition) {
+
+ final StringBuilder eventBuilder = new StringBuilder();
+
+ eventBuilder.append('[');
+ if (type != null) {
+ if (StringUtils.isNotBlank(type.toString())) {
+ eventBuilder.append(type.toString());
+ } else {
+ eventBuilder.append(type.name());
+ }
+ }
+ eventBuilder.append(']');
+
+ eventBuilder.append(":");
+
+ eventBuilder.append('[');
+ if (StringUtils.isNotBlank(category)) {
+ eventBuilder.append(category);
+ }
+ eventBuilder.append(']');
+
+ eventBuilder.append(":");
+
+ eventBuilder.append('[');
+ if (StringUtils.isNotBlank(subcategory)) {
+ eventBuilder.append(subcategory);
+ }
+ eventBuilder.append(']');
+
+ eventBuilder.append(":");
+
+ eventBuilder.append('[');
+ if (StringUtils.isNotBlank(event)) {
+ eventBuilder.append(event);
+ }
+ eventBuilder.append(']');
+
+ if (resultValueCondition != null) {
+ eventBuilder.append(":");
+
+ eventBuilder.append('[');
+ eventBuilder.append(resultValueCondition);
+ eventBuilder.append(']');
+ }
+
+ return eventBuilder.toString();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/CipherAlgorithm.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/CipherAlgorithm.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/CipherAlgorithm.java
new file mode 100644
index 0000000..af5592e
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/CipherAlgorithm.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum CipherAlgorithm {
+
+ SHA("SHA-1", false),
+ SHA1("SHA-1", false),
+ SHA256("SHA-256", false),
+ SHA512("SHA-512", false),
+ AES("AES", true),
+ SMD5("S-MD5", false),
+ SSHA("S-SHA-1", false),
+ SSHA1("S-SHA-1", false),
+ SSHA256("S-SHA-256", false),
+ SSHA512("S-SHA-512", false),
+ BCRYPT("BCRYPT", false);
+
+ final private String algorithm;
+
+ final private boolean invertible;
+
+ CipherAlgorithm(final String algorithm, final boolean invertible) {
+ this.algorithm = algorithm;
+ this.invertible = invertible;
+ }
+
+ public String getAlgorithm() {
+ return algorithm;
+ }
+
+ public boolean isInvertible() {
+ return invertible;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java
new file mode 100644
index 0000000..c55cebd
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.ws.rs.core.Response;
+
+public enum ClientExceptionType {
+
+ AssociatedResources(Response.Status.BAD_REQUEST),
+ Composite(Response.Status.BAD_REQUEST),
+ ConcurrentModification(Response.Status.PRECONDITION_FAILED),
+ DataIntegrityViolation(Response.Status.BAD_REQUEST),
+ EntityExists(Response.Status.CONFLICT),
+ GenericPersistence(Response.Status.BAD_REQUEST),
+ InvalidSecurityAnswer(Response.Status.BAD_REQUEST),
+ InvalidEntity(Response.Status.BAD_REQUEST),
+ InvalidLogger(Response.Status.BAD_REQUEST),
+ InvalidConnInstance(Response.Status.BAD_REQUEST),
+ InvalidConnIdConf(Response.Status.BAD_REQUEST),
+ InvalidPolicy(Response.Status.BAD_REQUEST),
+ InvalidConf(Response.Status.BAD_REQUEST),
+ InvalidRole(Response.Status.BAD_REQUEST),
+ InvalidReport(Response.Status.BAD_REQUEST),
+ InvalidReportExec(Response.Status.BAD_REQUEST),
+ InvalidRoles(Response.Status.BAD_REQUEST),
+ InvalidSchemaDefinition(Response.Status.BAD_REQUEST),
+ InvalidSearchExpression(Response.Status.BAD_REQUEST),
+ InvalidPageOrSize(Response.Status.BAD_REQUEST),
+ InvalidPropagationTaskExecReport(Response.Status.BAD_REQUEST),
+ InvalidPlainSchema(Response.Status.BAD_REQUEST),
+ InvalidDerSchema(Response.Status.BAD_REQUEST),
+ InvalidVirSchema(Response.Status.BAD_REQUEST),
+ InvalidSchemaMapping(Response.Status.BAD_REQUEST),
+ InvalidUser(Response.Status.BAD_REQUEST),
+ InvalidExternalResource(Response.Status.BAD_REQUEST),
+ InvalidNotification(Response.Status.BAD_REQUEST),
+ InvalidPropagationTask(Response.Status.BAD_REQUEST),
+ InvalidSchedTask(Response.Status.BAD_REQUEST),
+ InvalidSyncTask(Response.Status.BAD_REQUEST),
+ InvalidPushTask(Response.Status.BAD_REQUEST),
+ InvalidValues(Response.Status.BAD_REQUEST),
+ NotFound(Response.Status.NOT_FOUND),
+ RejectedUserCreate(Response.Status.BAD_REQUEST),
+ RequiredValuesMissing(Response.Status.BAD_REQUEST),
+ RESTValidation(Response.Status.BAD_REQUEST),
+ RoleOwnership(Response.Status.BAD_REQUEST),
+ Scheduling(Response.Status.BAD_REQUEST),
+ UnauthorizedRole(Response.Status.UNAUTHORIZED),
+ Unauthorized(Response.Status.UNAUTHORIZED),
+ Unknown(Response.Status.BAD_REQUEST),
+ Workflow(Response.Status.BAD_REQUEST);
+
+ private final Response.Status responseStatus;
+
+ private ClientExceptionType(final Response.Status responseStatus) {
+ this.responseStatus = responseStatus;
+ }
+
+ public static ClientExceptionType fromHeaderValue(final String exceptionTypeHeaderValue) {
+ ClientExceptionType result = null;
+ for (ClientExceptionType type : values()) {
+ if (exceptionTypeHeaderValue.equals(type.getHeaderValue())) {
+ result = type;
+ }
+ }
+
+ if (result == null) {
+ throw new IllegalArgumentException("Unexpected header value: " + exceptionTypeHeaderValue);
+ }
+
+ return result;
+ }
+
+ public String getHeaderValue() {
+ return name();
+ }
+
+ public String getInfoHeaderValue(final String value) {
+ return getHeaderValue() + ":" + value;
+ }
+
+ public Response.Status getResponseStatus() {
+ return responseStatus;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConflictResolutionAction.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConflictResolutionAction.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConflictResolutionAction.java
new file mode 100644
index 0000000..37308e1
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConflictResolutionAction.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum ConflictResolutionAction {
+
+ // ignore sync
+ IGNORE,
+ // sync first matcgh
+ FIRSTMATCH,
+ // sync last match
+ LASTMATCH,
+ // sync all
+ ALL;
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfPropSchema.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfPropSchema.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfPropSchema.java
new file mode 100644
index 0000000..02ca7aa
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfPropSchema.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement
+@XmlType
+public class ConnConfPropSchema extends AbstractCommonsLangType implements Comparable<ConnConfPropSchema> {
+
+ private static final long serialVersionUID = -1976365781005801296L;
+
+ private String name;
+
+ private String displayName;
+
+ private String helpMessage;
+
+ private String type;
+
+ private boolean required;
+
+ private int order;
+
+ private boolean confidential;
+
+ private final List<Object> defaultValues = new ArrayList<>();
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ public void setRequired(final boolean required) {
+ this.required = required;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(final String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getHelpMessage() {
+ return helpMessage;
+ }
+
+ public void setHelpMessage(final String helpMessage) {
+ this.helpMessage = helpMessage;
+ }
+
+ public int getOrder() {
+ return order;
+ }
+
+ public void setOrder(final int order) {
+ this.order = order;
+ }
+
+ public boolean isConfidential() {
+ return confidential;
+ }
+
+ public void setConfidential(final boolean confidential) {
+ this.confidential = confidential;
+ }
+
+ @XmlElementWrapper(name = "defaultValues")
+ @XmlElement(name = "defaultValue")
+ @JsonProperty("defaultValues")
+ public List<Object> getDefaultValues() {
+ return defaultValues;
+ }
+
+ @Override
+ public int compareTo(final ConnConfPropSchema other) {
+ return this.getOrder() > other.getOrder()
+ ? 1
+ : this.getOrder() < other.getOrder()
+ ? -1
+ : 0;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfProperty.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfProperty.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfProperty.java
new file mode 100644
index 0000000..13b37b2
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfProperty.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.commons.lang3.ObjectUtils;
+
+@XmlRootElement
+@XmlType
+public class ConnConfProperty extends AbstractCommonsLangType implements Comparable<ConnConfProperty> {
+
+ private static final long serialVersionUID = -8391413960221862238L;
+
+ private ConnConfPropSchema schema;
+
+ private final List<Object> values = new ArrayList<>();
+
+ private boolean overridable;
+
+ public ConnConfPropSchema getSchema() {
+ return schema;
+ }
+
+ public void setSchema(final ConnConfPropSchema schema) {
+ this.schema = schema;
+ }
+
+ @XmlElementWrapper(name = "values")
+ @XmlElement(name = "value")
+ @JsonProperty("values")
+ public List<Object> getValues() {
+ return values;
+ }
+
+ public boolean isOverridable() {
+ return overridable;
+ }
+
+ public void setOverridable(final boolean overridable) {
+ this.overridable = overridable;
+ }
+
+ @Override
+ public int compareTo(final ConnConfProperty connConfProperty) {
+ return ObjectUtils.compare(this.getSchema(), connConfProperty.getSchema());
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnectorCapability.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnectorCapability.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnectorCapability.java
new file mode 100644
index 0000000..a0e5781
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnectorCapability.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+/**
+ * Enum of all possible capabilities that a connector instance can expose.
+ */
+@XmlEnum
+public enum ConnectorCapability {
+
+ AUTHENTICATE,
+ ONE_PHASE_CREATE,
+ TWO_PHASES_CREATE,
+ ONE_PHASE_UPDATE,
+ TWO_PHASES_UPDATE,
+ ONE_PHASE_DELETE,
+ TWO_PHASES_DELETE,
+ SEARCH,
+ SYNC;
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java
new file mode 100644
index 0000000..5a92daa
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum EntityViolationType {
+
+ Standard(""),
+ InvalidAccountPolicy("org.apache.syncope.core.persistence.validation.accountpolicy"),
+ InvalidConnInstanceLocation("org.apache.syncope.core.persistence.validation.conninstance.location"),
+ InvalidConnPoolConf("org.apache.syncope.core.persistence.validation.conninstance.poolConf"),
+ InvalidCPlainSchema("org.apache.syncope.core.persistence.validation.attrvalue.cPlainSchema"),
+ InvalidMapping("org.apache.syncope.core.persistence.validation.mapping"),
+ InvalidMPlainSchema("org.apache.syncope.core.persistence.validation.attrvalue.mPlainSchema"),
+ InvalidMDerSchema("org.apache.syncope.core.persistence.validation.attrvalue.mDerSchema"),
+ InvalidMVirSchema("org.apache.syncope.core.persistence.validation.attrvalue.mVirSchema"),
+ InvalidName("org.apache.syncope.core.persistence.validation.name"),
+ InvalidNotification("org.apache.syncope.core.persistence.validation.notification"),
+ InvalidPassword("org.apache.syncope.core.persistence.validation.user.password"),
+ InvalidPasswordPolicy("org.apache.syncope.core.persistence.validation.passwordpolicy"),
+ InvalidPolicy("org.apache.syncope.core.persistence.validation.policy"),
+ InvalidPropagationTask("org.apache.syncope.core.persistence.validation.propagationtask"),
+ InvalidRPlainSchema("org.apache.syncope.core.persistence.validation.attrvalue.rPlainSchema"),
+ InvalidRDerSchema("org.apache.syncope.core.persistence.validation.attrvalue.rDerSchema"),
+ InvalidRVirSchema("org.apache.syncope.core.persistence.validation.attrvalue.rVirSchema"),
+ InvalidReport("org.apache.syncope.core.persistence.validation.report"),
+ InvalidResource("org.apache.syncope.core.persistence.validation.externalresource"),
+ InvalidRoleOwner("org.apache.syncope.core.persistence.validation.role.owner"),
+ InvalidSchemaEncrypted("org.apache.syncope.core.persistence.validation.schema.encrypted"),
+ InvalidSchemaEnum("org.apache.syncope.core.persistence.validation.schema.enum"),
+ InvalidSchemaMultivalueUnique("org.apache.syncope.core.persistence.validation.schema.multivalueUnique"),
+ InvalidSchedTask("org.apache.syncope.core.persistence.validation.schedtask"),
+ InvalidSyncTask("org.apache.syncope.core.persistence.validation.synctask"),
+ InvalidSyncPolicy("org.apache.syncope.core.persistence.validation.syncpolicy"),
+ InvalidUPlainSchema("org.apache.syncope.core.persistence.validation.attrvalue.uPlainSchema"),
+ InvalidUDerSchema("org.apache.syncope.core.persistence.validation.attrvalue.derSchema"),
+ InvalidUVirSchema("org.apache.syncope.core.persistence.validation.attrvalue.uVirSchema"),
+ InvalidUsername("org.apache.syncope.core.persistence.validation.user.username"),
+ InvalidValueList("org.apache.syncope.core.persistence.validation.attr.valueList"),
+ MoreThanOneNonNull("org.apache.syncope.core.persistence.validation.attrvalue.moreThanOneNonNull");
+
+ private String message;
+
+ EntityViolationType(final String message) {
+ this.message = message;
+ }
+
+ public void setMessage(final String message) {
+ this.message = message;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/IntMappingType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/IntMappingType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/IntMappingType.java
new file mode 100644
index 0000000..7dd60d6
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/IntMappingType.java
@@ -0,0 +1,201 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import java.util.Collection;
+import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+/**
+ * Internal attribute mapping type.
+ */
+@XmlEnum
+public enum IntMappingType {
+
+ // Unfortunately enum type cannot be extended ...
+ // -------------------------
+ // User attribute types (the same in UserMappingType)
+ // -------------------------
+ UserPlainSchema(AttributableType.USER),
+ UserDerivedSchema(AttributableType.USER),
+ UserVirtualSchema(AttributableType.USER),
+ UserId(AttributableType.USER),
+ Username(AttributableType.USER),
+ Password(AttributableType.USER),
+ // -------------------------
+ // Role attribute types (the same in RoleMappingType)
+ // -------------------------
+ RolePlainSchema(AttributableType.ROLE),
+ RoleDerivedSchema(AttributableType.ROLE),
+ RoleVirtualSchema(AttributableType.ROLE),
+ RoleId(AttributableType.ROLE),
+ RoleName(AttributableType.ROLE),
+ RoleOwnerSchema(AttributableType.ROLE),
+ // -------------------------
+ // Membership attribute types (the same in MembershipMappingType)
+ // -------------------------
+ MembershipPlainSchema(AttributableType.MEMBERSHIP),
+ MembershipDerivedSchema(AttributableType.MEMBERSHIP),
+ MembershipVirtualSchema(AttributableType.MEMBERSHIP),
+ MembershipId(AttributableType.MEMBERSHIP);
+
+ private AttributableType attributableType;
+
+ private IntMappingType(final AttributableType attributableType) {
+ this.attributableType = attributableType;
+ }
+
+ public AttributableType getAttributableType() {
+ return attributableType;
+ }
+
+ /**
+ * Get attribute types for a certain attributable type.
+ *
+ * @param attributableType attributable type
+ * @param toBeFiltered types to be filtered from the result.
+ * @return set of attribute types.
+ */
+ public static Set<IntMappingType> getAttributeTypes(
+ final AttributableType attributableType, final Collection<IntMappingType> toBeFiltered) {
+
+ final Set<IntMappingType> res = getAttributeTypes(attributableType);
+ res.removeAll(toBeFiltered);
+
+ return res;
+ }
+
+ /**
+ * Get attribute types for a certain attributable type.
+ *
+ * @param attributableType attributable type
+ * @return set of attribute types.
+ */
+ public static Set<IntMappingType> getAttributeTypes(final AttributableType attributableType) {
+ final EnumSet<?> enumset;
+
+ switch (attributableType) {
+ case ROLE:
+ enumset = EnumSet.allOf(RoleMappingType.class);
+ break;
+
+ case MEMBERSHIP:
+ enumset = EnumSet.allOf(MembershipMappingType.class);
+ break;
+
+ case USER:
+ default:
+ enumset = EnumSet.allOf(UserMappingType.class);
+ }
+
+ final Set<IntMappingType> result = new HashSet<IntMappingType>(enumset.size());
+ for (Object obj : enumset) {
+ result.add(IntMappingType.valueOf(obj.toString()));
+ }
+
+ return result;
+ }
+
+ public static Set<IntMappingType> getEmbedded() {
+ return EnumSet.of(
+ IntMappingType.UserId, IntMappingType.Username, IntMappingType.Password,
+ IntMappingType.RoleId, IntMappingType.RoleName, IntMappingType.RoleOwnerSchema,
+ IntMappingType.MembershipId);
+ }
+
+ /**
+ * Check if attribute type belongs to the specified attributable type set.
+ *
+ * @param attributableType attributable type.
+ * @param type attribute type.
+ * @return true if attribute type belongs to the specified attributable type set.
+ */
+ public static boolean contains(final AttributableType attributableType, final String type) {
+ switch (attributableType) {
+ case ROLE:
+ for (RoleMappingType c : RoleMappingType.values()) {
+ if (c.name().equals(type)) {
+ return true;
+ }
+ }
+ break;
+
+ case MEMBERSHIP:
+ for (MembershipMappingType c : MembershipMappingType.values()) {
+ if (c.name().equals(type)) {
+ return true;
+ }
+ }
+ break;
+
+ case USER:
+ default:
+ for (UserMappingType c : UserMappingType.values()) {
+ if (c.name().equals(type)) {
+ return true;
+ }
+ }
+ break;
+ }
+ return false;
+ }
+
+ /**
+ * User attribute types.
+ */
+ private enum UserMappingType {
+
+ UserPlainSchema,
+ UserDerivedSchema,
+ UserVirtualSchema,
+ UserId,
+ Username,
+ Password;
+
+ }
+
+ /**
+ * Role attribute types.
+ */
+ private enum RoleMappingType {
+
+ RolePlainSchema,
+ RoleDerivedSchema,
+ RoleVirtualSchema,
+ RoleId,
+ RoleName,
+ RoleOwnerSchema;
+
+ }
+
+ /**
+ * Membership attribute types.
+ */
+ private enum MembershipMappingType {
+
+ MembershipPlainSchema,
+ MembershipDerivedSchema,
+ MembershipVirtualSchema,
+ MembershipId;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/LoggerLevel.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/LoggerLevel.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/LoggerLevel.java
new file mode 100644
index 0000000..01f7d2e
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/LoggerLevel.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+import org.apache.logging.log4j.Level;
+
+@XmlEnum
+public enum LoggerLevel {
+
+ OFF(Level.OFF),
+ FATAL(Level.FATAL),
+ ERROR(Level.ERROR),
+ WARN(Level.WARN),
+ INFO(Level.INFO),
+ DEBUG(Level.DEBUG),
+ TRACE(Level.TRACE),
+ ALL(Level.ALL);
+
+ private final Level level;
+
+ LoggerLevel(final Level level) {
+ this.level = level;
+ }
+
+ public Level getLevel() {
+ return level;
+ }
+
+ public static LoggerLevel fromLevel(final Level level) {
+ return LoggerLevel.valueOf(level.name());
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/LoggerType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/LoggerType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/LoggerType.java
new file mode 100644
index 0000000..f77ed81
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/LoggerType.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum LoggerType {
+
+ /**
+ * This type describes a common logger used to handle system and application events.
+ */
+ LOG(""),
+ /**
+ * Audit logger only focus on security related events, usually logging how did what and when.
+ * In case of a security incident audit loggers should allow an administrator to recall all
+ * actions a certain user has done.
+ */
+ AUDIT("syncope.audit");
+
+ private String prefix;
+
+ LoggerType(final String prefix) {
+ this.prefix = prefix;
+ }
+
+ public String getPrefix() {
+ return prefix;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/MappingPurpose.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/MappingPurpose.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/MappingPurpose.java
new file mode 100644
index 0000000..dc8c23e
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/MappingPurpose.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+public enum MappingPurpose {
+
+ BOTH,
+ SYNCHRONIZATION,
+ PROPAGATION,
+ NONE
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/types/MatchingRule.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/MatchingRule.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/MatchingRule.java
new file mode 100644
index 0000000..39764d9
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/MatchingRule.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+/**
+ * Sync/Push task matching rule.
+ */
+@XmlEnum
+public enum MatchingRule {
+
+ /**
+ * Do not perform any action.
+ */
+ IGNORE,
+ /**
+ * Update matching entity.
+ */
+ UPDATE,
+ /**
+ * Delete resource entity.
+ */
+ DEPROVISION,
+ /**
+ * Unlink resource and delete resource entity.
+ */
+ UNASSIGN,
+ /**
+ * Just unlink resource without performing any (de-)provisioning operation.
+ */
+ UNLINK,
+ /**
+ * Just link resource without performing any (de-)provisioning operation.
+ */
+ LINK
+
+}
[18/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/lib/pom.xml
----------------------------------------------------------------------
diff --git a/client/lib/pom.xml b/client/lib/pom.xml
new file mode 100644
index 0000000..c4886be
--- /dev/null
+++ b/client/lib/pom.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.syncope</groupId>
+ <artifactId>syncope-client</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>Apache Syncope Client Lib</name>
+ <description>Apache Syncope Client Lib</description>
+ <groupId>org.apache.syncope.client</groupId>
+ <artifactId>syncope-client-lib</artifactId>
+ <packaging>jar</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-client</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-json-provider</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.syncope.common</groupId>
+ <artifactId>syncope-common-rest-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/lib/src/main/java/org/apache/syncope/client/lib/RestClientExceptionMapper.java
----------------------------------------------------------------------
diff --git a/client/lib/src/main/java/org/apache/syncope/client/lib/RestClientExceptionMapper.java b/client/lib/src/main/java/org/apache/syncope/client/lib/RestClientExceptionMapper.java
new file mode 100644
index 0000000..bb772bc
--- /dev/null
+++ b/client/lib/src/main/java/org/apache/syncope/client/lib/RestClientExceptionMapper.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.lib;
+
+import java.security.AccessControlException;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.ws.rs.BadRequestException;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.ExceptionMapper;
+import javax.ws.rs.ext.Provider;
+import javax.xml.ws.WebServiceException;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.cxf.jaxrs.client.ResponseExceptionMapper;
+import org.apache.syncope.common.lib.SyncopeClientCompositeException;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.types.ClientExceptionType;
+import org.apache.syncope.common.rest.api.RESTHeaders;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Provider
+public class RestClientExceptionMapper implements ExceptionMapper<Exception>, ResponseExceptionMapper<Exception> {
+
+ private static final Logger LOG = LoggerFactory.getLogger(RestClientExceptionMapper.class);
+
+ @Override
+ public Response toResponse(final Exception exception) {
+ throw new UnsupportedOperationException(
+ "Call of toResponse() method is not expected in RestClientExceptionnMapper");
+ }
+
+ @Override
+ public Exception fromResponse(final Response response) {
+ final int statusCode = response.getStatus();
+ Exception ex;
+
+ // 1. Check for client (possibly composite) exception in HTTP header
+ SyncopeClientCompositeException scce = checkSyncopeClientCompositeException(response);
+ if (scce != null) {
+ if (scce.getExceptions().size() == 1) {
+ ex = scce.getExceptions().iterator().next();
+ } else {
+ ex = scce;
+ }
+ } // 2. Map SC_UNAUTHORIZED
+ else if (statusCode == Response.Status.UNAUTHORIZED.getStatusCode()) {
+ ex = new AccessControlException("Remote unauthorized exception");
+ } // 3. Map SC_BAD_REQUEST
+ else if (statusCode == Response.Status.BAD_REQUEST.getStatusCode()) {
+ ex = new BadRequestException();
+ } // 4. All other codes are mapped to runtime exception with HTTP code information
+ else {
+ ex = new WebServiceException(String.format("Remote exception with status code: %s",
+ Response.Status.fromStatusCode(statusCode).name()));
+ }
+ LOG.error("Exception thrown by REST methods: " + ex.getMessage(), ex);
+ return ex;
+ }
+
+ private SyncopeClientCompositeException checkSyncopeClientCompositeException(final Response response) {
+ List<Object> exTypesInHeaders = response.getHeaders().get(RESTHeaders.ERROR_CODE);
+ if (exTypesInHeaders == null) {
+ LOG.debug("No " + RESTHeaders.ERROR_CODE + " provided");
+ return null;
+ }
+
+ final SyncopeClientCompositeException compException = SyncopeClientException.buildComposite();
+
+ final Set<String> handledExceptions = new HashSet<String>();
+ for (Object exceptionTypeValue : exTypesInHeaders) {
+ final String exTypeAsString = (String) exceptionTypeValue;
+ ClientExceptionType exceptionType = null;
+ try {
+ exceptionType = ClientExceptionType.fromHeaderValue(exTypeAsString);
+ } catch (IllegalArgumentException e) {
+ LOG.error("Unexpected value of " + RESTHeaders.ERROR_CODE + ": " + exTypeAsString, e);
+ }
+ if (exceptionType != null) {
+ handledExceptions.add(exTypeAsString);
+
+ final SyncopeClientException clientException = SyncopeClientException.build(exceptionType);
+
+ if (response.getHeaders().get(RESTHeaders.ERROR_INFO) != null
+ && !response.getHeaders().get(RESTHeaders.ERROR_INFO).isEmpty()) {
+
+ for (Object value : response.getHeaders().get(RESTHeaders.ERROR_INFO)) {
+ final String element = value.toString();
+ if (element.startsWith(exceptionType.getHeaderValue())) {
+ clientException.getElements().add(StringUtils.substringAfter(value.toString(), ":"));
+ }
+ }
+ }
+ compException.addException(clientException);
+ }
+ }
+
+ exTypesInHeaders.removeAll(handledExceptions);
+ if (!exTypesInHeaders.isEmpty()) {
+ LOG.error("Unmanaged exceptions: " + exTypesInHeaders);
+ }
+
+ if (compException.hasExceptions()) {
+ return compException;
+ }
+
+ return null;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/lib/src/main/java/org/apache/syncope/client/lib/RestClientFactoryBean.java
----------------------------------------------------------------------
diff --git a/client/lib/src/main/java/org/apache/syncope/client/lib/RestClientFactoryBean.java b/client/lib/src/main/java/org/apache/syncope/client/lib/RestClientFactoryBean.java
new file mode 100644
index 0000000..4d77f2f
--- /dev/null
+++ b/client/lib/src/main/java/org/apache/syncope/client/lib/RestClientFactoryBean.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.lib;
+
+import javax.ws.rs.core.MediaType;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
+import org.apache.cxf.jaxrs.client.WebClient;
+
+/**
+ * Provides shortcuts for creating JAX-RS service instances via CXF's <tt>JAXRSClientFactoryBean</tt>.
+ */
+public class RestClientFactoryBean extends JAXRSClientFactoryBean {
+
+ /**
+ * Creates an anonymous instance of the given service class, for the given content type.
+ *
+ * @param <T> any service class
+ * @param serviceClass service class reference
+ * @param mediaType XML or JSON are suppoorted
+ * @return anonymous service instance of the given reference class
+ */
+ public <T> T createServiceInstance(final Class<T> serviceClass, final MediaType mediaType) {
+ return createServiceInstance(serviceClass, mediaType, null, null);
+ }
+
+ /**
+ * Creates an authenticated instance of the given service class, for the given content type.
+ *
+ * @param <T> any service class
+ * @param serviceClass service class reference
+ * @param mediaType XML or JSON are suppoorted
+ * @param username username for REST authentication
+ * @param password password for REST authentication
+ * @return anonymous service instance of the given reference class
+ */
+ public <T> T createServiceInstance(
+ final Class<T> serviceClass, final MediaType mediaType, final String username, final String password) {
+
+ if (StringUtils.isNotBlank(username)) {
+ setUsername(username);
+ }
+ if (StringUtils.isNotBlank(password)) {
+ setPassword(password);
+ }
+ setServiceClass(serviceClass);
+ final T serviceInstance = create(serviceClass);
+ WebClient.client(serviceInstance).type(mediaType).accept(mediaType);
+ return serviceInstance;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClient.java
----------------------------------------------------------------------
diff --git a/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClient.java b/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClient.java
new file mode 100644
index 0000000..43c2fea
--- /dev/null
+++ b/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClient.java
@@ -0,0 +1,214 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.lib;
+
+import javax.ws.rs.core.EntityTag;
+import javax.ws.rs.core.MediaType;
+import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.syncope.common.lib.search.OrderByClauseBuilder;
+import org.apache.syncope.common.lib.search.RoleFiqlSearchConditionBuilder;
+import org.apache.syncope.common.lib.search.UserFiqlSearchConditionBuilder;
+import org.apache.syncope.common.rest.api.Preference;
+import org.apache.syncope.common.rest.api.RESTHeaders;
+
+/**
+ * Entry point for client access to all REST services exposed by Syncope core; obtain instances via
+ * {@link SyncopeClientFactoryBean}.
+ */
+public class SyncopeClient {
+
+ private final MediaType mediaType;
+
+ private final RestClientFactoryBean restClientFactory;
+
+ private final String username;
+
+ private final String password;
+
+ public SyncopeClient(final MediaType mediaType, final RestClientFactoryBean restClientFactory,
+ final String username, final String password) {
+
+ this.mediaType = mediaType;
+ this.restClientFactory = restClientFactory;
+ this.username = username;
+ this.password = password;
+ }
+
+ /**
+ * Returns a new instance of <tt>UserFiqlSearchConditionBuilder</tt>, for assisted building of FIQL queries.
+ *
+ * @return default instance of <tt>UserFiqlSearchConditionBuilder</tt>
+ */
+ public static UserFiqlSearchConditionBuilder getUserSearchConditionBuilder() {
+ return new UserFiqlSearchConditionBuilder();
+ }
+
+ /**
+ * Returns a new instance of <tt>RoleFiqlSearchConditionBuilder</tt>, for assisted building of FIQL queries.
+ *
+ * @return default instance of <tt>RoleFiqlSearchConditionBuilder</tt>
+ */
+ public static RoleFiqlSearchConditionBuilder getRoleSearchConditionBuilder() {
+ return new RoleFiqlSearchConditionBuilder();
+ }
+
+ /**
+ * Returns a new instance of <tt>OrderByClauseBuilder</tt>, for assisted building of <tt>orderby</tt> clauses.
+ *
+ * @return default instance of <tt>OrderByClauseBuilder</tt>
+ */
+ public static OrderByClauseBuilder getOrderByClauseBuilder() {
+ return new OrderByClauseBuilder();
+ }
+
+ /**
+ * Creates an instance of the given service class, with configured content type and authentication.
+ *
+ * @param <T> any service class
+ * @param serviceClass service class reference
+ * @return service instance of the given reference class
+ */
+ public <T> T getService(final Class<T> serviceClass) {
+ return restClientFactory.createServiceInstance(serviceClass, mediaType, username, password);
+ }
+
+ /**
+ * Sets the given header on the give service instance.
+ *
+ * @param <T> any service class
+ * @param service service class instance
+ * @param key HTTP header key
+ * @param values HTTP header values
+ * @return given service instance, with given header set
+ */
+ public <T> T header(final T service, final String key, final Object... values) {
+ WebClient.client(service).header(key, values);
+ return service;
+ }
+
+ /**
+ * Creates an instance of the given service class and sets the given header.
+ *
+ * @param <T> any service class
+ * @param serviceClass service class reference
+ * @param key HTTP header key
+ * @param values HTTP header values
+ * @return service instance of the given reference class, with given header set
+ */
+ public <T> T header(final Class<T> serviceClass, final String key, final Object... values) {
+ return header(getService(serviceClass), key, values);
+ }
+
+ /**
+ * Sets the <tt>Prefer</tt> header on the give service instance.
+ *
+ * @param <T> any service class
+ * @param service service class instance
+ * @param preference preference to be set via <tt>Prefer</tt> header
+ * @return given service instance, with <tt>Prefer</tt> header set
+ */
+ public <T> T prefer(final T service, final Preference preference) {
+ return header(service, RESTHeaders.PREFER, preference.toString());
+ }
+
+ /**
+ * Creates an instance of the given service class, with <tt>Prefer</tt> header set.
+ *
+ * @param <T> any service class
+ * @param serviceClass service class reference
+ * @param preference preference to be set via <tt>Prefer</tt> header
+ * @return service instance of the given reference class, with <tt>Prefer</tt> header set
+ */
+ public <T> T prefer(final Class<T> serviceClass, final Preference preference) {
+ return header(serviceClass, RESTHeaders.PREFER, preference.toString());
+ }
+
+ /**
+ * Sets the <tt>If-Match</tt> or <tt>If-None-Match</tt> header on the given service instance.
+ *
+ * @param <T> any service class
+ * @param service service class instance
+ * @param etag ETag value
+ * @param ifNot if true then <tt>If-None-Match</tt> is set, <tt>If-Match</tt> otherwise
+ * @return given service instance, with <tt>If-Match</tt> or <tt>If-None-Match</tt> set
+ */
+ private <T> T match(final T service, final EntityTag etag, final boolean ifNot) {
+ WebClient.client(service).match(etag, ifNot);
+ return service;
+ }
+
+ /**
+ * Sets the <tt>If-Match</tt> header on the given service instance.
+ *
+ * @param <T> any service class
+ * @param service service class instance
+ * @param etag ETag value
+ * @return given service instance, with <tt>If-Match</tt> set
+ */
+ public <T> T ifMatch(final T service, final EntityTag etag) {
+ return match(service, etag, false);
+ }
+
+ /**
+ * Creates an instance of the given service class, with <tt>If-Match</tt> header set.
+ *
+ * @param <T> any service class
+ * @param serviceClass service class reference
+ * @param etag ETag value
+ * @return given service instance, with <tt>If-Match</tt> set
+ */
+ public <T> T ifMatch(final Class<T> serviceClass, final EntityTag etag) {
+ return match(getService(serviceClass), etag, false);
+ }
+
+ /**
+ * Sets the <tt>If-None-Match</tt> header on the given service instance.
+ *
+ * @param <T> any service class
+ * @param service service class instance
+ * @param etag ETag value
+ * @return given service instance, with <tt>If-None-Match</tt> set
+ */
+ public <T> T ifNoneMatch(final T service, final EntityTag etag) {
+ return match(service, etag, true);
+ }
+
+ /**
+ * Creates an instance of the given service class, with <tt>If-None-Match</tt> header set.
+ *
+ * @param <T> any service class
+ * @param serviceClass service class reference
+ * @param etag ETag value
+ * @return given service instance, with <tt>If-None-Match</tt> set
+ */
+ public <T> T ifNoneMatch(final Class<T> serviceClass, final EntityTag etag) {
+ return match(getService(serviceClass), etag, true);
+ }
+
+ /**
+ * Fetches <tt>ETag</tt> header value from latest service run (if available).
+ *
+ * @param <T> any service class
+ * @param service service class instance
+ * @return <tt>ETag</tt> header value from latest service run (if available)
+ */
+ public <T> EntityTag getLatestEntityTag(final T service) {
+ return WebClient.client(service).getResponse().getEntityTag();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
----------------------------------------------------------------------
diff --git a/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java b/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
new file mode 100644
index 0000000..53e0fda
--- /dev/null
+++ b/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.lib;
+
+import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.ws.rs.core.MediaType;
+import javax.xml.bind.Marshaller;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.cxf.feature.Feature;
+import org.apache.cxf.feature.LoggingFeature;
+import org.apache.cxf.jaxrs.provider.JAXBElementProvider;
+import org.apache.cxf.staxutils.DocumentDepthProperties;
+import org.apache.syncope.common.lib.to.AbstractPolicyTO;
+
+/**
+ * Factory bean for creating instances of {@link SyncopeClient}.
+ * Supports Spring-bean configuration and override via subclassing (see protected methods).
+ */
+public class SyncopeClientFactoryBean {
+
+ public enum ContentType {
+
+ JSON(MediaType.APPLICATION_JSON_TYPE),
+ XML(MediaType.APPLICATION_XML_TYPE);
+
+ private final MediaType mediaType;
+
+ private ContentType(final MediaType mediaType) {
+ this.mediaType = mediaType;
+ }
+
+ public MediaType getMediaType() {
+ return mediaType;
+ }
+
+ public static ContentType fromString(final String value) {
+ return StringUtils.isNotBlank(value) && value.equalsIgnoreCase(XML.getMediaType().toString())
+ ? XML
+ : JSON;
+ }
+ }
+
+ private JacksonJaxbJsonProvider jsonProvider;
+
+ @SuppressWarnings("rawtypes")
+ private JAXBElementProvider jaxbProvider;
+
+ private RestClientExceptionMapper exceptionMapper;
+
+ private String address;
+
+ private ContentType contentType;
+
+ private RestClientFactoryBean restClientFactoryBean;
+
+ protected JacksonJaxbJsonProvider defaultJsonProvider() {
+ return new JacksonJaxbJsonProvider();
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ protected JAXBElementProvider defaultJAXBProvider() {
+ JAXBElementProvider defaultJAXBProvider = new JAXBElementProvider();
+
+ DocumentDepthProperties depthProperties = new DocumentDepthProperties();
+ depthProperties.setInnerElementCountThreshold(500);
+ defaultJAXBProvider.setDepthProperties(depthProperties);
+
+ Map marshallerProperties = new HashMap();
+ marshallerProperties.put(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+ defaultJAXBProvider.setMarshallerProperties(marshallerProperties);
+
+ Map<String, String> collectionWrapperMap = new HashMap<String, String>();
+ collectionWrapperMap.put(AbstractPolicyTO.class.getName(), "policies");
+ defaultJAXBProvider.setCollectionWrapperMap(collectionWrapperMap);
+
+ return defaultJAXBProvider;
+ }
+
+ protected RestClientExceptionMapper defaultExceptionMapper() {
+ return new RestClientExceptionMapper();
+ }
+
+ protected RestClientFactoryBean defaultRestClientFactoryBean() {
+ RestClientFactoryBean defaultRestClientFactoryBean = new RestClientFactoryBean();
+
+ if (StringUtils.isBlank(address)) {
+ throw new IllegalArgumentException("Property 'address' is missing");
+ }
+ defaultRestClientFactoryBean.setAddress(address);
+
+ defaultRestClientFactoryBean.setThreadSafe(true);
+ defaultRestClientFactoryBean.setInheritHeaders(true);
+
+ List<Feature> features = new ArrayList<Feature>();
+ features.add(new LoggingFeature());
+ defaultRestClientFactoryBean.setFeatures(features);
+
+ List<Object> providers = new ArrayList<Object>(3);
+ providers.add(getJaxbProvider());
+ providers.add(getJsonProvider());
+ providers.add(getExceptionMapper());
+ defaultRestClientFactoryBean.setProviders(providers);
+
+ return defaultRestClientFactoryBean;
+ }
+
+ public JacksonJaxbJsonProvider getJsonProvider() {
+ return jsonProvider == null
+ ? defaultJsonProvider()
+ : jsonProvider;
+ }
+
+ public void setJsonProvider(final JacksonJaxbJsonProvider jsonProvider) {
+ this.jsonProvider = jsonProvider;
+ }
+
+ public JAXBElementProvider getJaxbProvider() {
+ return jaxbProvider == null
+ ? defaultJAXBProvider()
+ : jaxbProvider;
+ }
+
+ public SyncopeClientFactoryBean setJaxbProvider(final JAXBElementProvider jaxbProvider) {
+ this.jaxbProvider = jaxbProvider;
+ return this;
+ }
+
+ public RestClientExceptionMapper getExceptionMapper() {
+ return exceptionMapper == null
+ ? defaultExceptionMapper()
+ : exceptionMapper;
+ }
+
+ public SyncopeClientFactoryBean setExceptionMapper(final RestClientExceptionMapper exceptionMapper) {
+ this.exceptionMapper = exceptionMapper;
+ return this;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public SyncopeClientFactoryBean setAddress(final String address) {
+ this.address = address;
+ return this;
+ }
+
+ public ContentType getContentType() {
+ return contentType == null
+ ? ContentType.JSON
+ : contentType;
+ }
+
+ public SyncopeClientFactoryBean setContentType(final ContentType contentType) {
+ this.contentType = contentType;
+ return this;
+ }
+
+ public SyncopeClientFactoryBean setContentType(final String contentType) {
+ this.contentType = ContentType.fromString(contentType);
+ return this;
+ }
+
+ public RestClientFactoryBean getRestClientFactoryBean() {
+ return restClientFactoryBean == null
+ ? defaultRestClientFactoryBean()
+ : restClientFactoryBean;
+ }
+
+ public SyncopeClientFactoryBean setRestClientFactoryBean(final RestClientFactoryBean restClientFactoryBean) {
+ this.restClientFactoryBean = restClientFactoryBean;
+ return this;
+ }
+
+ public SyncopeClient createAnonymous() {
+ return create(null, null);
+ }
+
+ public SyncopeClient create(final String username, final String password) {
+ return new SyncopeClient(getContentType().getMediaType(), getRestClientFactoryBean(), username, password);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
index f618315..78bfcbd 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -31,89 +31,12 @@ under the License.
<description>Apache Syncope Client</description>
<groupId>org.apache.syncope</groupId>
<artifactId>syncope-client</artifactId>
- <packaging>bundle</packaging>
+ <packaging>pom</packaging>
- <distributionManagement>
- <site>
- <id>syncope.website</id>
- <name>Apache Syncope website</name>
- <url>${site.deploymentBaseUrl}/${project.artifactId}</url>
- </site>
- </distributionManagement>
+ <modules>
+ <module>lib</module>
+ <module>console</module>
+ <module>cli</module>
+ </modules>
- <dependencies>
- <dependency>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-common</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-client</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.fasterxml.jackson.jaxrs</groupId>
- <artifactId>jackson-jaxrs-json-provider</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-Name>${project.name}</Bundle-Name>
- <Bundle-SymbolicName>org.apache.syncope.client</Bundle-SymbolicName>
- <Bundle-Version>${project.version}</Bundle-Version>
- <Export-Package>
- org.apache.syncope.client*;version=${project.version};-split-package:=merge-first
- </Export-Package>
- <Import-Package>
- com.fasterxml.jackson*;version="[2.2.2,2.3)",
- org.slf4j;resolution:=optional,
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- </plugin>
- </plugins>
-
- <resources>
- <resource>
- <directory>..</directory>
- <targetPath>META-INF</targetPath>
- <includes>
- <include>LICENSE</include>
- <include>NOTICE</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/resources/META-INF</directory>
- <targetPath>META-INF</targetPath>
- </resource>
- </resources>
- </build>
</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/src/main/java/org/apache/syncope/client/SyncopeClient.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/syncope/client/SyncopeClient.java b/client/src/main/java/org/apache/syncope/client/SyncopeClient.java
deleted file mode 100644
index f955951..0000000
--- a/client/src/main/java/org/apache/syncope/client/SyncopeClient.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.client;
-
-import javax.ws.rs.core.EntityTag;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.syncope.client.rest.RestClientFactoryBean;
-import org.apache.syncope.common.search.OrderByClauseBuilder;
-import org.apache.syncope.common.search.RoleFiqlSearchConditionBuilder;
-import org.apache.syncope.common.search.UserFiqlSearchConditionBuilder;
-import org.apache.syncope.common.services.RouteService;
-import org.apache.syncope.common.services.UserSelfService;
-import org.apache.syncope.common.services.WorkflowService;
-import org.apache.syncope.common.types.Preference;
-import org.apache.syncope.common.types.RESTHeaders;
-import org.apache.syncope.common.types.SubjectType;
-
-/**
- * Entry point for client access to all REST services exposed by Syncope core; obtain instances via
- * <tt>SyncopeClientFactoryBean</tt>.
- *
- * @see SyncopeClientFactoryBean
- */
-public class SyncopeClient {
-
- private final MediaType mediaType;
-
- private final RestClientFactoryBean restClientFactory;
-
- private final String username;
-
- private final String password;
-
- public SyncopeClient(final MediaType mediaType, final RestClientFactoryBean restClientFactory,
- final String username, final String password) {
-
- this.mediaType = mediaType;
- this.restClientFactory = restClientFactory;
- this.username = username;
- this.password = password;
- }
-
- /**
- * Returns a new instance of <tt>UserFiqlSearchConditionBuilder</tt>, for assisted building of FIQL queries.
- *
- * @return default instance of <tt>UserFiqlSearchConditionBuilder</tt>
- */
- public static UserFiqlSearchConditionBuilder getUserSearchConditionBuilder() {
- return new UserFiqlSearchConditionBuilder();
- }
-
- /**
- * Returns a new instance of <tt>RoleFiqlSearchConditionBuilder</tt>, for assisted building of FIQL queries.
- *
- * @return default instance of <tt>RoleFiqlSearchConditionBuilder</tt>
- */
- public static RoleFiqlSearchConditionBuilder getRoleSearchConditionBuilder() {
- return new RoleFiqlSearchConditionBuilder();
- }
-
- /**
- * Returns a new instance of <tt>OrderByClauseBuilder</tt>, for assisted building of <tt>orderby</tt> clauses.
- *
- * @return default instance of <tt>OrderByClauseBuilder</tt>
- */
- public static OrderByClauseBuilder getOrderByClauseBuilder() {
- return new OrderByClauseBuilder();
- }
-
- /**
- * Creates an instance of the given service class, with configured content type and authentication.
- *
- * @param <T> any service class
- * @param serviceClass service class reference
- * @return service instance of the given reference class
- */
- public <T> T getService(final Class<T> serviceClass) {
- return restClientFactory.createServiceInstance(serviceClass, mediaType, username, password);
- }
-
- /**
- * Sets the given header on the give service instance.
- *
- * @param <T> any service class
- * @param service service class instance
- * @param key HTTP header key
- * @param values HTTP header values
- * @return given service instance, with given header set
- */
- public <T> T header(final T service, final String key, final Object... values) {
- WebClient.client(service).header(key, values);
- return service;
- }
-
- /**
- * Creates an instance of the given service class and sets the given header.
- *
- * @param <T> any service class
- * @param serviceClass service class reference
- * @param key HTTP header key
- * @param values HTTP header values
- * @return service instance of the given reference class, with given header set
- */
- public <T> T header(final Class<T> serviceClass, final String key, final Object... values) {
- return header(getService(serviceClass), key, values);
- }
-
- /**
- * Sets the <tt>Prefer</tt> header on the give service instance.
- *
- * @param <T> any service class
- * @param service service class instance
- * @param preference preference to be set via <tt>Prefer</tt> header
- * @return given service instance, with <tt>Prefer</tt> header set
- */
- public <T> T prefer(final T service, final Preference preference) {
- return header(service, RESTHeaders.PREFER, preference.toString());
- }
-
- /**
- * Creates an instance of the given service class, with <tt>Prefer</tt> header set.
- *
- * @param <T> any service class
- * @param serviceClass service class reference
- * @param preference preference to be set via <tt>Prefer</tt> header
- * @return service instance of the given reference class, with <tt>Prefer</tt> header set
- */
- public <T> T prefer(final Class<T> serviceClass, final Preference preference) {
- return header(serviceClass, RESTHeaders.PREFER, preference.toString());
- }
-
- /**
- * Sets the <tt>If-Match</tt> or <tt>If-None-Match</tt> header on the given service instance.
- *
- * @param <T> any service class
- * @param service service class instance
- * @param etag ETag value
- * @param ifNot if true then <tt>If-None-Match</tt> is set, <tt>If-Match</tt> otherwise
- * @return given service instance, with <tt>If-Match</tt> or <tt>If-None-Match</tt> set
- */
- private <T> T match(final T service, final EntityTag etag, final boolean ifNot) {
- WebClient.client(service).match(etag, ifNot);
- return service;
- }
-
- /**
- * Sets the <tt>If-Match</tt> header on the given service instance.
- *
- * @param <T> any service class
- * @param service service class instance
- * @param etag ETag value
- * @return given service instance, with <tt>If-Match</tt> set
- */
- public <T> T ifMatch(final T service, final EntityTag etag) {
- return match(service, etag, false);
- }
-
- /**
- * Creates an instance of the given service class, with <tt>If-Match</tt> header set.
- *
- * @param <T> any service class
- * @param serviceClass service class reference
- * @param etag ETag value
- * @return given service instance, with <tt>If-Match</tt> set
- */
- public <T> T ifMatch(final Class<T> serviceClass, final EntityTag etag) {
- return match(getService(serviceClass), etag, false);
- }
-
- /**
- * Sets the <tt>If-None-Match</tt> header on the given service instance.
- *
- * @param <T> any service class
- * @param service service class instance
- * @param etag ETag value
- * @return given service instance, with <tt>If-None-Match</tt> set
- */
- public <T> T ifNoneMatch(final T service, final EntityTag etag) {
- return match(service, etag, true);
- }
-
- /**
- * Creates an instance of the given service class, with <tt>If-None-Match</tt> header set.
- *
- * @param <T> any service class
- * @param serviceClass service class reference
- * @param etag ETag value
- * @return given service instance, with <tt>If-None-Match</tt> set
- */
- public <T> T ifNoneMatch(final Class<T> serviceClass, final EntityTag etag) {
- return match(getService(serviceClass), etag, true);
- }
-
- /**
- * Checks whether self-registration is allowed by calling <tt>UserSelfService</tt>'s options.
- *
- * @return whether self-registration is allowed
- * @see UserSelfService#getOptions()
- */
- public boolean isSelfRegAllowed() {
- return Boolean.valueOf(restClientFactory.createServiceInstance(UserSelfService.class, mediaType, null, null).
- getOptions().getHeaderString(RESTHeaders.SELFREG_ALLOWED));
- }
-
- /**
- * Checks whether password reset is allowed by calling <tt>UserSelfService</tt>'s options.
- *
- * @return whether password reset is allowed
- * @see UserSelfService#getOptions()
- */
- public boolean isPwdResetAllowed() {
- return Boolean.valueOf(restClientFactory.createServiceInstance(UserSelfService.class, mediaType, null, null).
- getOptions().getHeaderString(RESTHeaders.PWDRESET_ALLOWED));
- }
-
- /**
- * Checks whether password reset requires security question by calling <tt>UserSelfService</tt>'s options.
- *
- * @return whether password reset requires security question
- * @see UserSelfService#getOptions()
- */
- public boolean isPwdResetRequiringSecurityQuestions() {
- return Boolean.valueOf(restClientFactory.createServiceInstance(UserSelfService.class, mediaType, null, null).
- getOptions().getHeaderString(RESTHeaders.PWDRESET_NEEDS_SECURITYQUESTIONS));
- }
-
- /**
- * Checks whether Activiti workflow is enabled for users / roles, by calling <tt>WorkflowService</tt>'s options.
- *
- * @param subjectType user / role
- * @return whether Activiti workflow is enabled for given attributable type
- * @see WorkflowService#getOptions(org.apache.syncope.common.types.SubjectType)
- */
- public boolean isActivitiEnabledFor(final SubjectType subjectType) {
- Response options = getService(WorkflowService.class).getOptions(subjectType);
-
- boolean result;
- switch (subjectType) {
- case ROLE:
- result = Boolean.valueOf(options.getHeaderString(RESTHeaders.ACTIVITI_ROLE_ENABLED));
- break;
-
- case USER:
- default:
- result = Boolean.valueOf(options.getHeaderString(RESTHeaders.ACTIVITI_USER_ENABLED));
- break;
- }
-
- return result;
- }
-
- /**
- * Checks whether Camel is enabled for users / roles, by calling <tt>RouteService</tt>'s options.
- *
- * @param subjectType user / role
- * @return whether Camel Provisioning is enabled for given attributable type
- * @see RouteService#getOptions(org.apache.syncope.common.types.SubjectType)
- */
- public boolean isCamelEnabledFor(final SubjectType subjectType) {
- Response options = getService(RouteService.class).getOptions(subjectType);
-
- boolean result;
- switch (subjectType) {
- case ROLE:
- result = Boolean.valueOf(options.getHeaderString(RESTHeaders.CAMEL_ROLE_PROVISIONING_MANAGER));
- break;
-
- case USER:
- default:
- result = Boolean.valueOf(options.getHeaderString(RESTHeaders.CAMEL_USER_PROVISIONING_MANAGER));
- break;
- }
-
- return result;
- }
-
- /**
- * Fetches <tt>ETag</tt> header value from latest service run (if available).
- *
- * @param <T> any service class
- * @param service service class instance
- * @return <tt>ETag</tt> header value from latest service run (if available)
- */
- public <T> EntityTag getLatestEntityTag(final T service) {
- return WebClient.client(service).getResponse().getEntityTag();
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/src/main/java/org/apache/syncope/client/SyncopeClientFactoryBean.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/syncope/client/SyncopeClientFactoryBean.java b/client/src/main/java/org/apache/syncope/client/SyncopeClientFactoryBean.java
deleted file mode 100644
index 234625b..0000000
--- a/client/src/main/java/org/apache/syncope/client/SyncopeClientFactoryBean.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.client;
-
-import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.ws.rs.core.MediaType;
-import javax.xml.bind.Marshaller;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.cxf.feature.Feature;
-import org.apache.cxf.feature.LoggingFeature;
-import org.apache.cxf.jaxrs.provider.JAXBElementProvider;
-import org.apache.cxf.staxutils.DocumentDepthProperties;
-import org.apache.syncope.client.rest.RestClientExceptionMapper;
-import org.apache.syncope.client.rest.RestClientFactoryBean;
-import org.apache.syncope.common.to.AbstractPolicyTO;
-
-/**
- * Factory bean for creating instances of <tt>SyncopeClient</tt>.
- * Supports Spring-bean configuration and override via subclassing (see protected methods).
- */
-public class SyncopeClientFactoryBean {
-
- public enum ContentType {
-
- JSON(MediaType.APPLICATION_JSON_TYPE),
- XML(MediaType.APPLICATION_XML_TYPE);
-
- private final MediaType mediaType;
-
- private ContentType(final MediaType mediaType) {
- this.mediaType = mediaType;
- }
-
- public MediaType getMediaType() {
- return mediaType;
- }
-
- public static ContentType fromString(final String value) {
- return StringUtils.isNotBlank(value) && value.equalsIgnoreCase(XML.getMediaType().toString())
- ? XML
- : JSON;
- }
- }
-
- private JacksonJaxbJsonProvider jsonProvider;
-
- @SuppressWarnings("rawtypes")
- private JAXBElementProvider jaxbProvider;
-
- private RestClientExceptionMapper exceptionMapper;
-
- private String address;
-
- private ContentType contentType;
-
- private RestClientFactoryBean restClientFactoryBean;
-
- protected JacksonJaxbJsonProvider defaultJsonProvider() {
- return new JacksonJaxbJsonProvider();
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- protected JAXBElementProvider defaultJAXBProvider() {
- JAXBElementProvider defaultJAXBProvider = new JAXBElementProvider();
-
- DocumentDepthProperties depthProperties = new DocumentDepthProperties();
- depthProperties.setInnerElementCountThreshold(500);
- defaultJAXBProvider.setDepthProperties(depthProperties);
-
- Map marshallerProperties = new HashMap();
- marshallerProperties.put(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
- defaultJAXBProvider.setMarshallerProperties(marshallerProperties);
-
- Map<String, String> collectionWrapperMap = new HashMap<String, String>();
- collectionWrapperMap.put(AbstractPolicyTO.class.getName(), "policies");
- defaultJAXBProvider.setCollectionWrapperMap(collectionWrapperMap);
-
- return defaultJAXBProvider;
- }
-
- protected RestClientExceptionMapper defaultExceptionMapper() {
- return new RestClientExceptionMapper();
- }
-
- protected RestClientFactoryBean defaultRestClientFactoryBean() {
- RestClientFactoryBean defaultRestClientFactoryBean = new RestClientFactoryBean();
-
- if (StringUtils.isBlank(address)) {
- throw new IllegalArgumentException("Property 'address' is missing");
- }
- defaultRestClientFactoryBean.setAddress(address);
-
- defaultRestClientFactoryBean.setThreadSafe(true);
- defaultRestClientFactoryBean.setInheritHeaders(true);
-
- List<Feature> features = new ArrayList<Feature>();
- features.add(new LoggingFeature());
- defaultRestClientFactoryBean.setFeatures(features);
-
- List<Object> providers = new ArrayList<Object>(3);
- providers.add(getJaxbProvider());
- providers.add(getJsonProvider());
- providers.add(getExceptionMapper());
- defaultRestClientFactoryBean.setProviders(providers);
-
- return defaultRestClientFactoryBean;
- }
-
- public JacksonJaxbJsonProvider getJsonProvider() {
- return jsonProvider == null
- ? defaultJsonProvider()
- : jsonProvider;
- }
-
- public void setJsonProvider(final JacksonJaxbJsonProvider jsonProvider) {
- this.jsonProvider = jsonProvider;
- }
-
- public JAXBElementProvider getJaxbProvider() {
- return jaxbProvider == null
- ? defaultJAXBProvider()
- : jaxbProvider;
- }
-
- public SyncopeClientFactoryBean setJaxbProvider(final JAXBElementProvider jaxbProvider) {
- this.jaxbProvider = jaxbProvider;
- return this;
- }
-
- public RestClientExceptionMapper getExceptionMapper() {
- return exceptionMapper == null
- ? defaultExceptionMapper()
- : exceptionMapper;
- }
-
- public SyncopeClientFactoryBean setExceptionMapper(final RestClientExceptionMapper exceptionMapper) {
- this.exceptionMapper = exceptionMapper;
- return this;
- }
-
- public String getAddress() {
- return address;
- }
-
- public SyncopeClientFactoryBean setAddress(final String address) {
- this.address = address;
- return this;
- }
-
- public ContentType getContentType() {
- return contentType == null
- ? ContentType.JSON
- : contentType;
- }
-
- public SyncopeClientFactoryBean setContentType(final ContentType contentType) {
- this.contentType = contentType;
- return this;
- }
-
- public SyncopeClientFactoryBean setContentType(final String contentType) {
- this.contentType = ContentType.fromString(contentType);
- return this;
- }
-
- public RestClientFactoryBean getRestClientFactoryBean() {
- return restClientFactoryBean == null
- ? defaultRestClientFactoryBean()
- : restClientFactoryBean;
- }
-
- public SyncopeClientFactoryBean setRestClientFactoryBean(final RestClientFactoryBean restClientFactoryBean) {
- this.restClientFactoryBean = restClientFactoryBean;
- return this;
- }
-
- public SyncopeClient createAnonymous() {
- return create(null, null);
- }
-
- public SyncopeClient create(final String username, final String password) {
- return new SyncopeClient(getContentType().getMediaType(), getRestClientFactoryBean(), username, password);
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java b/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java
deleted file mode 100644
index 1a9d2ef..0000000
--- a/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.client.rest;
-
-import java.security.AccessControlException;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import javax.ws.rs.BadRequestException;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.ext.ExceptionMapper;
-import javax.ws.rs.ext.Provider;
-import javax.xml.ws.WebServiceException;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.cxf.jaxrs.client.ResponseExceptionMapper;
-import org.apache.syncope.common.types.ClientExceptionType;
-import org.apache.syncope.common.types.RESTHeaders;
-import org.apache.syncope.common.SyncopeClientCompositeException;
-import org.apache.syncope.common.SyncopeClientException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@Provider
-public class RestClientExceptionMapper implements ExceptionMapper<Exception>, ResponseExceptionMapper<Exception> {
-
- private static final Logger LOG = LoggerFactory.getLogger(RestClientExceptionMapper.class);
-
- @Override
- public Response toResponse(final Exception exception) {
- throw new UnsupportedOperationException(
- "Call of toResponse() method is not expected in RestClientExceptionnMapper");
- }
-
- @Override
- public Exception fromResponse(final Response response) {
- final int statusCode = response.getStatus();
- Exception ex;
-
- // 1. Check for client (possibly composite) exception in HTTP header
- SyncopeClientCompositeException scce = checkSyncopeClientCompositeException(response);
- if (scce != null) {
- if (scce.getExceptions().size() == 1) {
- ex = scce.getExceptions().iterator().next();
- } else {
- ex = scce;
- }
- } // 2. Map SC_UNAUTHORIZED
- else if (statusCode == Response.Status.UNAUTHORIZED.getStatusCode()) {
- ex = new AccessControlException("Remote unauthorized exception");
- } // 3. Map SC_BAD_REQUEST
- else if (statusCode == Response.Status.BAD_REQUEST.getStatusCode()) {
- ex = new BadRequestException();
- } // 4. All other codes are mapped to runtime exception with HTTP code information
- else {
- ex = new WebServiceException(String.format("Remote exception with status code: %s",
- Response.Status.fromStatusCode(statusCode).name()));
- }
- LOG.error("Exception thrown by REST methods: " + ex.getMessage(), ex);
- return ex;
- }
-
- private SyncopeClientCompositeException checkSyncopeClientCompositeException(final Response response) {
- List<Object> exTypesInHeaders = response.getHeaders().get(RESTHeaders.ERROR_CODE);
- if (exTypesInHeaders == null) {
- LOG.debug("No " + RESTHeaders.ERROR_CODE + " provided");
- return null;
- }
-
- final SyncopeClientCompositeException compException = SyncopeClientException.buildComposite();
-
- final Set<String> handledExceptions = new HashSet<String>();
- for (Object exceptionTypeValue : exTypesInHeaders) {
- final String exTypeAsString = (String) exceptionTypeValue;
- ClientExceptionType exceptionType = null;
- try {
- exceptionType = ClientExceptionType.fromHeaderValue(exTypeAsString);
- } catch (IllegalArgumentException e) {
- LOG.error("Unexpected value of " + RESTHeaders.ERROR_CODE + ": " + exTypeAsString, e);
- }
- if (exceptionType != null) {
- handledExceptions.add(exTypeAsString);
-
- final SyncopeClientException clientException = SyncopeClientException.build(exceptionType);
-
- if (response.getHeaders().get(RESTHeaders.ERROR_INFO) != null
- && !response.getHeaders().get(RESTHeaders.ERROR_INFO).isEmpty()) {
-
- for (Object value : response.getHeaders().get(RESTHeaders.ERROR_INFO)) {
- final String element = value.toString();
- if (element.startsWith(exceptionType.getHeaderValue())) {
- clientException.getElements().add(StringUtils.substringAfter(value.toString(), ":"));
- }
- }
- }
- compException.addException(clientException);
- }
- }
-
- exTypesInHeaders.removeAll(handledExceptions);
- if (!exTypesInHeaders.isEmpty()) {
- LOG.error("Unmanaged exceptions: " + exTypesInHeaders);
- }
-
- if (compException.hasExceptions()) {
- return compException;
- }
-
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/src/main/java/org/apache/syncope/client/rest/RestClientFactoryBean.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/syncope/client/rest/RestClientFactoryBean.java b/client/src/main/java/org/apache/syncope/client/rest/RestClientFactoryBean.java
deleted file mode 100644
index e10840a..0000000
--- a/client/src/main/java/org/apache/syncope/client/rest/RestClientFactoryBean.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.client.rest;
-
-import javax.ws.rs.core.MediaType;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
-import org.apache.cxf.jaxrs.client.WebClient;
-
-/**
- * Provides shortcuts for creating JAX-RS service instances via CXF's <tt>JAXRSClientFactoryBean</tt>.
- */
-public class RestClientFactoryBean extends JAXRSClientFactoryBean {
-
- /**
- * Creates an anonymous instance of the given service class, for the given content type.
- *
- * @param <T> any service class
- * @param serviceClass service class reference
- * @param mediaType XML or JSON are suppoorted
- * @return anonymous service instance of the given reference class
- */
- public <T> T createServiceInstance(final Class<T> serviceClass, final MediaType mediaType) {
- return createServiceInstance(serviceClass, mediaType, null, null);
- }
-
- /**
- * Creates an authenticated instance of the given service class, for the given content type.
- *
- * @param <T> any service class
- * @param serviceClass service class reference
- * @param mediaType XML or JSON are suppoorted
- * @param username username for REST authentication
- * @param password password for REST authentication
- * @return anonymous service instance of the given reference class
- */
- public <T> T createServiceInstance(
- final Class<T> serviceClass, final MediaType mediaType, final String username, final String password) {
-
- if (StringUtils.isNotBlank(username)) {
- setUsername(username);
- }
- if (StringUtils.isNotBlank(password)) {
- setPassword(password);
- }
- setServiceClass(serviceClass);
- final T serviceInstance = create(serviceClass);
- WebClient.client(serviceInstance).type(mediaType).accept(mediaType);
- return serviceInstance;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
----------------------------------------------------------------------
diff --git a/client/src/main/resources/META-INF/cxf/org.apache.cxf.Logger b/client/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
deleted file mode 100644
index 6e7bd36..0000000
--- a/client/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.cxf.common.logging.Slf4jLogger
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/pom.xml
----------------------------------------------------------------------
diff --git a/common/lib/pom.xml b/common/lib/pom.xml
new file mode 100644
index 0000000..2bdc6ea
--- /dev/null
+++ b/common/lib/pom.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.syncope</groupId>
+ <artifactId>syncope-common</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>Apache Syncope Common Lib</name>
+ <description>Apache Syncope Common Lib</description>
+ <groupId>org.apache.syncope.common</groupId>
+ <artifactId>syncope-common-lib</artifactId>
+ <packaging>jar</packaging>
+
+ <properties>
+ <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-extension-search</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/AbstractBaseBean.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/AbstractBaseBean.java b/common/lib/src/main/java/org/apache/syncope/common/lib/AbstractBaseBean.java
new file mode 100644
index 0000000..8a6d9c4
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/AbstractBaseBean.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib;
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.ReportTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+
+@XmlType
+// Reporting here only classes used via PagedResult
+@XmlSeeAlso({ AbstractTaskTO.class, ReportTO.class, RoleTO.class, UserTO.class })
+public abstract class AbstractBaseBean implements Serializable {
+
+ private static final long serialVersionUID = 3119542005279892164L;
+
+ @Override
+ public boolean equals(final Object obj) {
+ return EqualsBuilder.reflectionEquals(this, obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return HashCodeBuilder.reflectionHashCode(this);
+ }
+
+ @Override
+ public String toString() {
+ return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
+ }
+}
[36/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/LoggerCategoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/LoggerCategoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/LoggerCategoryPanel.java
new file mode 100644
index 0000000..aa3c3eb
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/LoggerCategoryPanel.java
@@ -0,0 +1,468 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.SelectedEventsPanel.EventSelectionChanged;
+import org.apache.syncope.client.console.panels.SelectedEventsPanel.InspectSelectedEvent;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.EventCategoryTO;
+import org.apache.syncope.common.lib.types.AuditElements;
+import org.apache.syncope.common.lib.types.AuditElements.EventCategoryType;
+import org.apache.syncope.common.lib.types.AuditLoggerName;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class LoggerCategoryPanel extends Panel {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(LoggerCategoryPanel.class);
+
+ private static final long serialVersionUID = 6429053774964787734L;
+
+ private final List<EventCategoryTO> eventCategoryTOs;
+
+ private final EventCategoryTO eventCategoryTO = new EventCategoryTO();
+
+ private final WebMarkupContainer categoryContainer;
+
+ private final WebMarkupContainer eventsContainer;
+
+ private final SelectedEventsPanel selectedEventsPanel;
+
+ private final AjaxDropDownChoicePanel<EventCategoryType> type;
+
+ private final AjaxDropDownChoicePanel<String> category;
+
+ private final AjaxDropDownChoicePanel<String> subcategory;
+
+ private final AjaxTextFieldPanel custom;
+
+ private final ActionLinksPanel actionPanel;
+
+ private final IModel<List<String>> model;
+
+ public LoggerCategoryPanel(
+ final String id,
+ final List<EventCategoryTO> eventCategoryTOs,
+ final IModel<List<String>> model,
+ final PageReference pageReference,
+ final String pageId) {
+ super(id);
+
+ this.model = model;
+ selectedEventsPanel = new SelectedEventsPanel("selectedEventsPanel", model);
+ add(selectedEventsPanel);
+
+ this.eventCategoryTOs = eventCategoryTOs;
+
+ categoryContainer = new WebMarkupContainer("categoryContainer");
+ categoryContainer.setOutputMarkupId(true);
+ add(categoryContainer);
+
+ eventsContainer = new WebMarkupContainer("eventsContainer");
+ eventsContainer.setOutputMarkupId(true);
+ add(eventsContainer);
+
+ authorizeList();
+ authorizeChanges();
+
+ categoryContainer.add(new Label("typeLabel", new ResourceModel("type", "type")));
+
+ type = new AjaxDropDownChoicePanel<EventCategoryType>(
+ "type",
+ "type",
+ new PropertyModel<EventCategoryType>(eventCategoryTO, "type"),
+ false);
+ type.setChoices(Arrays.asList(EventCategoryType.values()));
+ type.setStyleSheet("ui-widget-content ui-corner-all");
+ type.setChoiceRenderer(new IChoiceRenderer<EventCategoryType>() {
+
+ private static final long serialVersionUID = 2317134950949778735L;
+
+ @Override
+ public String getDisplayValue(final EventCategoryType eventCategoryType) {
+ return eventCategoryType.name();
+ }
+
+ @Override
+ public String getIdValue(final EventCategoryType eventCategoryType, final int i) {
+ return eventCategoryType.name();
+ }
+ });
+ categoryContainer.add(type);
+
+ type.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ send(LoggerCategoryPanel.this, Broadcast.EXACT, new ChangeCategoryEvent(target, type));
+ }
+ });
+
+ categoryContainer.add(new Label("categoryLabel", new ResourceModel("category", "category")));
+
+ category = new AjaxDropDownChoicePanel<String>(
+ "category",
+ "category",
+ new PropertyModel<String>(eventCategoryTO, "category"),
+ false);
+ category.setChoices(filter(eventCategoryTOs, type.getModelObject()));
+ category.setStyleSheet("ui-widget-content ui-corner-all");
+ categoryContainer.add(category);
+
+ category.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306811L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ send(LoggerCategoryPanel.this, Broadcast.EXACT, new ChangeCategoryEvent(target, category));
+ }
+ });
+
+ categoryContainer.add(new Label("subcategoryLabel", new ResourceModel("subcategory", "subcategory")));
+
+ subcategory = new AjaxDropDownChoicePanel<String>(
+ "subcategory",
+ "subcategory",
+ new PropertyModel<String>(eventCategoryTO, "subcategory"),
+ false);
+ subcategory.setChoices(filter(eventCategoryTOs, type.getModelObject(), category.getModelObject()));
+ subcategory.setStyleSheet("ui-widget-content ui-corner-all");
+ categoryContainer.add(subcategory);
+
+ subcategory.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306812L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ send(LoggerCategoryPanel.this, Broadcast.EXACT, new ChangeCategoryEvent(target, subcategory));
+ }
+ });
+
+ categoryContainer.add(new Label("customLabel", new ResourceModel("custom", "custom")).setVisible(false));
+
+ custom = new AjaxTextFieldPanel("custom", "custom", new Model<String>(null));
+ custom.setStyleSheet("ui-widget-content ui-corner-all short_fixedsize");
+ custom.setVisible(false);
+ custom.setEnabled(false);
+
+ categoryContainer.add(custom);
+
+ actionPanel = new ActionLinksPanel("customActions", new Model(), pageReference);
+ categoryContainer.add(actionPanel);
+
+ actionPanel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (StringUtils.isNotBlank(custom.getModelObject())) {
+ final Map.Entry<EventCategoryTO, AuditElements.Result> parsed =
+ AuditLoggerName.parseEventCategory(custom.getModelObject());
+
+ final String eventString = AuditLoggerName.buildEvent(
+ parsed.getKey().getType(),
+ null,
+ null,
+ parsed.getKey().getEvents().isEmpty()
+ ? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
+ parsed.getValue());
+
+ custom.setModelObject(StringUtils.EMPTY);
+ send(LoggerCategoryPanel.this.getPage(), Broadcast.BREADTH, new EventSelectionChanged(
+ target,
+ Collections.<String>singleton(eventString),
+ Collections.<String>emptySet()));
+ target.add(categoryContainer);
+ }
+ }
+ }, ActionLink.ActionType.CREATE, pageId, true);
+
+ actionPanel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435502L;
+
+ @Override
+ public void onClick(AjaxRequestTarget target) {
+ if (StringUtils.isNotBlank(custom.getModelObject())) {
+ final Map.Entry<EventCategoryTO, AuditElements.Result> parsed =
+ AuditLoggerName.parseEventCategory(custom.getModelObject());
+
+ final String eventString = AuditLoggerName.buildEvent(
+ parsed.getKey().getType(),
+ null,
+ null,
+ parsed.getKey().getEvents().isEmpty()
+ ? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
+ parsed.getValue());
+
+ custom.setModelObject(StringUtils.EMPTY);
+ send(LoggerCategoryPanel.this.getPage(), Broadcast.BREADTH, new EventSelectionChanged(
+ target,
+ Collections.<String>emptySet(),
+ Collections.<String>singleton(eventString)));
+ target.add(categoryContainer);
+ }
+ }
+ }, ActionLink.ActionType.DELETE, pageId, true);
+
+ actionPanel.setVisible(false);
+ actionPanel.setEnabled(false);
+
+ eventsContainer.add(new EventSelectionPanel("eventsPanel", eventCategoryTO, model) {
+
+ private static final long serialVersionUID = 3513194801190026082L;
+
+ @Override
+ protected void onEventAction(final IEvent<?> event) {
+ LoggerCategoryPanel.this.onEventAction(event);
+ }
+ });
+ }
+
+ private List<String> filter(
+ final List<EventCategoryTO> eventCategoryTOs, final EventCategoryType type) {
+ final Set<String> res = new HashSet<String>();
+
+ for (EventCategoryTO eventCategory : eventCategoryTOs) {
+ if (type == eventCategory.getType() && StringUtils.isNotEmpty(eventCategory.getCategory())) {
+ res.add(eventCategory.getCategory());
+ }
+ }
+
+ final List<String> filtered = new ArrayList<String>(res);
+ Collections.sort(filtered);
+ return filtered;
+ }
+
+ private List<String> filter(
+ final List<EventCategoryTO> eventCategoryTOs, final EventCategoryType type, final String category) {
+ final Set<String> res = new HashSet<String>();
+
+ for (EventCategoryTO eventCategory : eventCategoryTOs) {
+ if (type == eventCategory.getType() && StringUtils.equals(category, eventCategory.getCategory())
+ && StringUtils.isNotEmpty(eventCategory.getSubcategory())) {
+ res.add(eventCategory.getSubcategory());
+ }
+ }
+
+ final List<String> filtered = new ArrayList<String>(res);
+ Collections.sort(filtered);
+ return filtered;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void onEvent(final IEvent<?> event) {
+ if (event.getPayload() instanceof ChangeCategoryEvent) {
+ // update objects ....
+ eventCategoryTO.getEvents().clear();
+
+ final ChangeCategoryEvent change = (ChangeCategoryEvent) event.getPayload();
+
+ final Panel changedPanel = change.getChangedPanel();
+ if ("type".equals(changedPanel.getId())) {
+ eventCategoryTO.setType(type.getModelObject());
+ eventCategoryTO.setCategory(null);
+ eventCategoryTO.setSubcategory(null);
+
+ if (type.getModelObject() == EventCategoryType.CUSTOM) {
+ category.setChoices(Collections.<String>emptyList());
+ subcategory.setChoices(Collections.<String>emptyList());
+ category.setEnabled(false);
+ subcategory.setEnabled(false);
+ custom.setVisible(true);
+ custom.setEnabled(true);
+ actionPanel.setVisible(true);
+ actionPanel.setEnabled(true);
+
+ } else {
+ category.setChoices(filter(eventCategoryTOs, type.getModelObject()));
+ subcategory.setChoices(Collections.<String>emptyList());
+ category.setEnabled(true);
+ subcategory.setEnabled(true);
+ custom.setVisible(false);
+ custom.setEnabled(false);
+ actionPanel.setVisible(false);
+ actionPanel.setEnabled(false);
+ }
+ change.getTarget().add(categoryContainer);
+ } else if ("category".equals(changedPanel.getId())) {
+ subcategory.setChoices(filter(eventCategoryTOs, type.getModelObject(), category.getModelObject()));
+ eventCategoryTO.setCategory(category.getModelObject());
+ eventCategoryTO.setSubcategory(null);
+ change.getTarget().add(categoryContainer);
+ } else {
+ eventCategoryTO.setSubcategory(subcategory.getModelObject());
+ }
+
+ updateEventsContainer(change.getTarget());
+ } else if (event.getPayload() instanceof InspectSelectedEvent) {
+ // update objects ....
+ eventCategoryTO.getEvents().clear();
+
+ final InspectSelectedEvent inspectSelectedEvent = (InspectSelectedEvent) event.getPayload();
+
+ final Map.Entry<EventCategoryTO, AuditElements.Result> categoryEvent =
+ AuditLoggerName.parseEventCategory(inspectSelectedEvent.getEvent());
+
+ eventCategoryTO.setType(categoryEvent.getKey().getType());
+ category.setChoices(filter(eventCategoryTOs, type.getModelObject()));
+
+ eventCategoryTO.setCategory(categoryEvent.getKey().getCategory());
+ subcategory.setChoices(filter(eventCategoryTOs, type.getModelObject(), category.getModelObject()));
+
+ eventCategoryTO.setSubcategory(categoryEvent.getKey().getSubcategory());
+
+ if (categoryEvent.getKey().getType() == EventCategoryType.CUSTOM) {
+ custom.setModelObject(AuditLoggerName.buildEvent(
+ categoryEvent.getKey().getType(),
+ categoryEvent.getKey().getCategory(),
+ categoryEvent.getKey().getSubcategory(),
+ categoryEvent.getKey().getEvents().isEmpty()
+ ? StringUtils.EMPTY : categoryEvent.getKey().getEvents().iterator().next(),
+ categoryEvent.getValue()));
+
+ category.setEnabled(false);
+ subcategory.setEnabled(false);
+ custom.setVisible(true);
+ custom.setEnabled(true);
+ actionPanel.setVisible(true);
+ actionPanel.setEnabled(true);
+ } else {
+ category.setEnabled(true);
+ subcategory.setEnabled(true);
+ custom.setVisible(false);
+ custom.setEnabled(false);
+ actionPanel.setVisible(false);
+ actionPanel.setEnabled(false);
+ }
+
+ inspectSelectedEvent.getTarget().add(categoryContainer);
+ updateEventsContainer(inspectSelectedEvent.getTarget());
+ }
+ }
+
+ private void setEvents() {
+ final Iterator<EventCategoryTO> itor = eventCategoryTOs.iterator();
+ while (itor.hasNext() && eventCategoryTO.getEvents().isEmpty()) {
+ final EventCategoryTO eventCategory = itor.next();
+ if (eventCategory.getType() == eventCategoryTO.getType()
+ && StringUtils.equals(eventCategory.getCategory(), eventCategoryTO.getCategory())
+ && StringUtils.equals(eventCategory.getSubcategory(), eventCategoryTO.getSubcategory())) {
+ eventCategoryTO.getEvents().addAll(eventCategory.getEvents());
+ }
+ }
+ }
+
+ private class ChangeCategoryEvent {
+
+ private final AjaxRequestTarget target;
+
+ private final Panel changedPanel;
+
+ public ChangeCategoryEvent(final AjaxRequestTarget target, final Panel changedPanel) {
+ this.target = target;
+ this.changedPanel = changedPanel;
+ }
+
+ public AjaxRequestTarget getTarget() {
+ return target;
+ }
+
+ public Panel getChangedPanel() {
+ return changedPanel;
+ }
+ }
+
+ /**
+ * To be extended in order to add actions on events.
+ *
+ * @param event event.
+ */
+ protected void onEventAction(final IEvent<?> event) {
+ // nothing by default
+ }
+
+ private void authorizeList() {
+ for (String role : getListRoles()) {
+ MetaDataRoleAuthorizationStrategy.authorize(selectedEventsPanel, RENDER, role);
+ }
+ }
+
+ private void authorizeChanges() {
+ for (String role : getChangeRoles()) {
+ MetaDataRoleAuthorizationStrategy.authorize(categoryContainer, RENDER, role);
+ MetaDataRoleAuthorizationStrategy.authorize(eventsContainer, RENDER, role);
+ }
+ }
+
+ private void updateEventsContainer(final AjaxRequestTarget target) {
+ setEvents();
+
+ eventsContainer.addOrReplace(new EventSelectionPanel("eventsPanel", eventCategoryTO, model) {
+
+ private static final long serialVersionUID = 3513194801190026082L;
+
+ @Override
+ public void onEventAction(final IEvent<?> event) {
+ LoggerCategoryPanel.this.onEventAction(event);
+ }
+ });
+ target.add(eventsContainer);
+ }
+
+ protected abstract String[] getListRoles();
+
+ protected abstract String[] getChangeRoles();
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/MembershipsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/MembershipsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/MembershipsPanel.java
new file mode 100644
index 0000000..fb00dcf
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/MembershipsPanel.java
@@ -0,0 +1,256 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.swing.tree.DefaultMutableTreeNode;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.commons.RoleTreeBuilder;
+import org.apache.syncope.client.console.commons.RoleUtils;
+import org.apache.syncope.client.console.commons.status.StatusUtils;
+import org.apache.syncope.client.console.pages.MembershipModalPage;
+import org.apache.syncope.client.console.pages.UserModalPage;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.IndicatingOnConfirmAjaxLink;
+import org.apache.syncope.client.console.wicket.markup.html.tree.DefaultMutableTreeNodeExpansion;
+import org.apache.syncope.client.console.wicket.markup.html.tree.DefaultMutableTreeNodeExpansionModel;
+import org.apache.syncope.client.console.wicket.markup.html.tree.TreeRoleProvider;
+import org.apache.syncope.common.lib.to.MembershipTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.markup.html.repeater.tree.DefaultNestedTree;
+import org.apache.wicket.extensions.markup.html.repeater.tree.ITreeProvider;
+import org.apache.wicket.extensions.markup.html.repeater.tree.NestedTree;
+import org.apache.wicket.extensions.markup.html.repeater.tree.content.Folder;
+import org.apache.wicket.extensions.markup.html.repeater.tree.theme.WindowsTheme;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class MembershipsPanel extends Panel {
+
+ private static final long serialVersionUID = -2559791301973107191L;
+
+ @SpringBean
+ private RoleTreeBuilder roleTreeBuilder;
+
+ private final ListView<MembershipTO> membView;
+
+ private final UserTO userTO;
+
+ private final StatusPanel statusPanel;
+
+ private final NestedTree<DefaultMutableTreeNode> tree;
+
+ public MembershipsPanel(final String id, final UserTO userTO, final Mode mode,
+ final StatusPanel statusPanel, final PageReference pageRef) {
+
+ super(id);
+ this.userTO = userTO;
+ this.statusPanel = statusPanel;
+
+ final WebMarkupContainer membershipsContainer = new WebMarkupContainer("membershipsContainer");
+ membershipsContainer.setOutputMarkupId(true);
+ add(membershipsContainer);
+
+ final ModalWindow membWin = new ModalWindow("membershipWin");
+ membWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ membWin.setCookieName("create-membership-modal");
+ add(membWin);
+
+ final ITreeProvider<DefaultMutableTreeNode> treeProvider = new TreeRoleProvider(roleTreeBuilder, true);
+ final DefaultMutableTreeNodeExpansionModel treeModel = new DefaultMutableTreeNodeExpansionModel();
+
+ tree = new DefaultNestedTree<DefaultMutableTreeNode>("treeTable", treeProvider, treeModel) {
+
+ private static final long serialVersionUID = 7137658050662575546L;
+
+ @Override
+ protected Component newContentComponent(final String id, final IModel<DefaultMutableTreeNode> node) {
+ final DefaultMutableTreeNode treeNode = node.getObject();
+ final RoleTO roleTO = (RoleTO) treeNode.getUserObject();
+
+ return new Folder<DefaultMutableTreeNode>(id, MembershipsPanel.this.tree, node) {
+
+ private static final long serialVersionUID = 9046323319920426493L;
+
+ @Override
+ protected boolean isClickable() {
+ return true;
+ }
+
+ @Override
+ protected IModel<?> newLabelModel(final IModel<DefaultMutableTreeNode> model) {
+ return new Model<String>(roleTO.getDisplayName());
+ }
+
+ @Override
+ protected void onClick(final AjaxRequestTarget target) {
+ if (roleTO.getKey() > 0) {
+ membWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = 7661763358801821185L;
+
+ @Override
+ public Page createPage() {
+ PageReference pageRef = getPage().getPageReference();
+
+ for (MembershipTO membTO : membView.getList()) {
+ if (membTO.getRoleId() == roleTO.getKey()) {
+ return new MembershipModalPage(pageRef, membWin, membTO, mode);
+ }
+ }
+ MembershipTO membTO = new MembershipTO();
+ membTO.setRoleId(roleTO.getKey());
+ membTO.setRoleName(roleTO.getName());
+
+ return new MembershipModalPage(pageRef, membWin, membTO, mode);
+ }
+ });
+ membWin.show(target);
+ }
+ }
+ };
+ }
+ };
+ tree.add(new WindowsTheme());
+ tree.setOutputMarkupId(true);
+
+ DefaultMutableTreeNodeExpansion.get().expandAll();
+
+ this.add(tree);
+
+ membView = new ListView<MembershipTO>("memberships",
+ new PropertyModel<List<? extends MembershipTO>>(userTO, "memberships")) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ protected void populateItem(final ListItem<MembershipTO> item) {
+ final MembershipTO membershipTO = (MembershipTO) item.getDefaultModelObject();
+
+ item.add(new Label("roleId", new Model<Long>(membershipTO.getRoleId())));
+ item.add(new Label("roleName", new Model<String>(membershipTO.getRoleName())));
+
+ AjaxLink editLink = new ClearIndicatingAjaxLink("editLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ membWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new MembershipModalPage(getPage().getPageReference(), membWin,
+ membershipTO, mode);
+
+ }
+ });
+ membWin.show(target);
+ }
+ };
+ item.add(editLink);
+
+ AjaxLink deleteLink = new IndicatingOnConfirmAjaxLink("deleteLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ userTO.getMemberships().remove(membershipTO);
+ ((UserModalPage) getPage()).getUserTO().getMemberships().remove(membershipTO);
+ target.add(membershipsContainer);
+
+ RoleTO roleTO = RoleUtils.findRole(roleTreeBuilder, membershipTO.getRoleId());
+ Set<String> resourcesToRemove = roleTO == null
+ ? Collections.<String>emptySet() : roleTO.getResources();
+ if (!resourcesToRemove.isEmpty()) {
+ Set<String> resourcesAssignedViaMembership = new HashSet<String>();
+ for (MembershipTO membTO : userTO.getMemberships()) {
+ roleTO = RoleUtils.findRole(roleTreeBuilder, membTO.getRoleId());
+ if (roleTO != null) {
+ resourcesAssignedViaMembership.addAll(roleTO.getResources());
+ }
+ }
+ resourcesToRemove.removeAll(resourcesAssignedViaMembership);
+ resourcesToRemove.removeAll(userTO.getResources());
+ }
+
+ StatusUtils.update(
+ userTO, statusPanel, target, Collections.<String>emptySet(), resourcesToRemove);
+ }
+ };
+ item.add(deleteLink);
+ }
+ };
+
+ membershipsContainer.add(membView);
+
+ setWindowClosedCallback(membWin, membershipsContainer);
+ }
+
+ private void setWindowClosedCallback(final ModalWindow window, final WebMarkupContainer container) {
+ window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ final UserTO updatedUserTO = ((UserModalPage) getPage()).getUserTO();
+ if (!userTO.equals(updatedUserTO)) {
+ if (updatedUserTO.getMemberships().size() > userTO.getMemberships().size()) {
+ Set<Long> diff = new HashSet<Long>(updatedUserTO.getMembershipMap().keySet());
+ diff.removeAll(userTO.getMembershipMap().keySet());
+
+ Set<String> resourcesToAdd = new HashSet<String>();
+ for (Long diffMembId : diff) {
+ long roleId = updatedUserTO.getMembershipMap().get(diffMembId).getRoleId();
+ RoleTO roleTO = RoleUtils.findRole(roleTreeBuilder, roleId);
+ resourcesToAdd.addAll(roleTO.getResources());
+ StatusUtils.update(
+ userTO, statusPanel, target, resourcesToAdd, Collections.<String>emptySet());
+ }
+ }
+
+ MembershipsPanel.this.userTO.getMemberships().clear();
+ MembershipsPanel.this.userTO.getMemberships().addAll(updatedUserTO.getMemberships());
+ target.add(container);
+ }
+ }
+ });
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java
new file mode 100644
index 0000000..8624d26
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.ajax.AjaxEventBehavior;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.feedback.FeedbackMessage;
+import org.apache.wicket.feedback.IFeedbackMessageFilter;
+import org.apache.wicket.markup.html.panel.FeedbackPanel;
+import org.apache.wicket.model.Model;
+
+public class NotificationPanel extends FeedbackPanel {
+
+ private static final long serialVersionUID = 5895940553202128621L;
+
+ private static final String CSS_CLASS = "notificationpanel";
+
+ private static final String DEFAULT_ADDITIONAL_CSS_CLASS = "notificationpanel_top_right";
+
+ private final String additionalCSSClass;
+
+ public NotificationPanel(final String id) {
+ this(id, null, null);
+ }
+
+ public NotificationPanel(final String id, final String additionalCSSClass,
+ final IFeedbackMessageFilter feedbackMessageFilter) {
+
+ super(id, feedbackMessageFilter);
+
+ this.add(new AjaxEventBehavior(Constants.ON_CLICK) {
+
+ private static final long serialVersionUID = -7133385027739964990L;
+
+ @Override
+ protected void onEvent(final AjaxRequestTarget target) {
+ target.appendJavaScript(
+ "setTimeout(\"$('div#" + getMarkupId() + "').fadeOut('normal')\", 0);");
+ }
+ });
+
+ this.additionalCSSClass = StringUtils.isBlank(additionalCSSClass)
+ ? DEFAULT_ADDITIONAL_CSS_CLASS
+ : additionalCSSClass;
+
+ // set custom markup id and ouput it, to find the component later on in the js function
+ setMarkupId(id);
+ setOutputMarkupId(true);
+
+ // Add the additional cssClass and hide the element by default
+ add(new AttributeModifier("class", new Model<String>(CSS_CLASS + " " + this.additionalCSSClass)));
+ add(new AttributeModifier("style", new Model<String>("opacity: 0;")));
+ }
+
+ /**
+ * Method to refresh the notification panel.
+ *
+ * If there are any feedback messages for the user, find the gravest level, format the notification panel
+ * accordingly and show it.
+ *
+ * @param target AjaxRequestTarget to add panel and the calling javascript function
+ */
+ public void refresh(final AjaxRequestTarget target) {
+ // any feedback at all in the current form?
+ if (anyMessage()) {
+ int highestFeedbackLevel = FeedbackMessage.INFO;
+
+ // any feedback with the given level?
+ if (anyMessage(FeedbackMessage.WARNING)) {
+ highestFeedbackLevel = FeedbackMessage.WARNING;
+ }
+ if (anyMessage(FeedbackMessage.ERROR)) {
+ highestFeedbackLevel = FeedbackMessage.ERROR;
+ }
+
+ // add the css classes to the notification panel,
+ // including the border css which represents the highest level of feedback
+ add(new AttributeModifier("class",
+ new Model<String>(CSS_CLASS
+ + " " + additionalCSSClass
+ + " notificationpanel_border_" + highestFeedbackLevel)));
+
+ // refresh the panel and call the js function with the panel markup id
+ // and the total count of messages
+ target.add(this);
+ if (anyMessage(FeedbackMessage.ERROR)) {
+ target.appendJavaScript(
+ "$('div#" + getMarkupId() + "').fadeTo('normal', 1.0);");
+ } else {
+ target.appendJavaScript(
+ "showNotification('" + getMarkupId() + "', " + getCurrentMessages().size() + ");");
+ }
+ }
+ }
+
+ @Override
+ protected String getCSSClass(final FeedbackMessage message) {
+ return "notificationpanel_row_" + message.getLevelAsString();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationTasks.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationTasks.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationTasks.java
new file mode 100644
index 0000000..d7f52e1
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationTasks.java
@@ -0,0 +1,254 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.NotificationTaskModalPage;
+import org.apache.syncope.client.console.pages.Tasks;
+import org.apache.syncope.client.console.pages.Tasks.TasksProvider;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.NotificationTaskTO;
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+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.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.StringResourceModel;
+import org.apache.wicket.request.http.WebResponse;
+
+public class NotificationTasks extends AbstractTasks {
+
+ private static final long serialVersionUID = 4984337552918213290L;
+
+ private int paginatorRows;
+
+ private WebMarkupContainer container;
+
+ private boolean operationResult = false;
+
+ private ModalWindow window;
+
+ private AjaxDataTablePanel<AbstractTaskTO, String> table;
+
+ public NotificationTasks(final String id, final PageReference pageRef) {
+ super(id, pageRef);
+
+ container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+ add(container);
+
+ add(window = new ModalWindow("taskWin"));
+
+ paginatorRows = prefMan.getPaginatorRows(getWebRequest(), Constants.PREF_NOTIFICATION_TASKS_PAGINATOR_ROWS);
+
+ table = Tasks.updateTaskTable(
+ getColumns(),
+ new TasksProvider<NotificationTaskTO>(restClient, paginatorRows, getId(), NotificationTaskTO.class),
+ container,
+ 0,
+ pageRef,
+ restClient);
+
+ container.add(table);
+
+ window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ target.add(container);
+ if (operationResult) {
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(getPage().get(Constants.FEEDBACK));
+ operationResult = false;
+ }
+ }
+ });
+
+ window.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ window.setInitialHeight(WIN_HEIGHT);
+ window.setInitialWidth(WIN_WIDTH);
+ window.setCookieName(VIEW_TASK_WIN_COOKIE_NAME);
+
+ @SuppressWarnings("rawtypes")
+ final Form paginatorForm = new Form("PaginatorForm");
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this, "paginatorRows"),
+ prefMan.getPaginatorChoices());
+
+ rowsChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ prefMan.set(getWebRequest(), (WebResponse) getResponse(),
+ Constants.PREF_NOTIFICATION_TASKS_PAGINATOR_ROWS, String.valueOf(paginatorRows));
+
+ table = Tasks.updateTaskTable(
+ getColumns(),
+ new TasksProvider<NotificationTaskTO>(restClient, paginatorRows, getId(),
+ NotificationTaskTO.class),
+ container,
+ table == null ? 0 : (int) table.getCurrentPage(),
+ pageRef,
+ restClient);
+
+ target.add(container);
+ }
+ });
+
+ paginatorForm.add(rowsChooser);
+ add(paginatorForm);
+ }
+
+ private List<IColumn<AbstractTaskTO, String>> getColumns() {
+ final List<IColumn<AbstractTaskTO, String>> columns = new ArrayList<>();
+
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("key", this, null), "key", "key"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("sender", this, null), "sender", "sender"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("recipients", this, null), "recipients", "recipients"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("subject", this, null), "subject", "subject"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("traceLevel", this, null), "traceLevel", "traceLevel"));
+ columns.add(new PropertyColumn<AbstractTaskTO, String>(
+ new StringResourceModel("latestExecStatus", this, null), "latestExecStatus", "latestExecStatus"));
+
+ columns.add(new ActionColumn<AbstractTaskTO, String>(new StringResourceModel("actions", this, null, "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public ActionLinksPanel getActions(final String componentId, final IModel<AbstractTaskTO> model) {
+
+ final AbstractTaskTO taskTO = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, pageRef);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new NotificationTaskModalPage(taskTO);
+ }
+ });
+
+ window.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.startExecution(taskTO.getKey(), false);
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ target.add(container);
+ }
+ }, ActionLink.ActionType.EXECUTE, TASKS);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ restClient.delete(taskTO.getKey(), NotificationTaskTO.class);
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+ target.add(container);
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, TASKS);
+
+ return panel;
+ }
+
+ @Override
+ public Component getHeader(String componentId) {
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(), pageRef);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (target != null) {
+ target.add(table);
+ }
+ }
+ }, ActionLink.ActionType.RELOAD, TASKS, "list");
+
+ return panel;
+ }
+ });
+
+ return columns;
+ }
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ if (event.getPayload() instanceof AbstractSearchResultPanel.EventDataWrapper) {
+ ((AbstractSearchResultPanel.EventDataWrapper) event.getPayload()).getTarget().add(container);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainAttrsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainAttrsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainAttrsPanel.java
new file mode 100644
index 0000000..8e42318
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainAttrsPanel.java
@@ -0,0 +1,395 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.AttrLayoutType;
+import org.apache.syncope.client.console.commons.JexlHelpUtil;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.panels.AttrTemplatesPanel.RoleAttrTemplatesChange;
+import org.apache.syncope.client.console.rest.ConfigurationRestClient;
+import org.apache.syncope.client.console.rest.RoleRestClient;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.BinaryFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.DateTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.DateTimeFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.list.AltListView;
+import org.apache.syncope.common.lib.SyncopeConstants;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.ConfTO;
+import org.apache.syncope.common.lib.to.MembershipTO;
+import org.apache.syncope.common.lib.to.PlainSchemaTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.AttrSchemaType;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class PlainAttrsPanel extends Panel {
+
+ private static final long serialVersionUID = 552437609667518888L;
+
+ @SpringBean
+ private SchemaRestClient schemaRestClient;
+
+ @SpringBean
+ private ConfigurationRestClient confRestClient;
+
+ @SpringBean
+ private RoleRestClient roleRestClient;
+
+ private final AbstractAttributableTO entityTO;
+
+ private final Mode mode;
+
+ private final AttrTemplatesPanel attrTemplates;
+
+ private Map<String, PlainSchemaTO> schemas = new LinkedHashMap<>();
+
+ public <T extends AbstractAttributableTO> PlainAttrsPanel(final String id, final T entityTO,
+ final Form<?> form, final Mode mode) {
+
+ this(id, entityTO, form, mode, null);
+ }
+
+ public <T extends AbstractAttributableTO> PlainAttrsPanel(final String id, final T entityTO,
+ final Form<?> form, final Mode mode, final AttrTemplatesPanel attrTemplates) {
+
+ super(id);
+ this.entityTO = entityTO;
+ this.mode = mode;
+ this.attrTemplates = attrTemplates;
+ this.setOutputMarkupId(true);
+
+ setSchemas();
+ setAttrs();
+
+ add(new AltListView<AttrTO>("schemas", new PropertyModel<List<? extends AttrTO>>(entityTO, "attrs")) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ protected void populateItem(final ListItem<AttrTO> item) {
+ final AttrTO attributeTO = (AttrTO) item.getDefaultModelObject();
+
+ final WebMarkupContainer jexlHelp = JexlHelpUtil.getJexlHelpWebContainer("jexlHelp");
+
+ final AjaxLink<Void> questionMarkJexlHelp = JexlHelpUtil.getAjaxLink(jexlHelp, "questionMarkJexlHelp");
+ item.add(questionMarkJexlHelp);
+ questionMarkJexlHelp.add(jexlHelp);
+
+ if (mode != Mode.TEMPLATE) {
+ questionMarkJexlHelp.setVisible(false);
+ }
+
+ item.add(new Label("name", attributeTO.getSchema()));
+
+ final FieldPanel panel = getFieldPanel(schemas.get(attributeTO.getSchema()), form, attributeTO);
+
+ if (mode == Mode.TEMPLATE || !schemas.get(attributeTO.getSchema()).isMultivalue()) {
+ item.add(panel);
+ } else {
+ item.add(new MultiFieldPanel<String>(
+ "panel", new PropertyModel<List<String>>(attributeTO, "values"), panel));
+ }
+ }
+ }
+ );
+ }
+
+ private void setSchemas() {
+ AttrTO attrLayout = null;
+ List<PlainSchemaTO> schemaTOs;
+
+ if (entityTO instanceof RoleTO) {
+ final RoleTO roleTO = (RoleTO) entityTO;
+
+ attrLayout = confRestClient.readAttrLayout(AttrLayoutType.valueOf(mode, AttributableType.ROLE));
+ schemaTOs = schemaRestClient.getSchemas(AttributableType.ROLE);
+ Set<String> allowed;
+ if (attrTemplates == null) {
+ allowed = new HashSet<>(roleTO.getRPlainAttrTemplates());
+ } else {
+ allowed = new HashSet<>(attrTemplates.getSelected(AttrTemplatesPanel.Type.rPlainAttrTemplates));
+ if (roleTO.isInheritTemplates() && roleTO.getParent() != 0) {
+ allowed.addAll(roleRestClient.read(roleTO.getParent()).getRPlainAttrTemplates());
+ }
+ }
+ schemaRestClient.filter(schemaTOs, allowed, true);
+ } else if (entityTO instanceof UserTO) {
+ attrLayout = confRestClient.readAttrLayout(AttrLayoutType.valueOf(mode, AttributableType.USER));
+ schemaTOs = schemaRestClient.getSchemas(AttributableType.USER);
+ } else if (entityTO instanceof MembershipTO) {
+ attrLayout = confRestClient.readAttrLayout(AttrLayoutType.valueOf(mode, AttributableType.MEMBERSHIP));
+ schemaTOs = schemaRestClient.getSchemas(AttributableType.MEMBERSHIP);
+ Set<String> allowed = new HashSet<>(
+ roleRestClient.read(((MembershipTO) entityTO).getRoleId()).getMPlainAttrTemplates());
+ schemaRestClient.filter(schemaTOs, allowed, true);
+ } else {
+ schemas = new TreeMap<>();
+ schemaTOs = schemaRestClient.getSchemas(AttributableType.CONFIGURATION);
+ for (Iterator<PlainSchemaTO> it = schemaTOs.iterator(); it.hasNext();) {
+ PlainSchemaTO schemaTO = it.next();
+ for (AttrLayoutType type : AttrLayoutType.values()) {
+ if (type.getConfKey().equals(schemaTO.getKey())) {
+ it.remove();
+ }
+ }
+ }
+ }
+
+ schemas.clear();
+
+ if (attrLayout != null && mode != Mode.TEMPLATE && !(entityTO instanceof ConfTO)) {
+ // 1. remove attributes not selected for display
+ schemaRestClient.filter(schemaTOs, attrLayout.getValues(), true);
+ // 2. sort remainig attributes according to configuration, e.g. attrLayout
+ final Map<String, Integer> attrLayoutMap = new HashMap<>(attrLayout.getValues().size());
+ for (int i = 0; i < attrLayout.getValues().size(); i++) {
+ attrLayoutMap.put(attrLayout.getValues().get(i), i);
+ }
+ Collections.sort(schemaTOs, new Comparator<PlainSchemaTO>() {
+
+ @Override
+ public int compare(final PlainSchemaTO schema1, final PlainSchemaTO schema2) {
+ int value = 0;
+
+ if (attrLayoutMap.get(schema1.getKey()) > attrLayoutMap.get(schema2.getKey())) {
+ value = 1;
+ } else if (attrLayoutMap.get(schema1.getKey()) < attrLayoutMap.get(schema2.getKey())) {
+ value = -1;
+ }
+
+ return value;
+ }
+ });
+ }
+ for (PlainSchemaTO schemaTO : schemaTOs) {
+ schemas.put(schemaTO.getKey(), schemaTO);
+ }
+ }
+
+ private void setAttrs() {
+ final List<AttrTO> entityData = new ArrayList<>();
+
+ final Map<String, AttrTO> attrMap = entityTO.getPlainAttrMap();
+
+ for (PlainSchemaTO schema : schemas.values()) {
+ final AttrTO attributeTO = new AttrTO();
+ attributeTO.setSchema(schema.getKey());
+
+ if (attrMap.get(schema.getKey()) == null || attrMap.get(schema.getKey()).getValues().isEmpty()) {
+ attributeTO.getValues().add("");
+
+ // is important to set readonly only after values setting
+ attributeTO.setReadonly(schema.isReadonly());
+ } else {
+ attributeTO.getValues().addAll(attrMap.get(schema.getKey()).getValues());
+ }
+ entityData.add(attributeTO);
+ }
+
+ entityTO.getPlainAttrs().clear();
+ entityTO.getPlainAttrs().addAll(entityData);
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ private FieldPanel getFieldPanel(final PlainSchemaTO schemaTO, final Form form, final AttrTO attributeTO) {
+ final boolean required = mode == Mode.TEMPLATE
+ ? false
+ : schemaTO.getMandatoryCondition().equalsIgnoreCase("true");
+
+ final boolean readOnly = mode == Mode.TEMPLATE ? false : schemaTO.isReadonly();
+
+ final AttrSchemaType type = mode == Mode.TEMPLATE ? AttrSchemaType.String : schemaTO.getType();
+
+ final FieldPanel panel;
+ switch (type) {
+ case Boolean:
+ panel = new AjaxCheckBoxPanel("panel", schemaTO.getKey(), new Model<Boolean>());
+ panel.setRequired(required);
+ break;
+
+ case Date:
+ final String dataPattern = schemaTO.getConversionPattern() == null
+ ? SyncopeConstants.DEFAULT_DATE_PATTERN
+ : schemaTO.getConversionPattern();
+
+ if (dataPattern.contains("H")) {
+ panel = new DateTimeFieldPanel("panel", schemaTO.getKey(), new Model<Date>(), dataPattern);
+
+ if (required) {
+ panel.addRequiredLabel();
+ ((DateTimeFieldPanel) panel).setFormValidator(form);
+ }
+ panel.setStyleSheet("ui-widget-content ui-corner-all");
+ } else {
+ panel = new DateTextFieldPanel("panel", schemaTO.getKey(), new Model<Date>(), dataPattern);
+
+ if (required) {
+ panel.addRequiredLabel();
+ }
+ }
+ break;
+
+ case Enum:
+ panel = new AjaxDropDownChoicePanel<String>("panel", schemaTO.getKey(), new Model<String>());
+ ((AjaxDropDownChoicePanel<String>) panel).setChoices(getEnumeratedValues(schemaTO));
+
+ if (StringUtils.isNotBlank(schemaTO.getEnumerationKeys())) {
+ ((AjaxDropDownChoicePanel) panel).setChoiceRenderer(new IChoiceRenderer<String>() {
+
+ private static final long serialVersionUID = -3724971416312135885L;
+
+ private final Map<String, String> valueMap = getEnumeratedKeyValues(schemaTO);
+
+ @Override
+ public String getDisplayValue(final String value) {
+ return valueMap.get(value) == null ? value : valueMap.get(value);
+ }
+
+ @Override
+ public String getIdValue(final String value, final int i) {
+ return value;
+ }
+ });
+ }
+
+ if (required) {
+ panel.addRequiredLabel();
+ }
+ break;
+
+ case Long:
+ panel = new SpinnerFieldPanel<Long>("panel", schemaTO.getKey(),
+ Long.class, new Model<Long>(), null, null);
+
+ if (required) {
+ panel.addRequiredLabel();
+ }
+ break;
+
+ case Double:
+ panel = new SpinnerFieldPanel<Double>("panel", schemaTO.getKey(),
+ Double.class, new Model<Double>(), null, null);
+
+ if (required) {
+ panel.addRequiredLabel();
+ }
+ break;
+
+ case Binary:
+ panel = new BinaryFieldPanel("panel", schemaTO.getKey(), new Model<String>(),
+ schemas.containsKey(schemaTO.getKey())
+ ? schemas.get(schemaTO.getKey()).getMimeType()
+ : null);
+
+ if (required) {
+ panel.addRequiredLabel();
+ }
+ break;
+
+ default:
+ panel = new AjaxTextFieldPanel("panel", schemaTO.getKey(), new Model<String>());
+
+ if (required) {
+ panel.addRequiredLabel();
+ }
+ }
+
+ panel.setReadOnly(readOnly);
+ panel.setNewModel(attributeTO.getValues());
+
+ return panel;
+ }
+
+ private Map<String, String> getEnumeratedKeyValues(final PlainSchemaTO schemaTO) {
+ final Map<String, String> res = new HashMap<>();
+
+ final String[] values = StringUtils.isBlank(schemaTO.getEnumerationValues())
+ ? new String[0]
+ : schemaTO.getEnumerationValues().split(SyncopeConstants.ENUM_VALUES_SEPARATOR);
+
+ final String[] keys = StringUtils.isBlank(schemaTO.getEnumerationKeys())
+ ? new String[0]
+ : schemaTO.getEnumerationKeys().split(SyncopeConstants.ENUM_VALUES_SEPARATOR);
+
+ for (int i = 0; i < values.length; i++) {
+ res.put(values[i].trim(), keys.length > i ? keys[i].trim() : null);
+ }
+
+ return res;
+ }
+
+ private List<String> getEnumeratedValues(final PlainSchemaTO schemaTO) {
+ final List<String> res = new ArrayList<>();
+
+ final String[] values = StringUtils.isBlank(schemaTO.getEnumerationValues())
+ ? new String[0]
+ : schemaTO.getEnumerationValues().split(SyncopeConstants.ENUM_VALUES_SEPARATOR);
+
+ for (String value : values) {
+ res.add(value.trim());
+ }
+
+ return res;
+ }
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ if ((event.getPayload() instanceof RoleAttrTemplatesChange)) {
+ final RoleAttrTemplatesChange update = (RoleAttrTemplatesChange) event.getPayload();
+ if (attrTemplates != null && update.getType() == AttrTemplatesPanel.Type.rPlainAttrTemplates) {
+ setSchemas();
+ setAttrs();
+ update.getTarget().add(this);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/panels/PoliciesPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/PoliciesPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/PoliciesPanel.java
new file mode 100644
index 0000000..4d66eda
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/PoliciesPanel.java
@@ -0,0 +1,343 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.panels;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.PreferenceManager;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.commons.XMLRolesReader;
+import org.apache.syncope.client.console.pages.BasePage;
+import org.apache.syncope.client.console.pages.PolicyModalPage;
+import org.apache.syncope.client.console.rest.PolicyRestClient;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AbstractPolicyTO;
+import org.apache.syncope.common.lib.to.AccountPolicyTO;
+import org.apache.syncope.common.lib.to.PasswordPolicyTO;
+import org.apache.syncope.common.lib.to.SyncPolicyTO;
+import org.apache.syncope.common.lib.types.PolicyType;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+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.util.SortableDataProvider;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.request.http.WebResponse;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class PoliciesPanel extends Panel {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(PoliciesPanel.class);
+
+ private static final int MODAL_WIN_HEIGHT = 400;
+
+ private static final int MODAL_WIN_WIDTH = 1000;
+
+ private static final long serialVersionUID = -6804066913177804275L;
+
+ @SpringBean
+ private PolicyRestClient policyRestClient;
+
+ @SpringBean
+ protected XMLRolesReader xmlRolesReader;
+
+ @SpringBean
+ private PreferenceManager prefMan;
+
+ private final PageReference pageRef;
+
+ private final int paginatorRows = prefMan.getPaginatorRows(getWebRequest(), Constants.PREF_POLICY_PAGINATOR_ROWS);
+
+ protected boolean modalResult = false;
+
+ private final PolicyType policyType;
+
+ public PoliciesPanel(final String id, final PageReference pageRef, final PolicyType policyType) {
+ super(id);
+ this.pageRef = pageRef;
+ this.policyType = policyType;
+
+ // Modal window for editing user attributes
+ final ModalWindow mwindow = new ModalWindow("editModalWin");
+ mwindow.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ mwindow.setInitialHeight(MODAL_WIN_HEIGHT);
+ mwindow.setInitialWidth(MODAL_WIN_WIDTH);
+ mwindow.setCookieName("policy-modal");
+ add(mwindow);
+
+ // Container for user list
+ final WebMarkupContainer container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+ add(container);
+
+ setWindowClosedCallback(mwindow, container);
+
+ final List<IColumn<AbstractPolicyTO, String>> columns = new ArrayList<>();
+
+ columns.add(new PropertyColumn<AbstractPolicyTO, String>(new ResourceModel("key"), "key", "key"));
+
+ columns.add(new PropertyColumn<AbstractPolicyTO, String>(
+ new ResourceModel("description"), "description", "description"));
+
+ columns.add(new AbstractColumn<AbstractPolicyTO, String>(new ResourceModel("type")) {
+
+ private static final long serialVersionUID = 8263694778917279290L;
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<AbstractPolicyTO>> cellItem, final String componentId,
+ final IModel<AbstractPolicyTO> model) {
+
+ cellItem.add(new Label(componentId, getString(model.getObject().getType().name())));
+ }
+ });
+
+ columns.add(new AbstractColumn<AbstractPolicyTO, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<AbstractPolicyTO>> cellItem, final String componentId,
+ final IModel<AbstractPolicyTO> model) {
+
+ final AbstractPolicyTO policyTO = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, pageRef);
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+
+ mwindow.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @Override
+ public Page createPage() {
+ return new PolicyModalPage(pageRef, mwindow, policyTO);
+ }
+ });
+
+ mwindow.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, "Policies");
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ policyRestClient.delete(policyTO.getKey(), policyTO.getClass());
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.OPERATION_ERROR));
+
+ LOG.error("While deleting policy {}({})",
+ policyTO.getKey(), policyTO.getDescription(), e);
+ }
+
+ target.add(container);
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, "Policies");
+
+ cellItem.add(panel);
+ }
+ });
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ final AjaxFallbackDefaultDataTable table = new AjaxFallbackDefaultDataTable("datatable", columns,
+ new PolicyDataProvider(), paginatorRows);
+
+ container.add(table);
+
+ final AjaxLink<Void> createButton = new ClearIndicatingAjaxLink<Void>("createLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ mwindow.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @Override
+ public Page createPage() {
+ return new PolicyModalPage(pageRef, mwindow, getPolicyTOInstance(policyType));
+ }
+ });
+
+ mwindow.show(target);
+ }
+ };
+
+ add(createButton);
+
+ MetaDataRoleAuthorizationStrategy.authorize(
+ createButton, ENABLE, xmlRolesReader.getEntitlement("Policies", "create"));
+
+ @SuppressWarnings("rawtypes")
+ final Form paginatorForm = new Form("PaginatorForm");
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this, "paginatorRows"),
+ prefMan.getPaginatorChoices());
+
+ rowsChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ prefMan.set(getWebRequest(), (WebResponse) getResponse(), Constants.PREF_POLICY_PAGINATOR_ROWS, String
+ .valueOf(paginatorRows));
+ table.setItemsPerPage(paginatorRows);
+
+ target.add(container);
+ }
+ });
+
+ paginatorForm.add(rowsChooser);
+ add(paginatorForm);
+ }
+
+ private void setWindowClosedCallback(final ModalWindow window, final WebMarkupContainer container) {
+ window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ target.add(container);
+ BasePage configuration = ((BasePage) pageRef.getPage());
+ if (configuration.isModalResult()) {
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ configuration.getFeedbackPanel().refresh(target);
+ configuration.setModalResult(false);
+ }
+ }
+ });
+ }
+
+ private class PolicyDataProvider extends SortableDataProvider<AbstractPolicyTO, String> {
+
+ private static final long serialVersionUID = -6976327453925166730L;
+
+ private final SortableDataProviderComparator<AbstractPolicyTO> comparator;
+
+ public PolicyDataProvider() {
+ super();
+
+ //Default sorting
+ setSort("description", SortOrder.ASCENDING);
+
+ comparator = new SortableDataProviderComparator<AbstractPolicyTO>(this);
+ }
+
+ @Override
+ public long size() {
+ return policyRestClient.getPolicies(policyType, true).size();
+ }
+
+ @Override
+ public Iterator<AbstractPolicyTO> iterator(final long first, final long count) {
+ final List<AbstractPolicyTO> policies = policyRestClient.getPolicies(policyType, true);
+
+ Collections.sort(policies, comparator);
+
+ return policies.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public IModel<AbstractPolicyTO> model(final AbstractPolicyTO object) {
+ return new CompoundPropertyModel<AbstractPolicyTO>(object);
+ }
+ }
+
+ private AbstractPolicyTO getPolicyTOInstance(final PolicyType policyType) {
+ AbstractPolicyTO policyTO;
+ switch (policyType) {
+ case GLOBAL_ACCOUNT:
+ policyTO = new AccountPolicyTO(true);
+ break;
+
+ case ACCOUNT:
+ policyTO = new AccountPolicyTO();
+ break;
+
+ case GLOBAL_PASSWORD:
+ policyTO = new PasswordPolicyTO(true);
+ break;
+
+ case PASSWORD:
+ policyTO = new PasswordPolicyTO();
+ break;
+
+ case GLOBAL_SYNC:
+ policyTO = new SyncPolicyTO(true);
+ break;
+
+ case SYNC:
+ default:
+ policyTO = new SyncPolicyTO();
+ }
+
+ return policyTO;
+ }
+}
[15/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnPoolConfTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnPoolConfTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnPoolConfTO.java
new file mode 100644
index 0000000..9f455dc
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnPoolConfTO.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "connPoolConf")
+@XmlType
+public class ConnPoolConfTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -214360178113476623L;
+
+ private Integer maxObjects;
+
+ private Integer minIdle;
+
+ private Integer maxIdle;
+
+ private Long maxWait;
+
+ private Long minEvictableIdleTimeMillis;
+
+ public Integer getMaxObjects() {
+ return maxObjects;
+ }
+
+ public void setMaxObjects(final Integer maxObjects) {
+ this.maxObjects = maxObjects;
+ }
+
+ public Integer getMinIdle() {
+ return minIdle;
+ }
+
+ public void setMinIdle(final Integer minIdle) {
+ this.minIdle = minIdle;
+ }
+
+ public Integer getMaxIdle() {
+ return maxIdle;
+ }
+
+ public void setMaxIdle(final Integer maxIdle) {
+ this.maxIdle = maxIdle;
+ }
+
+ public Long getMaxWait() {
+ return maxWait;
+ }
+
+ public void setMaxWait(final Long maxWait) {
+ this.maxWait = maxWait;
+ }
+
+ public Long getMinEvictableIdleTimeMillis() {
+ return minEvictableIdleTimeMillis;
+ }
+
+ public void setMinEvictableIdleTimeMillis(final Long minEvictableIdleTimeMillis) {
+ this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/DerSchemaTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/DerSchemaTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/DerSchemaTO.java
new file mode 100644
index 0000000..dc84864
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/DerSchemaTO.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "derivedSchema")
+@XmlType
+public class DerSchemaTO extends AbstractSchemaTO {
+
+ private static final long serialVersionUID = -6747399803792103108L;
+
+ private String expression;
+
+ public String getExpression() {
+ return expression;
+ }
+
+ public void setExpression(final String expression) {
+ this.expression = expression;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ErrorTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ErrorTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ErrorTO.java
new file mode 100644
index 0000000..e0f14ad
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ErrorTO.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.ClientExceptionType;
+
+@XmlRootElement(name = "error")
+@XmlType
+public class ErrorTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 2435764161719225927L;
+
+ private int status;
+
+ private ClientExceptionType type;
+
+ private final List<Object> elements = new ArrayList<>();
+
+ public int getStatus() {
+ return status;
+ }
+
+ public void setStatus(final int status) {
+ this.status = status;
+ }
+
+ public ClientExceptionType getType() {
+ return type;
+ }
+
+ public void setType(final ClientExceptionType type) {
+ this.type = type;
+ }
+
+ @XmlElementWrapper(name = "elements")
+ @XmlElement(name = "element")
+ @JsonProperty("elements")
+ public List<Object> getElements() {
+ return elements;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/EventCategoryTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/EventCategoryTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/EventCategoryTO.java
new file mode 100644
index 0000000..8e11686
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/EventCategoryTO.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.AuditElements;
+
+@XmlRootElement(name = "eventCategory")
+@XmlType
+public class EventCategoryTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -4340060002701633401L;
+
+ private AuditElements.EventCategoryType type;
+
+ private String category;
+
+ private String subcategory;
+
+ private final List<String> events = new ArrayList<String>();
+
+ /**
+ * Constructor for Type.REST event category.
+ */
+ public EventCategoryTO() {
+ this.type = AuditElements.EventCategoryType.REST;
+ }
+
+ /**
+ * Constructor for the given Type event category.
+ */
+ public EventCategoryTO(final AuditElements.EventCategoryType type) {
+ this.type = type;
+ }
+
+ public AuditElements.EventCategoryType getType() {
+ return type;
+ }
+
+ public void setType(final AuditElements.EventCategoryType type) {
+ this.type = type == null ? AuditElements.EventCategoryType.CUSTOM : type;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public void setCategory(final String category) {
+ this.category = category;
+ }
+
+ public String getSubcategory() {
+ return subcategory;
+ }
+
+ public void setSubcategory(final String subcategory) {
+ this.subcategory = subcategory;
+ }
+
+ @XmlElementWrapper(name = "events")
+ @XmlElement(name = "event")
+ @JsonProperty("events")
+ public List<String> getEvents() {
+ return events;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/LoggerTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/LoggerTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/LoggerTO.java
new file mode 100644
index 0000000..810a143
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/LoggerTO.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.LoggerLevel;
+
+@XmlRootElement(name = "logger")
+@XmlType
+public class LoggerTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -7794833835668648505L;
+
+ private String key;
+
+ private LoggerLevel level;
+
+ public LoggerLevel getLevel() {
+ return level;
+ }
+
+ public void setLevel(final LoggerLevel level) {
+ this.level = level;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(final String key) {
+ this.key = key;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingItemTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingItemTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingItemTO.java
new file mode 100644
index 0000000..4df561c
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingItemTO.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.IntMappingType;
+import org.apache.syncope.common.lib.types.MappingPurpose;
+
+@XmlRootElement(name = "mappingItem")
+@XmlType
+public class MappingItemTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 2983498836767176862L;
+
+ private Long key;
+
+ /**
+ * Attribute schema to be mapped. Consider that we can associate tha same attribute schema more than once, with
+ * different aliases, to different resource attributes.
+ */
+ private String intAttrName;
+
+ /**
+ * Schema type to be mapped.
+ */
+ private IntMappingType intMappingType;
+
+ /**
+ * External resource's field to be mapped.
+ */
+ private String extAttrName;
+
+ /**
+ * Specify if the mapped target resource's field is the key.
+ */
+ private boolean accountid;
+
+ /**
+ * Specify if the mapped target resource's field is the password.
+ */
+ private boolean password;
+
+ /**
+ * Specify if the mapped target resource's field is nullable.
+ */
+ private String mandatoryCondition = "false";
+
+ /**
+ * Mapping purposes: SYNCHRONIZATION, PROPAGATION, BOTH, NONE.
+ */
+ private MappingPurpose purpose;
+
+ public boolean isAccountid() {
+ return accountid;
+ }
+
+ public void setAccountid(final boolean accountid) {
+ this.accountid = accountid;
+ }
+
+ public String getExtAttrName() {
+ return extAttrName;
+ }
+
+ public void setExtAttrName(final String extAttrName) {
+ this.extAttrName = extAttrName;
+ }
+
+ public Long getKey() {
+ return key;
+ }
+
+ public void setKey(final Long key) {
+ this.key = key;
+ }
+
+ public String getMandatoryCondition() {
+ return mandatoryCondition;
+ }
+
+ public void setMandatoryCondition(final String mandatoryCondition) {
+ this.mandatoryCondition = mandatoryCondition;
+ }
+
+ public boolean isPassword() {
+ return password;
+ }
+
+ public void setPassword(final boolean password) {
+ this.password = password;
+ }
+
+ public String getIntAttrName() {
+ return intAttrName;
+ }
+
+ public void setIntAttrName(final String intAttrName) {
+ this.intAttrName = intAttrName;
+ }
+
+ public IntMappingType getIntMappingType() {
+ return intMappingType;
+ }
+
+ public void setIntMappingType(final IntMappingType intMappingType) {
+ this.intMappingType = intMappingType;
+ }
+
+ public MappingPurpose getPurpose() {
+ return purpose;
+ }
+
+ public void setPurpose(final MappingPurpose purpose) {
+ this.purpose = purpose;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingTO.java
new file mode 100644
index 0000000..aea9556
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingTO.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.IntMappingType;
+
+@XmlRootElement(name = "mapping")
+@XmlType
+public class MappingTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 8447688036282611118L;
+
+ private String accountLink;
+
+ private final List<MappingItemTO> items = new ArrayList<>();
+
+ public String getAccountLink() {
+ return accountLink;
+ }
+
+ public void setAccountLink(final String accountLink) {
+ this.accountLink = accountLink;
+ }
+
+ public MappingItemTO getAccountIdItem() {
+ MappingItemTO accountIdItem = null;
+ for (MappingItemTO item : getItems()) {
+ if (item.isAccountid()) {
+ accountIdItem = item;
+ }
+ }
+ return accountIdItem;
+ }
+
+ protected boolean addAccountIdItem(final MappingItemTO accountIdItem) {
+ if (IntMappingType.UserVirtualSchema == accountIdItem.getIntMappingType()
+ || IntMappingType.RoleVirtualSchema == accountIdItem.getIntMappingType()
+ || IntMappingType.MembershipVirtualSchema == accountIdItem.getIntMappingType()
+ || IntMappingType.Password == accountIdItem.getIntMappingType()) {
+
+ throw new IllegalArgumentException("Virtual attributes cannot be set as accountId");
+ }
+ if (IntMappingType.Password == accountIdItem.getIntMappingType()) {
+ throw new IllegalArgumentException("Password attributes cannot be set as accountId");
+ }
+
+ accountIdItem.setExtAttrName(accountIdItem.getExtAttrName());
+ accountIdItem.setAccountid(true);
+
+ return this.addItem(accountIdItem);
+ }
+
+ public boolean setAccountIdItem(final MappingItemTO accountIdItem) {
+ return accountIdItem == null
+ ? removeItem(getAccountIdItem())
+ : addAccountIdItem(accountIdItem);
+ }
+
+ public MappingItemTO getPasswordItem() {
+ MappingItemTO passwordItem = null;
+ for (MappingItemTO item : getItems()) {
+ if (item.isPassword()) {
+ passwordItem = item;
+ }
+ }
+ return passwordItem;
+ }
+
+ public boolean setPasswordItem(final MappingItemTO passwordItem) {
+ if (passwordItem == null) {
+ return this.removeItem(getPasswordItem());
+ } else {
+ passwordItem.setExtAttrName(null);
+ passwordItem.setPassword(true);
+ return addItem(passwordItem);
+ }
+ }
+
+ @XmlElementWrapper(name = "items")
+ @XmlElement(name = "item")
+ @JsonProperty("items")
+ public List<MappingItemTO> getItems() {
+ return items;
+ }
+
+ public boolean addItem(final MappingItemTO item) {
+ return item == null ? false : this.items.contains(item) || this.items.add(item);
+ }
+
+ public boolean removeItem(final MappingItemTO item) {
+ return this.items.remove(item);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java
new file mode 100644
index 0000000..d53e20a
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "membership")
+@XmlType
+public class MembershipTO extends AbstractAttributableTO {
+
+ private static final long serialVersionUID = 5992828670273935861L;
+
+ private long roleId;
+
+ private String roleName;
+
+ public long getRoleId() {
+ return roleId;
+ }
+
+ public void setRoleId(final long roleId) {
+ this.roleId = roleId;
+ }
+
+ public String getRoleName() {
+ return roleName;
+ }
+
+ public void setRoleName(final String roleName) {
+ this.roleName = roleName;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java
new file mode 100644
index 0000000..51feffa
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.types.IntMappingType;
+import org.apache.syncope.common.lib.types.TraceLevel;
+
+@XmlRootElement(name = "notification")
+@XmlType
+public class NotificationTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -6145117115632592612L;
+
+ private Long key;
+
+ private final List<String> events = new ArrayList<>();
+
+ private String userAbout;
+
+ private String roleAbout;
+
+ private String recipients;
+
+ private final List<String> staticRecipients = new ArrayList<>();
+
+ private IntMappingType recipientAttrType;
+
+ private String recipientAttrName;
+
+ private boolean selfAsRecipient;
+
+ private String sender;
+
+ private String subject;
+
+ private String template;
+
+ private TraceLevel traceLevel;
+
+ private boolean active;
+
+ public String getUserAbout() {
+ return userAbout;
+ }
+
+ public void setUserAbout(final String userAbout) {
+ this.userAbout = userAbout;
+ }
+
+ public String getRoleAbout() {
+ return roleAbout;
+ }
+
+ public void setRoleAbout(final String roleAbout) {
+ this.roleAbout = roleAbout;
+ }
+
+ @XmlElementWrapper(name = "events")
+ @XmlElement(name = "event")
+ @JsonProperty("events")
+ public List<String> getEvents() {
+ return events;
+ }
+
+ @XmlElementWrapper(name = "staticRecipients")
+ @XmlElement(name = "staticRecipient")
+ @JsonProperty("staticRecipients")
+ public List<String> getStaticRecipients() {
+ return staticRecipients;
+ }
+
+ public Long getKey() {
+ return key;
+ }
+
+ public void setKey(Long key) {
+ this.key = key;
+ }
+
+ public String getRecipients() {
+ return recipients;
+ }
+
+ public void setRecipients(final String recipients) {
+ this.recipients = recipients;
+ }
+
+ public String getRecipientAttrName() {
+ return recipientAttrName;
+ }
+
+ public void setRecipientAttrName(final String recipientAttrName) {
+ this.recipientAttrName = recipientAttrName;
+ }
+
+ public IntMappingType getRecipientAttrType() {
+ return recipientAttrType;
+ }
+
+ public void setRecipientAttrType(final IntMappingType recipientAttrType) {
+ this.recipientAttrType = recipientAttrType;
+ }
+
+ public boolean isSelfAsRecipient() {
+ return selfAsRecipient;
+ }
+
+ public void setSelfAsRecipient(final boolean selfAsRecipient) {
+ this.selfAsRecipient = selfAsRecipient;
+ }
+
+ public String getSender() {
+ return sender;
+ }
+
+ public void setSender(final String sender) {
+ this.sender = sender;
+ }
+
+ public String getSubject() {
+ return subject;
+ }
+
+ public void setSubject(final String subject) {
+ this.subject = subject;
+ }
+
+ public String getTemplate() {
+ return template;
+ }
+
+ public void setTemplate(final String template) {
+ this.template = template;
+ }
+
+ public TraceLevel getTraceLevel() {
+ return traceLevel;
+ }
+
+ public void setTraceLevel(final TraceLevel traceLevel) {
+ this.traceLevel = traceLevel;
+ }
+
+ public boolean isActive() {
+ return active;
+ }
+
+ public void setActive(final boolean active) {
+ this.active = active;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTaskTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTaskTO.java
new file mode 100644
index 0000000..48661f9
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTaskTO.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.types.TraceLevel;
+
+@XmlRootElement(name = "notificationTask")
+@XmlType
+public class NotificationTaskTO extends AbstractTaskTO {
+
+ private static final long serialVersionUID = 371671242591093846L;
+
+ private final Set<String> recipients = new HashSet<>();
+
+ private String sender;
+
+ private String subject;
+
+ private String textBody;
+
+ private String htmlBody;
+
+ private boolean executed;
+
+ private TraceLevel traceLevel;
+
+ @XmlElementWrapper(name = "recipients")
+ @XmlElement(name = "recipient")
+ @JsonProperty("recipients")
+ public Set<String> getRecipients() {
+ return recipients;
+ }
+
+ public String getSender() {
+ return sender;
+ }
+
+ public void setSender(final String sender) {
+ this.sender = sender;
+ }
+
+ public String getSubject() {
+ return subject;
+ }
+
+ public void setSubject(final String subject) {
+ this.subject = subject;
+ }
+
+ public String getTextBody() {
+ return textBody;
+ }
+
+ public void setTextBody(final String textBody) {
+ this.textBody = textBody;
+ }
+
+ public String getHtmlBody() {
+ return htmlBody;
+ }
+
+ public void setHtmlBody(final String htmlBody) {
+ this.htmlBody = htmlBody;
+ }
+
+ public boolean isExecuted() {
+ return executed;
+ }
+
+ public void setExecuted(boolean executed) {
+ this.executed = executed;
+ }
+
+ public TraceLevel getTraceLevel() {
+ return traceLevel;
+ }
+
+ public void setTraceLevel(final TraceLevel traceLevel) {
+ this.traceLevel = traceLevel;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedResult.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedResult.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedResult.java
new file mode 100644
index 0000000..f383ece
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedResult.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlRootElement(name = "pagedResult")
+@XmlType
+public class PagedResult<T extends AbstractBaseBean> extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 3472875885259250934L;
+
+ private URI prev;
+
+ private URI next;
+
+ private final List<T> result = new ArrayList<T>();
+
+ private int page;
+
+ private int size;
+
+ private int totalCount;
+
+ public URI getPrev() {
+ return prev;
+ }
+
+ public void setPrev(final URI prev) {
+ this.prev = prev;
+ }
+
+ public URI getNext() {
+ return next;
+ }
+
+ public void setNext(final URI next) {
+ this.next = next;
+ }
+
+ @XmlElementWrapper(name = "result")
+ @XmlElement(name = "item")
+ @JsonProperty("result")
+ @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
+ public List<T> getResult() {
+ return result;
+ }
+
+ public int getPage() {
+ return page;
+ }
+
+ public void setPage(final int page) {
+ this.page = page;
+ }
+
+ public int getSize() {
+ return size;
+ }
+
+ public void setSize(final int size) {
+ this.size = size;
+ }
+
+ public int getTotalCount() {
+ return totalCount;
+ }
+
+ public void setTotalCount(final int totalCount) {
+ this.totalCount = totalCount;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/PasswordPolicyTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PasswordPolicyTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PasswordPolicyTO.java
new file mode 100644
index 0000000..05c4e5a
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PasswordPolicyTO.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.types.PasswordPolicySpec;
+import org.apache.syncope.common.lib.types.PolicyType;
+
+@XmlRootElement(name = "passwordPolicy")
+@XmlType
+public class PasswordPolicyTO extends AbstractPolicyTO {
+
+ private static final long serialVersionUID = -5606086441294799690L;
+
+ private PasswordPolicySpec specification;
+
+ public PasswordPolicyTO() {
+ this(false);
+ }
+
+ public PasswordPolicyTO(boolean global) {
+ super();
+
+ PolicyType type = global
+ ? PolicyType.GLOBAL_PASSWORD
+ : PolicyType.PASSWORD;
+ setType(type);
+ }
+
+ public void setSpecification(final PasswordPolicySpec specification) {
+ this.specification = specification;
+ }
+
+ public PasswordPolicySpec getSpecification() {
+ return specification;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/PlainSchemaTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PlainSchemaTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PlainSchemaTO.java
new file mode 100644
index 0000000..4568e36
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PlainSchemaTO.java
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.common.lib.types.AttrSchemaType;
+import org.apache.syncope.common.lib.types.CipherAlgorithm;
+
+@XmlRootElement(name = "schema")
+@XmlType
+public class PlainSchemaTO extends AbstractSchemaTO {
+
+ private static final long serialVersionUID = -8133983392476990308L;
+
+ private AttrSchemaType type = AttrSchemaType.String;
+
+ private String mandatoryCondition;
+
+ private boolean multivalue;
+
+ private boolean uniqueConstraint;
+
+ private boolean readonly;
+
+ private String conversionPattern;
+
+ private String validatorClass;
+
+ private String enumerationValues;
+
+ private String enumerationKeys;
+
+ private String secretKey;
+
+ private CipherAlgorithm cipherAlgorithm;
+
+ private String mimeType;
+
+ public String getConversionPattern() {
+ return conversionPattern;
+ }
+
+ public void setConversionPattern(final String conversionPattern) {
+ this.conversionPattern = conversionPattern;
+ }
+
+ public String getMandatoryCondition() {
+ return StringUtils.isNotBlank(mandatoryCondition)
+ ? mandatoryCondition
+ : "false";
+ }
+
+ public void setMandatoryCondition(final String mandatoryCondition) {
+ this.mandatoryCondition = mandatoryCondition;
+ }
+
+ public boolean isMultivalue() {
+ return multivalue;
+ }
+
+ public void setMultivalue(final boolean multivalue) {
+ this.multivalue = multivalue;
+ }
+
+ public boolean isUniqueConstraint() {
+ return uniqueConstraint;
+ }
+
+ public void setUniqueConstraint(final boolean uniqueConstraint) {
+ this.uniqueConstraint = uniqueConstraint;
+ }
+
+ public boolean isReadonly() {
+ return readonly;
+ }
+
+ public void setReadonly(final boolean readonly) {
+ this.readonly = readonly;
+ }
+
+ public AttrSchemaType getType() {
+ return type;
+ }
+
+ public void setType(final AttrSchemaType type) {
+ this.type = type;
+ }
+
+ public String getValidatorClass() {
+ return validatorClass;
+ }
+
+ public void setValidatorClass(final String validatorClass) {
+ this.validatorClass = validatorClass;
+ }
+
+ public String getEnumerationValues() {
+ return enumerationValues;
+ }
+
+ public void setEnumerationValues(final String enumerationValues) {
+ this.enumerationValues = enumerationValues;
+ }
+
+ public String getEnumerationKeys() {
+ return enumerationKeys;
+ }
+
+ public void setEnumerationKeys(final String enumerationKeys) {
+ this.enumerationKeys = enumerationKeys;
+ }
+
+ public String getSecretKey() {
+ return secretKey;
+ }
+
+ public void setSecretKey(final String secretKey) {
+ this.secretKey = secretKey;
+ }
+
+ public CipherAlgorithm getCipherAlgorithm() {
+ return cipherAlgorithm;
+ }
+
+ public void setCipherAlgorithm(final CipherAlgorithm cipherAlgorithm) {
+ this.cipherAlgorithm = cipherAlgorithm;
+ }
+
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ public void setMimeType(final String mimeType) {
+ this.mimeType = mimeType;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java
new file mode 100644
index 0000000..de844be
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.types.PropagationTaskExecStatus;
+
+/**
+ * Single propagation status.
+ */
+@XmlRootElement(name = "propagationStatus")
+@XmlType
+public class PropagationStatus extends AbstractBaseBean {
+
+ /**
+ * Serial version ID.
+ */
+ private static final long serialVersionUID = 3921498450222857690L;
+
+ /**
+ * Object before propagation.
+ */
+ private ConnObjectTO beforeObj;
+
+ /**
+ * Object after propagation.
+ */
+ private ConnObjectTO afterObj;
+
+ /**
+ * Propagated resource name.
+ */
+ private String resource;
+
+ /**
+ * Propagation task execution status.
+ */
+ private PropagationTaskExecStatus status;
+
+ /**
+ * Propagation task execution failure message.
+ */
+ private String failureReason;
+
+ /**
+ * After object getter.
+ *
+ * @return after object.
+ */
+ public ConnObjectTO getAfterObj() {
+ return afterObj;
+ }
+
+ /**
+ * After object setter.
+ *
+ * @param afterObj object.
+ */
+ public void setAfterObj(final ConnObjectTO afterObj) {
+ this.afterObj = afterObj;
+ }
+
+ /**
+ * Before object getter.
+ *
+ * @return before object.
+ */
+ public ConnObjectTO getBeforeObj() {
+ return beforeObj;
+ }
+
+ /**
+ * Before object setter.
+ *
+ * @param beforeObj object.
+ */
+ public void setBeforeObj(final ConnObjectTO beforeObj) {
+ this.beforeObj = beforeObj;
+ }
+
+ /**
+ * resource name getter.
+ *
+ * @return resource name.
+ */
+ public String getResource() {
+ return resource;
+ }
+
+ /**
+ * Resource name setter.
+ *
+ * @param resource resource name
+ */
+ public void setResource(final String resource) {
+ this.resource = resource;
+ }
+
+ /**
+ * Propagation execution status getter.
+ *
+ * @return status
+ */
+ public PropagationTaskExecStatus getStatus() {
+ return status;
+ }
+
+ /**
+ * Propagation execution status setter.
+ *
+ * @param status propagation execution status
+ */
+ public void setStatus(final PropagationTaskExecStatus status) {
+ this.status = status;
+ }
+
+ /**
+ * Propagation execution message getter.
+ *
+ * @return failureReason.
+ */
+ public String getFailureReason() {
+ return failureReason;
+ }
+
+ /**
+ * Propagation execution failure message setter.
+ *
+ * @param failureReason describes why this propagation failed
+ */
+ public void setFailureReason(final String failureReason) {
+ this.failureReason = failureReason;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationTaskTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationTaskTO.java
new file mode 100644
index 0000000..7c6ec08
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationTaskTO.java
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.types.PropagationMode;
+import org.apache.syncope.common.lib.types.ResourceOperation;
+import org.apache.syncope.common.lib.types.SubjectType;
+
+@XmlRootElement(name = "propagationTask")
+@XmlType
+public class PropagationTaskTO extends AbstractTaskTO {
+
+ private static final long serialVersionUID = 386450127003321197L;
+
+ private PropagationMode propagationMode;
+
+ private ResourceOperation propagationOperation;
+
+ private String accountId;
+
+ private String oldAccountId;
+
+ private String xmlAttributes;
+
+ private String resource;
+
+ private String objectClassName;
+
+ private SubjectType subjectType;
+
+ private Long subjectId;
+
+ public String getAccountId() {
+ return accountId;
+ }
+
+ public void setAccountId(final String accountId) {
+ this.accountId = accountId;
+ }
+
+ public String getOldAccountId() {
+ return oldAccountId;
+ }
+
+ public void setOldAccountId(final String oldAccountId) {
+ this.oldAccountId = oldAccountId;
+ }
+
+ public PropagationMode getPropagationMode() {
+ return propagationMode;
+ }
+
+ public void setPropagationMode(final PropagationMode propagationMode) {
+ this.propagationMode = propagationMode;
+ }
+
+ public String getResource() {
+ return resource;
+ }
+
+ public void setResource(final String resource) {
+ this.resource = resource;
+ }
+
+ public ResourceOperation getPropagationOperation() {
+ return propagationOperation;
+ }
+
+ public void setPropagationOperation(final ResourceOperation propagationOperation) {
+
+ this.propagationOperation = propagationOperation;
+ }
+
+ public String getXmlAttributes() {
+ return xmlAttributes;
+ }
+
+ public void setXmlAttributes(final String xmlAttributes) {
+ this.xmlAttributes = xmlAttributes;
+ }
+
+ public String getObjectClassName() {
+ return objectClassName;
+ }
+
+ public void setObjectClassName(final String objectClassName) {
+ this.objectClassName = objectClassName;
+ }
+
+ public SubjectType getSubjectType() {
+ return subjectType;
+ }
+
+ public void setSubjectType(final SubjectType subjectType) {
+ this.subjectType = subjectType;
+ }
+
+ public Long getSubjectId() {
+ return subjectId;
+ }
+
+ public void setSubjectId(final Long subjectId) {
+ this.subjectId = subjectId;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/PushTaskTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PushTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PushTaskTO.java
new file mode 100644
index 0000000..13d2ff4
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PushTaskTO.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "pushTask")
+@XmlType
+public class PushTaskTO extends AbstractProvisioningTaskTO {
+
+ private static final long serialVersionUID = -2143537546915809018L;
+
+ private String userFilter;
+
+ private String roleFilter;
+
+ public String getUserFilter() {
+ return userFilter;
+ }
+
+ public void setUserFilter(final String filter) {
+ this.userFilter = filter;
+ }
+
+ public String getRoleFilter() {
+ return roleFilter;
+ }
+
+ public void setRoleFilter(final String roleFilter) {
+ this.roleFilter = roleFilter;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportExecTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportExecTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportExecTO.java
new file mode 100644
index 0000000..ef92b3b
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportExecTO.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "reportExec")
+@XmlType
+public class ReportExecTO extends AbstractExecTO {
+
+ private static final long serialVersionUID = -1025555939724089215L;
+
+ private long report;
+
+ public long getReport() {
+ return report;
+ }
+
+ public void setReport(long report) {
+ this.report = report;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java
new file mode 100644
index 0000000..3d4d4fc
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java
@@ -0,0 +1,151 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.syncope.common.lib.report.AbstractReportletConf;
+
+@XmlRootElement(name = "report")
+@XmlType
+public class ReportTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 5274568072084814410L;
+
+ private long key;
+
+ private String name;
+
+ private final List<AbstractReportletConf> reportletConfs = new ArrayList<>();
+
+ private String cronExpression;
+
+ private final List<ReportExecTO> executions = new ArrayList<>();
+
+ private String latestExecStatus;
+
+ private Date lastExec;
+
+ private Date nextExec;
+
+ private Date startDate;
+
+ private Date endDate;
+
+ public long getKey() {
+ return key;
+ }
+
+ public void setKey(long key) {
+ this.key = key;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @XmlElementWrapper(name = "reportletConfs")
+ @XmlElement(name = "reportletConf")
+ @JsonProperty("reportletConfs")
+ public List<AbstractReportletConf> getReportletConfs() {
+ return reportletConfs;
+ }
+
+ public String getCronExpression() {
+ return cronExpression;
+ }
+
+ public void setCronExpression(final String cronExpression) {
+ this.cronExpression = cronExpression;
+ }
+
+ @XmlElementWrapper(name = "executions")
+ @XmlElement(name = "execution")
+ @JsonProperty("executions")
+ public List<ReportExecTO> getExecutions() {
+ return executions;
+ }
+
+ public String getLatestExecStatus() {
+ return latestExecStatus;
+ }
+
+ public void setLatestExecStatus(final String latestExecStatus) {
+ this.latestExecStatus = latestExecStatus;
+ }
+
+ public Date getLastExec() {
+ return lastExec == null
+ ? null
+ : new Date(lastExec.getTime());
+ }
+
+ public void setLastExec(final Date lastExec) {
+ if (lastExec != null) {
+ this.lastExec = new Date(lastExec.getTime());
+ }
+ }
+
+ public Date getNextExec() {
+ return nextExec == null
+ ? null
+ : new Date(nextExec.getTime());
+ }
+
+ public void setNextExec(final Date nextExec) {
+ if (nextExec != null) {
+ this.nextExec = new Date(nextExec.getTime());
+ }
+ }
+
+ public Date getStartDate() {
+ return startDate == null
+ ? null
+ : new Date(startDate.getTime());
+ }
+
+ public void setStartDate(final Date startDate) {
+ if (startDate != null) {
+ this.startDate = new Date(startDate.getTime());
+ }
+ }
+
+ public Date getEndDate() {
+ return endDate == null
+ ? null
+ : new Date(endDate.getTime());
+ }
+
+ public void setEndDate(final Date endDate) {
+ if (endDate != null) {
+ this.endDate = new Date(endDate.getTime());
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java
new file mode 100644
index 0000000..98f33d2
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java
@@ -0,0 +1,270 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.syncope.common.lib.types.PropagationMode;
+import org.apache.syncope.common.lib.types.TraceLevel;
+
+@XmlRootElement(name = "resource")
+@XmlType
+public class ResourceTO extends AbstractAnnotatedBean {
+
+ private static final long serialVersionUID = -9193551354041698963L;
+
+ /**
+ * The resource identifier is the name.
+ */
+ private String name;
+
+ /**
+ * The resource type is identified by the associated connector.
+ */
+ private Long connectorId;
+
+ /**
+ * Convenience information: display name for the connector id.
+ */
+ private String connectorDisplayName;
+
+ private MappingTO umapping;
+
+ private MappingTO rmapping;
+
+ private boolean propagationPrimary;
+
+ private int propagationPriority;
+
+ private boolean randomPwdIfNotProvided;
+
+ private PropagationMode propagationMode;
+
+ private boolean enforceMandatoryCondition;
+
+ private TraceLevel createTraceLevel;
+
+ private TraceLevel updateTraceLevel;
+
+ private TraceLevel deleteTraceLevel;
+
+ private TraceLevel syncTraceLevel;
+
+ private Long passwordPolicy;
+
+ private Long accountPolicy;
+
+ private Long syncPolicy;
+
+ private Set<ConnConfProperty> connConfProperties;
+
+ private String usyncToken;
+
+ private String rsyncToken;
+
+ private List<String> propagationActionsClassNames = new ArrayList<>();
+
+ public ResourceTO() {
+ super();
+
+ connConfProperties = new HashSet<>();
+ propagationMode = PropagationMode.TWO_PHASES;
+ propagationPriority = 0;
+
+ createTraceLevel = TraceLevel.ALL;
+ updateTraceLevel = TraceLevel.ALL;
+ deleteTraceLevel = TraceLevel.ALL;
+ syncTraceLevel = TraceLevel.ALL;
+ }
+
+ public String getKey() {
+ return name;
+ }
+
+ public void setKey(final String key) {
+ this.name = key;
+ }
+
+ public boolean isEnforceMandatoryCondition() {
+ return enforceMandatoryCondition;
+ }
+
+ public void setEnforceMandatoryCondition(final boolean enforceMandatoryCondition) {
+ this.enforceMandatoryCondition = enforceMandatoryCondition;
+ }
+
+ public Long getConnectorId() {
+ return connectorId;
+ }
+
+ public void setConnectorId(final Long connectorId) {
+ this.connectorId = connectorId;
+ }
+
+ public String getConnectorDisplayName() {
+ return connectorDisplayName;
+ }
+
+ public void setConnectorDisplayName(final String connectorDisplayName) {
+ this.connectorDisplayName = connectorDisplayName;
+ }
+
+ public MappingTO getUmapping() {
+ return umapping;
+ }
+
+ public void setUmapping(final MappingTO umapping) {
+ this.umapping = umapping;
+ }
+
+ public MappingTO getRmapping() {
+ return rmapping;
+ }
+
+ public void setRmapping(final MappingTO rmapping) {
+ this.rmapping = rmapping;
+ }
+
+ public boolean isPropagationPrimary() {
+ return propagationPrimary;
+ }
+
+ public void setPropagationPrimary(final boolean propagationPrimary) {
+ this.propagationPrimary = propagationPrimary;
+ }
+
+ public int getPropagationPriority() {
+ return propagationPriority;
+ }
+
+ public void setPropagationPriority(final int propagationPriority) {
+ this.propagationPriority = propagationPriority;
+ }
+
+ public boolean isRandomPwdIfNotProvided() {
+ return randomPwdIfNotProvided;
+ }
+
+ public void setRandomPwdIfNotProvided(final boolean randomPwdIfNotProvided) {
+ this.randomPwdIfNotProvided = randomPwdIfNotProvided;
+ }
+
+ public PropagationMode getPropagationMode() {
+ return propagationMode;
+ }
+
+ public void setPropagationMode(final PropagationMode propagationMode) {
+ this.propagationMode = propagationMode;
+ }
+
+ public TraceLevel getCreateTraceLevel() {
+ return createTraceLevel;
+ }
+
+ public void setCreateTraceLevel(final TraceLevel createTraceLevel) {
+ this.createTraceLevel = createTraceLevel;
+ }
+
+ public TraceLevel getDeleteTraceLevel() {
+ return deleteTraceLevel;
+ }
+
+ public void setDeleteTraceLevel(final TraceLevel deleteTraceLevel) {
+ this.deleteTraceLevel = deleteTraceLevel;
+ }
+
+ public TraceLevel getUpdateTraceLevel() {
+ return updateTraceLevel;
+ }
+
+ public void setUpdateTraceLevel(final TraceLevel updateTraceLevel) {
+ this.updateTraceLevel = updateTraceLevel;
+ }
+
+ public Long getPasswordPolicy() {
+ return passwordPolicy;
+ }
+
+ public void setPasswordPolicy(final Long passwordPolicy) {
+ this.passwordPolicy = passwordPolicy;
+ }
+
+ public Long getAccountPolicy() {
+ return accountPolicy;
+ }
+
+ public void setAccountPolicy(final Long accountPolicy) {
+ this.accountPolicy = accountPolicy;
+ }
+
+ public Long getSyncPolicy() {
+ return syncPolicy;
+ }
+
+ public void setSyncPolicy(final Long syncPolicy) {
+ this.syncPolicy = syncPolicy;
+ }
+
+ @XmlElementWrapper(name = "connConfProperties")
+ @XmlElement(name = "property")
+ @JsonProperty("connConfProperties")
+ public Set<ConnConfProperty> getConnConfProperties() {
+ return connConfProperties;
+ }
+
+ public TraceLevel getSyncTraceLevel() {
+ return syncTraceLevel;
+ }
+
+ public void setSyncTraceLevel(final TraceLevel syncTraceLevel) {
+ this.syncTraceLevel = syncTraceLevel;
+ }
+
+ public String getUsyncToken() {
+ return usyncToken;
+ }
+
+ public void setUsyncToken(final String syncToken) {
+ this.usyncToken = syncToken;
+ }
+
+ public String getRsyncToken() {
+ return rsyncToken;
+ }
+
+ public void setRsyncToken(final String syncToken) {
+ this.rsyncToken = syncToken;
+ }
+
+ @XmlElementWrapper(name = "propagationActionsClassNames")
+ @XmlElement(name = "propagationActionsClassName")
+ @JsonProperty("propagationActionsClassNames")
+ public List<String> getPropagationActionsClassNames() {
+ return propagationActionsClassNames;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java
new file mode 100644
index 0000000..7f0f0af
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java
@@ -0,0 +1,258 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "role")
+@XmlType
+@JsonIgnoreProperties({ "displayName" })
+public class RoleTO extends AbstractSubjectTO {
+
+ private static final long serialVersionUID = -7785920258290147542L;
+
+ private String name;
+
+ private long parent;
+
+ private Long userOwner;
+
+ private Long roleOwner;
+
+ private boolean inheritOwner;
+
+ private boolean inheritTemplates;
+
+ private boolean inheritPlainAttrs;
+
+ private boolean inheritDerAttrs;
+
+ private boolean inheritVirAttrs;
+
+ private boolean inheritPasswordPolicy;
+
+ private boolean inheritAccountPolicy;
+
+ private final List<String> entitlements = new ArrayList<>();
+
+ private List<String> rPlainAttrTemplates = new ArrayList<>();
+
+ private List<String> rDerAttrTemplates = new ArrayList<>();
+
+ private List<String> rVirAttrTemplates = new ArrayList<>();
+
+ private List<String> mPlainAttrTemplates = new ArrayList<>();
+
+ private List<String> mDerAttrTemplates = new ArrayList<>();
+
+ private List<String> mVirAttrTemplates = new ArrayList<>();
+
+ private Long passwordPolicy;
+
+ private Long accountPolicy;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public long getParent() {
+ return parent;
+ }
+
+ public void setParent(final long parent) {
+ this.parent = parent;
+ }
+
+ public Long getUserOwner() {
+ return userOwner;
+ }
+
+ public void setUserOwner(final Long userOwner) {
+ this.userOwner = userOwner;
+ }
+
+ public Long getRoleOwner() {
+ return roleOwner;
+ }
+
+ public void setRoleOwner(final Long roleOwner) {
+ this.roleOwner = roleOwner;
+ }
+
+ public boolean isInheritOwner() {
+ return inheritOwner;
+ }
+
+ public void setInheritOwner(final boolean inheritOwner) {
+ this.inheritOwner = inheritOwner;
+ }
+
+ public boolean isInheritTemplates() {
+ return inheritTemplates;
+ }
+
+ public void setInheritTemplates(boolean inheritTemplates) {
+ this.inheritTemplates = inheritTemplates;
+ }
+
+ public boolean isInheritPlainAttrs() {
+ return inheritPlainAttrs;
+ }
+
+ public void setInheritPlainAttrs(final boolean inheritPlainAttrs) {
+ this.inheritPlainAttrs = inheritPlainAttrs;
+ }
+
+ public boolean isInheritDerAttrs() {
+ return inheritDerAttrs;
+ }
+
+ public void setInheritDerAttrs(final boolean inheritDerAttrs) {
+ this.inheritDerAttrs = inheritDerAttrs;
+ }
+
+ public boolean isInheritVirAttrs() {
+ return inheritVirAttrs;
+ }
+
+ public void setInheritVirAttrs(final boolean inheritVirAttrs) {
+ this.inheritVirAttrs = inheritVirAttrs;
+ }
+
+ @XmlElementWrapper(name = "entitlements")
+ @XmlElement(name = "entitlement")
+ @JsonProperty("entitlements")
+ public List<String> getEntitlements() {
+ return entitlements;
+ }
+
+ @XmlElementWrapper(name = "rPlainAttrTemplates")
+ @XmlElement(name = "rPlainAttrTemplate")
+ @JsonProperty("rPlainAttrTemplates")
+ public List<String> getRPlainAttrTemplates() {
+ return rPlainAttrTemplates;
+ }
+
+ @XmlElementWrapper(name = "rDerAttrTemplates")
+ @XmlElement(name = "rDerAttrTemplate")
+ @JsonProperty("rDerAttrTemplates")
+ public List<String> getRDerAttrTemplates() {
+ return rDerAttrTemplates;
+ }
+
+ @XmlElementWrapper(name = "rVirAttrTemplates")
+ @XmlElement(name = "rVirAttrTemplate")
+ @JsonProperty("rVirAttrTemplates")
+ public List<String> getRVirAttrTemplates() {
+ return rVirAttrTemplates;
+ }
+
+ @XmlElementWrapper(name = "mPlainAttrTemplates")
+ @XmlElement(name = "mPlainAttrTemplate")
+ @JsonProperty("mPlainAttrTemplates")
+ public List<String> getMPlainAttrTemplates() {
+ return mPlainAttrTemplates;
+ }
+
+ @XmlElementWrapper(name = "mDerAttrTemplates")
+ @XmlElement(name = "mDerAttrTemplate")
+ @JsonProperty("mDerAttrTemplates")
+ public List<String> getMDerAttrTemplates() {
+ return mDerAttrTemplates;
+ }
+
+ @XmlElementWrapper(name = "mVirAttrTemplates")
+ @XmlElement(name = "mVirAttrTemplate")
+ @JsonProperty("mVirAttrTemplates")
+ public List<String> getMVirAttrTemplates() {
+ return mVirAttrTemplates;
+ }
+
+ public Long getPasswordPolicy() {
+ return passwordPolicy;
+ }
+
+ public void setPasswordPolicy(final Long passwordPolicy) {
+ this.passwordPolicy = passwordPolicy;
+ }
+
+ public boolean isInheritPasswordPolicy() {
+ return inheritPasswordPolicy;
+ }
+
+ /**
+ * Specify if password policy must be inherited. In this case eventual passwordPolicy occurrence will be ignored.
+ *
+ * @param inheritPasswordPolicy 'true' to inherit policy, false otherwise.
+ */
+ public void setInheritPasswordPolicy(final boolean inheritPasswordPolicy) {
+ this.inheritPasswordPolicy = inheritPasswordPolicy;
+ }
+
+ public Long getAccountPolicy() {
+ return accountPolicy;
+ }
+
+ public void setAccountPolicy(final Long accountPolicy) {
+ this.accountPolicy = accountPolicy;
+ }
+
+ public boolean isInheritAccountPolicy() {
+ return inheritAccountPolicy;
+ }
+
+ /**
+ * Specify if account policy must be inherited. In this case eventual accountPolicy occurrence will be ignored.
+ *
+ * @param inheritAccountPolicy 'true' to inherit policy, false otherwise.
+ */
+ public void setInheritAccountPolicy(final boolean inheritAccountPolicy) {
+ this.inheritAccountPolicy = inheritAccountPolicy;
+ }
+
+ public String getDisplayName() {
+ return getKey() + " " + getName();
+ }
+
+ public static long fromDisplayName(final String displayName) {
+ long result = 0;
+ if (displayName != null && !displayName.isEmpty() && displayName.indexOf(' ') != -1) {
+ try {
+ result = Long.valueOf(displayName.split(" ")[0]);
+ } catch (NumberFormatException e) {
+ // just to avoid PMD warning about "empty catch block"
+ result = 0;
+ }
+ }
+
+ return result;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/SchedTaskTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/SchedTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SchedTaskTO.java
new file mode 100644
index 0000000..330a12d
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SchedTaskTO.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import java.util.Date;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "schedTask")
+@XmlType
+@XmlSeeAlso(AbstractProvisioningTaskTO.class)
+public class SchedTaskTO extends AbstractTaskTO {
+
+ private static final long serialVersionUID = -5722284116974636425L;
+
+ private String cronExpression;
+
+ private String jobClassName;
+
+ private String name;
+
+ private String description;
+
+ private Date lastExec;
+
+ private Date nextExec;
+
+ public String getCronExpression() {
+ return cronExpression;
+ }
+
+ public void setCronExpression(final String cronExpression) {
+ this.cronExpression = cronExpression;
+ }
+
+ public String getJobClassName() {
+ return jobClassName;
+ }
+
+ public void setJobClassName(final String jobClassName) {
+ this.jobClassName = jobClassName;
+ }
+
+ public Date getLastExec() {
+ return lastExec == null
+ ? null
+ : new Date(lastExec.getTime());
+ }
+
+ public void setLastExec(final Date lastExec) {
+ if (lastExec != null) {
+ this.lastExec = new Date(lastExec.getTime());
+ }
+ }
+
+ public Date getNextExec() {
+ return nextExec == null
+ ? null
+ : new Date(nextExec.getTime());
+ }
+
+ public void setNextExec(final Date nextExec) {
+ if (nextExec != null) {
+ this.nextExec = new Date(nextExec.getTime());
+ }
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(final String description) {
+ this.description = description;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/SecurityQuestionTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/SecurityQuestionTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SecurityQuestionTO.java
new file mode 100644
index 0000000..dd73f2c
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SecurityQuestionTO.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+
+@XmlRootElement(name = "securityQuestion")
+@XmlType
+public class SecurityQuestionTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 5969810939993556530L;
+
+ private long key;
+
+ private String content;
+
+ public long getKey() {
+ return key;
+ }
+
+ public void setKey(final long key) {
+ this.key = key;
+ }
+
+ public String getContent() {
+ return content;
+ }
+
+ public void setContent(final String content) {
+ this.content = content;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncPolicyTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncPolicyTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncPolicyTO.java
new file mode 100644
index 0000000..4edcc43
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncPolicyTO.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.syncope.common.lib.types.PolicyType;
+import org.apache.syncope.common.lib.types.SyncPolicySpec;
+
+@XmlRootElement(name = "syncPolicy")
+@XmlType
+public class SyncPolicyTO extends AbstractPolicyTO {
+
+ private static final long serialVersionUID = 993024634238024242L;
+
+ private SyncPolicySpec specification;
+
+ public SyncPolicyTO() {
+ this(false);
+ }
+
+ public SyncPolicyTO(final boolean global) {
+ super();
+
+ PolicyType type = global
+ ? PolicyType.GLOBAL_SYNC
+ : PolicyType.SYNC;
+ setType(type);
+ }
+
+ public void setSpecification(final SyncPolicySpec specification) {
+ this.specification = specification;
+ }
+
+ public SyncPolicySpec getSpecification() {
+ return specification;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncTaskTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncTaskTO.java
new file mode 100644
index 0000000..9e33e96
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncTaskTO.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "syncTask")
+@XmlType
+public class SyncTaskTO extends AbstractProvisioningTaskTO {
+
+ private static final long serialVersionUID = -2143537546915809017L;
+
+ private UserTO userTemplate;
+
+ private RoleTO roleTemplate;
+
+ private boolean fullReconciliation;
+
+ public UserTO getUserTemplate() {
+ return userTemplate;
+ }
+
+ public void setUserTemplate(final UserTO userTemplate) {
+ this.userTemplate = userTemplate;
+ }
+
+ public RoleTO getRoleTemplate() {
+ return roleTemplate;
+ }
+
+ public void setRoleTemplate(final RoleTO roleTemplate) {
+ this.roleTemplate = roleTemplate;
+ }
+
+ public boolean isFullReconciliation() {
+ return fullReconciliation;
+ }
+
+ public void setFullReconciliation(boolean fullReconciliation) {
+ this.fullReconciliation = fullReconciliation;
+ }
+}
[09/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/ReportService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/ReportService.java b/common/src/main/java/org/apache/syncope/common/services/ReportService.java
deleted file mode 100644
index 4bf9c27..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/ReportService.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.reqres.PagedResult;
-import org.apache.syncope.common.to.ReportExecTO;
-import org.apache.syncope.common.to.ReportTO;
-import org.apache.syncope.common.types.ReportExecExportFormat;
-import org.apache.syncope.common.wrap.ReportletConfClass;
-
-/**
- * REST operations for reports.
- */
-@Path("reports")
-public interface ReportService extends JAXRSService {
-
- /**
- * Returns a list of available classes for reportlet configuration.
- *
- * @return list of available classes for reportlet configuration
- */
- @GET
- @Path("reportletConfClasses")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<ReportletConfClass> getReportletConfClasses();
-
- /**
- * Returns report with matching id.
- *
- * @param reportId id of report to be read
- * @return report with matching id
- */
- @GET
- @Path("{reportId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- ReportTO read(@NotNull @PathParam("reportId") Long reportId);
-
- /**
- * Returns report execution with matching id.
- *
- * @param executionId report execution id to be selected
- * @return report execution with matching id
- */
- @GET
- @Path("executions/{executionId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- ReportExecTO readExecution(@NotNull @PathParam("executionId") Long executionId);
-
- /**
- * Returns a paged list of all existing reports.
- *
- * @return paged list of all existing reports
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<ReportTO> list();
-
- /**
- * Returns a paged list of all existing reports.
- *
- * @param orderBy list of ordering clauses, separated by comma
- * @return paged list of all existing reports
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<ReportTO> list(@QueryParam(PARAM_ORDERBY) String orderBy);
-
- /**
- * Returns a paged list of all existing reports matching page/size conditions.
- *
- * @param page selected page in relation to size
- * @param size number of entries per page
- * @return paged list of existing reports matching page/size conditions
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<ReportTO> list(
- @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
- @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
-
- /**
- * Returns a paged list of all existing reports matching page/size conditions.
- *
- * @param page selected page in relation to size
- * @param size number of entries per page
- * @param orderBy list of ordering clauses, separated by comma
- * @return paged list of existing reports matching page/size conditions
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<ReportTO> list(
- @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
- @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
- @QueryParam(PARAM_ORDERBY) String orderBy);
-
- /**
- * Creates a new report.
- *
- * @param reportTO report to be created
- * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created report
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE, value = "Featuring <tt>Location</tt> header of created report")
- })
- @POST
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response create(@NotNull ReportTO reportTO);
-
- /**
- * Updates report with matching id.
- *
- * @param reportId id for report to be updated
- * @param reportTO report to be stored
- */
- @PUT
- @Path("{reportId}")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- void update(@NotNull @PathParam("reportId") Long reportId, ReportTO reportTO);
-
- /**
- * Deletes report with matching id.
- *
- * @param reportId Deletes report with matching id
- */
- @DELETE
- @Path("{reportId}")
- void delete(@NotNull @PathParam("reportId") Long reportId);
-
- /**
- * Deletes report execution with matching id.
- *
- * @param executionId id of execution report to be deleted
- */
- @DELETE
- @Path("executions/{executionId}")
- void deleteExecution(@NotNull @PathParam("executionId") Long executionId);
-
- /**
- * Executes the report with matching id.
- *
- * @param reportId id of report to be executed
- * @return report execution result
- */
- @POST
- @Path("{reportId}/execute")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- ReportExecTO execute(@NotNull @PathParam("reportId") Long reportId);
-
- /**
- * Exports the report execution with matching id in the requested format.
- *
- * @param executionId id of execution report to be selected
- * @param fmt file-format selection
- * @return a stream for content download
- */
- @GET
- @Path("executions/{executionId}/stream")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response exportExecutionResult(@NotNull @PathParam("executionId") Long executionId,
- @QueryParam("format") ReportExecExportFormat fmt);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/ResourceService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/ResourceService.java b/common/src/main/java/org/apache/syncope/common/services/ResourceService.java
deleted file mode 100644
index dae4622..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/ResourceService.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.reqres.BulkAction;
-import org.apache.syncope.common.reqres.BulkActionResult;
-import org.apache.syncope.common.to.ConnObjectTO;
-import org.apache.syncope.common.to.ResourceTO;
-import org.apache.syncope.common.types.ResourceDeassociationActionType;
-import org.apache.syncope.common.types.SubjectType;
-import org.apache.syncope.common.wrap.PropagationActionClass;
-import org.apache.syncope.common.wrap.SubjectId;
-
-/**
- * REST operations for external resources.
- */
-@Path("resources")
-public interface ResourceService extends JAXRSService {
-
- /**
- * Returns connector object from the external resource, for the given type and id.
- *
- * @param resourceName Name of resource to read connector object from
- * @param type user / role
- * @param id user id / role id
- * @return connector object from the external resource, for the given type and id
- */
- @GET
- @Path("{resourceName}/{type}/{id}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- ConnObjectTO getConnectorObject(@NotNull @PathParam("resourceName") String resourceName,
- @NotNull @PathParam("type") SubjectType type, @NotNull @PathParam("id") Long id);
-
- /**
- * Returns a list of classes that can be used to customize the propagation process.
- *
- * @return list of classes that can be used to customize the propagation process
- */
- @GET
- @Path("propagationActionsClasses")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<PropagationActionClass> getPropagationActionsClasses();
-
- /**
- * Returns the resource with matching name.
- *
- * @param resourceName Name of resource to be read
- * @return resource with matching name
- */
- @GET
- @Path("{resourceName}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- ResourceTO read(@NotNull @PathParam("resourceName") String resourceName);
-
- /**
- * Returns a list of all resources.
- *
- * @return list of all resources
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<ResourceTO> list();
-
- /**
- * Creates a new resource.
- *
- * @param resourceTO Resource to be created
- * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created resource
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring <tt>Location</tt> header of created resource")
- })
- @POST
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response create(@NotNull ResourceTO resourceTO);
-
- /**
- * Updates the resource matching the given name.
- *
- * @param resourceName name of resource to be updated
- * @param resourceTO resource to be stored
- */
- @PUT
- @Path("{resourceName}")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- void update(@NotNull @PathParam("resourceName") String resourceName, @NotNull ResourceTO resourceTO);
-
- /**
- * Deletes the resource matching the given name.
- *
- * @param resourceName name of resource to be deleted
- */
- @DELETE
- @Path("{resourceName}")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- void delete(@NotNull @PathParam("resourceName") String resourceName);
-
- /**
- * Checks wether the connection to resource could be established.
- *
- * @param resourceTO resource to be checked
- * @return true if connection to resource could be established
- */
- @POST
- @Path("check")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- boolean check(@NotNull ResourceTO resourceTO);
-
- /**
- * De-associate users or roles (depending on the provided subject type) from the given resource.
- *
- * @param resourceName name of resource
- * @param subjectType subject type (user or role)
- * @param type resource de-association action type
- * @param subjectIds users or roles against which the bulk action will be performed
- * @return <tt>Response</tt> object featuring {@link BulkActionResult} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
- })
- @POST
- @Path("{resourceName}/bulkDeassociation/{subjType}/{type}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- BulkActionResult bulkDeassociation(@NotNull @PathParam("resourceName") String resourceName,
- @NotNull @PathParam("subjType") SubjectType subjectType,
- @NotNull @PathParam("type") ResourceDeassociationActionType type, @NotNull List<SubjectId> subjectIds);
-
- /**
- * Executes the provided bulk action.
- *
- * @param bulkAction list of resource names against which the bulk action will be performed
- * @return Bulk action result
- */
- @POST
- @Path("bulk")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- BulkActionResult bulk(@NotNull BulkAction bulkAction);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/RoleService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/RoleService.java b/common/src/main/java/org/apache/syncope/common/services/RoleService.java
deleted file mode 100644
index 1f4e45b..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/RoleService.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.reqres.PagedResult;
-import org.apache.syncope.common.mod.RoleMod;
-import org.apache.syncope.common.reqres.BulkAction;
-import org.apache.syncope.common.reqres.BulkActionResult;
-import org.apache.syncope.common.to.RoleTO;
-import org.apache.syncope.common.types.ResourceAssociationActionType;
-import org.apache.syncope.common.types.ResourceDeassociationActionType;
-import org.apache.syncope.common.wrap.ResourceName;
-
-/**
- * REST operations for roles.
- */
-@Path("roles")
-public interface RoleService extends JAXRSService {
-
- /**
- * Returns children roles of given role.
- *
- * @param roleId id of role to get children from
- * @return children roles of given role
- */
- @GET
- @Path("{roleId}/children")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<RoleTO> children(@NotNull @PathParam("roleId") Long roleId);
-
- /**
- * Returns parent role of the given role (or null if no parent exists).
- *
- * @param roleId id of role to get parent role from
- * @return parent role of the given role (or null if no parent exists)
- */
- @GET
- @Path("{roleId}/parent")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- RoleTO parent(@NotNull @PathParam("roleId") Long roleId);
-
- /**
- * Reads the role matching the provided roleId.
- *
- * @param roleId id of role to be read
- * @return role with matching id
- */
- @GET
- @Path("{roleId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- RoleTO read(@NotNull @PathParam("roleId") Long roleId);
-
- /**
- * This method is similar to {@link #read(Long)}, but uses different authentication handling to ensure that a user
- * can read his own roles.
- *
- * @param roleId id of role to be read
- * @return role with matching id
- */
- @Descriptions({
- @Description(target = DocTarget.METHOD,
- value = "This method is similar to <tt>read()</tt>, but uses different authentication handling to "
- + "ensure that a user can read his own roles.")
- })
- @GET
- @Path("{roleId}/own")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- RoleTO readSelf(@NotNull @PathParam("roleId") Long roleId);
-
- /**
- * Returns a paged list of existing roles.
- *
- * @return paged list of all existing roles
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<RoleTO> list();
-
- /**
- * Returns a paged list of existing roles.
- *
- * @param orderBy list of ordering clauses, separated by comma
- * @return paged list of all existing roles
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<RoleTO> list(@QueryParam(PARAM_ORDERBY) String orderBy);
-
- /**
- * Returns a paged list of existing roles matching page/size conditions.
- *
- * @param page result page number
- * @param size number of entries per page
- * @return paged list of existing roles matching page/size conditions
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<RoleTO> list(
- @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
- @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
-
- /**
- * Returns a paged list of existing roles matching page/size conditions.
- *
- * @param page result page number
- * @param size number of entries per page
- * @param orderBy list of ordering clauses, separated by comma
- * @return paged list of existing roles matching page/size conditions
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<RoleTO> list(
- @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
- @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
- @QueryParam(PARAM_ORDERBY) String orderBy);
-
- /**
- * Returns a paged list of roles matching the provided FIQL search condition.
- *
- * @param fiql FIQL search expression
- * @return paged list of roles matching the provided FIQL search condition
- */
- @GET
- @Path("search")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<RoleTO> search(@NotNull @QueryParam(PARAM_FIQL) String fiql);
-
- /**
- * Returns a paged list of roles matching the provided FIQL search condition.
- *
- * @param fiql FIQL search expression
- * @param orderBy list of ordering clauses, separated by comma
- * @return paged list of roles matching the provided FIQL search condition
- */
- @GET
- @Path("search")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<RoleTO> search(
- @NotNull @QueryParam(PARAM_FIQL) String fiql, @QueryParam(PARAM_ORDERBY) String orderBy);
-
- /**
- * Returns a paged list of roles matching the provided FIQL search condition.
- *
- * @param fiql FIQL search expression
- * @param page result page number
- * @param size number of entries per page
- * @return paged list of roles matching the provided FIQL search condition
- */
- @GET
- @Path("search")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<RoleTO> search(@QueryParam(PARAM_FIQL) String fiql,
- @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
- @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
-
- /**
- * Returns a paged list of roles matching the provided FIQL search condition.
- *
- * @param fiql FIQL search expression
- * @param page result page number
- * @param size number of entries per page
- * @param orderBy list of ordering clauses, separated by comma
- * @return paged list of roles matching the provided FIQL search condition
- */
- @GET
- @Path("search")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<RoleTO> search(@QueryParam(PARAM_FIQL) String fiql,
- @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
- @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
- @QueryParam(PARAM_ORDERBY) String orderBy);
-
- /**
- * Creates a new role.
- *
- * @param roleTO role to be created
- * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created role as well as the role itself
- * enriched with propagation status information - {@link RoleTO} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring <tt>Location</tt> header of created role as well as the "
- + "role itself enriched with propagation status information - <tt>RoleTO</tt> as <tt>Entity</tt>")
- })
- @POST
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response create(@NotNull RoleTO roleTO);
-
- /**
- * Updates role matching the provided roleId.
- *
- * @param roleId id of role to be updated
- * @param roleMod modification to be applied to role matching the provided roleId
- * @return <tt>Response</tt> object featuring the updated role enriched with propagation status information
- * - {@link RoleTO} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring the updated role enriched with propagation status information - "
- + "<tt>RoleTO</tt> as <tt>Entity</tt>")
- })
- @POST
- @Path("{roleId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response update(@NotNull @PathParam("roleId") Long roleId, @NotNull RoleMod roleMod);
-
- /**
- * Deletes role matching provided roleId.
- *
- * @param roleId id of role to be deleted
- * @return <tt>Response</tt> object featuring the deleted role enriched with propagation status information
- * - {@link RoleTO} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring the deleted role enriched with propagation status information - "
- + "<tt>RoleTO</tt> as <tt>Entity</tt>")
- })
- @DELETE
- @Path("{roleId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response delete(@NotNull @PathParam("roleId") Long roleId);
-
- /**
- * Executes resource-related operations on given role.
- *
- * @param roleId role id.
- * @param type resource association action type
- * @param resourceNames external resources to be used for propagation-related operations
- * @return <tt>Response</tt> object featuring
- * {@link org.apache.syncope.common.reqres.BulkActionResult} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
- })
- @POST
- @Path("{roleId}/deassociate/{type}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response bulkDeassociation(@NotNull @PathParam("roleId") Long roleId,
- @NotNull @PathParam("type") ResourceDeassociationActionType type,
- @NotNull List<ResourceName> resourceNames);
-
- /**
- * Executes resource-related operations on given role.
- *
- * @param roleId role id.
- * @param type resource association action type
- * @param resourceNames external resources to be used for propagation-related operations
- * @return <tt>Response</tt> object featuring {@link org.apache.syncope.common.reqres.BulkActionResult}
- * as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
- })
- @POST
- @Path("{roleId}/associate/{type}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response bulkAssociation(@NotNull @PathParam("roleId") Long roleId,
- @NotNull @PathParam("type") ResourceAssociationActionType type,
- @NotNull List<ResourceName> resourceNames);
-
- /**
- * Executes the provided bulk action.
- *
- * @param bulkAction list of role ids against which the bulk action will be performed.
- * @return Bulk action result
- */
- @POST
- @Path("bulk")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- BulkActionResult bulk(@NotNull BulkAction bulkAction);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/RouteService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/RouteService.java b/common/src/main/java/org/apache/syncope/common/services/RouteService.java
deleted file mode 100644
index 2082fc5..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/RouteService.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.OPTIONS;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.syncope.common.to.RouteTO;
-import org.apache.syncope.common.types.SubjectType;
-
-@Path("routes/{subject}")
-public interface RouteService extends JAXRSService {
-
- /**
- * Checks whether Camel is choosed as default provisioning engine.
- *
- * @param subject user or role
- * @return <tt>Response</tt> contains special syncope HTTP header indicating if Camel is enabled for
- * users / roles provisioning
- * @see org.apache.syncope.common.types.RESTHeaders#CAMEL_USER_PROVISIONING_MANAGER
- * @see org.apache.syncope.common.types.RESTHeaders#CAMEL_ROLE_PROVISIONING_MANAGER
- *
- */
- @OPTIONS
- Response getOptions(@NotNull @PathParam("subject") SubjectType subject);
-
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<RouteTO> getRoutes(@NotNull @PathParam("subject") SubjectType subject);
-
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Path("{id}")
- public RouteTO getRoute(@NotNull @PathParam("subject") SubjectType subject, @PathParam("id") Long Id);
-
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Path("{id}")
- public RouteTO getRoute(@PathParam("id") Long Id);
-
- @PUT
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Path("{id}")
- void importRoute(@NotNull @PathParam("subject") SubjectType subject,@PathParam("id") Long id, RouteTO route);
-
- @PUT
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Path("{id}")
- void importRoute(@PathParam("id") Long id, RouteTO route);
-
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/SchemaService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/SchemaService.java b/common/src/main/java/org/apache/syncope/common/services/SchemaService.java
deleted file mode 100644
index bbb4c06..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/SchemaService.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.to.AbstractSchemaTO;
-import org.apache.syncope.common.types.AttributableType;
-import org.apache.syncope.common.types.SchemaType;
-
-/**
- * REST operations for attribute schemas.
- */
-@Path("schemas/{kind}/{type}")
-public interface SchemaService extends JAXRSService {
-
- /**
- * Returns schema matching the given kind, type and name.
- *
- * @param <T> actual SchemaTO
- * @param attrType kind for schemas to be read
- * @param schemaType type for schemas to be read
- * @param schemaName name of schema to be read
- * @return schema matching the given kind, type and name
- */
- @GET
- @Path("{name}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractSchemaTO> T read(@NotNull @PathParam("kind") AttributableType attrType,
- @NotNull @PathParam("type") SchemaType schemaType, @NotNull @PathParam("name") String schemaName);
-
- /**
- * Returns a list of schemas with matching kind and type.
- *
- * @param <T> actual SchemaTO
- * @param attrType kind for schemas to be listed
- * @param schemaType type for schemas to be listed
- * @return list of schemas with matching kind and type
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractSchemaTO> List<T> list(
- @NotNull @PathParam("kind") AttributableType attrType, @NotNull @PathParam("type") SchemaType schemaType);
-
- /**
- * Creates a new schema.
- *
- * @param <T> actual SchemaTO
- * @param attrType kind for schema to be created
- * @param schemaType type for schema to be created
- * @param schemaTO schema to be created
- * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created schema
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE, value = "Featuring <tt>Location</tt> header of created schema")
- })
- @POST
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractSchemaTO> Response create(@NotNull @PathParam("kind") AttributableType attrType,
- @NotNull @PathParam("type") SchemaType schemaType, @NotNull T schemaTO);
-
- /**
- * Updates the schema matching the given kind, type and name.
- *
- * @param <T> actual SchemaTO
- * @param attrType kind for schemas to be updated
- * @param schemaType type for schemas to be updated
- * @param schemaName name of schema to be updated
- * @param schemaTO updated schema to be stored
- */
- @PUT
- @Path("{name}")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractSchemaTO> void update(@NotNull @PathParam("kind") AttributableType attrType,
- @NotNull @PathParam("type") SchemaType schemaType,
- @NotNull @PathParam("name") String schemaName, @NotNull T schemaTO);
-
- /**
- * Deletes the schema matching the given kind, type and name.
- *
- * @param attrType kind for schema to be deleted
- * @param schemaType type for schema to be deleted
- * @param schemaName name of schema to be deleted
- */
- @DELETE
- @Path("{name}")
- void delete(@NotNull @PathParam("kind") AttributableType attrType,
- @NotNull @PathParam("type") SchemaType schemaType,
- @NotNull @PathParam("name") String schemaName);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/SecurityQuestionService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/SecurityQuestionService.java b/common/src/main/java/org/apache/syncope/common/services/SecurityQuestionService.java
deleted file mode 100644
index 09958f2..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/SecurityQuestionService.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.to.SecurityQuestionTO;
-
-/**
- * REST operations for configuration.
- */
-@Path("securityQuestions")
-public interface SecurityQuestionService extends JAXRSService {
-
- /**
- * Returns a list of all security questions.
- *
- * @return list of all security questions
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<SecurityQuestionTO> list();
-
- /**
- * Returns security question with matching id.
- *
- * @param securityQuestionId security question id to be read
- * @return security question with matching id
- */
- @GET
- @Path("{securityQuestionId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- SecurityQuestionTO read(@NotNull @PathParam("securityQuestionId") Long securityQuestionId);
-
- /**
- * Creates a new security question.
- *
- * @param securityQuestionTO security question to be created
- * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created security question
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring <tt>Location</tt> header of created security question")
- })
- @POST
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response create(@NotNull SecurityQuestionTO securityQuestionTO);
-
- /**
- * Updates the security question matching the provided id.
- *
- * @param securityQuestionId security question id to be updated
- * @param securityQuestionTO security question to be stored
- */
- @PUT
- @Path("{securityQuestionId}")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- void update(@NotNull @PathParam("securityQuestionId") Long securityQuestionId,
- @NotNull SecurityQuestionTO securityQuestionTO);
-
- /**
- * Deletes the security question matching the provided id.
- *
- * @param securityQuestionId security question id to be deleted
- */
- @DELETE
- @Path("{securityQuestionId}")
- void delete(@NotNull @PathParam("securityQuestionId") Long securityQuestionId);
-
- /**
- * Ask for security question configured for the user matching the given username, if any.
- *
- * @param username username for which the security question is requested
- * @return security question, if configured for the user matching the given username
- */
- @GET
- @Path("byUser/{username}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- SecurityQuestionTO readByUser(@NotNull @PathParam("username") String username);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/TaskService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/TaskService.java b/common/src/main/java/org/apache/syncope/common/services/TaskService.java
deleted file mode 100644
index 8efba34..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/TaskService.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.MatrixParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.reqres.PagedResult;
-import org.apache.syncope.common.reqres.BulkAction;
-import org.apache.syncope.common.reqres.BulkActionResult;
-import org.apache.syncope.common.to.ReportExecTO;
-import org.apache.syncope.common.to.TaskExecTO;
-import org.apache.syncope.common.to.AbstractTaskTO;
-import org.apache.syncope.common.to.SchedTaskTO;
-import org.apache.syncope.common.types.TaskType;
-import org.apache.syncope.common.wrap.JobClass;
-import org.apache.syncope.common.wrap.PushActionClass;
-import org.apache.syncope.common.wrap.SyncActionClass;
-
-/**
- * REST operations for tasks.
- */
-@Path("tasks")
-public interface TaskService extends JAXRSService {
-
- /**
- * Returns a list of classes to be used for jobs.
- *
- * @return list of classes to be used for jobs
- */
- @GET
- @Path("jobClasses")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<JobClass> getJobClasses();
-
- /**
- * Returns a list of classes to be used as synchronization actions.
- *
- * @return list of classes to be used as synchronization actions
- */
- @GET
- @Path("syncActionsClasses")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<SyncActionClass> getSyncActionsClasses();
-
- /**
- * Returns a list of classes to be used as push actions.
- *
- * @return list of classes to be used as push actions
- */
- @GET
- @Path("pushActionsClasses")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<PushActionClass> getPushActionsClasses();
-
- /**
- * Returns the task matching the given id.
- *
- * @param taskId id of task to be read
- * @param <T> type of taskTO
- * @return task with matching id
- */
- @GET
- @Path("{taskId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractTaskTO> T read(@NotNull @PathParam("taskId") Long taskId);
-
- /**
- * Returns the task execution with the given id.
- *
- * @param executionId id of task execution to be read
- * @return task execution with matching Id
- */
- @GET
- @Path("executions/{executionId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- TaskExecTO readExecution(@NotNull @PathParam("executionId") Long executionId);
-
- /**
- * Returns a list of tasks with matching type.
- *
- * @param taskType type of tasks to be listed
- * @param <T> type of taskTO
- * @return list of tasks with matching type
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractTaskTO> PagedResult<T> list(@NotNull @MatrixParam("type") TaskType taskType);
-
- /**
- * Returns a list of tasks with matching type.
- *
- * @param taskType type of tasks to be listed
- * @param orderBy list of ordering clauses, separated by comma
- * @param <T> type of taskTO
- * @return list of tasks with matching type
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractTaskTO> PagedResult<T> list(@NotNull @MatrixParam("type") TaskType taskType,
- @QueryParam(PARAM_ORDERBY) String orderBy);
-
- /**
- * Returns a paged list of existing tasks matching type and page/size conditions.
- *
- * @param taskType type of tasks to be listed
- * @param page page number of tasks in relation to page size
- * @param size number of tasks listed per page
- * @param orderBy list of ordering clauses, separated by comma
- * @param <T> type of taskTO
- * @return paged list of existing tasks matching type and page/size conditions
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractTaskTO> PagedResult<T> list(@NotNull @MatrixParam("type") TaskType taskType,
- @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
- @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
- @QueryParam(PARAM_ORDERBY) String orderBy);
-
- /**
- * Returns a paged list of existing tasks matching type and page/size conditions.
- *
- * @param taskType type of tasks to be listed
- * @param page page number of tasks in relation to page size
- * @param size number of tasks listed per page
- * @param <T> type of taskTO
- * @return paged list of existing tasks matching type and page/size conditions
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractTaskTO> PagedResult<T> list(@MatrixParam("type") TaskType taskType,
- @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
- @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
-
- /**
- * Creates a new task.
- *
- * @param taskTO task to be created
- * @param <T> type of taskTO
- * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created task
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE, value = "Featuring <tt>Location</tt> header of created task")
- })
- @POST
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends SchedTaskTO> Response create(@NotNull T taskTO);
-
- /**
- * Updates the task matching the provided id.
- *
- * @param taskId id of task to be updated
- * @param taskTO updated task to be stored
- */
- @PUT
- @Path("{taskId}")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- void update(@NotNull @PathParam("taskId") Long taskId, @NotNull AbstractTaskTO taskTO);
-
- /**
- * Deletes the task matching the provided id.
- *
- * @param taskId id of task to be deleted
- */
- @DELETE
- @Path("{taskId}")
- void delete(@NotNull @PathParam("taskId") Long taskId);
-
- /**
- * Deletes the task execution matching the provided id.
- *
- * @param executionId id of task execution to be deleted
- */
- @DELETE
- @Path("executions/{executionId}")
- void deleteExecution(@NotNull @PathParam("executionId") Long executionId);
-
- /**
- * Executes the task matching the given id.
- *
- * @param taskId id of task to be executed
- * @param dryRun if true, task will only be simulated
- * @return execution report for the task matching the given id
- */
- @POST
- @Path("{taskId}/execute")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- TaskExecTO execute(@NotNull @PathParam("taskId") Long taskId,
- @QueryParam("dryRun") @DefaultValue("false") boolean dryRun);
-
- /**
- * Reports task execution result.
- *
- * @param executionId id of task execution being reported
- * @param reportExec execution being reported
- */
- @POST
- @Path("executions/{executionId}/report")
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- void report(@NotNull @PathParam("executionId") Long executionId, @NotNull ReportExecTO reportExec);
-
- /**
- * Executes the provided bulk action.
- *
- * @param bulkAction list of task ids against which the bulk action will be performed.
- * @return Bulk action result
- */
- @POST
- @Path("bulk")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- BulkActionResult bulk(@NotNull BulkAction bulkAction);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/UserSelfService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/UserSelfService.java b/common/src/main/java/org/apache/syncope/common/services/UserSelfService.java
deleted file mode 100644
index 4905a33..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/UserSelfService.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.OPTIONS;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.mod.UserMod;
-import org.apache.syncope.common.to.UserTO;
-
-/**
- * REST operations for user self-management.
- */
-@Path("users/self")
-public interface UserSelfService extends JAXRSService {
-
- /**
- * Checks whether self-registration is allowed.
- *
- * @return <tt>Response</tt> contains special Syncope HTTP header indicating if user self registration and / or
- * password reset is allowed
- * @see org.apache.syncope.common.types.RESTHeaders#SELFREG_ALLOWED
- * @see org.apache.syncope.common.types.RESTHeaders#PWDRESET_ALLOWED
- * @see org.apache.syncope.common.types.RESTHeaders#PWDRESET_NEEDS_SECURITYQUESTIONS
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Contains special Syncope HTTP header indicating if user self registration "
- + "and / or password reset is allowed")
- })
- @OPTIONS
- Response getOptions();
-
- /**
- * Returns the user making the service call.
- *
- * @return calling user data
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- UserTO read();
-
- /**
- * Self-registration for new user.
- *
- * @param userTO user to be created
- * @param storePassword whether password shall be stored internally
- * @return <tt>Response</tt> object featuring <tt>Location</tt> header of self-registered user as well as the user
- * itself - {@link UserTO} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring <tt>Location</tt> header of self-registered user as well "
- + "as the user itself - {@link UserTO} as <tt>Entity</tt>")
- })
- @POST
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response create(@NotNull UserTO userTO,
- @DefaultValue("true") @QueryParam("storePassword") boolean storePassword);
-
- /**
- * Self-updates user.
- *
- * @param userId id of user to be updated
- * @param userMod modification to be applied to user matching the provided userId
- * @return <tt>Response</tt> object featuring the updated user - {@link UserTO} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring the updated user - <tt>UserTO</tt> as <tt>Entity</tt>")
- })
- @POST
- @Path("{userId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response update(@NotNull @PathParam("userId") Long userId, @NotNull UserMod userMod);
-
- /**
- * Self-deletes user.
- *
- * @return <tt>Response</tt> object featuring the deleted user - {@link UserTO} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring the deleted user - <tt>UserTO</tt> as <tt>Entity</tt>")
- })
- @DELETE
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response delete();
-
- /**
- * Provides answer for the security question configured for user matching the given username, if any.
- * If provided anwser matches the one stored for that user, a password reset token is internally generated,
- * otherwise an error is returned.
- *
- * @param username username for which the security answer is provided
- * @param securityAnswer actual answer text
- */
- @POST
- @Path("requestPasswordReset")
- void requestPasswordReset(@NotNull @QueryParam("username") String username, String securityAnswer);
-
- /**
- * Reset the password value for the user matching the provided token, if available and still valid.
- * If the token actually matches one of users, and if it is still valid at the time of submission, the matching
- * user's password value is set as provided. The new password value will need anyway to comply with all relevant
- * password policies.
- *
- * @param token password reset token
- * @param password new password to be set
- */
- @POST
- @Path("confirmPasswordReset")
- void confirmPasswordReset(@NotNull @QueryParam("token") String token, String password);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/UserService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/UserService.java b/common/src/main/java/org/apache/syncope/common/services/UserService.java
deleted file mode 100644
index c720218..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/UserService.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.OPTIONS;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-
-import org.apache.syncope.common.mod.ResourceAssociationMod;
-import org.apache.syncope.common.mod.StatusMod;
-import org.apache.syncope.common.mod.UserMod;
-import org.apache.syncope.common.wrap.ResourceName;
-import org.apache.syncope.common.reqres.PagedResult;
-import org.apache.syncope.common.reqres.BulkAction;
-import org.apache.syncope.common.reqres.BulkActionResult;
-import org.apache.syncope.common.to.UserTO;
-import org.apache.syncope.common.types.ResourceAssociationActionType;
-import org.apache.syncope.common.types.ResourceDeassociationActionType;
-
-/**
- * REST operations for users.
- */
-@Path("users")
-public interface UserService extends JAXRSService {
-
- /**
- * Gives the username for the provided user id.
- *
- * @param userId user id
- * @return <tt>Response</tt> object featuring HTTP header with username matching the given userId
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring HTTP header with username matching the given userId")
- })
- @OPTIONS
- @Path("{userId}/username")
- Response getUsername(@NotNull @PathParam("userId") Long userId);
-
- /**
- * Gives the user id for the provided username.
- *
- * @param username username
- * @return <tt>Response</tt> object featuring HTTP header with userId matching the given username
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring HTTP header with userId matching the given username")
- })
- @OPTIONS
- @Path("{username}/userId")
- Response getUserId(@NotNull @PathParam("username") String username);
-
- /**
- * Reads the user matching the provided userId.
- *
- * @param userId id of user to be read
- * @return User matching the provided userId
- */
- @GET
- @Path("{userId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- UserTO read(@NotNull @PathParam("userId") Long userId);
-
- /**
- * Returns a paged list of existing users.
- *
- * @return paged list of all existing users
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<UserTO> list();
-
- /**
- * Returns a paged list of existing users.
- *
- * @param orderBy list of ordering clauses, separated by comma
- * @return paged list of all existing users
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<UserTO> list(@QueryParam(PARAM_ORDERBY) String orderBy);
-
- /**
- * Returns a paged list of existing users matching page/size conditions.
- *
- * @param page result page number
- * @param size number of entries per page
- * @return paged list of existing users matching page/size conditions
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<UserTO> list(
- @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
- @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
-
- /**
- * Returns a paged list of existing users matching page/size conditions.
- *
- * @param page result page number
- * @param size number of entries per page
- * @param orderBy list of ordering clauses, separated by comma
- * @return paged list of existing users matching page/size conditions
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<UserTO> list(
- @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
- @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
- @QueryParam(PARAM_ORDERBY) String orderBy);
-
- /**
- * Returns a paged list of users matching the provided FIQL search condition.
- *
- * @param fiql FIQL search expression
- * @return paged list of users matching the provided FIQL search condition
- */
- @GET
- @Path("search")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<UserTO> search(@NotNull @QueryParam(PARAM_FIQL) String fiql);
-
- /**
- * Returns a paged list of users matching the provided FIQL search condition.
- *
- * @param fiql FIQL search expression
- * @param orderBy list of ordering clauses, separated by comma
- * @return paged list of users matching the provided FIQL search condition
- */
- @GET
- @Path("search")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<UserTO> search(@NotNull @QueryParam(PARAM_FIQL) String fiql, @QueryParam(PARAM_ORDERBY) String orderBy);
-
- /**
- * Returns a paged list of users matching the provided FIQL search condition.
- *
- * @param fiql FIQL search expression
- * @param page result page number
- * @param size number of entries per page
- * @return paged list of users matching the provided FIQL search condition
- */
- @GET
- @Path("search")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<UserTO> search(@QueryParam(PARAM_FIQL) String fiql,
- @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
- @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
-
- /**
- * Returns a paged list of users matching the provided FIQL search condition.
- *
- * @param fiql FIQL search expression
- * @param page result page number
- * @param size number of entries per page
- * @param orderBy list of ordering clauses, separated by comma
- * @return paged list of users matching the provided FIQL search condition
- */
- @GET
- @Path("search")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<UserTO> search(@QueryParam(PARAM_FIQL) String fiql,
- @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
- @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
- @QueryParam(PARAM_ORDERBY) String orderBy);
-
- /**
- * Creates a new user.
- *
- * @param userTO user to be created
- * @param storePassword whether password shall be stored internally
- * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created user as well as the user itself
- * enriched with propagation status information - {@link UserTO} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring <tt>Location</tt> header of created user as well as the "
- + "user itself enriched with propagation status information - <tt>UserTO</tt> as <tt>Entity</tt>")
- })
- @POST
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response create(@NotNull UserTO userTO,
- @DefaultValue("true") @QueryParam("storePassword") boolean storePassword);
-
- /**
- * Updates user matching the provided userId.
- *
- * @param userId id of user to be updated
- * @param userMod modification to be applied to user matching the provided userId
- * @return <tt>Response</tt> object featuring the updated user enriched with propagation status information
- * - {@link UserTO} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring the updated user enriched with propagation status information - "
- + "<tt>UserTO</tt> as <tt>Entity</tt>")
- })
- @POST
- @Path("{userId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response update(@NotNull @PathParam("userId") Long userId, @NotNull UserMod userMod);
-
- /**
- * Performs a status update on user matching provided userId.
- *
- * @param userId id of user to be subjected to status update
- * @param statusMod status update details
- * @return <tt>Response</tt> object featuring the updated user enriched with propagation status information
- * - {@link UserTO} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring the updated user enriched with propagation status information - "
- + "<tt>UserTO</tt> as <tt>Entity</tt>")
- })
- @POST
- @Path("{userId}/status")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response status(@NotNull @PathParam("userId") Long userId, @NotNull StatusMod statusMod);
-
- /**
- * Deletes user matching provided userId.
- *
- * @param userId id of user to be deleted
- * @return <tt>Response</tt> object featuring the deleted user enriched with propagation status information
- * - {@link UserTO} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring the deleted user enriched with propagation status information - "
- + "<tt>UserTO</tt> as <tt>Entity</tt>")
- })
- @DELETE
- @Path("{userId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response delete(@NotNull @PathParam("userId") Long userId);
-
- /**
- * Executes resource-related operations on given user.
- *
- * @param userId user id
- * @param type resource de-association action type
- * @param resourceNames external resources to be used for propagation-related operations
- * @return <tt>Response</tt> object featuring {@link BulkActionResult} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
- })
- @POST
- @Path("{userId}/bulkDeassociation/{type}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response bulkDeassociation(@NotNull @PathParam("userId") Long userId,
- @NotNull @PathParam("type") ResourceDeassociationActionType type,
- @NotNull List<ResourceName> resourceNames);
-
- /**
- * Executes resource-related operations on given user.
- *
- * @param userId user id.
- * @param type resource association action type
- * @param associationMod external resources to be used for propagation-related operations
- * @return <tt>Response</tt> object featuring {@link BulkActionResult} as <tt>Entity</tt>
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE, value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
- })
- @POST
- @Path("{userId}/bulkAssociation/{type}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response bulkAssociation(@NotNull @PathParam("userId") Long userId,
- @NotNull @PathParam("type") ResourceAssociationActionType type,
- @NotNull ResourceAssociationMod associationMod);
-
- /**
- * Executes the provided bulk action.
- *
- * @param bulkAction list of user ids against which the bulk action will be performed.
- * @return Bulk action result
- */
- @POST
- @Path("bulk")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- BulkActionResult bulk(@NotNull BulkAction bulkAction);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/UserWorkflowService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/UserWorkflowService.java b/common/src/main/java/org/apache/syncope/common/services/UserWorkflowService.java
deleted file mode 100644
index c3f7721..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/UserWorkflowService.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.syncope.common.to.UserTO;
-import org.apache.syncope.common.to.WorkflowFormTO;
-
-/**
- * REST operations related to user workflow.
- */
-@Path("userworkflow")
-public interface UserWorkflowService extends JAXRSService {
-
- /**
- * Returns a list of all available workflow forms.
- *
- * @return list of all available workflow forms
- */
- @GET
- @Path("forms")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<WorkflowFormTO> getForms();
-
- /**
- * Returns a list of all available workflow forms with matching name, for the given user id.
- *
- * @param userId user id
- * @param name form name
- * @return list of all available workflow forms with matching name, fir the given user id.
- */
- @GET
- @Path("forms/{userId}/{name}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<WorkflowFormTO> getFormsByName(
- @NotNull @PathParam("userId") final Long userId, @NotNull @PathParam("name") final String name);
-
- /**
- * Returns a list of available forms for the given user id.
- *
- * @param userId user id
- * @return list of available forms for the given user id
- */
- @GET
- @Path("forms/{userId}")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- WorkflowFormTO getFormForUser(@NotNull @PathParam("userId") Long userId);
-
- /**
- * Claims the form for the given task id.
- *
- * @param taskId workflow task id
- * @return the workflow form for the given task id
- */
- @POST
- @Path("forms/{taskId}/claim")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- WorkflowFormTO claimForm(@NotNull @PathParam("taskId") String taskId);
-
- /**
- * Submits a workflow form.
- *
- * @param form workflow form.
- * @return updated user
- */
- @POST
- @Path("forms")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- UserTO submitForm(@NotNull WorkflowFormTO form);
-
- /**
- * Executes workflow task for matching id.
- *
- * @param taskId workflow task id
- * @param userTO argument to be passed to workflow task
- * @return updated user
- */
- @POST
- @Path("tasks/{taskId}/execute")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- UserTO executeTask(@NotNull @PathParam("taskId") String taskId, @NotNull UserTO userTO);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/services/WorkflowService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/services/WorkflowService.java b/common/src/main/java/org/apache/syncope/common/services/WorkflowService.java
deleted file mode 100644
index f6c55b4..0000000
--- a/common/src/main/java/org/apache/syncope/common/services/WorkflowService.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.services;
-
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.OPTIONS;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.types.RESTHeaders;
-import org.apache.syncope.common.types.SubjectType;
-
-/**
- * REST operations for workflow definition management.
- */
-@Path("workflows/{kind}")
-public interface WorkflowService extends JAXRSService {
-
- /**
- * Checks whether Activiti is enabled (for users or roles).
- *
- * @param kind user or role
- * @return <tt>Response</tt> contains special syncope HTTP header indicating if Activiti is enabled for
- * users / roles
- * @see org.apache.syncope.common.types.RESTHeaders#ACTIVITI_USER_ENABLED
- * @see org.apache.syncope.common.types.RESTHeaders#ACTIVITI_ROLE_ENABLED
- */
- @Descriptions({
- @Description(target = DocTarget.RESPONSE,
- value = "Contains special syncope HTTP header indicating if Activiti is enabled for users / roles")
- })
- @OPTIONS
- Response getOptions(@NotNull @PathParam("kind") SubjectType kind);
-
- /**
- * Exports workflow definition for matching kind.
- *
- * @param kind user or role
- * @return workflow definition for matching kind
- */
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- Response exportDefinition(@NotNull @PathParam("kind") SubjectType kind);
-
- /**
- * Exports workflow diagram representation.
- *
- * @param kind user or role
- * @return workflow diagram representation
- */
- @GET
- @Path("diagram.png")
- @Produces({ RESTHeaders.MEDIATYPE_IMAGE_PNG })
- Response exportDiagram(@NotNull @PathParam("kind") SubjectType kind);
-
- /**
- * Imports workflow definition for matching kind.
- *
- * @param kind user or role
- * @param definition workflow definition for matching kind
- */
- @PUT
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- void importDefinition(@NotNull @PathParam("kind") SubjectType kind, @NotNull String definition);
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/AbstractAttributableTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/AbstractAttributableTO.java b/common/src/main/java/org/apache/syncope/common/to/AbstractAttributableTO.java
deleted file mode 100644
index 232598e..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/AbstractAttributableTO.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlType
-public abstract class AbstractAttributableTO extends ConnObjectTO {
-
- private static final long serialVersionUID = 4083884098736820255L;
-
- private long id;
-
- private final List<AttributeTO> derAttrs = new ArrayList<AttributeTO>();
-
- private final List<AttributeTO> virAttrs = new ArrayList<AttributeTO>();
-
- public long getId() {
- return id;
- }
-
- public void setId(final long id) {
- this.id = id;
- }
-
- @JsonIgnore
- public Map<String, AttributeTO> getDerAttrMap() {
- Map<String, AttributeTO> result = new HashMap<String, AttributeTO>(derAttrs.size());
- for (AttributeTO attributeTO : derAttrs) {
- result.put(attributeTO.getSchema(), attributeTO);
- }
- result = Collections.unmodifiableMap(result);
-
- return result;
- }
-
- @JsonIgnore
- public Map<String, AttributeTO> getVirAttrMap() {
- Map<String, AttributeTO> result = new HashMap<String, AttributeTO>(virAttrs.size());
- for (AttributeTO attributeTO : virAttrs) {
- result.put(attributeTO.getSchema(), attributeTO);
- }
- result = Collections.unmodifiableMap(result);
-
- return result;
- }
-
- @XmlElementWrapper(name = "derivedAttributes")
- @XmlElement(name = "attribute")
- @JsonProperty("derivedAttributes")
- public List<AttributeTO> getDerAttrs() {
- return derAttrs;
- }
-
- @XmlElementWrapper(name = "virtualAttributes")
- @XmlElement(name = "attribute")
- @JsonProperty("virtualAttributes")
- public List<AttributeTO> getVirAttrs() {
- return virAttrs;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/src/main/java/org/apache/syncope/common/to/AbstractExecTO.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/syncope/common/to/AbstractExecTO.java b/common/src/main/java/org/apache/syncope/common/to/AbstractExecTO.java
deleted file mode 100644
index 4745c9b..0000000
--- a/common/src/main/java/org/apache/syncope/common/to/AbstractExecTO.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.common.to;
-
-import java.util.Date;
-
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.syncope.common.AbstractBaseBean;
-
-@XmlType
-public class AbstractExecTO extends AbstractBaseBean {
-
- private static final long serialVersionUID = -4621191979198357081L;
-
- protected long id;
-
- protected String status;
-
- protected String message;
-
- protected Date startDate;
-
- protected Date endDate;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public Date getStartDate() {
- return startDate == null
- ? null
- : new Date(startDate.getTime());
- }
-
- public void setStartDate(Date startDate) {
- if (startDate != null) {
- this.startDate = new Date(startDate.getTime());
- }
- }
-
- public Date getEndDate() {
- return endDate == null
- ? null
- : new Date(endDate.getTime());
- }
-
- public void setEndDate(Date endDate) {
- if (endDate != null) {
- this.endDate = new Date(endDate.getTime());
- }
- }
-}
[29/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.java
new file mode 100644
index 0000000..d8014f6
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.java
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.util.Calendar;
+import java.util.Date;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.extensions.yui.calendar.DateTimeField;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.FormComponent;
+import org.apache.wicket.markup.html.form.validation.AbstractFormValidator;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.validation.IValidationError;
+import org.apache.wicket.validation.ValidationError;
+
+public class DateTimeFieldPanel extends DateFieldPanel {
+
+ private static final long serialVersionUID = -428975732068281726L;
+
+ private Form form = null;
+
+ public DateTimeFieldPanel(final String id, final String name, final IModel<Date> model, final String datePattern) {
+ super(id, name, model, datePattern);
+
+ field = new DateTimeField("field", model);
+
+ final Calendar cal = Calendar.getInstance();
+
+ field.get("hours").add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ final Integer hours = ((DateTimeField) field).getHours();
+ if (hours != null) {
+ cal.set(hours > 12 ? Calendar.HOUR_OF_DAY : Calendar.HOUR, hours);
+ field.setModelObject(cal.getTime());
+ }
+ }
+ });
+
+ field.get("minutes").add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ final Integer minutes = ((DateTimeField) field).getMinutes();
+ if (minutes != null) {
+ cal.set(Calendar.MINUTE, minutes);
+ field.setModelObject(cal.getTime());
+ }
+ }
+ });
+
+ field.get("date").add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ final Date date = ((DateTimeField) field).getDate();
+ if (date == null) {
+ field.setModelObject(null);
+ } else {
+ cal.setTime(date);
+ cal.set(Calendar.AM_PM, "PM".equals("" + ((DateTimeField) field).getAmOrPm()) ? Calendar.PM
+ : Calendar.AM);
+ field.setModelObject(cal.getTime());
+ }
+ }
+ });
+
+ field.get("amOrPmChoice").add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ cal.set(Calendar.AM_PM, "PM".equals("" + ((DateTimeField) field).getAmOrPm()) ? Calendar.PM
+ : Calendar.AM);
+ field.setModelObject(cal.getTime());
+ }
+ });
+
+ add(field.setLabel(new Model<String>(name)).setOutputMarkupId(true));
+ }
+
+ /**
+ * Custom form validator for registering and handling DateTimeField components that are in it.
+ */
+ private class DateTimeFormValidator extends AbstractFormValidator {
+
+ private static final long serialVersionUID = 6842264694946633582L;
+
+ private FormComponent[] dateTimeComponents;
+
+ public DateTimeFormValidator(final DateTimeField dateTimeComponent) {
+ if (dateTimeComponent == null) {
+ throw new IllegalArgumentException("argument dateTimeComponent cannot be null");
+ }
+
+ dateTimeComponents = new FormComponent[] { dateTimeComponent };
+ }
+
+ @Override
+ public FormComponent[] getDependentFormComponents() {
+ return dateTimeComponents;
+ }
+
+ /**
+ * Validation rule : all 3 fields (date,hours,minutes) must be not-null.
+ *
+ * @param form
+ */
+ @Override
+ public void validate(final Form form) {
+ final DateTimeField dateTimeField = (DateTimeField) dateTimeComponents[0];
+
+ if (!(dateTimeField.getDate() != null && dateTimeField.getHours() != null
+ && dateTimeField.getMinutes() != null)) {
+
+ ValidationError ve = new ValidationError();
+ ve.setVariables(DateTimeFormValidator.this.variablesMap());
+ ve.addKey(resourceKey());
+ dateTimeComponents[0].error((IValidationError) ve);
+ }
+ }
+ }
+
+ @SuppressWarnings("rawtypes")
+ public FieldPanel<Date> setFormValidator(final Form form) {
+ if (field == null) {
+ LOG.error("Error setting form validator");
+ } else {
+ form.add(new DateTimeFormValidator(((DateTimeField) field)));
+ this.form = form;
+ }
+
+ return this;
+ }
+
+ @Override
+ public FieldPanel<Date> setStyleSheet(final String classes) {
+ field.get("date").add(AttributeModifier.replace("class", (classes == null ? "" : classes) + " date_size"));
+
+ field.get("hours").add(AttributeModifier.replace("class", classes == null ? "" : classes));
+
+ field.get("minutes").add(AttributeModifier.replace("class", classes == null ? "" : classes));
+
+ field.get("amOrPmChoice").add(AttributeModifier.replace("class", classes == null ? "" : classes));
+
+ return this;
+ }
+
+ @Override
+ public FieldPanel<Date> clone() {
+ final FieldPanel<Date> panel = new DateTimeFieldPanel(getId(), name, new Model<Date>(null), datePattern);
+
+ panel.setRequired(isRequired());
+ panel.setReadOnly(isReadOnly());
+ panel.setTitle(title);
+
+ if (isRequiredLabelAdded) {
+ panel.addRequiredLabel();
+ }
+
+ if (form != null && isRequired()) {
+ ((DateTimeFieldPanel) panel).setFormValidator(form);
+ }
+
+ return panel;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
new file mode 100644
index 0000000..8dbc434
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
@@ -0,0 +1,199 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.io.Serializable;
+import java.util.List;
+import org.apache.commons.lang3.SerializationUtils;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.FormComponent;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+public abstract class FieldPanel<T> extends AbstractFieldPanel<T> implements Cloneable {
+
+ private static final long serialVersionUID = -198988924922541273L;
+
+ protected FormComponent<T> field = null;
+
+ protected String title = null;
+
+ protected boolean isRequiredLabelAdded = false;
+
+ public FieldPanel(final String id, final IModel<T> model) {
+ super(id, model);
+
+ final Fragment fragment = new Fragment("required", "notRequiredFragment", this);
+ add(fragment);
+
+ setOutputMarkupId(true);
+ }
+
+ public FormComponent<T> getField() {
+ return field;
+ }
+
+ public FieldPanel<T> setTitle(final String title) {
+ this.title = title;
+ field.add(AttributeModifier.replace("title", title != null
+ ? title
+ : ""));
+
+ return this;
+ }
+
+ public FieldPanel<T> setStyleSheet(final String classes) {
+ field.add(AttributeModifier.replace("class", classes != null
+ ? classes
+ : ""));
+
+ return this;
+ }
+
+ public FieldPanel<T> setRequired(boolean required) {
+ field.setRequired(required);
+
+ return this;
+ }
+
+ public FieldPanel<T> setReadOnly(boolean readOnly) {
+ field.setEnabled(!readOnly);
+
+ return this;
+ }
+
+ public boolean isRequired() {
+ return field.isRequired();
+ }
+
+ public boolean isReadOnly() {
+ return !field.isEnabled();
+ }
+
+ public FieldPanel<T> addRequiredLabel() {
+ if (!isRequired()) {
+ setRequired(true);
+ }
+
+ final Fragment fragment = new Fragment("required", "requiredFragment", this);
+
+ fragment.add(new Label("requiredLabel", "*"));
+
+ replace(fragment);
+
+ this.isRequiredLabelAdded = true;
+
+ return this;
+ }
+
+ public FieldPanel<T> removeRequiredLabel() {
+ if (isRequired()) {
+ setRequired(false);
+ }
+
+ final Fragment fragment = new Fragment("required", "notRequiredFragment", this);
+
+ replace(fragment);
+
+ this.isRequiredLabelAdded = false;
+
+ return this;
+ }
+
+ @Override
+ public FieldPanel<T> setModelObject(final T object) {
+ field.setModelObject(object);
+ return this;
+ }
+
+ public T getModelObject() {
+ return (T) field.getModelObject();
+ }
+
+ public FieldPanel<T> setNewModel(final IModel<T> model) {
+ field.setModel(model);
+ return this;
+ }
+
+ /**
+ * Used by MultiValueSelectorPanel to attach items.
+ *
+ * @param item item to attach.
+ * @return updated FieldPanel object.
+ */
+ public FieldPanel<T> setNewModel(final ListItem<T> item) {
+ setNewModel(new IModel<T>() {
+
+ private static final long serialVersionUID = 6799404673615637845L;
+
+ @Override
+ public T getObject() {
+ return item.getModelObject();
+ }
+
+ @Override
+ public void setObject(final T object) {
+ item.setModelObject(object);
+ }
+
+ @Override
+ public void detach() {
+ // no detach
+ }
+ });
+ return this;
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public FieldPanel<T> setNewModel(final List<Serializable> list) {
+ setNewModel(new Model() {
+
+ private static final long serialVersionUID = 1088212074765051906L;
+
+ @Override
+ public Serializable getObject() {
+ return list == null || list.isEmpty()
+ ? null
+ : list.get(0);
+ }
+
+ @Override
+ public void setObject(final Serializable object) {
+ list.clear();
+
+ if (object != null) {
+ list.add(object);
+ }
+ }
+ });
+
+ return this;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public FieldPanel<T> clone() {
+ final FieldPanel<T> panel = SerializationUtils.clone(this);
+ panel.setModelObject(null);
+ return panel;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/LinkPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/LinkPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/LinkPanel.java
new file mode 100644
index 0000000..b31bbab
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/LinkPanel.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+
+/**
+ * This empty class must exist because there not seems to be alternative to
+ * provide specialized HTML for links.
+ */
+public class LinkPanel extends Panel {
+
+ private static final long serialVersionUID = 4799005986804366330L;
+
+ public LinkPanel(final String id) {
+ super(id);
+ }
+
+ public LinkPanel(final String id, final IModel<?> model) {
+ super(id, model);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MappingPurposePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MappingPurposePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MappingPurposePanel.java
new file mode 100644
index 0000000..2c41f37
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MappingPurposePanel.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import org.apache.syncope.common.lib.types.MappingPurpose;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+public class MappingPurposePanel extends Panel {
+
+ private static final long serialVersionUID = 322966537010107771L;
+
+ private final AjaxLink<Void> propagation;
+
+ private final AjaxLink<Void> synchronization;
+
+ private final AjaxLink<Void> both;
+
+ private final AjaxLink<Void> none;
+
+ public MappingPurposePanel(final String componentId, final IModel<MappingPurpose> model,
+ final WebMarkupContainer container) {
+
+ super(componentId, model);
+
+ propagation = new AjaxLink<Void>("propagationPurposeLink") {
+
+ private static final long serialVersionUID = -6957616042924610305L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ model.setObject(MappingPurpose.PROPAGATION);
+ setOpacity(MappingPurpose.PROPAGATION);
+ target.add(container);
+ }
+ };
+
+ synchronization = new AjaxLink<Void>("synchronizationPurposeLink") {
+
+ private static final long serialVersionUID = -6957616042924610305L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ model.setObject(MappingPurpose.SYNCHRONIZATION);
+ setOpacity(MappingPurpose.SYNCHRONIZATION);
+ target.add(container);
+ }
+ };
+
+ both = new AjaxLink<Void>("bothPurposeLink") {
+
+ private static final long serialVersionUID = -6957616042924610305L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ model.setObject(MappingPurpose.BOTH);
+ setOpacity(MappingPurpose.BOTH);
+ target.add(container);
+ }
+ };
+
+ none = new AjaxLink<Void>("nonePurposeLink") {
+
+ private static final long serialVersionUID = -6957616042924610305L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ model.setObject(MappingPurpose.NONE);
+ setOpacity(MappingPurpose.NONE);
+ target.add(container);
+ }
+ };
+
+ add(propagation);
+ add(synchronization);
+ add(both);
+ add(none);
+
+ setOpacity(model.getObject());
+ }
+
+ private void setOpacity(final MappingPurpose mappingPurpose) {
+ switch (mappingPurpose) {
+ case PROPAGATION:
+ propagation.add(new AttributeModifier("style", new Model<String>("opacity: 1;")));
+ synchronization.add(new AttributeModifier("style", new Model<String>("opacity: 0.3;")));
+ both.add(new AttributeModifier("style", new Model<String>("opacity: 0.3;")));
+ none.add(new AttributeModifier("style", new Model<String>("opacity: 0.3;")));
+ break;
+ case SYNCHRONIZATION:
+ synchronization.add(new AttributeModifier("style", new Model<String>("opacity: 1;")));
+ propagation.add(new AttributeModifier("style", new Model<String>("opacity: 0.3;")));
+ both.add(new AttributeModifier("style", new Model<String>("opacity: 0.3;")));
+ none.add(new AttributeModifier("style", new Model<String>("opacity: 0.3;")));
+ break;
+ case BOTH:
+ both.add(new AttributeModifier("style", new Model<String>("opacity: 1;")));
+ propagation.add(new AttributeModifier("style", new Model<String>("opacity: 0.3;")));
+ synchronization.add(new AttributeModifier("style", new Model<String>("opacity: 0.3;")));
+ none.add(new AttributeModifier("style", new Model<String>("opacity: 0.3;")));
+ break;
+ case NONE:
+ none.add(new AttributeModifier("style", new Model<String>("opacity: 1;")));
+ synchronization.add(new AttributeModifier("style", new Model<String>("opacity: 0.3;")));
+ propagation.add(new AttributeModifier("style", new Model<String>("opacity: 0.3;")));
+ both.add(new AttributeModifier("style", new Model<String>("opacity: 0.3;")));
+ break;
+ default:
+ // do nothing
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
new file mode 100644
index 0000000..cd4ab2a
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
@@ -0,0 +1,172 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.model.IModel;
+
+public class MultiFieldPanel<E> extends AbstractFieldPanel<List<E>> {
+
+ private static final long serialVersionUID = -6322397761456513324L;
+
+ private ListView<E> view;
+
+ private WebMarkupContainer container;
+
+ public MultiFieldPanel(final String id, final IModel<List<E>> model, final FieldPanel<E> panelTemplate) {
+ this(id, model, panelTemplate, false);
+ }
+
+ public MultiFieldPanel(final String id, final IModel<List<E>> model, final FieldPanel<E> panelTemplate,
+ final boolean eventTemplate) {
+
+ super(id, model);
+
+ // -----------------------
+ // Object container definition
+ // -----------------------
+ container = new WebMarkupContainer("multiValueContainer");
+ container.setOutputMarkupId(true);
+ add(container);
+ // -----------------------
+
+ view = new ListView<E>("view", model) {
+
+ private static final long serialVersionUID = -9180479401817023838L;
+
+ @Override
+ protected void populateItem(final ListItem<E> item) {
+ final FieldPanel<E> fieldPanel = panelTemplate.clone();
+
+ if (eventTemplate) {
+ fieldPanel.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ send(getPage(), Broadcast.BREADTH, new MultiValueSelectorEvent(target));
+ }
+ });
+ }
+
+ fieldPanel.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_BLUR) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ }
+ });
+
+ fieldPanel.setNewModel(item);
+ item.add(fieldPanel);
+
+ AjaxLink<Void> minus = new IndicatingAjaxLink<Void>("drop") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ //Drop current component
+ model.getObject().remove(item.getModelObject());
+ fieldPanel.getField().clearInput();
+ target.add(container);
+
+ if (eventTemplate) {
+ send(getPage(), Broadcast.BREADTH, new MultiValueSelectorEvent(target));
+ }
+ }
+ };
+
+ item.add(minus);
+
+ if (model.getObject().size() <= 1) {
+ minus.setVisible(false);
+ minus.setEnabled(false);
+ } else {
+ minus.setVisible(true);
+ minus.setEnabled(true);
+ }
+
+ final Fragment fragment;
+ if (item.getIndex() == model.getObject().size() - 1) {
+ final AjaxLink<Void> plus = new IndicatingAjaxLink<Void>("add") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ //Add current component
+ model.getObject().add(null);
+ target.add(container);
+ }
+ };
+
+ fragment = new Fragment("panelPlus", "fragmentPlus", container);
+
+ fragment.add(plus);
+ } else {
+ fragment = new Fragment("panelPlus", "emptyFragment", container);
+ }
+ item.add(fragment);
+ }
+ };
+
+ container.add(view.setOutputMarkupId(true));
+ setOutputMarkupId(true);
+ }
+
+ public ListView<E> getView() {
+ return view;
+ }
+
+ public WebMarkupContainer getContainer() {
+ return container;
+ }
+
+ @Override
+ public MultiFieldPanel<E> setModelObject(final List<E> object) {
+ view.setModelObject(object);
+ return this;
+ }
+
+ public static class MultiValueSelectorEvent {
+
+ final AjaxRequestTarget target;
+
+ public MultiValueSelectorEvent(final AjaxRequestTarget target) {
+ this.target = target;
+ }
+
+ public AjaxRequestTarget getTarget() {
+ return target;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.java
new file mode 100644
index 0000000..55038da
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.util.Collection;
+import java.util.List;
+import org.apache.wicket.extensions.markup.html.form.palette.Palette;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.model.IModel;
+
+public class NonI18nPalette<T> extends Palette<T> {
+
+ private static final long serialVersionUID = 2659070187837941889L;
+
+ public NonI18nPalette(final String id,
+ final IModel<? extends List<? extends T>> model,
+ final IModel<? extends Collection<? extends T>> choicesModel,
+ final IChoiceRenderer<T> choiceRenderer, final int rows,
+ final boolean allowOrder, final boolean allowMoveAll) {
+
+ super(id, model, choicesModel, choiceRenderer, rows, allowOrder, allowMoveAll);
+ }
+
+ @Override
+ protected boolean localizeDisplayValues() {
+ return false;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SelectableRecorder.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SelectableRecorder.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SelectableRecorder.java
new file mode 100644
index 0000000..2893533
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SelectableRecorder.java
@@ -0,0 +1,204 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.extensions.markup.html.form.palette.Palette;
+import org.apache.wicket.extensions.markup.html.form.palette.component.Recorder;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.util.string.Strings;
+
+/**
+ * A variant of Recorder, supporting single element selection (for editing purpose, for example). <b>Note</b>: this
+ * class extends Recorder<T> but in fact it is a bare copy of most source code; this was done because the original class
+ * is keeping everything private.
+ *
+ * @param <T> Type of the palette
+ */
+public class SelectableRecorder<T> extends Recorder<T> {
+
+ private static final long serialVersionUID = -3009044376132921879L;
+
+ private boolean attached = false;
+
+ private static final String[] EMPTY_IDS = new String[0];
+
+ /**
+ * Conveniently maintained array of selected ids.
+ */
+ private String[] ids;
+
+ private String selectedId;
+
+ public SelectableRecorder(final String id, final Palette<T> palette) {
+ super(id, palette);
+ }
+
+ @Override
+ protected void onBeforeRender() {
+ super.onBeforeRender();
+
+ if (!getForm().hasError()) {
+ initIds();
+ } else if (ids == null) {
+ ids = EMPTY_IDS;
+ }
+ attached = true;
+ }
+
+ /**
+ * Synchronize ids collection from the palette's model
+ */
+ private void initIds() {
+ // construct the model string based on selection collection
+ IChoiceRenderer<T> renderer = getPalette().getChoiceRenderer();
+ StringBuilder modelStringBuffer = new StringBuilder();
+ Collection<T> modelCollection = getPalette().getModelCollection();
+ if (modelCollection == null) {
+ throw new WicketRuntimeException("Expected getPalette().getModelCollection() to return a non-null value."
+ + " Please make sure you have model object assigned to the palette");
+ }
+ Iterator<T> selection = modelCollection.iterator();
+
+ int i = 0;
+ while (selection.hasNext()) {
+ modelStringBuffer.append(renderer.getIdValue(selection.next(), i++));
+ if (selection.hasNext()) {
+ modelStringBuffer.append(",");
+ }
+ }
+
+ // set model and update ids array
+ String modelString = modelStringBuffer.toString();
+ setDefaultModel(new Model<String>(modelString));
+ updateIds(modelString);
+ }
+
+ public T getSelectedItem() {
+ if (selectedId == null) {
+ return null;
+ }
+
+ IChoiceRenderer<T> renderer = getPalette().getChoiceRenderer();
+
+ T selected = null;
+ for (T choice : getPalette().getChoices()) {
+ if (renderer.getIdValue(choice, 0).equals(selectedId)) {
+ selected = choice;
+ break;
+ }
+ }
+
+ return selected;
+ }
+
+ /**
+ * @return iterator over selected choices
+ */
+ @Override
+ public Iterator<T> getSelectedChoices() {
+ IChoiceRenderer<T> renderer = getPalette().getChoiceRenderer();
+ if (ids.length == 0) {
+ return Collections.<T>emptyList().iterator();
+ }
+
+ List<T> selected = new ArrayList<T>(ids.length);
+ for (String id : ids) {
+ for (T choice : getPalette().getChoices()) {
+ if (renderer.getIdValue(choice, 0).equals(id)) {
+ selected.add(choice);
+ break;
+ }
+ }
+ }
+ return selected.iterator();
+ }
+
+ /**
+ * @return iterator over unselected choices
+ */
+ @Override
+ public Iterator<T> getUnselectedChoices() {
+ IChoiceRenderer<T> renderer = getPalette().getChoiceRenderer();
+ Collection<? extends T> choices = getPalette().getChoices();
+
+ if (choices.size() - ids.length == 0) {
+ return Collections.<T>emptyList().iterator();
+ }
+
+ List<T> unselected = new ArrayList<T>(Math.max(1, choices.size() - ids.length));
+ for (T choice : choices) {
+ final String choiceId = renderer.getIdValue(choice, 0);
+ boolean selected = false;
+ for (String id : ids) {
+ if (id.equals(choiceId)) {
+ selected = true;
+ break;
+ }
+ }
+ if (!selected) {
+ unselected.add(choice);
+ }
+ }
+ return unselected.iterator();
+ }
+
+ @Override
+ protected void onValid() {
+ super.onValid();
+ if (attached) {
+ updateIds();
+ }
+ }
+
+ @Override
+ protected void onInvalid() {
+ super.onInvalid();
+ if (attached) {
+ updateIds();
+ }
+ }
+
+ private void updateIds() {
+ updateIds(getValue());
+ }
+
+ @Override
+ protected void updateIds(final String value) {
+ if (Strings.isEmpty(value)) {
+ ids = EMPTY_IDS;
+ } else {
+ if (value.indexOf('|') == -1) {
+ ids = value.split(",");
+ selectedId = null;
+ } else {
+ String[] splitted = value.split("\\|");
+ selectedId = splitted[0];
+ ids = splitted[1].split(",");
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
new file mode 100644
index 0000000..4f71f81
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
@@ -0,0 +1,197 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.UUID;
+import org.apache.commons.lang3.math.NumberUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.springframework.util.StringUtils;
+
+public class SpinnerFieldPanel<T extends Number> extends FieldPanel<T> {
+
+ private static final long serialVersionUID = 6413819574530703577L;
+
+ private final String name;
+
+ private final Class<T> reference;
+
+ private final IModel<T> model;
+
+ private final T min;
+
+ private final T max;
+
+ @SuppressWarnings("unchecked")
+ public SpinnerFieldPanel(final String id, final String name, final Class<T> reference, final IModel<T> model,
+ final T min, final T max) {
+
+ super(id, model);
+ this.name = name;
+ this.reference = reference;
+ this.model = model;
+ this.min = min;
+ this.max = max;
+
+ String uuid = UUID.randomUUID().toString();
+ field = new TextField<T>("spinnerField", model, reference);
+ field.setMarkupId(uuid);
+ add(field.setLabel(new Model<String>(name)));
+
+ if (!isReadOnly()) {
+ field.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ // nothing to do
+ }
+ });
+ }
+
+ final StringBuilder statements = new StringBuilder();
+ statements.append("jQuery(function() {").
+ append("var spinner = $('#").append(uuid).append("').spinner();").
+ append("$('#").append(uuid).append("').spinner(").
+ append("'option', 'stop', function(event, ui) { $(this).change(); });");
+ if (this.min != null) {
+ statements.
+ append("$('#").append(uuid).append("').spinner(").
+ append("'option', 'min', ").append(this.min).append(");");
+ }
+ if (this.max != null) {
+ statements.
+ append("$('#").append(uuid).append("').spinner(").
+ append("'option', 'max', ").append(this.max).append(");");
+ }
+ statements.append("});");
+ Label spinnerFieldJS = new Label("spinnerFieldJS", statements.toString());
+ spinnerFieldJS.setEscapeModelStrings(false);
+ add(spinnerFieldJS);
+ }
+
+ @Override
+ public SpinnerFieldPanel<T> setNewModel(final List<Serializable> list) {
+ setNewModel(new Model<T>() {
+
+ private static final long serialVersionUID = 527651414610325237L;
+
+ @Override
+ public T getObject() {
+ T value = null;
+
+ if (list != null && !list.isEmpty() && StringUtils.hasText(list.get(0).toString())) {
+ value = reference.equals(Integer.class)
+ ? reference.cast(NumberUtils.toInt(list.get(0).toString()))
+ : reference.equals(Long.class)
+ ? reference.cast(NumberUtils.toLong(list.get(0).toString()))
+ : reference.equals(Short.class)
+ ? reference.cast(NumberUtils.toShort(list.get(0).toString()))
+ : reference.equals(Float.class)
+ ? reference.cast(NumberUtils.toFloat(list.get(0).toString()))
+ : reference.equals(byte.class)
+ ? reference.cast(NumberUtils.toByte(list.get(0).toString()))
+ : reference.cast(NumberUtils.toDouble(list.get(0).toString()));
+ }
+
+ return value;
+ }
+
+ @Override
+ public void setObject(final T object) {
+ list.clear();
+ if (object != null) {
+ list.add(object.toString());
+ }
+ }
+ });
+
+ return this;
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ public SpinnerFieldPanel<T> setNewModel(final ListItem item) {
+ field.setModel(new Model<T>() {
+
+ private static final long serialVersionUID = 6799404673615637845L;
+
+ @Override
+ public T getObject() {
+ T number = null;
+
+ final Object obj = item.getModelObject();
+
+ if (obj != null && !obj.toString().isEmpty()) {
+ if (obj instanceof String) {
+ number = reference.equals(Integer.class)
+ ? reference.cast(Integer.valueOf((String) obj))
+ : reference.equals(Long.class)
+ ? reference.cast(Long.valueOf((String) obj))
+ : reference.equals(Short.class)
+ ? reference.cast(Short.valueOf((String) obj))
+ : reference.equals(Float.class)
+ ? reference.cast(Float.valueOf((String) obj))
+ : reference.equals(byte.class)
+ ? reference.cast(Byte.valueOf((String) obj))
+ : reference.cast(Double.valueOf((String) obj));
+ } else if (obj instanceof Number) {
+ // Don't parse anything
+ number = reference.cast(obj);
+ }
+ }
+
+ return number;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void setObject(final T object) {
+ item.setModelObject(object == null ? null : object.toString());
+ }
+ });
+
+ return this;
+ }
+
+ @Override
+ public SpinnerFieldPanel<T> clone() {
+ SpinnerFieldPanel<T> panel = new SpinnerFieldPanel<T>(getId(), name, reference, model, min, max);
+
+ panel.setRequired(isRequired());
+ panel.setReadOnly(isReadOnly());
+ panel.setTitle(title);
+
+ if (isRequiredLabelAdded) {
+ panel.addRequiredLabel();
+ }
+
+ return panel;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/AbstractBinaryPreviewer.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/AbstractBinaryPreviewer.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/AbstractBinaryPreviewer.java
new file mode 100644
index 0000000..24bdb47
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/AbstractBinaryPreviewer.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form.preview;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class AbstractBinaryPreviewer extends Panel {
+
+ /**
+ * Logger.
+ */
+ protected static final Logger LOG = LoggerFactory.getLogger(AbstractBinaryPreviewer.class);
+
+ private static final long serialVersionUID = -2482706463911903025L;
+
+ protected final String mimeType;
+
+ protected final byte[] uploadedBytes;
+
+ public AbstractBinaryPreviewer(final String id, final String mimeType, final byte[] uploadedBytes) {
+ super(id);
+ this.mimeType = mimeType;
+ this.uploadedBytes = uploadedBytes;
+ }
+
+ public abstract Component preview();
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryCertPreviewer.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryCertPreviewer.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryCertPreviewer.java
new file mode 100644
index 0000000..61589d7
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryCertPreviewer.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form.preview;
+
+import java.io.ByteArrayInputStream;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import javax.naming.ldap.LdapName;
+import javax.naming.ldap.Rdn;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.BinaryPreview;
+import org.apache.wicket.Component;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.util.io.IOUtils;
+
+@BinaryPreview(mimeTypes = { "application/x-x509-ca-cert", "application/x-x509-user-cert", "application/pkix-cert" })
+public class BinaryCertPreviewer extends AbstractBinaryPreviewer {
+
+ private static final long serialVersionUID = -5843835939538055110L;
+
+ public BinaryCertPreviewer(final String id, final String mimeType, final byte[] uploadedBytes) {
+ super(id, mimeType, uploadedBytes);
+ }
+
+ @Override
+ public Component preview() {
+ final Label commonNameLabel = new Label("certCommonName", new Model<String>());
+ final ByteArrayInputStream certificateStream = new ByteArrayInputStream(uploadedBytes);
+ try {
+ final X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509").
+ generateCertificate(certificateStream);
+
+ final StringBuilder commonNameBuilder = new StringBuilder("cn=");
+
+ final LdapName ldapName = new LdapName(certificate.getIssuerDN().getName());
+
+ for (Rdn rdn : ldapName.getRdns()) {
+ if ("CN".equalsIgnoreCase(rdn.getType())) {
+ commonNameBuilder.append(rdn.getValue() == null
+ ? StringUtils.EMPTY
+ : rdn.getValue().toString());
+ }
+ }
+ commonNameLabel.setDefaultModelObject(commonNameBuilder.toString());
+ } catch (Exception e) {
+ LOG.error("Error evaluating certificate file", e);
+ throw new IllegalArgumentException("Error evaluating certificate file", e);
+ } finally {
+ IOUtils.closeQuietly(certificateStream);
+ }
+ return this.add(commonNameLabel);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryImagePreviewer.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryImagePreviewer.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryImagePreviewer.java
new file mode 100644
index 0000000..35e442e
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryImagePreviewer.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form.preview;
+
+import org.apache.syncope.client.console.BinaryPreview;
+import org.apache.wicket.Component;
+import org.apache.wicket.extensions.markup.html.image.resource.ThumbnailImageResource;
+import org.apache.wicket.markup.html.image.NonCachingImage;
+import org.apache.wicket.request.resource.DynamicImageResource;
+import org.apache.wicket.request.resource.IResource;
+
+@BinaryPreview(mimeTypes = { "image/jpeg", "image/png", "image/gif", "image/bmp", "image/x-png", "image/vnd.wap.wbmp" })
+public class BinaryImagePreviewer extends AbstractBinaryPreviewer {
+
+ private static final long serialVersionUID = 3338812359368457349L;
+
+ private static final int IMG_SIZE = 230;
+
+ public BinaryImagePreviewer(final String id, final String mimeType, final byte[] uploadedBytes) {
+ super(id, mimeType, uploadedBytes);
+ }
+
+ @Override
+ public Component preview() {
+ return this.add(new NonCachingImage("previewImage", new ThumbnailImageResource(new DynamicImageResource() {
+
+ private static final long serialVersionUID = 923201517955737928L;
+
+ @Override
+ protected byte[] getImageData(final IResource.Attributes attributes) {
+ return uploadedBytes;
+ }
+ }, IMG_SIZE)));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/link/VeilPopupSettings.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/link/VeilPopupSettings.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/link/VeilPopupSettings.java
new file mode 100644
index 0000000..51c8ec5
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/link/VeilPopupSettings.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.link;
+
+import org.apache.wicket.markup.html.link.PopupSettings;
+
+public class VeilPopupSettings extends PopupSettings {
+
+ private static final long serialVersionUID = -2727046117490858226L;
+
+ @Override
+ public String getPopupJavaScript() {
+ return "document.getElementById('veil').style.display = 'block';" + super.getPopupJavaScript();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/AltListView.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/AltListView.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/AltListView.java
new file mode 100644
index 0000000..5a491ae
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/AltListView.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.list;
+
+import java.util.List;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.model.IModel;
+
+public abstract class AltListView<T> extends ListView<T> {
+
+ private static final long serialVersionUID = 251378224847354710L;
+
+ public AltListView(final String id) {
+ super(id);
+ }
+
+ public AltListView(final String id, final IModel<? extends List<? extends T>> model) {
+ super(id, model);
+ }
+
+ public AltListView(final String id, final List<? extends T> list) {
+ super(id, list);
+ }
+
+ @Override
+ protected ListItem<T> newItem(final int index, final IModel<T> itemModel) {
+ return new ListItem<T>(index, itemModel) {
+
+ private static final long serialVersionUID = 5473483270932376694L;
+
+ @Override
+ protected void onComponentTag(final ComponentTag tag) {
+ if (index % 2 == 0) {
+ tag.append("class", "alt", " ");
+ }
+
+ super.onComponentTag(tag);
+ }
+ };
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
new file mode 100644
index 0000000..30775f5
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.list;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Set;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPasswordFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.PasswordTextField;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.ClassUtils;
+
+public class ConnConfPropertyListView extends AltListView<ConnConfProperty> {
+
+ private static final long serialVersionUID = -5239334900329150316L;
+
+ private static final Logger LOG = LoggerFactory.getLogger(ConnConfPropertyListView.class);
+
+ private final boolean withOverridable;
+
+ private final Set<ConnConfProperty> configuration;
+
+ public ConnConfPropertyListView(final String id, final IModel<? extends List<? extends ConnConfProperty>> model,
+ final boolean withOverridable, final Set<ConnConfProperty> configuration) {
+
+ super(id, model);
+ this.configuration = configuration;
+ this.withOverridable = withOverridable;
+ }
+
+ @Override
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ protected void populateItem(final ListItem<ConnConfProperty> item) {
+ final ConnConfProperty property = item.getModelObject();
+
+ final Label label = new Label("connPropAttrSchema",
+ StringUtils.isBlank(property.getSchema().getDisplayName())
+ ? property.getSchema().getName()
+ : property.getSchema().getDisplayName());
+ item.add(label);
+
+ FieldPanel<? extends Serializable> field;
+ boolean required = false;
+ boolean isArray = false;
+
+ if (property.getSchema().isConfidential()
+ || Constants.GUARDED_STRING.equalsIgnoreCase(property.getSchema().getType())
+ || Constants.GUARDED_BYTE_ARRAY.equalsIgnoreCase(property.getSchema().getType())) {
+
+ field = new AjaxPasswordFieldPanel("panel",
+ label.getDefaultModelObjectAsString(), new Model<String>());
+ ((PasswordTextField) field.getField()).setResetPassword(false);
+
+ required = property.getSchema().isRequired();
+ } else {
+ Class<?> propertySchemaClass;
+ try {
+ propertySchemaClass =
+ ClassUtils.forName(property.getSchema().getType(), ClassUtils.getDefaultClassLoader());
+ if (ClassUtils.isPrimitiveOrWrapper(propertySchemaClass)) {
+ propertySchemaClass = org.apache.commons.lang3.ClassUtils.primitiveToWrapper(propertySchemaClass);
+ }
+ } catch (Exception e) {
+ LOG.error("Error parsing attribute type", e);
+ propertySchemaClass = String.class;
+ }
+
+ if (ClassUtils.isAssignable(Number.class, propertySchemaClass)) {
+ @SuppressWarnings("unchecked")
+ final Class<Number> numberClass = (Class<Number>) propertySchemaClass;
+ field = new SpinnerFieldPanel<Number>("panel",
+ label.getDefaultModelObjectAsString(), numberClass, new Model<Number>(), null, null);
+
+ required = property.getSchema().isRequired();
+ } else if (ClassUtils.isAssignable(Boolean.class, propertySchemaClass)) {
+ field = new AjaxCheckBoxPanel("panel",
+ label.getDefaultModelObjectAsString(), new Model<Boolean>());
+ } else {
+ field = new AjaxTextFieldPanel("panel",
+ label.getDefaultModelObjectAsString(), new Model<String>());
+
+ required = property.getSchema().isRequired();
+ }
+
+ if (propertySchemaClass.isArray()) {
+ isArray = true;
+ }
+ }
+
+ field.setTitle(property.getSchema().getHelpMessage());
+
+ if (required) {
+ field.addRequiredLabel();
+ }
+
+ if (isArray) {
+ if (property.getValues().isEmpty()) {
+ property.getValues().add(null);
+ }
+
+ final MultiFieldPanel multiFieldPanel = new MultiFieldPanel("panel",
+ new PropertyModel<List<String>>(property, "values"), field);
+ item.add(multiFieldPanel);
+ } else {
+ setNewFieldModel(field, property.getValues());
+ item.add(field);
+ }
+
+ if (withOverridable) {
+ item.add(new AjaxCheckBoxPanel("connPropAttrOverridable",
+ "connPropAttrOverridable", new PropertyModel<Boolean>(property, "overridable")));
+ }
+
+ configuration.add(property);
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ private void setNewFieldModel(final FieldPanel field, final List<Object> values) {
+ field.setNewModel(values);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/DefaultMutableTreeNodeExpansion.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/DefaultMutableTreeNodeExpansion.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/DefaultMutableTreeNodeExpansion.java
new file mode 100644
index 0000000..50db23c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/DefaultMutableTreeNodeExpansion.java
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.tree;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import javax.swing.tree.DefaultMutableTreeNode;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.wicket.MetaDataKey;
+import org.apache.wicket.Session;
+
+public class DefaultMutableTreeNodeExpansion implements Set<DefaultMutableTreeNode>, Serializable {
+
+ private static final long serialVersionUID = -2864060875425661224L;
+
+ private static MetaDataKey<DefaultMutableTreeNodeExpansion> KEY =
+ new MetaDataKey<DefaultMutableTreeNodeExpansion>() {
+
+ private static final long serialVersionUID = 3109256773218160485L;
+
+ };
+
+ private Set<Long> ids = new HashSet<Long>();
+
+ private boolean inverse;
+
+ public void expandAll() {
+ ids.clear();
+
+ inverse = true;
+ }
+
+ public void collapseAll() {
+ ids.clear();
+
+ inverse = false;
+ }
+
+ @Override
+ public boolean add(final DefaultMutableTreeNode node) {
+ RoleTO roleTO = (RoleTO) node.getUserObject();
+ boolean isAdded;
+ if (inverse) {
+ isAdded = ids.remove(roleTO.getKey());
+ } else {
+ isAdded = ids.add(roleTO.getKey());
+ }
+ return isAdded;
+ }
+
+ @Override
+ public boolean remove(final Object object) {
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode) object;
+ RoleTO roleTO = (RoleTO) node.getUserObject();
+ boolean isRemoved;
+ if (inverse) {
+ isRemoved = ids.add(roleTO.getKey());
+ } else {
+ isRemoved = ids.remove(roleTO.getKey());
+ }
+ return isRemoved;
+ }
+
+ @Override
+ public boolean contains(final Object object) {
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode) object;
+ RoleTO roleTO = (RoleTO) node.getUserObject();
+ boolean isContained;
+ if (inverse) {
+ isContained = !ids.contains(roleTO.getKey());
+ } else {
+ isContained = ids.contains(roleTO.getKey());
+ }
+ return isContained;
+ }
+
+ @Override
+ public void clear() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public int size() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean isEmpty() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public <A> A[] toArray(final A[] a) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Iterator<DefaultMutableTreeNode> iterator() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Object[] toArray() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean containsAll(Collection<?> c) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean addAll(Collection<? extends DefaultMutableTreeNode> c) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean retainAll(Collection<?> c) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean removeAll(Collection<?> c) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Get the expansion for the session.
+ *
+ * @return expansion
+ */
+ public static DefaultMutableTreeNodeExpansion get() {
+ DefaultMutableTreeNodeExpansion expansion = Session.get().getMetaData(KEY);
+ if (expansion == null) {
+ expansion = new DefaultMutableTreeNodeExpansion();
+
+ Session.get().setMetaData(KEY, expansion);
+ }
+ return expansion;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/DefaultMutableTreeNodeExpansionModel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/DefaultMutableTreeNodeExpansionModel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/DefaultMutableTreeNodeExpansionModel.java
new file mode 100644
index 0000000..1b342bd
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/DefaultMutableTreeNodeExpansionModel.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.tree;
+
+import java.util.Set;
+
+import javax.swing.tree.DefaultMutableTreeNode;
+
+import org.apache.wicket.model.AbstractReadOnlyModel;
+
+public class DefaultMutableTreeNodeExpansionModel
+ extends AbstractReadOnlyModel<Set<DefaultMutableTreeNode>> {
+
+ private static final long serialVersionUID = -3407581132184748054L;
+
+ @Override
+ public Set<DefaultMutableTreeNode> getObject() {
+ return DefaultMutableTreeNodeExpansion.get();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/TreeRolePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/TreeRolePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/TreeRolePanel.java
new file mode 100644
index 0000000..b0be4e9
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/TreeRolePanel.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.tree;
+
+import javax.swing.tree.DefaultMutableTreeNode;
+import org.apache.syncope.client.console.commons.RoleTreeBuilder;
+import org.apache.syncope.client.console.commons.XMLRolesReader;
+import org.apache.syncope.client.console.pages.Roles.TreeNodeClickUpdate;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.markup.html.repeater.tree.DefaultNestedTree;
+import org.apache.wicket.extensions.markup.html.repeater.tree.ITreeProvider;
+import org.apache.wicket.extensions.markup.html.repeater.tree.NestedTree;
+import org.apache.wicket.extensions.markup.html.repeater.tree.content.Folder;
+import org.apache.wicket.extensions.markup.html.repeater.tree.theme.WindowsTheme;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class TreeRolePanel extends Panel {
+
+ private static final long serialVersionUID = 1762003213871836869L;
+
+ @SpringBean
+ private RoleTreeBuilder roleTreeBuilder;
+
+ @SpringBean
+ private XMLRolesReader xmlRolesReader;
+
+ private WebMarkupContainer treeContainer;
+
+ private NestedTree<DefaultMutableTreeNode> tree;
+
+ public TreeRolePanel(final String id) {
+ super(id);
+
+ treeContainer = new WebMarkupContainer("treeContainer");
+ treeContainer.setOutputMarkupId(true);
+ add(treeContainer);
+ updateTree();
+ }
+
+ private void updateTree() {
+ final ITreeProvider<DefaultMutableTreeNode> treeProvider = new TreeRoleProvider(roleTreeBuilder, true);
+ final DefaultMutableTreeNodeExpansionModel treeModel = new DefaultMutableTreeNodeExpansionModel();
+
+ tree = new DefaultNestedTree<DefaultMutableTreeNode>("treeTable", treeProvider, treeModel) {
+
+ private static final long serialVersionUID = 7137658050662575546L;
+
+ @Override
+ protected Component newContentComponent(final String id, final IModel<DefaultMutableTreeNode> node) {
+ final DefaultMutableTreeNode treeNode = node.getObject();
+ final RoleTO roleTO = (RoleTO) treeNode.getUserObject();
+
+ return new Folder<DefaultMutableTreeNode>(id, TreeRolePanel.this.tree, node) {
+
+ private static final long serialVersionUID = 9046323319920426493L;
+
+ @Override
+ protected boolean isClickable() {
+ return true;
+ }
+
+ @Override
+ protected IModel<?> newLabelModel(final IModel<DefaultMutableTreeNode> model) {
+ return new Model<>(roleTO.getDisplayName());
+ }
+
+ @Override
+ protected void onClick(final AjaxRequestTarget target) {
+ super.onClick(target);
+
+ send(getPage(), Broadcast.BREADTH, new TreeNodeClickUpdate(target, roleTO.getKey()));
+ }
+ };
+ }
+ };
+ tree.add(new WindowsTheme());
+ tree.setOutputMarkupId(true);
+
+ DefaultMutableTreeNodeExpansion.get().expandAll();
+
+ MetaDataRoleAuthorizationStrategy.authorize(tree, ENABLE, xmlRolesReader.getEntitlement("Roles", "read"));
+
+ treeContainer.addOrReplace(tree);
+ }
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ super.onEvent(event);
+
+ if (event.getPayload() instanceof TreeNodeClickUpdate) {
+ final TreeNodeClickUpdate update = (TreeNodeClickUpdate) event.getPayload();
+ updateTree();
+ update.getTarget().add(treeContainer);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/TreeRoleProvider.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/TreeRoleProvider.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/TreeRoleProvider.java
new file mode 100644
index 0000000..6fbe9a4
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/tree/TreeRoleProvider.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.tree;
+
+import javax.swing.tree.DefaultMutableTreeNode;
+import org.apache.syncope.client.console.commons.RoleTreeBuilder;
+import org.apache.wicket.extensions.markup.html.repeater.util.TreeModelProvider;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+public class TreeRoleProvider extends TreeModelProvider<DefaultMutableTreeNode> {
+
+ private static final long serialVersionUID = -7741964777100892335L;
+
+ public TreeRoleProvider(final RoleTreeBuilder roleTreeBuilder) {
+ this(roleTreeBuilder, false);
+ }
+
+ public TreeRoleProvider(final RoleTreeBuilder roleTreeBuilder, final boolean rootVisible) {
+ super(roleTreeBuilder.build(), rootVisible);
+ }
+
+ @Override
+ public IModel<DefaultMutableTreeNode> model(final DefaultMutableTreeNode treeNode) {
+ return new Model<DefaultMutableTreeNode>(treeNode);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/cxf/org.apache.cxf.Logger b/client/console/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
new file mode 100644
index 0000000..6e7bd36
--- /dev/null
+++ b/client/console/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
@@ -0,0 +1 @@
+org.apache.cxf.common.logging.Slf4jLogger
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/resources/META-INF/resources/css/bulk.css
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/bulk.css b/client/console/src/main/resources/META-INF/resources/css/bulk.css
new file mode 100644
index 0000000..1f0e621
--- /dev/null
+++ b/client/console/src/main/resources/META-INF/resources/css/bulk.css
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+th.checkGroupColumn{
+ width: 20px;
+}
+
+td.checkGroupColumn{
+ text-align: center;
+}
+
+div.bulkAction{
+ display:inline-table;
+}
+
+div.bulkActionCell{
+ display: table-cell;
+ vertical-align: middle;
+ text-align: center;
+ width: 40px;
+ padding-left: 7px;
+}
+
+.pageRowElement{
+ display: inline-table;
+ width: 95%;
+}
+
+div#selectedObjects{
+ text-align: center;
+ margin-top: 10px;
+}
+
+div#selectedObjects table {
+ margin: 1em 0;
+ border-collapse: collapse;
+}
+
+div#selectedObjects table td, div#selectedObjects table th {
+ border: 1px solid #eee;
+ padding: .6em 10px;
+}
+
+div#actionRow{
+ height: 30px;
+ overflow: hidden;
+ text-align: left;
+ margin-top: 10px;
+}
+
+div#actions{
+ display: inline-table;
+ height: 30px;
+ overflow: hidden;
+}
+
+div#actions div#actionPanel{
+ display: table-cell;
+ height: 30px;
+ overflow: hidden;
+ cursor: auto;
+ background: none;
+ padding: 0px 10px;
+ vertical-align: middle;
+}
+
+div#actions div#cancelBtmForm{
+ display: table-cell;
+ height: 30px;
+ overflow: hidden;
+ vertical-align: middle;
+ padding-left: 3px;
+}
+
+div#actions div#cancelBtmForm form{
+ padding: 0px;
+ margin: 0px;
+}
+
+div#actions div#cancelBtmForm form input#cancel{
+ padding: 0.6em 1em;
+}
[45/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java
new file mode 100644
index 0000000..3c0e56e
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java
@@ -0,0 +1,324 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.commons.status;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.syncope.client.console.commons.ConnIdSpecialAttributeName;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.ImagePanel;
+import org.apache.syncope.client.console.panels.StatusPanel;
+import org.apache.syncope.client.console.rest.AbstractSubjectRestClient;
+import org.apache.syncope.common.lib.mod.StatusMod;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.AbstractSubjectTO;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.ConnObjectTO;
+import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.behavior.Behavior;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.request.resource.ContextRelativeResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class StatusUtils implements Serializable {
+
+ private static final long serialVersionUID = 7238009174387184309L;
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(StatusUtils.class);
+
+ private static final String IMG_PREFIX = "/img/statuses/";
+
+ private final AbstractSubjectRestClient restClient;
+
+ public StatusUtils(final AbstractSubjectRestClient restClient) {
+ this.restClient = restClient;
+ }
+
+ public List<ConnObjectWrapper> getConnectorObjects(final AbstractSubjectTO subject) {
+ final List<ConnObjectWrapper> objects = new ArrayList<>();
+ objects.addAll(getConnectorObjects(subject, subject.getResources()));
+ return objects;
+ }
+
+ public List<ConnObjectWrapper> getConnectorObjects(
+ final Collection<AbstractSubjectTO> subjects, final Collection<String> resources) {
+
+ final List<ConnObjectWrapper> objects = new ArrayList<>();
+
+ for (AbstractSubjectTO subject : subjects) {
+ objects.addAll(getConnectorObjects(subject, resources));
+ }
+
+ return objects;
+ }
+
+ private List<ConnObjectWrapper> getConnectorObjects(
+ final AbstractSubjectTO subject, final Collection<String> resources) {
+
+ final List<ConnObjectWrapper> objects = new ArrayList<>();
+
+ for (String resourceName : resources) {
+ ConnObjectTO objectTO = null;
+ try {
+ objectTO = restClient.getConnectorObject(resourceName, subject.getKey());
+ } catch (Exception e) {
+ LOG.warn("ConnObject '{}' not found on resource '{}'", subject.getKey(), resourceName);
+ }
+
+ objects.add(new ConnObjectWrapper(subject, resourceName, objectTO));
+ }
+
+ return objects;
+ }
+
+ public StatusBean getStatusBean(
+ final AbstractAttributableTO attributable,
+ final String resourceName,
+ final ConnObjectTO objectTO,
+ final boolean isRole) {
+
+ final StatusBean statusBean = new StatusBean(attributable, resourceName);
+
+ if (objectTO != null) {
+ final Boolean enabled = isEnabled(objectTO);
+
+ final Status status = enabled == null
+ ? (isRole ? Status.ACTIVE : Status.UNDEFINED)
+ : enabled
+ ? Status.ACTIVE
+ : Status.SUSPENDED;
+
+ final String accountLink = getAccountLink(objectTO);
+
+ statusBean.setStatus(status);
+ statusBean.setAccountLink(accountLink);
+ }
+
+ return statusBean;
+ }
+
+ private Boolean isEnabled(final ConnObjectTO objectTO) {
+ final Map<String, AttrTO> attributeTOs = objectTO.getPlainAttrMap();
+
+ final AttrTO status = attributeTOs.get(ConnIdSpecialAttributeName.ENABLE);
+
+ return status != null && status.getValues() != null && !status.getValues().isEmpty()
+ ? Boolean.parseBoolean(status.getValues().get(0))
+ : null;
+ }
+
+ private String getAccountLink(final ConnObjectTO objectTO) {
+ final Map<String, AttrTO> attributeTOs = objectTO == null
+ ? Collections.<String, AttrTO>emptyMap()
+ : objectTO.getPlainAttrMap();
+
+ final AttrTO name = attributeTOs.get(ConnIdSpecialAttributeName.NAME);
+
+ return name != null && name.getValues() != null && !name.getValues().isEmpty()
+ ? name.getValues().get(0)
+ : null;
+ }
+
+ public static StatusMod buildStatusMod(final Collection<StatusBean> statuses) {
+ return buildStatusMod(statuses, null);
+ }
+
+ public static StatusMod buildStatusMod(final Collection<StatusBean> statuses, final Boolean enable) {
+ StatusMod statusMod = new StatusMod();
+ statusMod.setOnSyncope(false);
+
+ for (StatusBean status : statuses) {
+ if (enable == null
+ || (enable && !status.getStatus().isActive()) || (!enable && status.getStatus().isActive())) {
+
+ if ("syncope".equalsIgnoreCase(status.getResourceName())) {
+ statusMod.setOnSyncope(true);
+ } else {
+ statusMod.getResourceNames().add(status.getResourceName());
+ }
+
+ }
+ }
+
+ return statusMod;
+ }
+
+ public static void update(
+ final AbstractAttributableTO attributable,
+ final StatusPanel statusPanel,
+ final AjaxRequestTarget target,
+ final Collection<String> resourcesToAdd,
+ final Collection<String> resourcesToRemove) {
+
+ if (statusPanel != null) {
+ Map<String, StatusBean> statusMap = new LinkedHashMap<>();
+ for (StatusBean statusBean : statusPanel.getStatusBeans()) {
+ statusMap.put(statusBean.getResourceName(), statusBean);
+ }
+
+ for (String resourceName : resourcesToAdd) {
+ if (!statusMap.keySet().contains(resourceName)) {
+ StatusBean statusBean;
+ if (statusPanel.getInitialStatusBeanMap().containsKey(resourceName)) {
+ statusBean = statusPanel.getInitialStatusBeanMap().get(resourceName);
+ } else {
+ statusBean = new StatusBean(attributable, resourceName);
+ statusBean.setStatus(Status.NOT_YET_SUBMITTED);
+ }
+
+ statusMap.put(statusBean.getResourceName(), statusBean);
+ }
+ }
+
+ for (String resource : resourcesToRemove) {
+ statusMap.remove(resource);
+ }
+
+ statusPanel.updateStatusBeans(new ArrayList<>(statusMap.values()));
+ target.add(statusPanel);
+ }
+ }
+
+ public ConnObjectTO getConnObjectTO(
+ final Long attributableId, final String resourceName, final List<ConnObjectWrapper> objects) {
+
+ for (ConnObjectWrapper object : objects) {
+ if (attributableId.equals(object.getAttributable().getKey())
+ && resourceName.equalsIgnoreCase(object.getResourceName())) {
+
+ return object.getConnObjectTO();
+ }
+ }
+
+ return null;
+ }
+
+ public Image getStatusImage(final String componentId, final Status status) {
+ final String alt, title, statusName;
+
+ switch (status) {
+
+ case NOT_YET_SUBMITTED:
+ statusName = Status.UNDEFINED.toString();
+ alt = "undefined icon";
+ title = "Not yet submitted";
+ break;
+
+ case ACTIVE:
+ statusName = Status.ACTIVE.toString();
+ alt = "active icon";
+ title = "Enabled";
+ break;
+
+ case UNDEFINED:
+ statusName = Status.UNDEFINED.toString();
+ alt = "undefined icon";
+ title = "Undefined status";
+ break;
+
+ case OBJECT_NOT_FOUND:
+ statusName = Status.OBJECT_NOT_FOUND.toString();
+ alt = "notfound icon";
+ title = "Not found";
+ break;
+
+ default:
+ statusName = Status.SUSPENDED.toString();
+ alt = "inactive icon";
+ title = "Disabled";
+ }
+
+ final Image img = new Image(componentId,
+ new ContextRelativeResource(IMG_PREFIX + statusName + Constants.PNG_EXT));
+ img.add(new Behavior() {
+
+ private static final long serialVersionUID = 1469628524240283489L;
+
+ @Override
+ public void onComponentTag(final Component component, final ComponentTag tag) {
+ tag.put("alt", alt);
+ tag.put("title", title);
+ }
+ });
+
+ return img;
+ }
+
+ public ImagePanel getStatusImagePanel(final String componentId, final Status status) {
+ final String alt, title, statusName;
+
+ switch (status) {
+
+ case NOT_YET_SUBMITTED:
+ statusName = Status.UNDEFINED.toString();
+ alt = "undefined icon";
+ title = "Not yet submitted";
+ break;
+
+ case ACTIVE:
+ statusName = Status.ACTIVE.toString();
+ alt = "active icon";
+ title = "Enabled";
+ break;
+
+ case UNDEFINED:
+ statusName = Status.UNDEFINED.toString();
+ alt = "undefined icon";
+ title = "Undefined status";
+ break;
+
+ case OBJECT_NOT_FOUND:
+ statusName = Status.OBJECT_NOT_FOUND.toString();
+ alt = "notfound icon";
+ title = "Not found";
+ break;
+
+ default:
+ statusName = Status.SUSPENDED.toString();
+ alt = "inactive icon";
+ title = "Disabled";
+ }
+
+ final ImagePanel imagePanel = new ImagePanel(componentId,
+ new ContextRelativeResource(IMG_PREFIX + statusName + Constants.PNG_EXT));
+ imagePanel.add(new Behavior() {
+
+ private static final long serialVersionUID = 1469628524240283489L;
+
+ @Override
+ public void onComponentTag(final Component component, final ComponentTag tag) {
+ tag.put("alt", alt);
+ tag.put("title", title);
+ }
+ });
+
+ return imagePanel;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/init/ConsoleInitializer.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/init/ConsoleInitializer.java b/client/console/src/main/java/org/apache/syncope/client/console/init/ConsoleInitializer.java
new file mode 100644
index 0000000..ec51d3e
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/init/ConsoleInitializer.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.init;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.aop.support.AopUtils;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.beans.factory.BeanFactoryAware;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.support.DefaultListableBeanFactory;
+import org.springframework.stereotype.Component;
+
+/**
+ * Take care of all initializations needed by Syncope Console to run up and safe.
+ */
+@Component
+public class ConsoleInitializer implements InitializingBean, BeanFactoryAware {
+
+ private static final Logger LOG = LoggerFactory.getLogger(ConsoleInitializer.class);
+
+ private DefaultListableBeanFactory beanFactory;
+
+ @Override
+ public void setBeanFactory(final BeanFactory beanFactory) throws BeansException {
+ this.beanFactory = (DefaultListableBeanFactory) beanFactory;
+ }
+
+ @Override
+ public void afterPropertiesSet() {
+ Map<String, SyncopeConsoleLoader> loaderMap = beanFactory.getBeansOfType(SyncopeConsoleLoader.class);
+
+ List<SyncopeConsoleLoader> loaders = new ArrayList<>(loaderMap.values());
+ Collections.sort(loaders, new Comparator<SyncopeConsoleLoader>() {
+
+ @Override
+ public int compare(final SyncopeConsoleLoader o1, final SyncopeConsoleLoader o2) {
+ return o1.getPriority().compareTo(o2.getPriority());
+ }
+ });
+
+ LOG.debug("Starting initialization...");
+ for (SyncopeConsoleLoader loader : loaders) {
+ LOG.debug("Invoking {} with priority {}", AopUtils.getTargetClass(loader).getName(), loader.getPriority());
+ loader.load();
+ }
+ LOG.debug("Initialization completed");
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/init/ImplementationClassNamesLoader.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/init/ImplementationClassNamesLoader.java b/client/console/src/main/java/org/apache/syncope/client/console/init/ImplementationClassNamesLoader.java
new file mode 100644
index 0000000..0ff7282
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/init/ImplementationClassNamesLoader.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.init;
+
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.panels.AbstractExtensionPanel;
+import org.apache.syncope.client.console.BinaryPreview;
+import org.apache.syncope.client.console.wicket.markup.html.form.preview.AbstractBinaryPreviewer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
+import org.springframework.core.type.filter.AssignableTypeFilter;
+import org.springframework.stereotype.Component;
+import org.springframework.util.ClassUtils;
+
+@Component
+public class ImplementationClassNamesLoader implements SyncopeConsoleLoader {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(ImplementationClassNamesLoader.class);
+
+ private List<Class<? extends AbstractBinaryPreviewer>> previewers;
+
+ private List<Class<? extends AbstractExtensionPanel>> extPanels;
+
+ @Override
+ public Integer getPriority() {
+ return 0;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void load() {
+ previewers = new ArrayList<>();
+ extPanels = new ArrayList<>();
+
+ ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false);
+ scanner.addIncludeFilter(new AssignableTypeFilter(AbstractBinaryPreviewer.class));
+ scanner.addIncludeFilter(new AssignableTypeFilter(AbstractExtensionPanel.class));
+
+ for (BeanDefinition bd : scanner.findCandidateComponents(StringUtils.EMPTY)) {
+ try {
+ Class<?> clazz = ClassUtils.resolveClassName(
+ bd.getBeanClassName(), ClassUtils.getDefaultClassLoader());
+ boolean isAbsractClazz = Modifier.isAbstract(clazz.getModifiers());
+
+ if (AbstractBinaryPreviewer.class.isAssignableFrom(clazz) && !isAbsractClazz) {
+ previewers.add((Class<? extends AbstractBinaryPreviewer>) clazz);
+ } else if (AbstractExtensionPanel.class.isAssignableFrom(clazz) && !isAbsractClazz) {
+ extPanels.add((Class<? extends AbstractExtensionPanel>) clazz);
+ }
+
+ } catch (Throwable t) {
+ LOG.warn("Could not inspect class {}", bd.getBeanClassName(), t);
+ }
+ }
+ previewers = Collections.unmodifiableList(previewers);
+ extPanels = Collections.unmodifiableList(extPanels);
+
+ LOG.debug("Binary previewers found: {}", previewers);
+ LOG.debug("Extension panels found: {}", extPanels);
+ }
+
+ public Class<? extends AbstractBinaryPreviewer> getPreviewerClass(final String mimeType) {
+ LOG.debug("Searching for previewer class for MIME type: {}", mimeType);
+ Class<? extends AbstractBinaryPreviewer> previewer = null;
+ for (Class<? extends AbstractBinaryPreviewer> candidate : previewers) {
+ LOG.debug("Evaluating previewer class {} for MIME type {}", candidate.getName(), mimeType);
+ if (ArrayUtils.contains(candidate.getAnnotation(BinaryPreview.class).mimeTypes(), mimeType)) {
+ LOG.debug("Found existing previewer for MIME type {}: {}", mimeType, candidate.getName());
+ previewer = candidate;
+ }
+ }
+ return previewer;
+ }
+
+ public List<Class<? extends AbstractBinaryPreviewer>> getPreviewerClasses() {
+ return previewers;
+ }
+
+ public List<Class<? extends AbstractExtensionPanel>> getExtPanelClasses() {
+ return extPanels;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/init/MIMETypesLoader.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/init/MIMETypesLoader.java b/client/console/src/main/java/org/apache/syncope/client/console/init/MIMETypesLoader.java
new file mode 100644
index 0000000..7a2f878
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/init/MIMETypesLoader.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.init;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.wicket.util.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component
+public class MIMETypesLoader implements SyncopeConsoleLoader {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(MIMETypesLoader.class);
+
+ private List<String> mimeTypes;
+
+ @Override
+ public Integer getPriority() {
+ return 10;
+ }
+
+ @Override
+ public void load() {
+ final Set<String> mediaTypes = new HashSet<>();
+ this.mimeTypes = new ArrayList<>();
+ try {
+ final String mimeTypesFile = IOUtils.toString(getClass().getResourceAsStream("/MIMETypes"));
+ for (String fileRow : mimeTypesFile.split("\n")) {
+ if (StringUtils.isNotBlank(fileRow) && !fileRow.startsWith("#")) {
+ mediaTypes.add(fileRow);
+ }
+ }
+ this.mimeTypes.addAll(mediaTypes);
+ Collections.sort(this.mimeTypes);
+ } catch (Exception e) {
+ LOG.error("Error reading file MIMETypes from resources", e);
+ }
+ }
+
+ public List<String> getMimeTypes() {
+ LOG.debug("Returning loaded MIME types list {}", mimeTypes);
+ return mimeTypes;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/init/SyncopeConsoleLoader.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/init/SyncopeConsoleLoader.java b/client/console/src/main/java/org/apache/syncope/client/console/init/SyncopeConsoleLoader.java
new file mode 100644
index 0000000..7c4d3d4
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/init/SyncopeConsoleLoader.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.init;
+
+/**
+ * Marker interface for Syncope console initialization.
+ */
+public interface SyncopeConsoleLoader {
+
+ /**
+ * @return the priority that the implementing class has in the initialization process.
+ */
+ Integer getPriority();
+
+ /**
+ * Perform initialization operations.
+ */
+ void load();
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java
new file mode 100644
index 0000000..4a32700
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.XMLRolesReader;
+import org.apache.syncope.client.console.init.MIMETypesLoader;
+import org.apache.syncope.client.console.panels.NotificationPanel;
+import org.apache.syncope.client.console.rest.ConfigurationRestClient;
+import org.apache.syncope.client.console.rest.ReportRestClient;
+import org.apache.syncope.client.console.rest.ResourceRestClient;
+import org.apache.syncope.client.console.rest.RoleRestClient;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.rest.TaskRestClient;
+import org.apache.syncope.client.console.rest.UserRestClient;
+import org.apache.syncope.client.console.rest.UserSelfRestClient;
+import org.apache.syncope.client.console.wicket.markup.head.MetaHeaderItem;
+import org.apache.wicket.markup.head.HeaderItem;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.PriorityHeaderItem;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AbstractBasePage extends WebPage {
+
+ private static final long serialVersionUID = 8611724965544132636L;
+
+ /**
+ * Logger.
+ */
+ protected static final Logger LOG = LoggerFactory.getLogger(AbstractBasePage.class);
+
+ protected static final String TASKS = "Tasks";
+
+ protected static final String FORM = "form";
+
+ protected static final String CANCEL = "cancel";
+
+ protected static final String SUBMIT = "submit";
+
+ protected static final String APPLY = "apply";
+
+ protected final HeaderItem meta = new MetaHeaderItem("X-UA-Compatible", "IE=edge");
+
+ @SpringBean
+ protected XMLRolesReader xmlRolesReader;
+
+ @SpringBean
+ protected UserRestClient userRestClient;
+
+ @SpringBean
+ protected UserSelfRestClient userSelfRestClient;
+
+ @SpringBean
+ protected RoleRestClient roleRestClient;
+
+ @SpringBean
+ protected TaskRestClient taskRestClient;
+
+ @SpringBean
+ protected SchemaRestClient schemaRestClient;
+
+ @SpringBean
+ protected ResourceRestClient resourceRestClient;
+
+ @SpringBean
+ protected ReportRestClient reportRestClient;
+
+ @SpringBean
+ protected ConfigurationRestClient confRestClient;
+
+ @SpringBean
+ protected MIMETypesLoader mimeTypesInitializer;
+
+ protected NotificationPanel feedbackPanel;
+
+ /**
+ * Response flag set by the Modal Window after the operation is completed.
+ */
+ protected boolean modalResult = false;
+
+ public AbstractBasePage() {
+ this(null);
+ }
+
+ public AbstractBasePage(final PageParameters parameters) {
+ super(parameters);
+
+ feedbackPanel = new NotificationPanel(Constants.FEEDBACK);
+ feedbackPanel.setOutputMarkupId(true);
+ add(feedbackPanel);
+ }
+
+ public NotificationPanel getFeedbackPanel() {
+ return feedbackPanel;
+ }
+
+ public boolean isModalResult() {
+ return modalResult;
+ }
+
+ public void setModalResult(final boolean operationResult) {
+ this.modalResult = operationResult;
+ }
+
+ @Override
+ public void renderHead(final IHeaderResponse response) {
+ super.renderHead(response);
+ response.render(new PriorityHeaderItem(meta));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractSchedTaskModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractSchedTaskModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractSchedTaskModalPage.java
new file mode 100644
index 0000000..78ca906
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractSchedTaskModalPage.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.DateFormatROModel;
+import org.apache.syncope.client.console.wicket.markup.html.CrontabContainer;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.springframework.util.StringUtils;
+
+/**
+ * Modal window with Task form (to stop and start execution).
+ */
+public abstract class AbstractSchedTaskModalPage extends TaskModalPage {
+
+ private static final long serialVersionUID = 2892005971093059242L;
+
+ protected CrontabContainer crontab;
+
+ public AbstractSchedTaskModalPage(final ModalWindow window, final SchedTaskTO taskTO,
+ final PageReference pageRef) {
+
+ super(taskTO);
+
+ crontab = new CrontabContainer("crontab", new PropertyModel<String>(taskTO, "cronExpression"),
+ taskTO.getCronExpression());
+ form.add(crontab);
+
+ final AjaxTextFieldPanel name =
+ new AjaxTextFieldPanel("name", "name", new PropertyModel<String>(taskTO, "name"));
+ name.setEnabled(true);
+ profile.add(name);
+
+ final AjaxTextFieldPanel description = new AjaxTextFieldPanel("description", "description",
+ new PropertyModel<String>(taskTO, "description"));
+ description.setEnabled(true);
+ profile.add(description);
+
+ final AjaxTextFieldPanel lastExec = new AjaxTextFieldPanel("lastExec", getString("lastExec"),
+ new DateFormatROModel(new PropertyModel<String>(taskTO, "lastExec")));
+ lastExec.setEnabled(false);
+ profile.add(lastExec);
+
+ final AjaxTextFieldPanel nextExec = new AjaxTextFieldPanel("nextExec", getString("nextExec"),
+ new DateFormatROModel(new PropertyModel<String>(taskTO, "nextExec")));
+ nextExec.setEnabled(false);
+ profile.add(nextExec);
+
+ final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(APPLY)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ SchedTaskTO taskTO = (SchedTaskTO) form.getModelObject();
+ taskTO.setCronExpression(StringUtils.hasText(taskTO.getCronExpression())
+ ? crontab.getCronExpression()
+ : null);
+
+ try {
+ submitAction(taskTO);
+
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+
+ window.close(target);
+ } catch (SyncopeClientException e) {
+ LOG.error("While creating or updating task", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+
+ final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+ };
+
+ cancel.setDefaultFormProcessing(false);
+
+ if (taskTO.getKey() > 0) {
+ MetaDataRoleAuthorizationStrategy.authorize(
+ submit, RENDER, xmlRolesReader.getEntitlement(TASKS, "update"));
+ } else {
+ MetaDataRoleAuthorizationStrategy.authorize(
+ submit, RENDER, xmlRolesReader.getEntitlement(TASKS, "create"));
+ }
+
+ form.add(submit);
+ form.add(cancel);
+ }
+
+ protected abstract void submitAction(SchedTaskTO taskTO);
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractSchemaModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractSchemaModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractSchemaModalPage.java
new file mode 100644
index 0000000..1c1bd0f
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractSchemaModalPage.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.common.lib.to.AbstractSchemaTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+
+/**
+ * Modal window with Schema form.
+ */
+public abstract class AbstractSchemaModalPage<T extends AbstractSchemaTO> extends BaseModalPage {
+
+ private static final long serialVersionUID = 7369215690388444748L;
+
+ protected AttributableType kind;
+
+ public AbstractSchemaModalPage(final AttributableType kind) {
+ this.kind = kind;
+ }
+
+ public abstract void setSchemaModalPage(PageReference callerPageRef, ModalWindow window, T schema,
+ boolean createFlag);
+
+ public AttributableType getKind() {
+ return kind;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractStatusModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractStatusModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractStatusModalPage.java
new file mode 100644
index 0000000..f5dfbca
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractStatusModalPage.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.wicket.markup.html.panel.Fragment;
+
+public class AbstractStatusModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 6633408683036028540L;
+
+ public AbstractStatusModalPage() {
+ add(new Fragment("pwdMgtFields", "emptyFragment", this));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractSyncTaskModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractSyncTaskModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractSyncTaskModalPage.java
new file mode 100644
index 0000000..aa62b41
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractSyncTaskModalPage.java
@@ -0,0 +1,209 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.SelectChoiceRenderer;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.common.lib.to.AbstractProvisioningTaskTO;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.types.MatchingRule;
+import org.apache.syncope.common.lib.types.UnmatchingRule;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+
+/**
+ * Abstract Modal window for Sync and Push Task form.
+ */
+public abstract class AbstractSyncTaskModalPage extends AbstractSchedTaskModalPage {
+
+ private static final long serialVersionUID = 2148403203517274669L;
+
+ protected AjaxDropDownChoicePanel<MatchingRule> matchingRule;
+
+ protected AjaxDropDownChoicePanel<UnmatchingRule> unmatchingRule;
+
+ protected abstract List<String> getSyncActions();
+
+ final IModel<List<String>> allResources = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ final List<String> resourceNames = new ArrayList<>();
+
+ for (ResourceTO resourceTO : resourceRestClient.getAll()) {
+ resourceNames.add(resourceTO.getKey());
+ }
+
+ Collections.sort(resourceNames);
+ return resourceNames;
+ }
+ };
+
+ final IModel<List<String>> syncActionsClasses = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157438L;
+
+ @Override
+ protected List<String> load() {
+ return getSyncActions();
+ }
+ };
+
+ public AbstractSyncTaskModalPage(
+ final ModalWindow window, final AbstractProvisioningTaskTO taskTO, final PageReference pageRef) {
+
+ super(window, taskTO, pageRef);
+
+ final AjaxDropDownChoicePanel<String> resource = new AjaxDropDownChoicePanel<>("resource",
+ getString("resourceName"), new PropertyModel<String>(taskTO, "resource"));
+ resource.setChoices(allResources.getObject());
+ resource.setChoiceRenderer(new SelectChoiceRenderer<String>());
+ resource.addRequiredLabel();
+ resource.setEnabled(taskTO.getKey() == 0);
+ resource.setStyleSheet("ui-widget-content ui-corner-all long_dynamicsize");
+
+ profile.add(resource);
+
+ final WebMarkupContainer syncActionsClassNames = new WebMarkupContainer("syncActionsClassNames");
+ syncActionsClassNames.setOutputMarkupId(true);
+ profile.add(syncActionsClassNames);
+
+ final AjaxLink<Void> first = new IndicatingAjaxLink<Void>("first") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ taskTO.getActionsClassNames().add(StringUtils.EMPTY);
+ setVisible(false);
+ target.add(syncActionsClassNames);
+ }
+ };
+ first.setOutputMarkupPlaceholderTag(true);
+ first.setVisible(taskTO.getActionsClassNames().isEmpty());
+ syncActionsClassNames.add(first);
+
+ final ListView<String> actionsClasses = new ListView<String>(
+ "actionsClasses", new PropertyModel<List<String>>(taskTO, "actionsClassNames")) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ protected void populateItem(final ListItem<String> item) {
+ final String className = item.getModelObject();
+
+ final DropDownChoice<String> actionsClass = new DropDownChoice<String>(
+ "actionsClass", new Model<String>(className), syncActionsClasses.getObject());
+ actionsClass.setNullValid(true);
+ actionsClass.setRequired(true);
+ actionsClass.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ taskTO.getActionsClassNames().set(item.getIndex(), actionsClass.getModelObject());
+ target.add(syncActionsClassNames);
+ }
+ });
+ actionsClass.setRequired(true);
+ actionsClass.setOutputMarkupId(true);
+ actionsClass.setRequired(true);
+ item.add(actionsClass);
+
+ AjaxLink<Void> minus = new IndicatingAjaxLink<Void>("drop") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ taskTO.getActionsClassNames().remove(className);
+ first.setVisible(taskTO.getActionsClassNames().isEmpty());
+ target.add(syncActionsClassNames);
+ }
+ };
+ item.add(minus);
+
+ final AjaxLink<Void> plus = new IndicatingAjaxLink<Void>("add") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ taskTO.getActionsClassNames().add(StringUtils.EMPTY);
+ target.add(syncActionsClassNames);
+ }
+ };
+ plus.setOutputMarkupPlaceholderTag(true);
+ plus.setVisible(item.getIndex() == taskTO.getActionsClassNames().size() - 1);
+ item.add(plus);
+ }
+ };
+ syncActionsClassNames.add(actionsClasses);
+
+ syncActionsClassNames.setEnabled(!syncActionsClasses.getObject().isEmpty());
+
+ final AjaxCheckBoxPanel creates = new AjaxCheckBoxPanel("performCreate", getString("creates"),
+ new PropertyModel<Boolean>(taskTO, "performCreate"));
+ profile.add(creates);
+
+ final AjaxCheckBoxPanel updates = new AjaxCheckBoxPanel("performUpdate", getString("updates"),
+ new PropertyModel<Boolean>(taskTO, "performUpdate"));
+ profile.add(updates);
+
+ final AjaxCheckBoxPanel deletes = new AjaxCheckBoxPanel("performDelete", getString("updates"),
+ new PropertyModel<Boolean>(taskTO, "performDelete"));
+ profile.add(deletes);
+
+ final AjaxCheckBoxPanel syncStatus = new AjaxCheckBoxPanel("syncStatus", getString("syncStatus"),
+ new PropertyModel<Boolean>(taskTO, "syncStatus"));
+ profile.add(syncStatus);
+
+ matchingRule = new AjaxDropDownChoicePanel<MatchingRule>(
+ "matchingRule", "matchingRule", new PropertyModel<MatchingRule>(taskTO, "matchingRule"));
+ matchingRule.setChoices(Arrays.asList(MatchingRule.values()));
+ ((DropDownChoice) matchingRule.getField()).setNullValid(false);
+
+ unmatchingRule = new AjaxDropDownChoicePanel<UnmatchingRule>(
+ "unmatchingRule", "unmatchingRule", new PropertyModel<UnmatchingRule>(taskTO, "unmatchingRule"));
+ unmatchingRule.setChoices(Arrays.asList(UnmatchingRule.values()));
+ ((DropDownChoice) unmatchingRule.getField()).setNullValid(false);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ActivitiModelerPopupPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ActivitiModelerPopupPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ActivitiModelerPopupPage.java
new file mode 100644
index 0000000..05658fc
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ActivitiModelerPopupPage.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.wicket.markup.html.WebPage;
+
+public class ActivitiModelerPopupPage extends WebPage {
+
+ private static final long serialVersionUID = -7031206743629422898L;
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ApprovalModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ApprovalModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ApprovalModalPage.java
new file mode 100644
index 0000000..79deeb0
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ApprovalModalPage.java
@@ -0,0 +1,286 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.io.Serializable;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.math.NumberUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.MapChoiceRenderer;
+import org.apache.syncope.client.console.rest.ApprovalRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.DateTimeFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.list.AltListView;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.WorkflowFormPropertyTO;
+import org.apache.syncope.common.lib.to.WorkflowFormTO;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class ApprovalModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = -8847854414429745216L;
+
+ private final static int USER_WIN_HEIGHT = 550;
+
+ private final static int USER_WIN_WIDTH = 800;
+
+ @SpringBean
+ private ApprovalRestClient restClient;
+
+ private final ModalWindow editUserWin;
+
+ public ApprovalModalPage(final PageReference pageRef, final ModalWindow window, final WorkflowFormTO formTO) {
+ super();
+
+ IModel<List<WorkflowFormPropertyTO>> formProps = new LoadableDetachableModel<List<WorkflowFormPropertyTO>>() {
+
+ private static final long serialVersionUID = 3169142472626817508L;
+
+ @Override
+ protected List<WorkflowFormPropertyTO> load() {
+ return formTO.getProperties();
+ }
+ };
+
+ final ListView<WorkflowFormPropertyTO> propView =
+ new AltListView<WorkflowFormPropertyTO>("propView", formProps) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ protected void populateItem(final ListItem<WorkflowFormPropertyTO> item) {
+ final WorkflowFormPropertyTO prop = item.getModelObject();
+
+ Label label = new Label("key", prop.getName() == null
+ ? prop.getId()
+ : prop.getName());
+ item.add(label);
+
+ FieldPanel field;
+ switch (prop.getType()) {
+ case Boolean:
+ field = new AjaxDropDownChoicePanel("value", label.getDefaultModelObjectAsString(),
+ new Model<Boolean>(Boolean.valueOf(prop.getValue()))).setChoices(Arrays.asList(
+ new String[] { "Yes", "No" }));
+ break;
+
+ case Date:
+ SimpleDateFormat df = StringUtils.isNotBlank(prop.getDatePattern())
+ ? new SimpleDateFormat(prop.getDatePattern())
+ : new SimpleDateFormat();
+ Date parsedDate = null;
+ if (StringUtils.isNotBlank(prop.getValue())) {
+ try {
+ parsedDate = df.parse(prop.getValue());
+ } catch (ParseException e) {
+ LOG.error("Unparsable date: {}", prop.getValue(), e);
+ }
+ }
+
+ field = new DateTimeFieldPanel("value", label.getDefaultModelObjectAsString(),
+ new Model<Date>(parsedDate), df.toLocalizedPattern());
+ break;
+
+ case Enum:
+ MapChoiceRenderer<String, String> enumCR =
+ new MapChoiceRenderer<String, String>(prop.getEnumValues());
+
+ field = new AjaxDropDownChoicePanel("value", label.getDefaultModelObjectAsString(),
+ new Model(prop.getValue())).setChoiceRenderer(enumCR).setChoices(new Model() {
+
+ private static final long serialVersionUID = -858521070366432018L;
+
+ @Override
+ public Serializable getObject() {
+ return new ArrayList<String>(prop.getEnumValues().keySet());
+ }
+ });
+ break;
+
+ case Long:
+ field = new SpinnerFieldPanel<Long>("value", label.getDefaultModelObjectAsString(),
+ Long.class, new Model<Long>(NumberUtils.toLong(prop.getValue())),
+ null, null);
+ break;
+
+ case String:
+ default:
+ field = new AjaxTextFieldPanel("value", PARENT_PATH,
+ new Model<String>(prop.getValue()));
+ break;
+ }
+
+ field.setReadOnly(!prop.isWritable());
+ if (prop.isRequired()) {
+ field.addRequiredLabel();
+ }
+
+ item.add(field);
+ }
+ };
+
+ final AjaxButton userDetails = new IndicatingAjaxButton("userDetails",
+ new Model<String>(getString("userDetails"))) {
+
+ private static final long serialVersionUID = -4804368561204623354L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ editUserWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ViewUserModalPage(ApprovalModalPage.this.getPageReference(), editUserWin,
+ userRestClient.read(formTO.getUserKey())) {
+
+ private static final long serialVersionUID = -2819994749866481607L;
+
+ @Override
+ protected void closeAction(final AjaxRequestTarget target, final Form form) {
+ setResponsePage(ApprovalModalPage.this);
+ }
+ };
+ }
+ });
+
+ editUserWin.show(target);
+ }
+ };
+ MetaDataRoleAuthorizationStrategy.authorize(userDetails, ENABLE,
+ xmlRolesReader.getEntitlement("Users", "read"));
+
+ final AjaxButton submit = new IndicatingAjaxButton(APPLY, new Model<String>(getString(SUBMIT))) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+
+ Map<String, WorkflowFormPropertyTO> props = formTO.getPropertyMap();
+
+ for (int i = 0; i < propView.size(); i++) {
+ @SuppressWarnings("unchecked")
+ ListItem<WorkflowFormPropertyTO> item = (ListItem<WorkflowFormPropertyTO>) propView.get(i);
+ String input = ((FieldPanel) item.get("value")).getField().getInput();
+
+ if (!props.containsKey(item.getModelObject().getId())) {
+ props.put(item.getModelObject().getId(), new WorkflowFormPropertyTO());
+ }
+
+ if (item.getModelObject().isWritable()) {
+ switch (item.getModelObject().getType()) {
+ case Boolean:
+ props.get(item.getModelObject().getId()).setValue(String.valueOf("0".equals(input)));
+ break;
+
+ case Date:
+ case Enum:
+ case String:
+ case Long:
+ default:
+ props.get(item.getModelObject().getId()).setValue(input);
+ break;
+ }
+ }
+ }
+
+ formTO.getProperties().clear();
+ formTO.getProperties().addAll(props.values());
+ try {
+ restClient.submitForm(formTO);
+
+ ((Todo) pageRef.getPage()).setModalResult(true);
+ window.close(target);
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ LOG.error("While submitting form {}", formTO, e);
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+
+ final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form form) {
+ window.close(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form form) {
+ // nothing
+ }
+ };
+
+ cancel.setDefaultFormProcessing(false);
+
+ Form form = new Form(FORM);
+ form.add(propView);
+ form.add(userDetails);
+ form.add(submit);
+ form.add(cancel);
+
+ MetaDataRoleAuthorizationStrategy.authorize(form, ENABLE, xmlRolesReader.getEntitlement("Approval",
+ SUBMIT));
+
+ editUserWin = new ModalWindow("editUserWin");
+ editUserWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editUserWin.setInitialHeight(USER_WIN_HEIGHT);
+ editUserWin.setInitialWidth(USER_WIN_WIDTH);
+ editUserWin.setCookieName("edit-user-modal");
+ add(editUserWin);
+
+ add(form);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/BaseModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BaseModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BaseModalPage.java
new file mode 100644
index 0000000..20892dd
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BaseModalPage.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.CloseOnESCBehavior;
+
+/**
+ * Syncope Modal Window.
+ */
+public abstract class BaseModalPage extends AbstractBasePage {
+
+ private static final long serialVersionUID = -1443079028368471943L;
+
+ public BaseModalPage() {
+ super();
+
+ add(new CloseOnESCBehavior("keyup"));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
new file mode 100644
index 0000000..2540c37
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.SyncopeApplication;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.IAjaxIndicatorAware;
+import org.apache.wicket.behavior.Behavior;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+/**
+ * Syncope Wicket base-page.
+ */
+public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
+
+ private static final long serialVersionUID = 1571997737305598502L;
+
+ public BasePage() {
+ this(null);
+ }
+
+ public BasePage(final PageParameters parameters) {
+ super(parameters);
+
+ pageSetup();
+ }
+
+ private void pageSetup() {
+ ((SyncopeApplication) getApplication()).setupNavigationPanel(this, xmlRolesReader, true);
+
+ final String kind = getClass().getSimpleName().toLowerCase();
+ final BookmarkablePageLink kindLink = (BookmarkablePageLink) get(kind);
+ if (kindLink != null) {
+ kindLink.add(new Behavior() {
+
+ private static final long serialVersionUID = 1469628524240283489L;
+
+ @Override
+ public void onComponentTag(final Component component, final ComponentTag tag) {
+ tag.put("class", kind);
+ }
+ });
+
+ Component kindIcon = kindLink.get(0);
+ if (kindIcon != null) {
+ kindIcon.add(new Behavior() {
+
+ private static final long serialVersionUID = 1469628524240283489L;
+
+ @Override
+ public void onComponentTag(final Component component, final ComponentTag tag) {
+ tag.put("src", "../.." + SyncopeApplication.IMG_PREFIX + kind + Constants.PNG_EXT);
+ }
+ });
+ }
+ }
+
+ ((SyncopeApplication) getApplication()).setupEditProfileModal(this, userSelfRestClient);
+ }
+
+ @Override
+ public String getAjaxIndicatorMarkupId() {
+ return "veil";
+ }
+
+ /**
+ * Set a WindowClosedCallback for a ModalWindow instance.
+ *
+ * @param window window
+ * @param container container
+ */
+ protected void setWindowClosedCallback(final ModalWindow window, final WebMarkupContainer container) {
+
+ window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ target.add(container);
+ if (isModalResult()) {
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ feedbackPanel.refresh(target);
+ setModalResult(false);
+ }
+ }
+ });
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePopupPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePopupPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePopupPage.java
new file mode 100644
index 0000000..856f469
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePopupPage.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+public class BasePopupPage extends AbstractBasePage {
+
+ private static final long serialVersionUID = -2633667311332659505L;
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java
new file mode 100644
index 0000000..95e514b
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.rest.BaseRestClient;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.to.BulkAction;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.springframework.beans.BeanUtils;
+
+public class BulkActionModalPage<T, S> extends BaseModalPage {
+
+ private static final long serialVersionUID = 4114026480146090962L;
+
+ public BulkActionModalPage(
+ final ModalWindow window,
+ final Collection<T> items,
+ final List<IColumn<T, S>> columns,
+ final Collection<ActionLink.ActionType> actions,
+ final BaseRestClient bulkActionExecutor,
+ final String idFieldName,
+ final String pageId) {
+
+ super();
+
+ final SortableDataProvider<T, S> dataProvider = new SortableDataProvider<T, S>() {
+
+ private static final long serialVersionUID = 5291903859908641954L;
+
+ @Override
+ public Iterator<? extends T> iterator(final long first, final long count) {
+ return items.iterator();
+ }
+
+ @Override
+ public long size() {
+ return items.size();
+ }
+
+ @Override
+ public IModel<T> model(final T object) {
+ return new CompoundPropertyModel<>(object);
+ }
+ };
+
+ add(new AjaxFallbackDefaultDataTable<>(
+ "selectedObjects",
+ new ArrayList<>(columns.subList(1, columns.size() - 1)),
+ dataProvider,
+ Integer.MAX_VALUE).setVisible(items != null && !items.isEmpty()));
+
+ @SuppressWarnings("rawtypes")
+ final ActionLinksPanel actionPanel = new ActionLinksPanel("actions", new Model(), getPageReference());
+ add(actionPanel);
+
+ for (ActionLink.ActionType action : actions) {
+ final BulkAction bulkAction = new BulkAction();
+ for (T item : items) {
+ try {
+ bulkAction.getTargets().add(getTargetId(item, idFieldName).toString());
+ } catch (Exception e) {
+ LOG.error("Error retrieving item id {}", idFieldName, e);
+ }
+ }
+
+ switch (action) {
+ case DELETE:
+ bulkAction.setOperation(BulkAction.Type.DELETE);
+ break;
+ case SUSPEND:
+ bulkAction.setOperation(BulkAction.Type.SUSPEND);
+ break;
+ case REACTIVATE:
+ bulkAction.setOperation(BulkAction.Type.REACTIVATE);
+ break;
+ case EXECUTE:
+ bulkAction.setOperation(BulkAction.Type.EXECUTE);
+ break;
+ case DRYRUN:
+ bulkAction.setOperation(BulkAction.Type.DRYRUN);
+ break;
+ default:
+ LOG.error("Bulk action type not supported");
+ }
+
+ actionPanel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ final BulkActionResult res = (BulkActionResult) bulkActionExecutor.getClass().
+ getMethod("bulkAction", BulkAction.class).invoke(bulkActionExecutor, bulkAction);
+
+ setResponsePage(new BulkActionResultModalPage<>(window, items, columns, res, idFieldName));
+ } catch (Exception e) {
+ error(getString(Constants.ERROR)
+ + ": Operation " + bulkAction.getOperation() + " not supported");
+ feedbackPanel.refresh(target);
+ }
+
+ }
+ }, action, pageId, !items.isEmpty());
+ }
+
+ final Form<Void> form = new Form<>(FORM);
+ add(form);
+
+ final AjaxButton cancel =
+ new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), getPageReference()) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+ };
+
+ cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
+ }
+
+ private Object getTargetId(final Object target, final String idFieldName)
+ throws IllegalAccessException, InvocationTargetException {
+
+ return BeanUtils.getPropertyDescriptor(target.getClass(), idFieldName).
+ getReadMethod().invoke(target, new Object[0]);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionResultModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionResultModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionResultModalPage.java
new file mode 100644
index 0000000..4ada6ba
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionResultModalPage.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionResultColumn;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+
+/**
+ * Show user or role status after performing a successful operation.
+ */
+public class BulkActionResultModalPage<T, S> extends BaseModalPage {
+
+ /**
+ * Serial version id.
+ */
+ private static final long serialVersionUID = 2646115294319713724L;
+
+ public BulkActionResultModalPage(
+ final ModalWindow window,
+ final Collection<T> items,
+ final List<IColumn<T, S>> columns,
+ final BulkActionResult results,
+ final String idFieldName) {
+
+ super();
+
+ final List<IColumn<T, S>> newColumnList = new ArrayList<>(columns.subList(1, columns.size() - 1));
+ newColumnList.add(newColumnList.size(), new ActionResultColumn<T, S>(results, idFieldName));
+
+ final SortableDataProvider<T, S> dataProvider = new SortableDataProvider<T, S>() {
+
+ private static final long serialVersionUID = 5291903859908641954L;
+
+ @Override
+ public Iterator<? extends T> iterator(final long first, final long count) {
+ return items.iterator();
+ }
+
+ @Override
+ public long size() {
+ return items.size();
+ }
+
+ @Override
+ public IModel<T> model(final T object) {
+ return new CompoundPropertyModel<T>(object);
+ }
+ };
+
+ add(new AjaxFallbackDefaultDataTable<T, S>(
+ "selectedObjects",
+ newColumnList,
+ dataProvider,
+ Integer.MAX_VALUE).setVisible(items != null && !items.isEmpty()));
+
+ final AjaxLink<Void> close = new IndicatingAjaxLink<Void>("close") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ window.close(target);
+ }
+ };
+
+ add(close);
+ }
+}
[41/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ReportModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ReportModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ReportModalPage.java
new file mode 100644
index 0000000..0ef7c6a
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ReportModalPage.java
@@ -0,0 +1,640 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.DateFormatROModel;
+import org.apache.syncope.client.console.commons.HttpResourceStream;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.wicket.ajax.form.AbstractAjaxDownloadBehavior;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.client.console.wicket.markup.html.CrontabContainer;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.report.AbstractReportletConf;
+import org.apache.syncope.common.lib.report.ReportletConf;
+import org.apache.syncope.common.lib.to.ReportExecTO;
+import org.apache.syncope.common.lib.to.ReportTO;
+import org.apache.syncope.common.lib.types.ReportExecExportFormat;
+import org.apache.syncope.common.lib.types.ReportExecStatus;
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.attributes.AjaxCallListener;
+import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+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.util.SortableDataProvider;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.markup.html.form.ListChoice;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.util.resource.IResourceStream;
+import org.springframework.util.StringUtils;
+
+public class ReportModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = -5747628615211127644L;
+
+ private static final String ADD_BUTTON_ID = "addButton";
+
+ private static final String EDIT_BUTTON_ID = "editButton";
+
+ private static final String REMOVE_BUTTON_ID = "removeButton";
+
+ private static final String UP_BUTTON_ID = "upButton";
+
+ private static final String DOWN_BUTTON_ID = "downButton";
+
+ private static final int EXEC_EXPORT_WIN_HEIGHT = 100;
+
+ private static final int EXEC_EXPORT_WIN_WIDTH = 400;
+
+ private static final int REPORTLET_CONF_WIN_HEIGHT = 500;
+
+ private static final int REPORTLET_CONF_WIN_WIDTH = 800;
+
+ private final ReportTO reportTO;
+
+ private final Form<ReportTO> form;
+
+ private ReportExecExportFormat exportFormat;
+
+ private long exportExecId;
+
+ private AbstractReportletConf modalReportletConf;
+
+ private String modalReportletConfOldName;
+
+ private ListChoice<AbstractReportletConf> reportlets;
+
+ public ReportModalPage(final ModalWindow window, final ReportTO reportTO, final PageReference callerPageRef) {
+ super();
+ this.reportTO = reportTO;
+
+ form = new Form<ReportTO>(FORM);
+ form.setModel(new CompoundPropertyModel<ReportTO>(reportTO));
+ add(form);
+
+ setupProfile();
+ setupExecutions();
+
+ final CrontabContainer crontab = new CrontabContainer("crontab", new PropertyModel<String>(reportTO,
+ "cronExpression"), reportTO.getCronExpression());
+ form.add(crontab);
+
+ final AjaxButton submit =
+ new ClearIndicatingAjaxButton(APPLY, new ResourceModel(APPLY), getPageReference()) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ ReportTO toSubmit = (ReportTO) form.getModelObject();
+ toSubmit.setCronExpression(StringUtils.hasText(toSubmit.getCronExpression())
+ ? crontab.getCronExpression()
+ : null);
+
+ try {
+ if (toSubmit.getKey() > 0) {
+ reportRestClient.update(toSubmit);
+ } else {
+ reportRestClient.create(toSubmit);
+ }
+
+ ((BasePage) callerPageRef.getPage()).setModalResult(true);
+
+ window.close(target);
+ } catch (SyncopeClientException e) {
+ LOG.error("While creating or updating report", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+
+ if (reportTO.getKey() > 0) {
+ MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER,
+ xmlRolesReader.getEntitlement("Reports", "update"));
+ } else {
+ MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER,
+ xmlRolesReader.getEntitlement("Reports", "create"));
+ }
+
+ form.add(submit);
+
+ final AjaxButton cancel =
+ new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), getPageReference()) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+ };
+
+ cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
+ }
+
+ private void setupProfile() {
+ final WebMarkupContainer profile = new WebMarkupContainer("profile");
+ profile.setOutputMarkupId(true);
+ form.add(profile);
+
+ final ModalWindow reportletConfWin = new ModalWindow("reportletConfWin");
+ reportletConfWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ reportletConfWin.setCookieName("reportlet-conf-win-modal");
+ reportletConfWin.setInitialHeight(REPORTLET_CONF_WIN_HEIGHT);
+ reportletConfWin.setInitialWidth(REPORTLET_CONF_WIN_WIDTH);
+ reportletConfWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ int foundIdx = -1;
+ if (modalReportletConfOldName != null) {
+ for (int i = 0; i < reportTO.getReportletConfs().size() && foundIdx == -1; i++) {
+ if (reportTO.getReportletConfs().get(i).getName().equals(modalReportletConfOldName)) {
+ foundIdx = i;
+ }
+ }
+ }
+ if (modalReportletConf != null) {
+ if (foundIdx == -1) {
+ reportTO.getReportletConfs().add(modalReportletConf);
+ } else {
+ reportTO.getReportletConfs().set(foundIdx, modalReportletConf);
+ }
+ }
+
+ target.add(reportlets);
+ }
+ });
+ add(reportletConfWin);
+
+ final Label idLabel = new Label("idLabel", new ResourceModel("key"));
+ profile.add(idLabel);
+
+ final AjaxTextFieldPanel key =
+ new AjaxTextFieldPanel("key", getString("key"), new PropertyModel<String>(reportTO, "key"));
+ key.setEnabled(false);
+ profile.add(key);
+
+ final Label nameLabel = new Label("nameLabel", new ResourceModel("name"));
+ profile.add(nameLabel);
+
+ final AjaxTextFieldPanel name =
+ new AjaxTextFieldPanel("name", getString("name"), new PropertyModel<String>(reportTO, "name"));
+ profile.add(name);
+
+ final AjaxTextFieldPanel lastExec = new AjaxTextFieldPanel("lastExec", getString("lastExec"),
+ new DateFormatROModel(new PropertyModel<String>(reportTO, "lastExec")));
+ lastExec.setEnabled(false);
+ profile.add(lastExec);
+
+ final AjaxTextFieldPanel nextExec = new AjaxTextFieldPanel("nextExec", getString("nextExec"),
+ new DateFormatROModel(new PropertyModel<String>(reportTO, "nextExec")));
+ nextExec.setEnabled(false);
+ profile.add(nextExec);
+
+ reportlets = new ListChoice<AbstractReportletConf>("reportletConfs", new Model<AbstractReportletConf>(),
+ reportTO.getReportletConfs(), new IChoiceRenderer<ReportletConf>() {
+
+ private static final long serialVersionUID = 1048000918946220007L;
+
+ @Override
+ public Object getDisplayValue(final ReportletConf object) {
+ return object.getName();
+ }
+
+ @Override
+ public String getIdValue(final ReportletConf object, final int index) {
+ return object.getName();
+ }
+ }) {
+
+ private static final long serialVersionUID = 4022366881854379834L;
+
+ @Override
+ protected CharSequence getDefaultChoice(final String selectedValue) {
+ return null;
+ }
+ };
+
+ reportlets.setNullValid(true);
+ profile.add(reportlets);
+ reportlets.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ target.add(reportlets);
+ }
+ });
+
+ profile.add(new AjaxLink<Void>(ADD_BUTTON_ID) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ reportletConfWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ modalReportletConfOldName = null;
+ modalReportletConf = null;
+ return new ReportletConfModalPage(null, reportletConfWin,
+ ReportModalPage.this.getPageReference());
+ }
+ });
+ reportletConfWin.show(target);
+ }
+ });
+
+ profile.add(new AjaxLink<Void>(EDIT_BUTTON_ID) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (reportlets.getModelObject() != null) {
+ reportletConfWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ modalReportletConfOldName = reportlets.getModelObject().getName();
+ modalReportletConf = null;
+ return new ReportletConfModalPage(reportlets.getModelObject(), reportletConfWin,
+ ReportModalPage.this.getPageReference());
+ }
+ });
+ reportletConfWin.show(target);
+ }
+ }
+ });
+
+ profile.add(new AjaxLink<Void>(REMOVE_BUTTON_ID) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ reportTO.getReportletConfs().remove(reportlets.getModelObject());
+ reportlets.setModelObject(null);
+ target.add(reportlets);
+ }
+
+ @Override
+ protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
+ if (reportlets.getModelObject() != null) {
+
+ super.updateAjaxAttributes(attributes);
+
+ final AjaxCallListener ajaxCallListener = new AjaxCallListener() {
+
+ private static final long serialVersionUID = 7160235486520935153L;
+
+ @Override
+ public CharSequence getPrecondition(final Component component) {
+ return "if (!confirm('" + getString("confirmDelete") + "')) {return false;}";
+ }
+ };
+ attributes.getAjaxCallListeners().add(ajaxCallListener);
+ }
+ }
+ });
+
+ profile.add(new AjaxLink<Void>(UP_BUTTON_ID) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (reportlets.getModelObject() != null) {
+ moveUp(reportlets.getModelObject());
+ target.add(reportlets);
+ }
+ }
+ });
+
+ profile.add(new AjaxLink<Void>(DOWN_BUTTON_ID) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (reportlets.getModelObject() != null) {
+ moveDown(reportlets.getModelObject());
+ target.add(reportlets);
+ }
+ }
+ });
+ }
+
+ private void moveUp(final AbstractReportletConf item) {
+ final List<AbstractReportletConf> list = reportTO.getReportletConfs();
+ int newPosition = list.indexOf(item) - 1;
+ if (newPosition > -1) {
+ list.remove(item);
+ list.add(newPosition, item);
+ }
+ }
+
+ private void moveDown(final AbstractReportletConf item) {
+ final List<AbstractReportletConf> list = reportTO.getReportletConfs();
+ int newPosition = list.indexOf(item) + 1;
+ if (newPosition < list.size()) {
+ list.remove(item);
+ list.add(newPosition, item);
+ }
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ private void setupExecutions() {
+ final WebMarkupContainer executions = new WebMarkupContainer("executionContainer");
+ executions.setOutputMarkupId(true);
+ form.add(executions);
+
+ final ModalWindow reportExecMessageWin = new ModalWindow("reportExecMessageWin");
+ reportExecMessageWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ reportExecMessageWin.setCookieName("report-exec-message-win-modal");
+ add(reportExecMessageWin);
+
+ final ModalWindow reportExecExportWin = new ModalWindow("reportExecExportWin");
+ reportExecExportWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ reportExecExportWin.setCookieName("report-exec-export-win-modal");
+ reportExecExportWin.setInitialHeight(EXEC_EXPORT_WIN_HEIGHT);
+ reportExecExportWin.setInitialWidth(EXEC_EXPORT_WIN_WIDTH);
+ reportExecExportWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ AjaxExportDownloadBehavior behavior = new AjaxExportDownloadBehavior(ReportModalPage.this.exportFormat,
+ ReportModalPage.this.exportExecId);
+ executions.add(behavior);
+ behavior.initiate(target);
+ }
+ });
+ add(reportExecExportWin);
+
+ final List<IColumn> columns = new ArrayList<IColumn>();
+ columns.add(new PropertyColumn(new ResourceModel("key"), "key", "key"));
+ columns.add(new DatePropertyColumn(new ResourceModel("startDate"), "startDate", "startDate"));
+ columns.add(new DatePropertyColumn(new ResourceModel("endDate"), "endDate", "endDate"));
+ columns.add(new PropertyColumn(new ResourceModel("status"), "status", "status"));
+ columns.add(new ActionColumn<ReportExecTO, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public ActionLinksPanel getActions(final String componentId, final IModel<ReportExecTO> model) {
+
+ final ReportExecTO taskExecutionTO = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ reportExecMessageWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ExecMessageModalPage(model.getObject().getMessage());
+ }
+ });
+ reportExecMessageWin.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, "Reports", StringUtils.hasText(model.getObject().getMessage()));
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ reportExecExportWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ ReportModalPage.this.exportExecId = model.getObject().getKey();
+ return new ReportExecResultDownloadModalPage(reportExecExportWin,
+ ReportModalPage.this.getPageReference());
+ }
+ });
+ reportExecExportWin.show(target);
+ }
+ }, ActionLink.ActionType.EXPORT, "Reports", ReportExecStatus.SUCCESS.name().equals(
+ model.getObject().getStatus()));
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ reportRestClient.deleteExecution(taskExecutionTO.getKey());
+
+ reportTO.getExecutions().remove(taskExecutionTO);
+
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+
+ feedbackPanel.refresh(target);
+ target.add(executions);
+ }
+ }, ActionLink.ActionType.DELETE, "Reports");
+
+ return panel;
+ }
+
+ @Override
+ public Component getHeader(final String componentId) {
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(), getPageReference());
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (target != null) {
+ final ReportTO currentReportTO = reportTO.getKey() == 0
+ ? reportTO
+ : reportRestClient.read(reportTO.getKey());
+ reportTO.getExecutions().clear();
+ reportTO.getExecutions().addAll(currentReportTO.getExecutions());
+ final AjaxFallbackDefaultDataTable currentTable =
+ new AjaxFallbackDefaultDataTable("executionsTable", columns,
+ new ReportExecutionsProvider(reportTO), 10);
+ currentTable.setOutputMarkupId(true);
+ target.add(currentTable);
+ executions.addOrReplace(currentTable);
+ }
+ }
+ }, ActionLink.ActionType.RELOAD, TASKS, "list");
+
+ return panel;
+ }
+ });
+
+ final AjaxFallbackDefaultDataTable table = new AjaxFallbackDefaultDataTable("executionsTable", columns,
+ new ReportExecutionsProvider(reportTO), 10);
+ executions.add(table);
+ }
+
+ public void setExportFormat(final ReportExecExportFormat exportFormat) {
+ this.exportFormat = exportFormat;
+ }
+
+ public void setModalReportletConf(final AbstractReportletConf modalReportletConf) {
+ this.modalReportletConf = modalReportletConf;
+ }
+
+ private static class ReportExecutionsProvider extends SortableDataProvider<ReportExecTO, String> {
+
+ private static final long serialVersionUID = 2118096121691420539L;
+
+ private final SortableDataProviderComparator<ReportExecTO> comparator;
+
+ private final ReportTO reportTO;
+
+ public ReportExecutionsProvider(final ReportTO reportTO) {
+ super();
+ this.reportTO = reportTO;
+ setSort("startDate", SortOrder.DESCENDING);
+ comparator = new SortableDataProviderComparator<ReportExecTO>(this);
+ }
+
+ @Override
+ public Iterator<ReportExecTO> iterator(final long first, final long count) {
+
+ List<ReportExecTO> list = reportTO.getExecutions();
+
+ Collections.sort(list, comparator);
+
+ return list.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return reportTO.getExecutions().size();
+ }
+
+ @Override
+ public IModel<ReportExecTO> model(final ReportExecTO taskExecution) {
+
+ return new AbstractReadOnlyModel<ReportExecTO>() {
+
+ private static final long serialVersionUID = 7485475149862342421L;
+
+ @Override
+ public ReportExecTO getObject() {
+ return taskExecution;
+ }
+ };
+ }
+ }
+
+ private class AjaxExportDownloadBehavior extends AbstractAjaxDownloadBehavior {
+
+ private static final long serialVersionUID = 3109256773218160485L;
+
+ private final ReportExecExportFormat exportFormat;
+
+ private final long exportExecId;
+
+ private HttpResourceStream stream;
+
+ public AjaxExportDownloadBehavior(final ReportExecExportFormat exportFormat, final long exportExecId) {
+ super();
+ this.exportFormat = exportFormat;
+ this.exportExecId = exportExecId;
+ }
+
+ private void createResourceStream() {
+ if (stream == null) {
+ stream = new HttpResourceStream(reportRestClient.exportExecutionResult(exportExecId, exportFormat));
+ }
+ }
+
+ @Override
+ protected String getFileName() {
+ createResourceStream();
+ return stream == null
+ ? null
+ : stream.getFilename();
+ }
+
+ @Override
+ protected IResourceStream getResourceStream() {
+ createResourceStream();
+ return stream;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ReportletConfModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ReportletConfModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ReportletConfModalPage.java
new file mode 100644
index 0000000..e7155ca
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ReportletConfModalPage.java
@@ -0,0 +1,362 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.ParameterizedType;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.RoleSearchPanel;
+import org.apache.syncope.client.console.panels.UserSearchPanel;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.CheckBoxMultipleChoiceFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.DateTimeFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
+import org.apache.syncope.common.lib.SyncopeConstants;
+import org.apache.syncope.common.lib.annotation.FormAttributeField;
+import org.apache.syncope.common.lib.report.AbstractReportletConf;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.wicket.Component;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.model.util.ListModel;
+import org.apache.wicket.util.visit.IVisit;
+import org.apache.wicket.util.visit.IVisitor;
+import org.springframework.beans.BeanWrapper;
+import org.springframework.beans.PropertyAccessorFactory;
+import org.springframework.util.ClassUtils;
+
+public class ReportletConfModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 3910027601200382958L;
+
+ private static final String[] EXCLUDE_PROPERTIES =
+ new String[] { "serialVersionUID", "class", "name", "reportletClassName" };
+
+ private AbstractReportletConf reportletConf;
+
+ private final AjaxTextFieldPanel name;
+
+ private WebMarkupContainer propertiesContainer;
+
+ private ListView<String> propView;
+
+ public ReportletConfModalPage(final AbstractReportletConf reportletConf, final ModalWindow window,
+ final PageReference pageRef) {
+
+ this.reportletConf = reportletConf;
+
+ final Form form = new Form(FORM);
+ add(form);
+
+ propertiesContainer = new WebMarkupContainer("container");
+ propertiesContainer.setOutputMarkupId(true);
+ form.add(propertiesContainer);
+
+ name = new AjaxTextFieldPanel("name", "name", this.reportletConf == null
+ ? new Model<String>()
+ : new PropertyModel<String>(this.reportletConf, "name"));
+ name.setOutputMarkupId(true);
+ name.addRequiredLabel();
+ form.add(name);
+
+ final AjaxDropDownChoicePanel<String> reportletClass = new AjaxDropDownChoicePanel<String>("reportletClass",
+ "reportletClass", new IModel<String>() {
+
+ private static final long serialVersionUID = -2316468110411802130L;
+
+ @Override
+ public String getObject() {
+ return ReportletConfModalPage.this.reportletConf == null
+ ? null
+ : ReportletConfModalPage.this.reportletConf.getClass().getName();
+ }
+
+ @Override
+ public void setObject(final String object) {
+ try {
+ Class<?> reportletClass = Class.forName(object);
+ ReportletConfModalPage.this.reportletConf = (AbstractReportletConf) reportletClass.
+ newInstance();
+ propertiesContainer.replace(buildPropView());
+ } catch (Exception e) {
+ LOG.error("Cannot find or initialize {}", object, e);
+ }
+ }
+
+ @Override
+ public void detach() {
+ }
+ });
+ reportletClass.setStyleSheet("long_dynamicsize");
+ reportletClass.setChoices(reportRestClient.getReportletConfClasses());
+ ((DropDownChoice) reportletClass.getField()).setNullValid(true);
+ reportletClass.addRequiredLabel();
+ reportletClass.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = 5538299138211283825L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ ((DropDownChoice) reportletClass.getField()).setNullValid(false);
+ target.add(reportletClass.getField());
+ target.add(propertiesContainer);
+ }
+ });
+ form.add(reportletClass);
+
+ propertiesContainer.add(buildPropView());
+
+ final AjaxButton submit = new AjaxButton(APPLY, new ResourceModel(APPLY)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ final BeanWrapper wrapper = PropertyAccessorFactory.
+ forBeanPropertyAccess(ReportletConfModalPage.this.reportletConf);
+ wrapper.setPropertyValue("name", name.getField().getInput());
+
+ // Iterate over properties in order to find UserSearchPanel instances and manually update
+ // this.reportletConf with select search criteria - this is needed because UserSearchPanel
+ // does not comply with usual Wicket model paradigm.
+ ReportletConfModalPage.this.propView.visitChildren(new IVisitor<Component, Void>() {
+
+ @Override
+ public void component(final Component component, final IVisit<Void> ivisit) {
+ if (component instanceof UserSearchPanel) {
+ // using component.getDefaultModelObjectAsString() to fetch field name (set above)
+ wrapper.setPropertyValue(component.getDefaultModelObjectAsString(),
+ ((UserSearchPanel) component).buildFIQL());
+ }
+ }
+ });
+
+ ((ReportModalPage) pageRef.getPage()).setModalReportletConf(ReportletConfModalPage.this.reportletConf);
+ window.close(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+ form.add(submit);
+
+ final AjaxButton cancel = new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), pageRef) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+ };
+
+ cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ private FieldPanel buildSinglePanel(final Class<?> type, final String fieldName, final String id) {
+ FieldPanel result = null;
+ PropertyModel model = new PropertyModel(ReportletConfModalPage.this.reportletConf, fieldName);
+ if (ClassUtils.isAssignable(Boolean.class, type)) {
+ result = new AjaxCheckBoxPanel(id, fieldName, model);
+ } else if (ClassUtils.isAssignable(Number.class, type)) {
+ result = new SpinnerFieldPanel<Number>(id, fieldName,
+ (Class<Number>) ClassUtils.resolvePrimitiveIfNecessary(type), model, null, null);
+ } else if (Date.class.equals(type)) {
+ result = new DateTimeFieldPanel(id, fieldName, model, SyncopeConstants.DEFAULT_DATE_PATTERN);
+ } else if (type.isEnum()) {
+ result = new AjaxDropDownChoicePanel(id, fieldName, model).setChoices(
+ Arrays.asList(type.getEnumConstants()));
+ }
+
+ // treat as String if nothing matched above
+ if (result == null) {
+ result = new AjaxTextFieldPanel(id, fieldName, model);
+ }
+
+ return result;
+ }
+
+ private ListView<String> buildPropView() {
+ LoadableDetachableModel<List<String>> propViewModel = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ List<String> result = new ArrayList<String>();
+ if (ReportletConfModalPage.this.reportletConf != null) {
+ for (Field field : ReportletConfModalPage.this.reportletConf.getClass().getDeclaredFields()) {
+ if (!ArrayUtils.contains(EXCLUDE_PROPERTIES, field.getName())) {
+ result.add(field.getName());
+ }
+ }
+ }
+
+ return result;
+ }
+ };
+
+ propView = new ListView<String>("propView", propViewModel) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @Override
+ protected void populateItem(final ListItem<String> item) {
+ final String fieldName = item.getModelObject();
+
+ Label label = new Label("key", fieldName);
+ item.add(label);
+
+ Field field = null;
+ try {
+ field = ReportletConfModalPage.this.reportletConf.getClass().getDeclaredField(fieldName);
+ } catch (Exception e) {
+ LOG.error("Could not find field {} in class {}",
+ fieldName, ReportletConfModalPage.this.reportletConf.getClass(), e);
+ }
+ if (field == null) {
+ return;
+ }
+
+ FormAttributeField annotation = field.getAnnotation(FormAttributeField.class);
+
+ BeanWrapper wrapper = PropertyAccessorFactory.
+ forBeanPropertyAccess(ReportletConfModalPage.this.reportletConf);
+
+ Panel panel;
+
+ if (String.class.equals(field.getType()) && annotation != null && annotation.userSearch()) {
+ panel = new UserSearchPanel.Builder("value").
+ fiql((String) wrapper.getPropertyValue(fieldName)).required(false).build();
+ // This is needed in order to manually update this.reportletConf with search panel selections
+ panel.setDefaultModel(new Model<String>(fieldName));
+ } else if (String.class.equals(field.getType()) && annotation != null && annotation.roleSearch()) {
+ panel = new RoleSearchPanel.Builder("value").
+ fiql((String) wrapper.getPropertyValue(fieldName)).required(false).build();
+ // This is needed in order to manually update this.reportletConf with search panel selections
+ panel.setDefaultModel(new Model<String>(fieldName));
+ } else if (List.class.equals(field.getType())) {
+ Class<?> listItemType = String.class;
+ if (field.getGenericType() instanceof ParameterizedType) {
+ listItemType =
+ (Class<?>) ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];
+ }
+
+ if (listItemType.equals(String.class) && annotation != null) {
+ List<String> choices;
+ switch (annotation.schema()) {
+ case UserPlainSchema:
+ choices = schemaRestClient.getPlainSchemaNames(AttributableType.USER);
+ break;
+
+ case UserDerivedSchema:
+ choices = schemaRestClient.getDerSchemaNames(AttributableType.USER);
+ break;
+
+ case UserVirtualSchema:
+ choices = schemaRestClient.getVirSchemaNames(AttributableType.USER);
+ break;
+
+ case RolePlainSchema:
+ choices = schemaRestClient.getPlainSchemaNames(AttributableType.ROLE);
+ break;
+
+ case RoleDerivedSchema:
+ choices = schemaRestClient.getDerSchemaNames(AttributableType.ROLE);
+ break;
+
+ case RoleVirtualSchema:
+ choices = schemaRestClient.getVirSchemaNames(AttributableType.ROLE);
+ break;
+
+ case MembershipPlainSchema:
+ choices = schemaRestClient.getPlainSchemaNames(AttributableType.MEMBERSHIP);
+ break;
+
+ case MembershipDerivedSchema:
+ choices = schemaRestClient.getDerSchemaNames(AttributableType.MEMBERSHIP);
+ break;
+
+ case MembershipVirtualSchema:
+ choices = schemaRestClient.getVirSchemaNames(AttributableType.MEMBERSHIP);
+ break;
+
+ default:
+ choices = Collections.emptyList();
+ }
+
+ panel = new AjaxPalettePanel("value", new PropertyModel<List<String>>(
+ ReportletConfModalPage.this.reportletConf, fieldName), new ListModel<String>(choices),
+ true);
+ } else if (listItemType.isEnum()) {
+ panel = new CheckBoxMultipleChoiceFieldPanel("value", new PropertyModel(
+ ReportletConfModalPage.this.reportletConf, fieldName),
+ new ListModel(Arrays.asList(listItemType.getEnumConstants())));
+ } else {
+ if (((List) wrapper.getPropertyValue(fieldName)).isEmpty()) {
+ ((List) wrapper.getPropertyValue(fieldName)).add(null);
+ }
+
+ panel = new MultiFieldPanel("value", new PropertyModel<List>(
+ ReportletConfModalPage.this.reportletConf, fieldName),
+ buildSinglePanel(field.getType(), fieldName, "panel"));
+ }
+ } else {
+ panel = buildSinglePanel(field.getType(), fieldName, "value");
+ }
+
+ item.add(panel);
+ }
+ };
+
+ return propView;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/Reports.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Reports.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Reports.java
new file mode 100644
index 0000000..a7b9c6c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Reports.java
@@ -0,0 +1,412 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.PreferenceManager;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.panels.LoggerCategoryPanel;
+import org.apache.syncope.client.console.panels.SelectedEventsPanel;
+import org.apache.syncope.client.console.rest.LoggerRestClient;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.EventCategoryTO;
+import org.apache.syncope.common.lib.to.ReportTO;
+import org.apache.syncope.common.lib.types.AuditElements.Result;
+import org.apache.syncope.common.lib.types.AuditLoggerName;
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+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.util.SortableDataProvider;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.model.util.ListModel;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.springframework.util.CollectionUtils;
+
+/**
+ * Auditing and Reporting.
+ */
+public class Reports extends BasePage {
+
+ private static final long serialVersionUID = -2071214196989178694L;
+
+ private static final int WIN_HEIGHT = 500;
+
+ private static final int WIN_WIDTH = 700;
+
+ @SpringBean
+ private LoggerRestClient loggerRestClient;
+
+ @SpringBean
+ private PreferenceManager prefMan;
+
+ private WebMarkupContainer reportContainer;
+
+ private WebMarkupContainer auditContainer;
+
+ private int paginatorRows;
+
+ private final ModalWindow window;
+
+ public Reports(final PageParameters parameters) {
+ super(parameters);
+
+ window = new ModalWindow("reportWin");
+ window.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ window.setInitialHeight(WIN_HEIGHT);
+ window.setInitialWidth(WIN_WIDTH);
+ window.setCookieName("view-report-win");
+ add(window);
+
+ setupReport();
+ setupAudit();
+ }
+
+ private void setupReport() {
+ reportContainer = new WebMarkupContainer("reportContainer");
+ setWindowClosedCallback(window, reportContainer);
+
+ MetaDataRoleAuthorizationStrategy.authorize(reportContainer, RENDER,
+ xmlRolesReader.getEntitlement("Reports", "list"));
+
+ paginatorRows = prefMan.getPaginatorRows(getRequest(), Constants.PREF_REPORT_PAGINATOR_ROWS);
+
+ List<IColumn<ReportTO, String>> columns = new ArrayList<>();
+ columns.add(new PropertyColumn<ReportTO, String>(new ResourceModel("key"), "key", "key"));
+ columns.add(new PropertyColumn<ReportTO, String>(new ResourceModel("name"), "name", "name"));
+ columns.add(new DatePropertyColumn<ReportTO>(new ResourceModel("lastExec"), "lastExec", "lastExec"));
+ columns.add(new DatePropertyColumn<ReportTO>(new ResourceModel("nextExec"), "nextExec", "nextExec"));
+ columns.add(new DatePropertyColumn<ReportTO>(new ResourceModel("startDate"), "startDate", "startDate"));
+ columns.add(new DatePropertyColumn<ReportTO>(new ResourceModel("endDate"), "endDate", "endDate"));
+ columns.add(new PropertyColumn<ReportTO, String>(
+ new ResourceModel("latestExecStatus"), "latestExecStatus", "latestExecStatus"));
+ columns.add(new ActionColumn<ReportTO, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public ActionLinksPanel getActions(final String componentId, final IModel<ReportTO> model) {
+
+ final ReportTO reportTO = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ReportModalPage(window, reportTO, Reports.this.getPageReference());
+ }
+ });
+
+ window.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, "Reports");
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ reportRestClient.startExecution(reportTO.getKey());
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+
+ feedbackPanel.refresh(target);
+ target.add(reportContainer);
+ }
+ }, ActionLink.ActionType.EXECUTE, "Reports");
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ reportRestClient.delete(reportTO.getKey());
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ error(scce.getMessage());
+ }
+ target.add(reportContainer);
+ feedbackPanel.refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, "Reports");
+
+ return panel;
+ }
+
+ @Override
+ public Component getHeader(final String componentId) {
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(), getPageReference());
+
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ if (target != null) {
+ target.add(reportContainer);
+ }
+ }
+ }, ActionLink.ActionType.RELOAD, TASKS, "list");
+
+ return panel;
+ }
+ });
+
+ final AjaxFallbackDefaultDataTable<ReportTO, String> reportTable =
+ new AjaxFallbackDefaultDataTable<>("reportTable", columns, new ReportProvider(), paginatorRows);
+
+ reportContainer.add(reportTable);
+ reportContainer.setOutputMarkupId(true);
+
+ add(reportContainer);
+
+ @SuppressWarnings("rawtypes")
+ Form paginatorForm = new Form("paginatorForm");
+
+ MetaDataRoleAuthorizationStrategy.authorize(paginatorForm, RENDER,
+ xmlRolesReader.getEntitlement("Reports", "list"));
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this, "paginatorRows"),
+ prefMan.getPaginatorChoices());
+
+ rowsChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ prefMan.set(getRequest(), getResponse(), Constants.PREF_REPORT_PAGINATOR_ROWS,
+ String.valueOf(paginatorRows));
+ reportTable.setItemsPerPage(paginatorRows);
+
+ target.add(reportContainer);
+ }
+ });
+
+ paginatorForm.add(rowsChooser);
+ add(paginatorForm);
+
+ AjaxLink<Void> createLink = new ClearIndicatingAjaxLink<Void>("createLink", getPageReference()) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ window.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ReportModalPage(window, new ReportTO(), Reports.this.getPageReference());
+ }
+ });
+
+ window.show(target);
+ }
+ };
+
+ MetaDataRoleAuthorizationStrategy.authorize(createLink, RENDER, xmlRolesReader.getEntitlement("Reports",
+ "create"));
+
+ add(createLink);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private void setupAudit() {
+ auditContainer = new WebMarkupContainer("auditContainer");
+ auditContainer.setOutputMarkupId(true);
+ add(auditContainer);
+
+ MetaDataRoleAuthorizationStrategy.authorize(
+ auditContainer, RENDER, xmlRolesReader.getEntitlement("Audit", "list"));
+
+ final Form form = new Form("auditForm");
+ auditContainer.add(form);
+
+ final List<String> events = new ArrayList<>();
+
+ final List<AuditLoggerName> audits = loggerRestClient.listAudits();
+ for (AuditLoggerName audit : audits) {
+ events.add(AuditLoggerName.buildEvent(
+ audit.getType(),
+ audit.getCategory(),
+ audit.getSubcategory(),
+ audit.getEvent(),
+ audit.getResult()));
+ }
+
+ final ListModel<String> model = new ListModel<>(new ArrayList<>(events));
+
+ form.add(new LoggerCategoryPanel(
+ "events", loggerRestClient.listEvents(), model, getPageReference(), "Reports") {
+
+ private static final long serialVersionUID = 6113164334533550277L;
+
+ @Override
+ protected String[] getListRoles() {
+ return new String[] {
+ xmlRolesReader.getEntitlement("Audit", "list")
+ };
+ }
+
+ @Override
+ protected String[] getChangeRoles() {
+ return new String[] {
+ xmlRolesReader.getEntitlement("Audit", "enable"),
+ xmlRolesReader.getEntitlement("Audit", "disable")
+ };
+ }
+
+ @Override
+ public void onEventAction(final IEvent<?> event) {
+ if (event.getPayload() instanceof SelectedEventsPanel.EventSelectionChanged) {
+
+ final SelectedEventsPanel.EventSelectionChanged eventSelectionChanged =
+ (SelectedEventsPanel.EventSelectionChanged) event.getPayload();
+
+ for (String toBeRemoved : eventSelectionChanged.getToBeRemoved()) {
+ if (events.contains(toBeRemoved)) {
+ final Map.Entry<EventCategoryTO, Result> eventCategory =
+ AuditLoggerName.parseEventCategory(toBeRemoved);
+
+ final AuditLoggerName auditLoggerName = new AuditLoggerName(
+ eventCategory.getKey().getType(),
+ eventCategory.getKey().getCategory(),
+ eventCategory.getKey().getSubcategory(),
+ CollectionUtils.isEmpty(eventCategory.getKey().getEvents())
+ ? null : eventCategory.getKey().getEvents().iterator().next(),
+ eventCategory.getValue());
+
+ loggerRestClient.disableAudit(auditLoggerName);
+ events.remove(toBeRemoved);
+ }
+ }
+
+ for (String toBeAdded : eventSelectionChanged.getToBeAdded()) {
+ if (!events.contains(toBeAdded)) {
+ final Map.Entry<EventCategoryTO, Result> eventCategory =
+ AuditLoggerName.parseEventCategory(toBeAdded);
+
+ final AuditLoggerName auditLoggerName = new AuditLoggerName(
+ eventCategory.getKey().getType(),
+ eventCategory.getKey().getCategory(),
+ eventCategory.getKey().getSubcategory(),
+ CollectionUtils.isEmpty(eventCategory.getKey().getEvents())
+ ? null : eventCategory.getKey().getEvents().iterator().next(),
+ eventCategory.getValue());
+
+ loggerRestClient.enableAudit(auditLoggerName);
+ events.add(toBeAdded);
+ }
+ }
+ }
+ }
+ });
+ }
+
+ private class ReportProvider extends SortableDataProvider<ReportTO, String> {
+
+ private static final long serialVersionUID = -2311716167583335852L;
+
+ private final SortableDataProviderComparator<ReportTO> comparator;
+
+ public ReportProvider() {
+ super();
+
+ //Default sorting
+ setSort("key", SortOrder.ASCENDING);
+ comparator = new SortableDataProviderComparator<>(this);
+ }
+
+ @Override
+ public Iterator<ReportTO> iterator(final long first, final long count) {
+ final int page = ((int) first / paginatorRows);
+
+ final List<ReportTO> list =
+ reportRestClient.list((page < 0 ? 0 : page) + 1, paginatorRows, getSort());
+ Collections.sort(list, comparator);
+ return list.iterator();
+ }
+
+ @Override
+ public long size() {
+ return reportRestClient.count();
+ }
+
+ @Override
+ public IModel<ReportTO> model(final ReportTO configuration) {
+
+ return new AbstractReadOnlyModel<ReportTO>() {
+
+ private static final long serialVersionUID = 4921104837546595602L;
+
+ @Override
+ public ReportTO getObject() {
+ return configuration;
+ }
+ };
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage.java
new file mode 100644
index 0000000..d8b762f
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/RequestPasswordResetModalPage.java
@@ -0,0 +1,153 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.rest.SecurityQuestionRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.SecurityQuestionTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.StatelessForm;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class RequestPasswordResetModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = -8419445804421211904L;
+
+ @SpringBean
+ private SecurityQuestionRestClient securityQuestionRestClient;
+
+ public RequestPasswordResetModalPage(final ModalWindow window) {
+ super();
+ setOutputMarkupId(true);
+
+ final boolean handleSecurityQuestion = userSelfRestClient.isPwdResetRequiringSecurityQuestions();
+
+ final StatelessForm<?> form = new StatelessForm<Object>(FORM);
+ form.setOutputMarkupId(true);
+
+ final Label securityQuestionLabel = new Label("securityQuestionLabel", getString("securityQuestion"));
+ securityQuestionLabel.setOutputMarkupPlaceholderTag(true);
+ securityQuestionLabel.setVisible(handleSecurityQuestion);
+ form.add(securityQuestionLabel);
+ final AjaxTextFieldPanel securityQuestion =
+ new AjaxTextFieldPanel("securityQuestion", "securityQuestion", new Model<String>());
+ securityQuestion.setReadOnly(true);
+ securityQuestion.setRequired(true);
+ securityQuestion.getField().setOutputMarkupId(true);
+ securityQuestion.setOutputMarkupPlaceholderTag(true);
+ securityQuestion.setVisible(handleSecurityQuestion);
+ form.add(securityQuestion);
+
+ final AjaxTextFieldPanel username =
+ new AjaxTextFieldPanel("username", "username", new Model<String>());
+ username.setRequired(true);
+ username.getField().setOutputMarkupId(true);
+ if (handleSecurityQuestion) {
+ username.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_BLUR) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ getFeedbackMessages().clear();
+ target.add(feedbackPanel);
+ try {
+ SecurityQuestionTO read = securityQuestionRestClient.readByUser(username.getModelObject());
+ securityQuestion.setModelObject(read.getContent());
+ } catch (Exception e) {
+ LOG.error("While fetching security question for {}", username.getModelObject(), e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ securityQuestion.setModelObject(null);
+ } finally {
+ target.add(securityQuestion);
+ }
+ }
+ });
+ }
+ form.add(username);
+
+ final Label securityAnswerLabel = new Label("securityAnswerLabel", getString("securityAnswer"));
+ securityAnswerLabel.setOutputMarkupPlaceholderTag(true);
+ securityAnswerLabel.setVisible(handleSecurityQuestion);
+ form.add(securityAnswerLabel);
+ final AjaxTextFieldPanel securityAnswer =
+ new AjaxTextFieldPanel("securityAnswer", "securityAnswer", new Model<String>());
+ securityAnswer.setRequired(handleSecurityQuestion);
+ securityAnswer.setOutputMarkupPlaceholderTag(true);
+ securityAnswer.setVisible(handleSecurityQuestion);
+ form.add(securityAnswer);
+
+ final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT, SUBMIT)) {
+
+ private static final long serialVersionUID = -4804368561204623354L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ try {
+ userSelfRestClient.requestPasswordReset(username.getModelObject(), securityAnswer.getModelObject());
+
+ setResponsePage(new ResultStatusModalPage.Builder(window, new UserTO()).
+ mode(Mode.SELF).build());
+ } catch (Exception e) {
+ LOG.error("While requesting password reset for {}", username.getModelObject(), e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+ form.add(submit);
+ form.setDefaultButton(submit);
+
+ final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ // do nothing
+ }
+ };
+ cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
+
+ add(form);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ResourceModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ResourceModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ResourceModalPage.java
new file mode 100644
index 0000000..d6f69cf
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ResourceModalPage.java
@@ -0,0 +1,214 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.AnnotatedBeanPanel;
+import org.apache.syncope.client.console.panels.ResourceConnConfPanel;
+import org.apache.syncope.client.console.panels.ResourceDetailsPanel;
+import org.apache.syncope.client.console.panels.ResourceMappingPanel;
+import org.apache.syncope.client.console.panels.ResourceSecurityPanel;
+import org.apache.syncope.common.lib.to.MappingItemTO;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+
+/**
+ * Modal window with Resource form.
+ */
+public class ResourceModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 1734415311027284221L;
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public ResourceModalPage(final PageReference pageRef, final ModalWindow window, final ResourceTO resourceTO,
+ final boolean createFlag) {
+
+ super();
+
+ this.add(new Label("new", StringUtils.isBlank(resourceTO.getKey())
+ ? new ResourceModel("new")
+ : new Model(StringUtils.EMPTY)));
+ this.add(new Label("name", StringUtils.isBlank(resourceTO.getKey())
+ ? StringUtils.EMPTY
+ : resourceTO.getKey()));
+
+ final Form<ResourceTO> form = new Form<>(FORM);
+ form.setModel(new CompoundPropertyModel<>(resourceTO));
+
+ //--------------------------------
+ // Resource details panel
+ //--------------------------------
+ form.add(new ResourceDetailsPanel("details", resourceTO,
+ resourceRestClient.getPropagationActionsClasses(), createFlag));
+
+ form.add(new AnnotatedBeanPanel("systeminformation", resourceTO));
+ //--------------------------------
+
+ //--------------------------------
+ // Resource mapping panels
+ //--------------------------------
+ form.add(new ResourceMappingPanel("umapping", resourceTO, AttributableType.USER));
+ form.add(new ResourceMappingPanel("rmapping", resourceTO, AttributableType.ROLE));
+ //--------------------------------
+
+ //--------------------------------
+ // Resource connector configuration panel
+ //--------------------------------
+ ResourceConnConfPanel resourceConnConfPanel = new ResourceConnConfPanel("connconf", resourceTO, createFlag);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ resourceConnConfPanel, ENABLE, xmlRolesReader.getEntitlement("Connectors", "read"));
+ form.add(resourceConnConfPanel);
+ //--------------------------------
+
+ //--------------------------------
+ // Resource security panel
+ //--------------------------------
+ form.add(new ResourceSecurityPanel("security", resourceTO));
+ //--------------------------------
+
+ final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT, SUBMIT)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ final ResourceTO resourceTO = (ResourceTO) form.getDefaultModelObject();
+
+ boolean accountIdError = false;
+
+ if (resourceTO.getUmapping() == null || resourceTO.getUmapping().getItems().isEmpty()) {
+ resourceTO.setUmapping(null);
+ } else {
+ int uAccountIdCount = 0;
+ for (MappingItemTO item : resourceTO.getUmapping().getItems()) {
+ if (item.isAccountid()) {
+ uAccountIdCount++;
+ }
+ }
+ accountIdError = uAccountIdCount != 1;
+ }
+
+ if (resourceTO.getRmapping() == null || resourceTO.getRmapping().getItems().isEmpty()) {
+ resourceTO.setRmapping(null);
+ } else {
+ int rAccountIdCount = 0;
+ for (MappingItemTO item : resourceTO.getRmapping().getItems()) {
+ if (item.isAccountid()) {
+ rAccountIdCount++;
+ }
+ }
+ accountIdError |= rAccountIdCount != 1;
+ }
+
+ if (accountIdError) {
+ error(getString("accountIdValidation"));
+ feedbackPanel.refresh(target);
+ } else {
+ try {
+ if (createFlag) {
+ resourceRestClient.create(resourceTO);
+ } else {
+ resourceRestClient.update(resourceTO);
+ }
+
+ if (pageRef != null && pageRef.getPage() instanceof AbstractBasePage) {
+ ((AbstractBasePage) pageRef.getPage()).setModalResult(true);
+ }
+ window.close(target);
+ } catch (Exception e) {
+ LOG.error("Failure managing resource {}", resourceTO, e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+
+ form.add(submit);
+ form.setDefaultButton(submit);
+
+ final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ }
+ };
+
+ cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
+
+ add(form);
+
+ MetaDataRoleAuthorizationStrategy.authorize(
+ submit, ENABLE, xmlRolesReader.getEntitlement("Resources", createFlag ? "create" : "update"));
+ }
+
+ /**
+ * Generic resource event.
+ */
+ public static class ResourceEvent {
+
+ /**
+ * Request target.
+ */
+ private final AjaxRequestTarget target;
+
+ /**
+ * Constructor.
+ *
+ * @param target request target.
+ */
+ public ResourceEvent(final AjaxRequestTarget target) {
+ this.target = target;
+ }
+
+ /**
+ * Target getter.
+ *
+ * @return request target.
+ */
+ public AjaxRequestTarget getTarget() {
+ return target;
+ }
+ }
+}
[02/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/commons/status/StatusUtils.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/commons/status/StatusUtils.java b/console/src/main/java/org/apache/syncope/console/commons/status/StatusUtils.java
deleted file mode 100644
index cbb19b4..0000000
--- a/console/src/main/java/org/apache/syncope/console/commons/status/StatusUtils.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.commons.status;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.syncope.common.mod.StatusMod;
-import org.apache.syncope.common.to.AbstractAttributableTO;
-import org.apache.syncope.common.to.AbstractSubjectTO;
-import org.apache.syncope.common.to.AttributeTO;
-import org.apache.syncope.common.to.ConnObjectTO;
-import org.apache.syncope.console.commons.ConnIdSpecialAttributeName;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.pages.panels.ImagePanel;
-import org.apache.syncope.console.pages.panels.StatusPanel;
-import org.apache.syncope.console.rest.AbstractSubjectRestClient;
-import org.apache.wicket.Component;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.behavior.Behavior;
-import org.apache.wicket.markup.ComponentTag;
-import org.apache.wicket.markup.html.image.Image;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class StatusUtils implements Serializable {
-
- private static final long serialVersionUID = 7238009174387184309L;
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(StatusUtils.class);
-
- public static final String IMG_STATUES = "../statuses/";
-
- private final AbstractSubjectRestClient restClient;
-
- public StatusUtils(final AbstractSubjectRestClient restClient) {
- this.restClient = restClient;
- }
-
- public List<ConnObjectWrapper> getConnectorObjects(final AbstractSubjectTO subject) {
- final List<ConnObjectWrapper> objects = new ArrayList<ConnObjectWrapper>();
- objects.addAll(getConnectorObjects(subject, subject.getResources()));
- return objects;
- }
-
- public List<ConnObjectWrapper> getConnectorObjects(
- final Collection<AbstractSubjectTO> subjects, final Collection<String> resources) {
-
- final List<ConnObjectWrapper> objects = new ArrayList<ConnObjectWrapper>();
-
- for (AbstractSubjectTO subject : subjects) {
- objects.addAll(getConnectorObjects(subject, resources));
- }
-
- return objects;
- }
-
- private List<ConnObjectWrapper> getConnectorObjects(
- final AbstractSubjectTO subject, final Collection<String> resources) {
-
- final List<ConnObjectWrapper> objects = new ArrayList<ConnObjectWrapper>();
-
- for (String resourceName : resources) {
- ConnObjectTO objectTO = null;
- try {
- objectTO = restClient.getConnectorObject(resourceName, subject.getId());
- } catch (Exception e) {
- LOG.warn("ConnObject '{}' not found on resource '{}'", subject.getId(), resourceName);
- }
-
- objects.add(new ConnObjectWrapper(subject, resourceName, objectTO));
- }
-
- return objects;
- }
-
- public StatusBean getStatusBean(
- final AbstractAttributableTO attributable,
- final String resourceName,
- final ConnObjectTO objectTO,
- final boolean isRole) {
- final StatusBean statusBean = new StatusBean(attributable, resourceName);
-
- if (objectTO != null) {
- final Boolean enabled = isEnabled(objectTO);
-
- final Status status = enabled == null
- ? (isRole ? Status.ACTIVE : Status.UNDEFINED)
- : enabled
- ? Status.ACTIVE
- : Status.SUSPENDED;
-
- final String accountLink = getAccountLink(objectTO);
-
- statusBean.setStatus(status);
- statusBean.setAccountLink(accountLink);
- }
-
- return statusBean;
- }
-
- private Boolean isEnabled(final ConnObjectTO objectTO) {
- final Map<String, AttributeTO> attributeTOs = objectTO.getAttrMap();
-
- final AttributeTO status = attributeTOs.get(ConnIdSpecialAttributeName.ENABLE);
-
- return status != null && status.getValues() != null && !status.getValues().isEmpty()
- ? Boolean.parseBoolean(status.getValues().get(0))
- : null;
- }
-
- private String getAccountLink(final ConnObjectTO objectTO) {
- final Map<String, AttributeTO> attributeTOs = objectTO == null
- ? Collections.<String, AttributeTO>emptyMap()
- : objectTO.getAttrMap();
-
- final AttributeTO name = attributeTOs.get(ConnIdSpecialAttributeName.NAME);
-
- return name != null && name.getValues() != null && !name.getValues().isEmpty()
- ? name.getValues().get(0)
- : null;
- }
-
- public static StatusMod buildStatusMod(final Collection<StatusBean> statuses) {
- return buildStatusMod(statuses, null);
- }
-
- public static StatusMod buildStatusMod(final Collection<StatusBean> statuses, final Boolean enable) {
- StatusMod statusMod = new StatusMod();
- statusMod.setOnSyncope(false);
-
- for (StatusBean status : statuses) {
- if (enable == null
- || (enable && !status.getStatus().isActive()) || (!enable && status.getStatus().isActive())) {
-
- if ("syncope".equalsIgnoreCase(status.getResourceName())) {
- statusMod.setOnSyncope(true);
- } else {
- statusMod.getResourceNames().add(status.getResourceName());
- }
-
- }
- }
-
- return statusMod;
- }
-
- public static void update(
- final AbstractAttributableTO attributable,
- final StatusPanel statusPanel,
- final AjaxRequestTarget target,
- final Collection<String> resourcesToAdd,
- final Collection<String> resourcesToRemove) {
-
- if (statusPanel != null) {
- Map<String, StatusBean> statusMap = new LinkedHashMap<String, StatusBean>();
- for (StatusBean statusBean : statusPanel.getStatusBeans()) {
- statusMap.put(statusBean.getResourceName(), statusBean);
- }
-
- for (String resourceName : resourcesToAdd) {
- if (!statusMap.keySet().contains(resourceName)) {
- StatusBean statusBean;
- if (statusPanel.getInitialStatusBeanMap().containsKey(resourceName)) {
- statusBean = statusPanel.getInitialStatusBeanMap().get(resourceName);
- } else {
- statusBean = new StatusBean(attributable, resourceName);
- statusBean.setStatus(Status.NOT_YET_SUBMITTED);
- }
-
- statusMap.put(statusBean.getResourceName(), statusBean);
- }
- }
-
- for (String resource : resourcesToRemove) {
- statusMap.remove(resource);
- }
-
- statusPanel.updateStatusBeans(new ArrayList<StatusBean>(statusMap.values()));
- target.add(statusPanel);
- }
- }
-
- public ConnObjectTO getConnObjectTO(
- final Long attributableId, final String resourceName, final List<ConnObjectWrapper> objects) {
-
- for (ConnObjectWrapper object : objects) {
- if (attributableId.equals(object.getAttributable().getId())
- && resourceName.equalsIgnoreCase(object.getResourceName())) {
-
- return object.getConnObjectTO();
- }
- }
-
- return null;
- }
-
- public Image getStatusImage(final String componentId, final Status status) {
- final String alt, title, statusName;
-
- switch (status) {
-
- case NOT_YET_SUBMITTED:
- statusName = Status.UNDEFINED.toString();
- alt = "undefined icon";
- title = "Not yet submitted";
- break;
-
- case ACTIVE:
- statusName = Status.ACTIVE.toString();
- alt = "active icon";
- title = "Enabled";
- break;
-
- case UNDEFINED:
- statusName = Status.UNDEFINED.toString();
- alt = "undefined icon";
- title = "Undefined status";
- break;
-
- case OBJECT_NOT_FOUND:
- statusName = Status.OBJECT_NOT_FOUND.toString();
- alt = "notfound icon";
- title = "Not found";
- break;
-
- default:
- statusName = Status.SUSPENDED.toString();
- alt = "inactive icon";
- title = "Disabled";
- }
-
- final Image img = new Image(componentId, IMG_STATUES + statusName + Constants.PNG_EXT);
-
- img.add(new Behavior() {
-
- private static final long serialVersionUID = 1469628524240283489L;
-
- @Override
- public void onComponentTag(final Component component, final ComponentTag tag) {
- tag.put("alt", alt);
- tag.put("title", title);
- }
- });
-
- return img;
- }
-
- public ImagePanel getStatusImagePanel(final String componentId, final Status status) {
- final String alt, title, statusName;
-
- switch (status) {
-
- case NOT_YET_SUBMITTED:
- statusName = Status.UNDEFINED.toString();
- alt = "undefined icon";
- title = "Not yet submitted";
- break;
-
- case ACTIVE:
- statusName = Status.ACTIVE.toString();
- alt = "active icon";
- title = "Enabled";
- break;
-
- case UNDEFINED:
- statusName = Status.UNDEFINED.toString();
- alt = "undefined icon";
- title = "Undefined status";
- break;
-
- case OBJECT_NOT_FOUND:
- statusName = Status.OBJECT_NOT_FOUND.toString();
- alt = "notfound icon";
- title = "Not found";
- break;
-
- default:
- statusName = Status.SUSPENDED.toString();
- alt = "inactive icon";
- title = "Disabled";
- }
-
- final ImagePanel imagePanel = new ImagePanel(componentId, IMG_STATUES + statusName + Constants.PNG_EXT);
- imagePanel.add(new Behavior() {
-
- private static final long serialVersionUID = 1469628524240283489L;
-
- @Override
- public void onComponentTag(final Component component, final ComponentTag tag) {
- tag.put("alt", alt);
- tag.put("title", title);
- }
- });
-
- return imagePanel;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/init/MIMETypesInitializer.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/init/MIMETypesInitializer.java b/console/src/main/java/org/apache/syncope/console/init/MIMETypesInitializer.java
deleted file mode 100644
index ef5516e..0000000
--- a/console/src/main/java/org/apache/syncope/console/init/MIMETypesInitializer.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.init;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.wicket.util.io.IOUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-@Component
-public class MIMETypesInitializer {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(MIMETypesInitializer.class);
-
- private List<String> mimeTypes;
-
- public void load() {
- final Set<String> mediaTypes = new HashSet<String>();
- this.mimeTypes = new ArrayList<String>();
- try {
- final String mimeTypesFile = IOUtils.toString(this.getClass().getResourceAsStream("/MIMETypes"));
- for (String fileRow : mimeTypesFile.split("\n")) {
- if (StringUtils.isNotBlank(fileRow) && !fileRow.startsWith("#")) {
- mediaTypes.add(fileRow);
- }
- }
- this.mimeTypes.addAll(mediaTypes);
- Collections.sort(this.mimeTypes);
- } catch (Exception e) {
- LOG.error("Error reading file MIMETypes from resources", e);
- }
- }
-
- public List<String> getMimeTypes() {
- LOG.debug("Returning loaded MIME types list");
- return mimeTypes;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/init/PreviewPanelClassInitializer.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/init/PreviewPanelClassInitializer.java b/console/src/main/java/org/apache/syncope/console/init/PreviewPanelClassInitializer.java
deleted file mode 100644
index 5175454..0000000
--- a/console/src/main/java/org/apache/syncope/console/init/PreviewPanelClassInitializer.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.init;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import org.apache.syncope.console.preview.BinaryPreview;
-import org.apache.syncope.console.preview.PreviewerClassScanner;
-import org.apache.syncope.console.wicket.markup.html.form.preview.AbstractBinaryPreviewer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-@Component
-public class PreviewPanelClassInitializer {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(PreviewPanelClassInitializer.class);
-
- @Autowired
- private PreviewerClassScanner classScanner;
-
- private List<Class<? extends AbstractBinaryPreviewer>> classes;
-
- public void load() {
- classes = new ArrayList<Class<? extends AbstractBinaryPreviewer>>();
- for (Class<? extends AbstractBinaryPreviewer> candidate : classScanner.getComponentClasses()) {
- classes.add(candidate);
- }
- }
-
- public List<Class<? extends AbstractBinaryPreviewer>> getClasses() {
- LOG.debug("Returning loaded classes: {}", classes);
- return classes;
- }
-
- public Class<? extends AbstractBinaryPreviewer> getClass(final String mimeType) {
- LOG.debug("Searching for previewer class for MIME type: {}", mimeType);
- Class<? extends AbstractBinaryPreviewer> previewer = null;
- for (Class<? extends AbstractBinaryPreviewer> candidate : classes) {
- LOG.debug("Evaluating previewer class {} for MIME type {}", candidate.getName(), mimeType);
- if (Arrays.asList(candidate.getAnnotation(BinaryPreview.class).mimeTypes()).contains(mimeType)) {
- LOG.debug("Found existing previewer for MIME type {}: {}", mimeType, candidate.getName());
- previewer = candidate;
- }
- }
- return previewer;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/init/SpringContextInitializer.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/init/SpringContextInitializer.java b/console/src/main/java/org/apache/syncope/console/init/SpringContextInitializer.java
deleted file mode 100644
index dc2515c..0000000
--- a/console/src/main/java/org/apache/syncope/console/init/SpringContextInitializer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.init;
-
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Configurable;
-import org.springframework.stereotype.Component;
-
-/**
- * Take care of all initializations needed by Syncope Console to run up and safe.
- */
-@Component
-@Configurable
-public class SpringContextInitializer implements InitializingBean {
-
- @Autowired
- private PreviewPanelClassInitializer previewPanelClassInitializer;
-
- @Autowired
- private MIMETypesInitializer mimeTypesInitializer;
-
- @Override
- public void afterPropertiesSet() {
- previewPanelClassInitializer.load();
- mimeTypesInitializer.load();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/markup/html/CrontabContainer.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/markup/html/CrontabContainer.java b/console/src/main/java/org/apache/syncope/console/markup/html/CrontabContainer.java
deleted file mode 100644
index b5c50b0..0000000
--- a/console/src/main/java/org/apache/syncope/console/markup/html/CrontabContainer.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.markup.html;
-
-import java.util.Arrays;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.commons.SelectChoiceRenderer;
-import org.apache.syncope.console.commons.SelectOption;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.form.DropDownChoice;
-import org.apache.wicket.markup.html.form.FormComponent;
-import org.apache.wicket.markup.html.form.TextField;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.model.PropertyModel;
-
-public class CrontabContainer extends WebMarkupContainer {
-
- private static final long serialVersionUID = 7879593326085337650L;
-
- private final TextField seconds;
-
- private final TextField minutes;
-
- private final TextField hours;
-
- private final TextField daysOfMonth;
-
- private final TextField months;
-
- private final TextField daysOfWeek;
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- public CrontabContainer(final String id, final PropertyModel<String> cronExpressionModel,
- final String cronExpression) {
-
- super(id);
- setOutputMarkupId(true);
-
- final SelectOption[] CRON_TEMPLATES = {
- new SelectOption(getString("selOpt1"), "UNSCHEDULE"),
- new SelectOption(getString("selOpt2"), "0 0/5 * * * ?"),
- new SelectOption(getString("selOpt3"), "0 0 12 * * ?"),
- new SelectOption(getString("selOpt4"), "0 0 0 1 * ?"),
- new SelectOption(getString("selOpt5"), "0 0 0 L * ?"),
- new SelectOption(getString("selOpt6"), "0 0 0 ? * 2")
- };
-
- final DropDownChoice<SelectOption> cronTemplateChooser =
- new DropDownChoice<SelectOption>("cronTemplateChooser") {
-
- private static final long serialVersionUID = -5843424545478691442L;
-
- @Override
- protected CharSequence getDefaultChoice(final String selected) {
- return "<option value=\"\">" + getString("chooseForTemplate") + "</option>";
- }
- };
-
- cronTemplateChooser.setModel(new IModel<SelectOption>() {
-
- private static final long serialVersionUID = 6762568283146531315L;
-
- @Override
- public SelectOption getObject() {
- SelectOption result = null;
- for (SelectOption so : CRON_TEMPLATES) {
- if (so.getKeyValue().equals(cronExpressionModel.getObject())) {
-
- result = so;
- }
- }
-
- return result;
- }
-
- @Override
- public void setObject(final SelectOption object) {
- cronExpressionModel.setObject(object == null || object.equals(CRON_TEMPLATES[0])
- ? null
- : object.toString());
- }
-
- @Override
- public void detach() {
- // no detach
- }
- });
- cronTemplateChooser.setChoices(Arrays.asList(CRON_TEMPLATES));
- cronTemplateChooser.setChoiceRenderer(new SelectChoiceRenderer());
- add(cronTemplateChooser);
-
- seconds = new TextField("seconds", new Model(getCronField(cronExpression, 0)));
- add(seconds);
-
- minutes = new TextField("minutes", new Model(getCronField(cronExpression, 1)));
- add(minutes);
-
- hours = new TextField("hours", new Model(getCronField(cronExpression, 2)));
- add(hours);
-
- daysOfMonth = new TextField("daysOfMonth", new Model(getCronField(cronExpression, 3)));
- add(daysOfMonth);
-
- months = new TextField("months", new Model(getCronField(cronExpression, 4)));
- add(months);
-
- daysOfWeek = new TextField("daysOfWeek", new Model(getCronField(cronExpression, 5)));
- add(daysOfWeek);
-
- cronTemplateChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
-
- private static final long serialVersionUID = -1107858522700306810L;
-
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- seconds.setModelObject(getCronField(cronTemplateChooser, 0));
- minutes.setModelObject(getCronField(cronTemplateChooser, 1));
- hours.setModelObject(getCronField(cronTemplateChooser, 2));
- daysOfMonth.setModelObject(getCronField(cronTemplateChooser, 3));
- months.setModelObject(getCronField(cronTemplateChooser, 4));
- daysOfWeek.setModelObject(getCronField(cronTemplateChooser, 5));
- target.add(CrontabContainer.this);
- }
- });
- }
-
- private String getCronField(final FormComponent formComponent, final int field) {
- String cronField = null;
-
- if (formComponent != null) {
- cronField = getCronField(formComponent.getInput(), field);
- }
-
- return cronField;
- }
-
- private String getCronField(final String cron, final int field) {
- String cronField = null;
-
- if (cron != null && !cron.isEmpty() && !"UNSCHEDULE".equals(cron)) {
- cronField = cron.split(" ")[field].trim();
- }
-
- return cronField;
- }
-
- public String getCronExpression() {
- String cronExpression = null;
-
- if (seconds != null && seconds.getInput() != null && minutes != null && minutes.getInput() != null
- && hours != null && hours.getInput() != null && daysOfMonth != null && daysOfMonth.getInput() != null
- && months != null && months.getInput() != null && daysOfWeek != null && daysOfWeek.getInput() != null) {
-
- cronExpression = new StringBuilder().
- append(seconds.getInput().trim()).append(" ").
- append(minutes.getInput().trim()).append(" ").
- append(hours.getInput().trim()).append(" ").
- append(daysOfMonth.getInput().trim()).append(" ").
- append(months.getInput().trim()).append(" ").
- append(daysOfWeek.getInput().trim()).toString();
- }
-
- return cronExpression;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/markup/html/list/AltListView.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/markup/html/list/AltListView.java b/console/src/main/java/org/apache/syncope/console/markup/html/list/AltListView.java
deleted file mode 100644
index cab7a97..0000000
--- a/console/src/main/java/org/apache/syncope/console/markup/html/list/AltListView.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.markup.html.list;
-
-import java.util.List;
-import org.apache.wicket.markup.ComponentTag;
-import org.apache.wicket.markup.html.list.ListItem;
-import org.apache.wicket.markup.html.list.ListView;
-import org.apache.wicket.model.IModel;
-
-public abstract class AltListView<T> extends ListView<T> {
-
- private static final long serialVersionUID = 251378224847354710L;
-
- public AltListView(final String id) {
- super(id);
- }
-
- public AltListView(final String id, final IModel<? extends List<? extends T>> model) {
- super(id, model);
- }
-
- public AltListView(final String id, final List<? extends T> list) {
- super(id, list);
- }
-
- @Override
- protected ListItem<T> newItem(final int index, final IModel<T> itemModel) {
- return new ListItem<T>(index, itemModel) {
-
- private static final long serialVersionUID = 5473483270932376694L;
-
- @Override
- protected void onComponentTag(final ComponentTag tag) {
- if (index % 2 == 0) {
- tag.append("class", "alt", " ");
- }
-
- super.onComponentTag(tag);
- }
- };
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/markup/html/list/ConnConfPropertyListView.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/markup/html/list/ConnConfPropertyListView.java b/console/src/main/java/org/apache/syncope/console/markup/html/list/ConnConfPropertyListView.java
deleted file mode 100644
index 9597951..0000000
--- a/console/src/main/java/org/apache/syncope/console/markup/html/list/ConnConfPropertyListView.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.markup.html.list;
-
-import java.io.Serializable;
-import java.util.List;
-import java.util.Set;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.common.types.ConnConfProperty;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxPasswordFieldPanel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
-import org.apache.syncope.console.wicket.markup.html.form.FieldPanel;
-import org.apache.syncope.console.wicket.markup.html.form.MultiFieldPanel;
-import org.apache.syncope.console.wicket.markup.html.form.SpinnerFieldPanel;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.form.PasswordTextField;
-import org.apache.wicket.markup.html.list.ListItem;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.model.PropertyModel;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.util.ClassUtils;
-
-public class ConnConfPropertyListView extends AltListView<ConnConfProperty> {
-
- private static final long serialVersionUID = -5239334900329150316L;
-
- private static final Logger LOG = LoggerFactory.getLogger(ConnConfPropertyListView.class);
-
- private final boolean withOverridable;
-
- private final Set<ConnConfProperty> configuration;
-
- public ConnConfPropertyListView(final String id, final IModel<? extends List<? extends ConnConfProperty>> model,
- final boolean withOverridable, final Set<ConnConfProperty> configuration) {
-
- super(id, model);
- this.configuration = configuration;
- this.withOverridable = withOverridable;
- }
-
- @Override
- @SuppressWarnings({ "unchecked", "rawtypes" })
- protected void populateItem(final ListItem<ConnConfProperty> item) {
- final ConnConfProperty property = item.getModelObject();
-
- final Label label = new Label("connPropAttrSchema",
- StringUtils.isBlank(property.getSchema().getDisplayName())
- ? property.getSchema().getName()
- : property.getSchema().getDisplayName());
- item.add(label);
-
- FieldPanel<? extends Serializable> field;
- boolean required = false;
- boolean isArray = false;
-
- if (property.getSchema().isConfidential()
- || Constants.GUARDED_STRING.equalsIgnoreCase(property.getSchema().getType())
- || Constants.GUARDED_BYTE_ARRAY.equalsIgnoreCase(property.getSchema().getType())) {
-
- field = new AjaxPasswordFieldPanel("panel",
- label.getDefaultModelObjectAsString(), new Model<String>());
- ((PasswordTextField) field.getField()).setResetPassword(false);
-
- required = property.getSchema().isRequired();
- } else {
- Class<?> propertySchemaClass;
- try {
- propertySchemaClass =
- ClassUtils.forName(property.getSchema().getType(), ClassUtils.getDefaultClassLoader());
- if (ClassUtils.isPrimitiveOrWrapper(propertySchemaClass)) {
- propertySchemaClass = org.apache.commons.lang3.ClassUtils.primitiveToWrapper(propertySchemaClass);
- }
- } catch (Exception e) {
- LOG.error("Error parsing attribute type", e);
- propertySchemaClass = String.class;
- }
-
- if (ClassUtils.isAssignable(Number.class, propertySchemaClass)) {
- @SuppressWarnings("unchecked")
- final Class<Number> numberClass = (Class<Number>) propertySchemaClass;
- field = new SpinnerFieldPanel<Number>("panel",
- label.getDefaultModelObjectAsString(), numberClass, new Model<Number>(), null, null);
-
- required = property.getSchema().isRequired();
- } else if (ClassUtils.isAssignable(Boolean.class, propertySchemaClass)) {
- field = new AjaxCheckBoxPanel("panel",
- label.getDefaultModelObjectAsString(), new Model<Boolean>());
- } else {
- field = new AjaxTextFieldPanel("panel",
- label.getDefaultModelObjectAsString(), new Model<String>());
-
- required = property.getSchema().isRequired();
- }
-
- if (propertySchemaClass.isArray()) {
- isArray = true;
- }
- }
-
- field.setTitle(property.getSchema().getHelpMessage());
-
- if (required) {
- field.addRequiredLabel();
- }
-
- if (isArray) {
- if (property.getValues().isEmpty()) {
- property.getValues().add(null);
- }
-
- final MultiFieldPanel multiFieldPanel = new MultiFieldPanel("panel",
- new PropertyModel<List<String>>(property, "values"), field);
- item.add(multiFieldPanel);
- } else {
- setNewFieldModel(field, property.getValues());
- item.add(field);
- }
-
- if (withOverridable) {
- item.add(new AjaxCheckBoxPanel("connPropAttrOverridable",
- "connPropAttrOverridable", new PropertyModel<Boolean>(property, "overridable")));
- }
-
- configuration.add(property);
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- private void setNewFieldModel(final FieldPanel field, final List<Object> values) {
- field.setNewModel(values);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java b/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java
deleted file mode 100644
index d57b1b0..0000000
--- a/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.pages;
-
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.commons.XMLRolesReader;
-import org.apache.syncope.console.init.MIMETypesInitializer;
-import org.apache.syncope.console.pages.panels.NotificationPanel;
-import org.apache.syncope.console.rest.ConfigurationRestClient;
-import org.apache.syncope.console.rest.ReportRestClient;
-import org.apache.syncope.console.rest.ResourceRestClient;
-import org.apache.syncope.console.rest.RoleRestClient;
-import org.apache.syncope.console.rest.SchemaRestClient;
-import org.apache.syncope.console.rest.TaskRestClient;
-import org.apache.syncope.console.rest.UserRestClient;
-import org.apache.syncope.console.rest.UserSelfRestClient;
-import org.apache.syncope.markup.head.MetaHeaderItem;
-import org.apache.wicket.markup.head.HeaderItem;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.PriorityHeaderItem;
-import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AbstractBasePage extends WebPage {
-
- private static final long serialVersionUID = 8611724965544132636L;
-
- /**
- * Logger.
- */
- protected static final Logger LOG = LoggerFactory.getLogger(AbstractBasePage.class);
-
- protected static final String TASKS = "Tasks";
-
- protected static final String FORM = "form";
-
- protected static final String CANCEL = "cancel";
-
- protected static final String SUBMIT = "submit";
-
- protected static final String APPLY = "apply";
-
- protected static final String NAME = "name";
-
- protected final HeaderItem meta = new MetaHeaderItem("X-UA-Compatible", "IE=edge");
-
- @SpringBean
- protected XMLRolesReader xmlRolesReader;
-
- @SpringBean
- protected UserRestClient userRestClient;
-
- @SpringBean
- protected UserSelfRestClient userSelfRestClient;
-
- @SpringBean
- protected RoleRestClient roleRestClient;
-
- @SpringBean
- protected TaskRestClient taskRestClient;
-
- @SpringBean
- protected SchemaRestClient schemaRestClient;
-
- @SpringBean
- protected ResourceRestClient resourceRestClient;
-
- @SpringBean
- protected ReportRestClient reportRestClient;
-
- @SpringBean
- protected ConfigurationRestClient confRestClient;
-
- @SpringBean
- protected MIMETypesInitializer mimeTypesInitializer;
-
- protected NotificationPanel feedbackPanel;
-
- /**
- * Response flag set by the Modal Window after the operation is completed.
- */
- protected boolean modalResult = false;
-
- public AbstractBasePage() {
- this(null);
- }
-
- public AbstractBasePage(final PageParameters parameters) {
- super(parameters);
-
- feedbackPanel = new NotificationPanel(Constants.FEEDBACK);
- feedbackPanel.setOutputMarkupId(true);
- add(feedbackPanel);
- }
-
- public NotificationPanel getFeedbackPanel() {
- return feedbackPanel;
- }
-
- public boolean isModalResult() {
- return modalResult;
- }
-
- public void setModalResult(final boolean operationResult) {
- this.modalResult = operationResult;
- }
-
- @Override
- public void renderHead(final IHeaderResponse response) {
- super.renderHead(response);
- response.render(new PriorityHeaderItem(meta));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java b/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java
deleted file mode 100644
index 490e62f..0000000
--- a/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.pages;
-
-import org.apache.syncope.common.to.SchedTaskTO;
-import org.apache.syncope.common.SyncopeClientException;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.commons.DateFormatROModel;
-import org.apache.syncope.console.markup.html.CrontabContainer;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.model.ResourceModel;
-import org.springframework.util.StringUtils;
-
-/**
- * Modal window with Task form (to stop and start execution).
- */
-public abstract class AbstractSchedTaskModalPage extends TaskModalPage {
-
- private static final long serialVersionUID = 2892005971093059242L;
-
- protected CrontabContainer crontab;
-
- public AbstractSchedTaskModalPage(final ModalWindow window, final SchedTaskTO taskTO,
- final PageReference pageRef) {
-
- super(taskTO);
-
- crontab = new CrontabContainer("crontab", new PropertyModel<String>(taskTO, "cronExpression"),
- taskTO.getCronExpression());
- form.add(crontab);
-
- final AjaxTextFieldPanel name =
- new AjaxTextFieldPanel("name", "name", new PropertyModel<String>(taskTO, "name"));
- name.setEnabled(true);
- profile.add(name);
-
- final AjaxTextFieldPanel description = new AjaxTextFieldPanel("description", "description",
- new PropertyModel<String>(taskTO, "description"));
- description.setEnabled(true);
- profile.add(description);
-
- final AjaxTextFieldPanel lastExec = new AjaxTextFieldPanel("lastExec", getString("lastExec"),
- new DateFormatROModel(new PropertyModel<String>(taskTO, "lastExec")));
- lastExec.setEnabled(false);
- profile.add(lastExec);
-
- final AjaxTextFieldPanel nextExec = new AjaxTextFieldPanel("nextExec", getString("nextExec"),
- new DateFormatROModel(new PropertyModel<String>(taskTO, "nextExec")));
- nextExec.setEnabled(false);
- profile.add(nextExec);
-
- final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(APPLY)) {
-
- private static final long serialVersionUID = -958724007591692537L;
-
- @Override
- protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- SchedTaskTO taskTO = (SchedTaskTO) form.getModelObject();
- taskTO.setCronExpression(StringUtils.hasText(taskTO.getCronExpression())
- ? crontab.getCronExpression()
- : null);
-
- try {
- submitAction(taskTO);
-
- ((BasePage) pageRef.getPage()).setModalResult(true);
-
- window.close(target);
- } catch (SyncopeClientException e) {
- LOG.error("While creating or updating task", e);
- error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
- }
- }
-
- @Override
- protected void onError(final AjaxRequestTarget target, final Form<?> form) {
- feedbackPanel.refresh(target);
- }
- };
-
- final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
-
- private static final long serialVersionUID = -958724007591692537L;
-
- @Override
- protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- window.close(target);
- }
- };
-
- cancel.setDefaultFormProcessing(false);
-
- if (taskTO.getId() > 0) {
- MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER, xmlRolesReader.getEntitlement(TASKS,
- "update"));
- } else {
- MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER, xmlRolesReader.getEntitlement(TASKS,
- "create"));
- }
-
- form.add(submit);
- form.add(cancel);
- }
-
- protected abstract void submitAction(SchedTaskTO taskTO);
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/pages/AbstractSchemaModalPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/AbstractSchemaModalPage.java b/console/src/main/java/org/apache/syncope/console/pages/AbstractSchemaModalPage.java
deleted file mode 100644
index e84e3f8..0000000
--- a/console/src/main/java/org/apache/syncope/console/pages/AbstractSchemaModalPage.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.pages;
-
-import org.apache.syncope.common.to.AbstractSchemaTO;
-import org.apache.syncope.common.types.AttributableType;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-
-/**
- * Modal window with Schema form.
- */
-public abstract class AbstractSchemaModalPage<T extends AbstractSchemaTO> extends BaseModalPage {
-
- private static final long serialVersionUID = 7369215690388444748L;
-
- protected AttributableType kind;
-
- public AbstractSchemaModalPage(final AttributableType kind) {
- this.kind = kind;
- }
-
- public abstract void setSchemaModalPage(PageReference callerPageRef, ModalWindow window, T schema,
- boolean createFlag);
-
- public AttributableType getKind() {
- return kind;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/pages/AbstractStatusModalPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/AbstractStatusModalPage.java b/console/src/main/java/org/apache/syncope/console/pages/AbstractStatusModalPage.java
deleted file mode 100644
index fd7ce19..0000000
--- a/console/src/main/java/org/apache/syncope/console/pages/AbstractStatusModalPage.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.pages;
-
-import org.apache.wicket.markup.html.panel.Fragment;
-
-public class AbstractStatusModalPage extends BaseModalPage {
-
- private static final long serialVersionUID = 6633408683036028540L;
-
- public AbstractStatusModalPage() {
- add(new Fragment("pwdMgtFields", "emptyFragment", this));
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/pages/AbstractSyncTaskModalPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/AbstractSyncTaskModalPage.java b/console/src/main/java/org/apache/syncope/console/pages/AbstractSyncTaskModalPage.java
deleted file mode 100644
index 1ab08e8..0000000
--- a/console/src/main/java/org/apache/syncope/console/pages/AbstractSyncTaskModalPage.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.pages;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.common.to.AbstractSyncTaskTO;
-import org.apache.syncope.common.to.ResourceTO;
-import org.apache.syncope.common.types.MatchingRule;
-import org.apache.syncope.common.types.UnmatchingRule;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.commons.SelectChoiceRenderer;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.form.DropDownChoice;
-import org.apache.wicket.markup.html.list.ListItem;
-import org.apache.wicket.markup.html.list.ListView;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.LoadableDetachableModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.model.PropertyModel;
-
-/**
- * Abstract Modal window for Sync and Push Task form.
- */
-public abstract class AbstractSyncTaskModalPage extends AbstractSchedTaskModalPage {
-
- private static final long serialVersionUID = 2148403203517274669L;
-
- protected AjaxDropDownChoicePanel<MatchingRule> matchingRule;
-
- protected AjaxDropDownChoicePanel<UnmatchingRule> unmatchingRule;
-
- protected abstract List<String> getSyncActions();
-
- final IModel<List<String>> allResources = new LoadableDetachableModel<List<String>>() {
-
- private static final long serialVersionUID = 5275935387613157437L;
-
- @Override
- protected List<String> load() {
- final List<String> resourceNames = new ArrayList<String>();
-
- for (ResourceTO resourceTO : resourceRestClient.getAll()) {
- resourceNames.add(resourceTO.getName());
- }
-
- Collections.sort(resourceNames);
- return resourceNames;
- }
- };
-
- final IModel<List<String>> syncActionsClasses = new LoadableDetachableModel<List<String>>() {
-
- private static final long serialVersionUID = 5275935387613157438L;
-
- @Override
- protected List<String> load() {
- return getSyncActions();
- }
- };
-
- public AbstractSyncTaskModalPage(
- final ModalWindow window, final AbstractSyncTaskTO taskTO, final PageReference pageRef) {
-
- super(window, taskTO, pageRef);
-
- final AjaxDropDownChoicePanel<String> resource = new AjaxDropDownChoicePanel<String>("resource",
- getString("resourceName"), new PropertyModel<String>(taskTO, "resource"));
- resource.setChoices(allResources.getObject());
- resource.setChoiceRenderer(new SelectChoiceRenderer<String>());
- resource.addRequiredLabel();
- resource.setEnabled(taskTO.getId() == 0);
- resource.setStyleSheet("ui-widget-content ui-corner-all long_dynamicsize");
-
- profile.add(resource);
-
- final WebMarkupContainer syncActionsClassNames = new WebMarkupContainer("syncActionsClassNames");
- syncActionsClassNames.setOutputMarkupId(true);
- profile.add(syncActionsClassNames);
-
- final AjaxLink<Void> first = new IndicatingAjaxLink<Void>("first") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- taskTO.getActionsClassNames().add(StringUtils.EMPTY);
- setVisible(false);
- target.add(syncActionsClassNames);
- }
- };
- first.setOutputMarkupPlaceholderTag(true);
- first.setVisible(taskTO.getActionsClassNames().isEmpty());
- syncActionsClassNames.add(first);
-
- final ListView<String> actionsClasses = new ListView<String>(
- "actionsClasses", new PropertyModel<List<String>>(taskTO, "actionsClassNames")) {
-
- private static final long serialVersionUID = 9101744072914090143L;
-
- @Override
- protected void populateItem(final ListItem<String> item) {
- final String className = item.getModelObject();
-
- final DropDownChoice<String> actionsClass = new DropDownChoice<String>(
- "actionsClass", new Model<String>(className), syncActionsClasses.getObject());
- actionsClass.setNullValid(true);
- actionsClass.setRequired(true);
- actionsClass.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
-
- private static final long serialVersionUID = -1107858522700306810L;
-
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- taskTO.getActionsClassNames().set(item.getIndex(), actionsClass.getModelObject());
- target.add(syncActionsClassNames);
- }
- });
- actionsClass.setRequired(true);
- actionsClass.setOutputMarkupId(true);
- actionsClass.setRequired(true);
- item.add(actionsClass);
-
- AjaxLink<Void> minus = new IndicatingAjaxLink<Void>("drop") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- taskTO.getActionsClassNames().remove(className);
- first.setVisible(taskTO.getActionsClassNames().isEmpty());
- target.add(syncActionsClassNames);
- }
- };
- item.add(minus);
-
- final AjaxLink<Void> plus = new IndicatingAjaxLink<Void>("add") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- taskTO.getActionsClassNames().add(StringUtils.EMPTY);
- target.add(syncActionsClassNames);
- }
- };
- plus.setOutputMarkupPlaceholderTag(true);
- plus.setVisible(item.getIndex() == taskTO.getActionsClassNames().size() - 1);
- item.add(plus);
- }
- };
- syncActionsClassNames.add(actionsClasses);
-
- syncActionsClassNames.setEnabled(!syncActionsClasses.getObject().isEmpty());
-
- final AjaxCheckBoxPanel creates = new AjaxCheckBoxPanel("performCreate", getString("creates"),
- new PropertyModel<Boolean>(taskTO, "performCreate"));
- profile.add(creates);
-
- final AjaxCheckBoxPanel updates = new AjaxCheckBoxPanel("performUpdate", getString("updates"),
- new PropertyModel<Boolean>(taskTO, "performUpdate"));
- profile.add(updates);
-
- final AjaxCheckBoxPanel deletes = new AjaxCheckBoxPanel("performDelete", getString("updates"),
- new PropertyModel<Boolean>(taskTO, "performDelete"));
- profile.add(deletes);
-
- final AjaxCheckBoxPanel syncStatus = new AjaxCheckBoxPanel("syncStatus", getString("syncStatus"),
- new PropertyModel<Boolean>(taskTO, "syncStatus"));
- profile.add(syncStatus);
-
- matchingRule = new AjaxDropDownChoicePanel<MatchingRule>(
- "matchingRule", "matchingRule", new PropertyModel<MatchingRule>(taskTO, "matchingRule"));
- matchingRule.setChoices(Arrays.asList(MatchingRule.values()));
- ((DropDownChoice) matchingRule.getField()).setNullValid(false);
-
- unmatchingRule = new AjaxDropDownChoicePanel<UnmatchingRule>(
- "unmatchingRule", "unmatchingRule", new PropertyModel<UnmatchingRule>(taskTO, "unmatchingRule"));
- unmatchingRule.setChoices(Arrays.asList(UnmatchingRule.values()));
- ((DropDownChoice) unmatchingRule.getField()).setNullValid(false);
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/pages/ActivitiModelerPopupPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/ActivitiModelerPopupPage.java b/console/src/main/java/org/apache/syncope/console/pages/ActivitiModelerPopupPage.java
deleted file mode 100644
index 1c4f203..0000000
--- a/console/src/main/java/org/apache/syncope/console/pages/ActivitiModelerPopupPage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.pages;
-
-import org.apache.wicket.markup.html.WebPage;
-
-public class ActivitiModelerPopupPage extends WebPage {
-
- private static final long serialVersionUID = -7031206743629422898L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java b/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java
deleted file mode 100644
index 20e57ad..0000000
--- a/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.pages;
-
-import java.io.Serializable;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.math.NumberUtils;
-import org.apache.syncope.common.to.WorkflowFormPropertyTO;
-import org.apache.syncope.common.to.WorkflowFormTO;
-import org.apache.syncope.common.SyncopeClientException;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.commons.MapChoiceRenderer;
-import org.apache.syncope.console.markup.html.list.AltListView;
-import org.apache.syncope.console.rest.ApprovalRestClient;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
-import org.apache.syncope.console.wicket.markup.html.form.DateTimeFieldPanel;
-import org.apache.syncope.console.wicket.markup.html.form.FieldPanel;
-import org.apache.syncope.console.wicket.markup.html.form.SpinnerFieldPanel;
-import org.apache.wicket.Page;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.list.ListItem;
-import org.apache.wicket.markup.html.list.ListView;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.LoadableDetachableModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
-
-public class ApprovalModalPage extends BaseModalPage {
-
- private static final long serialVersionUID = -8847854414429745216L;
-
- private final static int USER_WIN_HEIGHT = 550;
-
- private final static int USER_WIN_WIDTH = 800;
-
- @SpringBean
- private ApprovalRestClient restClient;
-
- private final ModalWindow editUserWin;
-
- public ApprovalModalPage(final PageReference pageRef, final ModalWindow window, final WorkflowFormTO formTO) {
- super();
-
- IModel<List<WorkflowFormPropertyTO>> formProps = new LoadableDetachableModel<List<WorkflowFormPropertyTO>>() {
-
- private static final long serialVersionUID = 3169142472626817508L;
-
- @Override
- protected List<WorkflowFormPropertyTO> load() {
- return formTO.getProperties();
- }
- };
-
- final ListView<WorkflowFormPropertyTO> propView =
- new AltListView<WorkflowFormPropertyTO>("propView", formProps) {
-
- private static final long serialVersionUID = 9101744072914090143L;
-
- @Override
- @SuppressWarnings({ "unchecked", "rawtypes" })
- protected void populateItem(final ListItem<WorkflowFormPropertyTO> item) {
- final WorkflowFormPropertyTO prop = item.getModelObject();
-
- Label label = new Label("key", prop.getName() == null
- ? prop.getId()
- : prop.getName());
- item.add(label);
-
- FieldPanel field;
- switch (prop.getType()) {
- case Boolean:
- field = new AjaxDropDownChoicePanel("value", label.getDefaultModelObjectAsString(),
- new Model<Boolean>(Boolean.valueOf(prop.getValue()))).setChoices(Arrays.asList(
- new String[] { "Yes", "No" }));
- break;
-
- case Date:
- SimpleDateFormat df = StringUtils.isNotBlank(prop.getDatePattern())
- ? new SimpleDateFormat(prop.getDatePattern())
- : new SimpleDateFormat();
- Date parsedDate = null;
- if (StringUtils.isNotBlank(prop.getValue())) {
- try {
- parsedDate = df.parse(prop.getValue());
- } catch (ParseException e) {
- LOG.error("Unparsable date: {}", prop.getValue(), e);
- }
- }
-
- field = new DateTimeFieldPanel("value", label.getDefaultModelObjectAsString(),
- new Model<Date>(parsedDate), df.toLocalizedPattern());
- break;
-
- case Enum:
- MapChoiceRenderer<String, String> enumCR =
- new MapChoiceRenderer<String, String>(prop.getEnumValues());
-
- field = new AjaxDropDownChoicePanel("value", label.getDefaultModelObjectAsString(),
- new Model(prop.getValue())).setChoiceRenderer(enumCR).setChoices(new Model() {
-
- private static final long serialVersionUID = -858521070366432018L;
-
- @Override
- public Serializable getObject() {
- return new ArrayList<String>(prop.getEnumValues().keySet());
- }
- });
- break;
-
- case Long:
- field = new SpinnerFieldPanel<Long>("value", label.getDefaultModelObjectAsString(),
- Long.class, new Model<Long>(NumberUtils.toLong(prop.getValue())),
- null, null);
- break;
-
- case String:
- default:
- field = new AjaxTextFieldPanel("value", PARENT_PATH,
- new Model<String>(prop.getValue()));
- break;
- }
-
- field.setReadOnly(!prop.isWritable());
- if (prop.isRequired()) {
- field.addRequiredLabel();
- }
-
- item.add(field);
- }
- };
-
- final AjaxButton userDetails = new IndicatingAjaxButton("userDetails",
- new Model<String>(getString("userDetails"))) {
-
- private static final long serialVersionUID = -4804368561204623354L;
-
- @Override
- protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- editUserWin.setPageCreator(new ModalWindow.PageCreator() {
-
- private static final long serialVersionUID = -7834632442532690940L;
-
- @Override
- public Page createPage() {
- return new ViewUserModalPage(ApprovalModalPage.this.getPageReference(), editUserWin,
- userRestClient.read(formTO.getUserId())) {
-
- private static final long serialVersionUID = -2819994749866481607L;
-
- @Override
- protected void closeAction(final AjaxRequestTarget target, final Form form) {
- setResponsePage(ApprovalModalPage.this);
- }
- };
- }
- });
-
- editUserWin.show(target);
- }
- };
- MetaDataRoleAuthorizationStrategy.authorize(userDetails, ENABLE,
- xmlRolesReader.getEntitlement("Users", "read"));
-
- final AjaxButton submit = new IndicatingAjaxButton(APPLY, new Model<String>(getString(SUBMIT))) {
-
- private static final long serialVersionUID = -958724007591692537L;
-
- @Override
- protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-
- Map<String, WorkflowFormPropertyTO> props = formTO.getPropertyMap();
-
- for (int i = 0; i < propView.size(); i++) {
- @SuppressWarnings("unchecked")
- ListItem<WorkflowFormPropertyTO> item = (ListItem<WorkflowFormPropertyTO>) propView.get(i);
- String input = ((FieldPanel) item.get("value")).getField().getInput();
-
- if (!props.containsKey(item.getModelObject().getId())) {
- props.put(item.getModelObject().getId(), new WorkflowFormPropertyTO());
- }
-
- if (item.getModelObject().isWritable()) {
- switch (item.getModelObject().getType()) {
- case Boolean:
- props.get(item.getModelObject().getId()).setValue(String.valueOf("0".equals(input)));
- break;
-
- case Date:
- case Enum:
- case String:
- case Long:
- default:
- props.get(item.getModelObject().getId()).setValue(input);
- break;
- }
- }
- }
-
- formTO.setProperties(props.values());
- try {
- restClient.submitForm(formTO);
-
- ((Todo) pageRef.getPage()).setModalResult(true);
- window.close(target);
- } catch (SyncopeClientException e) {
- error(getString(Constants.ERROR) + ": " + e.getMessage());
- LOG.error("While submitting form {}", formTO, e);
- feedbackPanel.refresh(target);
- }
- }
-
- @Override
- protected void onError(final AjaxRequestTarget target, final Form<?> form) {
- feedbackPanel.refresh(target);
- }
- };
-
- final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
-
- private static final long serialVersionUID = -958724007591692537L;
-
- @Override
- protected void onSubmit(final AjaxRequestTarget target, final Form form) {
- window.close(target);
- }
-
- @Override
- protected void onError(final AjaxRequestTarget target, final Form form) {
- // nothing
- }
- };
-
- cancel.setDefaultFormProcessing(false);
-
- Form form = new Form(FORM);
- form.add(propView);
- form.add(userDetails);
- form.add(submit);
- form.add(cancel);
-
- MetaDataRoleAuthorizationStrategy.authorize(form, ENABLE, xmlRolesReader.getEntitlement("Approval",
- SUBMIT));
-
- editUserWin = new ModalWindow("editUserWin");
- editUserWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- editUserWin.setInitialHeight(USER_WIN_HEIGHT);
- editUserWin.setInitialWidth(USER_WIN_WIDTH);
- editUserWin.setCookieName("edit-user-modal");
- add(editUserWin);
-
- add(form);
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java b/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java
deleted file mode 100644
index 47d829f..0000000
--- a/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.pages;
-
-import org.apache.syncope.console.commons.CloseOnESCBehavior;
-
-/**
- * Syncope Modal Window.
- */
-public abstract class BaseModalPage extends AbstractBasePage {
-
- private static final long serialVersionUID = -1443079028368471943L;
-
- public BaseModalPage() {
- super();
-
- add(new CloseOnESCBehavior("keyup"));
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/pages/BasePage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/BasePage.java b/console/src/main/java/org/apache/syncope/console/pages/BasePage.java
deleted file mode 100644
index 947775a..0000000
--- a/console/src/main/java/org/apache/syncope/console/pages/BasePage.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.pages;
-
-import org.apache.syncope.console.SyncopeApplication;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.wicket.Component;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.IAjaxIndicatorAware;
-import org.apache.wicket.behavior.Behavior;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-import org.apache.wicket.markup.ComponentTag;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.link.BookmarkablePageLink;
-import org.apache.wicket.request.mapper.parameter.PageParameters;
-
-/**
- * Syncope Wicket base-page.
- */
-public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
-
- private static final long serialVersionUID = 1571997737305598502L;
-
- public BasePage() {
- this(null);
- }
-
- public BasePage(final PageParameters parameters) {
- super(parameters);
-
- pageSetup();
- }
-
- private void pageSetup() {
- ((SyncopeApplication) getApplication()).setupNavigationPanel(this, xmlRolesReader, true);
-
- final String kind = getClass().getSimpleName().toLowerCase();
- final BookmarkablePageLink kindLink = (BookmarkablePageLink) get(kind);
- if (kindLink != null) {
- kindLink.add(new Behavior() {
-
- private static final long serialVersionUID = 1469628524240283489L;
-
- @Override
- public void onComponentTag(final Component component, final ComponentTag tag) {
- tag.put("class", kind);
- }
- });
-
- Component kindIcon = kindLink.get(0);
- if (kindIcon != null) {
- kindIcon.add(new Behavior() {
-
- private static final long serialVersionUID = 1469628524240283489L;
-
- @Override
- public void onComponentTag(final Component component, final ComponentTag tag) {
- tag.put("src", "../.." + SyncopeApplication.IMG_PREFIX + kind + Constants.PNG_EXT);
- }
- });
- }
- }
-
- ((SyncopeApplication) getApplication()).setupEditProfileModal(this, userSelfRestClient);
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return "veil";
- }
-
- /**
- * Set a WindowClosedCallback for a ModalWindow instance.
- *
- * @param window window
- * @param container container
- */
- protected void setWindowClosedCallback(final ModalWindow window, final WebMarkupContainer container) {
-
- window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
-
- private static final long serialVersionUID = 8804221891699487139L;
-
- @Override
- public void onClose(final AjaxRequestTarget target) {
- target.add(container);
- if (isModalResult()) {
- info(getString(Constants.OPERATION_SUCCEEDED));
- feedbackPanel.refresh(target);
- setModalResult(false);
- }
- }
- });
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/console/src/main/java/org/apache/syncope/console/pages/BasePopupPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/BasePopupPage.java b/console/src/main/java/org/apache/syncope/console/pages/BasePopupPage.java
deleted file mode 100644
index 837c57d..0000000
--- a/console/src/main/java/org/apache/syncope/console/pages/BasePopupPage.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.syncope.console.pages;
-
-public class BasePopupPage extends AbstractBasePage {
-
- private static final long serialVersionUID = -2633667311332659505L;
-
-}
[30/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/head/MetaHeaderItem.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/head/MetaHeaderItem.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/head/MetaHeaderItem.java
new file mode 100644
index 0000000..2c5150e
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/head/MetaHeaderItem.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.head;
+
+import java.io.Serializable;
+import java.util.Arrays;
+import org.apache.wicket.markup.head.HeaderItem;
+import org.apache.wicket.request.Response;
+
+public class MetaHeaderItem extends HeaderItem implements Serializable {
+
+ private static final long serialVersionUID = 7578609827530302053L;
+
+ private final String key;
+
+ private final String value;
+
+ public MetaHeaderItem(final String key, final String value) {
+ this.key = key;
+ this.value = value;
+ }
+
+ @Override
+ public Iterable<?> getRenderTokens() {
+ return Arrays.asList("meta-" + key + "-" + value);
+ }
+
+ @Override
+ public void render(final Response response) {
+ response.write("<meta http-equiv=\"" + key + "\" content=\"" + value + "\"/>");
+ response.write("\n");
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer.java
new file mode 100644
index 0000000..5555616
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/CrontabContainer.java
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html;
+
+import java.util.Arrays;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.SelectChoiceRenderer;
+import org.apache.syncope.client.console.commons.SelectOption;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.FormComponent;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+
+public class CrontabContainer extends WebMarkupContainer {
+
+ private static final long serialVersionUID = 7879593326085337650L;
+
+ private final TextField seconds;
+
+ private final TextField minutes;
+
+ private final TextField hours;
+
+ private final TextField daysOfMonth;
+
+ private final TextField months;
+
+ private final TextField daysOfWeek;
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public CrontabContainer(final String id, final PropertyModel<String> cronExpressionModel,
+ final String cronExpression) {
+
+ super(id);
+ setOutputMarkupId(true);
+
+ final SelectOption[] CRON_TEMPLATES = {
+ new SelectOption(getString("selOpt1"), "UNSCHEDULE"),
+ new SelectOption(getString("selOpt2"), "0 0/5 * * * ?"),
+ new SelectOption(getString("selOpt3"), "0 0 12 * * ?"),
+ new SelectOption(getString("selOpt4"), "0 0 0 1 * ?"),
+ new SelectOption(getString("selOpt5"), "0 0 0 L * ?"),
+ new SelectOption(getString("selOpt6"), "0 0 0 ? * 2")
+ };
+
+ final DropDownChoice<SelectOption> cronTemplateChooser =
+ new DropDownChoice<SelectOption>("cronTemplateChooser") {
+
+ private static final long serialVersionUID = -5843424545478691442L;
+
+ @Override
+ protected CharSequence getDefaultChoice(final String selected) {
+ return "<option value=\"\">" + getString("chooseForTemplate") + "</option>";
+ }
+ };
+
+ cronTemplateChooser.setModel(new IModel<SelectOption>() {
+
+ private static final long serialVersionUID = 6762568283146531315L;
+
+ @Override
+ public SelectOption getObject() {
+ SelectOption result = null;
+ for (SelectOption so : CRON_TEMPLATES) {
+ if (so.getKeyValue().equals(cronExpressionModel.getObject())) {
+
+ result = so;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public void setObject(final SelectOption object) {
+ cronExpressionModel.setObject(object == null || object.equals(CRON_TEMPLATES[0])
+ ? null
+ : object.toString());
+ }
+
+ @Override
+ public void detach() {
+ // no detach
+ }
+ });
+ cronTemplateChooser.setChoices(Arrays.asList(CRON_TEMPLATES));
+ cronTemplateChooser.setChoiceRenderer(new SelectChoiceRenderer());
+ add(cronTemplateChooser);
+
+ seconds = new TextField("seconds", new Model(getCronField(cronExpression, 0)));
+ add(seconds);
+
+ minutes = new TextField("minutes", new Model(getCronField(cronExpression, 1)));
+ add(minutes);
+
+ hours = new TextField("hours", new Model(getCronField(cronExpression, 2)));
+ add(hours);
+
+ daysOfMonth = new TextField("daysOfMonth", new Model(getCronField(cronExpression, 3)));
+ add(daysOfMonth);
+
+ months = new TextField("months", new Model(getCronField(cronExpression, 4)));
+ add(months);
+
+ daysOfWeek = new TextField("daysOfWeek", new Model(getCronField(cronExpression, 5)));
+ add(daysOfWeek);
+
+ cronTemplateChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ seconds.setModelObject(getCronField(cronTemplateChooser, 0));
+ minutes.setModelObject(getCronField(cronTemplateChooser, 1));
+ hours.setModelObject(getCronField(cronTemplateChooser, 2));
+ daysOfMonth.setModelObject(getCronField(cronTemplateChooser, 3));
+ months.setModelObject(getCronField(cronTemplateChooser, 4));
+ daysOfWeek.setModelObject(getCronField(cronTemplateChooser, 5));
+ target.add(CrontabContainer.this);
+ }
+ });
+ }
+
+ private String getCronField(final FormComponent formComponent, final int field) {
+ String cronField = null;
+
+ if (formComponent != null) {
+ cronField = getCronField(formComponent.getInput(), field);
+ }
+
+ return cronField;
+ }
+
+ private String getCronField(final String cron, final int field) {
+ String cronField = null;
+
+ if (cron != null && !cron.isEmpty() && !"UNSCHEDULE".equals(cron)) {
+ cronField = cron.split(" ")[field].trim();
+ }
+
+ return cronField;
+ }
+
+ public String getCronExpression() {
+ String cronExpression = null;
+
+ if (seconds != null && seconds.getInput() != null && minutes != null && minutes.getInput() != null
+ && hours != null && hours.getInput() != null && daysOfMonth != null && daysOfMonth.getInput() != null
+ && months != null && months.getInput() != null && daysOfWeek != null && daysOfWeek.getInput() != null) {
+
+ cronExpression = new StringBuilder().
+ append(seconds.getInput().trim()).append(" ").
+ append(minutes.getInput().trim()).append(" ").
+ append(hours.getInput().trim()).append(" ").
+ append(daysOfMonth.getInput().trim()).append(" ").
+ append(months.getInput().trim()).append(" ").
+ append(daysOfWeek.getInput().trim()).toString();
+ }
+
+ return cronExpression;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.java
new file mode 100644
index 0000000..30bb47c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class AbstractFieldPanel<T> extends Panel {
+
+ /**
+ * Logger.
+ */
+ protected static final Logger LOG = LoggerFactory.getLogger(AbstractFieldPanel.class);
+
+ private static final long serialVersionUID = 5958017546318855690L;
+
+ public AbstractFieldPanel(final String id, final IModel<T> model) {
+ super(id, model);
+ }
+
+ public abstract AbstractFieldPanel setModelObject(T object);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
new file mode 100644
index 0000000..159e5d9
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.io.Serializable;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+
+public abstract class ActionLink implements Serializable {
+
+ private static final long serialVersionUID = 7031329706998320639L;
+
+ private boolean reloadFeedbackPanel = true;
+
+ public enum ActionType {
+
+ CREATE("create"),
+ EDIT("read"),
+ USER_TEMPLATE("read"),
+ ROLE_TEMPLATE("read"),
+ RESET("update"),
+ ENABLE("update"),
+ SEARCH("read"),
+ DELETE("delete"),
+ EXECUTE("execute"),
+ DRYRUN("execute"),
+ CLAIM("claim"),
+ SELECT("read"),
+ EXPORT("read"),
+ SUSPEND("update"),
+ REACTIVATE("update"),
+ RELOAD("reload"),
+ CHANGE_VIEW("changeView"),
+ UNLINK("update"),
+ LINK("update"),
+ UNASSIGN("update"),
+ ASSIGN("update"),
+ DEPROVISION("update"),
+ PROVISION("update"),
+ MANAGE_RESOURCES("update"),
+ MANAGE_USERS("update"),
+ MANAGE_ROLES("update");
+
+ private final String actionId;
+
+ private ActionType(final String actionId) {
+ this.actionId = actionId;
+ }
+
+ public String getActionId() {
+ return actionId;
+ }
+ }
+
+ public abstract void onClick(final AjaxRequestTarget target);
+
+ public void postClick() {
+ }
+
+ public boolean feedbackPanelAutomaticReload() {
+ return reloadFeedbackPanel;
+ }
+
+ public ActionLink feedbackPanelAutomaticReload(final boolean reloadFeedbackPanel) {
+ this.reloadFeedbackPanel = reloadFeedbackPanel;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
new file mode 100644
index 0000000..8582741
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
@@ -0,0 +1,586 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import org.apache.syncope.client.console.commons.XMLRolesReader;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.IndicatingOnConfirmAjaxLink;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+/**
+ * This empty class must exist because there not seems to be alternative to provide specialized HTML for edit links.
+ */
+public class ActionLinksPanel extends Panel {
+
+ private static final long serialVersionUID = 322966537010107771L;
+
+ /**
+ * Role reader for authorizations management.
+ */
+ @SpringBean
+ protected XMLRolesReader xmlRolesReader;
+
+ private final PageReference pageRef;
+
+ public ActionLinksPanel(final String componentId, final IModel<?> model, final PageReference pageRef) {
+ super(componentId, model);
+ this.pageRef = pageRef;
+
+ super.add(new Fragment("panelClaim", "emptyFragment", this));
+ super.add(new Fragment("panelManageResources", "emptyFragment", this));
+ super.add(new Fragment("panelManageUsers", "emptyFragment", this));
+ super.add(new Fragment("panelManageRoles", "emptyFragment", this));
+ super.add(new Fragment("panelCreate", "emptyFragment", this));
+ super.add(new Fragment("panelEdit", "emptyFragment", this));
+ super.add(new Fragment("panelReset", "emptyFragment", this));
+ super.add(new Fragment("panelUserTemplate", "emptyFragment", this));
+ super.add(new Fragment("panelRoleTemplate", "emptyFragment", this));
+ super.add(new Fragment("panelEnable", "emptyFragment", this));
+ super.add(new Fragment("panelSearch", "emptyFragment", this));
+ super.add(new Fragment("panelDelete", "emptyFragment", this));
+ super.add(new Fragment("panelExecute", "emptyFragment", this));
+ super.add(new Fragment("panelDryRun", "emptyFragment", this));
+ super.add(new Fragment("panelSelect", "emptyFragment", this));
+ super.add(new Fragment("panelExport", "emptyFragment", this));
+ super.add(new Fragment("panelSuspend", "emptyFragment", this));
+ super.add(new Fragment("panelReactivate", "emptyFragment", this));
+ super.add(new Fragment("panelReload", "emptyFragment", this));
+ super.add(new Fragment("panelChangeView", "emptyFragment", this));
+ super.add(new Fragment("panelUnlink", "emptyFragment", this));
+ super.add(new Fragment("panelLink", "emptyFragment", this));
+ super.add(new Fragment("panelUnassign", "emptyFragment", this));
+ super.add(new Fragment("panelAssign", "emptyFragment", this));
+ super.add(new Fragment("panelDeprovision", "emptyFragment", this));
+ super.add(new Fragment("panelProvision", "emptyFragment", this));
+ }
+
+ public void add(
+ final ActionLink link, final ActionLink.ActionType type, final String pageId, final String actionId) {
+
+ addWithRoles(link, type, xmlRolesReader.getEntitlement(pageId, actionId), true);
+ }
+
+ public void add(
+ final ActionLink link, final ActionLink.ActionType type, final String pageId) {
+
+ add(link, type, pageId, true);
+ }
+
+ public void add(
+ final ActionLink link, final ActionLink.ActionType type, final String pageId, final boolean enabled) {
+
+ addWithRoles(link, type, xmlRolesReader.getEntitlement(pageId, type.getActionId()), enabled);
+ }
+
+ public void addWithRoles(
+ final ActionLink link, final ActionLink.ActionType type, final String roles) {
+
+ addWithRoles(link, type, roles, true);
+ }
+
+ public void addWithRoles(
+ final ActionLink link, final ActionLink.ActionType type, final String roles, final boolean enabled) {
+
+ Fragment fragment = null;
+
+ switch (type) {
+
+ case CLAIM:
+ fragment = new Fragment("panelClaim", "fragmentClaim", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("claimLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case MANAGE_RESOURCES:
+ fragment = new Fragment("panelManageResources", "fragmentManageResources", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("manageResourcesLink", pageRef) {
+
+ private static final long serialVersionUID = -6957616042924610291L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case MANAGE_USERS:
+ fragment = new Fragment("panelManageUsers", "fragmentManageUsers", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("manageUsersLink", pageRef) {
+
+ private static final long serialVersionUID = -6957616042924610292L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case MANAGE_ROLES:
+ fragment = new Fragment("panelManageRoles", "fragmentManageRoles", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("manageRolesLink", pageRef) {
+
+ private static final long serialVersionUID = -6957616042924610293L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case CREATE:
+ fragment = new Fragment("panelCreate", "fragmentCreate", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("createLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case RESET:
+ fragment = new Fragment("panelReset", "fragmentReset", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("resetLink", pageRef) {
+
+ private static final long serialVersionUID = -6957616042924610290L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ });
+ break;
+
+ case EDIT:
+ fragment = new Fragment("panelEdit", "fragmentEdit", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("editLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case USER_TEMPLATE:
+ fragment = new Fragment("panelUserTemplate", "fragmentUserTemplate", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("userTemplateLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case ROLE_TEMPLATE:
+ fragment = new Fragment("panelRoleTemplate", "fragmentRoleTemplate", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("roleTemplateLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case ENABLE:
+ fragment = new Fragment("panelEnable", "fragmentEnable", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("enableLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case SEARCH:
+ fragment = new Fragment("panelSearch", "fragmentSearch", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("searchLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case EXECUTE:
+ fragment = new Fragment("panelExecute", "fragmentExecute", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("executeLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case DRYRUN:
+ fragment = new Fragment("panelDryRun", "fragmentDryRun", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("dryRunLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case DELETE:
+ fragment = new Fragment("panelDelete", "fragmentDelete", this);
+
+ fragment.addOrReplace(new IndicatingOnConfirmAjaxLink<Void>("deleteLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+
+ break;
+
+ case SELECT:
+ fragment = new Fragment("panelSelect", "fragmentSelect", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("selectLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+
+ break;
+
+ case EXPORT:
+ fragment = new Fragment("panelExport", "fragmentExport", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("exportLink", pageRef) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case SUSPEND:
+ fragment = new Fragment("panelSuspend", "fragmentSuspend", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("suspendLink", pageRef) {
+
+ private static final long serialVersionUID = -6957616042924610291L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case REACTIVATE:
+ fragment = new Fragment("panelReactivate", "fragmentReactivate", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("reactivateLink", pageRef) {
+
+ private static final long serialVersionUID = -6957616042924610292L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case RELOAD:
+ fragment = new Fragment("panelReload", "fragmentReload", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("reloadLink", pageRef) {
+
+ private static final long serialVersionUID = -6957616042924610293L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case CHANGE_VIEW:
+ fragment = new Fragment("panelChangeView", "fragmentChangeView", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("changeViewLink", pageRef) {
+
+ private static final long serialVersionUID = -6957616042924610292L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case UNLINK:
+ fragment = new Fragment("panelUnlink", "fragmentUnlink", this);
+
+ fragment.addOrReplace(
+ new IndicatingOnConfirmAjaxLink<Void>("unlinkLink", pageRef, "confirmUnlink") {
+
+ private static final long serialVersionUID = -6957616042924610293L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case LINK:
+ fragment = new Fragment("panelLink", "fragmentLink", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("linkLink", pageRef) {
+
+ private static final long serialVersionUID = -6957616042924610303L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case UNASSIGN:
+ fragment = new Fragment("panelUnassign", "fragmentUnassign", this);
+
+ fragment.addOrReplace(
+ new IndicatingOnConfirmAjaxLink<Void>("unassignLink", pageRef, "confirmUnassign") {
+
+ private static final long serialVersionUID = -6957616042924610294L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case ASSIGN:
+ fragment = new Fragment("panelAssign", "fragmentAssign", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("assignLink", pageRef) {
+
+ private static final long serialVersionUID = -6957616042924610304L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case DEPROVISION:
+ fragment = new Fragment("panelDeprovision", "fragmentDeprovision", this);
+
+ fragment.addOrReplace(
+ new IndicatingOnConfirmAjaxLink<Void>("deprovisionLink", pageRef, "confirmDeprovision") {
+
+ private static final long serialVersionUID = -6957616042924610295L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+
+ case PROVISION:
+ fragment = new Fragment("panelProvision", "fragmentProvision", this);
+
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("provisionLink", pageRef) {
+
+ private static final long serialVersionUID = -6957616042924610305L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ link.onClick(target);
+ }
+ }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+ break;
+ default:
+ // do nothing
+ }
+
+ if (fragment != null) {
+ fragment.setEnabled(enabled);
+ MetaDataRoleAuthorizationStrategy.authorize(fragment, ENABLE, roles);
+ super.addOrReplace(fragment);
+ }
+ }
+
+ public void remove(final ActionLink.ActionType type) {
+ switch (type) {
+ case CLAIM:
+ super.addOrReplace(new Fragment("panelClaim", "emptyFragment", this));
+ break;
+
+ case MANAGE_RESOURCES:
+ super.addOrReplace(new Fragment("panelManageResources", "emptyFragment", this));
+ break;
+
+ case MANAGE_USERS:
+ super.addOrReplace(new Fragment("panelManageUsers", "emptyFragment", this));
+ break;
+
+ case MANAGE_ROLES:
+ super.addOrReplace(new Fragment("panelManageRoles", "emptyFragment", this));
+ break;
+
+ case CREATE:
+ super.addOrReplace(new Fragment("panelCreate", "emptyFragment", this));
+ break;
+
+ case EDIT:
+ super.addOrReplace(new Fragment("panelEdit", "emptyFragment", this));
+ break;
+
+ case USER_TEMPLATE:
+ super.addOrReplace(new Fragment("panelUserTemplate", "emptyFragment", this));
+ break;
+
+ case SEARCH:
+ super.addOrReplace(new Fragment("panelSearch", "emptyFragment", this));
+ break;
+
+ case EXECUTE:
+ super.addOrReplace(new Fragment("panelExecute", "emptyFragment", this));
+ break;
+
+ case DRYRUN:
+ super.addOrReplace(new Fragment("panelDryRun", "emptyFragment", this));
+ break;
+
+ case DELETE:
+ super.addOrReplace(new Fragment("panelDelete", "emptyFragment", this));
+ break;
+
+ case SELECT:
+ super.addOrReplace(new Fragment("panelSelect", "emptyFragment", this));
+ break;
+
+ case EXPORT:
+ super.addOrReplace(new Fragment("panelExport", "emptyFragment", this));
+ break;
+
+ case SUSPEND:
+ super.addOrReplace(new Fragment("panelSuspend", "emptyFragment", this));
+ break;
+
+ case REACTIVATE:
+ super.addOrReplace(new Fragment("panelReactivate", "emptyFragment", this));
+ break;
+
+ case RELOAD:
+ super.addOrReplace(new Fragment("panelReload", "emptyFragment", this));
+ break;
+
+ case CHANGE_VIEW:
+ super.addOrReplace(new Fragment("panelChangeView", "emptyFragment", this));
+ break;
+
+ case UNLINK:
+ super.addOrReplace(new Fragment("panelUnlink", "emptyFragment", this));
+ break;
+
+ case LINK:
+ super.addOrReplace(new Fragment("panelLink", "emptyFragment", this));
+ break;
+
+ case UNASSIGN:
+ super.addOrReplace(new Fragment("panelUnassign", "emptyFragment", this));
+ break;
+
+ case ASSIGN:
+ super.addOrReplace(new Fragment("panelAssign", "emptyFragment", this));
+ break;
+
+ case DEPROVISION:
+ super.addOrReplace(new Fragment("panelDeprovision", "emptyFragment", this));
+ break;
+
+ case PROVISION:
+ super.addOrReplace(new Fragment("panelProvision", "emptyFragment", this));
+ break;
+ default:
+ // do nothing
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
new file mode 100644
index 0000000..3702aa2
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.io.Serializable;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.form.CheckBox;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+public class AjaxCheckBoxPanel extends FieldPanel<Boolean> {
+
+ private static final long serialVersionUID = 5664138233103884310L;
+
+ public AjaxCheckBoxPanel(final String id, final String name, final IModel<Boolean> model) {
+ super(id, model);
+
+ field = new CheckBox("checkboxField", model);
+ add(field.setLabel(new Model<String>(name)).setOutputMarkupId(true));
+
+ if (!isReadOnly()) {
+ field.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ // nothing to do
+ }
+ });
+ }
+ }
+
+ @Override
+ public FieldPanel<Boolean> addRequiredLabel() {
+ if (!isRequired()) {
+ setRequired(true);
+ }
+
+ this.isRequiredLabelAdded = true;
+
+ return this;
+ }
+
+ @Override
+ public FieldPanel<Boolean> setNewModel(final List<Serializable> list) {
+ setNewModel(new Model<Boolean>() {
+
+ private static final long serialVersionUID = 527651414610325237L;
+
+ @Override
+ public Boolean getObject() {
+ Boolean value = null;
+
+ if (list != null && !list.isEmpty()) {
+ value = Boolean.TRUE.toString().equalsIgnoreCase(list.get(0).toString());
+ }
+
+ return value;
+ }
+
+ @Override
+ public void setObject(final Boolean object) {
+ list.clear();
+ if (object != null) {
+ list.add(object.toString());
+ }
+ }
+ });
+
+ return this;
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ public FieldPanel<Boolean> setNewModel(final ListItem item) {
+ IModel<Boolean> model = new Model<Boolean>() {
+
+ private static final long serialVersionUID = 6799404673615637845L;
+
+ @Override
+ public Boolean getObject() {
+ Boolean bool = null;
+
+ final Object obj = item.getModelObject();
+
+ if (obj != null && !obj.toString().isEmpty()) {
+ if (obj instanceof String) {
+ bool = Boolean.TRUE.toString().equalsIgnoreCase(obj.toString());
+ } else if (obj instanceof Boolean) {
+ // Don't parse anything
+ bool = (Boolean) obj;
+ }
+ }
+
+ return bool;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void setObject(final Boolean object) {
+ item.setModelObject(object == null ? Boolean.FALSE.toString() : object.toString());
+ }
+ };
+
+ field.setModel(model);
+ return this;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDecoratedCheckbox.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDecoratedCheckbox.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDecoratedCheckbox.java
new file mode 100644
index 0000000..547d91a
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDecoratedCheckbox.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.ajax.AjaxEventBehavior;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxCheckBox;
+import org.apache.wicket.model.IModel;
+
+/**
+ * AjaxCheckBox allowing AjaxCallDecorator.
+ */
+public abstract class AjaxDecoratedCheckbox extends AjaxCheckBox {
+
+ private static final long serialVersionUID = 7345848589265633002L;
+
+ public AjaxDecoratedCheckbox(final String id) {
+ this(id, null);
+ }
+
+ public AjaxDecoratedCheckbox(final String id, final IModel<Boolean> model) {
+ super(id, model);
+
+ add(new AjaxEventBehavior(Constants.ON_CLICK) {
+
+ private static final long serialVersionUID = -295188647830294610L;
+
+ @Override
+ protected void onEvent(final AjaxRequestTarget target) {
+ refreshComponent(target);
+ }
+ });
+ }
+
+ private void refreshComponent(final AjaxRequestTarget target) {
+ target.add(this);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java
new file mode 100644
index 0000000..19e0e1d
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.form.ChoiceRenderer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+public class AjaxDropDownChoicePanel<T extends Serializable> extends FieldPanel<T> implements Cloneable {
+
+ private static final long serialVersionUID = -4716376580659196095L;
+
+ public AjaxDropDownChoicePanel(final String id, final String name, final IModel<T> model) {
+ this(id, name, model, true);
+ }
+
+ public AjaxDropDownChoicePanel(final String id, final String name, final IModel<T> model, boolean enableOnBlur) {
+ super(id, model);
+
+ field = new DropDownChoice<T>(
+ "dropDownChoiceField", model, Collections.<T>emptyList(), new ChoiceRenderer<T>());
+ add(field.setLabel(new Model<String>(name)).setOutputMarkupId(true));
+
+ if (enableOnBlur) {
+ field.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_BLUR) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ // nothing to do
+ }
+ });
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public AjaxDropDownChoicePanel<T> setChoiceRenderer(final IChoiceRenderer renderer) {
+ ((DropDownChoice) field).setChoiceRenderer(renderer);
+ return this;
+ }
+
+ @SuppressWarnings("unchecked")
+ public AjaxDropDownChoicePanel<T> setChoices(final List<T> choices) {
+ ((DropDownChoice) field).setChoices(choices);
+ return this;
+ }
+
+ @SuppressWarnings("unchecked")
+ public AjaxDropDownChoicePanel<T> setChoices(final IModel<? extends List<? extends T>> choices) {
+ ((DropDownChoice) field).setChoices(choices);
+ return this;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public FieldPanel clone() {
+ final AjaxDropDownChoicePanel<T> panel = (AjaxDropDownChoicePanel<T>) super.clone();
+ panel.setChoiceRenderer(((DropDownChoice) field).getChoiceRenderer());
+ panel.setChoices(((DropDownChoice) field).getChoices());
+ return panel;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.java
new file mode 100644
index 0000000..91b6306
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.util.Collection;
+import java.util.List;
+import org.apache.syncope.client.console.commons.SelectChoiceRenderer;
+import org.apache.wicket.extensions.markup.html.form.palette.Palette;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.util.ListModel;
+
+public class AjaxPalettePanel<T> extends AbstractFieldPanel<List<T>> {
+
+ private static final long serialVersionUID = 7738499668258805567L;
+
+ protected final Palette<T> palette;
+
+ public AjaxPalettePanel(final String id, final IModel<List<T>> model, final ListModel<T> choices) {
+ this(id, model, choices, false);
+ }
+
+ public AjaxPalettePanel(final String id, final IModel<List<T>> model, final ListModel<T> choices,
+ final boolean allowOrder) {
+
+ this(id, model, choices, new SelectChoiceRenderer<T>(), allowOrder, false);
+ }
+
+ public AjaxPalettePanel(final String id, final IModel<List<T>> model, final ListModel<T> choices,
+ final IChoiceRenderer<T> renderer, final boolean allowOrder, final boolean allowMoveAll) {
+
+ super(id, model);
+
+ this.palette = createPalette(model, choices, renderer, allowOrder, allowMoveAll);
+ add(palette.setOutputMarkupId(true));
+ setOutputMarkupId(true);
+ }
+
+ protected Palette<T> createPalette(final IModel<List<T>> model, final ListModel<T> choices,
+ final IChoiceRenderer<T> renderer, final boolean allowOrder, final boolean allowMoveAll) {
+
+ return new NonI18nPalette<T>("paletteField", model, choices, renderer, 8, allowOrder, allowMoveAll);
+ }
+
+ @Override
+ public AjaxPalettePanel<T> setModelObject(final List<T> object) {
+ palette.setDefaultModelObject(object);
+ return this;
+ }
+
+ public Collection<T> getModelCollection() {
+ return palette.getModelCollection();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.java
new file mode 100644
index 0000000..14fdf9e
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.form.PasswordTextField;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+public class AjaxPasswordFieldPanel extends FieldPanel<String> {
+
+ private static final long serialVersionUID = -5490115280336667460L;
+
+ public AjaxPasswordFieldPanel(final String id, final String name, final IModel<String> model) {
+ super(id, model);
+
+ field = new PasswordTextField("passwordField", model);
+ add(field.setLabel(new Model<String>(name)).setRequired(false).setOutputMarkupId(true));
+
+ if (!isReadOnly()) {
+ field.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget art) {
+ // nothing to do
+ }
+ });
+ }
+ }
+
+ @Override
+ public FieldPanel<String> addRequiredLabel() {
+ if (!isRequired()) {
+ setRequired(true);
+ }
+
+ this.isRequiredLabelAdded = true;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java
new file mode 100644
index 0000000..6854fb0
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Pattern;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings;
+import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.validation.IValidator;
+
+public class AjaxTextFieldPanel extends FieldPanel<String> implements Cloneable {
+
+ private static final long serialVersionUID = 238940918106696068L;
+
+ private List<String> choices = Collections.emptyList();
+
+ public AjaxTextFieldPanel(final String id, final String name, final IModel<String> model) {
+ super(id, model);
+
+ final AutoCompleteSettings settings = new AutoCompleteSettings();
+ settings.setShowCompleteListOnFocusGain(true);
+ settings.setShowListOnEmptyInput(true);
+
+ field = new AutoCompleteTextField<String>("textField", model, settings) {
+
+ private static final long serialVersionUID = -6648767303091874219L;
+
+ @Override
+ protected Iterator<String> getChoices(final String input) {
+ final Pattern pattern = Pattern.compile(".*" + Pattern.quote(input) + ".*", Pattern.CASE_INSENSITIVE);
+
+ final List<String> result = new ArrayList<String>();
+
+ for (String choice : choices) {
+ if (pattern.matcher(choice).matches()) {
+ result.add(choice);
+ }
+ }
+
+ return result.iterator();
+ }
+ };
+ add(field.setLabel(new Model<String>(name)).setOutputMarkupId(true));
+
+ if (!isReadOnly()) {
+ field.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ // nothing to do
+ }
+ });
+ }
+ }
+
+ public void addValidator(final IValidator<? super String> validator) {
+ this.field.add(validator);
+ }
+
+ public void setChoices(final List<String> choices) {
+ if (choices != null) {
+ this.choices = choices;
+ }
+ }
+
+ @Override
+ public FieldPanel<String> clone() {
+ final AjaxTextFieldPanel panel = (AjaxTextFieldPanel) super.clone();
+ panel.setChoices(choices);
+ return panel;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
new file mode 100644
index 0000000..949cc83
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.io.ByteArrayInputStream;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.PreviewUtil;
+import org.apache.syncope.client.console.commons.HttpResourceStream;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.BaseModalPage;
+import org.apache.syncope.common.lib.SyncopeConstants;
+import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormSubmitBehavior;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.StatelessForm;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.markup.html.form.upload.FileUpload;
+import org.apache.wicket.markup.html.form.upload.FileUploadField;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler;
+import org.apache.wicket.request.resource.ContentDisposition;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+import org.apache.wicket.util.crypt.Base64;
+import org.apache.wicket.util.lang.Bytes;
+
+public class BinaryFieldPanel extends FieldPanel<String> {
+
+ private static final long serialVersionUID = 6264462604183088931L;
+
+ private final String mimeType;
+
+ private final WebMarkupContainer container;
+
+ private final Link<Void> downloadLink;
+
+ private final Form<?> uploadForm;
+
+ private final Fragment emptyFragment;
+
+ @SpringBean
+ private PreviewUtil previewUtil;
+
+ public BinaryFieldPanel(final String id, final String name, final IModel<String> model, final String mimeType) {
+ super(id, model);
+ this.mimeType = mimeType;
+
+ uploadForm = new StatelessForm<Void>("uploadForm");
+ uploadForm.setMultiPart(true);
+ uploadForm.setMaxSize(Bytes.megabytes(4));
+ add(uploadForm);
+
+ container = new WebMarkupContainer("previewContainer");
+ container.setOutputMarkupId(true);
+
+ emptyFragment = new Fragment("panelPreview", "emptyFragment", container);
+ emptyFragment.setOutputMarkupId(true);
+ container.add(emptyFragment);
+ uploadForm.add(container);
+
+ field = new TextField<String>("textField", model);
+ add(field.setLabel(new Model<String>(name)).setOutputMarkupId(true));
+
+ uploadForm.add(new Label("preview", StringUtils.isBlank(mimeType) ? StringUtils.EMPTY : "(" + mimeType + ")"));
+
+ downloadLink = new Link<Void>("downloadLink") {
+
+ private static final long serialVersionUID = -4331619903296515985L;
+
+ @Override
+ public void onClick() {
+ try {
+ HttpResourceStream stream = new HttpResourceStream(buildResponse());
+
+ ResourceStreamRequestHandler rsrh = new ResourceStreamRequestHandler(stream);
+ rsrh.setFileName(stream.getFilename() == null ? name : stream.getFilename());
+ rsrh.setContentDisposition(ContentDisposition.ATTACHMENT);
+
+ getRequestCycle().scheduleRequestHandlerAfterCurrent(rsrh);
+ } catch (Exception e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ }
+ }
+ };
+ downloadLink.setOutputMarkupId(true);
+ uploadForm.add(downloadLink);
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ final FileUploadField fileUpload = new FileUploadField("fileUpload", new Model());
+ fileUpload.setOutputMarkupId(true);
+ fileUpload.add(new AjaxFormSubmitBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target) {
+ final FileUpload uploadedFile = fileUpload.getFileUpload();
+ if (uploadedFile != null) {
+ try {
+ final byte[] uploadedBytes = uploadedFile.getBytes();
+ final String uploaded = new String(
+ Base64.encodeBase64(uploadedBytes),
+ SyncopeConstants.DEFAULT_ENCODING);
+ field.setModelObject(uploaded);
+ target.add(field);
+
+ final Component panelPreview = previewUtil.getPreviewer(mimeType, uploadedBytes);
+
+ if (panelPreview != null) {
+ changePreviewer(panelPreview);
+ }
+
+ fileUpload.setModelObject(null);
+ uploadForm.addOrReplace(fileUpload);
+ downloadLink.setEnabled(StringUtils.isNotBlank(uploaded));
+ target.add(uploadForm);
+ } catch (Exception e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ ((BaseModalPage) getPage()).getFeedbackPanel().refresh(target);
+ LOG.error("While saving uploaded file", e);
+ }
+ }
+ }
+ });
+
+ uploadForm.add(fileUpload);
+
+ IndicatingAjaxLink<Void> uploadLink = new IndicatingAjaxLink<Void>("uploadLink") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ }
+ };
+ uploadForm.add(uploadLink);
+
+ IndicatingAjaxLink<Void> resetLink = new IndicatingAjaxLink<Void>("resetLink") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ field.setModelObject(null);
+ target.add(field);
+ downloadLink.setEnabled(false);
+ container.addOrReplace(emptyFragment);
+ uploadForm.addOrReplace(container);
+ target.add(uploadForm);
+ }
+ };
+ uploadForm.add(resetLink);
+ }
+
+ private Response buildResponse() {
+ return Response.ok(new ByteArrayInputStream(Base64.decodeBase64(getModelObject()))).
+ type(StringUtils.isBlank(mimeType) ? MediaType.APPLICATION_OCTET_STREAM : mimeType).build();
+ }
+
+ private void changePreviewer(final Component panelPreview) {
+ final Fragment fragment = new Fragment("panelPreview", "previewFragment", container);
+ fragment.add(panelPreview);
+ container.addOrReplace(fragment);
+ uploadForm.addOrReplace(container);
+ }
+
+ @Override
+ public BinaryFieldPanel clone() {
+ return (BinaryFieldPanel) super.clone();
+ }
+
+ @Override
+ public FieldPanel<String> setNewModel(final IModel<String> model) {
+ field.setModel(model);
+ try {
+ final Component panelPreview = previewUtil.getPreviewer(mimeType, model.getObject());
+ if (panelPreview != null) {
+ changePreviewer(panelPreview);
+ }
+ } catch (Exception e) {
+ LOG.error("While loading saved file", e);
+ }
+ downloadLink.setEnabled(StringUtils.isNotBlank(model.getObject()));
+ uploadForm.addOrReplace(downloadLink);
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.java
new file mode 100644
index 0000000..3c5119b
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.util.List;
+
+import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice;
+import org.apache.wicket.model.IModel;
+
+public class CheckBoxMultipleChoiceFieldPanel<E> extends AbstractFieldPanel<List<E>> {
+
+ private static final long serialVersionUID = 4124935025837737298L;
+
+ private final CheckBoxMultipleChoice<E> field;
+
+ public CheckBoxMultipleChoiceFieldPanel(
+ final String id, final IModel<List<E>> model, final IModel<List<E>> choices) {
+
+ super(id, model);
+
+ field = new CheckBoxMultipleChoice<E>("checkBoxMultipleChoice", model, choices);
+ add(field);
+ }
+
+ @Override
+ public AbstractFieldPanel<List<E>> setModelObject(final List<E> object) {
+ field.setModelObject(object);
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateFieldPanel.java
new file mode 100644
index 0000000..1f5aaf6
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateFieldPanel.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.io.Serializable;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import org.apache.syncope.common.lib.SyncopeConstants;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.springframework.util.StringUtils;
+
+public class DateFieldPanel extends FieldPanel<Date> {
+
+ private static final long serialVersionUID = -428975732068281726L;
+
+ protected final String name;
+
+ protected final String datePattern;
+
+ protected DateFieldPanel(final String id, final String name, final IModel<Date> model, final String datePattern) {
+ super(id, model);
+ this.name = name;
+ this.datePattern = datePattern;
+ }
+
+ @Override
+ public FieldPanel<Date> setNewModel(final List<Serializable> list) {
+ final SimpleDateFormat formatter = datePattern == null
+ ? new SimpleDateFormat(SyncopeConstants.DEFAULT_DATE_PATTERN, Locale.getDefault())
+ : new SimpleDateFormat(datePattern, Locale.getDefault());
+
+ setNewModel(new Model<Date>() {
+
+ private static final long serialVersionUID = 527651414610325237L;
+
+ @Override
+ public Date getObject() {
+ Date date = null;
+
+ if (list != null && !list.isEmpty() && StringUtils.hasText(list.get(0).toString())) {
+ try {
+ // Parse string using datePattern
+ date = formatter.parse(list.get(0).toString());
+ } catch (ParseException e) {
+ LOG.error("invalid parse exception", e);
+ }
+ }
+
+ return date;
+ }
+
+ @Override
+ public void setObject(final Date object) {
+ list.clear();
+ if (object != null) {
+ list.add(formatter.format(object));
+ }
+ }
+ });
+
+ return this;
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ public FieldPanel<Date> setNewModel(final ListItem item) {
+ final SimpleDateFormat formatter = datePattern == null
+ ? new SimpleDateFormat(SyncopeConstants.DEFAULT_DATE_PATTERN, Locale.getDefault())
+ : new SimpleDateFormat(datePattern, Locale.getDefault());
+
+ IModel<Date> model = new Model<Date>() {
+
+ private static final long serialVersionUID = 6799404673615637845L;
+
+ @Override
+ public Date getObject() {
+ Date date = null;
+
+ final Object obj = item.getModelObject();
+
+ if (obj != null && !obj.toString().isEmpty()) {
+ if (obj instanceof String) {
+ // Parse string using datePattern
+ try {
+ date = formatter.parse(obj.toString());
+ } catch (ParseException e) {
+ LOG.error("While parsing date", e);
+ }
+ } else if (obj instanceof Date) {
+ // Don't parse anything
+ date = (Date) obj;
+ } else {
+ // consider Long
+ date = new Date((Long) obj);
+ }
+ }
+
+ return date;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void setObject(final Date object) {
+ item.setModelObject(object != null ? formatter.format(object) : null);
+ }
+ };
+
+ field.setModel(model);
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.java
new file mode 100644
index 0000000..add3de6
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.util.Date;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.datetime.markup.html.form.DateTextField;
+import org.apache.wicket.extensions.yui.calendar.DatePicker;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+public class DateTextFieldPanel extends DateFieldPanel {
+
+ private static final long serialVersionUID = 1919852712185883648L;
+
+ public DateTextFieldPanel(final String id, final String name, final IModel<Date> model, final String datePattern) {
+ super(id, name, model, datePattern);
+
+ field = DateTextField.forDatePattern("field", model, datePattern);
+
+ if (!isReadOnly()) {
+ field.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ // nothing to do
+ }
+ });
+ }
+
+ field.add(getDatePicker());
+
+ add(field.setLabel(new Model<String>(name)).setOutputMarkupId(true));
+ }
+
+ /**
+ * Setup a DatePicker component.
+ */
+ private DatePicker getDatePicker() {
+ final DatePicker picker = new DatePicker() {
+
+ private static final long serialVersionUID = 4166072895162221956L;
+
+ @Override
+ protected boolean enableMonthYearSelection() {
+ return true;
+ }
+ };
+
+ picker.setShowOnFieldClick(true);
+
+ return picker;
+ }
+
+ @Override
+ public FieldPanel<Date> clone() {
+ final FieldPanel<Date> panel = new DateTextFieldPanel(getId(), name, new Model<Date>(), datePattern);
+ panel.setRequired(isRequired());
+ panel.setReadOnly(isReadOnly());
+ panel.setTitle(title);
+
+ if (isRequiredLabelAdded) {
+ panel.addRequiredLabel();
+ }
+
+ return panel;
+ }
+}
[42/51] [partial] syncope git commit: [SYNCOPE-620] Re-organization
completed
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/PlainSchemaModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/PlainSchemaModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/PlainSchemaModalPage.java
new file mode 100644
index 0000000..bad0ae7
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/PlainSchemaModalPage.java
@@ -0,0 +1,456 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.JexlHelpUtil;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.SyncopeConstants;
+import org.apache.syncope.common.lib.to.PlainSchemaTO;
+import org.apache.syncope.common.lib.types.AttrSchemaType;
+import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.CipherAlgorithm;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.util.string.Strings;
+
+/**
+ * Modal window with Schema form.
+ */
+public class PlainSchemaModalPage extends AbstractSchemaModalPage<PlainSchemaTO> {
+
+ private static final long serialVersionUID = -5991561277287424057L;
+
+ public PlainSchemaModalPage(final AttributableType kind) {
+ super(kind);
+ }
+
+ @Override
+ public void setSchemaModalPage(final PageReference pageRef, final ModalWindow window,
+ final PlainSchemaTO schemaTO, final boolean createFlag) {
+
+ final PlainSchemaTO schema = schemaTO == null
+ ? new PlainSchemaTO()
+ : schemaTO;
+
+ final Form<PlainSchemaTO> schemaForm = new Form<>(FORM);
+
+ schemaForm.setModel(new CompoundPropertyModel<>(schema));
+ schemaForm.setOutputMarkupId(true);
+
+ final AjaxTextFieldPanel name =
+ new AjaxTextFieldPanel("key", getString("key"), new PropertyModel<String>(schema, "key"));
+ name.addRequiredLabel();
+ name.setEnabled(createFlag);
+ schemaForm.add(name);
+
+ final AjaxDropDownChoicePanel<AttrSchemaType> type = new AjaxDropDownChoicePanel<>(
+ "type", getString("type"), new PropertyModel<AttrSchemaType>(schema, "type"));
+ type.setChoices(Arrays.asList(AttrSchemaType.values()));
+ type.addRequiredLabel();
+ schemaForm.add(type);
+
+ // -- long, double, date
+ final AjaxTextFieldPanel conversionPattern = new AjaxTextFieldPanel("conversionPattern",
+ getString("conversionPattern"), new PropertyModel<String>(schema, "conversionPattern"));
+ schemaForm.add(conversionPattern);
+
+ final WebMarkupContainer conversionParams = new WebMarkupContainer("conversionParams");
+ conversionParams.setOutputMarkupPlaceholderTag(true);
+ conversionParams.add(conversionPattern);
+ schemaForm.add(conversionParams);
+
+ final WebMarkupContainer typeParams = new WebMarkupContainer("typeParams");
+ typeParams.setOutputMarkupPlaceholderTag(true);
+ // -- enum
+ final AjaxTextFieldPanel enumerationValuesPanel =
+ new AjaxTextFieldPanel("panel", "enumerationValues", new Model<String>(null));
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ final MultiFieldPanel<String> enumerationValues = new MultiFieldPanel<>("enumerationValues",
+ new Model(),
+ enumerationValuesPanel);
+ enumerationValues.setModelObject(getEnumValuesAsList(schema.getEnumerationValues()));
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ final MultiFieldPanel<String> enumerationKeys = new MultiFieldPanel<>("enumerationKeys",
+ new Model(),
+ new AjaxTextFieldPanel("panel", "enumerationKeys", new Model<String>(null)));
+ enumerationKeys.setModelObject(getEnumValuesAsList(schema.getEnumerationKeys()));
+
+ final WebMarkupContainer enumParams = new WebMarkupContainer("enumParams");
+ enumParams.setOutputMarkupPlaceholderTag(true);
+ enumParams.add(enumerationValues);
+ enumParams.add(enumerationKeys);
+ typeParams.add(enumParams);
+
+ // -- encrypted
+ final AjaxTextFieldPanel secretKey = new AjaxTextFieldPanel("secretKey",
+ getString("secretKey"), new PropertyModel<String>(schema, "secretKey"));
+
+ final AjaxDropDownChoicePanel<CipherAlgorithm> cipherAlgorithm = new AjaxDropDownChoicePanel<>(
+ "cipherAlgorithm", getString("cipherAlgorithm"),
+ new PropertyModel<CipherAlgorithm>(schema, "cipherAlgorithm"));
+ cipherAlgorithm.setChoices(Arrays.asList(CipherAlgorithm.values()));
+
+ final WebMarkupContainer encryptedParams = new WebMarkupContainer("encryptedParams");
+ encryptedParams.setOutputMarkupPlaceholderTag(true);
+ encryptedParams.add(secretKey);
+ encryptedParams.add(cipherAlgorithm);
+ typeParams.add(encryptedParams);
+
+ // -- binary
+ final AjaxTextFieldPanel mimeType = new AjaxTextFieldPanel("mimeType",
+ getString("mimeType"), new PropertyModel<String>(schema, "mimeType"));
+ mimeType.setChoices(mimeTypesInitializer.getMimeTypes());
+
+ final WebMarkupContainer binaryParams = new WebMarkupContainer("binaryParams");
+ binaryParams.setOutputMarkupPlaceholderTag(true);
+ binaryParams.add(mimeType);
+ typeParams.add(binaryParams);
+
+ schemaForm.add(typeParams);
+
+ // -- show or hide
+ showHide(schema, type,
+ conversionParams, conversionPattern,
+ enumParams, enumerationValuesPanel, enumerationValues, enumerationKeys,
+ encryptedParams, secretKey, cipherAlgorithm,
+ binaryParams, mimeType);
+ type.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ PlainSchemaModalPage.this.showHide(schema, type,
+ conversionParams, conversionPattern,
+ enumParams, enumerationValuesPanel, enumerationValues, enumerationKeys,
+ encryptedParams, secretKey, cipherAlgorithm,
+ binaryParams, mimeType);
+ target.add(typeParams);
+ }
+ });
+
+ final IModel<List<String>> validatorsList = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ return schemaRestClient.getAllValidatorClasses();
+ }
+ };
+ final AjaxDropDownChoicePanel<String> validatorClass = new AjaxDropDownChoicePanel<>("validatorClass",
+ getString("validatorClass"), new PropertyModel<String>(schema, "validatorClass"));
+ ((DropDownChoice) validatorClass.getField()).setNullValid(true);
+ validatorClass.setChoices(validatorsList.getObject());
+ schemaForm.add(validatorClass);
+
+ final AutoCompleteTextField<String> mandatoryCondition =
+ new AutoCompleteTextField<String>("mandatoryCondition") {
+
+ private static final long serialVersionUID = -2428903969518079100L;
+
+ @Override
+ protected Iterator<String> getChoices(final String input) {
+ List<String> choices = new ArrayList<String>();
+
+ if (Strings.isEmpty(input)) {
+ choices = Collections.emptyList();
+ } else if ("true".startsWith(input.toLowerCase())) {
+ choices.add("true");
+ } else if ("false".startsWith(input.toLowerCase())) {
+ choices.add("false");
+ }
+
+ return choices.iterator();
+ }
+ };
+ mandatoryCondition.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ }
+ });
+ schemaForm.add(mandatoryCondition);
+
+ final WebMarkupContainer pwdJexlHelp = JexlHelpUtil.getJexlHelpWebContainer("jexlHelp");
+
+ final AjaxLink<Void> pwdQuestionMarkJexlHelp = JexlHelpUtil.getAjaxLink(pwdJexlHelp, "questionMarkJexlHelp");
+ schemaForm.add(pwdQuestionMarkJexlHelp);
+ pwdQuestionMarkJexlHelp.add(pwdJexlHelp);
+
+ final AjaxCheckBoxPanel multivalue = new AjaxCheckBoxPanel("multivalue", getString("multivalue"),
+ new PropertyModel<Boolean>(schema, "multivalue"));
+ schemaForm.add(multivalue);
+
+ final AjaxCheckBoxPanel readonly = new AjaxCheckBoxPanel("readonly", getString("readonly"),
+ new PropertyModel<Boolean>(schema, "readonly"));
+ schemaForm.add(readonly);
+
+ final AjaxCheckBoxPanel uniqueConstraint = new AjaxCheckBoxPanel("uniqueConstraint",
+ getString("uniqueConstraint"), new PropertyModel<Boolean>(schema, "uniqueConstraint"));
+ schemaForm.add(uniqueConstraint);
+
+ final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ final PlainSchemaTO schemaTO = (PlainSchemaTO) form.getDefaultModelObject();
+
+ schemaTO.setEnumerationValues(getEnumValuesAsString(enumerationValues.getView().getModelObject()));
+ schemaTO.setEnumerationKeys(getEnumValuesAsString(enumerationKeys.getView().getModelObject()));
+
+ if (schemaTO.isMultivalue() && schemaTO.isUniqueConstraint()) {
+ error(getString("multivalueAndUniqueConstr.validation"));
+ feedbackPanel.refresh(target);
+ return;
+ }
+
+ try {
+ if (createFlag) {
+ schemaRestClient.createPlainSchema(kind, schemaTO);
+ } else {
+ schemaRestClient.updatePlainSchema(kind, schemaTO);
+ }
+ if (pageRef.getPage() instanceof BasePage) {
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ }
+
+ window.close(target);
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+ schemaForm.add(submit);
+
+ final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+ };
+ cancel.setDefaultFormProcessing(false);
+ schemaForm.add(cancel);
+
+ String allowedRoles = createFlag
+ ? xmlRolesReader.getEntitlement("Schema", "create")
+ : xmlRolesReader.getEntitlement("Schema", "update");
+
+ MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, allowedRoles);
+
+ add(schemaForm);
+ }
+
+ private void showHide(final PlainSchemaTO schema, final AjaxDropDownChoicePanel<AttrSchemaType> type,
+ final WebMarkupContainer conversionParams, final AjaxTextFieldPanel conversionPattern,
+ final WebMarkupContainer enumParams, final AjaxTextFieldPanel enumerationValuesPanel,
+ final MultiFieldPanel<String> enumerationValues, final MultiFieldPanel<String> enumerationKeys,
+ final WebMarkupContainer encryptedParams,
+ final AjaxTextFieldPanel secretKey, final AjaxDropDownChoicePanel<CipherAlgorithm> cipherAlgorithm,
+ final WebMarkupContainer binaryParams, final AjaxTextFieldPanel mimeType) {
+
+ final int typeOrdinal = Integer.parseInt(type.getField().getValue());
+ if (AttrSchemaType.Long.ordinal() == typeOrdinal
+ || AttrSchemaType.Double.ordinal() == typeOrdinal
+ || AttrSchemaType.Date.ordinal() == typeOrdinal) {
+
+ conversionParams.setVisible(true);
+
+ enumParams.setVisible(false);
+ if (enumerationValuesPanel.isRequired()) {
+ enumerationValuesPanel.removeRequiredLabel();
+ }
+ enumerationValues.setModelObject(getEnumValuesAsList(null));
+ enumerationKeys.setModelObject(getEnumValuesAsList(null));
+
+ encryptedParams.setVisible(false);
+ if (secretKey.isRequired()) {
+ secretKey.removeRequiredLabel();
+ }
+ secretKey.setModelObject(null);
+ if (cipherAlgorithm.isRequired()) {
+ cipherAlgorithm.removeRequiredLabel();
+ }
+ cipherAlgorithm.setModelObject(null);
+
+ binaryParams.setVisible(false);
+ mimeType.setModelObject(null);
+ } else if (AttrSchemaType.Enum.ordinal() == typeOrdinal) {
+ conversionParams.setVisible(false);
+ conversionPattern.setModelObject(null);
+
+ enumParams.setVisible(true);
+ if (!enumerationValuesPanel.isRequired()) {
+ enumerationValuesPanel.addRequiredLabel();
+ }
+ enumerationValues.setModelObject(getEnumValuesAsList(schema.getEnumerationValues()));
+ enumerationKeys.setModelObject(getEnumValuesAsList(schema.getEnumerationKeys()));
+
+ encryptedParams.setVisible(false);
+ if (secretKey.isRequired()) {
+ secretKey.removeRequiredLabel();
+ }
+ secretKey.setModelObject(null);
+ if (cipherAlgorithm.isRequired()) {
+ cipherAlgorithm.removeRequiredLabel();
+ }
+ cipherAlgorithm.setModelObject(null);
+
+ binaryParams.setVisible(false);
+ mimeType.setModelObject(null);
+ } else if (AttrSchemaType.Encrypted.ordinal() == typeOrdinal) {
+ conversionParams.setVisible(false);
+ conversionPattern.setModelObject(null);
+
+ enumParams.setVisible(false);
+ if (enumerationValuesPanel.isRequired()) {
+ enumerationValuesPanel.removeRequiredLabel();
+ }
+ enumerationValues.setModelObject(getEnumValuesAsList(null));
+ enumerationKeys.setModelObject(getEnumValuesAsList(null));
+
+ encryptedParams.setVisible(true);
+ if (!secretKey.isRequired()) {
+ secretKey.addRequiredLabel();
+ }
+ if (cipherAlgorithm.isRequired()) {
+ cipherAlgorithm.addRequiredLabel();
+ }
+
+ binaryParams.setVisible(false);
+ mimeType.setModelObject(null);
+ } else if (AttrSchemaType.Binary.ordinal() == typeOrdinal) {
+ conversionParams.setVisible(false);
+ conversionPattern.setModelObject(null);
+
+ enumParams.setVisible(false);
+ if (enumerationValuesPanel.isRequired()) {
+ enumerationValuesPanel.removeRequiredLabel();
+ }
+ enumerationValues.setModelObject(getEnumValuesAsList(null));
+ enumerationKeys.setModelObject(getEnumValuesAsList(null));
+
+ encryptedParams.setVisible(false);
+ if (secretKey.isRequired()) {
+ secretKey.removeRequiredLabel();
+ }
+ secretKey.setModelObject(null);
+ if (cipherAlgorithm.isRequired()) {
+ cipherAlgorithm.removeRequiredLabel();
+ }
+ cipherAlgorithm.setModelObject(null);
+
+ binaryParams.setVisible(true);
+ } else {
+ conversionParams.setVisible(false);
+ conversionPattern.setModelObject(null);
+
+ enumParams.setVisible(false);
+ if (enumerationValuesPanel.isRequired()) {
+ enumerationValuesPanel.removeRequiredLabel();
+ }
+ enumerationValues.setModelObject(getEnumValuesAsList(null));
+ enumerationKeys.setModelObject(getEnumValuesAsList(null));
+
+ encryptedParams.setVisible(false);
+ if (secretKey.isRequired()) {
+ secretKey.removeRequiredLabel();
+ }
+ secretKey.setModelObject(null);
+ if (cipherAlgorithm.isRequired()) {
+ cipherAlgorithm.removeRequiredLabel();
+ }
+ cipherAlgorithm.setModelObject(null);
+
+ binaryParams.setVisible(false);
+ mimeType.setModelObject(null);
+ }
+ }
+
+ private String getEnumValuesAsString(final List<String> enumerationValues) {
+ final StringBuilder builder = new StringBuilder();
+
+ for (String str : enumerationValues) {
+ if (StringUtils.isNotBlank(str)) {
+ if (builder.length() > 0) {
+ builder.append(SyncopeConstants.ENUM_VALUES_SEPARATOR);
+ }
+
+ builder.append(str.trim());
+ }
+ }
+
+ return builder.toString();
+ }
+
+ private List<String> getEnumValuesAsList(final String enumerationValues) {
+ final List<String> values = new ArrayList<String>();
+
+ if (StringUtils.isNotBlank(enumerationValues)) {
+ for (String value : enumerationValues.split(SyncopeConstants.ENUM_VALUES_SEPARATOR)) {
+ values.add(value.trim());
+ }
+ } else {
+ values.add(StringUtils.EMPTY);
+ }
+
+ return values;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/PolicyModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/PolicyModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/PolicyModalPage.java
new file mode 100644
index 0000000..efa61c1
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/PolicyModalPage.java
@@ -0,0 +1,451 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.NotificationPanel;
+import org.apache.syncope.client.console.panels.PolicyBeanPanel;
+import org.apache.syncope.client.console.rest.PolicyRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.AbstractPolicyTO;
+import org.apache.syncope.common.lib.to.AccountPolicyTO;
+import org.apache.syncope.common.lib.to.PasswordPolicyTO;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.SyncPolicyTO;
+import org.apache.syncope.common.lib.types.AccountPolicySpec;
+import org.apache.syncope.common.lib.types.PasswordPolicySpec;
+import org.apache.syncope.common.lib.types.PolicySpec;
+import org.apache.syncope.common.lib.types.PolicyType;
+import org.apache.syncope.common.lib.types.SyncPolicySpec;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.ChoiceRenderer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.model.StringResourceModel;
+import org.apache.wicket.model.util.ListModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+/**
+ * Modal window with Resource form.
+ */
+public class PolicyModalPage<T extends AbstractPolicyTO> extends BaseModalPage {
+
+ private static final long serialVersionUID = -7325772767481076679L;
+
+ private static final int WIN_HEIGHT = 600;
+
+ private static final int WIN_WIDTH = 1100;
+
+ @SpringBean
+ private PolicyRestClient policyRestClient;
+
+ public PolicyModalPage(final PageReference pageRef, final ModalWindow window, final T policyTO) {
+ super();
+
+ final Form<?> form = new Form<>(FORM);
+ form.setOutputMarkupId(true);
+ add(form);
+
+ final AjaxTextFieldPanel policyid =
+ new AjaxTextFieldPanel("key", "key", new PropertyModel<String>(policyTO, "key"));
+ policyid.setEnabled(false);
+ policyid.setStyleSheet("ui-widget-content ui-corner-all short_fixedsize");
+ form.add(policyid);
+
+ final AjaxTextFieldPanel description = new AjaxTextFieldPanel("description", "description",
+ new PropertyModel<String>(policyTO, "description"));
+ description.addRequiredLabel();
+ description.setStyleSheet("ui-widget-content ui-corner-all medium_dynamicsize");
+ form.add(description);
+
+ final AjaxDropDownChoicePanel<PolicyType> type =
+ new AjaxDropDownChoicePanel<>("type", "type", new PropertyModel<PolicyType>(policyTO, "type"));
+ switch (policyTO.getType()) {
+ case GLOBAL_ACCOUNT:
+ case ACCOUNT:
+ type.setChoices(Arrays.asList(new PolicyType[] { PolicyType.GLOBAL_ACCOUNT, PolicyType.ACCOUNT }));
+ break;
+
+ case GLOBAL_PASSWORD:
+ case PASSWORD:
+ type.setChoices(Arrays.asList(new PolicyType[] { PolicyType.GLOBAL_PASSWORD, PolicyType.PASSWORD }));
+ break;
+
+ case GLOBAL_SYNC:
+ case SYNC:
+ type.setChoices(Arrays.asList(new PolicyType[] { PolicyType.GLOBAL_SYNC, PolicyType.SYNC }));
+
+ default:
+ }
+ type.setChoiceRenderer(new PolicyTypeRenderer());
+ type.addRequiredLabel();
+ form.add(type);
+
+ // Authentication resources - only for AccountPolicyTO
+ Fragment fragment;
+ if (policyTO instanceof AccountPolicyTO) {
+ fragment = new Fragment("forAccountOnly", "authResourcesFragment", form);
+
+ final List<String> resourceNames = new ArrayList<>();
+ for (ResourceTO resource : resourceRestClient.getAll()) {
+ resourceNames.add(resource.getKey());
+ }
+ fragment.add(new AjaxPalettePanel<>("authResources",
+ new PropertyModel<List<String>>(policyTO, "resources"),
+ new ListModel<>(resourceNames)));
+ } else {
+ fragment = new Fragment("forAccountOnly", "emptyFragment", form);
+ }
+ form.add(fragment);
+ //
+
+ final PolicySpec policy = getPolicySpecification(policyTO);
+
+ form.add(new PolicyBeanPanel("panel", policy));
+
+ final ModalWindow mwindow = new ModalWindow("metaEditModalWin");
+ mwindow.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ mwindow.setInitialHeight(WIN_HEIGHT);
+ mwindow.setInitialWidth(WIN_WIDTH);
+ mwindow.setCookieName("meta-edit-modal");
+ add(mwindow);
+
+ List<IColumn<String, String>> resColumns = new ArrayList<>();
+ resColumns.add(new AbstractColumn<String, String>(new StringResourceModel("name", this, null, "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<String>> cellItem,
+ final String componentId, final IModel<String> rowModel) {
+
+ cellItem.add(new Label(componentId, rowModel.getObject()));
+ }
+ });
+ resColumns.add(new AbstractColumn<String, String>(new StringResourceModel("actions", this, null, "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<String>> cellItem, final String componentId,
+ final IModel<String> model) {
+
+ final String resource = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ mwindow.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ResourceModalPage(PolicyModalPage.this.getPageReference(),
+ mwindow, resourceRestClient.read(resource), false);
+ }
+ });
+
+ mwindow.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, "Resources");
+
+ cellItem.add(panel);
+ }
+ });
+ ISortableDataProvider<String, String> resDataProvider = new SortableDataProvider<String, String>() {
+
+ private static final long serialVersionUID = 8263758912838836438L;
+
+ @Override
+ public Iterator<? extends String> iterator(final long first, final long count) {
+ return policyTO.getKey() == 0
+ ? Collections.<String>emptyList().iterator()
+ : policyRestClient.getPolicy(policyTO.getKey()).
+ getUsedByResources().subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return policyTO.getKey() == 0
+ ? 0
+ : policyRestClient.getPolicy(policyTO.getKey()).
+ getUsedByResources().size();
+ }
+
+ @Override
+ public IModel<String> model(final String object) {
+ return new Model<>(object);
+ }
+ };
+ final AjaxFallbackDefaultDataTable<String, String> resources =
+ new AjaxFallbackDefaultDataTable<>("resources", resColumns, resDataProvider, 10);
+ form.add(resources);
+
+ List<IColumn<RoleTO, String>> roleColumns = new ArrayList<>();
+ roleColumns.add(new PropertyColumn<RoleTO, String>(new ResourceModel("key", "key"), "key", "key"));
+ roleColumns.add(new PropertyColumn<RoleTO, String>(new ResourceModel("name", "name"), "name", "name"));
+ roleColumns.add(new AbstractColumn<RoleTO, String>(new StringResourceModel("actions", this, null, "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<RoleTO>> cellItem, final String componentId,
+ final IModel<RoleTO> model) {
+
+ final RoleTO role = model.getObject();
+
+ final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+ panel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ mwindow.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new RoleModalPage(PolicyModalPage.this.getPageReference(), mwindow, role);
+ }
+ });
+
+ mwindow.show(target);
+ }
+ }, ActionLink.ActionType.EDIT, "Roles");
+
+ cellItem.add(panel);
+ }
+ });
+ ISortableDataProvider<RoleTO, String> roleDataProvider = new SortableDataProvider<RoleTO, String>() {
+
+ private static final long serialVersionUID = 8263758912838836438L;
+
+ @Override
+ public Iterator<? extends RoleTO> iterator(final long first, final long count) {
+ List<RoleTO> roles = new ArrayList<>();
+
+ if (policyTO.getKey() > 0) {
+ for (Long roleId : policyRestClient.getPolicy(policyTO.getKey()).
+ getUsedByRoles().subList((int) first, (int) first + (int) count)) {
+
+ roles.add(roleRestClient.read(roleId));
+ }
+ }
+
+ return roles.iterator();
+ }
+
+ @Override
+ public long size() {
+ return policyTO.getKey() == 0
+ ? 0
+ : policyRestClient.getPolicy(policyTO.getKey()).
+ getUsedByRoles().size();
+ }
+
+ @Override
+ public IModel<RoleTO> model(final RoleTO object) {
+ return new Model<>(object);
+ }
+ };
+ final AjaxFallbackDefaultDataTable<RoleTO, String> roles =
+ new AjaxFallbackDefaultDataTable<>("roles", roleColumns, roleDataProvider, 10);
+ form.add(roles);
+
+ mwindow.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ target.add(resources);
+ target.add(roles);
+ if (isModalResult()) {
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ feedbackPanel.refresh(target);
+ setModalResult(false);
+ }
+ }
+ });
+
+ final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(APPLY)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ setPolicySpecification(policyTO, policy);
+
+ try {
+ if (policyTO.getKey() > 0) {
+ policyRestClient.updatePolicy(policyTO);
+ } else {
+ policyRestClient.createPolicy(policyTO);
+ }
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+
+ window.close(target);
+ } catch (Exception e) {
+ LOG.error("While creating policy", e);
+
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ ((NotificationPanel) getPage().get(Constants.FEEDBACK)).refresh(target);
+ }
+ };
+ form.add(submit);
+
+ final IndicatingAjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ window.close(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ }
+ };
+ cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
+ }
+
+ private PolicySpec getPolicySpecification(final AbstractPolicyTO policyTO) {
+ PolicySpec spec;
+
+ switch (policyTO.getType()) {
+ case GLOBAL_ACCOUNT:
+ case ACCOUNT:
+ spec = ((AccountPolicyTO) policyTO).getSpecification() != null
+ ? ((AccountPolicyTO) policyTO).getSpecification()
+ : new AccountPolicySpec();
+ break;
+
+ case GLOBAL_PASSWORD:
+ case PASSWORD:
+ spec = ((PasswordPolicyTO) policyTO).getSpecification() != null
+ ? ((PasswordPolicyTO) policyTO).getSpecification()
+ : new PasswordPolicySpec();
+ break;
+
+ case GLOBAL_SYNC:
+ case SYNC:
+ default:
+ spec = ((SyncPolicyTO) policyTO).getSpecification() != null
+ ? ((SyncPolicyTO) policyTO).getSpecification()
+ : new SyncPolicySpec();
+ }
+
+ return spec;
+ }
+
+ private void setPolicySpecification(final AbstractPolicyTO policyTO, final PolicySpec specification) {
+ switch (policyTO.getType()) {
+ case GLOBAL_ACCOUNT:
+ case ACCOUNT:
+ if (!(specification instanceof AccountPolicySpec)) {
+ throw new ClassCastException("policy is type Account, but spec is not: "
+ + specification.getClass().getName());
+ }
+ ((AccountPolicyTO) policyTO).setSpecification((AccountPolicySpec) specification);
+ break;
+
+ case GLOBAL_PASSWORD:
+ case PASSWORD:
+ if (!(specification instanceof PasswordPolicySpec)) {
+ throw new ClassCastException("policy is type Password, but spec is not: "
+ + specification.getClass().getName());
+ }
+ ((PasswordPolicyTO) policyTO).setSpecification((PasswordPolicySpec) specification);
+ break;
+
+ case GLOBAL_SYNC:
+ case SYNC:
+ if (!(specification instanceof SyncPolicySpec)) {
+ throw new ClassCastException("policy is type Sync, but spec is not: "
+ + specification.getClass().getName());
+ }
+ ((SyncPolicyTO) policyTO).setSpecification((SyncPolicySpec) specification);
+
+ default:
+ }
+ }
+
+ private class PolicyTypeRenderer extends ChoiceRenderer<PolicyType> {
+
+ private static final long serialVersionUID = -8993265421104002134L;
+
+ @Override
+ public Object getDisplayValue(final PolicyType object) {
+ return getString(object.name());
+ }
+ };
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/PropagationTaskModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/PropagationTaskModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/PropagationTaskModalPage.java
new file mode 100644
index 0000000..5a6779f
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/PropagationTaskModalPage.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.wicket.model.PropertyModel;
+
+/**
+ * Modal window with Task form (to stop and start execution).
+ */
+public class PropagationTaskModalPage extends TaskModalPage {
+
+ private static final long serialVersionUID = 523379887023786151L;
+
+ public PropagationTaskModalPage(final AbstractTaskTO taskTO) {
+ super(taskTO);
+
+ final AjaxTextFieldPanel accountId = new AjaxTextFieldPanel("accountId", getString("accountId"),
+ new PropertyModel<String>(taskTO, "accountId"));
+ accountId.setEnabled(false);
+ profile.add(accountId);
+
+ final AjaxTextFieldPanel resource = new AjaxTextFieldPanel("resource", getString("resource"),
+ new PropertyModel<String>(taskTO, "resource"));
+ resource.setEnabled(false);
+ profile.add(resource);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
new file mode 100644
index 0000000..dc3ee88
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
@@ -0,0 +1,250 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.status.AbstractStatusBeanProvider;
+import org.apache.syncope.client.console.commons.status.ConnObjectWrapper;
+import org.apache.syncope.client.console.commons.status.StatusBean;
+import org.apache.syncope.client.console.commons.status.StatusUtils;
+import org.apache.syncope.client.console.panels.ActionDataTablePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.lib.SyncopeClient;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.AbstractSubjectTO;
+import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
+import org.apache.syncope.common.lib.wrap.AbstractWrappable;
+import org.apache.syncope.common.lib.wrap.SubjectKey;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.StringResourceModel;
+
+public class ProvisioningModalPage<T extends AbstractAttributableTO> extends AbstractStatusModalPage {
+
+ private static final long serialVersionUID = -4285220460543213901L;
+
+ private static final int ROWS_PER_PAGE = 10;
+
+ private final ResourceTO resourceTO;
+
+ private final Class<? extends AbstractAttributableTO> typeRef;
+
+ private final PageReference pageRef;
+
+ private final ModalWindow window;
+
+ private final StatusUtils statusUtils;
+
+ public ProvisioningModalPage(
+ final PageReference pageRef,
+ final ModalWindow window,
+ final ResourceTO resourceTO,
+ final Class<T> typeRef) {
+
+ super();
+
+ this.pageRef = pageRef;
+ this.window = window;
+ this.resourceTO = resourceTO;
+ this.typeRef = typeRef;
+
+ statusUtils = new StatusUtils((UserTO.class.isAssignableFrom(typeRef) ? userRestClient : roleRestClient));
+
+ add(new Label("displayName", StringUtils.EMPTY));
+
+ final List<IColumn<StatusBean, String>> columns = new ArrayList<>();
+ columns.add(new PropertyColumn<StatusBean, String>(
+ new StringResourceModel("key", this, null, "Attributable key"),
+ "attributableKey", "attributableKey"));
+ columns.add(new PropertyColumn<StatusBean, String>(
+ new StringResourceModel("name", this, null, "Attributable name"),
+ "attributableName", "attributableName"));
+ columns.add(new PropertyColumn<StatusBean, String>(
+ new StringResourceModel("resourceName", this, null, "Resource name"),
+ "resourceName", "resourceName"));
+ columns.add(new PropertyColumn<StatusBean, String>(
+ new StringResourceModel("accountLink", this, null, "Account link"),
+ "accountLink", "accountLink"));
+ columns.add(new AbstractColumn<StatusBean, String>(
+ new StringResourceModel("status", this, null, "")) {
+
+ private static final long serialVersionUID = -3503023501954863131L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(
+ final Item<ICellPopulator<StatusBean>> cellItem,
+ final String componentId,
+ final IModel<StatusBean> model) {
+ cellItem.
+ add(statusUtils.getStatusImagePanel(componentId, model.getObject().getStatus()));
+ }
+ });
+
+ final ActionDataTablePanel<StatusBean, String> table = new ActionDataTablePanel<>(
+ "resourceDatatable",
+ columns,
+ (ISortableDataProvider<StatusBean, String>) new StatusBeanProvider(),
+ ROWS_PER_PAGE,
+ pageRef);
+
+ final String pageId = "Resources";
+
+ table.addAction(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ bulkAssociationAction(target, ResourceDeassociationActionType.UNLINK, table, columns);
+ } catch (Exception e) {
+ LOG.error("Error unlinkink resources", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }, ActionLink.ActionType.UNLINK, pageId);
+
+ table.addAction(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ bulkAssociationAction(target, ResourceDeassociationActionType.DEPROVISION, table, columns);
+ } catch (Exception e) {
+ LOG.error("Error de-provisioning user", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }, ActionLink.ActionType.DEPROVISION, pageId);
+
+ table.addAction(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ try {
+ bulkAssociationAction(target, ResourceDeassociationActionType.UNASSIGN, table, columns);
+ } catch (Exception e) {
+ LOG.error("Error unassigning resources", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+ }, ActionLink.ActionType.UNASSIGN, pageId);
+
+ table.addCancelButton(window);
+
+ add(table);
+ }
+
+ private class StatusBeanProvider extends AbstractStatusBeanProvider {
+
+ private static final long serialVersionUID = 4287357360778016173L;
+
+ public StatusBeanProvider() {
+ super("accountLink");
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public List<StatusBean> getStatusBeans() {
+ final String fiql = SyncopeClient.getUserSearchConditionBuilder().hasResources(resourceTO.getKey()).query();
+
+ final List<T> subjects = new ArrayList<>();
+ if (UserTO.class.isAssignableFrom(typeRef)) {
+ subjects.addAll((List<T>) userRestClient.search(fiql, 1, ROWS_PER_PAGE, new SortParam<>("key", true)));
+ } else {
+ subjects.addAll((List<T>) roleRestClient.search(fiql, 1, ROWS_PER_PAGE, new SortParam<>("key", true)));
+ }
+
+ final List<ConnObjectWrapper> connObjects = statusUtils.getConnectorObjects(
+ (List<AbstractSubjectTO>) subjects, Collections.<String>singleton(resourceTO.getKey()));
+
+ final List<StatusBean> statusBeans = new ArrayList<>(connObjects.size() + 1);
+ final LinkedHashMap<String, StatusBean> initialStatusBeanMap = new LinkedHashMap<>(connObjects.size());
+
+ for (ConnObjectWrapper entry : connObjects) {
+ final StatusBean statusBean = statusUtils.getStatusBean(
+ entry.getAttributable(),
+ entry.getResourceName(),
+ entry.getConnObjectTO(),
+ RoleTO.class.isAssignableFrom(typeRef));
+
+ initialStatusBeanMap.put(entry.getResourceName(), statusBean);
+ statusBeans.add(statusBean);
+ }
+
+ return statusBeans;
+ }
+ }
+
+ private void bulkAssociationAction(
+ final AjaxRequestTarget target,
+ final ResourceDeassociationActionType type,
+ final ActionDataTablePanel<StatusBean, String> table,
+ final List<IColumn<StatusBean, String>> columns) {
+
+ final List<StatusBean> beans = new ArrayList<>(table.getModelObject());
+ List<SubjectKey> subjectKeys = new ArrayList<>();
+ for (StatusBean bean : beans) {
+ LOG.debug("Selected bean {}", bean);
+ subjectKeys.add(AbstractWrappable.getInstance(SubjectKey.class, bean.getAttributableId()));
+ }
+
+ if (beans.isEmpty()) {
+ window.close(target);
+ } else {
+ final BulkActionResult res = resourceRestClient.bulkAssociationAction(
+ resourceTO.getKey(), typeRef, type, subjectKeys);
+
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+
+ setResponsePage(new BulkActionResultModalPage<>(window, beans, columns, res, "attributableKey"));
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/PushTaskModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/PushTaskModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/PushTaskModalPage.java
new file mode 100644
index 0000000..a799b15
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/PushTaskModalPage.java
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.RoleSearchPanel;
+import org.apache.syncope.client.console.panels.UserSearchPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.common.lib.to.PushTaskTO;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.syncope.common.lib.types.MatchingRule;
+import org.apache.syncope.common.lib.types.UnmatchingRule;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.model.Model;
+
+/**
+ * Modal window with Push Task form.
+ */
+public class PushTaskModalPage extends AbstractSyncTaskModalPage {
+
+ private static final long serialVersionUID = 2148403203517274669L;
+
+ private final UserSearchPanel userFilter;
+
+ private final RoleSearchPanel roleFilter;
+
+ private final AjaxCheckBoxPanel checkUserFilter;
+
+ private final AjaxCheckBoxPanel checkRoleFilter;
+
+ @Override
+ protected List<String> getSyncActions() {
+ return taskRestClient.getPushActionsClasses();
+ }
+
+ public PushTaskModalPage(final ModalWindow window, final PushTaskTO taskTO, final PageReference pageRef) {
+
+ super(window, taskTO, pageRef);
+
+ // set default Matching rule
+ ((DropDownChoice) matchingRule.getField()).setDefaultModelObject(taskTO.getMatchingRule() == null
+ ? MatchingRule.UPDATE
+ : taskTO.getMatchingRule());
+ profile.add(matchingRule);
+
+ // set default Unmatching rule
+ ((DropDownChoice) unmatchingRule.getField()).setDefaultModelObject(taskTO.getUnmatchingRule() == null
+ ? UnmatchingRule.ASSIGN
+ : taskTO.getUnmatchingRule());
+ profile.add(unmatchingRule);
+
+ final WebMarkupContainer filterContainer = new WebMarkupContainer("filterContainer");
+ filterContainer.setOutputMarkupId(true);
+
+ checkUserFilter = new AjaxCheckBoxPanel("checkUserFilter", "checkUserFilter",
+ new Model<Boolean>(taskTO.getUserFilter() != null));
+ filterContainer.add(checkUserFilter);
+
+ checkRoleFilter = new AjaxCheckBoxPanel("checkRoleFilter", "checkRoleFilter",
+ new Model<Boolean>(taskTO.getRoleFilter() != null));
+ filterContainer.add(checkRoleFilter);
+
+ userFilter = new UserSearchPanel.Builder("userFilter").fiql(taskTO.getUserFilter()).build();
+ userFilter.setEnabled(checkUserFilter.getModelObject());
+
+ filterContainer.add(userFilter);
+
+ roleFilter = new RoleSearchPanel.Builder("roleFilter").fiql(taskTO.getRoleFilter()).build();
+ roleFilter.setEnabled(checkRoleFilter.getModelObject());
+ filterContainer.add(roleFilter);
+
+ checkUserFilter.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ userFilter.setEnabled(checkUserFilter.getModelObject());
+ target.add(filterContainer);
+ }
+ });
+
+ checkRoleFilter.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ roleFilter.setEnabled(checkRoleFilter.getModelObject());
+ target.add(filterContainer);
+ }
+ });
+
+ profile.add(filterContainer);
+ }
+
+ @Override
+ public void submitAction(final SchedTaskTO taskTO) {
+ setFilters((PushTaskTO) taskTO);
+ if (taskTO.getKey() > 0) {
+ taskRestClient.updateSchedTask((PushTaskTO) taskTO);
+ } else {
+ taskRestClient.createSchedTask((PushTaskTO) taskTO);
+ }
+ }
+
+ private void setFilters(final PushTaskTO pushTaskTO) {
+ // set user filter if enabled
+ pushTaskTO.setUserFilter(checkUserFilter.getModelObject() ? userFilter.buildFIQL() : null);
+ // set role filter if enabled
+ pushTaskTO.setRoleFilter(checkRoleFilter.getModelObject() ? roleFilter.buildFIQL() : null);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/client/console/src/main/java/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage.java
new file mode 100644
index 0000000..c6b57d2
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ReportExecResultDownloadModalPage.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.syncope.client.console.pages;
+
+import java.util.Arrays;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.common.lib.types.ReportExecExportFormat;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.model.Model;
+
+public class ReportExecResultDownloadModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 3163146190501510888L;
+
+ public ReportExecResultDownloadModalPage(final ModalWindow window, final PageReference callerPageRef) {
+
+ final AjaxDropDownChoicePanel<ReportExecExportFormat> format =
+ new AjaxDropDownChoicePanel<>("format", "format", new Model<ReportExecExportFormat>());
+
+ format.setChoices(Arrays.asList(ReportExecExportFormat.values()));
+
+ format.setChoiceRenderer(new IChoiceRenderer<ReportExecExportFormat>() {
+
+ private static final long serialVersionUID = -3941271550163141339L;
+
+ @Override
+ public Object getDisplayValue(final ReportExecExportFormat object) {
+ return object.name();
+ }
+
+ @Override
+ public String getIdValue(final ReportExecExportFormat object, final int index) {
+
+ return object.name();
+ }
+ });
+
+ format.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ format.getField();
+
+ ((ReportModalPage) callerPageRef.getPage()).setExportFormat(format.getField().getModelObject());
+ window.close(target);
+ }
+ });
+ add(format);
+ }
+}