public boolean hasXmppSettings(String userId) { boolean hasSettings = false; try { hasSettings = registry.resourceExists(IdentityRegistryResources.XMPP_SETTINGS_ROOT + userId); } catch (RegistryException e) { log.error("Error when checking the availability of the user " + userId, e); } return hasSettings; } }
public boolean hasXmppSettings(String userId) { boolean hasSettings = false; try { hasSettings = registry.resourceExists(IdentityRegistryResources.XMPP_SETTINGS_ROOT + userId); } catch (RegistryException e) { log.error("Error when checking the availability of the user " + userId, e); } return hasSettings; } }
public boolean hasXmppSettings(String userId) { boolean hasSettings = false; try { hasSettings = registry.resourceExists(IdentityRegistryResources.XMPP_SETTINGS_ROOT + userId); } catch (RegistryException e) { log.error("Error when checking the availability of the user " + userId, e); } return hasSettings; } }
private boolean isDUCollectionIsThere(BPELDeploymentContext deploymentContext) throws RegistryException { String collectionLocation = BPELPackageRepositoryUtils.getResourcePathForBPELPackageContent(deploymentContext); return configRegistry.resourceExists(collectionLocation); }
public boolean isServiceProviderExists(String issuer) throws IdentityException { String path = IdentityRegistryResources.SAML_SSO_SERVICE_PROVIDERS + encodePath(issuer); try { return registry.resourceExists(path); } catch (RegistryException e) { throw IdentityException.error("Error occurred while checking if resource path \'" + path + "\' exists in " + "registry"); } }
public boolean isServiceProviderExists(String issuer) throws IdentityException { String path = IdentityRegistryResources.SAML_SSO_SERVICE_PROVIDERS + encodePath(issuer); try { return registry.resourceExists(path); } catch (RegistryException e) { throw IdentityException.error("Error occurred while checking if resource path \'" + path + "\' exists in " + "registry"); } }
private static Boolean resourceExists(Registry registry, LogEntry entry) { try { return registry != null && entry != null && entry.getResourcePath() != null && registry.resourceExists(entry.getResourcePath()); } catch (RegistryException ignore) { return false; } }
public boolean isServiceProviderExists(String issuer) throws IdentityException { String path = IdentityRegistryResources.SAML_SSO_SERVICE_PROVIDERS + encodePath(issuer); try { return registry.resourceExists(path); } catch (RegistryException e) { throw IdentityException.error("Error occurred while checking if resource path \'" + path + "\' exists in " + "registry"); } }
public void removeOpenIDSignUp(String openID) { try { if (registry.resourceExists(IdentityRegistryResources.OPENID_SIGN_UP + getOpenIdModified(openID))) { registry.delete(IdentityRegistryResources.OPENID_SIGN_UP + getOpenIdModified(openID)); } } catch (RegistryException e) { log.error("Error Removing the OpenID", e); } }
public void removeOpenIDSignUp(String openID) { try { if (registry.resourceExists(IdentityRegistryResources.OPENID_SIGN_UP + getOpenIdModified(openID))) { registry.delete(IdentityRegistryResources.OPENID_SIGN_UP + getOpenIdModified(openID)); } } catch (RegistryException e) { log.error("Error Removing the OpenID", e); } }
public RegistryManager() { try { if (!registry.resourceExists(CartridgeConstants.DomainMappingInfo.HOSTINFO)) { registry.put(CartridgeConstants.DomainMappingInfo.HOSTINFO, registry.newCollection()); } } catch (RegistryException e) { String msg = "Error while accessing registry or initializing domain mapping registry path\n"; log.error(msg + e.getMessage()); } }
public void removeOpenIDSignUp(String openID) { try { if (registry.resourceExists(IdentityRegistryResources.OPENID_SIGN_UP + getOpenIdModified(openID))) { registry.delete(IdentityRegistryResources.OPENID_SIGN_UP + getOpenIdModified(openID)); } } catch (RegistryException e) { log.error("Error Removing the OpenID", e); } }
public void move(String s, String s1) throws ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException { // A read only session must not be allowed to move a node RegistryJCRItemOperationUtil.validateReadOnlyItemOpr(registrySession); try { if (userRegistry.resourceExists(s)) { userRegistry.move(s, s1); } } catch (RegistryException e) { throw new RepositoryException("RegistryException occurred at Registry level"); } }
public void init() { try { Registry registry = Utils.getRegistryService().getSystemRegistry(); if (!registry.resourceExists(shutterbugHome)) { Collection col = registry.newCollection(); registry.put(shutterbugHome, col); } } catch (Exception e) { log.error("An error occured while initializing the Shutterbug Collection Handler", e); } }
/** * Creates a collection in the given common location. * * @param commonLocation location to create the collection. * @throws RegistryException If fails to create a collection at given location. */ private void createCollection(String commonLocation) throws RegistryException { Registry systemRegistry = CommonUtil.getUnchrootedSystemRegistry(requestContext); //Creating a collection if not exists. if (!systemRegistry.resourceExists(commonLocation)) { systemRegistry.put(commonLocation, systemRegistry.newCollection()); } }
public boolean isAPIAvailable(APIIdentifier identifier) throws AppManagementException { String path = AppMConstants.API_ROOT_LOCATION + RegistryConstants.PATH_SEPARATOR + identifier.getProviderName() + RegistryConstants.PATH_SEPARATOR + identifier.getApiName() + RegistryConstants.PATH_SEPARATOR + identifier.getVersion(); try { return registry.resourceExists(path); } catch (RegistryException e) { handleException("Failed to check availability of api :" + path, e); return false; } }
public static Resource getRegistryResource(String path) throws MobileDeviceMgtPluginException { try { if(MobileDeviceManagementUtil.getConfigurationRegistry().resourceExists(path)){ return MobileDeviceManagementUtil.getConfigurationRegistry().get(path); } return null; } catch (RegistryException e) { throw new MobileDeviceMgtPluginException("Error in retrieving registry resource : " + e.getMessage(), e); } }
public static void removeRegistryResource(String resourcePath) throws RegistryException { int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); Registry registry = ServiceHolder.getRegistryService().getConfigSystemRegistry(tenantId); if (registry.resourceExists(resourcePath)) { Resource resource = registry.get(resourcePath); registry.delete(resourcePath); } }
private void deleteOldResource(RequestContext context, Resource metaDataResource, WSDLInfo wsdlInfo, String wsdlPath, Resource wsdlResource) throws RegistryException { if(wsdlInfo.isMasterWSDL()){ if (metaDataResource != null) { wsdlResource.setUUID(metaDataResource.getUUID()); } if(!wsdlPath.equals(context.getResourcePath().getPath()) && registry.resourceExists(context.getResourcePath().getPath())){ registry.delete(context.getResourcePath().getPath()); } } }
@Override public void createLink(RequestContext requestContext) throws RegistryException { String symlinkPath = requestContext.getResourcePath().getPath(); String targetResourcePath = requestContext.getTargetPath(); if (requestContext.getRegistry().resourceExists(targetResourcePath)) { Resource r = requestContext.getRegistry().get(targetResourcePath); r.addProperty("registry.resource.symlink.path", symlinkPath); requestContext.getRegistry().put(targetResourcePath, r); } }