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 2012/03/15 11:17:24 UTC
svn commit: r1300882 [3/22] - in /incubator/syncope/trunk:
build-tools/src/main/java/org/syncope/buildtools/
client/src/main/java/org/syncope/annotation/
client/src/main/java/org/syncope/client/
client/src/main/java/org/syncope/client/http/ client/src/...
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/PreferenceManager.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/PreferenceManager.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/PreferenceManager.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/PreferenceManager.java Thu Mar 15 10:17:12 2012
@@ -44,17 +44,14 @@ public class PreferenceManager {
/**
* Logger.
*/
- private static final Logger LOG = LoggerFactory.getLogger(
- PreferenceManager.class);
+ private static final Logger LOG = LoggerFactory.getLogger(PreferenceManager.class);
private static final int ONE_YEAR_TIME = 60 * 60 * 24 * 365;
- private static final TypeReference MAP_TYPE_REF =
- new TypeReference<Map<String, String>>() {
- };
+ private static final TypeReference MAP_TYPE_REF = new TypeReference<Map<String, String>>() {
+ };
- private static final List<Integer> PAGINATOR_CHOICES =
- Arrays.asList(new Integer[]{10, 25, 50});
+ private static final List<Integer> PAGINATOR_CHOICES = Arrays.asList(new Integer[] { 10, 25, 50 });
@Autowired
private ObjectMapper mapper;
@@ -83,8 +80,7 @@ public class PreferenceManager {
return prefs;
}
- private String setPrefs(final Map<String, String> prefs)
- throws IOException {
+ private String setPrefs(final Map<String, String> prefs) throws IOException {
StringWriter writer = new StringWriter();
mapper.writeValue(writer, prefs);
@@ -95,13 +91,11 @@ public class PreferenceManager {
public String get(final Request request, final String key) {
String result = null;
- Cookie prefCookie = ((WebRequest) request).getCookie(
- Constants.PREFS_COOKIE_NAME);
+ Cookie prefCookie = ((WebRequest) request).getCookie(Constants.PREFS_COOKIE_NAME);
if (prefCookie != null) {
- final Map<String, String> prefs = getPrefs(new String(
- Base64.decodeBase64(prefCookie.getValue().getBytes())));
+ final Map<String, String> prefs = getPrefs(new String(Base64.decodeBase64(prefCookie.getValue().getBytes())));
result = prefs.get(key);
@@ -112,8 +106,7 @@ public class PreferenceManager {
return result;
}
- public Integer getPaginatorRows(final Request request,
- final String key) {
+ public Integer getPaginatorRows(final Request request, final String key) {
Integer result = getPaginatorChoices().get(0);
@@ -143,30 +136,25 @@ public class PreferenceManager {
return result;
}
- public void set(final Request request, final Response response,
- final Map<String, List<String>> prefs) {
+ public void set(final Request request, final Response response, final Map<String, List<String>> prefs) {
- Cookie prefCookie =
- ((WebRequest) request).getCookie(Constants.PREFS_COOKIE_NAME);
+ Cookie prefCookie = ((WebRequest) request).getCookie(Constants.PREFS_COOKIE_NAME);
final Map<String, String> current = new HashMap<String, String>();
if (prefCookie == null || !StringUtils.hasText(prefCookie.getValue())) {
prefCookie = new Cookie(Constants.PREFS_COOKIE_NAME, null);
} else {
- current.putAll(getPrefs(new String(Base64.decodeBase64(
- prefCookie.getValue().getBytes()))));
+ current.putAll(getPrefs(new String(Base64.decodeBase64(prefCookie.getValue().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(), ";"));
+ current.put(entry.getKey(), StringUtils.collectionToDelimitedString(entry.getValue(), ";"));
}
try {
- prefCookie.setValue(new String(
- Base64.encodeBase64(setPrefs(current).getBytes())));
+ prefCookie.setValue(new String(Base64.encodeBase64(setPrefs(current).getBytes())));
} catch (IOException e) {
LOG.error("Could not set preferences " + current, e);
}
@@ -175,27 +163,23 @@ public class PreferenceManager {
((WebResponse) response).addCookie(prefCookie);
}
- public void set(final Request request, final Response response,
- final String key, final String value) {
+ public void set(final Request request, final Response response, final String key, final String value) {
- Cookie prefCookie =
- ((WebRequest) request).getCookie(Constants.PREFS_COOKIE_NAME);
+ Cookie prefCookie = ((WebRequest) request).getCookie(Constants.PREFS_COOKIE_NAME);
final Map<String, String> prefs = new HashMap<String, String>();
if (prefCookie == null || !StringUtils.hasText(prefCookie.getValue())) {
prefCookie = new Cookie(Constants.PREFS_COOKIE_NAME, null);
} else {
- prefs.putAll(getPrefs(new String(Base64.decodeBase64(
- prefCookie.getValue().getBytes()))));
+ prefs.putAll(getPrefs(new String(Base64.decodeBase64(prefCookie.getValue().getBytes()))));
}
// after retrieved previous setting in order to overwrite the key ...
prefs.put(key, value);
try {
- prefCookie.setValue(new String(
- Base64.encodeBase64(setPrefs(prefs).getBytes())));
+ prefCookie.setValue(new String(Base64.encodeBase64(setPrefs(prefs).getBytes())));
} catch (IOException e) {
LOG.error("Could not set preferences " + prefs, e);
}
@@ -204,15 +188,12 @@ public class PreferenceManager {
((WebResponse) response).addCookie(prefCookie);
}
- public void setList(final Request request, final Response response,
- final String key, final List<String> values) {
+ public void setList(final Request request, final Response response, final String key, final List<String> values) {
- set(request, response,
- key, StringUtils.collectionToDelimitedString(values, ";"));
+ set(request, response, key, StringUtils.collectionToDelimitedString(values, ";"));
}
- public void setList(final Request request, final Response response,
- final Map<String, List<String>> prefs) {
+ public void setList(final Request request, final Response response, final Map<String, List<String>> prefs) {
set(request, response, prefs);
}
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/RoleTreeBuilder.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/RoleTreeBuilder.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/RoleTreeBuilder.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/RoleTreeBuilder.java Thu Mar 15 10:17:12 2012
@@ -37,8 +37,7 @@ public class RoleTreeBuilder {
private RoleTOComparator comparator = new RoleTOComparator();
- private List<RoleTO> getChildRoles(final long parentRoleId,
- final List<RoleTO> roles) {
+ private List<RoleTO> getChildRoles(final long parentRoleId, final List<RoleTO> roles) {
List<RoleTO> result = new ArrayList<RoleTO>();
for (RoleTO role : roles) {
@@ -51,8 +50,7 @@ public class RoleTreeBuilder {
return result;
}
- private void populateSubtree(final DefaultMutableTreeNode subRoot,
- final List<RoleTO> roles) {
+ private void populateSubtree(final DefaultMutableTreeNode subRoot, final List<RoleTO> roles) {
RoleTO role = (RoleTO) subRoot.getUserObject();
@@ -69,16 +67,14 @@ public class RoleTreeBuilder {
}
public TreeModel build(final List<RoleTO> roles) {
- DefaultMutableTreeNode fakeroot =
- new DefaultMutableTreeNode(new FakeRootRoleTO());
+ DefaultMutableTreeNode fakeroot = new DefaultMutableTreeNode(new FakeRootRoleTO());
populateSubtree(fakeroot, roles);
return new DefaultTreeModel(fakeroot);
}
- private static class RoleTOComparator
- implements Comparator<RoleTO>, Serializable {
+ private static class RoleTOComparator implements Comparator<RoleTO>, Serializable {
private static final long serialVersionUID = 7085057398406518811L;
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SchemaModalPageFactory.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SchemaModalPageFactory.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SchemaModalPageFactory.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SchemaModalPageFactory.java Thu Mar 15 10:17:12 2012
@@ -45,8 +45,7 @@ abstract public class SchemaModalPageFac
};
- public static AbstractSchemaModalPage getSchemaModalPage(
- AttributableType entity, SchemaType schemaType) {
+ public static AbstractSchemaModalPage getSchemaModalPage(AttributableType entity, SchemaType schemaType) {
AbstractSchemaModalPage page;
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SearchCondWrapper.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SearchCondWrapper.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SearchCondWrapper.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SearchCondWrapper.java Thu Mar 15 10:17:12 2012
@@ -108,7 +108,6 @@ public class SearchCondWrapper implement
@Override
public String toString() {
- return ReflectionToStringBuilder.toString(this,
- ToStringStyle.MULTI_LINE_STYLE);
+ return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
}
}
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SelectOption.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SelectOption.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SelectOption.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SelectOption.java Thu Mar 15 10:17:12 2012
@@ -56,8 +56,7 @@ public class SelectOption implements Ser
return false;
}
- return (keyValue == null && ((SelectOption) obj).keyValue == null)
- || keyValue != null
+ return (keyValue == null && ((SelectOption) obj).keyValue == null) || keyValue != null
&& keyValue.equals(((SelectOption) obj).keyValue);
}
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SortableDataProviderComparator.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SortableDataProviderComparator.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SortableDataProviderComparator.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SortableDataProviderComparator.java Thu Mar 15 10:17:12 2012
@@ -24,21 +24,18 @@ import org.apache.wicket.extensions.mark
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.PropertyModel;
-public class SortableDataProviderComparator<T> implements
- Comparator<T>, Serializable {
+public class SortableDataProviderComparator<T> implements Comparator<T>, Serializable {
private static final long serialVersionUID = -8897687699977460543L;
protected final SortableDataProvider<T> provider;
- public SortableDataProviderComparator(
- final SortableDataProvider<T> provider) {
+ public SortableDataProviderComparator(final SortableDataProvider<T> provider) {
this.provider = provider;
}
- protected int compare(final IModel<Comparable> model1,
- IModel<Comparable> model2) {
+ protected int compare(final IModel<Comparable> model1, IModel<Comparable> model2) {
int result;
@@ -52,17 +49,17 @@ public class SortableDataProviderCompara
result = model1.getObject().compareTo(model2.getObject());
}
- result = provider.getSort().isAscending() ? result : -result;
+ result = provider.getSort().isAscending()
+ ? result
+ : -result;
return result;
}
@Override
public int compare(final T o1, final T o2) {
- IModel<Comparable> model1 = new PropertyModel<Comparable>(
- o1, provider.getSort().getProperty());
- IModel<Comparable> model2 = new PropertyModel<Comparable>(
- o2, provider.getSort().getProperty());
+ IModel<Comparable> model1 = new PropertyModel<Comparable>(o1, provider.getSort().getProperty());
+ IModel<Comparable> model2 = new PropertyModel<Comparable>(o2, provider.getSort().getProperty());
return compare(model1, model2);
}
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SortableUserProviderComparator.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SortableUserProviderComparator.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SortableUserProviderComparator.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/SortableUserProviderComparator.java Thu Mar 15 10:17:12 2012
@@ -27,8 +27,7 @@ import org.apache.wicket.model.AbstractR
import org.syncope.client.to.AttributeTO;
import org.syncope.client.to.UserTO;
-public class SortableUserProviderComparator
- extends SortableDataProviderComparator<UserTO> {
+public class SortableUserProviderComparator extends SortableDataProviderComparator<UserTO> {
private static final Set<String> inlineProps;
@@ -39,8 +38,7 @@ public class SortableUserProviderCompara
inlineProps.add("token");
}
- public SortableUserProviderComparator(
- final SortableDataProvider<UserTO> provider) {
+ public SortableUserProviderComparator(final SortableDataProvider<UserTO> provider) {
super(provider);
}
@@ -51,8 +49,7 @@ public class SortableUserProviderCompara
return super.compare(o1, o2);
}
- return super.compare(new AttrModel(o1.getAttributeMap()),
- new AttrModel(o2.getAttributeMap()));
+ return super.compare(new AttrModel(o1.getAttributeMap()), new AttrModel(o2.getAttributeMap()));
}
private class AttrModel extends AbstractReadOnlyModel<Comparable> {
@@ -69,8 +66,7 @@ public class SortableUserProviderCompara
public Comparable getObject() {
Comparable result = null;
- List<String> values = attrMap.get(
- provider.getSort().getProperty()).getValues();
+ List<String> values = attrMap.get(provider.getSort().getProperty()).getValues();
if (values != null && !values.isEmpty()) {
result = values.iterator().next();
}
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/StatusUtils.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/StatusUtils.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/StatusUtils.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/StatusUtils.java Thu Mar 15 10:17:12 2012
@@ -40,8 +40,7 @@ public class StatusUtils {
/**
* Logger.
*/
- private static final Logger LOG =
- LoggerFactory.getLogger(StatusUtils.class);
+ private static final Logger LOG = LoggerFactory.getLogger(StatusUtils.class);
@Autowired
private UserRestClient userRestClient;
@@ -72,7 +71,9 @@ public class StatusUtils {
String objectId = null;
- switch (accountId != null ? accountId.getKey() : IntMappingType.SyncopeUserId) {
+ switch (accountId != null
+ ? accountId.getKey()
+ : IntMappingType.SyncopeUserId) {
case SyncopeUserId:
objectId = String.valueOf(userTO.getId());
@@ -82,29 +83,24 @@ public class StatusUtils {
break;
case UserSchema:
AttributeTO attributeTO = userTO.getAttributeMap().get(accountId.getValue());
- objectId =
- attributeTO != null
- && attributeTO.getValues() != null
+ objectId = attributeTO != null && attributeTO.getValues() != null
&& !attributeTO.getValues().isEmpty()
- ? attributeTO.getValues().get(0) : null;
+ ? attributeTO.getValues().get(0)
+ : null;
break;
case UserDerivedSchema:
- attributeTO = userTO.getDerivedAttributeMap().
- get(accountId.getValue());
- objectId =
- attributeTO != null
- && attributeTO.getValues() != null
+ attributeTO = userTO.getDerivedAttributeMap().get(accountId.getValue());
+ objectId = attributeTO != null && attributeTO.getValues() != null
&& !attributeTO.getValues().isEmpty()
- ? attributeTO.getValues().get(0) : null;
+ ? attributeTO.getValues().get(0)
+ : null;
break;
case UserVirtualSchema:
- attributeTO = userTO.getVirtualAttributeMap().
- get(accountId.getValue());
- objectId =
- attributeTO != null
- && attributeTO.getValues() != null
+ attributeTO = userTO.getVirtualAttributeMap().get(accountId.getValue());
+ objectId = attributeTO != null && attributeTO.getValues() != null
&& !attributeTO.getValues().isEmpty()
- ? attributeTO.getValues().get(0) : null;
+ ? attributeTO.getValues().get(0)
+ : null;
break;
default:
}
@@ -125,8 +121,7 @@ public class StatusUtils {
return statuses;
}
- public StatusBean getRemoteStatus(
- final ConnObjectTO objectTO) {
+ public StatusBean getRemoteStatus(final ConnObjectTO objectTO) {
final StatusBean statusBean = new StatusBean();
@@ -136,8 +131,8 @@ public class StatusUtils {
final StatusUtils.Status status = enabled == null
? StatusUtils.Status.UNDEFINED
: enabled
- ? StatusUtils.Status.ACTIVE
- : StatusUtils.Status.SUSPENDED;
+ ? StatusUtils.Status.ACTIVE
+ : StatusUtils.Status.SUSPENDED;
final String accountLink = getAccountLink(objectTO);
@@ -155,30 +150,32 @@ public class StatusUtils {
final AttributeTO status = attributeTOs.get(STATUSATTR);
- return status != null && status.getValues() != null
- && !status.getValues().isEmpty() ? Boolean.parseBoolean(status.getValues().get(0)) : null;
+ return status != null && status.getValues() != null && !status.getValues().isEmpty()
+ ? Boolean.parseBoolean(status.getValues().get(0))
+ : null;
}
public String getAccountLink(final ConnObjectTO objectTO) {
final String NAME = "__NAME__";
final Map<String, AttributeTO> attributeTOs = objectTO != null
- ? objectTO.getAttributeMap() : Collections.EMPTY_MAP;
+ ? objectTO.getAttributeMap()
+ : Collections.EMPTY_MAP;
final AttributeTO name = attributeTOs.get(NAME);
- return name != null && name.getValues() != null
- && !name.getValues().isEmpty() ? (String) name.getValues().get(0) : null;
+ return name != null && name.getValues() != null && !name.getValues().isEmpty()
+ ? (String) name.getValues().get(0)
+ : null;
}
- public Map.Entry<IntMappingType, String> getAccountId(
- final ResourceTO resourceTO) {
+ public Map.Entry<IntMappingType, String> getAccountId(final ResourceTO resourceTO) {
Map.Entry<IntMappingType, String> accountId = null;
for (SchemaMappingTO mapping : resourceTO.getMappings()) {
if (mapping.isAccountid()) {
- accountId = new AbstractMap.SimpleEntry<IntMappingType, String>(
- mapping.getIntMappingType(), mapping.getIntAttrName());
+ accountId = new AbstractMap.SimpleEntry<IntMappingType, String>(mapping.getIntMappingType(), mapping
+ .getIntAttrName());
}
}
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/UserDataProvider.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/UserDataProvider.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/UserDataProvider.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/UserDataProvider.java Thu Mar 15 10:17:12 2012
@@ -43,10 +43,7 @@ public class UserDataProvider extends So
private UserRestClient restClient;
- public UserDataProvider(
- final UserRestClient restClient,
- final int paginatorRows,
- final boolean filtered) {
+ public UserDataProvider(final UserRestClient restClient, final int paginatorRows, final boolean filtered) {
super();
@@ -71,8 +68,7 @@ public class UserDataProvider extends So
if (filtered) {
users = filter == null
? Collections.EMPTY_LIST
- : restClient.search(filter, (first / paginatorRows) + 1,
- paginatorRows);
+ : restClient.search(filter, (first / paginatorRows) + 1, paginatorRows);
} else {
users = restClient.list((first / paginatorRows) + 1, paginatorRows);
}
@@ -84,7 +80,9 @@ public class UserDataProvider extends So
@Override
public int size() {
if (filtered) {
- return filter == null ? 0 : restClient.searchCount(filter);
+ return filter == null
+ ? 0
+ : restClient.searchCount(filter);
} else {
return restClient.count();
}
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/XMLRolesReader.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/XMLRolesReader.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/XMLRolesReader.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/XMLRolesReader.java Thu Mar 15 10:17:12 2012
@@ -39,8 +39,7 @@ public class XMLRolesReader {
/**
* Logger.
*/
- private static final Logger LOG = LoggerFactory.getLogger(
- XMLRolesReader.class);
+ private static final Logger LOG = LoggerFactory.getLogger(XMLRolesReader.class);
@Autowired
private String authorizations;
@@ -52,8 +51,7 @@ public class XMLRolesReader {
dbf.setNamespaceAware(true);
try {
DocumentBuilder db = dbf.newDocumentBuilder();
- doc = db.parse(getClass().getResource("/" + authorizations).
- openStream());
+ doc = db.parse(getClass().getResource("/" + authorizations).openStream());
doc.getDocumentElement().normalize();
} catch (Exception e) {
LOG.error("While initializing parsing of {}", authorizations, e);
@@ -68,8 +66,7 @@ public class XMLRolesReader {
* @param actionId
* @return roles list comma separated
*/
- public String getAllAllowedRoles(final String pageId,
- final String actionId) {
+ public String getAllAllowedRoles(final String pageId, final String actionId) {
if (doc == null) {
init();
@@ -82,9 +79,7 @@ public class XMLRolesReader {
try {
XPathFactory factory = XPathFactory.newInstance();
XPath xpath = factory.newXPath();
- XPathExpression expr = xpath.compile(
- "//page[@id='" + pageId + "']/"
- + "action[@id='" + actionId + "']/"
+ XPathExpression expr = xpath.compile("//page[@id='" + pageId + "']/" + "action[@id='" + actionId + "']/"
+ "entitlement/text()");
Object result = expr.evaluate(doc, XPathConstants.NODESET);
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/markup/html/CrontabContainer.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/markup/html/CrontabContainer.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/markup/html/CrontabContainer.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/markup/html/CrontabContainer.java Thu Mar 15 10:17:12 2012
@@ -38,23 +38,14 @@ public class CrontabContainer extends We
/**
* Logger.
*/
- protected static final Logger LOG = LoggerFactory.getLogger(
- CrontabContainer.class);
+ protected static final Logger LOG = LoggerFactory.getLogger(CrontabContainer.class);
- private static final SelectOption[] CRON_TEMPLATES = new SelectOption[]{
- new SelectOption(
- "Unschedule", "UNSCHEDULE"),
- new SelectOption(
- "Every 5 minutes", "0 0/5 * * * ?"),
- new SelectOption(
- "Fire at 12pm (noon) every day", "0 0 12 * * ?"),
- new SelectOption(
- "Fire at 12am (midnight) every first day of the month", "0 0 0 1 * ?"),
- new SelectOption(
- "Fire at 12am (midnight) every last day of the month", "0 0 0 L * ?"),
- new SelectOption(
- "Fire at 12am (midnight) every Monday", "0 0 0 ? * 2")
- };
+ private static final SelectOption[] CRON_TEMPLATES = new SelectOption[] {
+ new SelectOption("Unschedule", "UNSCHEDULE"), new SelectOption("Every 5 minutes", "0 0/5 * * * ?"),
+ new SelectOption("Fire at 12pm (noon) every day", "0 0 12 * * ?"),
+ new SelectOption("Fire at 12am (midnight) every first day of the month", "0 0 0 1 * ?"),
+ new SelectOption("Fire at 12am (midnight) every last day of the month", "0 0 0 L * ?"),
+ new SelectOption("Fire at 12am (midnight) every Monday", "0 0 0 ? * 2") };
private static final long serialVersionUID = 7879593326085337650L;
@@ -70,28 +61,22 @@ public class CrontabContainer extends We
private final TextField daysOfWeek;
- public CrontabContainer(final String id,
- final PropertyModel<String> cronExpressionModel,
+ public CrontabContainer(final String id, final PropertyModel<String> cronExpressionModel,
final String cronExpression) {
super(id);
setOutputMarkupId(true);
- final DropDownChoice<SelectOption> cronTemplateChooser =
- new DropDownChoice("cronTemplateChooser") {
+ final DropDownChoice<SelectOption> cronTemplateChooser = new DropDownChoice("cronTemplateChooser") {
- private static final long serialVersionUID =
- -5843424545478691442L;
+ private static final long serialVersionUID = -5843424545478691442L;
- @Override
- protected CharSequence getDefaultChoice(
- final String selected) {
-
- return "<option value=\"\">"
- + getString("chooseForTemplate")
- + "</option>";
- }
- };
+ @Override
+ protected CharSequence getDefaultChoice(final String selected) {
+
+ return "<option value=\"\">" + getString("chooseForTemplate") + "</option>";
+ }
+ };
cronTemplateChooser.setModel(new IModel<SelectOption>() {
private static final long serialVersionUID = 6762568283146531315L;
@@ -100,8 +85,7 @@ public class CrontabContainer extends We
public SelectOption getObject() {
SelectOption result = null;
for (SelectOption so : CRON_TEMPLATES) {
- if (so.getKeyValue().equals(
- cronExpressionModel.getObject())) {
+ if (so.getKeyValue().equals(cronExpressionModel.getObject())) {
result = so;
}
@@ -112,9 +96,9 @@ public class CrontabContainer extends We
@Override
public void setObject(final SelectOption object) {
- cronExpressionModel.setObject(
- object == null || object.equals(CRON_TEMPLATES[0])
- ? null : object.toString());
+ cronExpressionModel.setObject(object == null || object.equals(CRON_TEMPLATES[0])
+ ? null
+ : object.toString());
}
@Override
@@ -125,57 +109,42 @@ public class CrontabContainer extends We
cronTemplateChooser.setChoiceRenderer(new SelectChoiceRenderer());
add(cronTemplateChooser);
- seconds = new TextField("seconds",
- new Model(getCronField(cronExpression, 0)));
+ seconds = new TextField("seconds", new Model(getCronField(cronExpression, 0)));
add(seconds);
- minutes = new TextField("minutes",
- new Model(getCronField(cronExpression, 1)));
+ minutes = new TextField("minutes", new Model(getCronField(cronExpression, 1)));
add(minutes);
- hours = new TextField("hours",
- new Model(getCronField(cronExpression, 2)));
+ hours = new TextField("hours", new Model(getCronField(cronExpression, 2)));
add(hours);
- daysOfMonth = new TextField("daysOfMonth",
- new Model(getCronField(cronExpression, 3)));
+ daysOfMonth = new TextField("daysOfMonth", new Model(getCronField(cronExpression, 3)));
add(daysOfMonth);
- months = new TextField("months",
- new Model(getCronField(cronExpression, 4)));
+ months = new TextField("months", new Model(getCronField(cronExpression, 4)));
add(months);
- daysOfWeek = new TextField("daysOfWeek",
- new Model(getCronField(cronExpression, 5)));
+ daysOfWeek = new TextField("daysOfWeek", new Model(getCronField(cronExpression, 5)));
add(daysOfWeek);
- cronTemplateChooser.add(
- new AjaxFormComponentUpdatingBehavior("onchange") {
+ cronTemplateChooser.add(new AjaxFormComponentUpdatingBehavior("onchange") {
- private static final long serialVersionUID =
- -1107858522700306810L;
+ 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);
- }
- });
+ @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) {
+ private String getCronField(final FormComponent formComponent, final int field) {
String cronField = null;
@@ -199,26 +168,14 @@ public class CrontabContainer extends We
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();
+ 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;
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/AbstractSchedTaskModalPage.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/AbstractSchedTaskModalPage.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/AbstractSchedTaskModalPage.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/AbstractSchedTaskModalPage.java Thu Mar 15 10:17:12 2012
@@ -43,16 +43,13 @@ public abstract class AbstractSchedTaskM
protected CrontabContainer crontab;
- public AbstractSchedTaskModalPage(
- final ModalWindow window,
- final SchedTaskTO taskTO,
+ public AbstractSchedTaskModalPage(final ModalWindow window, final SchedTaskTO taskTO,
final PageReference callerPageRef) {
super(taskTO);
- crontab = new CrontabContainer("crontab",
- new PropertyModel<String>(taskTO, "cronExpression"),
- taskTO.getCronExpression());
+ crontab = new CrontabContainer("crontab", new PropertyModel<String>(taskTO, "cronExpression"), taskTO
+ .getCronExpression());
form.add(crontab);
final AjaxTextFieldPanel lastExec = new AjaxTextFieldPanel("lastExec", getString("lastExec"),
@@ -65,20 +62,17 @@ public abstract class AbstractSchedTaskM
nextExec.setEnabled(false);
profile.add(nextExec);
- final IndicatingAjaxButton submit = new IndicatingAjaxButton(
- "apply", new ResourceModel("apply")) {
+ final IndicatingAjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("apply")) {
private static final long serialVersionUID = -958724007591692537L;
@Override
- protected void onSubmit(
- final AjaxRequestTarget target,
- final Form form) {
+ protected void onSubmit(final AjaxRequestTarget target, final Form form) {
SchedTaskTO taskTO = (SchedTaskTO) form.getModelObject();
- taskTO.setCronExpression(
- !StringUtils.hasText(taskTO.getCronExpression())
- ? null : crontab.getCronExpression());
+ taskTO.setCronExpression(!StringUtils.hasText(taskTO.getCronExpression())
+ ? null
+ : crontab.getCronExpression());
try {
if (taskTO.getId() > 0) {
@@ -106,20 +100,18 @@ public abstract class AbstractSchedTaskM
}
@Override
- protected void onError(final AjaxRequestTarget target,
- final Form form) {
+ protected void onError(final AjaxRequestTarget target, final Form form) {
target.add(feedbackPanel);
}
};
-
if (taskTO.getId() > 0) {
- MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER,
- xmlRolesReader.getAllAllowedRoles("Tasks", "update"));
+ MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER, xmlRolesReader.getAllAllowedRoles("Tasks",
+ "update"));
} else {
- MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER,
- xmlRolesReader.getAllAllowedRoles("Tasks", "create"));
+ MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER, xmlRolesReader.getAllAllowedRoles("Tasks",
+ "create"));
}
form.add(submit);
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/AbstractSchemaModalPage.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/AbstractSchemaModalPage.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/AbstractSchemaModalPage.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/AbstractSchemaModalPage.java Thu Mar 15 10:17:12 2012
@@ -41,11 +41,8 @@ abstract public class AbstractSchemaModa
this.kind = kind;
}
- abstract public void setSchemaModalPage(
- final PageReference callerPageRef,
- final ModalWindow window,
- AbstractBaseBean schema,
- final boolean createFlag);
+ abstract public void setSchemaModalPage(final PageReference callerPageRef, final ModalWindow window,
+ AbstractBaseBean schema, final boolean createFlag);
public AttributableType getKind() {
return kind;
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/ApprovalModalPage.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/ApprovalModalPage.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/ApprovalModalPage.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/ApprovalModalPage.java Thu Mar 15 10:17:12 2012
@@ -80,20 +80,21 @@ public class ApprovalModalPage extends B
protected void populateItem(final ListItem<WorkflowFormPropertyTO> item) {
final WorkflowFormPropertyTO prop = item.getModelObject();
- Label label = new Label("key", prop.getName() == null ? prop.getId() : prop.getName());
+ 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.valueOf(prop.getValue()))).setChoices(Arrays.asList(
- new String[]{"Yes", "No"}));
+ field = new AjaxDropDownChoicePanel("value", label.getDefaultModelObjectAsString(), new Model(
+ Boolean.valueOf(prop.getValue()))).setChoices(Arrays
+ .asList(new String[] { "Yes", "No" }));
break;
case Date:
- SimpleDateFormat df =
- StringUtils.isNotBlank(prop.getDatePattern())
+ SimpleDateFormat df = StringUtils.isNotBlank(prop.getDatePattern())
? new SimpleDateFormat(prop.getDatePattern())
: new SimpleDateFormat();
Date parsedDate = null;
@@ -101,21 +102,20 @@ public class ApprovalModalPage extends B
try {
parsedDate = df.parse(prop.getValue());
} catch (ParseException e) {
- LOG.error("Unparsable date: {}",
- prop.getValue(), e);
+ LOG.error("Unparsable date: {}", prop.getValue(), e);
}
}
- field = new DateTimeFieldPanel("value", label.getDefaultModelObjectAsString(),
- new Model(parsedDate), df.toLocalizedPattern());
+ field = new DateTimeFieldPanel("value", label.getDefaultModelObjectAsString(), new Model(
+ parsedDate), df.toLocalizedPattern());
break;
case Enum:
- MapChoiceRenderer<String, String> enumCR =
- new MapChoiceRenderer<String, String>(prop.getEnumValues());
+ 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() {
+ field = new AjaxDropDownChoicePanel("value", label.getDefaultModelObjectAsString(), new Model(
+ prop.getValue())).setChoiceRenderer(enumCR).setChoices(new Model() {
private static final long serialVersionUID = -858521070366432018L;
@@ -127,8 +127,8 @@ public class ApprovalModalPage extends B
break;
case Long:
- field = new AjaxNumberFieldPanel("value", label.getDefaultModelObjectAsString(),
- new Model(Long.valueOf(prop.getValue())), Long.class);
+ field = new AjaxNumberFieldPanel("value", label.getDefaultModelObjectAsString(), new Model(Long
+ .valueOf(prop.getValue())), Long.class);
break;
case String:
@@ -203,8 +203,8 @@ public class ApprovalModalPage extends B
form.add(propView);
form.add(submit);
- MetaDataRoleAuthorizationStrategy.authorize(form, ENABLE,
- xmlRolesReader.getAllAllowedRoles("Approval", "submit"));
+ MetaDataRoleAuthorizationStrategy.authorize(form, ENABLE, xmlRolesReader.getAllAllowedRoles("Approval",
+ "submit"));
add(form);
}
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/BaseModalPage.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/BaseModalPage.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/BaseModalPage.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/BaseModalPage.java Thu Mar 15 10:17:12 2012
@@ -33,8 +33,7 @@ public abstract class BaseModalPage exte
/**
* Logger.
*/
- protected static final Logger LOG = LoggerFactory.getLogger(
- BasePage.class);
+ protected static final Logger LOG = LoggerFactory.getLogger(BasePage.class);
private static final long serialVersionUID = -1443079028368471943L;
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/BasePage.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/BasePage.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/BasePage.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/BasePage.java Thu Mar 15 10:17:12 2012
@@ -54,8 +54,7 @@ public class BasePage extends WebPage im
/**
* Logger.
*/
- protected static final Logger LOG = LoggerFactory.getLogger(
- BasePage.class);
+ protected static final Logger LOG = LoggerFactory.getLogger(BasePage.class);
private static final long serialVersionUID = 1571997737305598502L;
@@ -97,8 +96,7 @@ public class BasePage extends WebPage im
}
private void pageSetup() {
- ((SyncopeApplication) getApplication()).setupNavigationPane(
- this, xmlRolesReader, true, version);
+ ((SyncopeApplication) getApplication()).setupNavigationPane(this, xmlRolesReader, true, version);
feedbackPanel = new FeedbackPanel("feedback");
feedbackPanel.setOutputMarkupId(true);
@@ -109,12 +107,10 @@ public class BasePage extends WebPage im
if (kindLink != null) {
kindLink.add(new Behavior() {
- private static final long serialVersionUID =
- 1469628524240283489L;
+ private static final long serialVersionUID = 1469628524240283489L;
@Override
- public void onComponentTag(final Component component,
- final ComponentTag tag) {
+ public void onComponentTag(final Component component, final ComponentTag tag) {
tag.put("class", kind);
}
@@ -124,23 +120,19 @@ public class BasePage extends WebPage im
if (kindIcon != null) {
kindIcon.add(new Behavior() {
- private static final long serialVersionUID =
- 1469628524240283489L;
+ private static final long serialVersionUID = 1469628524240283489L;
@Override
- public void onComponentTag(final Component component,
- final ComponentTag tag) {
+ public void onComponentTag(final Component component, final ComponentTag tag) {
- tag.put("src", "../.." + SyncopeApplication.IMG_PREFIX
- + kind + SyncopeApplication.IMG_SUFFIX);
+ tag.put("src", "../.." + SyncopeApplication.IMG_PREFIX + kind + SyncopeApplication.IMG_SUFFIX);
}
});
}
}
// Modal window for editing user profile
- final ModalWindow editProfileModalWin =
- new ModalWindow("editProfileModal");
+ final ModalWindow editProfileModalWin = new ModalWindow("editProfileModal");
editProfileModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
editProfileModalWin.setInitialHeight(EDIT_PROFILE_WIN_HEIGHT);
editProfileModalWin.setInitialWidth(EDIT_PROFILE_WIN_WIDTH);
@@ -151,45 +143,35 @@ public class BasePage extends WebPage im
Fragment editProfileFrag;
if ("admin".equals(SyncopeSession.get().getUserId())) {
- editProfileFrag =
- new Fragment("editProfile", "adminEmptyFrag", this);
+ editProfileFrag = new Fragment("editProfile", "adminEmptyFrag", this);
} else {
final UserTO userTO = SyncopeSession.get().isAuthenticated()
? profileRestClient.readProfile()
: new UserTO();
- editProfileFrag =
- new Fragment("editProfile", "editProfileFrag", this);
+ editProfileFrag = new Fragment("editProfile", "editProfileFrag", this);
- AjaxLink editProfileLink =
- new IndicatingAjaxLink("link") {
+ AjaxLink editProfileLink = new IndicatingAjaxLink("link") {
- private static final long serialVersionUID =
- -7978723352517770644L;
+ private static final long serialVersionUID = -7978723352517770644L;
- @Override
- public void onClick(final AjaxRequestTarget target) {
- editProfileModalWin.setPageCreator(
- new ModalWindow.PageCreator() {
-
- @Override
- public Page createPage() {
- return new UserRequestModalPage(
- BasePage.this.
- getPageReference(),
- editProfileModalWin,
- userTO);
- }
- });
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ editProfileModalWin.setPageCreator(new ModalWindow.PageCreator() {
- editProfileModalWin.show(target);
+ @Override
+ public Page createPage() {
+ return new UserRequestModalPage(BasePage.this.getPageReference(), editProfileModalWin,
+ userTO);
}
- };
- editProfileLink.add(
- new Label("linkTitle", getString("editProfile")));
+ });
- Panel panel = new LinkPanel("editProfile",
- new ResourceModel("editProfile"));
+ editProfileModalWin.show(target);
+ }
+ };
+ editProfileLink.add(new Label("linkTitle", getString("editProfile")));
+
+ Panel panel = new LinkPanel("editProfile", new ResourceModel("editProfile"));
panel.add(editProfileLink);
editProfileFrag.add(panel);
}
@@ -219,24 +201,21 @@ public class BasePage extends WebPage im
* @param window window
* @param container container
*/
- protected void setWindowClosedCallback(final ModalWindow window,
- final WebMarkupContainer container) {
+ protected void setWindowClosedCallback(final ModalWindow window, final WebMarkupContainer container) {
- window.setWindowClosedCallback(
- new ModalWindow.WindowClosedCallback() {
+ window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
- private static final long serialVersionUID =
- 8804221891699487139L;
+ private static final long serialVersionUID = 8804221891699487139L;
- @Override
- public void onClose(final AjaxRequestTarget target) {
- target.add(container);
- if (isModalResult()) {
- info(getString("operation_succeded"));
- target.add(feedbackPanel);
- setModalResult(false);
- }
- }
- });
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ target.add(container);
+ if (isModalResult()) {
+ info(getString("operation_succeded"));
+ target.add(feedbackPanel);
+ setModalResult(false);
+ }
+ }
+ });
}
}
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/Configuration.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/Configuration.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/Configuration.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/Configuration.java Thu Mar 15 10:17:12 2012
@@ -150,8 +150,7 @@ public class Configuration extends BaseP
Form wfForm = new Form("workflowDefForm", new CompoundPropertyModel(workflowDef));
- TextArea<WorkflowDefinitionTO> workflowDefArea =
- new TextArea<WorkflowDefinitionTO>("workflowDefArea",
+ TextArea<WorkflowDefinitionTO> workflowDefArea = new TextArea<WorkflowDefinitionTO>("workflowDefArea",
new PropertyModel<WorkflowDefinitionTO>(workflowDef, "xmlDefinition"));
wfForm.add(workflowDefArea);
@@ -178,14 +177,14 @@ public class Configuration extends BaseP
}
};
- MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE,
- xmlRolesReader.getAllAllowedRoles("Configuration", "workflowDefUpdate"));
+ MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, xmlRolesReader.getAllAllowedRoles("Configuration",
+ "workflowDefUpdate"));
wfForm.add(submit);
workflowDefContainer.add(wfForm);
- MetaDataRoleAuthorizationStrategy.authorize(workflowDefContainer, ENABLE,
- xmlRolesReader.getAllAllowedRoles("Configuration", "workflowDefRead"));
+ MetaDataRoleAuthorizationStrategy.authorize(workflowDefContainer, ENABLE, xmlRolesReader.getAllAllowedRoles(
+ "Configuration", "workflowDefRead"));
add(workflowDefContainer);
// Logger stuff
@@ -194,8 +193,8 @@ public class Configuration extends BaseP
coreLoggerContainer.add(coreLoggerList);
coreLoggerContainer.setOutputMarkupId(true);
- MetaDataRoleAuthorizationStrategy.authorize(coreLoggerContainer, ENABLE,
- xmlRolesReader.getAllAllowedRoles("Configuration", "logList"));
+ MetaDataRoleAuthorizationStrategy.authorize(coreLoggerContainer, ENABLE, xmlRolesReader.getAllAllowedRoles(
+ "Configuration", "logList"));
add(coreLoggerContainer);
ConsoleLoggerController consoleLoggerController = new ConsoleLoggerController();
@@ -205,8 +204,8 @@ public class Configuration extends BaseP
consoleLoggerContainer.add(consoleLoggerList);
consoleLoggerContainer.setOutputMarkupId(true);
- MetaDataRoleAuthorizationStrategy.authorize(consoleLoggerContainer, ENABLE,
- xmlRolesReader.getAllAllowedRoles("Configuration", "logList"));
+ MetaDataRoleAuthorizationStrategy.authorize(consoleLoggerContainer, ENABLE, xmlRolesReader.getAllAllowedRoles(
+ "Configuration", "logList"));
add(consoleLoggerContainer);
}
@@ -229,8 +228,8 @@ public class Configuration extends BaseP
}
@Override
- public void populateItem(final Item<ICellPopulator<ConfigurationTO>> cellItem,
- final String componentId, final IModel<ConfigurationTO> model) {
+ public void populateItem(final Item<ICellPopulator<ConfigurationTO>> cellItem, final String componentId,
+ final IModel<ConfigurationTO> model) {
final ConfigurationTO configurationTO = model.getObject();
@@ -245,13 +244,12 @@ public class Configuration extends BaseP
editConfigWin.setPageCreator(new ModalWindow.PageCreator() {
- private static final long serialVersionUID =
- -7834632442532690940L;
+ private static final long serialVersionUID = -7834632442532690940L;
@Override
public Page createPage() {
- return new ConfigurationModalPage(Configuration.this.getPageReference(),
- editConfigWin, configurationTO, false);
+ return new ConfigurationModalPage(Configuration.this.getPageReference(), editConfigWin,
+ configurationTO, false);
}
});
@@ -306,8 +304,7 @@ public class Configuration extends BaseP
setWindowClosedCallback(createConfigWin, confContainer);
setWindowClosedCallback(editConfigWin, confContainer);
- AjaxLink createConfigurationLink = new AjaxLink(
- "createConfigurationLink") {
+ AjaxLink createConfigurationLink = new AjaxLink("createConfigurationLink") {
private static final long serialVersionUID = -7978723352517770644L;
@@ -320,8 +317,8 @@ public class Configuration extends BaseP
@Override
public Page createPage() {
- return new ConfigurationModalPage(Configuration.this.getPageReference(),
- createConfigWin, new ConfigurationTO(), true);
+ return new ConfigurationModalPage(Configuration.this.getPageReference(), createConfigWin,
+ new ConfigurationTO(), true);
}
});
@@ -329,8 +326,8 @@ public class Configuration extends BaseP
}
};
- MetaDataRoleAuthorizationStrategy.authorize(createConfigurationLink, ENABLE,
- xmlRolesReader.getAllAllowedRoles("Configuration", "create"));
+ MetaDataRoleAuthorizationStrategy.authorize(createConfigurationLink, ENABLE, xmlRolesReader.getAllAllowedRoles(
+ "Configuration", "create"));
add(createConfigurationLink);
Link dbExportLink = new Link<Void>("dbExportLink") {
@@ -340,11 +337,12 @@ public class Configuration extends BaseP
@Override
public void onClick() {
try {
- HttpResourceStream stream = new HttpResourceStream(
- baseURL + "configuration/dbexport", restTemplate);
+ HttpResourceStream stream = new HttpResourceStream(baseURL + "configuration/dbexport", restTemplate);
ResourceStreamRequestHandler rsrh = new ResourceStreamRequestHandler(stream);
- rsrh.setFileName(stream.getFilename() == null ? "content.xml" : stream.getFilename());
+ rsrh.setFileName(stream.getFilename() == null
+ ? "content.xml"
+ : stream.getFilename());
rsrh.setContentDisposition(ContentDisposition.ATTACHMENT);
getRequestCycle().scheduleRequestHandlerAfterCurrent(rsrh);
@@ -354,14 +352,14 @@ public class Configuration extends BaseP
}
};
- MetaDataRoleAuthorizationStrategy.authorize(dbExportLink, ENABLE,
- xmlRolesReader.getAllAllowedRoles("Configuration", "read"));
+ MetaDataRoleAuthorizationStrategy.authorize(dbExportLink, ENABLE, xmlRolesReader.getAllAllowedRoles(
+ "Configuration", "read"));
add(dbExportLink);
Form confPaginatorForm = new Form("confPaginatorForm");
- final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser",
- new PropertyModel(this, "confPaginatorRows"), prefMan.getPaginatorChoices());
+ final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this,
+ "confPaginatorRows"), prefMan.getPaginatorChoices());
rowsChooser.add(new AjaxFormComponentUpdatingBehavior("onchange") {
@@ -369,8 +367,8 @@ public class Configuration extends BaseP
@Override
protected void onUpdate(final AjaxRequestTarget target) {
- prefMan.set(getRequest(), getResponse(), Constants.PREF_CONFIGURATION_PAGINATOR_ROWS,
- String.valueOf(confPaginatorRows));
+ prefMan.set(getRequest(), getResponse(), Constants.PREF_CONFIGURATION_PAGINATOR_ROWS, String
+ .valueOf(confPaginatorRows));
confTable.setItemsPerPage(confPaginatorRows);
target.add(confContainer);
@@ -382,8 +380,7 @@ public class Configuration extends BaseP
}
private void setupNotification() {
- notificationPaginatorRows = prefMan.getPaginatorRows(getRequest(),
- Constants.PREF_NOTIFICATION_PAGINATOR_ROWS);
+ notificationPaginatorRows = prefMan.getPaginatorRows(getRequest(), Constants.PREF_NOTIFICATION_PAGINATOR_ROWS);
List<IColumn> notificationCols = new ArrayList<IColumn>();
notificationCols.add(new PropertyColumn(new ResourceModel("id"), "id", "id"));
@@ -418,8 +415,7 @@ public class Configuration extends BaseP
editNotificationWin.setPageCreator(new ModalWindow.PageCreator() {
- private static final long serialVersionUID =
- -7834632442532690940L;
+ private static final long serialVersionUID = -7834632442532690940L;
@Override
public Page createPage() {
@@ -492,8 +488,8 @@ public class Configuration extends BaseP
@Override
public Page createPage() {
- return new NotificationModalPage(Configuration.this.getPageReference(),
- createNotificationWin, new NotificationTO(), true);
+ return new NotificationModalPage(Configuration.this.getPageReference(), createNotificationWin,
+ new NotificationTO(), true);
}
});
@@ -501,15 +497,14 @@ public class Configuration extends BaseP
}
};
- MetaDataRoleAuthorizationStrategy.authorize(createNotificationLink, ENABLE,
- xmlRolesReader.getAllAllowedRoles("Notification", "create"));
+ MetaDataRoleAuthorizationStrategy.authorize(createNotificationLink, ENABLE, xmlRolesReader.getAllAllowedRoles(
+ "Notification", "create"));
add(createNotificationLink);
Form notificationPaginatorForm = new Form("notificationPaginatorForm");
- final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser",
- new PropertyModel(this, "notificationPaginatorRows"),
- prefMan.getPaginatorChoices());
+ final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this,
+ "notificationPaginatorRows"), prefMan.getPaginatorChoices());
rowsChooser.add(new AjaxFormComponentUpdatingBehavior("onchange") {
@@ -517,8 +512,8 @@ public class Configuration extends BaseP
@Override
protected void onUpdate(final AjaxRequestTarget target) {
- prefMan.set(getRequest(), getResponse(), Constants.PREF_NOTIFICATION_PAGINATOR_ROWS,
- String.valueOf(notificationPaginatorRows));
+ prefMan.set(getRequest(), getResponse(), Constants.PREF_NOTIFICATION_PAGINATOR_ROWS, String
+ .valueOf(notificationPaginatorRows));
notificationTable.setItemsPerPage(notificationPaginatorRows);
target.add(notificationContainer);
@@ -529,8 +524,7 @@ public class Configuration extends BaseP
add(notificationPaginatorForm);
}
- private class SyncopeConfProvider
- extends SortableDataProvider<ConfigurationTO> {
+ private class SyncopeConfProvider extends SortableDataProvider<ConfigurationTO> {
private static final long serialVersionUID = -276043813563988590L;
@@ -571,8 +565,7 @@ public class Configuration extends BaseP
}
}
- private class NotificationProvider
- extends SortableDataProvider<NotificationTO> {
+ private class NotificationProvider extends SortableDataProvider<NotificationTO> {
private static final long serialVersionUID = -276043813563988590L;
@@ -619,8 +612,8 @@ public class Configuration extends BaseP
private final ConsoleLoggerController consoleLoggerController;
- public LoggerPropertyList(final ConsoleLoggerController consoleLoggerController,
- final String id, final List<? extends LoggerTO> list) {
+ public LoggerPropertyList(final ConsoleLoggerController consoleLoggerController, final String id,
+ final List<? extends LoggerTO> list) {
super(id, list);
this.consoleLoggerController = consoleLoggerController;
@@ -659,11 +652,11 @@ public class Configuration extends BaseP
protected void onUpdate(final AjaxRequestTarget target) {
try {
if (getId().equals("corelogger")) {
- confRestClient.setLogLevel(item.getModelObject().getName(),
- item.getModelObject().getLevel());
+ confRestClient.setLogLevel(item.getModelObject().getName(), item.getModelObject()
+ .getLevel());
} else {
- consoleLoggerController.setLogLevel(item.getModelObject().getName(),
- item.getModelObject().getLevel());
+ consoleLoggerController.setLogLevel(item.getModelObject().getName(), item.getModelObject()
+ .getLevel());
}
info(getString("operation_succeded"));
@@ -675,8 +668,8 @@ public class Configuration extends BaseP
}
});
- MetaDataRoleAuthorizationStrategy.authorize(level, ENABLE,
- xmlRolesReader.getAllAllowedRoles("Configuration", "logSetLevel"));
+ MetaDataRoleAuthorizationStrategy.authorize(level, ENABLE, xmlRolesReader.getAllAllowedRoles(
+ "Configuration", "logSetLevel"));
item.add(level);
}
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/ConfigurationModalPage.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/ConfigurationModalPage.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/ConfigurationModalPage.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/ConfigurationModalPage.java Thu Mar 15 10:17:12 2012
@@ -64,8 +64,8 @@ public class ConfigurationModalPage exte
key.setEnabled(createFlag);
key.addRequiredLabel();
- final AjaxTextFieldPanel value = new AjaxTextFieldPanel("value", "value",
- new PropertyModel(configurationTO, "value"));
+ final AjaxTextFieldPanel value = new AjaxTextFieldPanel("value", "value", new PropertyModel(configurationTO,
+ "value"));
form.add(value);
value.addRequiredLabel();
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/ConnectorModalPage.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/ConnectorModalPage.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/ConnectorModalPage.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/ConnectorModalPage.java Thu Mar 15 10:17:12 2012
@@ -78,16 +78,8 @@ public class ConnectorModalPage extends
// GuardedByteArray is not in classpath
private static final String GUARDED_BYTE_ARRAY = "org.identityconnectors.common.security.GuardedByteArray";
- private static final List<Class> NUMBER = Arrays.asList(new Class[]{
- Integer.class,
- Double.class,
- Long.class,
- Float.class,
- Number.class,
- Integer.TYPE,
- Long.TYPE,
- Double.TYPE,
- Float.TYPE});
+ private static final List<Class> NUMBER = Arrays.asList(new Class[] { Integer.class, Double.class, Long.class,
+ Float.class, Number.class, Integer.TYPE, Long.TYPE, Double.TYPE, Float.TYPE });
@SpringBean
private ConnectorRestClient restClient;
@@ -108,18 +100,18 @@ public class ConnectorModalPage extends
super();
selectedCapabilities = new ArrayList(connectorTO.getId() == 0
- ? EnumSet.noneOf(ConnectorCapability.class) : connectorTO.getCapabilities());
+ ? EnumSet.noneOf(ConnectorCapability.class)
+ : connectorTO.getCapabilities());
- final IModel<List<ConnectorCapability>> capabilities =
- new LoadableDetachableModel<List<ConnectorCapability>>() {
+ final IModel<List<ConnectorCapability>> capabilities = new LoadableDetachableModel<List<ConnectorCapability>>() {
- private static final long serialVersionUID = 5275935387613157437L;
+ private static final long serialVersionUID = 5275935387613157437L;
- @Override
- protected List<ConnectorCapability> load() {
- return Arrays.asList(ConnectorCapability.values());
- }
- };
+ @Override
+ protected List<ConnectorCapability> load() {
+ return Arrays.asList(ConnectorCapability.values());
+ }
+ };
final IModel<List<ConnBundleTO>> bundles = new LoadableDetachableModel<List<ConnBundleTO>>() {
@@ -144,19 +136,18 @@ public class ConnectorModalPage extends
displayName.setOutputMarkupId(true);
displayName.addRequiredLabel();
- final AjaxTextFieldPanel version = new AjaxTextFieldPanel("version", "version",
- new PropertyModel<String>(connectorTO, "version"));
+ final AjaxTextFieldPanel version = new AjaxTextFieldPanel("version", "version", new PropertyModel<String>(
+ connectorTO, "version"));
displayName.setOutputMarkupId(true);
version.setEnabled(false);
- final AjaxDropDownChoicePanel<ConnBundleTO> bundle = new AjaxDropDownChoicePanel<ConnBundleTO>(
- "bundle", "bundle", new Model<ConnBundleTO>(bundleTO));
+ final AjaxDropDownChoicePanel<ConnBundleTO> bundle = new AjaxDropDownChoicePanel<ConnBundleTO>("bundle",
+ "bundle", new Model<ConnBundleTO>(bundleTO));
bundle.setStyleShet("long_dynamicsize");
bundle.setChoices(bundles.getObject());
bundle.setChoiceRenderer(new ChoiceRenderer<ConnBundleTO>() {
- private static final long serialVersionUID =
- -1945543182376191187L;
+ private static final long serialVersionUID = -1945543182376191187L;
@Override
public Object getDisplayValue(final ConnBundleTO object) {
@@ -174,8 +165,7 @@ public class ConnectorModalPage extends
bundle.setRequired(true);
bundle.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {
- private static final long serialVersionUID =
- -1107858522700306810L;
+ private static final long serialVersionUID = -1107858522700306810L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
@@ -221,15 +211,14 @@ public class ConnectorModalPage extends
final ListView<ConnConfProperty> view = new ListView<ConnConfProperty>("connectorProperties",
new PropertyModel(this, "properties")) {
- private static final long serialVersionUID =
- 9101744072914090143L;
+ private static final long serialVersionUID = 9101744072914090143L;
@Override
protected void populateItem(final ListItem<ConnConfProperty> item) {
final ConnConfProperty property = item.getModelObject();
- final Label label = new Label("connPropAttrSchema",
- property.getSchema().getDisplayName() == null || property.getSchema().getDisplayName().isEmpty()
+ final Label label = new Label("connPropAttrSchema", property.getSchema().getDisplayName() == null
+ || property.getSchema().getDisplayName().isEmpty()
? property.getSchema().getName()
: property.getSchema().getDisplayName());
@@ -254,8 +243,8 @@ public class ConnectorModalPage extends
Class propertySchemaClass;
try {
- propertySchemaClass = ClassUtils.forName(property.getSchema().getType(),
- ClassUtils.getDefaultClassLoader());
+ propertySchemaClass = ClassUtils.forName(property.getSchema().getType(), ClassUtils
+ .getDefaultClassLoader());
} catch (Exception e) {
LOG.error("Error parsing attribute type", e);
propertySchemaClass = String.class;
@@ -288,8 +277,8 @@ public class ConnectorModalPage extends
property.getValues().add(null);
}
- item.add(new MultiValueSelectorPanel<String>("panel",
- new PropertyModel<List<String>>(property, "values"), field));
+ item.add(new MultiValueSelectorPanel<String>("panel", new PropertyModel<List<String>>(property,
+ "values"), field));
} else {
if (required) {
field.addRequiredLabel();
@@ -321,25 +310,24 @@ public class ConnectorModalPage extends
connectorForm.add(propertiesContainer);
connectorPropForm.add(view);
- final AjaxLink check =
- new IndicatingAjaxLink("check", new ResourceModel("check")) {
+ final AjaxLink check = new IndicatingAjaxLink("check", new ResourceModel("check")) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -7978723352517770644L;
- @Override
- public void onClick(final AjaxRequestTarget target) {
- connectorTO.setBundleName(bundleTO.getBundleName());
- connectorTO.setVersion(bundleTO.getVersion());
-
- if (restClient.check(connectorTO).booleanValue()) {
- info(getString("success_connection"));
- } else {
- error(getString("error_connection"));
- }
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ connectorTO.setBundleName(bundleTO.getBundleName());
+ connectorTO.setVersion(bundleTO.getVersion());
- target.add(feedbackPanel);
- }
- };
+ if (restClient.check(connectorTO).booleanValue()) {
+ info(getString("success_connection"));
+ } else {
+ error(getString("error_connection"));
+ }
+
+ target.add(feedbackPanel);
+ }
+ };
connectorPropForm.add(check);
@@ -355,7 +343,8 @@ public class ConnectorModalPage extends
// Set the model object's capabilites to capabilitiesPalette's converted Set
conn.setCapabilities(selectedCapabilities.isEmpty()
- ? EnumSet.noneOf(ConnectorCapability.class) : EnumSet.copyOf(selectedCapabilities));
+ ? EnumSet.noneOf(ConnectorCapability.class)
+ : EnumSet.copyOf(selectedCapabilities));
try {
if (connectorTO.getId() == 0) {
restClient.create(conn);
@@ -391,8 +380,8 @@ public class ConnectorModalPage extends
connectorForm.add(bundle);
connectorForm.add(version);
- capabilitiesPalette = new CheckBoxMultipleChoice("capabilitiesPalette",
- new PropertyModel(this, "selectedCapabilities"), capabilities);
+ capabilitiesPalette = new CheckBoxMultipleChoice("capabilitiesPalette", new PropertyModel(this,
+ "selectedCapabilities"), capabilities);
connectorForm.add(capabilitiesPalette);
connectorForm.add(submit);
@@ -405,8 +394,7 @@ public class ConnectorModalPage extends
// Manage bundle and connector beans
// -------------------------------------
- if (connTO != null
- && StringUtils.isNotBlank(connTO.getBundleName())
+ if (connTO != null && StringUtils.isNotBlank(connTO.getBundleName())
&& StringUtils.isNotBlank(connTO.getVersion())) {
for (ConnBundleTO to : bundles) {
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/DerivedSchemaModalPage.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/DerivedSchemaModalPage.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/DerivedSchemaModalPage.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/pages/DerivedSchemaModalPage.java Thu Mar 15 10:17:12 2012
@@ -45,11 +45,8 @@ public class DerivedSchemaModalPage exte
}
@Override
- public void setSchemaModalPage(
- final PageReference callerPageRef,
- final ModalWindow window,
- AbstractBaseBean schema,
- final boolean createFlag) {
+ public void setSchemaModalPage(final PageReference callerPageRef, final ModalWindow window,
+ AbstractBaseBean schema, final boolean createFlag) {
if (schema == null) {
schema = new DerivedSchemaTO();
@@ -59,8 +56,8 @@ public class DerivedSchemaModalPage exte
schemaForm.setModel(new CompoundPropertyModel(schema));
- final AjaxTextFieldPanel name = new AjaxTextFieldPanel("name", getString("name"),
- new PropertyModel<String>(schema, "name"));
+ final AjaxTextFieldPanel name = new AjaxTextFieldPanel("name", getString("name"), new PropertyModel<String>(
+ schema, "name"));
name.addRequiredLabel();
final AjaxTextFieldPanel expression = new AjaxTextFieldPanel("expression", getString("expression"),
@@ -69,17 +66,14 @@ public class DerivedSchemaModalPage exte
name.setEnabled(createFlag);
- final IndicatingAjaxButton submit = new IndicatingAjaxButton(
- "apply", new ResourceModel("submit")) {
+ final IndicatingAjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("submit")) {
private static final long serialVersionUID = -958724007591692537L;
@Override
- protected void onSubmit(final AjaxRequestTarget target,
- final Form form) {
+ protected void onSubmit(final AjaxRequestTarget target, final Form form) {
- DerivedSchemaTO schemaTO =
- (DerivedSchemaTO) form.getDefaultModelObject();
+ DerivedSchemaTO schemaTO = (DerivedSchemaTO) form.getDefaultModelObject();
try {
if (createFlag) {
@@ -88,8 +82,7 @@ public class DerivedSchemaModalPage exte
restClient.updateDerivedSchema(kind, schemaTO);
}
if (callerPageRef.getPage() instanceof BasePage) {
- ((BasePage) callerPageRef.getPage()).setModalResult(
- true);
+ ((BasePage) callerPageRef.getPage()).setModalResult(true);
}
window.close(target);
@@ -100,8 +93,7 @@ public class DerivedSchemaModalPage exte
}
@Override
- protected void onError(final AjaxRequestTarget target,
- final Form form) {
+ protected void onError(final AjaxRequestTarget target, final Form form) {
target.add(feedbackPanel);
}
@@ -110,15 +102,12 @@ public class DerivedSchemaModalPage exte
String allowedRoles;
if (createFlag) {
- allowedRoles = xmlRolesReader.getAllAllowedRoles("Schema",
- "create");
+ allowedRoles = xmlRolesReader.getAllAllowedRoles("Schema", "create");
} else {
- allowedRoles = xmlRolesReader.getAllAllowedRoles("Schema",
- "update");
+ allowedRoles = xmlRolesReader.getAllAllowedRoles("Schema", "update");
}
- MetaDataRoleAuthorizationStrategy.authorize(
- submit, ENABLE, allowedRoles);
+ MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, allowedRoles);
schemaForm.add(name);
schemaForm.add(expression);