* ============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.tools;
import java.util.Map;
import java.util.UUID;
+/**
+ * <b>CreateUUID</b> is an issue resolver that is responsible
+ * for looking to check if the property that is missing has
+ * the metadata autoGenerateUuid associated to it in the oxm
+ * As if that is found, then it will automatically resolve the
+ * issue by generating a uuid and setting that value to that property
+ *
+ * If this is needed for a specific property that you need
+ * then you need to add the following xml code in the oxm
+ *
+ * <pre>
+ * {@code
+ * <xml-element java-attribute="myElementProp" name="my-element-prop" type="java.lang.String">
+ * <xml-properties>
+ * <xml-property name="autoGenerateUuid" value="true" />
+ * </xml-properties>
+ * }
+ * </pre>
+ */
public class CreateUUID implements IssueResolver {
/**
- * {@inheritDoc}
+ * Resolves the issue by checking if the issue type is missing key prop
+ * and if it is it will retrieve the introspector associated with the issue
+ * then gets the metadata associated to that specific property
+ * and if it contains the auto generate meta property and if it does
+ * then it will fix it by setting that property value to generated uuid
+ *
+ * @param issue the issue with the details associated to the problem
+ * @return true if the issue has been successfully resolved
+ * false otherwise
*/
@Override
public boolean resolveIssue(Issue issue) {