* ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
package org.onap.aai.introspection;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
import com.google.common.base.CaseFormat;
import com.google.common.base.Joiner;
import com.google.common.collect.Multimap;
import java.util.*;
public class PojoStrategy extends Introspector {
+ private static final EELFLogger LOGGER2 = EELFManager.getInstance().getLogger(PojoStrategy.class);
private Object internalObject = null;
private PojoInjestor injestor = null;
marshaller = jaxbContext.createMarshaller();
unmarshaller = jaxbContext.createUnmarshaller();
} catch (JAXBException e) {
-
+ LOGGER2.error(e.getMessage(),e);
}
}
try {
return this.internalObject.getClass().getDeclaredMethod(getMethodName).invoke(this.internalObject);
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
+ LOGGER2.error(e.getMessage(),e);
return null;
}
}
try {
field = this.internalObject.getClass().getDeclaredField(CaseFormat.LOWER_HYPHEN.to(CaseFormat.LOWER_CAMEL, name));
} catch (NoSuchFieldException | SecurityException e) {
-
+ LOGGER2.error(e.getMessage(),e);
return null;
}
}
} catch (Exception e) {
+ LOGGER2.error(e.getMessage(),e);
return null;
}
}
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, properties.getFormatted());
marshaller.marshal(this.internalObject, result);
} catch (JAXBException e) {
- //e.printStackTrace();
+ LOGGER2.error(e.getMessage(),e);
}
return result.toString();
result = unmarshaller.unmarshal(new StreamSource(new StringReader(this.marshal(true))), this.internalObject.getClass()).getValue();
} catch (JAXBException e) {
- // TODO Auto-generated catch block
- //e.printStackTrace();
+ LOGGER2.error(e.getMessage(),e);
}
result = IntrospectorFactory.newInstance(getModelType(), result);
return result;
}
}
} catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) {
- // TODO Auto-generated catch block
+ LOGGER2.error(e.getMessage(),e);
}
return result;
try {
value = (String)this.classLevelMetadata.getClass().getMethod(methodName).invoke(classLevelMetadata);
} catch (IllegalArgumentException | IllegalAccessException | SecurityException | InvocationTargetException | NoSuchMethodException e) {
- //TODO
+ LOGGER2.error(e.getMessage(),e);
}
return value;