Skip to content

Commit

Permalink
#1 source code cleanup/format
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-conway committed Nov 9, 2015
1 parent f34bff5 commit d5854b7
Show file tree
Hide file tree
Showing 483 changed files with 7,432 additions and 7,382 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
/**
* Abstract base class for classes that compute and return a checksum based on
* some algorithm, based on as Strategy pattern
*
*
* @author Mike Conway - DICE
*
*
*/
public abstract class AbstractChecksumComputeStrategy {

/**
*
*
* @param localFileAbsolutePath
* <code>String</code> with the absolute path to a local file
* @return {@link ChecksumValue} with a checksum in digest (string) form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
/**
* Interface representing code to handle negotiation and determination of
* checksum type
*
*
* @author Mike Conway - DICXE
*
*
*/
public interface ChecksumManager {

/**
* Using the values in the jargon properties, as well as info on the target
* server, determine the type of checksum to use
*
*
* @return {@link ChecksumEncodingEnum} used for the server
* @throws JargonException
*/
Expand All @@ -26,7 +26,7 @@ public abstract ChecksumEncodingEnum determineChecksumEncodingForTargetServer()
* Using a value from iRODS describing a checksum on a file, determine the
* type of encoding used. Note that if no checksum is present,
* <code>null</code> will be returned
*
*
* @param irodsChecksumValue
* <code>String</code> with the checksum value from iRODS,
* potentially including a prefix
Expand All @@ -37,6 +37,6 @@ public abstract ChecksumEncodingEnum determineChecksumEncodingForTargetServer()
*/
public ChecksumValue determineChecksumEncodingFromIrodsData(
String irodsChecksumValue)
throws ChecksumMethodUnavailableException;
throws ChecksumMethodUnavailableException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
* Note this implementation is very basic and will be expanded later.
* {@link DataObjectAO} has other checksum support that will eventually migrate
* here.
*
*
* @author Mike Conway - DICE
*
*
*/
public class ChecksumManagerImpl implements ChecksumManager {

Expand All @@ -49,7 +49,7 @@ public ChecksumManagerImpl(final IRODSAccount irodsAccount,

/*
* (non-Javadoc)
*
*
* @see org.irods.jargon.core.checksum.ChecksumManager#
* determineChecksumEncodingForTargetServer()
*/
Expand Down Expand Up @@ -111,9 +111,9 @@ public ChecksumEncodingEnum determineChecksumEncodingForTargetServer()

/*
* Negotiation:
*
*
* DEFAULT - use MD5 pre consortium and SHA256 post
*
*
* STRONG - use MD5 pre 3.3.1 and SHA256 after
*/

Expand Down Expand Up @@ -156,21 +156,21 @@ public ChecksumEncodingEnum determineChecksumEncodingForTargetServer()

private void cacheEncoding(final ChecksumEncodingEnum checksumEncoding) {
irodsAccessObjectFactory.getDiscoveredServerPropertiesCache()
.cacheAProperty(irodsAccount.getHost(), irodsAccount.getZone(),
DiscoveredServerPropertiesCache.CHECKSUM_TYPE,
checksumEncoding.toString());
.cacheAProperty(irodsAccount.getHost(), irodsAccount.getZone(),
DiscoveredServerPropertiesCache.CHECKSUM_TYPE,
checksumEncoding.toString());
}

/*
* (non-Javadoc)
*
*
* @see org.irods.jargon.core.checksum.ChecksumManager#
* determineChecksumEncodingFromIrodsData(java.lang.String)
*/
@Override
public ChecksumValue determineChecksumEncodingFromIrodsData(
final String irodsChecksumValue)
throws ChecksumMethodUnavailableException {
throws ChecksumMethodUnavailableException {

log.info("determineChecksumEncodingFromIrodsData()");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/**
*
*
*/
package org.irods.jargon.core.checksum;

import org.irods.jargon.core.exception.JargonException;

/**
* Checksum computation method is not available.
*
*
* @author Mike Conway - DICE
*
*
*/
public class ChecksumMethodUnavailableException extends JargonException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

/**
* Represents a checksum and the type of checksum
*
*
* @author Mike Conway - DICE
*
*
*/
public class ChecksumValue {

Expand Down Expand Up @@ -83,7 +83,7 @@ public void setChecksumTransmissionFormat(

/*
* (non-Javadoc)
*
*
* @see java.lang.Object#toString()
*/
@Override
Expand All @@ -110,7 +110,7 @@ public String toString() {

/*
* (non-Javadoc)
*
*
* @see java.lang.Object#hashCode()
*/
@Override
Expand All @@ -133,7 +133,7 @@ public int hashCode() {

/*
* (non-Javadoc)
*
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

/**
* Value of a checksum stored in iRODS
*
*
* @author Mike Conway - DICE
*
*
*/
public class IrodsChecksumValue {
/**
Expand Down Expand Up @@ -47,7 +47,7 @@ public String toString() {
}
if (checksumEncodingEnum != null) {
builder.append("checksumEncodingEnum=")
.append(checksumEncodingEnum);
.append(checksumEncodingEnum);
}
builder.append("]");
return builder.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
* type that can be derived from the {@link ChecksumManager}.
* <p/>
* This factory is available from the {@link IRODSSession}
*
*
* @author Mike Conway - DICE
*/
public interface LocalChecksumComputerFactory {

/**
* Based on the checksum encoding type, find an instance of an encoder
*
*
* @param checksumEncodingEnum
* {@link ChecksumEncodingEnum} value of a specific type
* @return {@link AbstractChecksumComputeStrategy} that implements that
Expand All @@ -25,6 +25,6 @@ public interface LocalChecksumComputerFactory {
*/
public abstract AbstractChecksumComputeStrategy instance(
ChecksumEncodingEnum checksumEncodingEnum)
throws ChecksumMethodUnavailableException;
throws ChecksumMethodUnavailableException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@
* be derived from the {@link ChecksumManager}. *
* <p/>
* This factory is available from the {@link IRODSSession}
*
*
* @author Mike Conway - DICE
*
*
*/
public class LocalChecksumComputerFactoryImpl implements
LocalChecksumComputerFactory {
LocalChecksumComputerFactory {

/*
* (non-Javadoc)
*
*
* @see
* org.irods.jargon.core.checksum.LocalChecksumComputerFactory#instance(
* org.irods.jargon.core.protovalues.ChecksumEncodingEnum)
*/
@Override
public AbstractChecksumComputeStrategy instance(
final ChecksumEncodingEnum checksumEncodingEnum)
throws ChecksumMethodUnavailableException {
throws ChecksumMethodUnavailableException {

if (checksumEncodingEnum == null) {
throw new IllegalArgumentException("null checksumEncodingEnum");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@

/**
* Compute an MD5 checksum on a local file
*
*
* @author Mike Conway - DICE
*/
public class MD5LocalChecksumComputerStrategy extends
AbstractChecksumComputeStrategy {
AbstractChecksumComputeStrategy {

public static final Logger log = LoggerFactory
.getLogger(MD5LocalChecksumComputerStrategy.class);

/*
* (non-Javadoc)
*
*
* @see org.irods.jargon.core.checksum.AbstractChecksumComputer#
* instanceChecksumForPackingInstruction(java.lang.String)
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
*
*
*/
package org.irods.jargon.core.checksum;

Expand All @@ -14,18 +14,18 @@

/**
* Compute an SHA256 checksum on a local file
*
*
* @author Mike Conway - DICE
*/
public class SHA256LocalChecksumComputerStrategy extends
AbstractChecksumComputeStrategy {
AbstractChecksumComputeStrategy {

public static final Logger log = LoggerFactory
.getLogger(SHA256LocalChecksumComputerStrategy.class);

/*
* (non-Javadoc)
*
*
* @see org.irods.jargon.core.checksum.AbstractChecksumComputer#
* instanceChecksumForPackingInstruction(java.lang.String)
*/
Expand Down
Loading

0 comments on commit d5854b7

Please sign in to comment.