Fork me on GitHub

Rat (Release Audit Tool) results

The following document contains the results of Rat (Release Audit Tool).

*****************************************************
Summary
-------
Generated at: 2017-03-12T00:11:28-05:00

Notes: 0
Binaries: 0
Archives: 0
Standards: 44

Apache Licensed: 0
Generated Documents: 0

JavaDocs are generated, thus a license header is optional.
Generated files do not require license headers.

44 Unknown Licenses

*****************************************************

Files with unapproved licenses:

  C:/projects/fgsms/fgsms-server/fgsms-ui-common/pom.xml
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/AvailabilityChart.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/GetPluginInformationExt.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/Helper.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/IProxyLoader.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/LogHelper.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/LoginFilter.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachineNetworkData.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeCPU.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeHDFreeSpace.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeHDRates.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeMem.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeNIC.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeThreads.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ManageHelper.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MessageBrokerQueueDepthChart.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/OpStatHelper.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/OpStatWrapper.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/OsAgentStatusHelper.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/PerformanceViewerAvgResTime.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/PerformanceViewerCache.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/PerformanceViewerInvocations.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/PKIHandler.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProcessPerfLogsOverTimeCPU.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProcessPerfLogsOverTimeFileHandles.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProcessPerfLogsOverTimeMem.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProcessPerfLogsOverTimeThreads.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProxyLoader.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProxyLoaderCXF.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/RateStruct.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/SortableStatusList.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/StatusHelper.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogActionBreakDown.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogActionData.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogActionSet.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogData.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogStruct.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogTimeStampStruct.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogViewerData.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/UDDIConfig.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/UddiInquiry.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/UserRequestWrapper.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/test/java/org/miloss/fgsms/presentation/HelperTest.java
  C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/test/java/org/miloss/fgsms/presentation/HttpServletRequestImpl.java

*****************************************************

*****************************************************
  Files with Apache License headers will be marked AL
  Binary files (which do not require any license headers) will be marked B
  Compressed archives will be marked A
  Notices, licenses etc. will be marked N
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/pom.xml
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/AvailabilityChart.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/GetPluginInformationExt.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/Helper.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/IProxyLoader.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/LogHelper.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/LoginFilter.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachineNetworkData.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeCPU.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeHDFreeSpace.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeHDRates.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeMem.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeNIC.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeThreads.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ManageHelper.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MessageBrokerQueueDepthChart.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/OpStatHelper.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/OpStatWrapper.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/OsAgentStatusHelper.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/PerformanceViewerAvgResTime.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/PerformanceViewerCache.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/PerformanceViewerInvocations.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/PKIHandler.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProcessPerfLogsOverTimeCPU.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProcessPerfLogsOverTimeFileHandles.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProcessPerfLogsOverTimeMem.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProcessPerfLogsOverTimeThreads.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProxyLoader.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProxyLoaderCXF.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/RateStruct.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/SortableStatusList.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/StatusHelper.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogActionBreakDown.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogActionData.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogActionSet.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogData.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogStruct.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogTimeStampStruct.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogViewerData.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/UDDIConfig.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/UddiInquiry.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/UserRequestWrapper.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/test/java/org/miloss/fgsms/presentation/HelperTest.java
 !????? C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/test/java/org/miloss/fgsms/presentation/HttpServletRequestImpl.java
 
*****************************************************

 Printing headers for text files without a valid license header...
 
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/pom.xml
=====================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at http://mozilla.org/MPL/2.0/.

 If it is not possible or desirable to put the notice in a particular
 file, then You may include the notice in a location (such as a LICENSE
 file in a relevant directory) where a recipient would be likely to look
 for such a notice.

 

 
 U.S. Government, Department of the Army
 Army Materiel Command
 Research Development Engineering Command
 Communications Electronics Research Development and Engineering Center

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
	  <groupId>org.mil-oss</groupId>
	  <artifactId>fgsms-server</artifactId>
	  <version>7.0.0</version>
     </parent>
     <artifactId>fgsms-ui-common</artifactId>
     <packaging>bundle</packaging>
     <name>fgsms UI Common</name>
     <description>User interface functions</description>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.15</version>
            </plugin>
        </plugins>
    </build>
    <dependencies>
	  <dependency>
	       <groupId>junit</groupId>
	       <artifactId>junit</artifactId>
	       <scope>test</scope>
	  </dependency>
	  <dependency>
	       <groupId>org.mil-oss</groupId>
	       <artifactId>fgsms-common-interfaces</artifactId>
	       <version>${project.parent.version}</version>

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/AvailabilityChart.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Map;
import javax.xml.datatype.DatatypeFactory;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetOperationalStatusLogResponseMsg;
import org.miloss.fgsms.services.interfaces.dataaccessservice.OperationalRecord;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.time.Millisecond;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;
import org.jfree.data.time.TimeSeriesDataItem;

