Skip to content

Commit

Permalink
Make javadoc compatible with doclint validatoin from Java8
Browse files Browse the repository at this point in the history
Fixes #35
  • Loading branch information
kwin committed Aug 26, 2015
1 parent 01d6b04 commit 9059ff3
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public interface AcInstallService {

/**
* Purges all ACLs being set on the given root path (and below)
* @param rootPath the rootPath for which the ACLs should be removed
* @param rootNodePath the rootPath for which the ACLs should be removed
* @param isRecursive if {@code true} will remove ACLs recursively from the given rootPath and its children, otherwise only for the given rootPath.
* @param listener the listener which should receive methods callbacks whenever something should be logged.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ public interface AceService {

/** method that indicates whether the service is ready for installation (if at least one configurations was found in repository)
*
* @return true if ready, otherwise false */
* @return {@code true} if ready, otherwise {@code false} */
public boolean isReadyToStart();

/** purges all acls of the node specified by path (no deletion of acls of subnodes)
*
* @param path
* @param path the path from which to purge the ACL
* @return status message */
public String purgeACL(final String path);

/** purges all acls of the node specified by path and all acls of all subnodes
*
* @param path
* @param path the path from which to purge the ACL (including those of all subnodes)
* @return status message */
public String purgeACLs(final String path);

/** method that purges authorizable(s) and all respective aces from the system
*
* @param authorizableId
* @param authorizableIds comma-separated list of authorizable ids
* @return status message */
public String purgeAuthorizables(String authorizableIds);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public int compare(Node node1, Node node2) {
* @param node
* article node
* @return Date creation date of the article
* @throws RepositoryException
* @throws RepositoryException if an error occurs
*/
public static Date getArticleDateProperty(final Node node)
throws RepositoryException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
import com.day.jcr.vault.fs.io.Archive;

/** Retrieves the contents of a AC tool yaml config file from either a package directly (used by install hook) or from the JCR node structure
* (used by JMX). Both methods return a map with filename->yaml-config-content entries.
* (used by JMX). Both methods return a map with filename->yaml-config-content entries.
*
* @author ghenzler */
public interface ConfigFilesRetriever {

/** Returns yaml configurations using a given root node. This will only return configuration entries which apply to the current run mode.
*
* @param session the jcr session
* @param jcrRootPath the root path in the JCR to start looking for yaml-files
* @param rootNode the root node in the JCR to start looking for yaml-files
* @return map of yaml configurations by their path location
* @throws Exception if things go wrong */
Map<String, String> getConfigFileContentFromNode(Node rootNode) throws Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public interface ConfigurationMerger {
* Validation ensures that no doubled defined groups and only valid section
* identifiers in configuration files are possible
*
* @param session
* @param newestConfigurations
* map which contains all paths and configuration in YAML format.
* key is the node path in CRX under which the respective
Expand All @@ -35,8 +34,8 @@ public interface ConfigurationMerger {
* holding sets of AuthorizableConfigBeans) as first element and the
* combined ACE configurations (as map holding sets of AceBeans) as
* second element
* @throws RepositoryException
* @throws AcConfigBeanValidationException
* @throws RepositoryException in case some repository error has occurred
* @throws AcConfigBeanValidationException in case the given configuration is invalid
*/
public abstract List getMergedConfigurations(
final Map<String, String> newestConfigurations,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,113 +39,68 @@ public Set<AuthorizableConfigBean> getGroupBeans(Session session)
* @return String array containing the paths */
public String[] getQueryExcludePaths();

/** @param aceMap
* @param authorizableSet
* @param mapOrder
* @param serverUrl
* @return
* @throws IOException */

public String getConfigurationDumpAsString(final AceDumpData aceDumpData,
final Set<AuthorizableConfigBean> groupSet,
final Set<AuthorizableConfigBean> userSet, final int mapOrder,
final String serverUrl) throws IOException;

/** @param sb
* @param aceMap
* @param mapOrder
* @return
* @throws IOException */
// public StringBuilder getAceDumpAsString(final StringBuilder sb, final
// Map<String, Set<AceBean>> aceMap, final int mapOrder) throws IOException;

/** @param session
* @return
* @throws RepositoryException */

public Set<AclBean> getACLDumpBeans(final Session session)
throws RepositoryException;

/** returns a Map with holds either principal or path based ACE data
*
* @param request
* @param session the jcr session
* @param keyOrder either principals (AceHelper.PRINCIPAL_BASED_ORDERING) or node paths (AceHelper.PATH_BASED_ORDERING) as keys
* @param aclOrdering specifies whether the allow and deny ACEs within an ACL should be divided in separate blocks (first deny then
* allow)
* @return
* @throws ValueFormatException
* @throws IllegalStateException
* @throws RepositoryException */
* @return AceDumpData
*/
public AceDumpData createAclDumpMap(final Session session,
final int keyOrder, final int aclOrdering,
final String[] excludePaths) throws ValueFormatException,
IllegalArgumentException, IllegalStateException,
RepositoryException;

// public Map <String, Set<AceBean>> createAclDumpMap(final Session session,
// final int keyOrder, final int aclOrdering, final String[] excludePaths,
// final boolean isFilterACEs) throws ValueFormatException,
// IllegalArgumentException, IllegalStateException, RepositoryException;

/** method that return a dump comprising of all groups and all aces in path based view
*
* @return */
* @return a string comprising the dump information */
public String getCompletePathBasedDumpsAsString();

/** method that return a dump comprising of all groups and all aces in principal based view
*
* @return */
* @return a string comprising the dump information */
public String getCompletePrincipalBasedDumpsAsString();

/** returns a dump of the ACEs installed in the system using a PrintWriter.
*
* @param out PrintWriter
* @param aceMap map containing all ACE data, either path based or group based
* @param mapOrdering
* @param aceOrdering */
* @param mapOrdering the map ordering
* @param aceOrdering the ace ordering*/
public void returnAceDump(final PrintWriter out,
Map<String, Set<AceBean>> aceMap, final int mapOrdering,
final int aceOrdering);

/** method that returns a dump comprising aces as file
*
* @param response
* @param aceMap
* @param authorizableSet
* @param session
* @param mapOrder
* @param aceOrder
* @throws IOException */

*/
public void returnAceDumpAsFile(final SlingHttpServletRequest request,
final SlingHttpServletResponse response, final Session session,
final int mapOrder, final int aceOrder);

/** @param response
* @param aceMap
* @param authorizableSet
* @param session
* @param mapOrder
* @param aceOrder
* @throws IOException */
public void returnCompleteDumpAsFile(
final SlingHttpServletResponse response,
final Map<String, Set<AceBean>> aceMap,
final Set<AuthorizableConfigBean> authorizableSet,
final Session session, final int mapOrder, final int aceOrder)
throws IOException;

/** @param response
* @param aceMap
* @param mapOrder
* @throws IOException */

public void returnAceDumpAsFile(final SlingHttpServletResponse response,
final Map<String, Set<AceBean>> aceMap, final int mapOrder)
throws IOException;

/** @param response
* @param aceMap
* @param authorizableSet
* @param mapOrder
* @throws IOException */
public void returnConfigurationDumpAsFile(
final SlingHttpServletResponse response,
final Map<String, Set<AceBean>> aceMap,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,12 +401,6 @@ private Set<User> getUsersFromAces(int mapOrder, Session session,
return usersFromACEs;
}

/** returns a dump of the ACEs installed in the system using a PrintWriter.
*
* @param out PrintWriter
* @param aceMap map containing all ACE data, either path based or group based
* @param mapOrdering
* @param aceOrdering */
@Override
public void returnAceDump(final PrintWriter out,
Map<String, Set<AceBean>> aceMap, final int mapOrdering,
Expand Down Expand Up @@ -813,8 +807,7 @@ public void writeAuthorizableConfigToStream(
*
* @param usersFromACEs set holding users
* @return set holding AuthorizableConfigBeans
* @throws RepositoryException
* @throws UnsupportedRepositoryOperationException */
*/
public Set<AuthorizableConfigBean> getUserBeans(Set<User> usersFromACEs)
throws RepositoryException, UnsupportedRepositoryOperationException {

Expand Down Expand Up @@ -842,9 +835,7 @@ public Set<AuthorizableConfigBean> getUserBeans(Set<User> usersFromACEs)
*
* @param session session with sufficient rights to read group informations
* @return set holding AuthorizableConfigBeans
* @throws AccessDeniedException
* @throws UnsupportedRepositoryOperationException
* @throws RepositoryException */
*/
@Override
public Set<AuthorizableConfigBean> getGroupBeans(Session session)
throws AccessDeniedException,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,9 @@ public static String getBlankString(final int nrOfBlanks) {
* configuration don't get altered
*
* @param pathBasedAceMapFromConfig map containing the ACE data from the merged configurations path based
* @param authorizablesSet set which contains all group names contained in the configurations
* @param session
* @param out
* @param session the jcr session
* @param history history object
* @throws Exception */

*/
public static void installPathBasedACEs(
final Map<String, Set<AceBean>> pathBasedAceMapFromConfig,
final Session session,
Expand Down Expand Up @@ -238,9 +235,10 @@ public static Map<String, Set<AceBean>> createAceMap(

/** changes a group based ACE map into a path based ACE map
*
* @param groupBasedAceMap
* @param groupBasedAceMap the group based ace map
* @param sorting specifies whether ACEs get sorted by permissions (all denies followed by all allows)
* @return */
* @return the path based ace map
*/
public static Map<String, Set<AceBean>> getPathBasedAceMap(
final Map<String, Set<AceBean>> groupBasedAceMap, final int sorting) {
Map<String, Set<AceBean>> pathBasedAceMap = new HashMap<String, Set<AceBean>>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public static JackrabbitAccessControlList getAccessControlList(

/**
* A utility method to add a new access control entry.<br>
* Please note, that calling {@link javax.jcr.Session#save()()} is required
* Please note, that calling {@link javax.jcr.Session#save()} is required
* in order to persist the changes.
*
* @param session
Expand All @@ -226,7 +226,7 @@ public static boolean addAccessControlEntry(Session session,

/**
* A utility method to add a new access control entry. Please note, that a
* call to {@link javax.jcr.Session#save()()} is required in order to
* call to {@link javax.jcr.Session#save()} is required in order to
* persist the changes.
*
* @param session
Expand Down Expand Up @@ -341,8 +341,6 @@ static Set<Privilege> getPrivilegeSet(String[] privNames,
* @param authorizableID
* ID of authorizable to be deleted from ACL of node specified by
* path
* @throws UnsupportedRepositoryOperationException
* @throws RepositoryException
*/
public static void deleteAllEntriesForAuthorizableFromACL(final Session session,
final String path, String authorizableID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,6 @@ private static Set<String> removeRedundantPrivileges(Session session, String[] p
/**
* Persists the AccessControlEntry being represented by this bean to the
* repository
*
* @param session
* @param principal
* @param history
* @throws RepositoryException
*/
public void writeToRepository(final Session session, Principal principal, AcInstallationHistoryPojo history)
throws RepositoryException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class QueryHelper {
* Method that returns a set containing all rep:policy nodes from repository
* excluding those contained in paths which are excluded from search
*
* @param session
* @param session the jcr session
* @param excludePaths
* paths which are excluded from search
* @return all rep:policy nodes delivered by query
Expand Down Expand Up @@ -97,12 +97,6 @@ public static Set<Node> getRepPolicyNodes(final Session session,

/**
* Get Nodes with XPATH Query.
*
* @param session
* @param xpathQuery
* @return
* @throws InvalidQueryException
* @throws RepositoryException
*/
public static Set<Node> getNodes(final Session session,
final String xpathQuery) throws InvalidQueryException,
Expand All @@ -112,12 +106,9 @@ public static Set<Node> getNodes(final Session session,
}

/**
* @param session
* @param session the jcr session
* @param queryStatement - ex. "SELECT * FROM [rep:ACL]"
* @param queryLanguageType - ex. Query.JCR_SQL2
* @return
* @throws InvalidQueryException
* @throws RepositoryException
*/
public static Set<Node> getNodes(final Session session,
final String queryStatement, String queryLanguageType) throws InvalidQueryException,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,13 @@ public static Node getAcHistoryRootNode(final Session session)
* Method that persists a new history log in CRX under
* '/var/statistics/achistory'
*
* @param session
* @param session the jcr session
* @param history
* history to persist
* @param nrOfHistoriesToSave
* number of newest histories which should be kept in CRX. older
* histories get automatically deleted
* @return
* @throws RepositoryException
* @return the node being created
*/
public static Node persistHistory(final Session session,
AcInstallationHistoryPojo history, final int nrOfHistoriesToSave)
Expand Down Expand Up @@ -201,13 +200,7 @@ public static String getLogHtml(final Session session, final String path) {
/**
* Method which assembles String containing informations of the properties
* of the respective history node which is specified by the path parameter
*
* @param session
* @param path
* @param lineFeedSymbol
* @return
*/

public static String getLog(final Session session, final String path,
final String lineFeedSymbol) {

Expand Down

0 comments on commit 9059ff3

Please sign in to comment.