Dynamic models - validate message resource bundle exists (when reloading)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7680 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2007-12-17 11:02:39 +00:00
parent 4b26895038
commit cf5d4c650c
3 changed files with 71 additions and 35 deletions

View File

@@ -46,6 +46,8 @@ public class MessageServiceImpl implements MessageService
{
private static final Log logger = LogFactory.getLog(MessageServiceImpl.class);
public static final String PROPERTIES_FILE_SUFFIX = ".properties";
/**
* Lock objects
*/
@@ -542,12 +544,12 @@ public class MessageServiceImpl implements MessageService
NodeRef rootNode = serviceRegistry.getNodeService().getRootNode(storeRef);
// first attempt - with locale
List<NodeRef> nodeRefs = searchService.selectNodes(rootNode, path+"_"+locale+".properties", null, resolver, false);
List<NodeRef> nodeRefs = searchService.selectNodes(rootNode, path+"_"+locale+PROPERTIES_FILE_SUFFIX, null, resolver, false);
if ((nodeRefs == null) || (nodeRefs.size() == 0))
{
// second attempt - basename
nodeRefs = searchService.selectNodes(rootNode, path+".properties", null, resolver, false);
nodeRefs = searchService.selectNodes(rootNode, path+PROPERTIES_FILE_SUFFIX, null, resolver, false);
if ((nodeRefs == null) || (nodeRefs.size() == 0))
{