/**
 *
 * @author AO
 */
public class AvailabilityChart implements DatasetProducer, Serializable {

    /**
     * used from service profile requires the following items in the parameter
     * map fgsms.availabledata typeof GetOperationalStatusLogResponseMsg
     * fgsms.laststatus type Boolean fgsms.laststatustimestamp type Long

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/GetPluginInformationExt.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
 
package org.miloss.fgsms.presentation;

import org.miloss.fgsms.services.interfaces.policyconfiguration.GetPluginInformationResponseMsg;

/**
 *
 * @author AO
 */
public class GetPluginInformationExt extends GetPluginInformationResponseMsg {
    public long RefreshedAt=0;

}

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/Helper.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public License,
 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
 * obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular file,
 * then You may include the notice in a location (such as a LICENSE file in a
 * relevant directory) where a recipient would be likely to look for such a
 * notice.
 *
 * 
 */
/*  ---------------------------------------------------------------------------
 *  US Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
package org.miloss.fgsms.presentation;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import javax.servlet.ServletContext;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.Duration;
import javax.xml.stream.XMLInputFactory;

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/IProxyLoader.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import java.io.IOException;
import java.net.URL;
import java.util.Properties;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.miloss.fgsms.common.Constants.AuthMode;
import org.miloss.fgsms.services.interfaces.agentcallbackservice.RemoteAgentCallbackPort;
import org.miloss.fgsms.services.interfaces.agentcallbackservice.RemoteAgentCallbackService;
import org.miloss.fgsms.services.interfaces.automatedreportingservice.AutomatedReportingService;
import org.miloss.fgsms.services.interfaces.dataaccessservice.DataAccessService;
import org.miloss.fgsms.services.interfaces.policyconfiguration.PCS;
import org.miloss.fgsms.services.interfaces.reportingservice.ReportingService;
import org.miloss.fgsms.services.interfaces.status.OpStatusService;
import org.miloss.fgsms.services.interfaces.status.StatusService;


/**
 * Proxy Loader interface used for web applications accessing fgsms
 * services<br><br>
 * This interface is used by the class ProxyLoader and serves
 * as an abstraction layer to support multiple soap stacks
 *
 * @author AO
 */
public interface IProxyLoader {


=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/LogHelper.java
=====================================================
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.miloss.fgsms.presentation;

import org.miloss.fgsms.common.Logger;

/**
 *
 * @author AO
 */
public class LogHelper {
    static final Logger log=Logger.getLogger("fgsms.Web");
    
    public static Logger getLog(){
        return log;
    }
}

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/LoginFilter.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import java.io.IOException;
import java.net.URL;
import java.net.URLEncoder;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.miloss.fgsms.common.Constants;
import org.miloss.fgsms.common.Constants.AuthMode;
import org.miloss.fgsms.common.Utility;

/**
 *Login Filter is a Servlet Filter that handles username/password authentication for fgsms.
 * Since the authentication happens at the SOAP/web service level, the filter acts as a pass through, caching credentials
 * encrypted in the user's session object
 * 
 * use caution when editing this file, mistakes can cause security vulernabilities
 * and/or infinite redirects
 * 
 * @author AO
 */
public class LoginFilter implements Filter {

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachineNetworkData.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
 
package org.miloss.fgsms.presentation;

import java.util.ArrayList;
import java.util.List;

/**
 * This is a simple container for Machine and Network Data, used for charting purposes
 * @author AO
 */
public class MachineNetworkData {
  public List<RateStruct> stuff;
    public MachineNetworkData()
    {
        stuff = new ArrayList<RateStruct>();
    }
    public boolean Contains(String item)
    {
        for (int i=0; i< stuff.size(); i++)
        {
            if (stuff.get(i).item.equalsIgnoreCase(item))
                return true;
        }
        return false;
    }

    public void add(RateStruct add)
    {
        stuff.add(add);


=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeCPU.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetMachinePerformanceLogsByRangeResponseMsg;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetProcessPerformanceLogsByRangeResponseMsg;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.time.Millisecond;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;

/**
 *
 * @author AO
 */
public class MachinePerfLogsOverTimeCPU implements DatasetProducer, Serializable {

    public Object produceDataset(Map params) throws DatasetProduceException {
        TimeSeriesCollection col = new TimeSeriesCollection();

        try {
            //Logger.getAnonymousLogger().log(Level.INFO, "fgsmsWEB debug, size" +  params.size());
            GetMachinePerformanceLogsByRangeResponseMsg res = (GetMachinePerformanceLogsByRangeResponseMsg) params.get("fgsms.data");

            if (res != null && res.getMachinePerformanceData() != null && !res.getMachinePerformanceData().isEmpty()) {

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeHDFreeSpace.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.Map;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetMachinePerformanceLogsByRangeResponseMsg;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.time.Millisecond;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;

/**
 *
 * @author AO
 */
public class MachinePerfLogsOverTimeHDFreeSpace implements DatasetProducer, Serializable {

    public Object produceDataset(Map params) throws DatasetProduceException {
        TimeSeriesCollection col = new TimeSeriesCollection();

        try {
            //Logger.getAnonymousLogger().log(Level.INFO, "fgsmsWEB debug, size" +  params.size());
            GetMachinePerformanceLogsByRangeResponseMsg res = (GetMachinePerformanceLogsByRangeResponseMsg) params.get("fgsms.data");
            MachineNetworkData dataRX = new MachineNetworkData();

            if (res != null && res.getMachinePerformanceData() != null && !res.getMachinePerformanceData().isEmpty()) {

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeHDRates.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.Map;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetMachinePerformanceLogsByRangeResponseMsg;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.time.Millisecond;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;

/**
 *
 * @author AO
 */
public class MachinePerfLogsOverTimeHDRates implements DatasetProducer, Serializable {

    public Object produceDataset(Map params) throws DatasetProduceException {
    TimeSeriesCollection col = new TimeSeriesCollection();
        try {
            GetMachinePerformanceLogsByRangeResponseMsg res = (GetMachinePerformanceLogsByRangeResponseMsg) params.get("fgsms.data");
            MachineNetworkData dataRX = new MachineNetworkData();   //read
            MachineNetworkData dataTX = new MachineNetworkData();   //write
            if (res != null && res.getMachinePerformanceData() != null && !res.getMachinePerformanceData().isEmpty()) {
                for (int i = 0; i < res.getMachinePerformanceData().size(); i++) {


=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeMem.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetMachinePerformanceLogsByRangeResponseMsg;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetProcessPerformanceLogsByRangeResponseMsg;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.time.Millisecond;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;

/**
 *
 * @author AO
 */
public class MachinePerfLogsOverTimeMem implements DatasetProducer, Serializable {

    public Object produceDataset(Map params) throws DatasetProduceException {
        TimeSeriesCollection col = new TimeSeriesCollection();

        try {
            //Logger.getAnonymousLogger().log(Level.INFO, "fgsmsWEB debug, size" +  params.size());
            GetMachinePerformanceLogsByRangeResponseMsg res = (GetMachinePerformanceLogsByRangeResponseMsg) params.get("fgsms.data");

            if (res != null && res.getMachinePerformanceData() != null && !res.getMachinePerformanceData().isEmpty()) {

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeNIC.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.Map;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetMachinePerformanceLogsByRangeResponseMsg;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetProcessPerformanceLogsByRangeResponseMsg;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.time.Millisecond;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;

/**
 *
 * @author AO
 */
public class MachinePerfLogsOverTimeNIC implements DatasetProducer, Serializable {

    public Object produceDataset(Map params) throws DatasetProduceException {
        TimeSeriesCollection col = new TimeSeriesCollection();
        try {
            GetMachinePerformanceLogsByRangeResponseMsg res = (GetMachinePerformanceLogsByRangeResponseMsg) params.get("fgsms.data");
            MachineNetworkData dataRX = new MachineNetworkData();
            MachineNetworkData dataTX = new MachineNetworkData();
            if (res != null && res.getMachinePerformanceData() != null && !res.getMachinePerformanceData().isEmpty()) {
                for (int i = 0; i < res.getMachinePerformanceData().size(); i++) {

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MachinePerfLogsOverTimeThreads.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetMachinePerformanceLogsByRangeResponseMsg;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetProcessPerformanceLogsByRangeResponseMsg;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.time.Millisecond;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;

/**
 *
 * @author AO
 */
public class MachinePerfLogsOverTimeThreads implements DatasetProducer, Serializable {

    public Object produceDataset(Map params) throws DatasetProduceException {
        TimeSeriesCollection col = new TimeSeriesCollection();

        try {
            //Logger.getAnonymousLogger().log(Level.INFO, "fgsmsWEB debug, size" +  params.size());
            GetMachinePerformanceLogsByRangeResponseMsg res = (GetMachinePerformanceLogsByRangeResponseMsg) params.get("fgsms.data");

            if (res != null && res.getMachinePerformanceData() != null && !res.getMachinePerformanceData().isEmpty()) {

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ManageHelper.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import java.util.List;
import org.apache.log4j.Level;

import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.services.interfaces.common.SecurityWrapper;
import org.miloss.fgsms.services.interfaces.dataaccessservice.DataAccessService;
import org.miloss.fgsms.services.interfaces.policyconfiguration.*;

/**
 *
 * @author AO
 */
public class ManageHelper {

    GetProcessesListByMachineResponseMsg res = null;

    public String GetPartitionNamesAsHtmlListboxForThroughput(String url, String domain, String machine, PCS pcsport, SecurityWrapper c, List<String> existingItems) {
        GetProcessesListByMachineRequestMsg req = new GetProcessesListByMachineRequestMsg();
        req.setClassification(c);
        req.setHostname(machine);
        StringBuilder s = new StringBuilder();
        if (res == null) {
            try {
                res = pcsport.getProcessesListByMachine(req);
            } catch (AccessDeniedException ex) {
               LogHelper.getLog().log(Level.WARN, null, ex);
            } catch (ServiceUnavailableException ex) {

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/MessageBrokerQueueDepthChart.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;

import org.miloss.fgsms.services.interfaces.dataaccessservice.*;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.category.DefaultCategoryDataset;

/**
 *
 * @author AO
 */
public class MessageBrokerQueueDepthChart implements DatasetProducer, Serializable {

    public Object produceDataset(Map params) throws DatasetProduceException {
        DefaultCategoryDataset data = new DefaultCategoryDataset();
        try{
        GetCurrentBrokerDetailsResponseMsg res = (GetCurrentBrokerDetailsResponseMsg) params.get("fgsms.data");

        for (int i = 0; i < res.getQueueORtopicDetails().size(); i++) {
            if (res.getQueueORtopicDetails().get(i).getItemtype().equalsIgnoreCase("queue")) {
                //data.addValue(set.stuff.get(i).success, set.stuff.get(i).action + " Success", set.stuff.get(i).action);
                long k = res.getQueueORtopicDetails().get(i).getQueueDepth();
               // k = (long) (Math.random() * 100);

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/OpStatHelper.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.ws.BindingProvider;
import org.miloss.fgsms.services.interfaces.common.GetOperatingStatusRequestMessage;
import org.miloss.fgsms.services.interfaces.common.GetOperatingStatusResponseMessage;
import org.miloss.fgsms.services.interfaces.common.SecurityWrapper;
import org.miloss.fgsms.services.interfaces.status.OpStatusService;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.miloss.fgsms.common.Utility;

/**
 *
 * @author AO
 */
public class OpStatHelper {

    static Logger log = Logger.getLogger("fgsms.OpStat");

    public static List<OpStatWrapper> GetStatusAll(IProxyLoader pl, ServletContext context, HttpServletRequest req, HttpServletResponse res) {
        List<OpStatWrapper> list = new ArrayList<OpStatWrapper>();
        try {
            OpStatusService GetOpStat = pl.GetOpStat(context, req, res);

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/OpStatWrapper.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
 
package org.miloss.fgsms.presentation;

import org.miloss.fgsms.services.interfaces.common.GetOperatingStatusResponseMessage;

/**
 *
 * @author AO
 */
public class OpStatWrapper {
    public GetOperatingStatusResponseMessage msg;
    public String uri;
}

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/OsAgentStatusHelper.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import java.util.List;
import javax.xml.ws.BindingProvider;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Constants;
import org.miloss.fgsms.services.interfaces.agentcallbackservice.RemoteAgentCallbackPort;
import org.miloss.fgsms.services.interfaces.common.GetOperatingStatusRequestMessage;
import org.miloss.fgsms.services.interfaces.common.GetOperatingStatusResponseMessage;
import org.miloss.fgsms.services.interfaces.common.SecurityWrapper;
import org.miloss.fgsms.services.interfaces.policyconfiguration.PropertyPair;
import org.miloss.fgsms.services.interfaces.status.OpStatusService;

/**
 * This class provides an html render status indicator for an OS agent, given
 * its hostname
 *
 * @author AO
 */
public class OsAgentStatusHelper {

    public static String GetStatus(OpStatusService svc, String callbackUrl, SecurityWrapper c) {
        GetOperatingStatusRequestMessage req = new GetOperatingStatusRequestMessage();
        req.setClassification(c);
        BindingProvider bp = (BindingProvider) svc;
        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, callbackUrl);
        GetOperatingStatusResponseMessage operatingStatus;
        try {
            operatingStatus = svc.getOperatingStatus(req);

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/PerformanceViewerAvgResTime.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import de.laures.cewolf.links.CategoryItemLinkGenerator;
import java.io.UnsupportedEncodingException;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetPerformanceAverageStatsResponseMsg;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.general.DefaultPieDataset;

/**
 *
 * @author AO
 */
public class PerformanceViewerAvgResTime implements DatasetProducer, CategoryItemLinkGenerator, Serializable {

    public PerformanceViewerAvgResTime() {
    }
    GetPerformanceAverageStatsResponseMsg[] mlist = null;

    public Object produceDataset(Map params) throws DatasetProduceException {
        //LogHelper.getLog().log(Level.ERROR, "fgsmsWeb produceDataset");
        try {
            if (mlist == null) {

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/PerformanceViewerCache.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import java.io.Serializable;
import java.util.List;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetPerformanceAverageStatsResponseMsg;

/**
 *
 * @author AO
 */
public class PerformanceViewerCache implements Serializable {

  public GetPerformanceAverageStatsResponseMsg[] data;
}

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/PerformanceViewerInvocations.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import de.laures.cewolf.links.CategoryItemLinkGenerator;
import de.laures.cewolf.tooltips.CategoryToolTipGenerator;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.util.Map;

import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.presentation.PerformanceViewerCache;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetPerformanceAverageStatsResponseMsg;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.category.CategoryDataset;
import org.jfree.data.general.DefaultPieDataset;

/**
 *
 * @author AO
 */
public class PerformanceViewerInvocations implements DatasetProducer, CategoryToolTipGenerator, CategoryItemLinkGenerator, Serializable {

    //private URL dasu;
    GetPerformanceAverageStatsResponseMsg[] mlist = null;

    public Object produceDataset(Map params) throws DatasetProduceException {

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/PKIHandler.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import java.security.Principal;
import java.util.HashSet;
import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.miloss.fgsms.common.Constants;

/**
 *This is a soap handler that injects an http header that identifies the current user context.
 * It should only be used when using CAC/PKI logins from the fgsms web interface to the fgsms web services
 * @author AO
 */
public class PKIHandler implements SOAPHandler<SOAPMessageContext> {

    public PKIHandler() {
    }

    public PKIHandler(Principal user) {
        this.user = user;
    }
    private Principal user = null;

    public Set<QName> getHeaders() {
        return new HashSet<QName>();
    }

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProcessPerfLogsOverTimeCPU.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetProcessPerformanceLogsByRangeResponseMsg;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.time.Millisecond;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;

/**
 *
 * @author AO
 */
public class ProcessPerfLogsOverTimeCPU implements DatasetProducer, Serializable {

    public Object produceDataset(Map params) throws DatasetProduceException {
        TimeSeriesCollection col = new TimeSeriesCollection();

        try {
            //Logger.getAnonymousLogger().log(Level.INFO, "fgsmsWEB debug, size" +  params.size());
            GetProcessPerformanceLogsByRangeResponseMsg res = (GetProcessPerformanceLogsByRangeResponseMsg) params.get("fgsms.data");

            if (res != null && res.getProcessData() != null && !res.getProcessData().isEmpty()) {
                  TimeSeries s = new TimeSeries("CPU %", org.jfree.data.time.Millisecond.class);

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProcessPerfLogsOverTimeFileHandles.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetProcessPerformanceLogsByRangeResponseMsg;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.time.Millisecond;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;

/**
 *
 * @author AO
 */
public class ProcessPerfLogsOverTimeFileHandles implements DatasetProducer, Serializable {

    public Object produceDataset(Map params) throws DatasetProduceException {
        TimeSeriesCollection col = new TimeSeriesCollection();

        try {
            //Logger.getAnonymousLogger().log(Level.INFO, "fgsmsWEB debug, size" +  params.size());
            GetProcessPerformanceLogsByRangeResponseMsg res = (GetProcessPerformanceLogsByRangeResponseMsg) params.get("fgsms.data");

            if (res != null && res.getProcessData() != null && !res.getProcessData().isEmpty()) {
                  TimeSeries s = new TimeSeries("Open File Handles", org.jfree.data.time.Millisecond.class);

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProcessPerfLogsOverTimeMem.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetProcessPerformanceLogsByRangeResponseMsg;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.time.Millisecond;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;

/**
 *
 * @author AO
 */
public class ProcessPerfLogsOverTimeMem implements DatasetProducer, Serializable {

    public Object produceDataset(Map params) throws DatasetProduceException {
        TimeSeriesCollection col = new TimeSeriesCollection();

        try {
            //Logger.getAnonymousLogger().log(Level.INFO, "fgsmsWEB debug, size" +  params.size());
            GetProcessPerformanceLogsByRangeResponseMsg res = (GetProcessPerformanceLogsByRangeResponseMsg) params.get("fgsms.data");

            if (res != null && res.getProcessData() != null && !res.getProcessData().isEmpty()) {
                  TimeSeries s = new TimeSeries("Memory (bytes)", org.jfree.data.time.Millisecond.class);

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProcessPerfLogsOverTimeThreads.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetProcessPerformanceLogsByRangeResponseMsg;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.time.Millisecond;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;

/**
 *
 * @author AO
 */
public class ProcessPerfLogsOverTimeThreads implements DatasetProducer, Serializable {

    public Object produceDataset(Map params) throws DatasetProduceException {
        TimeSeriesCollection col = new TimeSeriesCollection();

        try {
            //Logger.getAnonymousLogger().log(Level.INFO, "fgsmsWEB debug, size" +  params.size());
            GetProcessPerformanceLogsByRangeResponseMsg res = (GetProcessPerformanceLogsByRangeResponseMsg) params.get("fgsms.data");

            if (res != null && res.getProcessData() != null && !res.getProcessData().isEmpty()) {
                TimeSeries s = new TimeSeries("Active Threads", org.jfree.data.time.Millisecond.class);

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProxyLoader.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import java.io.IOException;
import java.net.URL;
import java.util.Properties;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.miloss.fgsms.common.Constants.AuthMode;
import org.miloss.fgsms.services.interfaces.agentcallbackservice.RemoteAgentCallbackPort;
import org.miloss.fgsms.services.interfaces.automatedreportingservice.AutomatedReportingService;
import org.miloss.fgsms.services.interfaces.dataaccessservice.DataAccessService;
import org.miloss.fgsms.services.interfaces.policyconfiguration.PCS;
import org.miloss.fgsms.services.interfaces.reportingservice.ReportingService;
import org.miloss.fgsms.services.interfaces.status.OpStatusService;
import org.miloss.fgsms.services.interfaces.status.StatusService;

/**
 * Loads client proxy objects for the fgsms Web services using the
 * configuration file settings. This class will use the current thread's context
 * class loader to attempt to determine if we are running in a CXF or
 * JbossWS-Native environment. If it cannot be determined, an exception is
 * thrown. This class is similar to the factory pattern, however it is not
 * explicitly configurable
 *
 * @since 6.2
 * @author AO
 */
public class ProxyLoader implements IProxyLoader {

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/ProxyLoaderCXF.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.
 *
 * 
 */
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
package org.miloss.fgsms.presentation;

import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.handler.Handler;
import org.apache.juddi.v3.client.UDDIService;
import org.miloss.fgsms.common.Constants.AuthMode;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.services.interfaces.agentcallbackservice.RemoteAgentCallbackPort;
import org.miloss.fgsms.services.interfaces.agentcallbackservice.RemoteAgentCallbackService;
import org.miloss.fgsms.services.interfaces.automatedreportingservice.AutomatedReportingService;
import org.miloss.fgsms.services.interfaces.automatedreportingservice.AutomatedReportingService_Service;
import org.miloss.fgsms.services.interfaces.dataaccessservice.DataAccessService;
import org.miloss.fgsms.services.interfaces.dataaccessservice.DataAccessService_Service;
import org.miloss.fgsms.services.interfaces.policyconfiguration.PCS;
import org.miloss.fgsms.services.interfaces.policyconfiguration.PolicyConfigurationService;
import org.miloss.fgsms.services.interfaces.reportingservice.ReportingService;
import org.miloss.fgsms.services.interfaces.reportingservice.ReportingService_Service;
import org.miloss.fgsms.services.interfaces.status.OpStatusService;
import org.miloss.fgsms.services.interfaces.status.StatusService;

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/RateStruct.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
 
package org.miloss.fgsms.presentation;

import java.util.List;

/**
 *A simple structure for working with transaction logs, used primarily for charting
 * @author AO
 */
public class RateStruct {
  public String item;
    public List<TransactionLogTimeStampStruct> data;
}

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/SortableStatusList.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

/**
 *Provides a sortable list for the status of monitored services
 * @author AO
 */
public class SortableStatusList implements Comparable<SortableStatusList> {

    public SortableStatusList()
    {}
    public SortableStatusList(String n, Status s, String url)
    {
        this.name = n;
        this.status = s;
        this.url = url;
    }
    public enum Status {

        ONLINE_FRESH(8),
        ONLINE_STALE(7),
        ONLINE_SLA(4),
        ONLINE_FAULTS(3),
        OFFLINE_FRESH(0),
        OFFLINE_STALE(1),
        UNKNOWN(6);
        public int value;

        Status(int v) {
            value = v;

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/StatusHelper.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
package org.miloss.fgsms.presentation;

import java.net.URL;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.HttpClients;
import org.miloss.fgsms.common.Constants;
import org.miloss.fgsms.common.Utility;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;

/**
 * Provides the Operating Status blurb on the gui  see
 * fgsmsstatus.jsp
 *
 * @author AO
 */
public class StatusHelper {

    public StatusHelper(String username, String password, org.miloss.fgsms.common.Constants.AuthMode mode, String keystore, String keystorepassword, String truststore, String truststorepassword) {
        try {
            this.username = username;

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogActionBreakDown.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetMessageLogsResponseMsg;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.category.DefaultCategoryDataset;

/**
 *
 * @author AO
 */
public class TransactionLogActionBreakDown implements DatasetProducer, Serializable {

    public Object produceDataset(Map params) throws DatasetProduceException {
        DefaultCategoryDataset data = new DefaultCategoryDataset();
        try {
            //Logger.getAnonymousLogger().log(Level.INFO, "fgsmsWEB debug, size" +  params.size());
            GetMessageLogsResponseMsg res = (GetMessageLogsResponseMsg) params.get("fgsms.data");
            TransactionLogActionSet set = new TransactionLogActionSet();

            if (res!=null && res.getLogs() != null && res.getLogs() != null && res.getLogs().getTransactionLog() != null && res.getLogs().getTransactionLog().size() > 0) {
                for (int i = 0; i < res.getLogs().getTransactionLog().size(); i++) {
                    String action = res.getLogs().getTransactionLog().get(i).getAction();
                    int clip = 0;

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogActionData.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

/**
 *
 * @author AO
 */
public class TransactionLogActionData {
    public String action;
    public int success;
    public int failures;


}

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogActionSet.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author AO
 */
public class TransactionLogActionSet {

    public List<TransactionLogActionData> stuff;
    public TransactionLogActionSet()
    {
        stuff = new ArrayList<TransactionLogActionData>();
    }
    public boolean Contains(String action)
    {
        for (int i=0; i< stuff.size(); i++)
        {
            if (stuff.get(i).action.equalsIgnoreCase(action))
                return true;
        }
        return false;
    }

    public void add(TransactionLogActionData add)
    {
        stuff.add(add);

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogData.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
package org.miloss.fgsms.presentation;

import java.util.ArrayList;
import java.util.List;

/**
 *Provides a simple class to use for temporary storage of transactional web service performance data for the purposes of chart rendering
 * @author AO
 */
public class TransactionLogData {
    public List<TransactionLogStruct> stuff;
    public TransactionLogData()
    {
        stuff = new ArrayList<TransactionLogStruct>();
    }
    public boolean Contains(String action)
    {
        for (int i=0; i< stuff.size(); i++)
        {
            if (stuff.get(i).action.equalsIgnoreCase(action))
                return true;
        }
        return false;
    }

    public void add(TransactionLogStruct add)
    {
        stuff.add(add);

    }

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogStruct.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import java.util.List;

/**
 *
 * @author AO
 */
public class TransactionLogStruct {
    public String action;
    public List<TransactionLogTimeStampStruct> data;

}

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogTimeStampStruct.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
package org.miloss.fgsms.presentation;

import java.util.Calendar;

/**
 *
 * @author AO
 */
public class TransactionLogTimeStampStruct {

    public long ResponseTime;
    public Calendar cal;
}

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/TransactionLogViewerData.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
package org.miloss.fgsms.presentation;

import de.laures.cewolf.DatasetProduceException;
import de.laures.cewolf.DatasetProducer;
import java.io.Serializable;
import java.net.URL;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.services.interfaces.dataaccessservice.GetMessageLogsResponseMsg;
import org.miloss.fgsms.services.interfaces.dataaccessservice.TransactionLog;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.jfree.data.time.Millisecond;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;

/**
 *
 * @author AO
 */
public class TransactionLogViewerData implements DatasetProducer, Serializable {

    public TransactionLogViewerData() {
    }

    public TransactionLogViewerData(URL url) {
        dasu = url;

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/UDDIConfig.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import org.uddi.v3_service.UDDIInquiryPortType;
import org.uddi.v3_service.UDDIPublicationPortType;
import org.uddi.v3_service.UDDISecurityPortType;


/**
 *Provides a simple container to hold configuration and proxy class instances for presentation layer uddi discovery
 * @author AO
 */
public class UDDIConfig {
         public UDDIInquiryPortType inquiry=null;
         public String inquiryendpoint="";
        public UDDISecurityPortType security=null;
        public String secendpoint="";
        
        public UDDIPublicationPortType publish=null;
        public String publishendpoint="";
        
        
        public boolean useUDDI = false;
        public boolean useHTTPUsernamePassword = false;
        public boolean useHTTPClientCert = false;

        public String username=null;
        public String encryptedPassword=null;
        public boolean IsjUDDI=false;
}

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/UddiInquiry.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.
 *
 * 
 */
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
package org.miloss.fgsms.presentation;

import java.net.URLEncoder;
import java.util.List;
import org.apache.commons.lang3.StringEscapeUtils;
import org.miloss.fgsms.common.PublicationConstants;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.services.interfaces.common.SecurityWrapper;
import org.miloss.fgsms.services.interfaces.policyconfiguration.*;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;
;
import org.uddi.api_v3.*;

/**
 * Provides UDDI functions from the Web GUI most functions return rendered html
 *
 * @author AO
 */


public class UddiInquiry {

    private static final Logger log = LogHelper.getLog();
    private UDDIConfig config = null;

    public UddiInquiry(UDDIConfig config) throws Exception {
        this.config = config;
        if (this.config == null || this.config.inquiry == null) {
            good = false;
        }

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/main/java/org/miloss/fgsms/presentation/UserRequestWrapper.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular
 * file, then You may include the notice in a location (such as a LICENSE
 * file in a relevant directory) where a recipient would be likely to look
 * for such a notice.

 * 
 */
 
/*  ---------------------------------------------------------------------------
 *  U.S. Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */

package org.miloss.fgsms.presentation;

import java.security.Principal;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;

/**
 * An extension for the HTTPServletRequest that overrides the getUserPrincipal() and isUserInRole().
 *  We supply these implementations here, where they are not normally populated unless we are going through
 *  the facility provided by the container.
 * <p>If he user or roles are null on this wrapper, the parent request is consulted to try to fetch what ever the container has set for us.
 * This is intended to be created and used by the UserRoleFilter.
 * @author thein
 *
 */
public class UserRequestWrapper extends HttpServletRequestWrapper {

    String user;
    List<String> roles = null;
    HttpServletRequest realRequest;

    public UserRequestWrapper(String user, List<String> roles, HttpServletRequest request) {
        super(request);
        this.user = user;
        this.roles = roles;
        this.realRequest = request;


=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/test/java/org/miloss/fgsms/presentation/HelperTest.java
=====================================================
/**
 * This Source Code Form is subject to the terms of the Mozilla Public License,
 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
 * obtain one at http://mozilla.org/MPL/2.0/.
 *
 * If it is not possible or desirable to put the notice in a particular file,
 * then You may include the notice in a location (such as a LICENSE file in a
 * relevant directory) where a recipient would be likely to look for such a
 * notice.
 *
 * 
 */
/*  ---------------------------------------------------------------------------
 *  US Government, Department of the Army
 *  Army Materiel Command
 *  Research Development Engineering Command
 *  Communications Electronics Research Development and Engineering Center
 *  ---------------------------------------------------------------------------
 */
package org.miloss.fgsms.presentation;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
import javax.servlet.http.HttpServletRequest;
import javax.xml.bind.JAXB;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import org.miloss.fgsms.plugins.federation.FederationInterface;
import org.miloss.fgsms.services.interfaces.policyconfiguration.SLAAction;
import org.miloss.fgsms.services.interfaces.policyconfiguration.SLARuleGeneric;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.test.WebServiceBaseTests;

/**
 *
 * @author alex
 */
public class HelperTest extends WebServiceBaseTests {

     public HelperTest() throws Exception {
          url = "http://localhost:8080/uihelper";
          Init();
     }

=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-ui-common/src/test/java/org/miloss/fgsms/presentation/HttpServletRequestImpl.java
=====================================================
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.miloss.fgsms.presentation;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.Principal;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletInputStream;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 *
 * @author alex
 */
public class HttpServletRequestImpl implements HttpServletRequest {

     final Map<String, String> params = new HashMap<String, String>();

     public HttpServletRequestImpl(Map<String,String> data) {
          params.putAll(data);

       
     }

     @Override
     public String getAuthType() {
          throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
     }

     @Override
     public Cookie[] getCookies() {
          throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
     }

     @Override
     public long getDateHeader(String string) {
          throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
     }