added logs when appending body to genericResources
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/rmp-common-library@84985 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
98a422c6cf
commit
5b89e5423a
|
@ -227,6 +227,9 @@ public class GenericResourceManager extends AbstractResourceManager {
|
||||||
* @throws ParserConfigurationException
|
* @throws ParserConfigurationException
|
||||||
*/
|
*/
|
||||||
public static void appendXmlFragment(Profile profile, String fragment) throws IOException, ParserConfigurationException {
|
public static void appendXmlFragment(Profile profile, String fragment) throws IOException, ParserConfigurationException {
|
||||||
|
|
||||||
|
ServerConsole.debug(LOG_PREFIX, "Appending to <Body> " + fragment);
|
||||||
|
|
||||||
DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
|
DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
|
||||||
Element elem = profile.newBody();
|
Element elem = profile.newBody();
|
||||||
Node fragmentNode;
|
Node fragmentNode;
|
||||||
|
@ -236,7 +239,7 @@ public class GenericResourceManager extends AbstractResourceManager {
|
||||||
elem.appendChild(fragmentNode);
|
elem.appendChild(fragmentNode);
|
||||||
} catch (SAXException e) {
|
} catch (SAXException e) {
|
||||||
//in case no xml is entered, just text
|
//in case no xml is entered, just text
|
||||||
System.out.println("to append: " + fragment);
|
ServerConsole.warn("no valid xml appending this:" + fragment);
|
||||||
profile.newBody(fragment);
|
profile.newBody(fragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue