summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/LineInfo.java6
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/ColorProperties.java2
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/NovaMap.java6
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/layer/SwingLayer.java4
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/Node.java8
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java90
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeInfo.java11
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/MapUtils.java14
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/DataCache.java95
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportHandler.java113
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportLoader.java61
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/SearchHandler.java98
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java47
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java14
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java10
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java32
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultJSON.java4
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/scheduler/SendEmail.java6
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java16
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/controller/FileServletController.java2
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java12
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/AppConstants.java378
22 files changed, 292 insertions, 737 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/LineInfo.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/LineInfo.java
index 26f33a35..47e3ad54 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/LineInfo.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/LineInfo.java
@@ -67,7 +67,7 @@ public class LineInfo {
public LineInfo(String nodeID1, String nodeID2) {
this.nodeID1 = nodeID1;
this.nodeID2 = nodeID2;
- lineAttributes = new HashMap<String, String>();
+ lineAttributes = new HashMap<>();
}
public LineInfo clone() {
@@ -167,7 +167,7 @@ public class LineInfo {
public List<String> getAttributeKeys() {
Set<String> keySet = lineAttributes.keySet();
- List<String> keys = new ArrayList<String>(keySet.size());
+ List<String> keys = new ArrayList<>(keySet.size());
Iterator<String> iter = keySet.iterator();
while (iter.hasNext()) {
@@ -183,7 +183,7 @@ public class LineInfo {
public List<String> getAttributeInternalKeys() {
Set<String> keySet = lineAttributes.keySet();
- List<String> internalKeys = new ArrayList<String>();
+ List<String> internalKeys = new ArrayList<>();
Iterator<String> iter = keySet.iterator();
while (iter.hasNext()) {
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/ColorProperties.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/ColorProperties.java
index 5ce752a7..6e1d7e24 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/ColorProperties.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/ColorProperties.java
@@ -51,7 +51,7 @@ public class ColorProperties {
public ColorProperties(NovaMap map) {
this.map = map;
- colorProperties = new HashMap<String, Object>();
+ colorProperties = new HashMap<>();
}
public void setColor(String type, String color) {
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/NovaMap.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/NovaMap.java
index 90d16649..6473bc6f 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/NovaMap.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/NovaMap.java
@@ -140,8 +140,8 @@ public class NovaMap {
boundingBox = new Rectangle();
mapArea = new Rectangle2D.Double();
geoArea = new Rectangle2D.Double();
- showList = new HashSet<String>();
- swingLayers = new ArrayList<SwingLayer>();
+ showList = new HashSet<>();
+ swingLayers = new ArrayList<>();
}
public int getBestZoomLevel(double Latitude1, double Longitude1, double Latitude2, double Longitude2, double height,
@@ -389,7 +389,7 @@ public class NovaMap {
BufferedImage legendImage = null;
Graphics2D g2Legend = null;
if (showLegend) {
- legendImage = new BufferedImage(boundingBox.width, (int) (20 * showListArr.length) + 20,
+ legendImage = new BufferedImage(boundingBox.width,(20 * showListArr.length) + 20,
BufferedImage.TYPE_INT_ARGB);
g2Legend = legendImage.createGraphics();
g2Legend.setBackground(Color.WHITE);
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/layer/SwingLayer.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/layer/SwingLayer.java
index a9a2fba6..ae6237ca 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/layer/SwingLayer.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/layer/SwingLayer.java
@@ -85,7 +85,7 @@ public class SwingLayer {
HashMap<String,NodeInfo> hashMap = node.getNodeCollection().getNodeCollection();
Set set = hashMap.entrySet();
int width = map.getShapeWidth();
- ArrayList<String> visibleLabel = new ArrayList<String>(151);
+ ArrayList<String> visibleLabel = new ArrayList<>(151);
Color oldColor = g2d.getColor();
Stroke oldStroke = g2d.getStroke();
int textWidth = 0;
@@ -186,7 +186,7 @@ public class SwingLayer {
}
String legendName = "";
int baseY = 0;
- baseY = (int)(20*showListArr.length) + 20;//+5;
+ baseY = (20*showListArr.length) + 20;//+5;
int baseX = 0;
if(map.isShowLegend()) {
for (int i = showListArr.length-1; i>=0; i--) {
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/Node.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/Node.java
index 60e7a166..4764ef50 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/Node.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/Node.java
@@ -59,8 +59,8 @@ public class Node {
public Node(NovaMap map) {
this.map = map;
nodeCollection = new NodeCollection();
- nodeIDSet = new HashSet<String>();
- selectionList = new ArrayList<String>();
+ nodeIDSet = new HashSet<>();
+ selectionList = new ArrayList<>();
}
public NodeInfo addNode(NodeParam nodeParam) {
@@ -121,7 +121,7 @@ public class Node {
public Set<Integer> getUniqueNumberT1(String currentYearMonth) {
HashMap<String,NodeInfo> hashMap = this.nodeCollection.getNodeCollection();
Set set = hashMap.entrySet();
- Set<Integer> numberT1Set = new TreeSet<Integer>();
+ Set<Integer> numberT1Set = new TreeSet<>();
for (Iterator iterator = set.iterator(); iterator.hasNext();) {
Map.Entry entry = (Map.Entry) iterator.next();
@@ -172,7 +172,7 @@ public class Node {
}
if (existNodeInfo == null) {
- existNodeInfo = new ArrayList<NodeInfo>();
+ existNodeInfo = new ArrayList<>();
}
existNodeInfo.add(nodeInfo);
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java
index 5c3f938a..320f15c9 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java
@@ -53,8 +53,8 @@ public class NodeCollection {
private HashMap<String,NodeInfo> nodeCollection;
public NodeCollection() {
- selectedNode = new HashSet<String>();
- nodeCollection = new HashMap<String,NodeInfo>(20000);
+ selectedNode = new HashSet<>();
+ nodeCollection = new HashMap<>(20000);
}
public void addSelectedNode(String nodeID) {
@@ -99,93 +99,11 @@ public class NodeCollection {
public HashMap<String,NodeInfo> getNodeCollection() {
return nodeCollection;
}
-
-/* public NodeInfo getNode(String nodeID) {
- for (NodeInfo nodeInfo : nodeCollection) {
- if (nodeInfo.getNodeID().equalsIgnoreCase(nodeID) ) {
- return nodeInfo;
- }
- }
-
- return null;
- }
-*/
-/* public NodeInfo getNode(String nodeID, String nodeType) {
- for (NodeInfo nodeInfo : nodeCollection) {
- if (nodeInfo.getNodeID().equalsIgnoreCase(nodeID) && nodeInfo.getNodeType().equalsIgnoreCase(nodeType)) {
- return nodeInfo;
- }
- }
-
- return null;
- }
-*/
+
public NodeInfo getNode(String nodeType) {
return (NodeInfo)nodeCollection.get(nodeType);
}
-/* public ArrayList<NodeInfo> getWildCardNode(String nodeID, String nodeType) {
- ArrayList<NodeInfo> list = new ArrayList<NodeInfo>();
-
- for (NodeInfo nodeInfo : nodeCollection) {
- if (nodeInfo.getNodeType().equalsIgnoreCase(nodeType) &&
- nodeInfo.getNodeID().toLowerCase().indexOf(nodeID.toLowerCase()) != -1) {
- list.add(nodeInfo);
- }
- }
-
- return list;
- }*/
-
-/* public NodeInfo removeNode(String nodeID) {
- for (int i = 0; i < nodeCollection.size(); i++) {
- if (nodeCollection.get(i).getNodeID().equalsIgnoreCase(nodeID)) {
- return nodeCollection.remove(i);
- }
- }
-
- removeSelectedNode(nodeID);
- return null;
- }
-
- public NodeInfo removeNode(String nodeID, String nodeType) {
- for (int i = 0; i < nodeCollection.size(); i++) {
- if (nodeCollection.get(i).getNodeID().equalsIgnoreCase(nodeID) &&
- nodeCollection.get(i).getNodeType().equalsIgnoreCase(nodeType)) {
- return nodeCollection.remove(i);
- }
- }
-
- removeSelectedNode(nodeID, nodeType);
- return null;
- }
-*/
-/* public void removeNode(String nodeType) {
- nodeCollection.remove(nodeType);
- }*/
-
-/* public ArrayList<NodeInfo> getCellsiteLocation(String location, boolean exactMatch) {
- ArrayList<NodeInfo> list = new ArrayList<NodeInfo>();
-
- for (NodeInfo nodeInfo : nodeCollection) {
- if (nodeInfo.getAttribute("Location") == null) {
- continue;
- }
-
- if (exactMatch) {
- if (nodeInfo.getAttribute("Location").equalsIgnoreCase(location)) {
- list.add(nodeInfo);
- }
- }
- else {
- if (nodeInfo.getAttribute("Location").toUpperCase().indexOf(location.toUpperCase()) != -1) {
- list.add(nodeInfo);
- }
- }
- }
-
- return list;
- }
-*/
+
public void clearNode() {
nodeCollection.clear();
selectedNode.clear();
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeInfo.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeInfo.java
index 611debc3..8f4473ce 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeInfo.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeInfo.java
@@ -64,8 +64,8 @@ public class NodeInfo {
public NodeInfo(String nodeID) {
this.nodeID = nodeID;
- lineIDS = new ArrayList<String>();
- nodeAttributes = new TreeMap<String, String>();
+ lineIDS = new ArrayList<>();
+ nodeAttributes = new TreeMap<>();
geoCoordinate = new GeoCoordinate();
}
@@ -117,7 +117,7 @@ public class NodeInfo {
}
public List<String> cloneLineIDS() {
- List<String> lineIDS = new ArrayList<String>();
+ List<String> lineIDS = new ArrayList<>();
for (String lineID : this.lineIDS) {
lineIDS.add(lineID);
@@ -171,8 +171,7 @@ public class NodeInfo {
}
public String getAttribute(String key) {
- String value = nodeAttributes.get(key);
- return value;
+ return nodeAttributes.get(key);
}
public void initializeAttributes(Map<String, String> nodeAttributes) {
@@ -212,7 +211,7 @@ public class NodeInfo {
public List<String> getAttributeKeys() {
Set<String> keySet = nodeAttributes.keySet();
- List<String> keys = new ArrayList<String>(keySet.size());
+ List<String> keys = new ArrayList<>(keySet.size());
Iterator<String> iter = keySet.iterator();
while (iter.hasNext()) {
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/MapUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/MapUtils.java
index 6bc6dd5c..0914c12c 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/MapUtils.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/MapUtils.java
@@ -64,18 +64,4 @@ public class MapUtils {
* @return null if not valid number (must be between 2008/01 to 2010/12)
*/
-
-/* public static void saveColor(HttpServletRequest request, DomainService domainService,
- String type, String colorValue) {
-// String userID = Integer.toString(UserUtils.getUserId(request));
-// MapColorPK colorPK = new MapColorPK();
-// MapColorVO colorVO = new MapColorVO();
-//
-// colorPK.setUserID(userID);
-// colorPK.setPrefID(type);
-// colorVO.setMapColorPK(colorPK);
-// colorVO.setColorValue(colorValue);
-//
-// domainService.saveDomainObject(colorVO);
- } */
}
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/DataCache.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/DataCache.java
index 5e875f76..41a5ae20 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/DataCache.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/DataCache.java
@@ -82,27 +82,20 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
/* try */{
dataViewActions = new Vector();
- //DataSet ds = DbUtils
- // .executeQuery("SELECT ts.web_view_action FROM cr_table_source ts WHERE ts.web_view_action IS NOT NULL");
-
String sql = Globals.getTheDataViewActions();
DataSet ds = DbUtils
.executeQuery(sql);
for (int i = 0; i < ds.getRowCount(); i++)
dataViewActions.add(ds.getString(i, 0));
- } // catch(Exception e) {}
+ }
return dataViewActions;
} // getDataViewActions
public static Vector getPublicReportIdNames() throws RaptorException {
- // if(publicReportIdNames==null) => needs to be up-to-date at any time
/* try */{
publicReportIdNames = new Vector();
-
- //DataSet ds = DbUtils
- // .executeQuery("SELECT rep_id, title FROM cr_report WHERE public_yn = 'Y' ORDER BY title");
String sql = Globals.getThePublicReportIdNames();
DataSet ds = DbUtils
@@ -116,18 +109,14 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
} // getPublicReportIdNames
public static Vector getPrivateAccessibleReportIdNames(String user_id, Vector userRoles) throws RaptorException {
- // if(publicReportIdNames==null) => needs to be up-to-date at any time
/* try */{
privateReportIdNames = new Vector();
- // StringBuffer query = new StringBuffer(" SELECT cr.rep_id, cr.title FROM cr_report cr ");
String sql = Globals.getThePrivateAccessibleNamesA();
- //query.append(" WHERE cr.rep_id not in (select rep_id from cr_report_access cra where user_id = '"+ user_id+"' ");
sql = sql.replace("[user_id]", user_id);
StringBuffer query = new StringBuffer(sql);
for (int i = 0; i < userRoles.size(); i++) {
if( i == 0){
- // query.append(" OR role_id in (");
query.append(Globals.getThePrivateAccessibleNamesIf());
}
if(i < (userRoles.size()-1))
@@ -137,8 +126,7 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
query.append((String)userRoles.get(i)+")");
}
- //query.append(" ) ");
- //query.append(" AND public_yn = 'N' and cr.owner_id = '"+ user_id+"' order by 2 ");
+
sql = Globals.getThePrivateAccessibleNamesB();
sql = sql.replace("[user_id]", user_id);
query.append(sql);
@@ -156,12 +144,9 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
public static Vector getGroupAccessibleReportIdNames(String user_id, Vector userRoles) throws RaptorException {
- // if(publicReportIdNames==null) => needs to be up-to-date at any time
/* try */{
groupReportIdNames = new Vector();
-
- //StringBuffer query = new StringBuffer(" SELECT cr.rep_id, cr.title FROM cr_report cr ");
- //query.append(" WHERE cr.rep_id in (select rep_id from cr_report_access cra where user_id = '"+ user_id+"' ");
+
String sql = Globals.getTheGroupAccessibleNamesA();
sql = sql.replace("[user_id]", user_id);
StringBuffer query = new StringBuffer(sql);
@@ -175,8 +160,7 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
query.append((String)userRoles.get(i)+")");
}
- //query.append(" ) ");
- //query.append(" AND public_yn = 'N' order by 2 ");
+
query.append(Globals.getTheGroupAccessibleNamesB());
DataSet ds = DbUtils
@@ -185,7 +169,7 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
for (int i = 0; i < ds.getRowCount(); i++)
groupReportIdNames
.add(new IdNameValue(ds.getString(i, 0), ds.getString(i, 1)));
- } // catch(Exception e) {}
+ }
return groupReportIdNames;
} // getGroupAccessibleReportIdNames
@@ -218,27 +202,22 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
if (reportTableSources == null)
/* try */{
reportTableSources = new Vector();
- //String query = " SELECT table_name, display_name, pk_fields, web_view_action, large_data_source_yn, filter_sql FROM cr_table_source ";
String query = Globals.getTheReportTableSourcesA();
if (dBInfo != null && !dBInfo.equals(AppConstants.DB_LOCAL)){
- //query += " where SOURCE_DB= '" + dBInfo + "'";
query+=Globals.getTheReportTableSourcesWhere();
query = query.replace("[dBInfo]", dBInfo);
}
else {
- //query += " where SOURCE_DB is null or SOURCE_DB = '" + AppConstants.DB_LOCAL
- // + "'";
query+=Globals.getTheReportTableSourcesIf();
query = query.replace("[AppConstants.DB_LOCAL]", AppConstants.DB_LOCAL);
}
- //query += " ORDER BY table_name ";
query+=Globals.getTheReportTableSourcesElse();
DataSet ds = DbUtils.executeQuery(query);
for (int i = 0; i < ds.getRowCount(); i++)
reportTableSources.add(new TableSource(ds.getString(i, 0), ds.getString(i, 1),
ds.getString(i, 2), ds.getString(i, 3), ds.getString(i, 4), ds
.getString(i, 5)));
- } // catch(Exception e) {}
+ }
return reportTableSources;
} // getReportTableSources
@@ -256,13 +235,9 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
sb.append(iter.next());
} // for
sb.append(")");
- //StringBuffer query = new StringBuffer("SELECT ts.table_name, ts.display_name, ts.pk_fields, ");
- // query.append(" ts.web_view_action, ts.large_data_source_yn, ts.filter_sql FROM cr_table_source ts ");
- // query.append (" WHERE ");
+
StringBuffer query = new StringBuffer(Globals.grabTheReportTableA());
- //if(!(AppUtils.isAdminUser(userId) || AppUtils.isSuperUser(userId)))
- // query.append (" (EXISTS (SELECT 1 FROM cr_table_role tr WHERE tr.table_name=ts.table_name AND tr.role_id IN "+sb.toString()+")) and ");
- //+ " OR (NOT EXISTS (SELECT 1 FROM cr_table_role tr WHERE tr.table_name=ts.table_name)) ";
+
if (dBInfo != null && !dBInfo.equals(AppConstants.DB_LOCAL)){
String d_sql = Globals.grabTheReportTableIf();
d_sql = d_sql.replace("[dBInfo]", dBInfo);
@@ -270,43 +245,35 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
query.append(d_sql);
}
else{
- //query.append(" (ts.SOURCE_DB is null or ts.SOURCE_DB = '"+ AppConstants.DB_LOCAL + "')");
String d_sql = Globals.grabTheReportTableElse();
d_sql = d_sql.replace("[AppConstants.DB_LOCAL]", AppConstants.DB_LOCAL);
query.append(d_sql);
}
if(!(AppUtils.isAdminUser(request) || AppUtils.isSuperUser(request))) {
- //query.append(" minus ");
-
- // query.append(" SELECT ts.table_name, ts.display_name, ts.pk_fields, ts.web_view_action, ");
- // query.append(" ts.large_data_source_yn, ts.filter_sql from cr_table_source ts where ");
- // query.append(" table_name in (select table_name from cr_table_role where role_id not IN "+sb.toString()+") and ");
String e_sql = Globals.grabTheReportTableB();
e_sql = e_sql.replace("[sb.toString()]", sb.toString());
query.append(e_sql);
if (dBInfo != null && !dBInfo.equals(AppConstants.DB_LOCAL)){
- // query.append( " ts.SOURCE_DB= '" + dBInfo + "'");
String d_sql = Globals.grabTheReportTableIf();
d_sql = d_sql.replace("[dBInfo]", dBInfo);
query.append(d_sql);
}
else{
- //query.append(" (ts.SOURCE_DB is null or ts.SOURCE_DB = '"+ AppConstants.DB_LOCAL + "')");
String d_sql = Globals.grabTheReportTableElse();
d_sql = d_sql.replace("[AppConstants.DB_LOCAL]", AppConstants.DB_LOCAL);
query.append(d_sql);
}
}
- //query.append(" ORDER BY 1 ");
+
query.append(Globals.grabTheReportTableC());
DataSet ds = DbUtils.executeQuery(query.toString());
for (int i = 0; i < ds.getRowCount(); i++)
userTableSources.add(new TableSource(ds.getString(i, 0), ds.getString(i, 1),
ds.getString(i, 2), ds.getString(i, 3), ds.getString(i, 4), ds
.getString(i, 5)));
- } // catch(Exception e) {}
+ }
return userTableSources;
} // getReportTableSources
@@ -316,14 +283,12 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
/* try */{
reportTableJoins = new Vector();
- //DataSet ds = DbUtils
- // .executeQuery("SELECT src_table_name, dest_table_name, join_expr FROM cr_table_join");
DataSet ds = DbUtils
.executeQuery(Globals.getTheReportTableCrJoin());
for (int i = 0; i < ds.getRowCount(); i++)
reportTableJoins.add(new TableJoin(ds.getString(i, 0), ds.getString(i, 1), ds
.getString(i, 2)));
- } // catch(Exception e) {}
+ }
return reportTableJoins;
} // getReportTableJoins
@@ -341,18 +306,6 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
sb.append(iter.next());
} // for
sb.append(")");
-
- /*DataSet ds = DbUtils
- .executeQuery("SELECT tj.src_table_name, tj.dest_table_name, tj.join_expr FROM cr_table_join tj "
- + "WHERE ((EXISTS (SELECT 1 FROM cr_table_role trs WHERE trs.table_name=tj.src_table_name AND trs.role_id IN "
- + sb.toString()
- + ")) "
- + "OR (NOT EXISTS (SELECT 1 FROM cr_table_role trs WHERE trs.table_name=tj.src_table_name))) "
- + "AND ((EXISTS (SELECT 1 FROM cr_table_role trd WHERE trd.table_name=tj.dest_table_name AND trd.role_id IN "
- + sb.toString()
- + ")) "
- + "OR (NOT EXISTS (SELECT 1 FROM cr_table_role trd WHERE trd.table_name=tj.dest_table_name)))");*/
-
String f_sql = Globals.getTheReportTableJoins();
f_sql = f_sql.replace("[sb.toString()]", sb.toString());
@@ -363,7 +316,7 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
for (int i = 0; i < ds.getRowCount(); i++)
userTableJoins.add(new TableJoin(ds.getString(i, 0), ds.getString(i, 1), ds
.getString(i, 2)));
- } // catch(Exception e) {}
+ }
return userTableJoins;
} // getReportTableJoins
@@ -386,10 +339,6 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
private static String generateReportTableDbUserColumnSQL(String tableName) {
StringBuffer sb = new StringBuffer();
- // sb.append("SELECT a.table_name, a.column_name, a.data_type, a.label ");
- //sb.append(" FROM user_column_def a ");
- // sb.append("WHERE a.table_name = '" + tableName.toUpperCase() + "' ");
- // sb.append("ORDER BY a.column_id");
String sql = Globals.getGenerateReportTableCol();
sql = sql.replace("[tableName.toUpperCase()]", tableName.toUpperCase());
@@ -399,15 +348,11 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
}//generateReportTableDbUserColumnSQL
private static String generateReportTableDbColumnsSQL(String tableName, String maskSql) {
StringBuffer sb = new StringBuffer();
- //sb.append("SELECT utc.table_name, utc.column_name, utc.data_type, ");
sb.append(Globals.getGenerateDbUserSqlA());
if (maskSql == null){
- //sb.append("utc.column_name label ");
sb.append(Globals.getGenerateDbUserSqlIf());
}
else{
- //sb.append("nvl(x.label, utc.column_name) label ");
- //sb.append("FROM user_tab_columns utc ");
sb.append(Globals.getGenerateDbUserSqlElse());
}
if (maskSql != null) {
@@ -415,17 +360,13 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
sb.append(maskSql);
sb.append(") AS x ");
}
- //sb.append("WHERE utc.table_name = '" + tableName.toUpperCase() + "' ");
String g_sql = Globals.getGenerateDbUserSqlB();
g_sql = g_sql.replace("[tableName.toUpperCase()]", tableName.toUpperCase());
sb.append(g_sql);
if (maskSql != null){
- //sb.append(" AND utc.table_name = x.table_name AND utc.column_name = x.column_name ");
sb.append(Globals.getGenerateDbUserSqlC());
}
- //sb.append("ORDER BY utc.column_id");
sb.append(Globals.getGenerateDbUserSqlD());
- //System.out.println(sb.toString());
return sb.toString();
} // generateReportTableDbColumnsSQL
@@ -472,7 +413,7 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
processDollarFields(tableDbColumns);
reportTableDbColumns.put(tableName, tableDbColumns);
- } // catch(Exception e) {}
+ }
return tableDbColumns;
} // getReportTableDbColumns
@@ -518,15 +459,7 @@ public class DataCache extends org.onap.portalsdk.analytics.RaptorObject {
fieldName);
return lookupDBInfo;
- } // getLookupTable
-
- // public static void setRemoteDBPrefix (String remoteDBPrefix) {
- // _remoteDBPrefix = remoteDBPrefix;
- // }
- //
- // public static String getRemoteDBPrefix () {
- // return _remoteDBPrefix;
- // }
+ }
public static void refreshAll() {
DataCache.dataViewActions = null;
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportHandler.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportHandler.java
index dc3b1a88..2729ebb0 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportHandler.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportHandler.java
@@ -193,7 +193,6 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
private HashMap loadStyles(ReportRuntime rr, HSSFWorkbook wb) {
HSSFCellStyle styleDefault = wb.createCellStyle();
- //System.out.println("Load Styles");
// Style default will be normal with no background
HSSFFont fontDefault = wb.createFont();
// The default will be plain .
@@ -206,7 +205,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
styleDefault.setBorderTop(BorderStyle.THIN);
styleDefault.setBorderLeft(BorderStyle.THIN);
styleDefault.setBorderRight(BorderStyle.THIN);
- // styleDefault.setFillForegroundColor(HSSFColor.YELLOW.index);
+
styleDefault.setFillPattern(FillPatternType.NO_FILL);
styleDefault.setFont(fontDefault);
@@ -271,21 +270,14 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
SemaphoreType sem = (SemaphoreType) iter.next();
if(!semColumnList.contains(sem.getSemaphoreId()))
continue;
- //System.out.println("SemphoreId ----> " + sem.getSemaphoreId());
FormatList fList = sem.getFormatList();
List formatList = fList.getFormat();
for (Iterator fIter = formatList.iterator(); fIter.hasNext();) {
FormatType fmt = (FormatType) fIter.next();
if(fmt!=null){
- //if (fmt.getLessThanValue().length() > 0) {
cellStyle = wb.createCellStyle();
HSSFFont cellFont = wb.createFont();
- //System.out.println("Format Id " + fmt.getFormatId());
if (nvl(fmt.getBgColor()).length() > 0) {
-// System.out.println("Load Styles " +
-// fmt.getFormatId()
-// + " " +fmt.getBgColor() + " " +
-// ExcelColorDef.getExcelColor(fmt.getBgColor()));
cellStyle.setFillForegroundColor(ExcelColorDef.getExcelColor(fmt
.getBgColor()));
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND );
@@ -304,11 +296,9 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
cellFont.setFontName(fmt.getFontFace());
else
cellFont.setFontName("Tahoma");
- //cellFont.setFontHeight((short) (10 / 0.05));
if(nvl(fmt.getFontSize()).length()>0) {
try {
- //cellFont.setFontHeight((short) (Integer.parseInt(fmt.getFontSize()) / 0.05));
cellFont.setFontHeight((short) (font_size/0.05));
} catch(NumberFormatException e){
cellFont.setFontHeight((short) (font_size / 0.05));//10
@@ -337,16 +327,13 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
private void paintExcelParams(final HSSFWorkbook wb, int rowNum, final int col, final List paramsList,
final String customizedParamInfo, final HSSFSheet sheet, final String reportTitle, final String reportDescr)
throws IOException {
- //HSSFSheet sheet = wb.getSheet(getSheetName());
int cellNum = 0;
HSSFRow row = null;
short s1 = 0, s2 = (short) 1;
HtmlStripper strip = new HtmlStripper();
// Name Style
HSSFCellStyle styleName = wb.createCellStyle();
- //styleName.setFillBackgroundColor(HSSFColor.GREY_80_PERCENT.index);
styleName.setFillForegroundColor(HSSFColor.GREY_25_PERCENT.index);
- //styleName.setFillPattern(HSSFCellStyle.SPARSE_DOTS);
styleName.setAlignment(HorizontalAlignment.CENTER);
styleName.setBorderBottom(BorderStyle.THIN);
styleName.setBorderTop(BorderStyle.THIN);
@@ -377,16 +364,11 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
styleValue.setBorderTop(BorderStyle.THIN);
styleValue.setBorderLeft(BorderStyle.THIN);
styleValue.setBorderRight(BorderStyle.THIN);
- // styleValue.setFillForegroundColor(HSSFColor.YELLOW.index);
styleValue.setFillPattern(FillPatternType.NO_FILL);
styleValue.setFont(fontDefault);
HSSFCell cell = null;
HSSFCellStyle styleDescription = wb.createCellStyle();
- styleDescription.setAlignment(HorizontalAlignment.CENTER);
-// styleDescription.setBorderBottom(BorderStyle.THIN);
-// styleDescription.setBorderTop(BorderStyle.THIN);
-// styleDescription.setBorderRight(BorderStyle.THIN);
-// styleDescription.setBorderLeft(BorderStyle.THIN);
+ styleDescription.setAlignment(HorizontalAlignment.CENTER);
HSSFFont fontDescr = wb.createFont();
fontDescr.setFontHeight((short) (font_size / 0.05)); //14
fontDescr.setFontName("Tahoma");
@@ -400,7 +382,6 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
if(!Globals.customizeFormFieldInfo() || customizedParamInfo.length()<=0) {
for (Iterator iter = paramsList.iterator(); iter.hasNext();) {
IdNameValue value = (IdNameValue) iter.next();
- //System.out.println("\"" + value.getId() + " = " + value.getName() + "\"");
if(nvl(value.getId()).trim().length()>0 && (!nvl(value.getId()).trim().equals("BLANK"))) {
paramSeq += 1;
if(paramSeq <= 1) {
@@ -413,11 +394,9 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
strBuf.append(reportTitle+"\n");
- //strBuf.append("Run-time Parameters\n");
}
row = sheet.createRow(++rowNum);
cellNum = 0;
- //System.out.println("RowNum " + rowNum + " " + value.getId() + " " +value.getName());
cell = row.createCell((short) cellNum);
cell.setCellValue(value.getId());
cell.setCellStyle(styleName);
@@ -425,8 +404,6 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
cell = row.createCell((short) cellNum);
cell.setCellValue(value.getName().replaceAll("~",","));
cell.setCellStyle(styleValue);
-
- //strBuf.append(value.getId()+": "+ value.getName()+"\n");
}
} //for
} else {
@@ -453,15 +430,13 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
s = s.replaceAll(",", "|");
s = s.replaceAll("~", ",");
if(s.indexOf(":")!= -1) {
- //System.out.println("|"+s+"|");
row = sheet.createRow(++rowNum);
cell = row.createCell((short) 0);
sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, s1, s2));
cellDescr = row.createCell((short) 0);
cellDescr.setCellValue("Run-time Parameters");
cellDescr.setCellStyle(styleDescription);
-
- //strBuf.append("Run-time Parameters\n");
+
StringTokenizer st = new StringTokenizer(s.trim(), "|");
while(st.hasMoreTokens()) {
token = st.nextToken();
@@ -490,7 +465,6 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
cell = row.createCell((short) cellNum);
cell.setCellValue(value.trim());
cell.setCellStyle(styleValue);
- //strBuf.append(name.trim()+": "+ value.trim()+"\n");
}
/* if(token.endsWith(":") && (value!=null && value.trim().length()<=0) && (name!=null && name.trim().length()>0 && name.endsWith(":"))) {
name = name.substring(0, name.indexOf(":")+1);
@@ -581,7 +555,6 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
int mb = 1024*1024;
Runtime runtime = Runtime.getRuntime();
int returnValue = 0;
- // HSSFSheet sheet = wb.getSheetAt(0);
HSSFCellStyle styleDefault = wb.createCellStyle();
HSSFCellStyle styleNumber = wb.createCellStyle();
HSSFCellStyle styleDecimalNumber = wb.createCellStyle();
@@ -589,9 +562,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
HSSFCellStyle styleCurrencyDecimalNumber = wb.createCellStyle();
HSSFCellStyle styleDate = wb.createCellStyle();
HtmlStripper strip = new HtmlStripper();
- //HSSFSheet sheet = wb.getSheet(getSheetName());
HSSFCellStyle styleDataHeader = wb.createCellStyle();
- // style.setFillBackgroundColor(HSSFColor.AQUA.index);
styleDataHeader.setFillForegroundColor(HSSFColor.GREY_40_PERCENT.index);
styleDataHeader.setFillPattern(FillPatternType.SOLID_FOREGROUND );
styleDataHeader.setAlignment(HorizontalAlignment.CENTER);
@@ -613,25 +584,6 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
ColumnHeaderRow chr = null;
String title = "";
-// System.out.println("***************** Size " + rd.reportColumnHeaderRows.size());
-// for (int i = 0; i < rd.reportColumnHeaderRows.size(); i++) {
-// for (int j = 0; j < rd.reportColumnHeaderRows.getColumnHeaderRow(i).size(); j++) {
-// System.out.println("Column Title " + rd.reportColumnHeaderRows.getColumnHeaderRow(i).getColumnHeader(j).getColumnTitle()
-// + " " + rd.reportColumnHeaderRows.getColumnHeaderRow(i).getColumnHeader(j).isVisible());
-// }
-// }
-/* List dsList = rr.getDataSourceList().getDataSource();
- HashMap dataColumnTypeHashMap = new HashMap();
- for (Iterator iter = dsList.iterator(); iter.hasNext();) {
- DataSourceType element = (DataSourceType) iter.next();
- List dcList = element.getDataColumnList().getDataColumn();
- for (Iterator iterator = dcList.iterator(); iterator.hasNext();) {
- DataColumnType element1 = (DataColumnType) iterator.next();
- dataTypeMap.put(element1.getColId(), element1.getColType());
- dataColumnTypeHashMap.put(element1.getColName(), element1);
- }
- }
-*/
int columnRows = rr.getVisibleColumnCount() - 1;
HttpSession session = request.getSession();
@@ -722,18 +674,6 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
} // for
*/
- //cellNum = -1;
-
-
-// Set mapSet = dataTypeMap.entrySet();
-// Map.Entry me;
-// String element, value ;
-// for (Iterator iter = mapSet.iterator(); iter.hasNext();) {
-// me=(Map.Entry)iter.next();
-// element = (String) me.getKey();
-// value = (String) me.getValue();
-// System.out.println("DataTypeMap " + element + " " + value);
-// }
for (chr.resetNext(); chr.hasNext();) {
ColumnHeader ch = chr.getNext();
@@ -782,7 +722,6 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
// Data
// Create some cell styles.
- //HSSFCellStyle styleDefault = wb.createCellStyle();
HSSFCellStyle styleCell = null;
HSSFCellStyle styleTotal = wb.createCellStyle();
@@ -813,7 +752,6 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
styleDefault.setBorderTop(BorderStyle.THIN);
styleDefault.setBorderLeft(BorderStyle.THIN);
styleDefault.setBorderRight(BorderStyle.THIN);
- // styleDefault.setFillForegroundColor(HSSFColor.YELLOW.index);
styleDefault.setFillPattern(FillPatternType.NO_FILL);
styleDefault.setFont(fontDefault);
styleDefault.setWrapText(true);
@@ -823,11 +761,10 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
styleNumber.setBorderTop(BorderStyle.THIN);
styleNumber.setBorderLeft(BorderStyle.THIN);
styleNumber.setBorderRight(BorderStyle.THIN);
- // styleDefault.setFillForegroundColor(HSSFColor.YELLOW.index);
styleNumber.setFillPattern(FillPatternType.NO_FILL);
styleNumber.setFont(fontDefault);
try {
- styleNumber.setDataFormat((short)0x26);//HSSFDataFormat.getBuiltinFormat("(#,##0_);[Red](#,##0)"));
+ styleNumber.setDataFormat((short)0x26);
} catch (Exception e) {
}
@@ -837,10 +774,9 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
styleDecimalNumber.setBorderTop(BorderStyle.THIN);
styleDecimalNumber.setBorderLeft(BorderStyle.THIN);
styleDecimalNumber.setBorderRight(BorderStyle.THIN);
- // styleDefault.setFillForegroundColor(HSSFColor.YELLOW.index);
styleDecimalNumber.setFillPattern(FillPatternType.NO_FILL);
styleDecimalNumber.setFont(fontDefault);
- styleDecimalNumber.setDataFormat((short)0x27);//HSSFDataFormat.getBuiltinFormat("(#,##0.00_);[Red](#,##0.00)"));
+ styleDecimalNumber.setDataFormat((short)0x27);
//Decimal Number
styleDecimalNumberTotal.setAlignment(HorizontalAlignment.CENTER);
@@ -848,7 +784,6 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
styleDecimalNumberTotal.setBorderTop(BorderStyle.THIN);
styleDecimalNumberTotal.setBorderLeft(BorderStyle.THIN);
styleDecimalNumberTotal.setBorderRight(BorderStyle.THIN);
- // styleDefault.setFillForegroundColor(HSSFColor.YELLOW.index);
styleDecimalNumberTotal.setFillPattern(FillPatternType.NO_FILL);
styleDecimalNumberTotal.setFont(fontBold);
styleDecimalNumberTotal.setDataFormat((short)0x27);//HSSFDataFormat.getBuiltinFormat("(#,##0.00_);[Red](#,##0.00)"));
@@ -859,10 +794,9 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
styleCurrencyDecimalNumber.setBorderTop(BorderStyle.THIN);
styleCurrencyDecimalNumber.setBorderLeft(BorderStyle.THIN);
styleCurrencyDecimalNumber.setBorderRight(BorderStyle.THIN);
- // styleDefault.setFillForegroundColor(HSSFColor.YELLOW.index);
styleCurrencyDecimalNumber.setFillPattern(FillPatternType.NO_FILL);
styleCurrencyDecimalNumber.setFont(fontDefault);
- styleCurrencyDecimalNumber.setDataFormat((short)8);//HSSFDataFormat.getBuiltinFormat("($#,##0.00_);[Red]($#,##0.00)"));
+ styleCurrencyDecimalNumber.setDataFormat((short)8);
//currency number bold
styleCurrencyDecimalNumberTotal.setAlignment(HorizontalAlignment.CENTER);
@@ -870,7 +804,6 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
styleCurrencyDecimalNumberTotal.setBorderTop(BorderStyle.THIN);
styleCurrencyDecimalNumberTotal.setBorderLeft(BorderStyle.THIN);
styleCurrencyDecimalNumberTotal.setBorderRight(BorderStyle.THIN);
- // styleDefault.setFillForegroundColor(HSSFColor.YELLOW.index);
styleCurrencyDecimalNumberTotal.setFillPattern(FillPatternType.NO_FILL);
styleCurrencyDecimalNumberTotal.setFont(fontBold);
styleCurrencyDecimalNumberTotal.setDataFormat((short)8);//HSSFDataFormat.getBuiltinFormat("($#,##0.00_);[Red]($#,##0.00)"));
@@ -885,7 +818,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
// styleDefault.setFillForegroundColor(HSSFColor.YELLOW.index);
styleCurrencyNumber.setFillPattern(FillPatternType.NO_FILL);
styleCurrencyNumber.setFont(fontDefault);
- styleCurrencyNumber.setDataFormat((short) 6);//HSSFDataFormat.getBuiltinFormat("($#,##0_);[Red]($#,##0)"));
+ styleCurrencyNumber.setDataFormat((short) 6);
//CurrencyNumber
@@ -897,7 +830,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
// styleDefault.setFillForegroundColor(HSSFColor.YELLOW.index);
styleCurrencyNumberTotal.setFillPattern(FillPatternType.NO_FILL);
styleCurrencyNumberTotal.setFont(fontBold);
- styleCurrencyNumberTotal.setDataFormat((short) 6);//HSSFDataFormat.getBuiltinFormat("($#,##0_);[Red]($#,##0)"));
+ styleCurrencyNumberTotal.setDataFormat((short) 6);
//Date
styleDate.setAlignment(HorizontalAlignment.CENTER);
@@ -905,7 +838,6 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
styleDate.setBorderTop(BorderStyle.THIN);
styleDate.setBorderLeft(BorderStyle.THIN);
styleDate.setBorderRight(BorderStyle.THIN);
- // styleDefault.setFillForegroundColor(HSSFColor.YELLOW.index);
styleDate.setFillPattern(FillPatternType.NO_FILL);
styleDate.setFont(fontDefault);
styleDate.setDataFormat((short)0xe);//HSSFDataFormat.getBuiltinFormat("m/d/yy"));
@@ -916,9 +848,8 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
styleTotal.setBorderTop(BorderStyle.THIN);
styleTotal.setBorderLeft(BorderStyle.THIN);
styleTotal.setBorderRight(BorderStyle.THIN);
- // styleDefault.setFillForegroundColor(HSSFColor.YELLOW.index);
styleTotal.setFillPattern(FillPatternType.NO_FILL);
- styleTotal.setDataFormat((short)0x28);//HSSFDataFormat.getBuiltinFormat("(#,##0.00_);[Red](#,##0.00)"));
+ styleTotal.setDataFormat((short)0x28);
styleTotal.setFont(fontBold);
styleCurrencyTotal.setAlignment(HorizontalAlignment.CENTER);
@@ -926,9 +857,8 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
styleCurrencyTotal.setBorderTop(BorderStyle.THIN);
styleCurrencyTotal.setBorderLeft(BorderStyle.THIN);
styleCurrencyTotal.setBorderRight(BorderStyle.THIN);
- // styleDefault.setFillForegroundColor(HSSFColor.YELLOW.index);
styleCurrencyTotal.setFillPattern(FillPatternType.NO_FILL);
- styleCurrencyTotal.setDataFormat((short)8);//HSSFDataFormat.getBuiltinFormat("($#,##0.00_);[Red]($#,##0.00)"));
+ styleCurrencyTotal.setDataFormat((short)8);
styleCurrencyTotal.setFont(fontBold);
styleDefaultTotal.setAlignment(HorizontalAlignment.CENTER);
@@ -936,10 +866,8 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
styleDefaultTotal.setBorderTop(BorderStyle.THIN);
styleDefaultTotal.setBorderLeft(BorderStyle.THIN);
styleDefaultTotal.setBorderRight(BorderStyle.THIN);
- // styleDefault.setFillForegroundColor(HSSFColor.YELLOW.index);
styleDefaultTotal.setFillPattern(FillPatternType.NO_FILL);
styleDefaultTotal.setDataFormat((short)0x28);
- ////styleDefaultTotal.setDataFormat(HSSFDataFormat.getBuiltinFormat("($#,##0.00_);[Red]($#,##0.00)"));
styleDefaultTotal.setFont(fontBold);
firstPass = true;
@@ -1002,7 +930,6 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
rd.reportDataRows.resetNext();
dr = rd.reportDataRows.getNext();
j = 0;
- //if(rowCount%1000 == 0) wb.write(sos);
/*if(rd.reportTotalRowHeaderCols!=null) {
//cellNum = -1;
@@ -1022,10 +949,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
//} // for
}*/
firstPass = false;
- //cellNum = -1;
for (dr.resetNext(); dr.hasNext();j++) {
- //for (chr.resetNext(); chr.hasNext();) {
- //ColumnHeader ch = chr.getNext();
styleCell = null;
DataValue dv = dr.getNext();
HtmlFormatter htmlFormat = dv.getCellFormatter();
@@ -1040,15 +964,10 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
if(dv.isVisible()) {
cellNum += 1;
cell = row.createCell((short) cellNum);
- //System.out.println("Stripping HTML 1");
//cell.setCellValue(strip.stripHtml(dv.getDisplayValue()));
String dataType = (String) (dataTypeMap.get(dv.getColId()));
//System.out.println("Value " + value + " " + (( dataType !=null && dataType.equals("DATE")) || (dv.getColName()!=null && dv.getColName().toLowerCase().endsWith("date"))) );
if (dataType!=null && dataType.equals("NUMBER")){
- //cellNumber = row.createCell((short) cellNum);
- //cellNumber.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
- //cellNumber.setCellValue(dv.getDisplayValue());
- //cellCurrencyNumber = row.createCell((short) cellNum);
int zInt = 0;
if (value.equals("null")){
cell.setCellValue(zInt);
@@ -1057,15 +976,9 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
if ((value.indexOf("."))!= -1){
if ((value.trim().startsWith("$")) || (value.trim().startsWith("-$") )) {
- //if (dv.getDisplayValue().startsWith("$")){
- //styleDefault.setDataFormat(HSSFDataFormat.getBuiltinFormat("($#,##0.00);($#,##0.00)"));
String tempDollar = dv.getDisplayValue().trim();
tempDollar = tempDollar.replaceAll(" ", "").substring(0);
tempDollar = tempDollar.replaceAll("\\$", "").substring(0);
- //System.out.println("SUBSTRING |" + tempDollar);
- //System.out.println("Before copy Value |" + tempDollar);
- //tempDollar = String.copyValueOf(tempDollar.toCharArray(), 1, tempDollar.length()-1);
- //System.out.println("After copy Value |" + tempDollar);
if ((tempDollar.indexOf(","))!= -1){
tempDollar = tempDollar.replaceAll(",", "");
}
@@ -4242,8 +4155,8 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
}
}
SemaphoreList semList = rr.getSemaphoreList();
- Map<String, XSSFCellStyle> hashMapStyles = new HashMap<String, XSSFCellStyle>();;
- Map<String, XSSFFont> hashMapFonts = new HashMap<String, XSSFFont>();
+ Map<String, XSSFCellStyle> hashMapStyles = new HashMap<>();;
+ Map<String, XSSFFont> hashMapFonts = new HashMap<>();
hashMapFonts.put("default", fontDefault);
hashMapStyles.put("default", styleDefault);
XSSFCellStyle styleLeftDefault = wb.createCellStyle();
@@ -4509,7 +4422,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject {
sw.endRow();
//All the possible combinations of date format
CreationHelper createHelper = wb.getCreationHelper();
- HashMap<String, Short> dateFormatMap = new HashMap<String, Short>();
+ HashMap<String, Short> dateFormatMap = new HashMap<>();
SimpleDateFormat MMDDYYYYFormat = new SimpleDateFormat("MM/dd/yyyy");
SimpleDateFormat YYYYMMDDFormat = new SimpleDateFormat("yyyy/MM/dd");
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportLoader.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportLoader.java
index 8072d730..687b9c4d 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportLoader.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportLoader.java
@@ -130,11 +130,7 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
char[] buffer = new char[512];
Reader in = null;
in = new InputStreamReader(clob.getAsciiStream());
- // if(obj instanceof oracle.sql.CLOB) {
- // in = ((oracle.sql.CLOB) obj).getCharacterStream();
- // } else if (obj instanceof weblogic.jdbc.wrapper.Clob) {
- // in = ((weblogic.jdbc.base.BaseClob) obj).getCharacterStream();
- // }
+
while ((len = in.read(buffer)) != -1)
sb.append(buffer, 0, len);
in.close();
@@ -191,7 +187,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
rs.updateString("report_xml", reportXML);
rs.updateRow();
connection.commit();
- // sb.append(rs.getString(1));
} else {
throw new RaptorException(
"Report " + reportID + NOT_FOUND_IN_DB);
@@ -286,7 +281,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
}
public static boolean isReportsAlreadyScheduled(String reportID) throws RaptorException {
- // String sql = "select rep_id from cr_report_schedule where rep_id = ?";
String sql = Globals.getIsReportAlreadyScheduled();
Connection connection = DbUtils.getConnection();
@@ -360,11 +354,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
sql = sql.replace("[userID]", userID);
DataSet ds = DbUtils.executeQuery(sql);
- // DataSet ds = DbUtils
- // .executeQuery("SELECT cr.rep_id, cr.title FROM cr_report cr WHERE nvl(cr.owner_id, cr.create_id)
- // = "
- // + userID);
-
for (int i = 0; i < ds.getRowCount(); i++)
reportIdNames.add(new IdNameValue(ds.getString(i, 0), ds.getString(i, 1)));
} catch (Exception e) {
@@ -458,9 +447,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
for (Iterator iter = AppUtils.getUserRoles(request).iterator(); iter.hasNext();)
roleList.append("," + ((String) iter.next()));
- // DataSet ds = DbUtils.executeQuery("SELECT cr.rep_id, cr.title FROM
- // cr_report cr WHERE cr.public_yn = 'Y' AND cr.menu_id =
- // '"+nvls(menuId)+"' AND cr.menu_approved_yn = 'Y' ORDER BY cr.title");
// Copied from SearchHandler and simplified
/*
* String query = "SELECT cr.rep_id, " + "cr.title, " + "cr.descr " + "FROM cr_report cr, " +
@@ -515,7 +501,7 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
DataSet ds = DbUtils
.executeQuery(query);
- ArrayList<QuickLink> quickLinksArray = new ArrayList<QuickLink>(ds.getRowCount());
+ ArrayList<QuickLink> quickLinksArray = new ArrayList<>(ds.getRowCount());
for (int i = 0; i < ds.getRowCount(); i++) {
QuickLink quickLink = new QuickLink();
StringBuffer link = new StringBuffer("");
@@ -590,10 +576,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
sql = sql.replace("[roleList.toString()]", roleList.toString());
sql = sql.replace("[folderId]", folderId);
- // String user_sql = " AND nvl(cr.owner_id, cr.create_id) = " + userID;
- // String public_sql = " AND (nvl(cr.owner_id, cr.create_id) = " + userID
- // + " OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL)";
-
String user_sql = Globals.getLoadFolderReportsUser();
user_sql = user_sql.replace("[userID]", userID);
String public_sql = Globals.getLoadFolderReportsPublicSql();
@@ -632,7 +614,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
*/
ReportSearchResult rsr = new ReportSearchResult(-1, ds.getRowCount(), 6, 7);
rsr.parseData(ds, request);
- // rsr.truncateToPage(pageNo);
return rsr;
} // loadFolderReports
@@ -687,9 +668,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
sql = sql.replace("[userID]", userID);
sql = sql.replace("[roleList.toString()]", roleList.toString());
- // DataSet ds = DbUtils
- // .executeQuery(query.toString());
-
DataSet ds = DbUtils
.executeQuery(sql);
HashMap map = new HashMap();
@@ -725,9 +703,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
sql = sql.replace("[userID]", userID);
sql = sql.replace("[roleList.toString()]", roleList.toString());
- // DataSet ds = DbUtils
- // .executeQuery(query.toString());
-
DataSet ds = DbUtils
.executeQuery(sql);
@@ -749,18 +724,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
* append(" and action = 'Report Execution Time' and a.rep_id = cr.rep_id order by log_time desc) x where rownum <= 6 ) y where rownum >= 1"
* );
*/
- // DataSet ds = DbUtils
- // .executeQuery(
- // " SELECT a.file_name, b.title,to_char(a.dwnld_start_time, 'Dy DD-Mon-YYYY HH24:MI:SS') as time,
- // "+
- // " a.dwnld_start_time " +
- // " FROM cr_report_dwnld_log a, cr_report b where a.user_id = "+userID +" and "+
- // " a.rep_id = b.rep_id and (a.dwnld_start_time) >= to_date(to_char(sysdate-24/24, 'mm/dd/yyyy'),
- // 'mm/dd/yyyy') " +
- // " and a.record_ready_time is not null " +
- // " order by a.dwnld_start_time desc");
- // DataSet ds = DbUtils
- // .executeQuery(query.toString());
String sql = Globals.getLoadMyRecentLinks();
sql = sql.replace("[userID]", userID);
@@ -784,10 +747,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
String userID, String action, String executionTime, String form_fields) throws RaptorException {
if (form_fields.length() >= 4000)
form_fields = "";
- // String stmt = "INSERT INTO cr_report_log (rep_id, log_time, user_id, action, action_value,
- // form_fields) VALUES("
- // + reportID + ", SYSDATE, " + userID + ", '" + action + "' , '" + executionTime + "', '"+
- // form_fields +"')";
String stmt = Globals.getCreateReportLogEntry();
stmt = stmt.replace("[reportID]", reportID);
@@ -864,11 +823,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
* + nvls(reportId)+ " and rl.action != 'Report Run' and fuser.user_id = rl.user_id" );
* query.append(" ORDER BY rl.log_time DESC) x WHERE ROWNUM <= 100");
*/
- // DataSet ds = DbUtils
- // .executeQuery("SELECT x.log_time, x.user_id, x.action FROM (SELECT TO_CHAR(rl.log_time, 'Month
- // DD, YYYY HH:MI:SS AM') log_time, rl.user_id, rl.action FROM cr_report_log rl WHERE rl.rep_id = "
- // + nvls(reportId) + " ORDER BY rl.log_time DESC) x WHERE ROWNUM <= 100");
- // DataSet ds = DbUtils.executeQuery(query.toString());
String sql = Globals.getLoadReportLogEntries();
sql = sql.replace("[AppUtils.getRaptorActionURL()]", AppUtils.getRaptorActionURL());
@@ -893,9 +847,7 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
String userId = AppUtils.getUserID(request);
if (AppUtils.isAdminUser(request))
return true;
- // String query = "select crs.sched_user_id, count(*) from cr_report_schedule crs where
- // sched_user_id = " + userId + " group by crs.sched_user_id having count(*) >= " +
- // Globals.getScheduleLimit();
+
String query = Globals.getDoesUserCanScheduleReport();
query = query.replace("[userId]", userId);
query = query.replace("[Globals.getScheduleLimit()]", String.valueOf(Globals.getScheduleLimit()));
@@ -910,7 +862,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
logger.debug(EELFLoggerDelegate.debugLogger, ("scheduleId " + scheduleId));
if (scheduleId == null || scheduleId.trim().length() <= 0)
return !flagLimit;
- // query = "select crs.schedule_id from cr_report_schedule crs where schedule_id = " + scheduleId;
query = Globals.getDoesUserCanSchedule();
query = query.replace("[scheduleId]", scheduleId);
@@ -927,7 +878,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
}
public static String getSystemDateTime() throws RaptorException {
- // String query = "select to_char(sysdate,'MM/dd/yyyy HH24:mi:ss') from dual";
String query = Globals.getTheSystemDateTime();
DataSet ds = DbUtils.executeQuery(query);
@@ -940,7 +890,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
}
public static String getNextDaySystemDateTime() throws RaptorException {
- // String query = "select to_char(sysdate+1,'MM/dd/yyyy HH24:mi:ss') from dual";
String query = Globals.getTheNextDayDateTime();
DataSet ds = DbUtils.executeQuery(query);
String timeStr = "";
@@ -952,7 +901,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
}
public static String getNext15MinutesOfSystemDateTime() throws RaptorException {
- // String query = "select to_char(sysdate+15/(24*60),'MM/dd/yyyy HH24:mi:ss') from dual";
String query = Globals.getTheNextFifteenMinDateTime();
DataSet ds = DbUtils.executeQuery(query);
@@ -965,7 +913,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
}
public static String getNext30MinutesOfSystemDateTime() throws RaptorException {
- // String query = "select to_char(sysdate+30/(24*60),'MM/dd/yyyy HH24:mi:ss') from dual";
String query = Globals.getTheNextThirtyMinDateTime();
DataSet ds = DbUtils.executeQuery(query);
String timeStr = "";
@@ -997,7 +944,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
public static HashMap loadPDFImgLookUp() throws RaptorException {
StringBuffer query = new StringBuffer("");
HashMap pdfImgMap = new HashMap();
- // query.append("select image_id, image_loc from cr_raptor_pdf_img");
query.append(Globals.getLoadPdfImgLookup());
DataSet ds = DbUtils.executeQuery(query.toString());
for (int i = 0; i < ds.getRowCount(); i++) {
@@ -1009,7 +955,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
public static HashMap loadActionImgLookUp() throws RaptorException {
StringBuffer query = new StringBuffer("");
HashMap pdfImgMap = new HashMap();
- // query.append("select image_id, image_loc from cr_raptor_action_img");
query.append(Globals.getLoadActionImgLookup());
DataSet ds = DbUtils.executeQuery(query.toString());
for (int i = 0; i < ds.getRowCount(); i++) {
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/SearchHandler.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/SearchHandler.java
index 22108350..5d122cd3 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/SearchHandler.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/SearchHandler.java
@@ -176,48 +176,11 @@ public class SearchHandler extends org.onap.portalsdk.analytics.RaptorObject {
for (Iterator iter = AppUtils.getUserRoles(request).iterator(); iter.hasNext();)
roleList.append("," + ((String) iter.next()));
//<a href="#" alt="Run report" onClick="document.forma.r_action.value='report.run'; document.forma.c_master.value='1073';">
- /*String sql = "SELECT cr.rep_id, "
- + "cr.rep_id report_id, "
- + rep_title_sql+
- "||DECODE(cr.public_yn, 'Y', '', '"
- + PRIVATE_ICON
- + "')||cr.title||'</a>' title, "
- + "cr.descr, "
- + "au.first_name||' '||au.last_name owner_name, "
- + "TO_CHAR(cr.create_date, 'MM/DD/YYYY') create_date, "
- + "DECODE(NVL(cr.owner_id, cr.create_id), "
- + userID
- + ", 'N', NVL(ra.read_only_yn, 'Y')) read_only_yn, "
- + "DECODE(NVL(cr.owner_id, cr.create_id), "
- + userID
- + ", 'Y', 'N') user_is_owner_yn, "
- + "case when report_xml like '%<allowSchedule>N</allowSchedule>%' "
- + "then 'N' "
- + "when report_xml like '%<allowSchedule>Y</allowSchedule>%' "
- + "or 1 = (select distinct 1 from cr_report_schedule where rep_id = cr.rep_id) "
- + "then 'Y' "
- + "else 'N' end "
- + "FROM cr_report cr, "
- + "app_user au, "
- + "(SELECT rep_id, "
- + "MIN(read_only_yn) read_only_yn "
- + "FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = "
- + userID
- + ") "
- + "UNION ALL "
- + "(SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ("
- + roleList.toString() + "))" + ") report_access " + "GROUP BY rep_id) ra "
- + "WHERE TO_CHAR(cr.rep_id) = nvl('" + fReportID
- + "', TO_CHAR(cr.rep_id)) AND " + "UPPER(cr.title) LIKE UPPER('%"
- + fReportName + "%') AND " + "nvl(cr.owner_id, cr.create_id) = au.user_id "
- + "AND cr.rep_id = ra.rep_id (+) ";*/
-
String sql = Globals.getLoadReportSearchResult();
String rep_id = "";
String rep_id_sql_value = "";
String rep_id_options = "";
String rep_id_sql = Globals.getLoadReportSearchRepIdSql();
- //rep_id_sql = " AND ROUND(cr.rep_id, 0) like coalesce('%%', ROUND(cr.rep_id, 0)) ";
if(request.getParameter("rep_id")!=null) {
rep_id = request.getParameter("rep_id");
}
@@ -308,23 +271,14 @@ public class SearchHandler extends org.onap.portalsdk.analytics.RaptorObject {
sql = sql.replace("[fReportName]",rep_name_sql);
if (menuId.length() > 0){
- /*sql += "AND INSTR('|'||cr.menu_id||'|', '|'||'" + menuId + "'||'|') > 0 "
- * +"AND
- * cr.menu_approved_yn =
- * 'Y' "
- ;*/
String sql_add = Globals.getLoadReportSearchInstr();
sql+= sql_add;
}
- //String user_sql = " AND nvl(cr.owner_id, cr.create_id) = " + userID;
String user_sql = Globals.getLoadReportSearchResultUser();
- //String public_sql = " AND (nvl(cr.owner_id, cr.create_id) = " + userID
- // + " OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL)";
String public_sql = Globals.getLoadReportSearchResultPublic();
- //String fav_sql = " AND cr.rep_id in (select rep_id from cr_favorite_reports where user_id = " + userID +" ) ";
String fav_sql = Globals.getLoadReportSearchResultFav();
if (userOnly)
@@ -346,15 +300,12 @@ public class SearchHandler extends org.onap.portalsdk.analytics.RaptorObject {
// else - not super user - doesn't get access to private reports of
// other users (= Public reports); Admin users get edit right
// override later
- //sql += public_sql;
sql += " " + public_sql;
}
if (sortOrder.equals(AppConstants.RI_F_OWNER_ID)){
- //sql += " ORDER BY DECODE(nvl(cr.owner_id, cr.create_id), " + userID
- //+ ", ' ', upper(au.first_name||' '||au.last_name)), upper(cr.title)";
String sql_sort = Globals.getLoadReportSearchResultSort();
sql+=" " + sql_sort;
}
@@ -366,7 +317,6 @@ public class SearchHandler extends org.onap.portalsdk.analytics.RaptorObject {
sql += " ORDER BY cr.public_yn desc";
else
- // if(sortOrder.equals(AppConstants.RI_F_REPORT_NAME))
sql += " ORDER BY upper(cr.title)";
sql = sql.replace("[rep_title_sql]", "cr.title");
@@ -374,14 +324,10 @@ public class SearchHandler extends org.onap.portalsdk.analytics.RaptorObject {
sql = sql.replace("[userID]", userID);
sql = sql.replace("[roleList.toString()]", roleList.toString());
- //System.out.println("query is for search list is : " + sql);
DataSet ds = DbUtils.executeQuery(sql, rep_name_sql_value, rep_id_sql_value);
ReportSearchResultJSON rsr = new ReportSearchResultJSON(0, 6, 7);
rsr.parseData(ds, request, 0, 20, 6, 7);
- //saveCSVPageFile(request, rsr);
- //rsr.truncateToPage(pageNo);
- //saveCSVPageFile(request, rsr);
return rsr;
} // loadReportSearchResult
@@ -413,35 +359,6 @@ public class SearchHandler extends org.onap.portalsdk.analytics.RaptorObject {
for (Iterator iter = AppUtils.getUserRoles(request).iterator(); iter.hasNext();)
roleList.append("," + ((String) iter.next()));
//<a href="#" alt="Run report" onClick="document.forma.r_action.value='report.run'; document.forma.c_master.value='1073';">
- /*String sql = "SELECT cr.rep_id, "
- + "cr.rep_id report_id, "
- + rep_title_sql+
- "||DECODE(cr.public_yn, 'Y', '', '"
- + PRIVATE_ICON
- + "')||cr.title||'</a>' title, "
- + "cr.descr, "
- + "au.first_name||' '||au.last_name owner_name, "
- + "TO_CHAR(cr.create_date, 'MM/DD/YYYY') create_date, "
- + "DECODE(NVL(cr.owner_id, cr.create_id), "
- + userID
- + ", 'N', NVL(ra.read_only_yn, 'Y')) read_only_yn, "
- + "DECODE(NVL(cr.owner_id, cr.create_id), "
- + userID
- + ", 'Y', 'N') user_is_owner_yn "
- + "FROM cr_report cr, "
- + "app_user au, "
- + "(SELECT rep_id, "
- + "MIN(read_only_yn) read_only_yn "
- + "FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = "
- + userID
- + ") "
- + "UNION ALL "
- + "(SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ("
- + roleList.toString() + "))" + ") report_access " + "GROUP BY rep_id) ra "
- + "WHERE TO_CHAR(cr.rep_id) = nvl('" + fReportID
- + "', TO_CHAR(cr.rep_id)) AND " + "UPPER(cr.title) LIKE UPPER('%"
- + fReportName + "%') AND " + "nvl(cr.owner_id, cr.create_id) = au.user_id "
- + "AND cr.rep_id = ra.rep_id (+) ";*/
String sql = Globals.getLoadFolderReportResult();
sql = sql.replace("[rep_title_sql]", rep_title_sql);
@@ -452,20 +369,13 @@ public class SearchHandler extends org.onap.portalsdk.analytics.RaptorObject {
sql = sql.replace("[fReportName]", fReportName);
if (menuId.length() > 0){
- /*sql += "AND INSTR('|'||cr.menu_id||'|', '|'||'" + menuId + "'||'|') > 0 "
- * +"AND
- * cr.menu_approved_yn =
- * 'Y' "
- ;*/
+
String sql_add = Globals.getLoadReportSearchInstr();
sql+= sql_add;
}
- //String user_sql = " AND nvl(cr.owner_id, cr.create_id) = " + userID;
String user_sql = Globals.getLoadReportSearchResultUser();
- //String public_sql = " AND (nvl(cr.owner_id, cr.create_id) = " + userID
- // + " OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL)";
String public_sql = Globals.getLoadReportSearchResultPublic();
if (userOnly)
@@ -489,10 +399,6 @@ public class SearchHandler extends org.onap.portalsdk.analytics.RaptorObject {
if (sortOrder.equals(AppConstants.RI_F_OWNER_ID)){
-
- //sql += " ORDER BY DECODE(nvl(cr.owner_id, cr.create_id), " + userID
- // + ", ' ', au.first_name||' '||au.last_name), cr.title";
-
String sql_sort = Globals.getLoadFolderReportResultSort();
sql+=sql_sort;
}
@@ -503,10 +409,8 @@ public class SearchHandler extends org.onap.portalsdk.analytics.RaptorObject {
else if(sortOrder.equals(AppConstants.RI_F_PUBLIC))
sql += " ORDER BY cr.public_yn desc";
else
- // if(sortOrder.equals(AppConstants.RI_F_REPORT_NAME))
sql += " ORDER BY cr.title";
- //System.out.println("query is for search list is : " + sql);
DataSet ds = DbUtils.executeQuery(sql);
ReportSearchResult rsr = new ReportSearchResult(-1, 6, 7);
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java
index e9414163..1ef28a26 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java
@@ -144,8 +144,6 @@ public class IdNameSql extends IdNameList {
return "SELECT id, name FROM (" + sql + ") xid where id in [VALUE]";
}
-
- // public String getSqlNoOrderBy() { return sqlNoOrderBy; }
protected void setSql(String sql) {
this.sql = sql;
@@ -175,12 +173,6 @@ public class IdNameSql extends IdNameList {
removeAllElements();
} // clearData
-/* public void loadData(String pageNo, String searchString, String dbInfo, String userId) throws RaptorException {
- // setSql(searchString);
- loadUserData(pageNo, searchString, dbInfo,userId);
- } // loadData
-*/
-
public void loadUserData(String pageNo, String searchString, String dbInfo,String userId) throws RaptorException {
int iPageNo = 0;
@@ -208,11 +200,6 @@ public class IdNameSql extends IdNameList {
}
public void loadData(String searchString, int pageNo, String dbInfo) throws RaptorException {
-
- //boolean dataAlreadyLoaded = (this.pageNo == pageNo);
-
- //if (dataAlreadyLoaded)
- // return;
this.pageNo = pageNo;
@@ -262,7 +249,7 @@ public class IdNameSql extends IdNameList {
query.append(" LIMIT " + ((dataSize < 0) ? (endRow + 1) : endRow));
} else if(pageNo!=2 && (dbType.equals(AppConstants.MYSQL))) {
- query.append(" LIMIT " + startRow); //((dataSize < 0) ? (endRow + 1) : endRow)
+ query.append(" LIMIT " + startRow);
}
if(searchString!=null && searchString.length()>0 && !searchString.equals("%")) {
@@ -281,12 +268,6 @@ public class IdNameSql extends IdNameList {
boolean readOnly = true;
ds = ConnectionUtils.getDataSet(query.toString(), dbInfo);
- // if ( (dbInfo!=null) && (!dbInfo.equals(AppConstants.DB_LOCAL))) {
- // Globals.getRDbUtils().setDBPrefix(dbInfo);
- // ds = RemDbUtils.executeQuery(query);
- // }
- // else
- // ds = DbUtils.executeQuery(query);
clearData();
if (dbType.equals("DAYTONA") && (getDefaultSQL()!=null && getDefaultSQL().trim().toUpperCase().startsWith("SELECT"))) {
defaultQuery = getDefaultSQL();
@@ -301,18 +282,15 @@ public class IdNameSql extends IdNameList {
dsDefault = ConnectionUtils.getDataSet(defaultQuery, dbInfo);
if(dsDefault!=null && dsDefault.getRowCount()>0) {
for (int i = 0; i < dsDefault.getRowCount(); i++) {
- //addValue(dsDefault.getString(i, 0), dsDefault.getString(i, 1), true);
defaultMap.put(dsDefault.getString(i, "id"), dsDefault.getString(i, "name"));
}
}
}
for (int i = 0; i < ((pageNo!=-2)?Math.min(ds.getRowCount(), pageSize):ds.getRowCount()); i++) {
- //if(getCount()==0)
- // addValue(ds.getString(i, 0), ds.getString(i, 1));
if(i==0 && avail_ReadOnly)
readOnly = ds.getString(i, "ff_readonly").toUpperCase().startsWith("Y")||ds.getString(i, "ff_readonly").toUpperCase().startsWith("T");
- if(getCount()>=0) {//&& !((IdNameValue)getValue(0)).getId().equals(ds.getString(i, 0)))
+ if(getCount()>=0) {
if(defaultMap.get(ds.getString(i, "id")) == null)
if(avail_ReadOnly)
addValue(ds.getString(i, "id"), ds.getString(i, "name"), false, readOnly);
@@ -333,7 +311,6 @@ public class IdNameSql extends IdNameList {
else
dataSize = ds.getRowCount();
- //System.out.println("IDNAME SQL COUNT");*/
if(searchString!=null && searchString.length()>0 && !searchString.equals("%")) {
queryPop = new StringBuffer("");
queryPop.append("SELECT count(*) num_rows FROM ("+ Globals.getReportSqlForFormfield() +", name FROM (" + sql
@@ -349,21 +326,11 @@ public class IdNameSql extends IdNameList {
}
} else if(dataSizeUsedInPopup == -3) {
queryPop = new StringBuffer("");
- //System.out.println("IDNAME SQL COUNT");
- //queryPop.append("SELECT count(*) num_rows FROM ("+query.toString()+") x");
queryPop.append("SELECT count(*) num_rows FROM ("+ Globals.getReportSqlForFormfield() +", name FROM (" + sql
+ ") x ");
queryPop.append(") xx ");
ds = ConnectionUtils.getDataSet(queryPop.toString(), dbInfo);
- // if ( (dbInfo!=null) &&
- // (!dbInfo.equals(AppConstants.DB_LOCAL))) {
- // Globals.getRDbUtils().setDBPrefix(dbInfo);
- // ds = RemDbUtils.executeQuery(query);
- // }
- // else
- // ds = DbUtils.executeQuery(query);
- //
try {
dataSizeUsedInPopup = Integer.parseInt(ds.getString(0, 0));
} catch (NumberFormatException e) {
@@ -375,21 +342,11 @@ public class IdNameSql extends IdNameList {
//pageNo = 0;
if(pageNo!= -2) {
queryPop = new StringBuffer("");
- //System.out.println("IDNAME SQL COUNT");
- //queryPop.append("SELECT count(*) num_rows FROM ("+query.toString()+") x");
queryPop.append("SELECT count(*) num_rows FROM ("+ Globals.getReportSqlForFormfield() +" FROM (" + sql
+ ") x ");
queryPop.append(") xx ");
ds = ConnectionUtils.getDataSet(queryPop.toString(), dbInfo);
- // if ( (dbInfo!=null) &&
- // (!dbInfo.equals(AppConstants.DB_LOCAL))) {
- // Globals.getRDbUtils().setDBPrefix(dbInfo);
- // ds = RemDbUtils.executeQuery(query);
- // }
- // else
- // ds = DbUtils.executeQuery(query);
- //
try {
dataSize = Integer.parseInt(ds.getString(0, 0));
dataSizeUsedInPopup = Integer.parseInt(ds.getString(0, 0));
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java
index 217c81e8..ff8094fd 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java
@@ -393,7 +393,7 @@ public class ChartD3Helper {
}
// added to load all date elements
- HashMap<String, HashMap<String, String>> dataSeriesMap = new HashMap<String, HashMap<String, String>>();
+ HashMap<String, HashMap<String, String>> dataSeriesMap = new HashMap<>();
for (int i = 0; i < uniqueElements.length; i++) {
if(multipleSeries && (nvl(chartRightAxisLabel).length() > 0))
@@ -427,9 +427,9 @@ public class ChartD3Helper {
int formatFlag = 0;
- TreeSet<String> dateStrList = new TreeSet<String>();
+ TreeSet<String> dateStrList = new TreeSet<>();
// added to store all date elements
- SortedSet<String> sortSet = new TreeSet<String>();
+ SortedSet<String> sortSet = new TreeSet<>();
int count = 0;
if(flag!= 1) {
HashMap dataSeriesStrMap = new HashMap();
@@ -780,7 +780,7 @@ public class ChartD3Helper {
for (int i = 0; i < uniqueElements.length; i++) {
HashMap<String, String> dataMap = dataSeriesMap.get((String)uniqueElements[i]);
Set<String> keySet = dataMap.keySet();
- ArrayList<String> keySortedList = new ArrayList<String>(new TreeSet<String>(keySet));
+ ArrayList<String> keySortedList = new ArrayList<>(new TreeSet<String>(keySet));
for (int k=0; k < keySortedList.size(); k++) {
valueStr = dataSeriesMap.get((String)uniqueElements[i]).get(keySortedList.get(k));
@@ -1723,7 +1723,7 @@ public class ChartD3Helper {
double value = 0;
int flagNull = 0;
String COLOR = "";
- TreeSet<String> colorList = new TreeSet<String>();
+ TreeSet<String> colorList = new TreeSet<>();
for (int i = 0; i < ds.getRowCount(); i++) {
value = 0;
try {
@@ -1845,9 +1845,9 @@ public class ChartD3Helper {
int formatFlag = 0;
- TreeSet<String> dateStrList = new TreeSet<String>();
+ TreeSet<String> dateStrList = new TreeSet<>();
// added to store all date elements
- SortedSet<String> sortSet = new TreeSet<String>();
+ SortedSet<String> sortSet = new TreeSet<>();
int count = 0;
int flag = 0;
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java
index 6003222b..0caca218 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java
@@ -417,7 +417,7 @@ public class ChartJSONHelper {
List<DataColumnType> dcList = reportRuntime.getOnlyVisibleColumns();
int countIndex = 0;
- ArrayList<ChartColumnJSON> chartColumnJSONList = new ArrayList<ChartColumnJSON>();
+ ArrayList<ChartColumnJSON> chartColumnJSONList = new ArrayList<>();
for(Iterator iter = dcList.iterator(); iter.hasNext(); ) {
ChartColumnJSON ccJSON = new ChartColumnJSON();
DataColumnType dc = (DataColumnType) iter.next();
@@ -484,7 +484,7 @@ public class ChartJSONHelper {
if(chartValueCols.size() <= 0) {
chartValueCols = reportCols;
}
- ArrayList<RangeAxisJSON> rangeAxisJSONList = new ArrayList<RangeAxisJSON>();
+ ArrayList<RangeAxisJSON> rangeAxisJSONList = new ArrayList<>();
for (int k = 0; k < chartValueCols.size(); k++) {
dct_RangeAxis = chartValueCols.get(k);
RangeAxisJSON rangeAxisJSON = new RangeAxisJSON();
@@ -577,12 +577,12 @@ public class ChartJSONHelper {
chartJSON.setMaxRange(reportRuntime.getRangeAxisUpperLimit());
if(showData) {
- ArrayList<ArrayList<Row>> wholeList = new ArrayList<ArrayList<Row>>();
+ ArrayList<ArrayList<Row>> wholeList = new ArrayList<>();
- ArrayList<Row> rowList = new ArrayList<Row>();
+ ArrayList<Row> rowList = new ArrayList<>();
if(showData) {
for (int i = 0; i < ds.getRowCount(); i++) {
- rowList = new ArrayList<Row>();
+ rowList = new ArrayList<>();
for (int j = 0; j<ds.getColumnCount(); j++) {
Row row = new Row();
row.setColId(ds.getColumnName(j));
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java
index 73387b20..b6f944a7 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java
@@ -949,7 +949,7 @@ public class ReportRuntime extends ReportWrapper implements Cloneable, Serializa
//Collections.sort((List)dataList, new DataRowComparable());
DataRow drInFor1 = null;
Vector<DataValue> v1= null, v2 = null;
- ArrayList<String> temp = new ArrayList<String>();
+ ArrayList<String> temp = new ArrayList<>();
if (Globals.getMergeCrosstabRowHeadings()) {
for (int i = 0; i < dataList.size(); i++) {
drInFor1 = (DataRow)dataList.get(i);
@@ -2684,12 +2684,12 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep
reportJSONRuntime.setHideFormFieldsAfterRun(isHideFormFieldAfterRun());
reportJSONRuntime.setDisplayExcel(!isDisplayOptionHideExcelIcons());
reportJSONRuntime.setDisplayPDF(!isDisplayOptionHidePDFIcons());
- ArrayList<IdNameValue> formFieldValues = new ArrayList<IdNameValue>();
- ArrayList<FormFieldJSON> formFieldJSONList = new ArrayList<FormFieldJSON>();
+ ArrayList<IdNameValue> formFieldValues = new ArrayList<>();
+ ArrayList<FormFieldJSON> formFieldJSONList = new ArrayList<>();
if(getReportFormFields()!=null) {
- formFieldJSONList = new ArrayList<FormFieldJSON>(getReportFormFields().size());
+ formFieldJSONList = new ArrayList<>(getReportFormFields().size());
for (Iterator iter = getReportFormFields().iterator(); iter.hasNext();) {
- formFieldValues = new ArrayList<IdNameValue>();
+ formFieldValues = new ArrayList<>();
FormField ff = (FormField) iter.next();
ff.setDbInfo(getDbInfo());
FormFieldJSON ffJSON = new FormFieldJSON();
@@ -2789,8 +2789,8 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep
if(rd!=null) {
count = 0;
reportJSONRuntime.setTotalRows(getReportDataSize());
- ArrayList<ColumnHeader> colList = new ArrayList<ColumnHeader>();
- ArrayList<Map<String,Object>> reportDataRows = new ArrayList<Map<String,Object>>();
+ ArrayList<ColumnHeader> colList = new ArrayList<>();
+ ArrayList<Map<String,Object>> reportDataRows = new ArrayList<>();
for(rd.reportColumnHeaderRows.resetNext(); rd.reportColumnHeaderRows.hasNext(); ) {
count++;
ColumnHeaderRow chr = rd.reportColumnHeaderRows.getNext();
@@ -2801,7 +2801,7 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep
if(getReportDataSize() > 0) {
count = 0;
for(rd.reportDataRows.resetNext(); rd.reportDataRows.hasNext(); count++) {
- dvJSON = new HashMap<String,Object>();
+ dvJSON = new HashMap<>();
DataRow dr = rd.reportDataRows.getNext();
for(dr.resetNext(); dr.hasNext(); ) {
DataValue dv = dr.getNext();
@@ -2840,12 +2840,12 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep
reportJSONRuntime.setReportSubTitle(getReportSubTitle());
reportJSONRuntime.setAllowEdit(isAllowEdit(request));
reportJSONRuntime.setNumFormCols(getNumFormColsAsInt());
- ArrayList<IdNameValue> formFieldValues = new ArrayList<IdNameValue>();
- ArrayList<FormFieldJSON> formFieldJSONList = new ArrayList<FormFieldJSON>();
+ ArrayList<IdNameValue> formFieldValues = new ArrayList<>();
+ ArrayList<FormFieldJSON> formFieldJSONList = new ArrayList<>();
if(reportFormFields!=null) {
- formFieldJSONList = new ArrayList<FormFieldJSON>(reportFormFields.size());
+ formFieldJSONList = new ArrayList<>(reportFormFields.size());
for (Iterator iter = reportFormFields.iterator(); iter.hasNext();) {
- formFieldValues = new ArrayList<IdNameValue>();
+ formFieldValues = new ArrayList<>();
FormField ff = (FormField) iter.next();
FormFieldJSON ffJSON = new FormFieldJSON();
ffJSON.setFieldId(ff.getFieldName());
@@ -2858,7 +2858,7 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep
formFieldJSONList.add(ffJSON);
}
for (Iterator iter = reportFormFields.iterator(); iter.hasNext();) {
- formFieldValues = new ArrayList<IdNameValue>();
+ formFieldValues = new ArrayList<>();
FormField ff = (FormField) iter.next();
ff.setDbInfo(getDbInfo());
for (Iterator iter1 = formFieldJSONList.iterator(); iter1.hasNext();) {
@@ -2895,7 +2895,7 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep
lookup.trimToSize();
String requestValue = request.getParameter(ff.getFieldName());
- ArrayList<String> requestValueList = new ArrayList<String>();
+ ArrayList<String> requestValueList = new ArrayList<>();
requestValueList.add(requestValue);
/*if(ff.isTriggerThisFormfield()) {
@@ -2954,7 +2954,7 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep
private String parseAndFillOtherFormfieldValues(HttpServletRequest request, String SQL, String userId,
ArrayList<FormFieldJSON> formFieldJSONList) {
- ArrayList<IdNameValue> formFieldValues = new ArrayList<IdNameValue>();
+ ArrayList<IdNameValue> formFieldValues = new ArrayList<>();
String selectedValue = "";
String displayName = "";
for (Iterator iter1 = formFieldJSONList.iterator(); iter1.hasNext();) {
@@ -3028,7 +3028,7 @@ public String parseAndFillWithCurrentValues(HttpServletRequest request, String s
String fieldId = fft.getFieldId();
String fieldDisplay = getFormFieldDisplayName(fft);
String formfield_value = "";
- List<String> selectedItems = new ArrayList<String>();
+ List<String> selectedItems = new ArrayList<>();
//Added so that Combo Box in old RAPTOR definition is translated to List box
if(fft.getFieldType().equals(FormField.FFT_COMBO_BOX)) {
fft.setFieldType(FormField.FFT_LIST_BOX);
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultJSON.java
index 3148d277..586ec580 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultJSON.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultJSON.java
@@ -41,9 +41,9 @@ import java.util.ArrayList;
public class SearchResultJSON{
- public ArrayList<SearchResultColumn> searchResultColumns = new ArrayList<SearchResultColumn>();
+ public ArrayList<SearchResultColumn> searchResultColumns = new ArrayList<>();
- public ArrayList<SearchResultRow> searchResultRows = new ArrayList<SearchResultRow>();
+ public ArrayList<SearchResultRow> searchResultRows = new ArrayList<>();
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/scheduler/SendEmail.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/scheduler/SendEmail.java
index 144c6ea8..1e0f574b 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/scheduler/SendEmail.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/scheduler/SendEmail.java
@@ -71,7 +71,7 @@ SchedulerUtil schedulerUtil;
public void sendEmail( String p_mail_server, String p_sender, String p_subject, String p_mail_text, String p_url, int p_file_type, int p_schedule_id, int p_time_interval, boolean p_send_attachment, int connectionTimeout) throws SQLException, ReportSQLException{
String allEmailAddr = "";
- final List<String> emailArr = new ArrayList<String>();
+ final List<String> emailArr = new ArrayList<>();
//int count1 = 0;
String schedular_email;
@@ -160,8 +160,8 @@ SchedulerUtil schedulerUtil;
//v_hist_rec.file_blob = response.toString();
//v_hist_rec.file_size = v_hist_rec.file_blob.length();
- List<Object> params = new ArrayList<Object>();
- List<Integer> types = new ArrayList<Integer>();
+ List<Object> params = new ArrayList<>();
+ List<Integer> types = new ArrayList<>();
prepareHisRecUpdate(v_hist_rec, params, types);
schedulerUtil
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java
index 211e098e..9791080f 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java
@@ -106,7 +106,7 @@ public class RaptorAdapter extends FusionAdapter {
/** Obtains user name by ID */
public static String getUserName(String userId) {
- Map<String, Long> params = new HashMap<String, Long>();
+ Map<String, Long> params = new HashMap<>();
params.put(USER_ID, new Long(userId));
List list = getDataAccessService().executeNamedQuery("getUserNameById", params, null);
@@ -129,7 +129,7 @@ public class RaptorAdapter extends FusionAdapter {
}
public static String getUserEmail(String userId) {
- Map<String, Long> params = new HashMap<String, Long>();
+ Map<String, Long> params = new HashMap<>();
params.put(USER_ID, new Long(userId));
List list = getDataAccessService().executeNamedQuery("getUserEmail", params, null);
String email = "";
@@ -204,7 +204,7 @@ public class RaptorAdapter extends FusionAdapter {
/** Obtains role name by ID */
public static String getRoleName(String roleId) {
- Map<String, Long> params = new HashMap<String, Long>();
+ Map<String, Long> params = new HashMap<>();
params.put("role_id", new Long(roleId));
List list = getDataAccessService().executeNamedQuery("getRoleNameById", params, null);
@@ -224,7 +224,7 @@ public class RaptorAdapter extends FusionAdapter {
public static Map<Long, String> getAllRolesUsingCustomizedQuery(String customizedQuery, String param, boolean isAdmin) {
List roles = null;
- Map<Long, String> map = new LinkedHashMap<Long, String>();
+ Map<Long, String> map = new LinkedHashMap<>();
if(customizedQuery.length()>0 && !isAdmin) {
@@ -307,7 +307,7 @@ public class RaptorAdapter extends FusionAdapter {
public static Set<Long> getActiveUsersRoleIds(Long userId) {
Set<Role> allActiveUserRoles = getActiveUserRoles(userId);
Iterator<Role> allActiveUserRolesIterator = allActiveUserRoles.iterator();
- Set<Long> allActiveUserRoleIds = new TreeSet<Long>();
+ Set<Long> allActiveUserRoleIds = new TreeSet<>();
while(allActiveUserRolesIterator.hasNext()){
Role role = allActiveUserRolesIterator.next();
allActiveUserRoleIds.add(role.getId());
@@ -319,7 +319,7 @@ public class RaptorAdapter extends FusionAdapter {
public static Set<Long> getActiveUserRoleIds(Long userId) {
Set<Role> allActiveUserRoles = getActiveUserRoles(userId);
Iterator<Role> allActiveUserRolesIterator = allActiveUserRoles.iterator();
- Set<Long> allActiveUserRoleIds = new TreeSet<Long>();
+ Set<Long> allActiveUserRoleIds = new TreeSet<>();
while(allActiveUserRolesIterator.hasNext()){
Role role = allActiveUserRolesIterator.next();
allActiveUserRoleIds.add(role.getId());
@@ -331,7 +331,7 @@ public class RaptorAdapter extends FusionAdapter {
public static Set<RoleFunction> getActiveRoleFunctions(Long userId) {
Set<Role> allActiveUserRoles = getActiveUserRoles(userId);
Iterator<Role> allActiveUserRolesIterator = allActiveUserRoles.iterator();
- Set<RoleFunction> allActiveRoleFunctions = new TreeSet<RoleFunction>();
+ Set<RoleFunction> allActiveRoleFunctions = new TreeSet<>();
while(allActiveUserRolesIterator.hasNext()){
Role role = allActiveUserRolesIterator.next();
allActiveRoleFunctions.addAll(role.getRoleFunctions());
@@ -342,7 +342,7 @@ public class RaptorAdapter extends FusionAdapter {
public static Set<Role> getActiveUserRoles(Long userId) {
User user = (User)getDataAccessService().getDomainObject(User.class,userId,null);
- Set<Role> allActiveUserRoles = new TreeSet<Role>();
+ Set<Role> allActiveUserRoles = new TreeSet<>();
allActiveUserRoles.addAll(user.getRoles());
Iterator<Role> userRolesIterator = user.getRoles().iterator();
while(userRolesIterator.hasNext()){
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/controller/FileServletController.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/controller/FileServletController.java
index a03c9539..444b8afc 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/controller/FileServletController.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/controller/FileServletController.java
@@ -131,7 +131,7 @@ public class FileServletController {
return null;
} catch (Exception e) {
logger.error(EELFLoggerDelegate.debugLogger, ("Exception occurred..." + e.getMessage()));
- Map<String, Object> errView = new HashMap<String, Object>();
+ Map<String, Object> errView = new HashMap<>();
errView.put("error", "The requested resource was not found.");
//return new ModelAndView(getExceptionView(), "model", errView);
return null;
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java
index 178a4c27..ae9d39a1 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java
@@ -1309,7 +1309,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
public @ResponseBody Map<String,String> removeSelectedReportRole(
@RequestBody String roleIdToRemove, HttpServletRequest request, HttpServletResponse response)
{
- Map<String, String> JsonResponse = new HashMap<String, String>();
+ Map<String, String> JsonResponse = new HashMap<>();
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(AppConstants.SI_REPORT_DEFINITION);
try {
JsonResponse.put("status","success");
@@ -1382,7 +1382,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
@PathVariable("roleID") String roleId,
@RequestBody String readOnly, HttpServletRequest request, HttpServletResponse response)
{
- Map<String, String> JsonResponse = new HashMap<String, String>();
+ Map<String, String> JsonResponse = new HashMap<>();
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(AppConstants.SI_REPORT_DEFINITION);
try {
String action ="";
@@ -1475,7 +1475,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
int iCount = 0;
for(Iterator iter=reportUsers.iterator(); iter.hasNext(); iCount++) {
- Map<String, String> reportUserMap = new HashMap<String,String>();
+ Map<String, String> reportUserMap = new HashMap<>();
SecurityEntry rUser = (SecurityEntry) iter.next();
reportUserMapList.add(rUser);
}
@@ -1566,7 +1566,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
wizardJSON.setDbInfo((rdef != null) ? rdef.getDBInfo() : "");
wizardJSON.setFormHelpText((rdef != null) ? rdef.getFormHelpText() : "");
wizardJSON.setPageSize((rdef != null) ? rdef.getPageSize() : 50);
- List<IdNameBooleanJSON> displayArea = new ArrayList<IdNameBooleanJSON>();
+ List<IdNameBooleanJSON> displayArea = new ArrayList<>();
IdNameBooleanJSON idNameJSON = new IdNameBooleanJSON();
String qMenu = "";
for (int i = 0; i < AppUtils.getQuickLinksMenuIDs().size(); i++) {
@@ -1585,7 +1585,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
wizardJSON.setFrozenColumns((rdef != null) ? rdef.getFrozenColumns() : 0);
wizardJSON.setDataGridAlign((rdef != null) ? rdef.getDataGridAlign() : "left");
wizardJSON.setEmptyMessage((rdef != null) ? rdef.getEmptyMessage() : "No records found");
- List<NameBooleanJSON> displayOptions = new ArrayList<NameBooleanJSON>();
+ List<NameBooleanJSON> displayOptions = new ArrayList<>();
NameBooleanJSON nameBooleanJSON = new NameBooleanJSON();
nameBooleanJSON.setName("HideFormFields");
nameBooleanJSON.setSelected((rdef != null) ? rdef.isDisplayOptionHideForm() : false);
@@ -1621,7 +1621,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
String schemaSql = Globals.getRemoteDbSchemaSql();
DataSet ds = null;
- ArrayList<IdNameBooleanJSON> dbInfoList = new ArrayList<IdNameBooleanJSON>();
+ ArrayList<IdNameBooleanJSON> dbInfoList = new ArrayList<>();
try {
ds = DbUtils.executeQuery(schemaSql);
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/AppConstants.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/AppConstants.java
index 0002ea5b..dc90de77 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/AppConstants.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/AppConstants.java
@@ -62,394 +62,394 @@ import org.onap.portalsdk.analytics.model.base.IdNameList;
public class AppConstants {
// Session attribute IDs
- public final static String SI_BACKUP_FOR_REP_ID = "backup_for_report_id";
- public final static String SI_DASHBOARD_REP_ID = "dashboard_report_id";
- public final static String SI_DASHBOARD_REPORTRUNTIME_MAP = "dashboardReportRuntimeMap";
- public final static String SI_DASHBOARD_REPORTDATA_MAP = "dashboardReportDataMap";
- public final static String SI_DASHBOARD_CHARTDATA_MAP = "dashboardChartDataMap";
- public final static String SI_DASHBOARD_DISPLAYTYPE_MAP = "dashboardDisplayTypeMap";
- public final static String SI_DASHBOARD_REPORTRUNTIME = "dashboardRuntime";
- public final static String EMBEDDED_REPORTRUNTIME_MAP = "embeddedReportRuntimeMap";
- public final static String EMBEDDED_REPORTDATA_MAP = "embeddedReportDataMap";
+ public static final String SI_BACKUP_FOR_REP_ID = "backup_for_report_id";
+ public static final String SI_DASHBOARD_REP_ID = "dashboard_report_id";
+ public static final String SI_DASHBOARD_REPORTRUNTIME_MAP = "dashboardReportRuntimeMap";
+ public static final String SI_DASHBOARD_REPORTDATA_MAP = "dashboardReportDataMap";
+ public static final String SI_DASHBOARD_CHARTDATA_MAP = "dashboardChartDataMap";
+ public static final String SI_DASHBOARD_DISPLAYTYPE_MAP = "dashboardDisplayTypeMap";
+ public static final String SI_DASHBOARD_REPORTRUNTIME = "dashboardRuntime";
+ public static final String EMBEDDED_REPORTRUNTIME_MAP = "embeddedReportRuntimeMap";
+ public static final String EMBEDDED_REPORTDATA_MAP = "embeddedReportDataMap";
- public final static String DRILLDOWN_INDEX = "drilldown_index";
- public final static String FORM_DRILLDOWN_INDEX = "form_drilldown_index";
+ public static final String DRILLDOWN_INDEX = "drilldown_index";
+ public static final String FORM_DRILLDOWN_INDEX = "form_drilldown_index";
- public final static String DRILLDOWN_REPORTS_LIST = "drilldownReportsList";
+ public static final String DRILLDOWN_REPORTS_LIST = "drilldownReportsList";
- public final static String SI_REPORT_RUN_BACKUP = "report_runtime_backup";
+ public static final String SI_REPORT_RUN_BACKUP = "report_runtime_backup";
- public final static String SI_REPORT_RUNTIME = "report_runtime";
+ public static final String SI_REPORT_RUNTIME = "report_runtime";
- public final static String SI_FORMFIELD_INFO = "formfield_info";
+ public static final String SI_FORMFIELD_INFO = "formfield_info";
- public final static String SI_FORMFIELD_DOWNLOAD_INFO = "formfield_download_info";
+ public static final String SI_FORMFIELD_DOWNLOAD_INFO = "formfield_download_info";
- public final static String SI_REPORT_DEFINITION = "report_definition";
+ public static final String SI_REPORT_DEFINITION = "report_definition";
- public final static String SI_DATA_SIZE_FOR_TEXTFIELD_POPUP = "dataSizeForPopUp";
+ public static final String SI_DATA_SIZE_FOR_TEXTFIELD_POPUP = "dataSizeForPopUp";
- public final static String SI_MAP_OBJECT = "novamap";
+ public static final String SI_MAP_OBJECT = "novamap";
- public final static String SI_MAP = "raptorMap";
+ public static final String SI_MAP = "raptorMap";
// Added for Adhoc Scheduling
- public final static String SI_REPORT_SCHEDULE = "report_schedule";
+ public static final String SI_REPORT_SCHEDULE = "report_schedule";
- public final static String SI_COLUMN_LOOKUP = "column_lookup";
+ public static final String SI_COLUMN_LOOKUP = "column_lookup";
// Request attribute IDs
- public final static String RI_ACTION = "r_action";
+ public static final String RI_ACTION = "r_action";
- public final static String RI_JAVASCRIPT_ITEM_ID = "javascriptItemId";
+ public static final String RI_JAVASCRIPT_ITEM_ID = "javascriptItemId";
// added for form field chaining in schedule tab
- public final static String SCHEDULE_ACTION = "N";
+ public static final String SCHEDULE_ACTION = "N";
- public final static String RI_REFRESH = "refresh";
+ public static final String RI_REFRESH = "refresh";
- public final static String RI_EXCEPTION = "c_exception";
+ public static final String RI_EXCEPTION = "c_exception";
- public final static String RI_ERROR_LIST = "c_error_list";
+ public static final String RI_ERROR_LIST = "c_error_list";
- public final static String RI_REPORT_ID = "c_master"; // should be
+ public static final String RI_REPORT_ID = "c_master"; // should be
// reportID not
// c_master
- public final static String RI_DASHBOARD_ID = "c_dashboard";
+ public static final String RI_DASHBOARD_ID = "c_dashboard";
- public final static String RI_DETAIL_ID = "c_detail"; // should be
+ public static final String RI_DETAIL_ID = "c_detail"; // should be
// detailID not
// c_detail
- public final static String RI_REPORT_DATA = "report_data";
+ public static final String RI_REPORT_DATA = "report_data";
- public final static String RI_REPORT_DATA_WHOLE = "report_data_whole";
+ public static final String RI_REPORT_DATA_WHOLE = "report_data_whole";
- public final static String RI_REPORT_SQL_WHOLE = "report_sql_whole";
+ public static final String RI_REPORT_SQL_WHOLE = "report_sql_whole";
- public final static String RI_CHART_DATA = "chart_data";
+ public static final String RI_CHART_DATA = "chart_data";
- public final static String RI_CHART_FORECAST_DATA = "chart_forecast_data";
+ public static final String RI_CHART_FORECAST_DATA = "chart_forecast_data";
- public final static String RI_CHART_TOTAL_COL = "chart_total"; // to show sub-totals
+ public static final String RI_CHART_TOTAL_COL = "chart_total"; // to show sub-totals
- public final static String RI_CHART_COLOR = "chart_color"; // to specify colors
+ public static final String RI_CHART_COLOR = "chart_color"; // to specify colors
- public final static String RI_CHART_INCLUDE = "chart_include"; //
+ public static final String RI_CHART_INCLUDE = "chart_include"; //
- public final static String RI_CHART_MARKER_START = "chart_marker_start"; //marker line
+ public static final String RI_CHART_MARKER_START = "chart_marker_start"; //marker line
- public final static String RI_CHART_MARKER_END = "chart_marker_end"; //marker line
+ public static final String RI_CHART_MARKER_END = "chart_marker_end"; //marker line
- public final static String RI_CHART_MARKER_TEXT_LEFT = "chart_marker_text_left"; //marker line
+ public static final String RI_CHART_MARKER_TEXT_LEFT = "chart_marker_text_left"; //marker line
- public final static String RI_CHART_MARKER_TEXT_RIGHT = "chart_marker_text_right"; //marker line
+ public static final String RI_CHART_MARKER_TEXT_RIGHT = "chart_marker_text_right"; //marker line
- public final static String RI_ANOMALY_TEXT = "anomaly_text"; //marker line
+ public static final String RI_ANOMALY_TEXT = "anomaly_text"; //marker line
- public final static String RI_JAVASCRIPT = "javascriptElement";
+ public static final String RI_JAVASCRIPT = "javascriptElement";
- public final static String RI_PAGE_TITLE = "title";
+ public static final String RI_PAGE_TITLE = "title";
- public final static String RI_PAGE_SUBTITLE = "subtitle";
+ public static final String RI_PAGE_SUBTITLE = "subtitle";
- public final static String RI_NEXT_PAGE = "r_page";
+ public static final String RI_NEXT_PAGE = "r_page";
- public final static String RI_PAGE_SIZE = "r_page_size";
+ public static final String RI_PAGE_SIZE = "r_page_size";
- public final static String RI_RECORD_NO = "r_record";
+ public static final String RI_RECORD_NO = "r_record";
- public final static String RI_NEXT_PAGE_SET = "r_page_set";
+ public static final String RI_NEXT_PAGE_SET = "r_page_set";
- public final static String RI_DATA_SIZE = "r_data_size";
+ public static final String RI_DATA_SIZE = "r_data_size";
- public final static String RI_SORT_ORDER = "sort_order";
+ public static final String RI_SORT_ORDER = "sort_order";
- public final static String RI_USER_REPORTS = "user_reports";
+ public static final String RI_USER_REPORTS = "user_reports";
- public final static String RI_PUBLIC_REPORTS = "public_reports";
+ public static final String RI_PUBLIC_REPORTS = "public_reports";
- public final static String RI_FAVORITE_REPORTS = "favorite_reports";
+ public static final String RI_FAVORITE_REPORTS = "favorite_reports";
- public final static String RI_F_REPORT_ID = "f_report_id";
+ public static final String RI_F_REPORT_ID = "f_report_id";
- public final static String RI_F_REPORT_NAME = "f_report_name";
+ public static final String RI_F_REPORT_NAME = "f_report_name";
- public final static String RI_F_REPORT_CREATE_DATE = "f_report_create_date";
+ public static final String RI_F_REPORT_CREATE_DATE = "f_report_create_date";
- public final static String RI_F_PUBLIC = "f_public";
+ public static final String RI_F_PUBLIC = "f_public";
- public final static String RI_F_OWNER_ID = "f_owner_id";
+ public static final String RI_F_OWNER_ID = "f_owner_id";
- public final static String RI_SEARCH_RESULT = "search_result";
+ public static final String RI_SEARCH_RESULT = "search_result";
- public final static String RI_JS_TARGET_FIELD = "js_target_field";
+ public static final String RI_JS_TARGET_FIELD = "js_target_field";
- public final static String RI_FIELD_NAME = "field_name";
+ public static final String RI_FIELD_NAME = "field_name";
- public final static String RI_COLUMN_ID = "column_id";
+ public static final String RI_COLUMN_ID = "column_id";
- public final static String RI_ARG_TYPE = "arg_type";
+ public static final String RI_ARG_TYPE = "arg_type";
- public final static String RI_VIEW_ACTION = "view_action";
+ public static final String RI_VIEW_ACTION = "view_action";
- public final static String RI_SOURCE_PAGE = "source_page";
+ public static final String RI_SOURCE_PAGE = "source_page";
- public final static String RI_GO_TO_STEP = "go_to_step";
+ public static final String RI_GO_TO_STEP = "go_to_step";
- public final static String RI_WIZARD_ACTION = "wizard_action";
+ public static final String RI_WIZARD_ACTION = "wizard_action";
- public final static String RI_FORMATTED_SQL = "formatted_sql";
+ public static final String RI_FORMATTED_SQL = "formatted_sql";
- public final static String RI_DATA_SET = "data_set";
+ public static final String RI_DATA_SET = "data_set";
- public final static String RI_FORM_FIELDS = "form_fields";
+ public static final String RI_FORM_FIELDS = "form_fields";
- public final static String RI_DISPLAY_CONTENT = "display_content";
+ public static final String RI_DISPLAY_CONTENT = "display_content";
- public final static String RI_SHOW_BACK_BTN = "show_back_btn";
+ public static final String RI_SHOW_BACK_BTN = "show_back_btn";
- public final static String RI_GO_BACK = "go_back";
+ public static final String RI_GO_BACK = "go_back";
- public final static String RI_RESET_PARAMS = "reset_params";
+ public static final String RI_RESET_PARAMS = "reset_params";
- public final static String RI_RESET_ACTION = "reset_action";
+ public static final String RI_RESET_ACTION = "reset_action";
- public final static String RI_VISUAL_ACTION = "v_action";
+ public static final String RI_VISUAL_ACTION = "v_action";
- public final static String RI_SEARCH_STRING = "search_string";
+ public static final String RI_SEARCH_STRING = "search_string";
- public final static String RI_CONTAIN_FLAG = "contain_flag";
+ public static final String RI_CONTAIN_FLAG = "contain_flag";
- public final static String RI_TABLE_NAME = "table_name";
+ public static final String RI_TABLE_NAME = "table_name";
- public final static String RI_DISPLAY_CHART = "display_chart";
+ public static final String RI_DISPLAY_CHART = "display_chart";
- public final static String RI_CHK_FIELD_SQL = "check_field_sql";
+ public static final String RI_CHK_FIELD_SQL = "check_field_sql";
- public final static String RI_EDIT_LINK = "edit_link";
+ public static final String RI_EDIT_LINK = "edit_link";
- public final static String RI_SCHEDULE_LINK = "schedule_link";
+ public static final String RI_SCHEDULE_LINK = "schedule_link";
- public final static String RI_LIST_CATEGORY = "raptor_list_category";
+ public static final String RI_LIST_CATEGORY = "raptor_list_category";
- public final static String RI_SCHEDULE_ID = "c_schedule"; // should be
+ public static final String RI_SCHEDULE_ID = "c_schedule"; // should be
// reportID not
// c_master
- public final static String RI_TEXTFIELD_POP = "forTextFieldPopUp"; // should be
+ public static final String RI_TEXTFIELD_POP = "forTextFieldPopUp"; // should be
// Visualization actions
- public final static String VA_SHOW = "Show";
+ public static final String VA_SHOW = "Show";
- public final static String VA_HIDE = "Hide";
+ public static final String VA_HIDE = "Hide";
- public final static String VA_SORT = "Sort";
+ public static final String VA_SORT = "Sort";
- public final static String HIDDEN = "Hidden";
+ public static final String HIDDEN = "Hidden";
// Wizard steps
- public final static String WS_DEFINITION = "Definition";
+ public static final String WS_DEFINITION = "Definition";
- public final static String WS_TABLES = "Tables";
+ public static final String WS_TABLES = "Tables";
- public final static String WS_SQL = "SQL";
+ public static final String WS_SQL = "SQL";
- public final static String WS_COLUMNS = "Columns";
+ public static final String WS_COLUMNS = "Columns";
- public final static String WS_FORM_FIELDS = "Form Fields";
+ public static final String WS_FORM_FIELDS = "Form Fields";
- public final static String WS_FILTERS = "Filters";
+ public static final String WS_FILTERS = "Filters";
- public final static String WS_JAVASCRIPT = "Javascript";
+ public static final String WS_JAVASCRIPT = "Javascript";
- public final static String WS_SORTING = "Sorting";
+ public static final String WS_SORTING = "Sorting";
- public final static String WS_CHART = "Chart";
+ public static final String WS_CHART = "Chart";
- public final static String WS_USER_ACCESS = "Security";
+ public static final String WS_USER_ACCESS = "Security";
- public final static String WS_DATA_FORECASTING = "Forecasting";
+ public static final String WS_DATA_FORECASTING = "Forecasting";
- public final static String WS_SCHEDULE = "Schedule";
+ public static final String WS_SCHEDULE = "Schedule";
- public final static String WS_REPORT_LOG = "Log";
+ public static final String WS_REPORT_LOG = "Log";
- public final static String WS_RUN = "Run";
+ public static final String WS_RUN = "Run";
/*****for report map******/
- public final static String WS_MAP = "Map";
+ public static final String WS_MAP = "Map";
// Wizard sub-steps
- public final static String WSS_ADD = "Add";
+ public static final String WSS_ADD = "Add";
- public final static String WSS_ADD_MULTI = "Add Multiple";
+ public static final String WSS_ADD_MULTI = "Add Multiple";
- public final static String WSS_ORDER_ALL = "Re-order All";
+ public static final String WSS_ORDER_ALL = "Re-order All";
- public final static String WSS_EDIT = "Edit";
+ public static final String WSS_EDIT = "Edit";
- public final static String WSS_DELETE = "Delete";
+ public static final String WSS_DELETE = "Delete";
- public final static String WSS_ADD_BLANK = "Add Blank";
+ public static final String WSS_ADD_BLANK = "Add Blank";
- public final static String WSS_INFO_BAR = "Display parameters";
+ public static final String WSS_INFO_BAR = "Display parameters";
// Wizard actions
- public final static String WA_NEXT = "Next";
+ public static final String WA_NEXT = "Next";
- public final static String WA_BACK = "Back";
+ public static final String WA_BACK = "Back";
- public final static String WA_ADD = "Add";
+ public static final String WA_ADD = "Add";
- public final static String WA_ADD_MULTI = "Add Multiple";
+ public static final String WA_ADD_MULTI = "Add Multiple";
- public final static String WA_ORDER_ALL = "Re-order All";
+ public static final String WA_ORDER_ALL = "Re-order All";
- public final static String WA_EDIT = "Edit";
+ public static final String WA_EDIT = "Edit";
- public final static String WA_MODIFY = "Modify";
+ public static final String WA_MODIFY = "Modify";
- public final static String WA_DELETE = "Delete";
+ public static final String WA_DELETE = "Delete";
- public final static String WA_SAVE = "Save";
+ public static final String WA_SAVE = "Save";
- public final static String WA_MOVE_UP = "Move Up";
+ public static final String WA_MOVE_UP = "Move Up";
- public final static String WA_MOVE_DOWN = "Move Down";
+ public static final String WA_MOVE_DOWN = "Move Down";
- public final static String WA_ADD_USER = "Add User";
+ public static final String WA_ADD_USER = "Add User";
- public final static String WA_DELETE_USER = "Delete User";
+ public static final String WA_DELETE_USER = "Delete User";
- public final static String WA_GRANT_USER = "Grant User Access";
+ public static final String WA_GRANT_USER = "Grant User Access";
- public final static String WA_REVOKE_USER = "Revoke User Access";
+ public static final String WA_REVOKE_USER = "Revoke User Access";
- public final static String WA_ADD_ROLE = "Add Role";
+ public static final String WA_ADD_ROLE = "Add Role";
- public final static String WA_DELETE_ROLE = "Delete Role";
+ public static final String WA_DELETE_ROLE = "Delete Role";
- public final static String WA_GRANT_ROLE = "Grant Role Access";
+ public static final String WA_GRANT_ROLE = "Grant Role Access";
- public final static String WA_REVOKE_ROLE = "Revoke Role Access";
+ public static final String WA_REVOKE_ROLE = "Revoke Role Access";
- public final static String WA_VALIDATE = "Validate";
+ public static final String WA_VALIDATE = "Validate";
// File types
- public final static String FT_ZIP = ".zip";
- public final static String FT_TXT = ".txt";
- public final static String FT_DAT = ".dat";
- public final static String FT_CSV = ".csv";
- public final static String FT_XLS = ".xls";
- public final static String FT_XLS_ALL = "_all.xls";
+ public static final String FT_ZIP = ".zip";
+ public static final String FT_TXT = ".txt";
+ public static final String FT_DAT = ".dat";
+ public static final String FT_CSV = ".csv";
+ public static final String FT_XLS = ".xls";
+ public static final String FT_XLS_ALL = "_all.xls";
- public final static String FT_CSV_ALL = "_all.csv";
+ public static final String FT_CSV_ALL = "_all.csv";
- public final static String FT_XML = ".xml";
+ public static final String FT_XML = ".xml";
- public final static String FT_SQL = ".sql";
- public final static String FT_COLUMNS = ".head";
+ public static final String FT_SQL = ".sql";
+ public static final String FT_COLUMNS = ".head";
- public final static String FILE_PREFIX = "cr_";
+ public static final String FILE_PREFIX = "cr_";
// Chart types
- public final static String GT_BAR_3D = "BarChart3D";
+ public static final String GT_BAR_3D = "BarChart3D";
- public final static String GT_HORIZ_BAR = "HorizontalBarChart";
+ public static final String GT_HORIZ_BAR = "HorizontalBarChart";
- public final static String GT_STACKED_HORIZ_BAR = "HorizontalStackedBarChart";
+ public static final String GT_STACKED_HORIZ_BAR = "HorizontalStackedBarChart";
- public final static String GT_STACKED_VERT_BAR = "VerticalStackedBarChart";
+ public static final String GT_STACKED_VERT_BAR = "VerticalStackedBarChart";
- public final static String GT_STACKED_HORIZ_BAR_LINES = "HorizontalStackedBarLinesChart";
+ public static final String GT_STACKED_HORIZ_BAR_LINES = "HorizontalStackedBarLinesChart";
- public final static String GT_STACKED_VERT_BAR_LINES = "VerticalStackedBarLinesChart";
+ public static final String GT_STACKED_VERT_BAR_LINES = "VerticalStackedBarLinesChart";
- public final static String GT_VERT_BAR = "VerticalBarChart";
+ public static final String GT_VERT_BAR = "VerticalBarChart";
- public final static String GT_TOTAL_BAR = "TotalBarChart";
+ public static final String GT_TOTAL_BAR = "TotalBarChart";
- public final static String GT_PIE_3D = "Pie3DChart";
+ public static final String GT_PIE_3D = "Pie3DChart";
- public final static String GT_PIE = "PieChart";
+ public static final String GT_PIE = "PieChart";
- public final static String GT_PIE_MULTIPLE = "MultiplePieChart";
+ public static final String GT_PIE_MULTIPLE = "MultiplePieChart";
- public final static String GT_TIME_SERIES = "TimeSeriesChart";
+ public static final String GT_TIME_SERIES = "TimeSeriesChart";
- public final static String GT_LINE = "LineChart";
+ public static final String GT_LINE = "LineChart";
- public final static String GT_SCATTER = "ScatterPlotChart";
+ public static final String GT_SCATTER = "ScatterPlotChart";
- public final static String GT_HIERARCHICAL = "HierarchicalChart";
+ public static final String GT_HIERARCHICAL = "HierarchicalChart";
- public final static String GT_HIERARCHICAL_SUNBURST = "HierarchicalSunBurstChart";
+ public static final String GT_HIERARCHICAL_SUNBURST = "HierarchicalSunBurstChart";
- public final static String GT_REGRESSION = "RegressionPlotChart";
+ public static final String GT_REGRESSION = "RegressionPlotChart";
- public final static String GT_BAR_LINES = "BarLinesChart";
+ public static final String GT_BAR_LINES = "BarLinesChart";
- public final static String GT_MULTI_SERIES_CHART = "MultiSeriesChart";
+ public static final String GT_MULTI_SERIES_CHART = "MultiSeriesChart";
- public final static String GT_PARETO_CHART = "ParetoChart";
+ public static final String GT_PARETO_CHART = "ParetoChart";
- public final static String GT_MULTIPLE_TIMESERIES_CHART = "MultipleTimeSeriesChart";
+ public static final String GT_MULTIPLE_TIMESERIES_CHART = "MultipleTimeSeriesChart";
- public final static String GT_TIME_DIFFERENCE_CHART = "TimeDifferenceChart";
+ public static final String GT_TIME_DIFFERENCE_CHART = "TimeDifferenceChart";
- public final static String GT_COMPARE_PREVYEAR_CHART = "CompareToPrevYear";
+ public static final String GT_COMPARE_PREVYEAR_CHART = "CompareToPrevYear";
- public final static String GT_ANNOTATION_CHART = "AnnotationChart";
+ public static final String GT_ANNOTATION_CHART = "AnnotationChart";
- public final static String GT_FLEX_TIME_CHARTS = "FlexTimeChart";
+ public static final String GT_FLEX_TIME_CHARTS = "FlexTimeChart";
// Non-standard chart types
- public final static String GT_STACK_BAR = "StackedBarChart";
+ public static final String GT_STACK_BAR = "StackedBarChart";
public static Color GREEN_COLOR = new Color(0, 128, 0);
// chart filter
- public final static int CHART_ALL_COLUMNS = 0;
- public final static int CHART_WITHOUT_NEWCHART_COLUMNS = 1;
- public final static int CHART_NEWCHART_COLUMNS = 2;
+ public static final int CHART_ALL_COLUMNS = 0;
+ public static final int CHART_WITHOUT_NEWCHART_COLUMNS = 1;
+ public static final int CHART_NEWCHART_COLUMNS = 2;
// chart colors
public static Color[] CHART_SERIES_COLORS = { Color.black, GREEN_COLOR, Color.red,
Color.blue, Color.magenta, Color.orange, Color.cyan, Color.pink, Color.yellow };
// Chart columns
- public final static String GC_LEGEND = "LEGEND";
+ public static final String GC_LEGEND = "LEGEND";
/* Datamining Constants */
- public final static String DM_DATE_ATTR = "DM_DATE_ATTR";
- public final static String DM_FORECASTING_ATTR = "DM_FORECAST_ATTR";
- public final static String DM_GAUSSIAN_CLASSIFIER = "GAUSSIAN";
- public final static String DM_SVM_CLASSIFIER = "SVM";
+ public static final String DM_DATE_ATTR = "DM_DATE_ATTR";
+ public static final String DM_FORECASTING_ATTR = "DM_FORECAST_ATTR";
+ public static final String DM_GAUSSIAN_CLASSIFIER = "GAUSSIAN";
+ public static final String DM_SVM_CLASSIFIER = "SVM";
// Schedule recurrence
- public final static String SR_ONETIME = "ONE_TIME";
- public final static String SR_HOURLY = "HOURLY";
+ public static final String SR_ONETIME = "ONE_TIME";
+ public static final String SR_HOURLY = "HOURLY";
- public final static String SR_DAILY = "DAILY";
+ public static final String SR_DAILY = "DAILY";
- public final static String SR_DAILY_MO_FR = "DAILY_MO_FR";
+ public static final String SR_DAILY_MO_FR = "DAILY_MO_FR";
- public final static String SR_WEEKLY = "WEEKLY";
+ public static final String SR_WEEKLY = "WEEKLY";
- public final static String SR_MONTHLY = "MONTHLY";
+ public static final String SR_MONTHLY = "MONTHLY";
// User access type
- public final static String UA_READ = "read";
+ public static final String UA_READ = "read";
- public final static String UA_WRITE = "write";
+ public static final String UA_WRITE = "write";
- public final static String UA_DELETE = "delete";
+ public static final String UA_DELETE = "delete";
// Semaphore Type
public static final String ST_ROW = "ROW";