Unnecessary interface modifier
This commit is contained in:
parent
40bee457f9
commit
d9c1f03b84
|
@ -55,5 +55,5 @@ public @interface Secured {
|
|||
*
|
||||
* @return String[] The secure method attributes
|
||||
*/
|
||||
public String[] value();
|
||||
String[] value();
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public interface RoleHierarchy {
|
|||
* @param authorities - List of the directly assigned authorities.
|
||||
* @return List of all reachable authorities given the assigned authorities.
|
||||
*/
|
||||
public Collection<? extends GrantedAuthority> getReachableGrantedAuthorities(
|
||||
Collection<? extends GrantedAuthority> getReachableGrantedAuthorities(
|
||||
Collection<? extends GrantedAuthority> authorities);
|
||||
|
||||
}
|
||||
|
|
|
@ -29,5 +29,5 @@ import org.springframework.security.access.SecurityMetadataSource;
|
|||
* @author Ben Alex
|
||||
*/
|
||||
public interface MethodSecurityMetadataSource extends SecurityMetadataSource {
|
||||
public Collection<ConfigAttribute> getAttributes(Method method, Class<?> targetClass);
|
||||
Collection<ConfigAttribute> getAttributes(Method method, Class<?> targetClass);
|
||||
}
|
||||
|
|
|
@ -38,5 +38,5 @@ public @interface PostAuthorize {
|
|||
* @return the Spring-EL expression to be evaluated after invoking the protected
|
||||
* method
|
||||
*/
|
||||
public String value();
|
||||
String value();
|
||||
}
|
||||
|
|
|
@ -38,5 +38,5 @@ public @interface PostFilter {
|
|||
* @return the Spring-EL expression to be evaluated after invoking the protected
|
||||
* method
|
||||
*/
|
||||
public String value();
|
||||
String value();
|
||||
}
|
||||
|
|
|
@ -50,12 +50,12 @@ public @interface PreFilter {
|
|||
* @return the Spring-EL expression to be evaluated before invoking the protected
|
||||
* method
|
||||
*/
|
||||
public String value();
|
||||
String value();
|
||||
|
||||
/**
|
||||
* @return the name of the parameter which should be filtered (must be a non-null
|
||||
* collection instance) If the method contains a single collection argument, then this
|
||||
* attribute can be omitted.
|
||||
*/
|
||||
public String filterTarget() default "";
|
||||
String filterTarget() default "";
|
||||
}
|
||||
|
|
|
@ -92,9 +92,9 @@ class ComparableVersion implements Comparable<ComparableVersion> {
|
|||
private ListItem items;
|
||||
|
||||
private interface Item {
|
||||
final int INTEGER_ITEM = 0;
|
||||
final int STRING_ITEM = 1;
|
||||
final int LIST_ITEM = 2;
|
||||
int INTEGER_ITEM = 0;
|
||||
int STRING_ITEM = 1;
|
||||
int LIST_ITEM = 2;
|
||||
|
||||
int compareTo(Item item);
|
||||
|
||||
|
|
|
@ -37,6 +37,6 @@ public interface Attributes2GrantedAuthoritiesMapper {
|
|||
* @param attributes the attributes to be mapped
|
||||
* @return the collection of authorities created from the attributes
|
||||
*/
|
||||
public Collection<? extends GrantedAuthority> getGrantedAuthorities(
|
||||
Collection<? extends GrantedAuthority> getGrantedAuthorities(
|
||||
Collection<String> attributes);
|
||||
}
|
||||
|
|
|
@ -1165,14 +1165,11 @@ These will be passed to the AccessDecisionManager for it to make the actual deci
|
|||
----
|
||||
public interface BankService {
|
||||
|
||||
@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
|
||||
public Account readAccount(Long id);
|
||||
@Secured("IS_AUTHENTICATED_ANONYMOUSLY") Account readAccount(Long id);
|
||||
|
||||
@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
|
||||
public Account[] findAccounts();
|
||||
@Secured("IS_AUTHENTICATED_ANONYMOUSLY") Account[] findAccounts();
|
||||
|
||||
@Secured("ROLE_TELLER")
|
||||
public Account post(Account account, double amount);
|
||||
@Secured("ROLE_TELLER") Account post(Account account, double amount);
|
||||
}
|
||||
----
|
||||
|
||||
|
@ -1203,14 +1200,11 @@ and the equivalent Java code would be
|
|||
----
|
||||
public interface BankService {
|
||||
|
||||
@PreAuthorize("isAnonymous()")
|
||||
public Account readAccount(Long id);
|
||||
@PreAuthorize("isAnonymous()") Account readAccount(Long id);
|
||||
|
||||
@PreAuthorize("isAnonymous()")
|
||||
public Account[] findAccounts();
|
||||
@PreAuthorize("isAnonymous()") Account[] findAccounts();
|
||||
|
||||
@PreAuthorize("hasAuthority('ROLE_TELLER')")
|
||||
public Account post(Account account, double amount);
|
||||
@PreAuthorize("hasAuthority('ROLE_TELLER')") Account post(Account account, double amount);
|
||||
}
|
||||
----
|
||||
|
||||
|
|
|
@ -763,14 +763,11 @@ These will be passed to the `AccessDecisionManager` for it to make the actual de
|
|||
----
|
||||
public interface BankService {
|
||||
|
||||
@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
|
||||
public Account readAccount(Long id);
|
||||
@Secured("IS_AUTHENTICATED_ANONYMOUSLY") Account readAccount(Long id);
|
||||
|
||||
@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
|
||||
public Account[] findAccounts();
|
||||
@Secured("IS_AUTHENTICATED_ANONYMOUSLY") Account[] findAccounts();
|
||||
|
||||
@Secured("ROLE_TELLER")
|
||||
public Account post(Account account, double amount);
|
||||
@Secured("ROLE_TELLER") Account post(Account account, double amount);
|
||||
}
|
||||
----
|
||||
|
||||
|
@ -795,14 +792,11 @@ and the equivalent Java code would be
|
|||
----
|
||||
public interface BankService {
|
||||
|
||||
@PreAuthorize("isAnonymous()")
|
||||
public Account readAccount(Long id);
|
||||
@PreAuthorize("isAnonymous()") Account readAccount(Long id);
|
||||
|
||||
@PreAuthorize("isAnonymous()")
|
||||
public Account[] findAccounts();
|
||||
@PreAuthorize("isAnonymous()") Account[] findAccounts();
|
||||
|
||||
@PreAuthorize("hasAuthority('ROLE_TELLER')")
|
||||
public Account post(Account account, double amount);
|
||||
@PreAuthorize("hasAuthority('ROLE_TELLER')") Account post(Account account, double amount);
|
||||
}
|
||||
----
|
||||
|
||||
|
|
|
@ -17,6 +17,6 @@ package org.springframework.security.integration;
|
|||
|
||||
public interface UserRepository {
|
||||
|
||||
public void doSomething();
|
||||
void doSomething();
|
||||
|
||||
}
|
||||
|
|
|
@ -20,6 +20,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||
public interface TestService {
|
||||
|
||||
@PreAuthorize("someMethod.py")
|
||||
public void someMethod();
|
||||
void someMethod();
|
||||
|
||||
}
|
||||
|
|
|
@ -36,10 +36,10 @@ public interface OpenIDConsumer {
|
|||
* @return String URI to redirect user to for authentication
|
||||
* @throws OpenIDConsumerException if anything bad happens
|
||||
*/
|
||||
public String beginConsumption(HttpServletRequest req, String claimedIdentity,
|
||||
String returnToUrl, String realm) throws OpenIDConsumerException;
|
||||
String beginConsumption(HttpServletRequest req, String claimedIdentity,
|
||||
String returnToUrl, String realm) throws OpenIDConsumerException;
|
||||
|
||||
public OpenIDAuthenticationToken endConsumption(HttpServletRequest req)
|
||||
OpenIDAuthenticationToken endConsumption(HttpServletRequest req)
|
||||
throws OpenIDConsumerException;
|
||||
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public interface DnsResolver {
|
|||
* @throws DnsEntryNotFoundException No record found
|
||||
* @throws DnsLookupException Unknown DNS error
|
||||
*/
|
||||
public String resolveIpAddress(String hostname) throws DnsEntryNotFoundException,
|
||||
String resolveIpAddress(String hostname) throws DnsEntryNotFoundException,
|
||||
DnsLookupException;
|
||||
|
||||
/**
|
||||
|
@ -65,7 +65,7 @@ public interface DnsResolver {
|
|||
* @throws DnsEntryNotFoundException No record found
|
||||
* @throws DnsLookupException Unknown DNS error
|
||||
*/
|
||||
public String resolveServiceEntry(String serviceType, String domain)
|
||||
String resolveServiceEntry(String serviceType, String domain)
|
||||
throws DnsEntryNotFoundException, DnsLookupException;
|
||||
|
||||
/**
|
||||
|
@ -80,7 +80,7 @@ public interface DnsResolver {
|
|||
* @see #resolveServiceEntry(String, String)
|
||||
* @see #resolveIpAddress(String)
|
||||
*/
|
||||
public String resolveServiceIpAddress(String serviceType, String domain)
|
||||
String resolveServiceIpAddress(String serviceType, String domain)
|
||||
throws DnsEntryNotFoundException, DnsLookupException;
|
||||
|
||||
}
|
||||
|
|
|
@ -34,6 +34,6 @@ public interface InitialContextFactory {
|
|||
* Must return a DirContext which can be used for DNS queries
|
||||
* @return JNDI DirContext
|
||||
*/
|
||||
public DirContext getCtx();
|
||||
DirContext getCtx();
|
||||
|
||||
}
|
||||
|
|
|
@ -27,17 +27,17 @@ public interface ContactDao {
|
|||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void create(Contact contact);
|
||||
void create(Contact contact);
|
||||
|
||||
public void delete(Long contactId);
|
||||
void delete(Long contactId);
|
||||
|
||||
public List<Contact> findAll();
|
||||
List<Contact> findAll();
|
||||
|
||||
public List<String> findAllPrincipals();
|
||||
List<String> findAllPrincipals();
|
||||
|
||||
public List<String> findAllRoles();
|
||||
List<String> findAllRoles();
|
||||
|
||||
public Contact getById(Long id);
|
||||
Contact getById(Long id);
|
||||
|
||||
public void update(Contact contact);
|
||||
void update(Contact contact);
|
||||
}
|
||||
|
|
|
@ -31,27 +31,27 @@ public interface ContactManager {
|
|||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
@PreAuthorize("hasPermission(#contact, admin)")
|
||||
public void addPermission(Contact contact, Sid recipient, Permission permission);
|
||||
void addPermission(Contact contact, Sid recipient, Permission permission);
|
||||
|
||||
@PreAuthorize("hasPermission(#contact, admin)")
|
||||
public void deletePermission(Contact contact, Sid recipient, Permission permission);
|
||||
void deletePermission(Contact contact, Sid recipient, Permission permission);
|
||||
|
||||
@PreAuthorize("hasRole('ROLE_USER')")
|
||||
public void create(Contact contact);
|
||||
void create(Contact contact);
|
||||
|
||||
@PreAuthorize("hasPermission(#contact, 'delete') or hasPermission(#contact, admin)")
|
||||
public void delete(Contact contact);
|
||||
void delete(Contact contact);
|
||||
|
||||
@PreAuthorize("hasRole('ROLE_USER')")
|
||||
@PostFilter("hasPermission(filterObject, 'read') or hasPermission(filterObject, admin)")
|
||||
public List<Contact> getAll();
|
||||
List<Contact> getAll();
|
||||
|
||||
@PreAuthorize("hasRole('ROLE_USER')")
|
||||
public List<String> getAllRecipients();
|
||||
List<String> getAllRecipients();
|
||||
|
||||
@PreAuthorize("hasPermission(#id, 'sample.contact.Contact', read) or "
|
||||
+ "hasPermission(#id, 'sample.contact.Contact', admin)")
|
||||
public Contact getById(Long id);
|
||||
Contact getById(Long id);
|
||||
|
||||
public Contact getRandomContact();
|
||||
Contact getRandomContact();
|
||||
}
|
||||
|
|
|
@ -27,21 +27,21 @@ public interface DocumentDao {
|
|||
* @param element an unsaved element (the "id" will be updated after method is
|
||||
* invoked)
|
||||
*/
|
||||
public void create(AbstractElement element);
|
||||
void create(AbstractElement element);
|
||||
|
||||
/**
|
||||
* Removes a file from the database for the specified element.
|
||||
*
|
||||
* @param file the file to remove (cannot be null)
|
||||
*/
|
||||
public void delete(File file);
|
||||
void delete(File file);
|
||||
|
||||
/**
|
||||
* Modifies a file in the database.
|
||||
*
|
||||
* @param file the file to update (cannot be null)
|
||||
*/
|
||||
public void update(File file);
|
||||
void update(File file);
|
||||
|
||||
/**
|
||||
* Locates elements in the database which appear under the presented directory
|
||||
|
@ -51,5 +51,5 @@ public interface DocumentDao {
|
|||
* @return zero or more elements in the directory (an empty array may be returned -
|
||||
* never null)
|
||||
*/
|
||||
public AbstractElement[] findElements(Directory directory);
|
||||
AbstractElement[] findElements(Directory directory);
|
||||
}
|
||||
|
|
|
@ -27,5 +27,5 @@ public interface SecureDocumentDao extends DocumentDao {
|
|||
/**
|
||||
* @return all the usernames existing in the system.
|
||||
*/
|
||||
public String[] getUsers();
|
||||
String[] getUsers();
|
||||
}
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
package bigbank;
|
||||
|
||||
public interface BankDao {
|
||||
public Account readAccount(Long id);
|
||||
Account readAccount(Long id);
|
||||
|
||||
public void createOrUpdateAccount(Account account);
|
||||
void createOrUpdateAccount(Account account);
|
||||
|
||||
public Account[] findAccounts();
|
||||
Account[] findAccounts();
|
||||
}
|
||||
|
|
|
@ -19,11 +19,11 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||
|
||||
public interface BankService {
|
||||
|
||||
public Account readAccount(Long id);
|
||||
Account readAccount(Long id);
|
||||
|
||||
public Account[] findAccounts();
|
||||
Account[] findAccounts();
|
||||
|
||||
@PreAuthorize("hasRole('supervisor') or "
|
||||
+ "hasRole('teller') and (#account.balance + #amount >= -#account.overdraft)")
|
||||
public Account post(Account account, double amount);
|
||||
Account post(Account account, double amount);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public interface WebInvocationPrivilegeEvaluator {
|
|||
* @param uri the URI excluding the context path (a default context path setting will
|
||||
* be used)
|
||||
*/
|
||||
public boolean isAllowed(String uri, Authentication authentication);
|
||||
boolean isAllowed(String uri, Authentication authentication);
|
||||
|
||||
/**
|
||||
* Determines whether the user represented by the supplied <tt>Authentication</tt>
|
||||
|
@ -52,6 +52,6 @@ public interface WebInvocationPrivilegeEvaluator {
|
|||
* be used in evaluation whether access should be granted.
|
||||
* @return true if access is allowed, false if denied
|
||||
*/
|
||||
public boolean isAllowed(String contextPath, String uri, String method,
|
||||
Authentication authentication);
|
||||
boolean isAllowed(String contextPath, String uri, String method,
|
||||
Authentication authentication);
|
||||
}
|
||||
|
|
|
@ -34,6 +34,6 @@ interface HttpServletRequestFactory {
|
|||
* @param response the original {@link HttpServletResponse}. Cannot be null.
|
||||
* @return a non-null HttpServletRequest
|
||||
*/
|
||||
public HttpServletRequest create(HttpServletRequest request,
|
||||
HttpServletResponse response);
|
||||
HttpServletRequest create(HttpServletRequest request,
|
||||
HttpServletResponse response);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue