Skip to content

Commit

Permalink
#2 refactoring for rest
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-conway committed Apr 7, 2017
1 parent a500a16 commit 1c41d73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,6 @@ public MetadataTemplate findTemplateByNameInPublicTemplates(final String name) t

MetadataTemplate returnTemplate = null;
IRODSFile collectionIrodsFile = null;
boolean matched = false;

// for (String publicDir : getPublicTemplateLocations()) {
try {
collectionIrodsFile = this.getIrodsAccessObjectFactory()
Expand All @@ -301,7 +299,6 @@ public MetadataTemplate findTemplateByNameInPublicTemplates(final String name) t

try {
returnTemplate = processFileToMetadataTemplate((IRODSFile) f);
matched = true;
} catch (JargonException je) {
log.error("JargonException in processFileToMetadataTemplate", je);
log.info("Matched {} with {}, but file could not be processed", name, f.getAbsolutePath());
Expand Down Expand Up @@ -451,6 +448,7 @@ private String generateMdTemplateFileName() {
StringBuilder sb = new StringBuilder();
sb.append("mdtemplate");
sb.append(System.currentTimeMillis());
sb.append(MetadataTemplateConstants.TEMPLATE_FILE_EXT);
return sb.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ public void testListPublic() throws Exception {

JargonMetadataResolver resolver = new JargonMetadataResolver(context, accessObjectFactory,
metadataConfiguration);
UUID uuid = resolver.saveTemplate(template, MetadataTemplateLocationTypeEnum.PUBLIC);

List<MetadataTemplate> metadataTemplates = resolver.listPublicTemplates();

Expand Down

0 comments on commit 1c41d73

Please sign in to comment.