-This source repository contains OpenECOMP common code, which is shared by 'policy-drools-pdp' and 'policy-engine'. The settings file only needs to support the standard Maven repositories (e.g. central = http://repo1.maven.org/maven2/), and any proxy settings needed in your environment.
+This source repository contains ONAP common code, which is shared by 'policy-drools-pdp' and 'policy-engine'. The settings file only needs to support the standard Maven repositories (e.g. central = http://repo1.maven.org/maven2/), and any proxy settings needed in your environment.
To build it using Maven 3, run: mvn clean install
###
# ============LICENSE_START=======================================================
-# ECOMP-Logging
+# ONAP-Logging
# ================================================================================
# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
# ================================================================================
###
# ============LICENSE_START=======================================================
-# ECOMP-Logging
+# ONAP-Logging
# ================================================================================
# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
# ================================================================================
<!--
============LICENSE_START=======================================================
- ECOMP Policy Engine - Common Modules
+ ONAP Policy Engine - Common Modules
================================================================================
Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
================================================================================
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.openecomp.policy.common</groupId>
+ <groupId>org.onap.policy.common</groupId>
<artifactId>common-modules</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
- <artifactId>ECOMP-Logging</artifactId>
- <description>ECOMP Logging Framework</description>
+ <artifactId>ONAP-Logging</artifactId>
+ <description>ONAP Logging Framework</description>
<packaging>jar</packaging>
<dependencies>
<!-- We need to include the dependency of the project so that its include
in classpath when running plugin -->
<dependency>
- <groupId>org.openecomp.policy.common</groupId>
- <artifactId>ECOMP-Logging</artifactId>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>ONAP-Logging</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<outputFile>messages.html</outputFile>
<resources>
<resource>
- <messageClass>org.openecomp.policy.common.logging.eelf.MessageCodes</messageClass>
+ <messageClass>org.onap.policy.common.logging.eelf.MessageCodes</messageClass>
This needs to be replaced with your Enum class name .which
implements EELFResolvableErrorEnum and have your defined error
codes.
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging;
+package org.onap.policy.common.logging;
-//import static org.openecomp.policy.common.logging.eelf.Configuration.TRANSACTION_BEGIN_TIME_STAMP;
-//import static org.openecomp.policy.common.logging.eelf.Configuration.TRANSACTION_ELAPSED_TIME;
-//import static org.openecomp.policy.common.logging.eelf.Configuration.TRANSACTION_END_TIME_STAMP;
+//import static org.onap.policy.common.logging.eelf.Configuration.TRANSACTION_BEGIN_TIME_STAMP;
+//import static org.onap.policy.common.logging.eelf.Configuration.TRANSACTION_ELAPSED_TIME;
+//import static org.onap.policy.common.logging.eelf.Configuration.TRANSACTION_END_TIME_STAMP;
import java.text.SimpleDateFormat;
import java.time.Duration;
import java.util.Date;
import org.slf4j.MDC;
-import org.openecomp.policy.common.logging.nsa.LoggingContextFactory;
-import org.openecomp.policy.common.logging.nsa.SharedLoggingContext;
+import org.onap.policy.common.logging.nsa.LoggingContextFactory;
+import org.onap.policy.common.logging.nsa.SharedLoggingContext;
/**
- * A facade over the org.openecomp.policy.common.logging.nsa.SharedLoggingContext interface/implementation that makes it
+ * A facade over the org.onap.policy.common.logging.nsa.SharedLoggingContext interface/implementation that makes it
* more convenient to use. SharedLoggingContext builds on the SLF4J/log4j Mapped Diagnostic Context (MDC)
* feature, which provides a hashmap-based context for data items that need to be logged, where the
* hashmap is kept in ThreadLocal storage. The data items can be referenced in the log4j configuration
*
* The notable functionality the SharedLoggingContext adds over MDC is that it maintains its own copy
* of the MDC data items in a hashmap (not in ThreadLocal storage), which allows more control of the data.
- * The ECOMPLoggingContext constructor that takes another ECOMPLoggingContext object as a parameter makes
+ * The ONAPLoggingContext constructor that takes another ONAPLoggingContext object as a parameter makes
* use of this feature. For example if there is a thread pulling requests from a queue for processing, it
* can keep a base logging context with data that is common to all requests, and for each request, create a
* new logging context with that base context as a parameter; this will create a new logging context with
* those initial values and none of the request-specific values from the previous request such as a request ID.
* The setter methods in this class set corresponding items in the SharedLoggingContext/MDC hashmaps.
- * These items correspond to the fields defined in the "ECOMP platform application logging guidelines"
+ * These items correspond to the fields defined in the "ONAP platform application logging guidelines"
* document. In addition, there is a pair of convenience functions, transactionStarted() and
* transactionEnded(), that can be called at the beginning and end of transaction processing to calculate
* the duration of the transaction and record that value in the "timer" item.
*
*/
-public class ECOMPLoggingContext {
+public class ONAPLoggingContext {
private static final String REQUEST_ID = "requestId";
private static final String SERVICE_INSTANCE_ID = "serviceInstanceId";
private Instant metricStartTime;
/**
- * Create a new ECOMPLoggingContext with no base context.
+ * Create a new ONAPLoggingContext with no base context.
*/
- public ECOMPLoggingContext() {
+ public ONAPLoggingContext() {
context = (SharedLoggingContext) loggingContextBuilder.forSharing().build();
}
/**
- * Create a new ECOMPLoggingContext initially populated with the values
+ * Create a new ONAPLoggingContext initially populated with the values
* in the given base context. This can be used for example in a servlet
* where each incoming request may be processed by a separate thread, but
* there may be some logging data items that will be unchanging and common
* base context to populate the common data in the new one.
* @param baseContext
*/
- public ECOMPLoggingContext(ECOMPLoggingContext baseContext) {
+ public ONAPLoggingContext(ONAPLoggingContext baseContext) {
context = (SharedLoggingContext) loggingContextBuilder.forSharing().build();
// a logging context could be passed into a thread (e.g. one that is servicing a queue)
// that already had a logging context established, so the MDC hashmap could contain
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging;
+package org.onap.policy.common.logging;
import javax.servlet.http.HttpServletRequest;
-public class ECOMPLoggingUtils {
+public class ONAPLoggingUtils {
- public static ECOMPLoggingContext getLoggingContextForRequest(HttpServletRequest request,
- ECOMPLoggingContext baseContext)
+ public static ONAPLoggingContext getLoggingContextForRequest(HttpServletRequest request,
+ ONAPLoggingContext baseContext)
{
- ECOMPLoggingContext requestContext = new ECOMPLoggingContext(baseContext);
+ ONAPLoggingContext requestContext = new ONAPLoggingContext(baseContext);
if (request.getLocalAddr() != null) { // may be null in junit tests
requestContext.setServerIPAddress(request.getLocalAddr());
}
requestContext.setClientIPAddress(request.getRemoteAddr());
}
// RequestID
+ // This needs to be renamed to ONAP when the other components in ONAP
+ // rename to this.
String requestId = request.getHeader("X-ECOMP-RequestID");
if (requestId != null && requestId.trim().length() > 0) {
requestContext.setRequestID(requestId);
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.eelf;
+package org.onap.policy.common.logging.eelf;
public interface Configuration extends com.att.eelf.configuration.Configuration{
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.eelf;
+package org.onap.policy.common.logging.eelf;
import java.util.concurrent.ConcurrentHashMap;
static {
- mdcMap.put(org.openecomp.policy.common.logging.eelf.Configuration.MDC_REMOTE_HOST, "");
- mdcMap.put(org.openecomp.policy.common.logging.eelf.Configuration.MDC_SERVICE_NAME, "Policy.droolsPdp");
- mdcMap.put(org.openecomp.policy.common.logging.eelf.Configuration.MDC_SERVICE_INSTANCE_ID, "Policy.droolsPdp.event");
- mdcMap.put(org.openecomp.policy.common.logging.eelf.Configuration.MDC_INSTANCE_UUID, "");
- mdcMap.put(org.openecomp.policy.common.logging.eelf.Configuration.MDC_ALERT_SEVERITY, "");
- mdcMap.put(org.openecomp.policy.common.logging.eelf.Configuration.PARTNER_NAME, "N/A");
- mdcMap.put(org.openecomp.policy.common.logging.eelf.Configuration.STATUS_CODE, "N/A");
- mdcMap.put(org.openecomp.policy.common.logging.eelf.Configuration.RESPONSE_CODE, "N/A");
- mdcMap.put(org.openecomp.policy.common.logging.eelf.Configuration.RESPONSE_DESCRIPTION, "N/A");
+ mdcMap.put(org.onap.policy.common.logging.eelf.Configuration.MDC_REMOTE_HOST, "");
+ mdcMap.put(org.onap.policy.common.logging.eelf.Configuration.MDC_SERVICE_NAME, "Policy.droolsPdp");
+ mdcMap.put(org.onap.policy.common.logging.eelf.Configuration.MDC_SERVICE_INSTANCE_ID, "Policy.droolsPdp.event");
+ mdcMap.put(org.onap.policy.common.logging.eelf.Configuration.MDC_INSTANCE_UUID, "");
+ mdcMap.put(org.onap.policy.common.logging.eelf.Configuration.MDC_ALERT_SEVERITY, "");
+ mdcMap.put(org.onap.policy.common.logging.eelf.Configuration.PARTNER_NAME, "N/A");
+ mdcMap.put(org.onap.policy.common.logging.eelf.Configuration.STATUS_CODE, "N/A");
+ mdcMap.put(org.onap.policy.common.logging.eelf.Configuration.RESPONSE_CODE, "N/A");
+ mdcMap.put(org.onap.policy.common.logging.eelf.Configuration.RESPONSE_DESCRIPTION, "N/A");
}
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.eelf;
+package org.onap.policy.common.logging.eelf;
import java.util.HashMap;
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.eelf;
+package org.onap.policy.common.logging.eelf;
import java.time.Instant;
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.eelf;
+package org.onap.policy.common.logging.eelf;
import java.util.concurrent.ConcurrentHashMap;
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.eelf;
+package org.onap.policy.common.logging.eelf;
import java.time.Duration;
import java.time.Instant;
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.eelf;
+package org.onap.policy.common.logging.eelf;
import java.util.concurrent.ConcurrentHashMap;
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.eelf;
+package org.onap.policy.common.logging.eelf;
import com.att.eelf.i18n.EELFResolvableErrorEnum;
import com.att.eelf.i18n.EELFResourceManager;
* Here this application loads messages from three bundles
*/
static {
- EELFResourceManager.loadMessageBundle("org/openecomp/policy/common/logging/eelf/Resources");
+ EELFResourceManager.loadMessageBundle("org.onap.policy/common/logging/eelf/Resources");
String id = EELFResourceManager.getIdentifier(RULE_AUDIT_EXEC_INFO);
String value = EELFResourceManager.getMessage(RULE_AUDIT_EXEC_INFO);
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.eelf;
+package org.onap.policy.common.logging.eelf;
import org.slf4j.MDC;
-import static org.openecomp.policy.common.logging.eelf.Configuration.*;
+import static org.onap.policy.common.logging.eelf.Configuration.*;
-import org.openecomp.policy.common.logging.flexlogger.LoggerType;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
+import org.onap.policy.common.logging.flexlogger.LoggerType;
+import org.onap.policy.common.logging.eelf.PolicyLogger;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFLogger.Level;
import com.att.eelf.configuration.EELFManager;
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.flexlogger;
+package org.onap.policy.common.logging.flexlogger;
import java.io.Serializable;
import java.util.UUID;
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.logging.eelf.MessageCodes;
+import org.onap.policy.common.logging.eelf.PolicyLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
import com.att.eelf.configuration.EELFLogger.Level;
/**
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.flexlogger;
+package org.onap.policy.common.logging.flexlogger;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-import org.openecomp.policy.common.logging.flexlogger.PropertyUtil.Listener;
+import org.onap.policy.common.logging.eelf.PolicyLogger;
+import org.onap.policy.common.logging.flexlogger.PropertyUtil.Listener;
/**
*
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.flexlogger;
+package org.onap.policy.common.logging.flexlogger;
import java.util.UUID;
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.flexlogger;
+package org.onap.policy.common.logging.flexlogger;
import java.util.UUID;
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
+import org.onap.policy.common.logging.eelf.MessageCodes;
/**
*
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.flexlogger;
+package org.onap.policy.common.logging.flexlogger;
import java.io.IOException;
import java.io.ObjectInputStream;
import org.apache.log4j.Logger;
import org.apache.log4j.Priority;
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
+import org.onap.policy.common.logging.eelf.MessageCodes;
+import org.onap.policy.common.logging.eelf.PolicyLogger;
import com.att.eelf.configuration.EELFLogger.Level;
/**
* Logger4J implements all the methods of interface Logger by calling org.apache.log4j.Logger
*
*/
-public class Logger4J implements org.openecomp.policy.common.logging.flexlogger.Logger, Serializable {
+public class Logger4J implements org.onap.policy.common.logging.flexlogger.Logger, Serializable {
/**
*
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.flexlogger;
+package org.onap.policy.common.logging.flexlogger;
/**
*
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.flexlogger;
+package org.onap.policy.common.logging.flexlogger;
import java.io.File;
import java.io.FileInputStream;
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.flexlogger;
+package org.onap.policy.common.logging.flexlogger;
import java.io.Serializable;
import java.util.UUID;
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
+import org.onap.policy.common.logging.eelf.MessageCodes;
+import org.onap.policy.common.logging.eelf.PolicyLogger;
import com.att.eelf.configuration.EELFLogger.Level;
/**
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.nsa;
+package org.onap.policy.common.logging.nsa;
/**
* An interface for providing data into the underlying logging context. Systems should use
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.nsa;
+package org.onap.policy.common.logging.nsa;
-import org.openecomp.policy.common.logging.nsa.impl.SharedContext;
-import org.openecomp.policy.common.logging.nsa.impl.Slf4jLoggingContext;
+import org.onap.policy.common.logging.nsa.impl.SharedContext;
+import org.onap.policy.common.logging.nsa.impl.Slf4jLoggingContext;
/**
* A factory for setting up a LoggingContext
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.nsa;
+package org.onap.policy.common.logging.nsa;
/**
* A logging context must be thread-specific. Contexts that implement SharedLoggingContext
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.nsa.impl;
+package org.onap.policy.common.logging.nsa.impl;
import java.util.HashMap;
import java.util.Map.Entry;
-import org.openecomp.policy.common.logging.nsa.LoggingContext;
-import org.openecomp.policy.common.logging.nsa.SharedLoggingContext;
+import org.onap.policy.common.logging.nsa.LoggingContext;
+import org.onap.policy.common.logging.nsa.SharedLoggingContext;
/**
* A shared logging context for SLF4J
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.logging.nsa.impl;
+package org.onap.policy.common.logging.nsa.impl;
import org.slf4j.MDC;
-import org.openecomp.policy.common.logging.nsa.LoggingContext;
+import org.onap.policy.common.logging.nsa.LoggingContext;
/**
* A logging context for SLF4J
/*-
* ============LICENSE_START=======================================================
- * ECOMP-Logging
+ * ONAP-Logging
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* implementation based on the SLF4J/Log4j "MDC" (Mapped Diagnostic Context) feature.
*
*/
-package org.openecomp.policy.common.logging.nsa;
+package org.onap.policy.common.logging.nsa;
###
# ============LICENSE_START=======================================================
-# ECOMP-Logging
+# ONAP-Logging
# ================================================================================
# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
# ================================================================================
<!--
============LICENSE_START=======================================================
- ECOMP Policy Engine - Common Modules
+ ONAP Policy Engine - Common Modules
================================================================================
Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
================================================================================
<packaging>jar</packaging>
<parent>
- <groupId>org.openecomp.policy.common</groupId>
+ <groupId>org.onap.policy.common</groupId>
<artifactId>common-modules</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<version>3.4</version>
</dependency>
<dependency>
- <groupId>org.openecomp.policy.common</groupId>
- <artifactId>ECOMP-Logging</artifactId>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>ONAP-Logging</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia;
+package org.onap.policy.common.ia;
import java.util.ArrayList;
import java.util.Collections;
//import org.apache.log4j.Logger;
-import org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity;
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.ia.jpa.IntegrityAuditEntity;
+import org.onap.policy.common.logging.eelf.MessageCodes;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/**
* AuditThread is the main thread for the IntegrityAudit
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia;
+package org.onap.policy.common.ia;
import java.io.Serializable;
import java.util.Arrays;
-import org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity;
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.ia.jpa.IntegrityAuditEntity;
+import org.onap.policy.common.logging.eelf.MessageCodes;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/**
* class DbAudit does actual auditing of DB tables.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia;
+package org.onap.policy.common.ia;
public class DbAuditException extends Exception{
private static final long serialVersionUID = 1L;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia;
+package org.onap.policy.common.ia;
import java.util.Date;
import java.util.HashMap;
//import org.apache.log4j.Logger;
-import org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.ia.jpa.IntegrityAuditEntity;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/**
* class DbDAO provides the inteface to the DBs for the purpose of audits.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia;
+package org.onap.policy.common.ia;
public class DbDaoTransactionException extends Exception{
private static final long serialVersionUID = 1L;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia;
+package org.onap.policy.common.ia;
import java.util.Properties;
//import org.apache.log4j.Logger;
-import org.openecomp.policy.common.ia.IntegrityAuditProperties.NodeTypeEnum;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.ia.IntegrityAuditProperties.NodeTypeEnum;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/**
* class IntegrityAudit
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia;
+package org.onap.policy.common.ia;
public class IntegrityAuditProperties {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia;
+package org.onap.policy.common.ia;
public class IntegrityAuditPropertiesException extends Exception{
private static final long serialVersionUID = 1L;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia.jpa;
+package org.onap.policy.common.ia.jpa;
import java.io.Serializable;
import java.util.Date;
<persistence-unit name="testPU" transaction-type="RESOURCE_LOCAL">
<!-- Limited use for generating the DB and schema files for iatest DB - uses eclipselink -->
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
- <class>org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity</class>
- <class>org.openecomp.policy.common.ia.test.jpa.IaTestEntity</class>
+ <class>org.onap.policy.common.ia.jpa.IntegrityAuditEntity</class>
+ <class>org.onap.policy.common.ia.test.jpa.IaTestEntity</class>
<shared-cache-mode>NONE</shared-cache-mode>
<properties>
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
<persistence-unit name="integrityAuditPU" transaction-type="RESOURCE_LOCAL">
<!-- For operational use -->
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
- <class>org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity</class>
+ <class>org.onap.policy.common.ia.jpa.IntegrityAuditEntity</class>
<shared-cache-mode>NONE</shared-cache-mode>
<properties>
<!-- none -->
<property name="debugDir" value="logs" />
<!-- specify the component name
- <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
+ <ONAP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
<property name="componentName" value="common-modules"></property>
<property name="subComponentName" value="integrity-audit"></property>
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia.test;
+package org.onap.policy.common.ia.test;
import static org.junit.Assert.*;
import org.junit.Ignore;
import org.junit.Test;
-import org.openecomp.policy.common.ia.AuditThread;
-import org.openecomp.policy.common.ia.IntegrityAudit;
-import org.openecomp.policy.common.ia.IntegrityAuditProperties;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.ia.AuditThread;
+import org.onap.policy.common.ia.IntegrityAudit;
+import org.onap.policy.common.ia.IntegrityAuditProperties;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/*
* All JUnits are designed to run in the local development environment
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia.test;
+package org.onap.policy.common.ia.test;
import static org.junit.Assert.*;
import org.junit.Ignore;
import org.junit.Test;
-import org.openecomp.policy.common.ia.DbAudit;
-import org.openecomp.policy.common.ia.DbDAO;
-import org.openecomp.policy.common.ia.IntegrityAudit;
-import org.openecomp.policy.common.ia.IntegrityAuditProperties;
-import org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity;
-import org.openecomp.policy.common.ia.test.jpa.IaTestEntity;
-import org.openecomp.policy.common.ia.test.jpa.PersonTest;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.ia.DbAudit;
+import org.onap.policy.common.ia.DbDAO;
+import org.onap.policy.common.ia.IntegrityAudit;
+import org.onap.policy.common.ia.IntegrityAuditProperties;
+import org.onap.policy.common.ia.jpa.IntegrityAuditEntity;
+import org.onap.policy.common.ia.test.jpa.IaTestEntity;
+import org.onap.policy.common.ia.test.jpa.PersonTest;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/*
* All JUnits are designed to run in the local development environment
//There is only one entry IntegrityAuditEntity, but we will check anyway
HashSet<String> classNameSet = dbDAO.getPersistenceClassNames();
for(String c : classNameSet){
- if (c.equals("org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity")){
+ if (c.equals("org.onap.policy.common.ia.jpa.IntegrityAuditEntity")){
className = c;
}
}
HashSet<String> classNameSet = dbDAO.getPersistenceClassNames();
HashSet<Object> mismatchResult = new HashSet<Object>();
for(String c : classNameSet) {
- if (c.equals("org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity")){
+ if (c.equals("org.onap.policy.common.ia.jpa.IntegrityAuditEntity")){
String resourceName1 = resourceName;
String resourceName2 = resourceName;
*/
assertTrue(mismatchResult.isEmpty());
}
- else if (c.equals("org.openecomp.policy.common.ia.test.jpa.IaTestEntity")) {
+ else if (c.equals("org.onap.policy.common.ia.test.jpa.IaTestEntity")) {
IaTestEntity iate = new IaTestEntity();
IaTestEntity iate2 = new IaTestEntity();
IaTestEntity iate3 = new IaTestEntity();
//There is only one entry IntegrityAuditEntity, but we will check anyway
HashSet<String> classNameSet = dbDAO.getPersistenceClassNames();
for(String c : classNameSet){
- if (c.equals("org.openecomp.policy.common.ia.test.jpa.IaTestEntity")){
+ if (c.equals("org.onap.policy.common.ia.test.jpa.IaTestEntity")){
className = c;
}
}
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia.test;
+package org.onap.policy.common.ia.test;
import static org.junit.Assert.*;
import org.junit.Ignore;
import org.junit.Test;
-import org.openecomp.policy.common.ia.DbAudit;
-import org.openecomp.policy.common.ia.DbAuditException;
-import org.openecomp.policy.common.ia.DbDAO;
-import org.openecomp.policy.common.ia.DbDaoTransactionException;
-import org.openecomp.policy.common.ia.IntegrityAudit;
-import org.openecomp.policy.common.ia.IntegrityAuditProperties;
-import org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.ia.DbAudit;
+import org.onap.policy.common.ia.DbAuditException;
+import org.onap.policy.common.ia.DbDAO;
+import org.onap.policy.common.ia.DbDaoTransactionException;
+import org.onap.policy.common.ia.IntegrityAudit;
+import org.onap.policy.common.ia.IntegrityAuditProperties;
+import org.onap.policy.common.ia.jpa.IntegrityAuditEntity;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/*
* All JUnits are designed to run in the local development environment
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia.test;
+package org.onap.policy.common.ia.test;
import static org.junit.Assert.*;
import org.junit.Ignore;
import org.junit.Test;
-import org.openecomp.policy.common.ia.DbDAO;
-import org.openecomp.policy.common.ia.DbDaoTransactionException;
-import org.openecomp.policy.common.ia.IntegrityAuditProperties;
-import org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity;
+import org.onap.policy.common.ia.DbDAO;
+import org.onap.policy.common.ia.DbDaoTransactionException;
+import org.onap.policy.common.ia.IntegrityAuditProperties;
+import org.onap.policy.common.ia.jpa.IntegrityAuditEntity;
/*
* All JUnits are designed to run in the local development environment
try {
// Obtain a hash with the persisted objects
- HashMap<Object, Object> entries = d.getAllMyEntries("org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity");
+ HashMap<Object, Object> entries = d.getAllMyEntries("org.onap.policy.common.ia.jpa.IntegrityAuditEntity");
// Assert there were 3 entries for that class
assertEquals(3, entries.size());
// Obtain all entity keys
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<Object> cq = cb.createQuery();
- Root<?> rootEntry = cq.from(Class.forName("org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity"));
+ Root<?> rootEntry = cq.from(Class.forName("org.onap.policy.common.ia.jpa.IntegrityAuditEntity"));
CriteriaQuery<Object> all = cq.select(rootEntry);
TypedQuery<Object> allQuery = em.createQuery(all);
List<Object> objectList = allQuery.getResultList();
}
// Obtain a hash with the persisted objects
- HashMap<Object, Object> entries = d.getAllMyEntries("org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity", resultSet);
+ HashMap<Object, Object> entries = d.getAllMyEntries("org.onap.policy.common.ia.jpa.IntegrityAuditEntity", resultSet);
// Assert there were 3 entries for that class
assertEquals(3, entries.size());
try {
// Obtain a hash with the persisted objects
- HashMap<Object, Object> entries = d.getAllEntries("integrityAuditPU", properties, "org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity");
+ HashMap<Object, Object> entries = d.getAllEntries("integrityAuditPU", properties, "org.onap.policy.common.ia.jpa.IntegrityAuditEntity");
// Assert there were 3 entries for that class
assertEquals(3, entries.size());
// Obtain all entity keys
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<Object> cq = cb.createQuery();
- Root<?> rootEntry = cq.from(Class.forName("org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity"));
+ Root<?> rootEntry = cq.from(Class.forName("org.onap.policy.common.ia.jpa.IntegrityAuditEntity"));
CriteriaQuery<Object> all = cq.select(rootEntry);
TypedQuery<Object> allQuery = em.createQuery(all);
List<Object> objectList = allQuery.getResultList();
}
// Obtain a hash with the persisted objects
- HashMap<Object, Object> entries = d.getAllEntries("integrityAuditPU", properties, "org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity", resultSet);
+ HashMap<Object, Object> entries = d.getAllEntries("integrityAuditPU", properties, "org.onap.policy.common.ia.jpa.IntegrityAuditEntity", resultSet);
// Assert there were 3 entries for that class
assertEquals(3, entries.size());
try {
// Obtain a hash with the persisted objects
- HashMap<Object, Object> entries = d.getAllEntries(persistenceUnit, properties, "org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity");
+ HashMap<Object, Object> entries = d.getAllEntries(persistenceUnit, properties, "org.onap.policy.common.ia.jpa.IntegrityAuditEntity");
// Assert there were 3 entries for that class
assertEquals(3, entries.size());
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia.test;
+package org.onap.policy.common.ia.test;
import static org.junit.Assert.*;
import org.junit.Ignore;
import org.junit.Test;
-import org.openecomp.policy.common.ia.AuditThread;
-import org.openecomp.policy.common.ia.DbDAO;
-import org.openecomp.policy.common.ia.IntegrityAudit;
-import org.openecomp.policy.common.ia.IntegrityAuditProperties;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.ia.AuditThread;
+import org.onap.policy.common.ia.DbDAO;
+import org.onap.policy.common.ia.IntegrityAudit;
+import org.onap.policy.common.ia.IntegrityAuditProperties;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/*
* All JUnits are designed to run in the local development environment
fstream.close();
/*
- * Test fix for ECOMPD2TD-783: Audit fails to run when application is restarted.
+ * Test fix for ONAPD2TD-783: Audit fails to run when application is restarted.
*/
integrityAudit.startAuditThread();
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia.test.jpa;
+package org.onap.policy.common.ia.test.jpa;
import java.io.Serializable;
import java.util.Date;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.ia.test.jpa;
+package org.onap.policy.common.ia.test.jpa;
import java.io.Serializable;
<property name="debugDir" value="testingLogs" />
<!-- specify the component name
- <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
+ <ONAP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
<property name="componentName" value="common-modules"></property>
<property name="subComponentName" value="integrity-audit"></property>
<!--
============LICENSE_START=======================================================
- ECOMP Policy Engine - Common Modules
+ ONAP Policy Engine - Common Modules
================================================================================
Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
================================================================================
<packaging>jar</packaging>
<parent>
- <groupId>org.openecomp.policy.common</groupId>
+ <groupId>org.onap.policy.common</groupId>
<artifactId>common-modules</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<version>[1.4.186,)</version>
</dependency>
<dependency>
- <groupId>org.openecomp.policy.common</groupId>
- <artifactId>ECOMP-Logging</artifactId>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>ONAP-Logging</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im;
+package org.onap.policy.common.im;
public class AdministrativeStateException extends Exception{
private static final long serialVersionUID = 1L;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im;
+package org.onap.policy.common.im;
public class ForwardProgressException extends Exception{
private static final long serialVersionUID = 1L;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im;
+package org.onap.policy.common.im;
import java.net.InetAddress;
import java.util.ArrayList;
import javax.persistence.Persistence;
import javax.persistence.Query;
-import org.openecomp.policy.common.im.jpa.ForwardProgressEntity;
-import org.openecomp.policy.common.im.jpa.ResourceRegistrationEntity;
-import org.openecomp.policy.common.im.jpa.StateManagementEntity;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.im.jpa.ForwardProgressEntity;
+import org.onap.policy.common.im.jpa.ResourceRegistrationEntity;
+import org.onap.policy.common.im.jpa.StateManagementEntity;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
//import org.apache.log4j.Logger;
-import org.openecomp.policy.common.im.jmx.ComponentAdmin;
-import org.openecomp.policy.common.im.jmx.ComponentAdminMBean;
-import org.openecomp.policy.common.im.jmx.JmxAgentConnection;
+import org.onap.policy.common.im.jmx.ComponentAdmin;
+import org.onap.policy.common.im.jmx.ComponentAdminMBean;
+import org.onap.policy.common.im.jmx.JmxAgentConnection;
/**
* IntegrityMonitor
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im;
+package org.onap.policy.common.im;
public class IntegrityMonitorProperties {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im;
+package org.onap.policy.common.im;
public class IntegrityMonitorPropertiesException extends Exception{
private static final long serialVersionUID = 1L;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im;
+package org.onap.policy.common.im;
public class StandbyStatusException extends Exception {
/**
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im;
+package org.onap.policy.common.im;
import java.util.Observable;
import java.util.Observer;
*/
//import org.apache.log4j.Logger;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/**
*
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im;
+package org.onap.policy.common.im;
//import org.apache.log4j.Logger;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
public class StateElement {
private static final Logger logger = FlexLogger.getLogger(StateElement.class);
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im;
+package org.onap.policy.common.im;
import java.util.*;
//import org.apache.log4j.Logger;
-import org.openecomp.policy.common.im.jpa.StateManagementEntity;
-import org.openecomp.policy.common.im.StateElement;
-import org.openecomp.policy.common.im.StandbyStatusException;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.im.jpa.StateManagementEntity;
+import org.onap.policy.common.im.StateElement;
+import org.onap.policy.common.im.StandbyStatusException;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/**
*
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im;
+package org.onap.policy.common.im;
import java.util.*;
//import org.apache.log4j.Logger;
-import org.openecomp.policy.common.im.StateElement;
-import org.openecomp.policy.common.im.StateManagement;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.im.StateElement;
+import org.onap.policy.common.im.StateManagement;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/**
* The StateTransition class coordinates all state transitions.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im.jmx;
+package org.onap.policy.common.im.jmx;
import java.util.ArrayList;
import java.util.Iterator;
import org.apache.log4j.Logger;
-import org.openecomp.policy.common.im.IntegrityMonitor;
-import org.openecomp.policy.common.im.StateManagement;
+import org.onap.policy.common.im.IntegrityMonitor;
+import org.onap.policy.common.im.StateManagement;
/**
* Base class for component MBeans.
throw new NullPointerException("null input");
}
- this.name = "ECOMP_POLICY_COMP:name=" + name;
+ this.name = "ONAP_POLICY_COMP:name=" + name;
this.integrityMonitor = integrityMonitor;
this.stateManager = stateManager;
*/
public static ObjectName getObjectName(String componentName)
throws MalformedObjectNameException {
- return new ObjectName("ECOMP_POLICY_COMP:name=" + componentName);
+ return new ObjectName("ONAP_POLICY_COMP:name=" + componentName);
}
@Override
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im.jmx;
+package org.onap.policy.common.im.jmx;
/**
* Provides operations to test health, lock and unlock components.
/**
*
*/
-package org.openecomp.policy.common.im.jmx;
+package org.onap.policy.common.im.jmx;
import java.io.IOException;
import java.util.HashMap;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im.jpa;
+package org.onap.policy.common.im.jpa;
import java.io.Serializable;
import java.util.Date;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im.jpa;
+package org.onap.policy.common.im.jpa;
import java.io.Serializable;
import java.util.Date;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im.jpa;
+package org.onap.policy.common.im.jpa;
import java.io.Serializable;
import java.util.Date;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im.jpa;
+package org.onap.policy.common.im.jpa;
import java.io.Serializable;
import java.util.Date;
<persistence-unit name="schemaPU" transaction-type="RESOURCE_LOCAL">
<!-- Limited use for generating the DB and schema files for imtest DB - uses eclipselink -->
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
- <class>org.openecomp.policy.common.im.jpa.ImTestEntity</class>
- <class>org.openecomp.policy.common.im.jpa.StateManagementEntity</class>
- <class>org.openecomp.policy.common.im.jpa.ForwardProgressEntity</class>
- <class>org.openecomp.policy.common.im.jpa.ResourceRegistrationEntity</class>
+ <class>org.onap.policy.common.im.jpa.ImTestEntity</class>
+ <class>org.onap.policy.common.im.jpa.StateManagementEntity</class>
+ <class>org.onap.policy.common.im.jpa.ForwardProgressEntity</class>
+ <class>org.onap.policy.common.im.jpa.ResourceRegistrationEntity</class>
<shared-cache-mode>NONE</shared-cache-mode>
<properties>
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
<persistence-unit name="operationalPU" transaction-type="RESOURCE_LOCAL">
<!-- For operational use -->
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
- <class>org.openecomp.policy.common.im.jpa.ImTestEntity</class>
- <class>org.openecomp.policy.common.im.jpa.StateManagementEntity</class>
- <class>org.openecomp.policy.common.im.jpa.ForwardProgressEntity</class>
- <class>org.openecomp.policy.common.im.jpa.ResourceRegistrationEntity</class>
+ <class>org.onap.policy.common.im.jpa.ImTestEntity</class>
+ <class>org.onap.policy.common.im.jpa.StateManagementEntity</class>
+ <class>org.onap.policy.common.im.jpa.ForwardProgressEntity</class>
+ <class>org.onap.policy.common.im.jpa.ResourceRegistrationEntity</class>
<shared-cache-mode>NONE</shared-cache-mode>
<properties>
<!-- none -->
<property name="debugDir" value="logs" />
<!-- specify the component name
- <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
+ <ONAP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
<property name="componentName" value="common-modules"></property>
<property name="subComponentName" value="integrity-monitor"></property>
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im.test;
+package org.onap.policy.common.im.test;
import static org.junit.Assert.*;
-import org.openecomp.policy.common.im.IntegrityMonitor;
-import org.openecomp.policy.common.im.IntegrityMonitorProperties;
-import org.openecomp.policy.common.im.StateManagement;
-import org.openecomp.policy.common.im.jpa.ForwardProgressEntity;
-import org.openecomp.policy.common.im.jpa.ResourceRegistrationEntity;
-import org.openecomp.policy.common.im.jpa.StateManagementEntity;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.im.IntegrityMonitor;
+import org.onap.policy.common.im.IntegrityMonitorProperties;
+import org.onap.policy.common.im.StateManagement;
+import org.onap.policy.common.im.jpa.ForwardProgressEntity;
+import org.onap.policy.common.im.jpa.ResourceRegistrationEntity;
+import org.onap.policy.common.im.jpa.StateManagementEntity;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/*
* All JUnits are designed to run in the local development environment
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im.test;
+package org.onap.policy.common.im.test;
import java.util.List;
import java.util.Properties;
//import org.apache.commons.logging.Log;
//import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.common.im.StateManagement;
-import org.openecomp.policy.common.im.jpa.StateManagementEntity;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.im.StateManagement;
+import org.onap.policy.common.im.jpa.StateManagementEntity;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
public class StateManagementEntityTest {
private static Logger logger = FlexLogger.getLogger(StateManagementEntityTest.class);
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im.test;
+package org.onap.policy.common.im.test;
import java.util.Properties;
import javax.persistence.EntityManagerFactory;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
-import org.openecomp.policy.common.im.StateManagement;
-import org.openecomp.policy.common.im.StandbyStatusException;
-import org.openecomp.policy.common.im.StateChangeNotifier;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.im.StateManagement;
+import org.onap.policy.common.im.StandbyStatusException;
+import org.onap.policy.common.im.StateChangeNotifier;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/*
* All JUnits are designed to run in the local development environment
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.im.test;
+package org.onap.policy.common.im.test;
import java.util.Properties;
import javax.persistence.EntityManagerFactory;
//import org.apache.commons.logging.Log;
//import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.common.im.StateTransition;
-import org.openecomp.policy.common.im.StateElement;
-import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
-import org.openecomp.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.common.im.StateTransition;
+import org.onap.policy.common.im.StateElement;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/*
* All JUnits are designed to run in the local development environment
* where they have write privileges and can execute time-sensitive
<property name="debugDir" value="testingLogs" />
<!-- specify the component name
- <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
+ <ONAP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
<property name="componentName" value="common-modules"></property>
<property name="subComponentName" value="integrity-monitor"></property>
<!--
============LICENSE_START=======================================================
- ECOMP Policy Engine - Drools PDP
+ ONAP Policy Engine - Drools PDP
================================================================================
Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
================================================================================
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.policy.common</groupId>
+ <groupId>org.onap.policy.common</groupId>
<artifactId>common-modules</artifactId>
<version>1.1.0-SNAPSHOT</version>
<repositories>
<repository>
- <id>ecomp-snapshots</id>
- <name>OpenECOMP Snapshots Repository</name>
+ <id>onap-snapshots</id>
+ <name>ONAP Snapshots Repository</name>
<url>${nexusproxy}/${snapshots.path}</url>
</repository>
<repository>
- <id>ecomp-releases</id>
- <name>OpenECOMP Release Repository</name>
+ <id>onap-releases</id>
+ <name>ONAP Release Repository</name>
<url>${nexusproxy}/${releases.path}</url>
</repository>
<repository>
- <id>ecomp-staging</id>
- <name>OpenECOMP Staging Repository</name>
+ <id>onap-staging</id>
+ <name>ONAP Staging Repository</name>
<url>${nexusproxy}/${staging.path}</url>
</repository>
</repositories>
<distributionManagement>
<repository>
- <id>ecomp-releases</id>
- <name>OpenECOMP Release Repository</name>
+ <id>onap-releases</id>
+ <name>ONAP Release Repository</name>
<url>${nexusproxy}/${releases.path}</url>
</repository>
<snapshotRepository>
- <id>ecomp-snapshots</id>
- <name>OpenECOMP Snapshot Repository</name>
+ <id>onap-snapshots</id>
+ <name>ONAP Snapshot Repository</name>
<url>${nexusproxy}/${snapshots.path}</url>
</snapshotRepository>
<site>
- <id>ecomp-site</id>
+ <id>onap-site</id>
<url>dav:${nexusproxy}${sitePath}</url>
</site>
</distributionManagement>
<configuration>
<nexusUrl>${nexusproxy}</nexusUrl>
<stagingProfileId>176c31dfe190a</stagingProfileId>
- <serverId>ecomp-staging</serverId>
+ <serverId>onap-staging</serverId>
</configuration>
</plugin>
<plugin>
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
- ECOMP Policy Engine - Common Modules
+ ONAP Policy Engine - Common Modules
================================================================================
Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
================================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
- ECOMP Policy Engine - Common Modules
+ ONAP Policy Engine - Common Modules
================================================================================
Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
================================================================================
<packaging>jar</packaging>
<parent>
- <groupId>org.openecomp.policy.common</groupId>
+ <groupId>org.onap.policy.common</groupId>
<artifactId>common-modules</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<version>2.1.0</version>
</dependency>
<dependency>
- <groupId>org.openecomp.policy.common</groupId>
+ <groupId>org.onap.policy.common</groupId>
<artifactId>integrity-monitor</artifactId>
<version>${project.version}</version>
</dependency>
dir="${0%/*}"
CLASSPATH="${dir}/site-manager-${project.version}.jar" java \
-DsiteManager.properties=${dir}/siteManager.properties \
- org.openecomp.policy.common.sitemanager.Main "$@" | \
+ org.onap.policy.common.sitemanager.Main "$@" | \
grep -v "^\[EL Info\]"
* ============LICENSE_END=========================================================
*/
-package org.openecomp.policy.common.sitemanager;
+package org.onap.policy.common.sitemanager;
/*
* Site Manager argument list:
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
-import org.openecomp.policy.common.im.jpa.ResourceRegistrationEntity;
-import org.openecomp.policy.common.im.jpa.StateManagementEntity;
-import org.openecomp.policy.common.im.jmx.ComponentAdminMBean;
+import org.onap.policy.common.im.jpa.ResourceRegistrationEntity;
+import org.onap.policy.common.im.jpa.StateManagementEntity;
+import org.onap.policy.common.im.jmx.ComponentAdminMBean;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
connector = JMXConnectorFactory.connect(new JMXServiceURL(jmxUrl));
ComponentAdminMBean admin = JMX.newMXBeanProxy
(connector.getMBeanServerConnection(),
- new ObjectName("ECOMP_POLICY_COMP:name=" + resourceName),
+ new ObjectName("ONAP_POLICY_COMP:name=" + resourceName),
ComponentAdminMBean.class);
if ("lock".equals(arg0))