fix for extending roles structures

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/ckan-util-library@162165 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2018-01-15 10:34:05 +00:00
parent 0b02d48cbc
commit 63c525fe5c
2 changed files with 3 additions and 5 deletions

View File

@ -73,8 +73,6 @@ public class DataCatalogueFactory {
* @return
*/
private boolean expired(CacheBean cacheBean) {
boolean expired = (cacheBean.ttl + MAX_LIFETIME <= System.currentTimeMillis());
logger.debug("expired is " + expired);
return expired;
return (cacheBean.ttl + MAX_LIFETIME < System.currentTimeMillis());
}
}

View File

@ -83,7 +83,7 @@ public class DataCatalogueRunningCluster {
private boolean manageProductEnabled;
private String urlResolver;
private boolean alertUsers;
private static Map<String, String> extendRoleInOrganization = new HashMap<String, String>(0);
private Map<String, String> extendRoleInOrganization = new HashMap<String, String>(0);
// generic role key
public static final String CKAN_GENERIC_ROLE = "*";
@ -415,7 +415,7 @@ public class DataCatalogueRunningCluster {
* @throws IOException
* @throws SAXException
*/
private static void parseExtendingRoles() throws ParserConfigurationException, SAXException, IOException {
private void parseExtendingRoles() throws ParserConfigurationException, SAXException, IOException {
Query q = new QueryBox("for $profile in collection('/db/Profiles/GenericResource')//Resource " +
"where $profile/Profile/SecondaryType/string() eq 'ApplicationProfile' and $profile/Profile/Name/string() " +