From ab18a5830064f242254af4e1fde192266744f865 Mon Sep 17 00:00:00 2001 From: jpotts Date: Fri, 22 Apr 2016 10:38:55 -0500 Subject: [PATCH] Add explicit folder name check to close #3. --- .../share/behavior/ShareDocumentLibraryFromTemplate.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share-site-space-templates-repo/src/main/java/com/ecmarchitect/share/behavior/ShareDocumentLibraryFromTemplate.java b/share-site-space-templates-repo/src/main/java/com/ecmarchitect/share/behavior/ShareDocumentLibraryFromTemplate.java index 222702a..482e9d9 100644 --- a/share-site-space-templates-repo/src/main/java/com/ecmarchitect/share/behavior/ShareDocumentLibraryFromTemplate.java +++ b/share-site-space-templates-repo/src/main/java/com/ecmarchitect/share/behavior/ShareDocumentLibraryFromTemplate.java @@ -78,6 +78,13 @@ public void onCreateNode(ChildAssociationRef childAssocRef) { logger.debug("Space template doesn't exist"); return; } + + //confirm that the space template's name is an exact match -- Issue #3 + String templateName = (String) nodeService.getProperty(spaceTemplate, ContentModel.PROP_NAME); + if (!templateName.equals(sitePreset)) { + logger.debug("Space template name is not an exact match: " + templateName); + return; + } //otherwise, create the documentLibrary folder as a child of this site folder //using the space template found above