Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2016-10-18 11:30:55 -0400
committerEike Stepper2016-10-18 11:30:55 -0400
commitd271b313d58d5eef02ed687c151a42dfd0c0f0ed (patch)
tree57ca0c57f33f0780f6092613bab565d35f7986af /plugins/org.eclipse.emf.cdo.server.security
parent6809f0af826be94b174d4e1a45d75e686813d267 (diff)
downloadcdo-d271b313d58d5eef02ed687c151a42dfd0c0f0ed.tar.gz
cdo-d271b313d58d5eef02ed687c151a42dfd0c0f0ed.tar.xz
cdo-d271b313d58d5eef02ed687c151a42dfd0c0f0ed.zip
[Releng] Increase max line length to 160
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.security')
-rw-r--r--plugins/org.eclipse.emf.cdo.server.security/.settings/org.eclipse.jdt.core.prefs2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityExtension.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManager.java43
-rw-r--r--plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManagerCommand.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/AnnotationHandler.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/HomeFolderHandler.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/InternalSecurityManager.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/SecurityManagerFactory.java6
8 files changed, 24 insertions, 45 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.security/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.server.security/.settings/org.eclipse.jdt.core.prefs
index e8d729090c..07533b5536 100644
--- a/plugins/org.eclipse.emf.cdo.server.security/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.emf.cdo.server.security/.settings/org.eclipse.jdt.core.prefs
@@ -377,7 +377,7 @@ org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.lineSplit=160
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
diff --git a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityExtension.java b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityExtension.java
index 9b70acc108..3ffaa454a5 100644
--- a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityExtension.java
+++ b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityExtension.java
@@ -104,8 +104,7 @@ public class SecurityExtension implements IAppExtension2
NodeList securityManagers = repositoryConfig.getElementsByTagName("securityManager"); //$NON-NLS-1$
if (securityManagers.getLength() > 1)
{
- throw new IllegalStateException(
- "A maximum of one security manager can be configured for repository " + repository); //$NON-NLS-1$
+ throw new IllegalStateException("A maximum of one security manager can be configured for repository " + repository); //$NON-NLS-1$
}
if (securityManagers.getLength() == 1)
diff --git a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManager.java b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManager.java
index 380987f1a0..740bad797a 100644
--- a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManager.java
+++ b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManager.java
@@ -626,26 +626,20 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
// Create roles
Role allReaderRole = realm.addRole(Role.ALL_OBJECTS_READER);
- allReaderRole.getPermissions()
- .add(SF.createFilterPermission(Access.READ, SF.createResourceFilter(".*", PatternStyle.REGEX)));
+ allReaderRole.getPermissions().add(SF.createFilterPermission(Access.READ, SF.createResourceFilter(".*", PatternStyle.REGEX)));
Role allWriterRole = realm.addRole(Role.ALL_OBJECTS_WRITER);
- allWriterRole.getPermissions()
- .add(SF.createFilterPermission(Access.WRITE, SF.createResourceFilter(".*", PatternStyle.REGEX)));
+ allWriterRole.getPermissions().add(SF.createFilterPermission(Access.WRITE, SF.createResourceFilter(".*", PatternStyle.REGEX)));
Role treeReaderRole = realm.addRole(Role.RESOURCE_TREE_READER);
- treeReaderRole.getPermissions()
- .add(SF.createFilterPermission(Access.READ, SF.createPackageFilter(EresourcePackage.eINSTANCE)));
+ treeReaderRole.getPermissions().add(SF.createFilterPermission(Access.READ, SF.createPackageFilter(EresourcePackage.eINSTANCE)));
Role treeWriterRole = realm.addRole(Role.RESOURCE_TREE_WRITER);
- treeWriterRole.getPermissions()
- .add(SF.createFilterPermission(Access.WRITE, SF.createPackageFilter(EresourcePackage.eINSTANCE)));
+ treeWriterRole.getPermissions().add(SF.createFilterPermission(Access.WRITE, SF.createPackageFilter(EresourcePackage.eINSTANCE)));
Role adminRole = realm.addRole(Role.ADMINISTRATION);
- adminRole.getPermissions()
- .add(SF.createFilterPermission(Access.WRITE, SF.createResourceFilter(realmPath, PatternStyle.EXACT, false)));
- adminRole.getPermissions()
- .add(SF.createFilterPermission(Access.READ, SF.createResourceFilter(realmPath, PatternStyle.EXACT, true)));
+ adminRole.getPermissions().add(SF.createFilterPermission(Access.WRITE, SF.createResourceFilter(realmPath, PatternStyle.EXACT, false)));
+ adminRole.getPermissions().add(SF.createFilterPermission(Access.READ, SF.createResourceFilter(realmPath, PatternStyle.EXACT, true)));
// Create groups
@@ -686,8 +680,8 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
return CDOPermission.NONE;
}
- protected CDOPermission authorize(CDORevision revision, CDORevisionProvider revisionProvider,
- CDOBranchPoint securityContext, ISession session, Access defaultAccess, Permission[] permissions)
+ protected CDOPermission authorize(CDORevision revision, CDORevisionProvider revisionProvider, CDOBranchPoint securityContext, ISession session,
+ Access defaultAccess, Permission[] permissions)
{
if (lastRealmModification != CDOBranchPoint.UNSPECIFIED_DATE)
{
@@ -840,8 +834,7 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
for (Permission permission : user.getAllPermissions())
{
- if (permission.getAccess() == Access.WRITE
- && permission.isApplicable(revision, revisionProvider, securityContext))
+ if (permission.getAccess() == Access.WRITE && permission.isApplicable(revision, revisionProvider, securityContext))
{
return true;
}
@@ -976,8 +969,7 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
throw new UnsupportedOperationException();
}
- public CDOPermission getPermission(CDORevision revision, final CDOBranchPoint securityContext,
- final ISession session)
+ public CDOPermission getPermission(CDORevision revision, final CDOBranchPoint securityContext, final ISession session)
{
String userID = session.getUserID();
if (SYSTEM_USER_ID.equals(userID))
@@ -1045,8 +1037,7 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
{
private final IRepository.WriteAccessHandler realmValidationHandler = new RealmValidationHandler();
- public void handleTransactionBeforeCommitting(ITransaction transaction, final CommitContext commitContext,
- OMMonitor monitor) throws RuntimeException
+ public void handleTransactionBeforeCommitting(ITransaction transaction, final CommitContext commitContext, OMMonitor monitor) throws RuntimeException
{
doHandleTransactionBeforeCommitting(transaction, commitContext, monitor);
@@ -1057,8 +1048,7 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
}
}
- protected void doHandleTransactionBeforeCommitting(ITransaction transaction, final CommitContext commitContext,
- OMMonitor monitor) throws RuntimeException
+ protected void doHandleTransactionBeforeCommitting(ITransaction transaction, final CommitContext commitContext, OMMonitor monitor) throws RuntimeException
{
if (transaction.getSessionID() == systemSession.getSessionID())
{
@@ -1098,13 +1088,11 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
for (int i = 0; i < revisions.length; i++)
{
InternalCDORevision revision = revisions[i];
- CDOPermission permission = authorize(revision, commitContext, securityContext, session, userDefaultAccess,
- userPermissions);
+ CDOPermission permission = authorize(revision, commitContext, securityContext, session, userDefaultAccess, userPermissions);
if (permission != CDOPermission.WRITE)
{
- throw new SecurityException(
- "User " + commitContext.getUserID() + " is not allowed to write to " + revision);
+ throw new SecurityException("User " + commitContext.getUserID() + " is not allowed to write to " + revision);
}
if (securityImpact != CommitNotificationInfo.IMPACT_REALM)
@@ -1177,8 +1165,7 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
}
}
- public void handleTransactionAfterCommitted(ITransaction transaction, final CommitContext commitContext,
- OMMonitor monitor)
+ public void handleTransactionAfterCommitted(ITransaction transaction, final CommitContext commitContext, OMMonitor monitor)
{
if (commitContext.getSecurityImpact() == CommitNotificationInfo.IMPACT_REALM)
{
diff --git a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManagerCommand.java b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManagerCommand.java
index eee33a03fa..b9e08b6a7e 100644
--- a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManagerCommand.java
+++ b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManagerCommand.java
@@ -51,8 +51,7 @@ public abstract class SecurityManagerCommand extends CDOCommand.WithRepository
{
public AddUser()
{
- super("adduser", "adds a user to the security realm of a repository", parameter("username"),
- optional("password"));
+ super("adduser", "adds a user to the security realm of a repository", parameter("username"), optional("password"));
}
@Override
@@ -80,8 +79,7 @@ public abstract class SecurityManagerCommand extends CDOCommand.WithRepository
{
public SetPassword()
{
- super("setpassword", "sets or unsets the password of a repository user", parameter("username"),
- optional("password"));
+ super("setpassword", "sets or unsets the password of a repository user", parameter("username"), optional("password"));
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/AnnotationHandler.java b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/AnnotationHandler.java
index 61c0f0da05..22e25c72a7 100644
--- a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/AnnotationHandler.java
+++ b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/AnnotationHandler.java
@@ -123,8 +123,7 @@ public class AnnotationHandler implements InternalSecurityManager.CommitHandler
handlePermission(realm, eClass, key, access, filterClass, filterFeature);
}
- protected void handlePermission(Realm realm, EModelElement modelElement, String key, Access access,
- EClass filterClass, EReference filterFeature)
+ protected void handlePermission(Realm realm, EModelElement modelElement, String key, Access access, EClass filterClass, EReference filterFeature)
{
String annotation = EcoreUtil.getAnnotation(modelElement, SOURCE_URI, key);
if (annotation == null || annotation.length() == 0)
diff --git a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/HomeFolderHandler.java b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/HomeFolderHandler.java
index 91482a52a5..cd8ab60a97 100644
--- a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/HomeFolderHandler.java
+++ b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/HomeFolderHandler.java
@@ -151,8 +151,7 @@ public class HomeFolderHandler implements InternalSecurityManager.CommitHandler2
}
}
- protected void handleUsers(final InternalSecurityManager securityManager, final List<String> userIDs,
- final boolean init)
+ protected void handleUsers(final InternalSecurityManager securityManager, final List<String> userIDs, final boolean init)
{
executorService.submit(new Runnable()
{
diff --git a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/InternalSecurityManager.java b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/InternalSecurityManager.java
index 0532bf534c..a13c2cfa92 100644
--- a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/InternalSecurityManager.java
+++ b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/InternalSecurityManager.java
@@ -113,8 +113,7 @@ public interface InternalSecurityManager extends ISecurityManager
handleCommitted(securityManager, commitContext, user);
}
- protected abstract void handleCommitted(InternalSecurityManager securityManager, CommitContext commitContext,
- User user);
+ protected abstract void handleCommitted(InternalSecurityManager securityManager, CommitContext commitContext, User user);
}
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/SecurityManagerFactory.java b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/SecurityManagerFactory.java
index b28d4ec336..f209b7fea1 100644
--- a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/SecurityManagerFactory.java
+++ b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/SecurityManagerFactory.java
@@ -87,8 +87,7 @@ public abstract class SecurityManagerFactory extends Factory
if (securityManager instanceof InternalSecurityManager)
{
- ((InternalSecurityManager)securityManager)
- .setRepository((InternalRepository)RepositoryFactory.get(container, repositoryName));
+ ((InternalSecurityManager)securityManager).setRepository((InternalRepository)RepositoryFactory.get(container, repositoryName));
}
return securityManager;
@@ -140,8 +139,7 @@ public abstract class SecurityManagerFactory extends Factory
OM.LOG.warn(
"SecurityManagerFactory.Annotation is deprecated. As of 4.3 use SecurityManagerFactory.Default with a description like \"realmPath:annotation\"");
- InternalSecurityManager securityManager = (InternalSecurityManager)SecurityManagerUtil
- .createSecurityManager(realmPath);
+ InternalSecurityManager securityManager = (InternalSecurityManager)SecurityManagerUtil.createSecurityManager(realmPath);
AnnotationHandler handler = new AnnotationHandler();
securityManager.addCommitHandler(handler);

Back to the top