Tabnine Logo
RegistryException.getMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
getMessage
method
in
org.wso2.carbon.registry.api.RegistryException

Best Java code snippets using org.wso2.carbon.registry.api.RegistryException.getMessage (Showing top 11 results out of 315)

origin: org.wso2.carbon.registry/org.wso2.carbon.registry.jcr

public Repository getLocalRepository(Map map) throws Exception {
  if ((map != null) && (map.get("org.wso2.registry.jcr") != null) && (map.get("org.wso2.registry.jcr").equals("greg"))) {
    InMemoryEmbeddedRegistryService embeddedRegistryService = null;
    try {
      realmService = new DefaultRealmService(null);
    } catch (Exception e) {
      throw new Exception("Unable to create realm service " + e.getMessage());
    }
    RegistryCoreServiceComponent registryComponent = new RegistryCoreServiceComponent() {
      public void setRealmService(RealmService realm) {
        super.setRealmService(realmService);
      }
    };
    RegistryService registryService = null;
    try {
      registryService = registryComponent.buildRegistryService();
      if (regRepo == null) {
        regRepo = new RegistryRepository((EmbeddedRegistryService) registryService);
      }
    } catch (RegistryException e) {
      throw new Exception("Unable to build registry service" + e.getMessage());
    }
    return regRepo;
  }
  return null;
}
origin: org.wso2.carbon.devicemgt-plugins/org.wso2.carbon.device.mgt.mobile.impl

@Override
public TenantConfiguration getConfiguration() throws DeviceManagementException {
  Resource resource;
  try {
    String androidRegPath =
        MobileDeviceManagementUtil.getPlatformConfigPath(DeviceManagementConstants.
            MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID);
    resource = MobileDeviceManagementUtil.getRegistryResource(androidRegPath);
    if (resource != null) {
      JAXBContext context = JAXBContext.newInstance(TenantConfiguration.class);
      Unmarshaller unmarshaller = context.createUnmarshaller();
      return (TenantConfiguration) unmarshaller.unmarshal(
          new StringReader(new String((byte[]) resource.getContent(), Charset.
              forName(MobilePluginConstants.CHARSET_UTF8))));
    }
    return null;
  } catch (MobileDeviceMgtPluginException e) {
    throw new DeviceManagementException(
        "Error occurred while retrieving the Registry instance : " + e.getMessage(), e);
  } catch (JAXBException e) {
    throw new DeviceManagementException(
        "Error occurred while parsing the Android configuration : " + e.getMessage(), e);
  } catch (RegistryException e) {
    throw new DeviceManagementException(
        "Error occurred while retrieving the Registry resource of Android Configuration : " + e.getMessage(), e);
  }
}
origin: org.wso2.carbon.devicemgt-plugins/org.wso2.carbon.device.mgt.mobile.impl

@Override
public TenantConfiguration getConfiguration() throws DeviceManagementException {
  Resource resource;
  try {
    String windowsTenantRegistryPath =
        MobileDeviceManagementUtil.getPlatformConfigPath(DeviceManagementConstants.
            MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS);
    resource = MobileDeviceManagementUtil.getRegistryResource(windowsTenantRegistryPath);
    if (resource != null) {
      JAXBContext context = JAXBContext.newInstance(TenantConfiguration.class);
      Unmarshaller unmarshaller = context.createUnmarshaller();
      return (TenantConfiguration) unmarshaller.unmarshal(
          new StringReader(new String((byte[]) resource.getContent(), Charset.
              forName(MobilePluginConstants.CHARSET_UTF8))));
    }
    return null;
  } catch (MobileDeviceMgtPluginException e) {
    throw new DeviceManagementException(
        "Error occurred while retrieving the Registry instance : " + e.getMessage(), e);
  } catch (JAXBException e) {
    throw new DeviceManagementException(
        "Error occurred while parsing the Windows configuration : " + e.getMessage(), e);
  } catch (RegistryException e) {
    throw new DeviceManagementException(
        "Error occurred while retrieving the Registry resource of Windows configuration : " + e.getMessage(), e);
  }
}
origin: org.wso2.carbon.devicemgt-plugins/org.wso2.carbon.device.mgt.mobile.impl

} catch (RegistryException e) {
  throw new DeviceManagementException(
      "Error occurred while persisting the Registry resource of Windows configuration : " + e.getMessage(), e);
} catch (JAXBException e) {
  throw new DeviceManagementException(
origin: org.wso2.carbon.devicemgt-plugins/org.wso2.carbon.device.mgt.mobile.impl

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);
  }
}
origin: org.wso2.carbon.devicemgt-plugins/org.wso2.carbon.device.mgt.mobile.impl

} catch (RegistryException e) {
  throw new DeviceManagementException(
      "Error occurred while persisting the Registry resource of Android Configuration : " + e.getMessage(), e);
} catch (JAXBException e) {
  throw new DeviceManagementException(
origin: org.wso2.carbon.devicemgt-plugins/org.wso2.carbon.device.mgt.mobile.impl

public static Registry getConfigurationRegistry() throws MobileDeviceMgtPluginException {
  try {
    int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
    return MobileDeviceManagementDataHolder.getInstance().getRegistryService()
                           .getConfigSystemRegistry(
                               tenantId);
  } catch (RegistryException e) {
    throw new MobileDeviceMgtPluginException(
        "Error in retrieving conf registry instance: " +
        e.getMessage(), e);
  }
}
origin: org.wso2.carbon.devicemgt-plugins/org.wso2.carbon.device.mgt.mobile.impl

public static boolean createRegistryCollection(String path)
    throws MobileDeviceMgtPluginException {
  try {
    if (! MobileDeviceManagementUtil.getConfigurationRegistry().resourceExists(path)) {
      Resource resource = MobileDeviceManagementUtil.getConfigurationRegistry().newCollection();
      MobileDeviceManagementUtil.getConfigurationRegistry().beginTransaction();
      MobileDeviceManagementUtil.getConfigurationRegistry().put(path, resource);
      MobileDeviceManagementUtil.getConfigurationRegistry().commitTransaction();
    }
    return true;
  } catch (MobileDeviceMgtPluginException e) {
    throw new MobileDeviceMgtPluginException(
        "Error occurred while creating a registry collection : " +
        e.getMessage(), e);
  } catch (RegistryException e) {
    throw new MobileDeviceMgtPluginException(
        "Error occurred while creating a registry collection : " +
        e.getMessage(), e);
  }
}
origin: org.wso2.carbon.identity/org.wso2.carbon.user.mgt

String msg = "Error deleting user from registry " + e.getMessage();
log.error(msg, e);
throw new UserAdminException(msg, e);
origin: wso2/carbon-identity-framework

String msg = "Error deleting user from registry " + e.getMessage();
log.error(msg, e);
throw new UserAdminException(msg, e);
origin: org.wso2.carbon.devicemgt-plugins/org.wso2.carbon.device.mgt.mobile.impl

public static boolean putRegistryResource(String path,
                     Resource resource)
    throws MobileDeviceMgtPluginException {
  boolean status;
  try {
    MobileDeviceManagementUtil.getConfigurationRegistry().beginTransaction();
    MobileDeviceManagementUtil.getConfigurationRegistry().put(path, resource);
    MobileDeviceManagementUtil.getConfigurationRegistry().commitTransaction();
    status = true;
  } catch (RegistryException e) {
    throw new MobileDeviceMgtPluginException(
        "Error occurred while persisting registry resource : " +
        e.getMessage(), e);
  }
  return status;
}
org.wso2.carbon.registry.apiRegistryExceptiongetMessage

Popular methods of RegistryException

  • <init>

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (ScheduledExecutorService)
  • notifyDataSetChanged (ArrayAdapter)
  • getApplicationContext (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JOptionPane (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now