/** * @return Returns the string representation of the store reference */ public String getStore() { return store == null ? null : store.toString(); }
/** * @return Returns the string representation of the store reference */ public String getStore() { return store == null ? null : store.toString(); }
@Override public String getStoreUrl() { return abstractHomeFolderProvider.getStoreRef().toString(); }
@Override public String getStoreUrl() { return abstractHomeFolderProvider.getStoreRef().toString(); }
private boolean ignorePolicy(StoreRef storeRef) { return (storesToIgnorePolicies.contains(tenantService.getBaseName(storeRef).toString())); }
/** * Checks whether the node is in a store on which policies should not be applied. * * @param nodeRef * node to check if the policy can be run or not * @return true if the nodeRef is part of a store which should be ignored when invoking policies(e.g. archive://SpacesStore) */ public boolean ignorePolicy(NodeRef nodeRef) { return (storesToIgnorePolicies.contains(tenantService.getBaseName(nodeRef.getStoreRef()).toString())); } }
/** * Checks whether the node is in a store on which policies should not be applied. * * @param nodeRef * node to check if the policy can be run or not * @return true if the nodeRef is part of a store which should be ignored when invoking policies(e.g. archive://SpacesStore) */ public boolean ignorePolicy(NodeRef nodeRef) { return (storesToIgnorePolicies.contains(tenantService.getBaseName(nodeRef.getStoreRef()).toString())); } }
private boolean ignorePolicy(NodeRef nodeRef) { return (storesToIgnorePolicies.contains(tenantService.getBaseName(nodeRef.getStoreRef()).toString())); }
private void cacheOwner(NodeRef nodeRef, String userName) { // do not cache owners of nodes that are from stores that ignores policies // to prevent mess in nodeOwnerCache if (!storesToIgnorePolicies.contains(tenantService.getBaseName(nodeRef.getStoreRef()).toString())) { nodeOwnerCache.put(nodeRef, userName); } }
private void cacheOwner(NodeRef nodeRef, String userName) { // do not cache owners of nodes that are from stores that ignores policies // to prevent mess in nodeOwnerCache if (!storesToIgnorePolicies.contains(tenantService.getBaseName(nodeRef.getStoreRef()).toString())) { nodeOwnerCache.put(nodeRef, userName); } }
/** * {@inheritDoc} */ public void onDeleteAssociation(AssociationRef nodeAssocRef) { if (! storesToIgnore.contains(nodeAssocRef.getSourceRef().getStoreRef().toString())) { saveAssoc(nodeAssocRef.getSourceRef(), nodeAssocRef.getTypeQName()); } }
/** * {@inheritDoc} */ public void onCreateNode(ChildAssociationRef childAssocRef) { if (! storesToIgnore.contains(childAssocRef.getChildRef().getStoreRef().toString())) { NodeRef nodeRef = childAssocRef.getChildRef(); save(nodeRef); saveAssoc(nodeRef, null); } }
/** * {@inheritDoc} */ public void onDeleteChildAssociation(ChildAssociationRef childAssocRef) { if (! storesToIgnore.contains(childAssocRef.getChildRef().getStoreRef().toString())) { saveAssoc(childAssocRef.getParentRef(), childAssocRef.getTypeQName()); } }
/** * {@inheritDoc} */ public void onCreateAssociation(AssociationRef nodeAssocRef) { if (! storesToIgnore.contains(nodeAssocRef.getSourceRef().getStoreRef().toString())) { saveAssoc(nodeAssocRef.getSourceRef(), nodeAssocRef.getTypeQName()); } }
/** * {@inheritDoc} */ public void onCreateNode(ChildAssociationRef childAssocRef) { if (! storesToIgnore.contains(childAssocRef.getChildRef().getStoreRef().toString())) { NodeRef nodeRef = childAssocRef.getChildRef(); save(nodeRef); saveAssoc(nodeRef, null); } }
/** * {@inheritDoc} */ public void onDeleteChildAssociation(ChildAssociationRef childAssocRef) { if (! storesToIgnore.contains(childAssocRef.getChildRef().getStoreRef().toString())) { saveAssoc(childAssocRef.getParentRef(), childAssocRef.getTypeQName()); } }
/** * {@inheritDoc} */ public void onCreateAssociation(AssociationRef nodeAssocRef) { if (! storesToIgnore.contains(nodeAssocRef.getSourceRef().getStoreRef().toString())) { saveAssoc(nodeAssocRef.getSourceRef(), nodeAssocRef.getTypeQName()); } }
private void bootstrapVersionTenantStore(ImporterBootstrap versionImporterBootstrap, String tenantDomain) { // Bootstrap Tenant-Specific Version Store StoreRef bootstrapStoreRef = versionImporterBootstrap.getStoreRef(); bootstrapStoreRef = new StoreRef(bootstrapStoreRef.getProtocol(), tenantService.getName(bootstrapStoreRef.getIdentifier(), tenantDomain)); versionImporterBootstrap.setStoreUrl(bootstrapStoreRef.toString()); versionImporterBootstrap.bootstrap(); if (logger.isDebugEnabled()) { logger.debug("Bootstrapped store: "+tenantService.getBaseName(bootstrapStoreRef)+" (Tenant: "+tenantDomain+")"); } }
private void bootstrapVersionTenantStore(ImporterBootstrap versionImporterBootstrap, String tenantDomain) { // Bootstrap Tenant-Specific Version Store StoreRef bootstrapStoreRef = versionImporterBootstrap.getStoreRef(); bootstrapStoreRef = new StoreRef(bootstrapStoreRef.getProtocol(), tenantService.getName(bootstrapStoreRef.getIdentifier(), tenantDomain)); versionImporterBootstrap.setStoreUrl(bootstrapStoreRef.toString()); versionImporterBootstrap.bootstrap(); if (logger.isDebugEnabled()) { logger.debug("Bootstrapped store: "+tenantService.getBaseName(bootstrapStoreRef)+" (Tenant: "+tenantDomain+")"); } }
@Test public void testBootstrap() { StoreRef bootstrapStoreRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "Test_" + System.currentTimeMillis()); importerBootstrap.setStoreUrl(bootstrapStoreRef.toString()); importerBootstrap.bootstrap(); authenticationComponent.setSystemUserAsCurrentUser(); System.out.println(NodeStoreInspector.dumpNodeStore(nodeService, bootstrapStoreRef)); }