use of org.wso2.carbon.core.util.CryptoException in project carbon-business-process by wso2.
the class AnalyticsServerProfileBuilder method parseAnalyticsProfile.
/**
* Parse Analytics Profile file content and adding content to AnalyticsProfile instance.
*
* @param content Content of Analytics Profile
* @param analyticsServerProfile AnalyticsServerProfile instance
*/
private void parseAnalyticsProfile(String content, AnalyticsServerProfile analyticsServerProfile) {
try {
OMElement resourceElement = new StAXOMBuilder(new ByteArrayInputStream(content.getBytes())).getDocumentElement();
processAnalyticsServerProfileName(resourceElement, analyticsServerProfile);
processCredentialElement(resourceElement, analyticsServerProfile);
processConnectionElement(resourceElement, analyticsServerProfile);
processStreamsElement(resourceElement, analyticsServerProfile);
} catch (XMLStreamException e) {
String errMsg = "Error occurred while creating the OMElement out of Analytics server " + "profile: " + profileLocation;
handleError(errMsg, e);
} catch (CryptoException e) {
String errMsg = "Error occurred while decrypting password in Analytics server profile: " + profileLocation;
handleError(errMsg, e);
}
}
Aggregations