From: <bra...@us...> - 2009-11-08 02:11:04
|
Revision: 2919 http://archive-access.svn.sourceforge.net/archive-access/?rev=2919&view=rev Author: bradtofel Date: 2009-11-08 02:10:48 +0000 (Sun, 08 Nov 2009) Log Message: ----------- JAVADOC: updated javadoc for public methods Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java 2009-11-08 01:59:29 UTC (rev 2918) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java 2009-11-08 02:10:48 UTC (rev 2919) @@ -28,6 +28,13 @@ import org.archive.wayback.core.WaybackRequest; import org.archive.wayback.util.operator.BooleanOperator; +/** + * BooleanOperator which tests a delegate operator, and sets an + * ExclusionFilterFactory on the WaybackRequest if the delegate is true. + * + * @author brad + * + */ public class AccessControlSettingOperation implements BooleanOperator<WaybackRequest> { private ExclusionFilterFactory factory = null; @@ -40,18 +47,33 @@ return true; } + /** + * @return ExclusionFilterFactory which will be set on operator matches + */ public ExclusionFilterFactory getFactory() { return factory; } + /** + * @param factory ExclusionFilterFactory which will be set on operator + * matches + */ public void setFactory(ExclusionFilterFactory factory) { this.factory = factory; } + /** + * @return the BooleanOperator delegate which determines if the factory + * is applied + */ public BooleanOperator<WaybackRequest> getOperator() { return operator; } + /** + * @param operator the BooleanOperator delegate which determines if the + * factory is applied + */ public void setOperator(BooleanOperator<WaybackRequest> operator) { this.operator = operator; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java 2009-11-08 01:59:29 UTC (rev 2918) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java 2009-11-08 02:10:48 UTC (rev 2919) @@ -29,6 +29,12 @@ import org.archive.wayback.core.WaybackRequest; import org.archive.wayback.util.operator.BooleanOperator; +/** + * BooleanOperator which returns true if the user has authenticated as one of + * a list of users with this server. + * @author brad + * + */ public class HTTPAuthBooleanOperator implements BooleanOperator<WaybackRequest> { private List<String> allowedUsers = null; public boolean isTrue(WaybackRequest value) { @@ -41,9 +47,15 @@ } return allowedUsers.contains(currentUser); } + /** + * @return the List of users that this operator matches against. + */ public List<String> getAllowedUsers() { return allowedUsers; } + /** + * @param allowedUsers the List of users that this operator matches against. + */ public void setAllowedUsers(List<String> allowedUsers) { this.allowedUsers = allowedUsers; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java 2009-11-08 01:59:29 UTC (rev 2918) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java 2009-11-08 02:10:48 UTC (rev 2919) @@ -32,15 +32,29 @@ import org.archive.wayback.util.IPRange; import org.archive.wayback.util.operator.BooleanOperator; +/** + * A BooleanOperator which results in true value if a users request originated + * from within a list of configured IP ranges. + * @author brad + * + */ public class IPMatchesBooleanOperator implements BooleanOperator<WaybackRequest> { private static final Logger LOGGER = Logger.getLogger(IPMatchesBooleanOperator .class.getName()); private List<IPRange> allowedRanges = null; + /** + * @return null. this is a placeholder for Spring's getter/setter + * examination + */ public List<String> getAllowedRanges() { return null; } + /** + * @param allowedRanges parses each String IPRange provided, added them to + * the list of IPRanges which this operator matches + */ public void setAllowedRanges(List<String> allowedRanges) { this.allowedRanges = new ArrayList<IPRange>(); for(String ip : allowedRanges) { Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java 2009-11-08 01:59:29 UTC (rev 2918) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java 2009-11-08 02:10:48 UTC (rev 2919) @@ -100,7 +100,7 @@ * <li>"A" - noarchive</li> * <li>"F" - nofollow</li> * <li>"I" - noindex</li> - * @see http://noarchive.net/ + * @see "http://noarchive.net/" */ public static final String CAPTURE_ROBOT_FLAGS = "robotflags"; @@ -142,6 +142,11 @@ * If-Modified HTTP request headers. */ public static final String CAPTURE_DUPLICATE_HTTP = "http"; + /** + * @return the original URL which resulted in the capture. If it is not + * available, the urlKey and original Host will be used to reconstruct + * something possibly closer to the original URL than the urlKey + */ public String getOriginalUrl() { String url = get(CAPTURE_ORIGINAL_URL); if(url == null) { @@ -160,6 +165,10 @@ } return url; } + /** + * @param originalUrl as close to the original URL by which this Resource + * was captured as is possible + */ public void setOriginalUrl(String originalUrl) { put(CAPTURE_ORIGINAL_URL,originalUrl); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |