Skip to content

Commit

Permalink
Modify abstract classes that are static utilities (or currently funct…
Browse files Browse the repository at this point in the history
  • Loading branch information
osmandin authored and Andrew Woods committed Feb 17, 2015
1 parent 2774bf9 commit 1317ed1
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 7 deletions.
Expand Up @@ -37,12 +37,12 @@
import com.google.common.eventbus.EventBus;

/**
* Abstract superclass for Fedora JAX-RS Resources, providing convenience fields
* Superclass for Fedora JAX-RS Resources, providing convenience fields
* and methods.
*
* @author ajs6f
*/
public abstract class AbstractResource {
public class AbstractResource {

static {
// the SLF4J to JUL bridge normally adds its attachments
Expand Down
Expand Up @@ -34,7 +34,7 @@
* @author ajs6f
* @since Feb 20, 2014
*/
public abstract class AbstractService {
public class AbstractService {
protected final static JcrTools jcrTools = new JcrTools();

protected Node findOrCreateNode(final Session session,
Expand Down
Expand Up @@ -45,7 +45,10 @@
* @author awoods
*/
@Component
public abstract class ServiceHelpers {
public class ServiceHelpers {

private ServiceHelpers() {
}

/**
* Get the total size of a Node's properties
Expand Down Expand Up @@ -189,4 +192,5 @@ public static long getRepositorySize(final Repository repository)
session.logout();
}
}

}
Expand Up @@ -38,9 +38,13 @@
* @author cabeer
* @since 9/25/14
*/
public abstract class JcrPropertyFunctions {
public final class JcrPropertyFunctions {

private static final Logger LOGGER = getLogger(JcrPropertyFunctions.class);

private JcrPropertyFunctions() {
}

/**
* Translates a {@link javax.jcr.nodetype.NodeType} to its {@link String} name.
*/
Expand Down Expand Up @@ -139,4 +143,5 @@ public boolean apply(final Node node) {
}
}
};

}
Expand Up @@ -34,7 +34,7 @@
* @author Chris Beer
* @since Mar 6, 2013
*/
public abstract class ContentDigest {
public final class ContentDigest {

private static final Logger LOGGER = getLogger(ContentDigest.class);

Expand All @@ -43,8 +43,12 @@ public abstract class ContentDigest {

public static final Map<String, String> schemeToAlgorithm =
singletonMap("urn:sha1", "SHA-1");

public static final String DEFAULT_ALGORITHM = "SHA-1";

private ContentDigest() {
}

/**
* Convert a MessageDigest algorithm and checksum value to a URN
* @param algorithm
Expand Down Expand Up @@ -98,4 +102,5 @@ private static String asString(final byte[] data) {
public static URI missingChecksum() {
return asURI("SHA-1", "missing");
}

}
Expand Up @@ -34,7 +34,10 @@
* @author Benjamin Armintor
* @since May 13, 2013
*/
public abstract class NamespaceTools {
public final class NamespaceTools {

private NamespaceTools() {
}

/**
* We need the Modeshape NamespaceRegistry, because it allows us to register
Expand Down Expand Up @@ -105,4 +108,5 @@ public static void validatePath(final Session session, final String path) {
}
}
}

}

0 comments on commit 1317ed1

Please sign in to comment.