From 5664fd4644c78f4571a1a72e6b9f0511fb10720a Mon Sep 17 00:00:00 2001 From: abranson Date: Tue, 2 Aug 2011 22:10:28 +0200 Subject: Finished move to generics. Enforced 1.6 compliance for now. No errors or warnings :) --- .../c2kernel/collection/CollectionMemberList.java | 2 +- source/com/c2kernel/entity/CorbaServer.java | 4 +- source/com/c2kernel/entity/agent/JobArrayList.java | 4 +- source/com/c2kernel/entity/agent/JobList.java | 2 +- source/com/c2kernel/entity/proxy/EntityProxy.java | 4 +- .../c2kernel/entity/proxy/EntityProxyManager.java | 8 +-- source/com/c2kernel/entity/proxy/ItemProxy.java | 14 ++--- .../c2kernel/entity/proxy/MemberSubscription.java | 15 ++--- .../entity/proxy/ProxyClientConnection.java | 4 +- .../com/c2kernel/entity/transfer/TransferItem.java | 8 +-- .../com/c2kernel/entity/transfer/TransferSet.java | 4 +- .../graph/layout/DefaultGraphLayoutGenerator.java | 20 +++---- source/com/c2kernel/graph/model/GraphModel.java | 20 +++---- .../c2kernel/graph/model/GraphModelManager.java | 4 +- .../com/c2kernel/graph/model/GraphableVertex.java | 0 source/com/c2kernel/graph/model/Vertex.java | 10 ++-- .../c2kernel/graph/traversal/GraphTraversal.java | 4 +- source/com/c2kernel/graph/view/EditorToolBar.java | 6 +- .../c2kernel/graph/view/PropertyTableModel.java | 20 +++---- .../c2kernel/graph/view/VertexPropertyPanel.java | 8 +-- source/com/c2kernel/gui/EntityDetails.java | 2 +- source/com/c2kernel/gui/EntityTabManager.java | 4 +- source/com/c2kernel/gui/MainFrame.java | 2 +- source/com/c2kernel/gui/MenuBuilder.java | 2 +- source/com/c2kernel/gui/data/Node.java | 4 +- source/com/c2kernel/gui/data/NodeAgent.java | 4 +- source/com/c2kernel/gui/data/NodeEntity.java | 4 +- source/com/c2kernel/gui/data/NodeItem.java | 6 +- source/com/c2kernel/gui/tabs/DomainPathAdmin.java | 6 +- source/com/c2kernel/gui/tabs/HistoryPane.java | 2 +- source/com/c2kernel/gui/tabs/JobListPane.java | 2 +- source/com/c2kernel/gui/tabs/PropertiesPane.java | 4 +- source/com/c2kernel/gui/tabs/ViewpointPane.java | 35 ++++++----- .../tabs/collection/CollectionHistoryWindow.java | 8 +-- .../c2kernel/gui/tabs/execution/ActivityItem.java | 2 +- .../gui/tabs/execution/ActivityViewer.java | 2 +- .../gui/tabs/outcome/form/AttributeList.java | 2 +- .../c2kernel/gui/tabs/outcome/form/Dimension.java | 4 +- .../gui/tabs/outcome/form/DimensionTableModel.java | 18 +++--- .../gui/tabs/outcome/form/OutcomeStructure.java | 6 +- .../tabs/outcome/form/field/ArrayTableModel.java | 4 +- source/com/c2kernel/lifecycle/ActivityDef.java | 2 +- source/com/c2kernel/lifecycle/AndSplitDef.java | 2 +- source/com/c2kernel/lifecycle/WfVertexDef.java | 4 +- .../lifecycle/chooser/LDAPEntryChooser.java | 4 +- .../lifecycle/gui/model/WfVertexDefFactory.java | 3 +- .../com/c2kernel/lifecycle/instance/Activity.java | 12 ++-- .../lifecycle/instance/AdvancementCalculator.java | 14 ++--- .../lifecycle/instance/CompositeActivity.java | 11 ++-- source/com/c2kernel/lifecycle/instance/Join.java | 4 +- .../com/c2kernel/lifecycle/instance/ParserWF.java | 4 +- source/com/c2kernel/lifecycle/instance/Split.java | 4 +- .../com/c2kernel/lifecycle/instance/Workflow.java | 6 +- .../com/c2kernel/lifecycle/instance/XOrSplit.java | 2 +- .../instance/gui/model/WfVertexFactory.java | 3 +- .../instance/gui/view/TransitionPanel.java | 2 +- .../predefined/CreateItemFromDescription.java | 2 +- .../predefined/entitycreation/Aggregation.java | 1 - .../predefined/entitycreation/NewItem.java | 4 +- source/com/c2kernel/lookup/EntityPath.java | 2 +- .../com/c2kernel/lookup/LDAPPropertyManager.java | 2 +- source/com/c2kernel/lookup/LDAPRoleManager.java | 4 +- source/com/c2kernel/lookup/Path.java | 4 +- source/com/c2kernel/lookup/RolePath.java | 2 +- .../persistency/ClusterStorageManager.java | 68 ++++++++++------------ .../c2kernel/persistency/LDAPClusterStorage.java | 2 +- source/com/c2kernel/persistency/ProxyLoader.java | 2 +- .../c2kernel/persistency/TransactionManager.java | 22 +++---- .../c2kernel/persistency/XMLClusterStorage.java | 2 +- source/com/c2kernel/process/Bootstrap.java | 2 +- source/com/c2kernel/process/Gateway.java | 1 + source/com/c2kernel/process/StandardClient.java | 2 + source/com/c2kernel/process/UserCodeProcess.java | 6 +- .../com/c2kernel/property/PropertyArrayList.java | 4 +- .../c2kernel/property/PropertyDescriptionList.java | 4 +- source/com/c2kernel/scripting/ErrorInfo.java | 4 +- source/com/c2kernel/scripting/Script.java | 6 +- source/com/c2kernel/scripting/ScriptConsole.java | 2 +- source/com/c2kernel/utils/ActDefCache.java | 2 +- source/com/c2kernel/utils/CastorArrayList.java | 8 +-- source/com/c2kernel/utils/CastorHashMap.java | 6 +- source/com/c2kernel/utils/CastorXMLUtility.java | 2 +- source/com/c2kernel/utils/FileStringUtility.java | 8 +-- source/com/c2kernel/utils/Language.java | 2 +- source/com/c2kernel/utils/Logger.java | 2 +- source/com/c2kernel/utils/Resource.java | 4 +- source/com/c2kernel/utils/SoftCache.java | 34 ++++++----- source/com/c2kernel/utils/TransientCache.java | 57 +++++++++--------- source/com/c2kernel/utils/XmlElementParser.java | 2 +- .../c2kernel/utils/server/HTTPRequestHandler.java | 2 +- .../c2kernel/utils/server/SimpleTCPIPServer.java | 2 +- 91 files changed, 321 insertions(+), 319 deletions(-) mode change 100755 => 100644 source/com/c2kernel/collection/CollectionMemberList.java mode change 100755 => 100644 source/com/c2kernel/entity/CorbaServer.java mode change 100755 => 100644 source/com/c2kernel/entity/agent/JobArrayList.java mode change 100755 => 100644 source/com/c2kernel/entity/agent/JobList.java mode change 100755 => 100644 source/com/c2kernel/entity/proxy/EntityProxy.java mode change 100755 => 100644 source/com/c2kernel/entity/proxy/EntityProxyManager.java mode change 100755 => 100644 source/com/c2kernel/entity/proxy/ItemProxy.java mode change 100755 => 100644 source/com/c2kernel/entity/proxy/MemberSubscription.java mode change 100755 => 100644 source/com/c2kernel/entity/proxy/ProxyClientConnection.java mode change 100755 => 100644 source/com/c2kernel/entity/transfer/TransferItem.java mode change 100755 => 100644 source/com/c2kernel/entity/transfer/TransferSet.java mode change 100755 => 100644 source/com/c2kernel/graph/layout/DefaultGraphLayoutGenerator.java mode change 100755 => 100644 source/com/c2kernel/graph/model/GraphModel.java mode change 100755 => 100644 source/com/c2kernel/graph/model/GraphModelManager.java mode change 100755 => 100644 source/com/c2kernel/graph/model/GraphableVertex.java mode change 100755 => 100644 source/com/c2kernel/graph/model/Vertex.java mode change 100755 => 100644 source/com/c2kernel/graph/traversal/GraphTraversal.java mode change 100755 => 100644 source/com/c2kernel/graph/view/EditorToolBar.java mode change 100755 => 100644 source/com/c2kernel/graph/view/PropertyTableModel.java mode change 100755 => 100644 source/com/c2kernel/graph/view/VertexPropertyPanel.java mode change 100755 => 100644 source/com/c2kernel/gui/EntityDetails.java mode change 100755 => 100644 source/com/c2kernel/gui/EntityTabManager.java mode change 100755 => 100644 source/com/c2kernel/gui/MainFrame.java mode change 100755 => 100644 source/com/c2kernel/gui/MenuBuilder.java mode change 100755 => 100644 source/com/c2kernel/gui/data/Node.java mode change 100755 => 100644 source/com/c2kernel/gui/data/NodeAgent.java mode change 100755 => 100644 source/com/c2kernel/gui/data/NodeEntity.java mode change 100755 => 100644 source/com/c2kernel/gui/data/NodeItem.java mode change 100755 => 100644 source/com/c2kernel/gui/tabs/DomainPathAdmin.java mode change 100755 => 100644 source/com/c2kernel/gui/tabs/HistoryPane.java mode change 100755 => 100644 source/com/c2kernel/gui/tabs/JobListPane.java mode change 100755 => 100644 source/com/c2kernel/gui/tabs/PropertiesPane.java mode change 100755 => 100644 source/com/c2kernel/gui/tabs/ViewpointPane.java mode change 100755 => 100644 source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java mode change 100755 => 100644 source/com/c2kernel/gui/tabs/execution/ActivityViewer.java mode change 100755 => 100644 source/com/c2kernel/gui/tabs/outcome/form/AttributeList.java mode change 100755 => 100644 source/com/c2kernel/gui/tabs/outcome/form/Dimension.java mode change 100755 => 100644 source/com/c2kernel/gui/tabs/outcome/form/DimensionTableModel.java mode change 100755 => 100644 source/com/c2kernel/gui/tabs/outcome/form/OutcomeStructure.java mode change 100755 => 100644 source/com/c2kernel/gui/tabs/outcome/form/field/ArrayTableModel.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/ActivityDef.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/AndSplitDef.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/WfVertexDef.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/gui/model/WfVertexDefFactory.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/instance/Activity.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/instance/AdvancementCalculator.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/instance/CompositeActivity.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/instance/Join.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/instance/ParserWF.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/instance/Split.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/instance/Workflow.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/instance/XOrSplit.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/instance/gui/model/WfVertexFactory.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/instance/gui/view/TransitionPanel.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/instance/predefined/CreateItemFromDescription.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/instance/predefined/entitycreation/Aggregation.java mode change 100755 => 100644 source/com/c2kernel/lifecycle/instance/predefined/entitycreation/NewItem.java mode change 100755 => 100644 source/com/c2kernel/lookup/EntityPath.java mode change 100755 => 100644 source/com/c2kernel/lookup/LDAPPropertyManager.java mode change 100755 => 100644 source/com/c2kernel/lookup/LDAPRoleManager.java mode change 100755 => 100644 source/com/c2kernel/lookup/Path.java mode change 100755 => 100644 source/com/c2kernel/lookup/RolePath.java mode change 100755 => 100644 source/com/c2kernel/persistency/ClusterStorageManager.java mode change 100755 => 100644 source/com/c2kernel/persistency/LDAPClusterStorage.java mode change 100755 => 100644 source/com/c2kernel/persistency/ProxyLoader.java mode change 100755 => 100644 source/com/c2kernel/persistency/TransactionManager.java mode change 100755 => 100644 source/com/c2kernel/persistency/XMLClusterStorage.java mode change 100755 => 100644 source/com/c2kernel/process/Bootstrap.java mode change 100755 => 100644 source/com/c2kernel/process/Gateway.java mode change 100755 => 100644 source/com/c2kernel/process/StandardClient.java mode change 100755 => 100644 source/com/c2kernel/process/UserCodeProcess.java mode change 100755 => 100644 source/com/c2kernel/property/PropertyArrayList.java mode change 100755 => 100644 source/com/c2kernel/property/PropertyDescriptionList.java mode change 100755 => 100644 source/com/c2kernel/scripting/ErrorInfo.java mode change 100755 => 100644 source/com/c2kernel/scripting/Script.java mode change 100755 => 100644 source/com/c2kernel/scripting/ScriptConsole.java mode change 100755 => 100644 source/com/c2kernel/utils/ActDefCache.java mode change 100755 => 100644 source/com/c2kernel/utils/CastorArrayList.java mode change 100755 => 100644 source/com/c2kernel/utils/CastorHashMap.java mode change 100755 => 100644 source/com/c2kernel/utils/FileStringUtility.java mode change 100755 => 100644 source/com/c2kernel/utils/Language.java mode change 100755 => 100644 source/com/c2kernel/utils/Logger.java mode change 100755 => 100644 source/com/c2kernel/utils/Resource.java mode change 100755 => 100644 source/com/c2kernel/utils/TransientCache.java mode change 100755 => 100644 source/com/c2kernel/utils/XmlElementParser.java mode change 100755 => 100644 source/com/c2kernel/utils/server/HTTPRequestHandler.java mode change 100755 => 100644 source/com/c2kernel/utils/server/SimpleTCPIPServer.java (limited to 'source/com/c2kernel') diff --git a/source/com/c2kernel/collection/CollectionMemberList.java b/source/com/c2kernel/collection/CollectionMemberList.java old mode 100755 new mode 100644 index 35f4134..3f9345e --- a/source/com/c2kernel/collection/CollectionMemberList.java +++ b/source/com/c2kernel/collection/CollectionMemberList.java @@ -11,7 +11,7 @@ package com.c2kernel.collection; import com.c2kernel.utils.CastorArrayList; -public class CollectionMemberList extends CastorArrayList +public class CollectionMemberList extends CastorArrayList { public CollectionMemberList() diff --git a/source/com/c2kernel/entity/CorbaServer.java b/source/com/c2kernel/entity/CorbaServer.java old mode 100755 new mode 100644 index 948b1a6..883bb1b --- a/source/com/c2kernel/entity/CorbaServer.java +++ b/source/com/c2kernel/entity/CorbaServer.java @@ -31,14 +31,14 @@ import com.c2kernel.utils.SoftCache; public class CorbaServer { - private Map mEntityCache; + private Map mEntityCache; private POA mRootPOA; private POA mItemPOA; private POA mAgentPOA; private POAManager mPOAManager; public CorbaServer() throws InvalidDataException { - mEntityCache = new SoftCache(50); + mEntityCache = new SoftCache(50); // init POA try { diff --git a/source/com/c2kernel/entity/agent/JobArrayList.java b/source/com/c2kernel/entity/agent/JobArrayList.java old mode 100755 new mode 100644 index b6eb2c2..fa85368 --- a/source/com/c2kernel/entity/agent/JobArrayList.java +++ b/source/com/c2kernel/entity/agent/JobArrayList.java @@ -13,7 +13,7 @@ import java.util.ArrayList; import com.c2kernel.utils.CastorArrayList; -public class JobArrayList extends CastorArrayList +public class JobArrayList extends CastorArrayList { public JobArrayList() @@ -21,7 +21,7 @@ public class JobArrayList extends CastorArrayList super(); } - public JobArrayList(ArrayList aList) + public JobArrayList(ArrayList aList) { super(aList); } diff --git a/source/com/c2kernel/entity/agent/JobList.java b/source/com/c2kernel/entity/agent/JobList.java old mode 100755 new mode 100644 index d0d05d5..15ce0dd --- a/source/com/c2kernel/entity/agent/JobList.java +++ b/source/com/c2kernel/entity/agent/JobList.java @@ -108,7 +108,7 @@ public class JobList extends RemoteMap { Iterator currentMembers = values().iterator(); Job j = null; - Vector jobs = new Vector(); + Vector jobs = new Vector(); while( currentMembers.hasNext() ) { diff --git a/source/com/c2kernel/entity/proxy/EntityProxy.java b/source/com/c2kernel/entity/proxy/EntityProxy.java old mode 100755 new mode 100644 index a5b6822..b34653f --- a/source/com/c2kernel/entity/proxy/EntityProxy.java +++ b/source/com/c2kernel/entity/proxy/EntityProxy.java @@ -35,7 +35,7 @@ abstract public class EntityProxy implements ManageableEntity protected ManageableEntity mEntity = null; protected org.omg.CORBA.Object mIOR; protected int mSystemKey; - private HashMap mSubscriptions; + private HashMap mSubscriptions; /************************************************************************** * @@ -60,7 +60,7 @@ abstract public class EntityProxy implements ManageableEntity mIOR = ior; mSystemKey = systemKey; - mSubscriptions = new HashMap(); + mSubscriptions = new HashMap(); } diff --git a/source/com/c2kernel/entity/proxy/EntityProxyManager.java b/source/com/c2kernel/entity/proxy/EntityProxyManager.java old mode 100755 new mode 100644 index 386bc2c..3224da7 --- a/source/com/c2kernel/entity/proxy/EntityProxyManager.java +++ b/source/com/c2kernel/entity/proxy/EntityProxyManager.java @@ -27,12 +27,12 @@ import com.c2kernel.utils.server.SimpleTCPIPServer; public class EntityProxyManager { - SoftCache proxyPool = new SoftCache(50); - HashMap treeSubscribers = new HashMap(); - HashMap connections = new HashMap(); + SoftCache proxyPool = new SoftCache(50); + HashMap treeSubscribers = new HashMap(); + HashMap connections = new HashMap(); // server objects - static ArrayList proxyClients = new ArrayList(); + static ArrayList proxyClients = new ArrayList(); static SimpleTCPIPServer proxyServer = null; static String serverName = null; diff --git a/source/com/c2kernel/entity/proxy/ItemProxy.java b/source/com/c2kernel/entity/proxy/ItemProxy.java old mode 100755 new mode 100644 index e816a53..702dd26 --- a/source/com/c2kernel/entity/proxy/ItemProxy.java +++ b/source/com/c2kernel/entity/proxy/ItemProxy.java @@ -152,7 +152,7 @@ public class ItemProxy extends EntityProxy /************************************************************************** * **************************************************************************/ - private ArrayList getJobList(int agentId, boolean filter) + private ArrayList getJobList(int agentId, boolean filter) throws AccessRightsException, ObjectNotFoundException, PersistencyException @@ -163,14 +163,13 @@ public class ItemProxy extends EntityProxy thisJobList = (JobArrayList)CastorXMLUtility.unmarshall(jobs); } catch (Exception e) { - Logger.error("Exception::ItemProxy::getJobList() - Cannot unmarshall the jobs"); Logger.error(e); - return new ArrayList(); + throw new PersistencyException("Exception::ItemProxy::getJobList() - Cannot unmarshall the jobs", null); } return thisJobList.list; } - public ArrayList getJobList(AgentProxy agent) + public ArrayList getJobList(AgentProxy agent) throws AccessRightsException, ObjectNotFoundException, PersistencyException @@ -178,7 +177,7 @@ public class ItemProxy extends EntityProxy return getJobList(agent.getSystemKey()); } - private ArrayList getJobList(int agentId) + private ArrayList getJobList(int agentId) throws AccessRightsException, ObjectNotFoundException, PersistencyException @@ -191,9 +190,8 @@ public class ItemProxy extends EntityProxy ObjectNotFoundException, PersistencyException { - ArrayList jobList = getJobList(agentId); - for (Object jobObj : jobList) { - Job job = (Job)jobObj; + ArrayList jobList = getJobList(agentId); + for (Job job : jobList) { int transition = job.getPossibleTransition(); if (job.getStepName().equals(actName)) if (transition == Transitions.COMPLETE || transition == Transitions.DONE) diff --git a/source/com/c2kernel/entity/proxy/MemberSubscription.java b/source/com/c2kernel/entity/proxy/MemberSubscription.java old mode 100755 new mode 100644 index fdd3e96..ba2d725 --- a/source/com/c2kernel/entity/proxy/MemberSubscription.java +++ b/source/com/c2kernel/entity/proxy/MemberSubscription.java @@ -2,7 +2,6 @@ package com.c2kernel.entity.proxy; import java.lang.ref.WeakReference; import java.util.ArrayList; -import java.util.Iterator; import java.util.StringTokenizer; import com.c2kernel.common.ObjectNotFoundException; @@ -13,8 +12,8 @@ public class MemberSubscription implements Runnable { EntityProxy subject; String interest; // keep the subscriber by weak reference, so it is not kept from the garbage collector if no longer used - WeakReference observerReference; - ArrayList contents = new ArrayList(); + WeakReference observerReference; + ArrayList contents = new ArrayList(); boolean preLoad; public MemberSubscription(EntityProxy subject, String interest, @@ -38,13 +37,12 @@ public class MemberSubscription implements Runnable { // fetch contents of path String children = subject.queryData(interest+"/all"); StringTokenizer tok = new StringTokenizer(children, ","); - ArrayList newContents = new ArrayList(); + ArrayList newContents = new ArrayList(); while (tok.hasMoreTokens()) newContents.add(tok.nextToken()); // look to see what's new - for (Iterator iter = newContents.iterator(); iter.hasNext();) { - String newChild = (String)iter.next(); + for (String newChild: newContents) { // load child object try { @@ -61,8 +59,7 @@ public class MemberSubscription implements Runnable { } } // report what's left in old contents as deleted - for (Iterator iter = contents.iterator(); iter.hasNext();) { - String oldChild = (String)iter.next(); + for (String oldChild: contents) { observer.remove(interest+"/"+oldChild); } //replace contents arraylist @@ -110,7 +107,7 @@ public class MemberSubscription implements Runnable { } public void setObserver(EntityProxyObserver observer) { - observerReference = new WeakReference(observer); + observerReference = new WeakReference(observer); } public EntityProxyObserver getObserver() { diff --git a/source/com/c2kernel/entity/proxy/ProxyClientConnection.java b/source/com/c2kernel/entity/proxy/ProxyClientConnection.java old mode 100755 new mode 100644 index 46f1e3d..f041012 --- a/source/com/c2kernel/entity/proxy/ProxyClientConnection.java +++ b/source/com/c2kernel/entity/proxy/ProxyClientConnection.java @@ -28,7 +28,7 @@ public class ProxyClientConnection implements SocketHandler { Socket clientSocket = null; static int clientId = -1; int thisClientId; - ArrayList sysKeys; + ArrayList sysKeys; PrintWriter response; BufferedReader request; boolean closing = false; @@ -55,7 +55,7 @@ public class ProxyClientConnection implements SocketHandler { newSocket.setSoTimeout(500); clientSocket = newSocket; response = new PrintWriter(clientSocket.getOutputStream(), true); - sysKeys = new ArrayList(); + sysKeys = new ArrayList(); } catch (SocketException ex) { Logger.msg("Could not set socket timeout:"); Logger.error(ex); diff --git a/source/com/c2kernel/entity/transfer/TransferItem.java b/source/com/c2kernel/entity/transfer/TransferItem.java old mode 100755 new mode 100644 index a869741..e4e84ec --- a/source/com/c2kernel/entity/transfer/TransferItem.java +++ b/source/com/c2kernel/entity/transfer/TransferItem.java @@ -14,7 +14,7 @@ import com.c2kernel.property.*; import com.c2kernel.utils.*; public class TransferItem { - public ArrayList domainPaths; + public ArrayList domainPaths; public int sysKey; static int importAgentId; @@ -29,7 +29,7 @@ public class TransferItem { public TransferItem(int sysKey) throws Exception { this.sysKey = sysKey; - domainPaths = new ArrayList(); + domainPaths = new ArrayList(); Property name = (Property)Gateway.getStorage().get(sysKey, ClusterStorage.PROPERTY + "/Name", null); Enumeration paths = Gateway.getLDAPLookup().search(new DomainPath(), name.getValue()); while (paths.hasMoreElements()) { @@ -69,7 +69,7 @@ public class TransferItem { ArrayList events, outcomes, viewpoints = new ArrayList(); // retrieve objects ArrayList objectFiles = FileStringUtility.listDir(dir.getCanonicalPath(), false, true); - ArrayList objects = new ArrayList(); + ArrayList objects = new ArrayList(); for (Iterator iter = objectFiles.iterator(); iter.hasNext();) { String element = (String)iter.next(); String xmlFile = FileStringUtility.file2String(element); @@ -95,7 +95,7 @@ public class TransferItem { for (Iterator iter = objects.iterator(); iter.hasNext();) { C2KLocalObject obj = (C2KLocalObject)iter.next(); if (obj instanceof Property) - props.list.add(obj); + props.list.add((Property)obj); else if (obj instanceof Workflow) wf = (Workflow)obj; } diff --git a/source/com/c2kernel/entity/transfer/TransferSet.java b/source/com/c2kernel/entity/transfer/TransferSet.java old mode 100755 new mode 100644 index ee98f8d..f67ba9c --- a/source/com/c2kernel/entity/transfer/TransferSet.java +++ b/source/com/c2kernel/entity/transfer/TransferSet.java @@ -22,13 +22,13 @@ import com.c2kernel.utils.Logger; public class TransferSet { - public ArrayList items; + public ArrayList items; public TransferSet() { } public TransferSet(int[] sysKeys) { - items = new ArrayList(); + items = new ArrayList(); for (int i = 0; i < sysKeys.length; i++) { try { items.add(new TransferItem(sysKeys[i])); diff --git a/source/com/c2kernel/graph/layout/DefaultGraphLayoutGenerator.java b/source/com/c2kernel/graph/layout/DefaultGraphLayoutGenerator.java old mode 100755 new mode 100644 index e243817..4b429fa --- a/source/com/c2kernel/graph/layout/DefaultGraphLayoutGenerator.java +++ b/source/com/c2kernel/graph/layout/DefaultGraphLayoutGenerator.java @@ -19,7 +19,7 @@ public class DefaultGraphLayoutGenerator { public static void layoutGraph(GraphModel graphModel) { Vertex start = graphModel.getStartVertex(); - Vector rowVector = new Vector(10, 10); + Vector> rowVector = new Vector>(10, 10); int[] midPoints = null; IntegerWrapper valueOfLargestMidPoint = new IntegerWrapper(0); if (start == null) { @@ -35,7 +35,7 @@ public class DefaultGraphLayoutGenerator { graphModel.forceNotify(); } - private static void visitVertex(GraphModel graphModel, Vertex vertex, int rowIndex, Vector rowVector, Object tag) { + private static void visitVertex(GraphModel graphModel, Vertex vertex, int rowIndex, Vector> rowVector, Object tag) { int i = 0; Vertex[] children = graphModel.getOutVertices(vertex); vertex.setTag(tag); @@ -47,24 +47,24 @@ public class DefaultGraphLayoutGenerator { } } - private static void addVertexToRow(Vertex vertex, int rowIndex, Vector rowVector) { - Vector rowsVertices = null; + private static void addVertexToRow(Vertex vertex, int rowIndex, Vector> rowVector) { + Vector rowsVertices = null; // If there is no vector of vertices already created for this row, // then create one if (rowVector.size() == rowIndex) { - rowVector.add(new Vector(10, 10)); + rowVector.add(new Vector(10, 10)); } // Add the vertex to the row's vector of vertices - rowsVertices = (Vector)rowVector.elementAt(rowIndex); + rowsVertices = rowVector.elementAt(rowIndex); rowsVertices.add(vertex); } - private static void calculateRowMidPoints(Vector rowVector, int[] midPoints, IntegerWrapper valueOfLargestMidPoint) { + private static void calculateRowMidPoints(Vector> rowVector, int[] midPoints, IntegerWrapper valueOfLargestMidPoint) { Vector rowsVertices = null; int rowsWidth = 0; int i = 0; for (i = 0; i < midPoints.length; i++) { - rowsVertices = (Vector)rowVector.elementAt(i); + rowsVertices = rowVector.elementAt(i); rowsWidth = mHorzGap * (rowsVertices.size() - 1); midPoints[i] = rowsWidth / 2; if (midPoints[i] > valueOfLargestMidPoint.mValue) { @@ -73,7 +73,7 @@ public class DefaultGraphLayoutGenerator { } } - private static void fillInVertexLocations(GraphModel graphModel, Vector rowVector, + private static void fillInVertexLocations(GraphModel graphModel, Vector> rowVector, IntegerWrapper valueOfLargestMidPoint, int[] midPoints) { Vector rowsVertices = null; Vertex vertex = null; @@ -82,7 +82,7 @@ public class DefaultGraphLayoutGenerator { int rowsLeftMargin = 0; GraphPoint point = new GraphPoint(0, 0); for (rowIndex = 0; rowIndex < rowVector.size(); rowIndex++) { - rowsVertices = (Vector)rowVector.elementAt(rowIndex); + rowsVertices = rowVector.elementAt(rowIndex); rowsLeftMargin = mLeftMargin + valueOfLargestMidPoint.mValue - midPoints[rowIndex]; for (column = 0; column < rowsVertices.size(); column++) { vertex = (Vertex)rowsVertices.elementAt(column); diff --git a/source/com/c2kernel/graph/model/GraphModel.java b/source/com/c2kernel/graph/model/GraphModel.java old mode 100755 new mode 100644 index 7a546eb..e9ae02f --- a/source/com/c2kernel/graph/model/GraphModel.java +++ b/source/com/c2kernel/graph/model/GraphModel.java @@ -16,8 +16,8 @@ public class GraphModel implements Serializable{ private int mHeight = 0; private int mNextId = 0; protected int mStartVertexId = -1; - protected Hashtable mVertexHashtable = new Hashtable(); - protected Hashtable mEdgeHashtable = new Hashtable(); + protected Hashtable mVertexHashtable = new Hashtable(); + protected Hashtable mEdgeHashtable = new Hashtable(); private GraphableVertex mContainingVertex; /* Transient data */ @@ -168,7 +168,7 @@ public class GraphModel implements Serializable{ } public void setVertices(Vertex[] vertices) { - mVertexHashtable = new Hashtable(); + mVertexHashtable = new Hashtable(); for (int i = 0; i < vertices.length; i++) { mVertexHashtable.put(String.valueOf(vertices[i].getID()), vertices[i]); checkSize(vertices[i]); @@ -189,7 +189,7 @@ public class GraphModel implements Serializable{ } public void setEdges(DirectedEdge[] edges) { - mEdgeHashtable = new Hashtable(); + mEdgeHashtable = new Hashtable(); for (int i = 0; i < edges.length; i++) { mEdgeHashtable.put(String.valueOf(edges[i].getID()), edges[i]); } @@ -212,7 +212,7 @@ public class GraphModel implements Serializable{ public Vertex getVertex(GraphPoint p) { Object[] vertexObjs = mVertexHashtable.values().toArray(); Vertex vertex = null; - Vector vertexVector = new Vector(10, 10); + Vector vertexVector = new Vector(10, 10); int numVerticesFound = 0; Vertex smallestVertex = null; int sizeOfSmallestVertex = 0; @@ -514,8 +514,8 @@ public class GraphModel implements Serializable{ } public void clear() { - mVertexHashtable = new Hashtable(); - mEdgeHashtable = new Hashtable(); + mVertexHashtable = new Hashtable(); + mEdgeHashtable = new Hashtable(); mStartVertexId = -1; setChanged(); notifyObservers(mClearedEvent); @@ -627,7 +627,7 @@ public class GraphModel implements Serializable{ Polygon bandPolygon = new Polygon(); Vertex[] allVertices = getVertices(); GraphPoint centrePoint = null; - Vector verticesInside = new Vector(10, 10); + Vector verticesInside = new Vector(10, 10); int i = 0; // Create a polygon representing the elastic band bandPolygon.addPoint(mElasticBand.mFixedCorner.x, mElasticBand.mFixedCorner.y); @@ -842,13 +842,13 @@ public class GraphModel implements Serializable{ } } // Create and populate the vertex hashtable - mVertexHashtable = new Hashtable(); + mVertexHashtable = new Hashtable(); for (i = 0; i < data.mVertexImpls.length; i++) { mVertexHashtable.put(String.valueOf(data.mVertexImpls[i].getID()), data.mVertexImpls[i]); checkSize(data.mVertexImpls[i]); } // Create and populate the edge hastable - mEdgeHashtable = new Hashtable(); + mEdgeHashtable = new Hashtable(); for (i = 0; i < data.mEdgeImpls.length; i++) { mEdgeHashtable.put(String.valueOf(data.mEdgeImpls[i].getID()), data.mEdgeImpls[i]); } diff --git a/source/com/c2kernel/graph/model/GraphModelManager.java b/source/com/c2kernel/graph/model/GraphModelManager.java old mode 100755 new mode 100644 index 19f2dc3..3146c24 --- a/source/com/c2kernel/graph/model/GraphModelManager.java +++ b/source/com/c2kernel/graph/model/GraphModelManager.java @@ -20,8 +20,8 @@ public class GraphModelManager extends Observable private VertexOutlineCreator mVertexOutlineCreator; private EntireModelChangedEvent mEntireModelChangedEvent = new EntireModelChangedEvent(); private ForcedNotifyEvent mForcedNotifyEvent = new ForcedNotifyEvent(); - private Stack mParentModels = new Stack(); - private ArrayList mParentIds = new ArrayList(); + private Stack mParentModels = new Stack(); + private ArrayList mParentIds = new ArrayList(); private boolean mEditable = true; // Calling this constructor does not create a vertex outline creator diff --git a/source/com/c2kernel/graph/model/GraphableVertex.java b/source/com/c2kernel/graph/model/GraphableVertex.java old mode 100755 new mode 100644 diff --git a/source/com/c2kernel/graph/model/Vertex.java b/source/com/c2kernel/graph/model/Vertex.java old mode 100755 new mode 100644 index 1e8399b..a9a5238 --- a/source/com/c2kernel/graph/model/Vertex.java +++ b/source/com/c2kernel/graph/model/Vertex.java @@ -12,9 +12,9 @@ public class Vertex implements Serializable private GraphPoint mCentrePoint = new GraphPoint(0, 0); private int mHeight = 0; private int mWidth = 0; - private Vector mInEdgeIdVector = new Vector(); - private Vector mOutEdgeIdVector = new Vector(); - private Vector mTags = new Vector(); + private Vector mInEdgeIdVector = new Vector(); + private Vector mOutEdgeIdVector = new Vector(); + private Vector mTags = new Vector(); // The Java Polygon class is used to determine if a point // lies within the outline of a vertex. Unfortunately @@ -170,7 +170,7 @@ public class Vertex implements Serializable { int i = 0; - mInEdgeIdVector = new Vector(10, 10); + mInEdgeIdVector = new Vector(10, 10); for(i=0; i(10, 10); for(i=0; i path = new Vector(10, 10); graphModel.clearTags(startVertex); visitVertex(startVertex, graphModel, path, direction, startVertex, ignoreBackLinks); @@ -29,7 +29,7 @@ public class GraphTraversal } - private static void visitVertex(Vertex vertex, GraphModel graphModel, Vector path, int direction, Object tag, boolean ignoreBackLinks) + private static void visitVertex(Vertex vertex, GraphModel graphModel, Vector path, int direction, Object tag, boolean ignoreBackLinks) { Vertex[] children = null; int i = 0; diff --git a/source/com/c2kernel/graph/view/EditorToolBar.java b/source/com/c2kernel/graph/view/EditorToolBar.java old mode 100755 new mode 100644 index 2730ab7..e01056f --- a/source/com/c2kernel/graph/view/EditorToolBar.java +++ b/source/com/c2kernel/graph/view/EditorToolBar.java @@ -56,9 +56,9 @@ public class EditorToolBar extends Box implements Printable } } // Vertex types and ids - protected JComboBox mVertexTypeBox = new JComboBox(); + protected JComboBox mVertexTypeBox = new JComboBox(); // Edge types and ids - protected JComboBox mEdgeTypeBox = new JComboBox(); + protected JComboBox mEdgeTypeBox = new JComboBox(); // Mode buttons protected ButtonGroup mModeButtonGroup = new ButtonGroup(); protected JToggleButton mVertexModeButton = new JToggleButton(Resource.getImageResource("graph/newvertex.png")); @@ -74,7 +74,7 @@ public class EditorToolBar extends Box implements Printable protected StartVertexController mStartVertexController = new StartVertexController(); protected DeletionController mDeletionController = new DeletionController(); // Editor mode listeners - protected Vector mListenerVector = new Vector(10, 10); + protected Vector mListenerVector = new Vector(10, 10); public EditorToolBar(boolean edgeCreationMode, // True if edges can be created JButton[] otherButtons, GraphPanel graphP) { diff --git a/source/com/c2kernel/graph/view/PropertyTableModel.java b/source/com/c2kernel/graph/view/PropertyTableModel.java old mode 100755 new mode 100644 index 9755cf6..22ba4f3 --- a/source/com/c2kernel/graph/view/PropertyTableModel.java +++ b/source/com/c2kernel/graph/view/PropertyTableModel.java @@ -20,8 +20,8 @@ import com.c2kernel.utils.Language; public class PropertyTableModel extends AbstractTableModel { private String[] mColumnNames = { Language.translate("Name"), Language.translate("Value") }; - HashMap sourceMap = new HashMap(); - ArrayList sortedNameList = new ArrayList(); + HashMap sourceMap = new HashMap(); + ArrayList sortedNameList = new ArrayList(); boolean isEditable = false; public PropertyTableModel() { @@ -45,7 +45,7 @@ public class PropertyTableModel extends AbstractTableModel { public Object getValueAt(int rowIndex, int colIndex) { synchronized (sourceMap) { - String rowName = (String)sortedNameList.get(rowIndex); + String rowName = sortedNameList.get(rowIndex); if (colIndex == 0) return rowName; else @@ -57,7 +57,7 @@ public class PropertyTableModel extends AbstractTableModel { { synchronized (sourceMap) { if (colIndex == 0) return; - String rowName = (String)sortedNameList.get(rowIndex); + String rowName = sortedNameList.get(rowIndex); Class oldElement = sourceMap.get(rowName).getClass(); if (oldElement == Float.class && value.getClass() == String.class) try { @@ -72,16 +72,16 @@ public class PropertyTableModel extends AbstractTableModel { } } - public void setMap(HashMap props) { + public void setMap(HashMap props) { synchronized (sourceMap) { sourceMap = props; - sortedNameList = new ArrayList(props.size()); - for (Iterator keys = props.keySet().iterator(); keys.hasNext();) + sortedNameList = new ArrayList(props.size()); + for (Iterator keys = props.keySet().iterator(); keys.hasNext();) sortedNameList.add(keys.next()); - Collections.sort(sortedNameList, new Comparator() { - public int compare(Object o1, Object o2) { - return ((String)o1).compareToIgnoreCase((String)o2); + Collections.sort(sortedNameList, new Comparator() { + public int compare(String o1, String o2) { + return (o1.compareToIgnoreCase(o2)); } }); } diff --git a/source/com/c2kernel/graph/view/VertexPropertyPanel.java b/source/com/c2kernel/graph/view/VertexPropertyPanel.java old mode 100755 new mode 100644 index be08b53..dd5fbd2 --- a/source/com/c2kernel/graph/view/VertexPropertyPanel.java +++ b/source/com/c2kernel/graph/view/VertexPropertyPanel.java @@ -43,7 +43,7 @@ public class VertexPropertyPanel extends JPanel implements Observer, TableModelL JButton delPropButton; Box newPropBox; private JTextField newPropName; - private JComboBox newPropType; + private JComboBox newPropType; String[] typeOptions = { "String", "Boolean", "Integer", "Float" }; String[] typeInitVal = { "", "false", "0", "0.0"}; SelectedVertexPanel mSelPanel; @@ -125,7 +125,7 @@ public class VertexPropertyPanel extends JPanel implements Observer, TableModelL public void clear() { selObjName.setText(""); selObjClass.setText("Nothing Selected"); - mPropertyModel.setMap(new HashMap()); + mPropertyModel.setMap(new HashMap()); if (mSelPanel != null) mSelPanel.clear(); addPropButton.setEnabled(false); delPropButton.setEnabled(false); @@ -184,7 +184,7 @@ public class VertexPropertyPanel extends JPanel implements Observer, TableModelL newPropBox.add(Box.createHorizontalGlue()); newPropName = new JTextField(15); newPropBox.add(newPropName); - newPropType = new JComboBox(typeOptions); + newPropType = new JComboBox(typeOptions); newPropBox.add(newPropType); newPropBox.add(Box.createHorizontalStrut(1)); addPropButton = new JButton("Add"); @@ -224,7 +224,7 @@ public class VertexPropertyPanel extends JPanel implements Observer, TableModelL mPropertyTable.getCellEditor().stopCellEditing(); try { - Class newPropClass = Class.forName("java.lang."+typeOptions[newPropType.getSelectedIndex()]); + Class newPropClass = Class.forName("java.lang."+typeOptions[newPropType.getSelectedIndex()]); Class[] params = {String.class}; Constructor init = newPropClass.getConstructor(params); Object[] initParams = { typeInitVal[newPropType.getSelectedIndex()] }; diff --git a/source/com/c2kernel/gui/EntityDetails.java b/source/com/c2kernel/gui/EntityDetails.java old mode 100755 new mode 100644 index b6c5245..5eb812f --- a/source/com/c2kernel/gui/EntityDetails.java +++ b/source/com/c2kernel/gui/EntityDetails.java @@ -30,7 +30,7 @@ public class EntityDetails extends JPanel implements ChangeListener, Runnable { protected JPanel itemTitlePanel; private EntityTabManager desktopManager; protected NodeEntity myEntity; - protected HashMap childPanes = new HashMap(); + protected HashMap childPanes = new HashMap(); protected String startTab; protected String startCommand = null; protected boolean initialized = false; diff --git a/source/com/c2kernel/gui/EntityTabManager.java b/source/com/c2kernel/gui/EntityTabManager.java old mode 100755 new mode 100644 index 208ae89..1e01ad0 --- a/source/com/c2kernel/gui/EntityTabManager.java +++ b/source/com/c2kernel/gui/EntityTabManager.java @@ -22,7 +22,7 @@ public class EntityTabManager extends JPanel { private MainFrame mMainframe; - protected HashMap openItems = new HashMap(); + protected HashMap openItems = new HashMap(); protected JTabbedPaneWithCloseIcons tabbedPane = new JTabbedPaneWithCloseIcons(); //JTabbedPane tabbedPane = new JTabbedPane(); MenuBuilder myMenuBuilder; @@ -74,7 +74,7 @@ public class EntityTabManager extends JPanel } public void closeAll(boolean keepOpen) { - ArrayList toRemove = new ArrayList(); + ArrayList toRemove = new ArrayList(); for (Iterator iter = openItems.keySet().iterator(); iter.hasNext();) { Integer element = (Integer) iter.next(); if (keepOpen && openItems.get(element).equals(tabbedPane.getSelectedComponent())) continue; diff --git a/source/com/c2kernel/gui/MainFrame.java b/source/com/c2kernel/gui/MainFrame.java old mode 100755 new mode 100644 index 99a1fab..e561f1f --- a/source/com/c2kernel/gui/MainFrame.java +++ b/source/com/c2kernel/gui/MainFrame.java @@ -267,7 +267,7 @@ public class MainFrame extends javax.swing.JFrame { } public static JComboBox getExecutionPlugins() { - JComboBox plugins = new JComboBox(); + JComboBox plugins = new JComboBox(); // create execution selector Executor defaultExecutor = new DefaultExecutor(); plugins.addItem(defaultExecutor); diff --git a/source/com/c2kernel/gui/MenuBuilder.java b/source/com/c2kernel/gui/MenuBuilder.java old mode 100755 new mode 100644 index c385dbe..bf27287 --- a/source/com/c2kernel/gui/MenuBuilder.java +++ b/source/com/c2kernel/gui/MenuBuilder.java @@ -33,7 +33,7 @@ public class MenuBuilder extends JMenuBar implements ActionListener, ItemListene protected JMenu styleMenu; protected JMenu prefMenu; protected JMenu helpMenu; - protected HashMap availableMenus = new HashMap(); + protected HashMap availableMenus = new HashMap(); public MenuBuilder() {} diff --git a/source/com/c2kernel/gui/data/Node.java b/source/com/c2kernel/gui/data/Node.java old mode 100755 new mode 100644 index b82ee92..79eb3ad --- a/source/com/c2kernel/gui/data/Node.java +++ b/source/com/c2kernel/gui/data/Node.java @@ -31,8 +31,8 @@ public abstract class Node implements Runnable { protected String type = ""; protected Icon icon; protected boolean isExpandable = false; - protected HashMap childNodes = new HashMap(); - protected ArrayList subscribers = new ArrayList(); + protected HashMap childNodes = new HashMap(); + protected ArrayList subscribers = new ArrayList(); protected DynamicTreeBuilder loader = null; private boolean loaded = false; private String iconName; diff --git a/source/com/c2kernel/gui/data/NodeAgent.java b/source/com/c2kernel/gui/data/NodeAgent.java old mode 100755 new mode 100644 index 9ef738a..138b576 --- a/source/com/c2kernel/gui/data/NodeAgent.java +++ b/source/com/c2kernel/gui/data/NodeAgent.java @@ -21,9 +21,9 @@ public class NodeAgent extends NodeEntity { public void loadChildren() { } - public ArrayList getTabs() { + public ArrayList getTabs() { - ArrayList requiredTabs = super.getTabs(); + ArrayList requiredTabs = super.getTabs(); requiredTabs.add("AgentProperties"); requiredTabs.add("JobList"); return requiredTabs; diff --git a/source/com/c2kernel/gui/data/NodeEntity.java b/source/com/c2kernel/gui/data/NodeEntity.java old mode 100755 new mode 100644 index adff241..8c05afd --- a/source/com/c2kernel/gui/data/NodeEntity.java +++ b/source/com/c2kernel/gui/data/NodeEntity.java @@ -73,8 +73,8 @@ public abstract class NodeEntity extends Node { desktop.add(this); } - public ArrayList getTabs() { - ArrayList requiredTabs = new ArrayList(); + public ArrayList getTabs() { + ArrayList requiredTabs = new ArrayList(); return requiredTabs; } } diff --git a/source/com/c2kernel/gui/data/NodeItem.java b/source/com/c2kernel/gui/data/NodeItem.java old mode 100755 new mode 100644 index 410f13a..84cba97 --- a/source/com/c2kernel/gui/data/NodeItem.java +++ b/source/com/c2kernel/gui/data/NodeItem.java @@ -53,7 +53,7 @@ public class NodeItem extends NodeEntity { popup.addSeparator(); try { ArrayList jobList = ((ItemProxy)myEntity).getJobList(MainFrame.userAgent); - ArrayList already = new ArrayList(); + ArrayList already = new ArrayList(); if (jobList.size() > 0) { for (Iterator e = jobList.iterator(); e.hasNext();) { Job thisJob = (Job)e.next(); @@ -91,9 +91,9 @@ public class NodeItem extends NodeEntity { thisDetail.runCommand("Execution", stepName); } - public ArrayList getTabs() { + public ArrayList getTabs() { - ArrayList requiredTabs = super.getTabs(); + ArrayList requiredTabs = super.getTabs(); requiredTabs.add("Properties"); try { String collNames = myEntity.queryData(ClusterStorage.COLLECTION+"/all"); diff --git a/source/com/c2kernel/gui/tabs/DomainPathAdmin.java b/source/com/c2kernel/gui/tabs/DomainPathAdmin.java old mode 100755 new mode 100644 index 35104d7..2e81121 --- a/source/com/c2kernel/gui/tabs/DomainPathAdmin.java +++ b/source/com/c2kernel/gui/tabs/DomainPathAdmin.java @@ -102,11 +102,11 @@ public class DomainPathAdmin extends Box implements ActionListener { } private class DomainPathTableModel extends AbstractTableModel { - ArrayList domPaths; + ArrayList domPaths; DomainPathAdmin parent; public DomainPathTableModel(DomainPathAdmin parent) { this.parent = parent; - domPaths = new ArrayList(); + domPaths = new ArrayList(); } public void loadPaths() { @@ -134,7 +134,7 @@ public class DomainPathAdmin extends Box implements ActionListener { } } - public Class getColumnClass(int columnIndex) { + public Class getColumnClass(int columnIndex) { return String.class; } diff --git a/source/com/c2kernel/gui/tabs/HistoryPane.java b/source/com/c2kernel/gui/tabs/HistoryPane.java old mode 100755 new mode 100644 index 091ef5e..be7f8b2 --- a/source/com/c2kernel/gui/tabs/HistoryPane.java +++ b/source/com/c2kernel/gui/tabs/HistoryPane.java @@ -182,7 +182,7 @@ public class HistoryPane extends EntityTabPane implements ActionListener, Entity /** * @see javax.swing.table.TableModel#getColumnClass(int) */ - public Class getColumnClass(int columnIndex) { + public Class getColumnClass(int columnIndex) { switch(columnIndex) { case 0: return Integer.class; diff --git a/source/com/c2kernel/gui/tabs/JobListPane.java b/source/com/c2kernel/gui/tabs/JobListPane.java old mode 100755 new mode 100644 index ea14222..b9ff0e5 --- a/source/com/c2kernel/gui/tabs/JobListPane.java +++ b/source/com/c2kernel/gui/tabs/JobListPane.java @@ -209,7 +209,7 @@ public class JobListPane extends EntityTabPane implements ActionListener, Entity /** * @see javax.swing.table.TableModel#getColumnClass(int) */ - public Class getColumnClass(int columnIndex) { + public Class getColumnClass(int columnIndex) { switch(columnIndex) { case 0: return Integer.class; diff --git a/source/com/c2kernel/gui/tabs/PropertiesPane.java b/source/com/c2kernel/gui/tabs/PropertiesPane.java old mode 100755 new mode 100644 index 5666ae9..6b21804 --- a/source/com/c2kernel/gui/tabs/PropertiesPane.java +++ b/source/com/c2kernel/gui/tabs/PropertiesPane.java @@ -40,7 +40,7 @@ public class PropertiesPane extends EntityTabPane implements EntityProxyObserver Box propertyBox; boolean subbed = false; - HashMap loadedProps = new HashMap(); + HashMap loadedProps = new HashMap(); JLabel domTitle; DomainPathAdmin domAdmin; @@ -89,7 +89,7 @@ public class PropertiesPane extends EntityTabPane implements EntityProxyObserver public void reload() { Gateway.getStorage().clearCache(sourceEntity.getSysKey(), ClusterStorage.PROPERTY); - loadedProps = new HashMap(); + loadedProps = new HashMap(); initForEntity(sourceEntity); } diff --git a/source/com/c2kernel/gui/tabs/ViewpointPane.java b/source/com/c2kernel/gui/tabs/ViewpointPane.java old mode 100755 new mode 100644 index 7bb6176..31e18c3 --- a/source/com/c2kernel/gui/tabs/ViewpointPane.java +++ b/source/com/c2kernel/gui/tabs/ViewpointPane.java @@ -10,6 +10,7 @@ import java.awt.event.ItemListener; import java.io.File; import java.util.ArrayList; import java.util.Collections; +import java.util.Comparator; import java.util.Iterator; import java.util.StringTokenizer; @@ -40,16 +41,16 @@ import com.c2kernel.utils.Logger; public class ViewpointPane extends EntityTabPane implements ItemListener, ActionListener, EntityProxyObserver { - JComboBox schemas; - JComboBox views; - JComboBox events; + JComboBox schemas; + JComboBox views; + JComboBox events; JLabel eventDetails; JButton exportButton; JButton viewButton; - ArrayList schemaList; - ArrayList viewpointList; - ArrayList eventList; + ArrayList schemaList; + ArrayList viewpointList; + ArrayList eventList; String currentSchema = null; Outcome currentOutcome = null; OutcomeHandler thisOutcome; @@ -82,7 +83,7 @@ public class ViewpointPane extends EntityTabPane implements ItemListener, Action viewBox.add(label); viewBox.add(Box.createHorizontalStrut(7)); - schemas = new JComboBox(); + schemas = new JComboBox(); viewBox.add(schemas); viewBox.add(Box.createHorizontalGlue()); schemas.addItemListener(this); @@ -91,7 +92,7 @@ public class ViewpointPane extends EntityTabPane implements ItemListener, Action viewBox.add(label); viewBox.add(Box.createHorizontalStrut(7)); - views = new JComboBox(); + views = new JComboBox(); viewBox.add(views); viewBox.add(Box.createHorizontalGlue()); views.addItemListener(this); @@ -107,7 +108,7 @@ public class ViewpointPane extends EntityTabPane implements ItemListener, Action eventBox.add(label); eventBox.add(Box.createHorizontalStrut(7)); - events = new JComboBox(); + events = new JComboBox(); eventBox.add(events); eventBox.add(Box.createHorizontalStrut(7)); events.addItemListener(this); @@ -163,7 +164,7 @@ public class ViewpointPane extends EntityTabPane implements ItemListener, Action clearView(); schemas.addItem("--"); currentSchema = null; - schemaList = new ArrayList(); + schemaList = new ArrayList(); try { String outcomeTypes = sourceEntity.getEntity().queryData(ClusterStorage.VIEWPOINT+"/all"); StringTokenizer tok = new StringTokenizer(outcomeTypes, ","); @@ -197,8 +198,8 @@ public class ViewpointPane extends EntityTabPane implements ItemListener, Action suspendSelection = true; views.removeAllItems(); events.removeAllItems(); - viewpointList = new ArrayList(); - eventList = new ArrayList(); + viewpointList = new ArrayList(); + eventList = new ArrayList(); currentSchema = schemaName; @@ -233,8 +234,12 @@ public class ViewpointPane extends EntityTabPane implements ItemListener, Action } eventList.add(newEvent); } - Collections.sort(eventList); - for (Iterator iter = eventList.iterator(); iter.hasNext();) + Collections.sort(eventList, new Comparator() { + public int compare(EventItem o1, EventItem o2) { + return o1.compareTo(o2); + } + }); + for (Iterator iter = eventList.iterator(); iter.hasNext();) events.addItem(iter.next()); } @@ -435,7 +440,7 @@ public class ViewpointPane extends EntityTabPane implements ItemListener, Action class EventItem implements Comparable { public int eventId; public int schemaVersion; - public ArrayList viewNames = new ArrayList(); + public ArrayList viewNames = new ArrayList(); public String viewList = ""; public EventItem(int eventId, int schemaVersion) { diff --git a/source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java b/source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java old mode 100755 new mode 100644 index ef20a1a..bb71cd8 --- a/source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java +++ b/source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java @@ -48,17 +48,16 @@ public class CollectionHistoryWindow extends JFrame { private class HistoryTableModel extends AbstractTableModel implements EntityProxyObserver { ItemProxy item; - ArrayList collEvents, collEventData; + ArrayList collEvents, collEventData; Collection coll; public HistoryTableModel(ItemProxy item, Collection coll) { this.item = item; this.coll = coll; - collEvents = new ArrayList(); - collEventData = new ArrayList(); + collEvents = new ArrayList(); + collEventData = new ArrayList(); item.subscribe(this, ClusterStorage.HISTORY, true); } public int getColumnCount() { - // TODO Auto-generated method stub return 4; } @@ -72,7 +71,6 @@ public class CollectionHistoryWindow extends JFrame { } } public int getRowCount() { - // TODO Auto-generated method stub return collEvents.size(); } public Object getValueAt(int rowIndex, int columnIndex) { diff --git a/source/com/c2kernel/gui/tabs/execution/ActivityItem.java b/source/com/c2kernel/gui/tabs/execution/ActivityItem.java index 051f1dc..ba5e76b 100644 --- a/source/com/c2kernel/gui/tabs/execution/ActivityItem.java +++ b/source/com/c2kernel/gui/tabs/execution/ActivityItem.java @@ -8,7 +8,7 @@ public class ActivityItem { public String stepPath; public int state; public String name; - ArrayList jobs = new ArrayList<>(); + ArrayList jobs = new ArrayList(); public ActivityItem() { stepPath = ""; diff --git a/source/com/c2kernel/gui/tabs/execution/ActivityViewer.java b/source/com/c2kernel/gui/tabs/execution/ActivityViewer.java old mode 100755 new mode 100644 index 4250a37..b0417f4 --- a/source/com/c2kernel/gui/tabs/execution/ActivityViewer.java +++ b/source/com/c2kernel/gui/tabs/execution/ActivityViewer.java @@ -40,7 +40,7 @@ public class ActivityViewer extends JPanel implements Runnable { OutcomeHandler outcomePanel; JPanel outcomeView = new JPanel(new GridLayout(1,1)); ActivityItem thisAct; - ArrayList requestButtons = new ArrayList(); + ArrayList requestButtons = new ArrayList(); JLabel noOutcome = new JLabel(Language.translate("No outcome data is required for this activity")); ExecutionPane parent; JLabel status; diff --git a/source/com/c2kernel/gui/tabs/outcome/form/AttributeList.java b/source/com/c2kernel/gui/tabs/outcome/form/AttributeList.java old mode 100755 new mode 100644 index 08c5ea1..015bd9a --- a/source/com/c2kernel/gui/tabs/outcome/form/AttributeList.java +++ b/source/com/c2kernel/gui/tabs/outcome/form/AttributeList.java @@ -22,7 +22,7 @@ import com.c2kernel.utils.Logger; public class AttributeList extends JPanel { - ArrayList attrSet = new ArrayList(); + ArrayList attrSet = new ArrayList(); ElementDecl model; Element myElement; boolean readOnly; diff --git a/source/com/c2kernel/gui/tabs/outcome/form/Dimension.java b/source/com/c2kernel/gui/tabs/outcome/form/Dimension.java old mode 100755 new mode 100644 index 8dfa7f5..8de306b --- a/source/com/c2kernel/gui/tabs/outcome/form/Dimension.java +++ b/source/com/c2kernel/gui/tabs/outcome/form/Dimension.java @@ -36,8 +36,8 @@ public class Dimension extends OutcomeStructure implements ActionListener { JLabel msg; DomKeyPushTable table; Box tableBox; - ArrayList instances = new ArrayList(); // stores DimensionInstances if tabs - ArrayList elements = new ArrayList(); // stores current children + ArrayList instances = new ArrayList(); // stores DimensionInstances if tabs + ArrayList elements = new ArrayList(); // stores current children JButton addButton; JButton delButton; diff --git a/source/com/c2kernel/gui/tabs/outcome/form/DimensionTableModel.java b/source/com/c2kernel/gui/tabs/outcome/form/DimensionTableModel.java old mode 100755 new mode 100644 index b19c1d2..1a606fb --- a/source/com/c2kernel/gui/tabs/outcome/form/DimensionTableModel.java +++ b/source/com/c2kernel/gui/tabs/outcome/form/DimensionTableModel.java @@ -14,13 +14,13 @@ import com.c2kernel.utils.Logger; public class DimensionTableModel extends AbstractTableModel { ElementDecl model; - ArrayList columnHeadings = new ArrayList(); - ArrayList columnClasses = new ArrayList(); - ArrayList columnDecls = new ArrayList(); - ArrayList colReadOnly = new ArrayList(); - ArrayList colHelp = new ArrayList(); - ArrayList rows = new ArrayList(); - ArrayList elements = new ArrayList(); + ArrayList columnHeadings = new ArrayList(); + ArrayList> columnClasses = new ArrayList>(); + ArrayList columnDecls = new ArrayList(); + ArrayList colReadOnly = new ArrayList(); + ArrayList colHelp = new ArrayList(); + ArrayList rows = new ArrayList(); + ArrayList elements = new ArrayList(); boolean readOnly; public DimensionTableModel(ElementDecl model, boolean readOnly) throws StructuralException { @@ -176,8 +176,8 @@ public class DimensionTableModel extends AbstractTableModel { rows.add(index, newRow); fireTableRowsInserted(index, index); } - public Class getColumnClass(int columnIndex) { - return (Class)columnClasses.get(columnIndex); + public Class getColumnClass(int columnIndex) { + return columnClasses.get(columnIndex); } public String getColumnName(int columnIndex) { diff --git a/source/com/c2kernel/gui/tabs/outcome/form/OutcomeStructure.java b/source/com/c2kernel/gui/tabs/outcome/form/OutcomeStructure.java old mode 100755 new mode 100644 index 9333bf8..a535da6 --- a/source/com/c2kernel/gui/tabs/outcome/form/OutcomeStructure.java +++ b/source/com/c2kernel/gui/tabs/outcome/form/OutcomeStructure.java @@ -36,8 +36,8 @@ public abstract class OutcomeStructure extends JPanel { ElementDecl model; Element myElement = null; boolean readOnly; - HashMap subStructure = new HashMap(); - ArrayList order = new ArrayList(); + HashMap subStructure = new HashMap(); + ArrayList order = new ArrayList(); String help = ""+Language.translate("No help is available for this element")+""; HelpPane helpPane; boolean deferChild = false; @@ -46,7 +46,7 @@ public abstract class OutcomeStructure extends JPanel { this.model = model; this.readOnly = readOnly; this.helpPane = helpPane; - subStructure = new HashMap(); + subStructure = new HashMap(); Logger.msg(8, "Creating " + model.getName() + " structure as " + this.getClass().getName().substring(this.getClass().getName().lastIndexOf('.') + 1)); diff --git a/source/com/c2kernel/gui/tabs/outcome/form/field/ArrayTableModel.java b/source/com/c2kernel/gui/tabs/outcome/form/field/ArrayTableModel.java old mode 100755 new mode 100644 index 0807f78..c7934c0 --- a/source/com/c2kernel/gui/tabs/outcome/form/field/ArrayTableModel.java +++ b/source/com/c2kernel/gui/tabs/outcome/form/field/ArrayTableModel.java @@ -22,7 +22,7 @@ import com.c2kernel.utils.Language; public class ArrayTableModel extends AbstractTableModel { - ArrayList contents = new ArrayList(); + ArrayList contents = new ArrayList(); Class type; int numCols = 1; boolean readOnly = false; @@ -63,7 +63,7 @@ public class ArrayTableModel extends AbstractTableModel { fireTableStructureChanged(); } - public Class getColumnClass(int columnIndex) { + public Class getColumnClass(int columnIndex) { return type; } diff --git a/source/com/c2kernel/lifecycle/ActivityDef.java b/source/com/c2kernel/lifecycle/ActivityDef.java old mode 100755 new mode 100644 index fd6f646..42385a4 --- a/source/com/c2kernel/lifecycle/ActivityDef.java +++ b/source/com/c2kernel/lifecycle/ActivityDef.java @@ -23,7 +23,7 @@ public class ActivityDef extends WfVertexDef implements C2KLocalObject */ public ActivityDef() { - mErrors = new Vector(0, 1); + mErrors = new Vector(0, 1); setProperties(new WfCastorHashMap()); setIsLayoutable(false); getProperties().put(StateMachine.SKIPPABLE, new Boolean(false)); diff --git a/source/com/c2kernel/lifecycle/AndSplitDef.java b/source/com/c2kernel/lifecycle/AndSplitDef.java old mode 100755 new mode 100644 index 6692163..80c27df --- a/source/com/c2kernel/lifecycle/AndSplitDef.java +++ b/source/com/c2kernel/lifecycle/AndSplitDef.java @@ -18,7 +18,7 @@ public class AndSplitDef extends WfVertexDef */ public AndSplitDef() { - mErrors = new Vector(0, 1); + mErrors = new Vector(0, 1); getProperties().put("RoutingScriptName", ""); getProperties().put("RoutingScriptVersion", ""); } diff --git a/source/com/c2kernel/lifecycle/WfVertexDef.java b/source/com/c2kernel/lifecycle/WfVertexDef.java old mode 100755 new mode 100644 index a7bfd5a..221f6ae --- a/source/com/c2kernel/lifecycle/WfVertexDef.java +++ b/source/com/c2kernel/lifecycle/WfVertexDef.java @@ -14,7 +14,7 @@ import com.c2kernel.utils.KeyValuePair; */ public abstract class WfVertexDef extends GraphableVertex { - public Vector mErrors; + public Vector mErrors; protected boolean loopTested; @@ -24,7 +24,7 @@ public abstract class WfVertexDef extends GraphableVertex /** @label wf */ public WfVertexDef() { - mErrors = new Vector(0, 1); + mErrors = new Vector(0, 1); setIsLayoutable(true); } diff --git a/source/com/c2kernel/lifecycle/chooser/LDAPEntryChooser.java b/source/com/c2kernel/lifecycle/chooser/LDAPEntryChooser.java index 6e91469..e8143be 100644 --- a/source/com/c2kernel/lifecycle/chooser/LDAPEntryChooser.java +++ b/source/com/c2kernel/lifecycle/chooser/LDAPEntryChooser.java @@ -15,11 +15,11 @@ import com.c2kernel.lookup.DomainPath; import com.c2kernel.process.Gateway; import com.c2kernel.utils.Logger; -public class LDAPEntryChooser extends JComboBox +public class LDAPEntryChooser extends JComboBox { DomainPath mDomainPath = null; - ArrayList allItems = new ArrayList<>(); + ArrayList allItems = new ArrayList(); public LDAPEntryChooser(DomainPath domPath, boolean editable) { diff --git a/source/com/c2kernel/lifecycle/gui/model/WfVertexDefFactory.java b/source/com/c2kernel/lifecycle/gui/model/WfVertexDefFactory.java old mode 100755 new mode 100644 index 0cb60e7..2ef9508 --- a/source/com/c2kernel/lifecycle/gui/model/WfVertexDefFactory.java +++ b/source/com/c2kernel/lifecycle/gui/model/WfVertexDefFactory.java @@ -1,5 +1,6 @@ package com.c2kernel.lifecycle.gui.model; import java.awt.Point; +import java.io.Serializable; import java.util.HashMap; import javax.swing.JOptionPane; @@ -28,7 +29,7 @@ public class WfVertexDefFactory implements VertexFactory, WorkflowDialogue if (vertexTypeId.equals("Atomic") || vertexTypeId.equals("Composite")) { // ask for a name - HashMap mhm = new HashMap(); + HashMap mhm = new HashMap(); mhm.put("P1", vertexTypeId); mhm.put("P2", location); //************************************************ diff --git a/source/com/c2kernel/lifecycle/instance/Activity.java b/source/com/c2kernel/lifecycle/instance/Activity.java old mode 100755 new mode 100644 index 458c0a5..a0df570 --- a/source/com/c2kernel/lifecycle/instance/Activity.java +++ b/source/com/c2kernel/lifecycle/instance/Activity.java @@ -38,7 +38,7 @@ public class Activity extends WfVertex /** * vector of errors (Strings) that is constructed each time verify() is launched */ - protected Vector mErrors; + protected Vector mErrors; /** @associates a State machine engine */ private StateMachine machine; /** true is avalaibe to be executed */ @@ -56,7 +56,7 @@ public class Activity extends WfVertex { super(); setProperties(new WfCastorHashMap()); - mErrors = new Vector(0, 1); + mErrors = new Vector(0, 1); machine = new StateMachine(this); eventIds = new EventStorage(); mStartDate = new GTimeStamp(); @@ -483,20 +483,20 @@ public class Activity extends WfVertex /** * returns the lists of jobs for the activity and children (cf com.c2kernel.entity.Job) */ - public ArrayList calculateJobs(AgentPath agent, boolean recurse) + public ArrayList calculateJobs(AgentPath agent, boolean recurse) { return calculateJobsBase(agent, false); } // - public ArrayList calculateAllJobs(AgentPath agent, boolean recurse) + public ArrayList calculateAllJobs(AgentPath agent, boolean recurse) { return calculateJobsBase(agent, true); } - private ArrayList calculateJobsBase(AgentPath agent, boolean all) + private ArrayList calculateJobsBase(AgentPath agent, boolean all) { Logger.msg(7, "calculateJobs - " + getPath()); int[] transitions = { }; - ArrayList jobs = new ArrayList(); + ArrayList jobs = new ArrayList(); try { String agentName = checkAccessRights(agent); diff --git a/source/com/c2kernel/lifecycle/instance/AdvancementCalculator.java b/source/com/c2kernel/lifecycle/instance/AdvancementCalculator.java old mode 100755 new mode 100644 index ea47721..a0d4aab --- a/source/com/c2kernel/lifecycle/instance/AdvancementCalculator.java +++ b/source/com/c2kernel/lifecycle/instance/AdvancementCalculator.java @@ -10,9 +10,9 @@ import com.c2kernel.lifecycle.instance.stateMachine.States; public class AdvancementCalculator implements Serializable { private CompositeActivity activity; - private Hashtable isMarked; - private Hashtable HasNextMarked; - public Hashtable hasprevActive; + private Hashtable isMarked; + private Hashtable HasNextMarked; + public Hashtable hasprevActive; private long mCurrentNbActExp = 0; private long mMaximuNbActexp = 0; private long mNbActpassed = 0; @@ -24,9 +24,9 @@ public class AdvancementCalculator implements Serializable private boolean mHasPrevActive = false; public AdvancementCalculator() { - isMarked = new Hashtable(); - HasNextMarked = new Hashtable(); - hasprevActive = new Hashtable(); + isMarked = new Hashtable(); + HasNextMarked = new Hashtable(); + hasprevActive = new Hashtable(); } public void calculate(CompositeActivity act) { @@ -39,7 +39,7 @@ public class AdvancementCalculator implements Serializable activity = act; Vertex v = activity.getChildGraphModel().getStartVertex(); check(v, this); - isMarked = new Hashtable(); + isMarked = new Hashtable(); calc(v, this); // Logger.debug(0, act.getName()+" <<<<<<<<<"); } diff --git a/source/com/c2kernel/lifecycle/instance/CompositeActivity.java b/source/com/c2kernel/lifecycle/instance/CompositeActivity.java old mode 100755 new mode 100644 index 5292127..797a5db --- a/source/com/c2kernel/lifecycle/instance/CompositeActivity.java +++ b/source/com/c2kernel/lifecycle/instance/CompositeActivity.java @@ -8,6 +8,7 @@ import com.c2kernel.common.AccessRightsException; import com.c2kernel.common.InvalidDataException; import com.c2kernel.common.InvalidTransitionException; import com.c2kernel.common.ObjectAlreadyExistsException; +import com.c2kernel.entity.agent.Job; import com.c2kernel.graph.model.GraphModel; import com.c2kernel.graph.model.GraphPoint; import com.c2kernel.graph.model.GraphableVertex; @@ -297,7 +298,7 @@ public class CompositeActivity extends Activity */ public Activity[] query(AgentPath agent, int stateID, boolean filter) { - Vector steps = new Vector(); + Vector steps = new Vector(); Activity[] returnArray = null; for (int i = 0; i < getChildren().length; i++) { @@ -327,9 +328,9 @@ public class CompositeActivity extends Activity /** * @see com.c2kernel.lifecycle.instance.Activity#calculateJobs() */ - public ArrayList calculateJobs(AgentPath agent, boolean recurse) + public ArrayList calculateJobs(AgentPath agent, boolean recurse) { - ArrayList jobs = new ArrayList(); + ArrayList jobs = new ArrayList(); boolean childActive = false; if (recurse) for (int i = 0; i < getChildren().length; i++) @@ -344,9 +345,9 @@ public class CompositeActivity extends Activity return jobs; } - public ArrayList calculateAllJobs(AgentPath agent, boolean recurse) + public ArrayList calculateAllJobs(AgentPath agent, boolean recurse) { - ArrayList jobs = new ArrayList(); + ArrayList jobs = new ArrayList(); if (recurse) for (int i = 0; i < getChildren().length; i++) if (getChildren()[i] instanceof Activity) diff --git a/source/com/c2kernel/lifecycle/instance/Join.java b/source/com/c2kernel/lifecycle/instance/Join.java old mode 100755 new mode 100644 index 205d264..b61100e --- a/source/com/c2kernel/lifecycle/instance/Join.java +++ b/source/com/c2kernel/lifecycle/instance/Join.java @@ -11,14 +11,14 @@ import com.c2kernel.scripting.ScriptingEngineException; */ public class Join extends WfVertex { - public Vector mErrors; + public Vector mErrors; /** * @see java.lang.Object#Object() */ public Join() { super(); - mErrors = new Vector(0, 1); + mErrors = new Vector(0, 1); } private boolean loopTested; public int counter = 0; diff --git a/source/com/c2kernel/lifecycle/instance/ParserWF.java b/source/com/c2kernel/lifecycle/instance/ParserWF.java old mode 100755 new mode 100644 index c3d718d..35fed90 --- a/source/com/c2kernel/lifecycle/instance/ParserWF.java +++ b/source/com/c2kernel/lifecycle/instance/ParserWF.java @@ -14,7 +14,7 @@ import com.c2kernel.utils.Logger; */ public class ParserWF { - static Vector nexts; + static Vector nexts; static String file = ""; static int i; static CastorHashMap mInfo = new CastorHashMap(); @@ -32,7 +32,7 @@ public class ParserWF */ public static CompositeActivity addStep(CompositeActivity act, String xmlfile, AgentPath agent) throws IOException { - nexts = new Vector(1, 1); + nexts = new Vector(1, 1); i = 0; file = xmlfile; int c; diff --git a/source/com/c2kernel/lifecycle/instance/Split.java b/source/com/c2kernel/lifecycle/instance/Split.java old mode 100755 new mode 100644 index 1f269af..e7b275c --- a/source/com/c2kernel/lifecycle/instance/Split.java +++ b/source/com/c2kernel/lifecycle/instance/Split.java @@ -13,14 +13,14 @@ import com.c2kernel.scripting.ScriptingEngineException; */ public abstract class Split extends WfVertex { - public Vector mErrors; + public Vector mErrors; /** * @see java.lang.Object#Object() */ public Split() { - mErrors = new Vector(0, 1); + mErrors = new Vector(0, 1); getProperties().put("RoutingScriptName", ""); getProperties().put("RoutingScriptVersion", ""); } diff --git a/source/com/c2kernel/lifecycle/instance/Workflow.java b/source/com/c2kernel/lifecycle/instance/Workflow.java old mode 100755 new mode 100644 index a7066d8..4c8aa94 --- a/source/com/c2kernel/lifecycle/instance/Workflow.java +++ b/source/com/c2kernel/lifecycle/instance/Workflow.java @@ -1,12 +1,14 @@ package com.c2kernel.lifecycle.instance; import java.awt.Point; import java.util.ArrayList; + import com.c2kernel.common.AccessRightsException; import com.c2kernel.common.InvalidDataException; import com.c2kernel.common.InvalidTransitionException; import com.c2kernel.common.ObjectAlreadyExistsException; import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.entity.C2KLocalObject; +import com.c2kernel.entity.agent.Job; import com.c2kernel.graph.model.GraphPoint; import com.c2kernel.graph.model.TypeNameAndConstructionInfo; import com.c2kernel.lifecycle.instance.predefined.PredefinedStepContainer; @@ -171,9 +173,9 @@ public class Workflow extends CompositeActivity implements C2KLocalObject /** * if type = 0 only domain steps will be queried if type = 1 only predefined steps will be queried else both will be queried */ - public ArrayList calculateJobs(AgentPath agent, int type) + public ArrayList calculateJobs(AgentPath agent, int type) { - ArrayList jobs = new ArrayList(); + ArrayList jobs = new ArrayList(); if (type != 1) jobs.addAll(((CompositeActivity) search("workflow/domain")).calculateJobs(agent, true)); if (type != 0) diff --git a/source/com/c2kernel/lifecycle/instance/XOrSplit.java b/source/com/c2kernel/lifecycle/instance/XOrSplit.java old mode 100755 new mode 100644 index bd999af..108aa61 --- a/source/com/c2kernel/lifecycle/instance/XOrSplit.java +++ b/source/com/c2kernel/lifecycle/instance/XOrSplit.java @@ -23,7 +23,7 @@ public class XOrSplit extends Split public void runNext(AgentPath agent) throws ScriptingEngineException { - ArrayList nextsToFollow = new ArrayList(); + ArrayList nextsToFollow = new ArrayList(); String nexts = this.evaluateScript( (String) getProperties().get("RoutingScriptName"), (String) getProperties().get("RoutingScriptVersion")).toString(); diff --git a/source/com/c2kernel/lifecycle/instance/gui/model/WfVertexFactory.java b/source/com/c2kernel/lifecycle/instance/gui/model/WfVertexFactory.java old mode 100755 new mode 100644 index 020d694..d363dc6 --- a/source/com/c2kernel/lifecycle/instance/gui/model/WfVertexFactory.java +++ b/source/com/c2kernel/lifecycle/instance/gui/model/WfVertexFactory.java @@ -1,5 +1,6 @@ package com.c2kernel.lifecycle.instance.gui.model; import java.awt.Point; +import java.io.Serializable; import java.util.HashMap; import javax.swing.JOptionPane; @@ -26,7 +27,7 @@ public class WfVertexFactory implements VertexFactory, WorkflowDialogue vertexTypeId = (String) typeNameAndConstructionInfo.mInfo; if (vertexTypeId.equals("Atomic") || vertexTypeId.equals("Composite")) { - HashMap mhm = new HashMap(); + HashMap mhm = new HashMap(); mhm.put("P1", vertexTypeId); mhm.put("P2", location); //************************************************ diff --git a/source/com/c2kernel/lifecycle/instance/gui/view/TransitionPanel.java b/source/com/c2kernel/lifecycle/instance/gui/view/TransitionPanel.java old mode 100755 new mode 100644 index fc0cd99..d33b717 --- a/source/com/c2kernel/lifecycle/instance/gui/view/TransitionPanel.java +++ b/source/com/c2kernel/lifecycle/instance/gui/view/TransitionPanel.java @@ -40,7 +40,7 @@ public class TransitionPanel extends SelectedVertexPanel implements ActionListen protected GridBagConstraints c; protected Box transBox; protected JComboBox executors; - protected JComboBox states = new JComboBox(States.states); + protected JComboBox states = new JComboBox(States.states); protected JCheckBox active = new JCheckBox(); protected JLabel status = new JLabel(); protected ItemProxy mItem; diff --git a/source/com/c2kernel/lifecycle/instance/predefined/CreateItemFromDescription.java b/source/com/c2kernel/lifecycle/instance/predefined/CreateItemFromDescription.java old mode 100755 new mode 100644 index eddec34..7bedc81 --- a/source/com/c2kernel/lifecycle/instance/predefined/CreateItemFromDescription.java +++ b/source/com/c2kernel/lifecycle/instance/predefined/CreateItemFromDescription.java @@ -82,7 +82,7 @@ public class CreateItemFromDescription extends PredefinedStep // get init objects String[] collNames = storage.getClusterContents(myPath.getSysKey(), ClusterStorage.COLLECTION); - ArrayList collections = new ArrayList(); + ArrayList collections = new ArrayList(); // loop through collections to instantiate diff --git a/source/com/c2kernel/lifecycle/instance/predefined/entitycreation/Aggregation.java b/source/com/c2kernel/lifecycle/instance/predefined/entitycreation/Aggregation.java old mode 100755 new mode 100644 index 4abb0e6..3677220 --- a/source/com/c2kernel/lifecycle/instance/predefined/entitycreation/Aggregation.java +++ b/source/com/c2kernel/lifecycle/instance/predefined/entitycreation/Aggregation.java @@ -20,7 +20,6 @@ public class Aggregation implements java.io.Serializable { } public com.c2kernel.collection.Aggregation create() { - // TODO: create aggregation return new com.c2kernel.collection.AggregationInstance(); } } diff --git a/source/com/c2kernel/lifecycle/instance/predefined/entitycreation/NewItem.java b/source/com/c2kernel/lifecycle/instance/predefined/entitycreation/NewItem.java old mode 100755 new mode 100644 index 4988700..32ca623 --- a/source/com/c2kernel/lifecycle/instance/predefined/entitycreation/NewItem.java +++ b/source/com/c2kernel/lifecycle/instance/predefined/entitycreation/NewItem.java @@ -43,7 +43,7 @@ public class NewItem { /** * New Properties for the item */ - public ArrayList propertyList; + public ArrayList propertyList; /** * Field _aggregationList @@ -58,7 +58,7 @@ public class NewItem { public NewItem() { super(); - propertyList = new ArrayList(); + propertyList = new ArrayList(); aggregationList = new ArrayList(); dependencyList = new ArrayList(); } diff --git a/source/com/c2kernel/lookup/EntityPath.java b/source/com/c2kernel/lookup/EntityPath.java old mode 100755 new mode 100644 index 079f171..3a24228 --- a/source/com/c2kernel/lookup/EntityPath.java +++ b/source/com/c2kernel/lookup/EntityPath.java @@ -127,7 +127,7 @@ public class EntityPath extends Path if (sysKey < 0 || sysKey > maxSysKey) throw new InvalidEntityPathException("System key "+sysKey+" out of range"); String stringPath = Integer.toString(sysKey); - ArrayList newKey = new ArrayList(); + ArrayList newKey = new ArrayList(); for (int i=0; i propbag = new ArrayList(); LDAPAttribute props = entityEntry.getAttribute("cristalprop"); for (Enumeration e = props.getStringValues(); e.hasMoreElements();) { String thisProp = (String)e.nextElement(); diff --git a/source/com/c2kernel/lookup/LDAPRoleManager.java b/source/com/c2kernel/lookup/LDAPRoleManager.java old mode 100755 new mode 100644 index a9b6b23..a45da13 --- a/source/com/c2kernel/lookup/LDAPRoleManager.java +++ b/source/com/c2kernel/lookup/LDAPRoleManager.java @@ -113,7 +113,7 @@ public class LDAPRoleManager { } String[] res = LDAPLookupUtils.getAllAttributeValues(roleEntry,"uniqueMember"); - ArrayList agents = new ArrayList(); + ArrayList agents = new ArrayList(); for (int i=0; i roleList = new ArrayList(); while(roles.hasMoreElements()) { diff --git a/source/com/c2kernel/lookup/Path.java b/source/com/c2kernel/lookup/Path.java old mode 100755 new mode 100644 index b189910..b713493 --- a/source/com/c2kernel/lookup/Path.java +++ b/source/com/c2kernel/lookup/Path.java @@ -124,7 +124,7 @@ public abstract class Path implements Serializable */ public void setPath(String path) { - ArrayList newPath = new ArrayList(); + ArrayList newPath = new ArrayList(); StringTokenizer tok = new StringTokenizer(path, delim); if (tok.hasMoreTokens()) { String first = tok.nextToken(); @@ -171,7 +171,7 @@ public abstract class Path implements Serializable if (dn.endsWith(root)) dn = dn.substring(0, dn.lastIndexOf(root)); - ArrayList newPath = new ArrayList(); + ArrayList newPath = new ArrayList(); StringTokenizer tok = new StringTokenizer(dn, ","); while (tok.hasMoreTokens()) { String nextPath = tok.nextToken(); diff --git a/source/com/c2kernel/lookup/RolePath.java b/source/com/c2kernel/lookup/RolePath.java old mode 100755 new mode 100644 index df26eae..672bdbf --- a/source/com/c2kernel/lookup/RolePath.java +++ b/source/com/c2kernel/lookup/RolePath.java @@ -63,7 +63,7 @@ public class RolePath extends DomainPath public Enumeration getChildren() { AgentPath[] agents = getAgentsWithRole(); - Vector children = new Vector(agents.length); + Vector children = new Vector(agents.length); for (int i = 0; i < agents.length; i++) children.add(i, agents[i]); return children.elements(); diff --git a/source/com/c2kernel/persistency/ClusterStorageManager.java b/source/com/c2kernel/persistency/ClusterStorageManager.java old mode 100755 new mode 100644 index 5309f33..560e022 --- a/source/com/c2kernel/persistency/ClusterStorageManager.java +++ b/source/com/c2kernel/persistency/ClusterStorageManager.java @@ -1,10 +1,6 @@ package com.c2kernel.persistency; import java.util.*; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.StringTokenizer; import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.entity.C2KLocalObject; @@ -24,12 +20,12 @@ import com.c2kernel.utils.SoftCache; * @author $Author: abranson $ */ public class ClusterStorageManager { - HashMap allStores = new HashMap(); + HashMap allStores = new HashMap(); String[] clusterPriority; - HashMap clusterWriters = new HashMap(); - HashMap clusterReaders = new HashMap(); + HashMap> clusterWriters = new HashMap>(); + HashMap> clusterReaders = new HashMap>(); // we don't need a soft cache for the top level cache - the proxies and entities clear that when reaped - HashMap memoryCache = new HashMap(); + HashMap> memoryCache = new HashMap>(); boolean ready = false; /** @@ -45,7 +41,7 @@ public class ClusterStorageManager { StringTokenizer tok = new StringTokenizer(allClusters, ","); clusterPriority = new String[tok.countTokens()]; int clusterNo = 0; - ArrayList rootStores = new ArrayList(); + ArrayList rootStores = new ArrayList(); while (tok.hasMoreTokens()) { ClusterStorage newStorage = null; String newStorageClass = tok.nextToken(); @@ -82,7 +78,7 @@ public class ClusterStorageManager { } public void close() { - for (Iterator iter = allStores.values().iterator(); iter.hasNext();) { + for (Iterator iter = allStores.values().iterator(); iter.hasNext();) { ClusterStorage thisStorage = (ClusterStorage)iter.next(); try { thisStorage.close(); @@ -97,7 +93,7 @@ public class ClusterStorageManager { * Returns the loaded storage that declare that they can handle writing or reading the specified cluster name (e.g. * Collection, Property) Must specify if the request is a read or a write. */ - private ArrayList findStorages(String clusterType, boolean forWrite) { + private ArrayList findStorages(String clusterType, boolean forWrite) { if (!ready) { Logger.error("ClusterStorageManager.findStorages() - called before init!"); @@ -105,7 +101,7 @@ public class ClusterStorageManager { } // choose the right cache for readers or writers - HashMap cache; + HashMap> cache; if (forWrite) cache = clusterWriters; else @@ -113,11 +109,11 @@ public class ClusterStorageManager { // check to see if we've been asked to do this before if (cache.containsKey(clusterType)) - return (ArrayList)cache.get(clusterType); + return (ArrayList)cache.get(clusterType); // not done yet, we'll have to query them all Logger.msg(7, "ClusterStorageManager.findStorages() - finding storage for "+clusterType+" forWrite:"+forWrite); - ArrayList useableStorages = new ArrayList(); + ArrayList useableStorages = new ArrayList(); for (int i = 0; i < clusterPriority.length; i++) { ClusterStorage thisStorage = (ClusterStorage)allStores.get(clusterPriority[i]); short requiredSupport = forWrite ? ClusterStorage.WRITE : ClusterStorage.READ; @@ -136,13 +132,13 @@ public class ClusterStorageManager { */ public String[] getClusterContents(Integer sysKey, String path) throws ClusterStorageException { //String[] retArr = new String[0]; - ArrayList contents = new ArrayList(); + ArrayList contents = new ArrayList(); // get all readers String type = ClusterStorage.getClusterType(path); Logger.msg(8, "ClusterStorageManager.getClusterContents() - Finding contents of "+path); - ArrayList readers = findStorages(ClusterStorage.getClusterType(path), false); + ArrayList readers = findStorages(ClusterStorage.getClusterType(path), false); // try each in turn until we get a result - for (Iterator i = readers.iterator(); i.hasNext();) { + for (Iterator i = readers.iterator(); i.hasNext();) { ClusterStorage thisReader = (ClusterStorage)i.next(); try { String[] thisArr = thisReader.getClusterContents(sysKey, path); @@ -168,9 +164,9 @@ public class ClusterStorageManager { public C2KLocalObject get(Integer sysKeyIntObj, String path) throws ClusterStorageException, ObjectNotFoundException { C2KLocalObject result; // check cache first - SoftCache sysKeyMemCache = null; + SoftCache sysKeyMemCache = null; if (memoryCache.containsKey(sysKeyIntObj)) { - sysKeyMemCache = (SoftCache)memoryCache.get(sysKeyIntObj); + sysKeyMemCache = (SoftCache)memoryCache.get(sysKeyIntObj); synchronized(sysKeyMemCache) { C2KLocalObject obj = (C2KLocalObject)sysKeyMemCache.get(path); if (obj != null) { @@ -194,8 +190,8 @@ public class ClusterStorageManager { } // else try each reader in turn until we find it - ArrayList readers = findStorages(ClusterStorage.getClusterType(path), false); - for (Iterator i = readers.iterator(); i.hasNext(); ) { + ArrayList readers = findStorages(ClusterStorage.getClusterType(path), false); + for (Iterator i = readers.iterator(); i.hasNext(); ) { ClusterStorage thisReader = (ClusterStorage)i.next(); try { result = thisReader.get(sysKeyIntObj, path); @@ -203,7 +199,7 @@ public class ClusterStorageManager { if (result != null) { // got it! // store it in the cache if (sysKeyMemCache == null) { // create cache if needed - sysKeyMemCache = new SoftCache(0); + sysKeyMemCache = new SoftCache(0); synchronized (memoryCache) { memoryCache.put(sysKeyIntObj, sysKeyMemCache); } @@ -225,8 +221,8 @@ public class ClusterStorageManager { /** Internal put method. Creates or overwrites a cluster in all writers. Used when committing transactions. */ public void put(Integer sysKeyIntObj, C2KLocalObject obj) throws ClusterStorageException { String path = ClusterStorage.getPath(obj); - ArrayList writers = findStorages(ClusterStorage.getClusterType(path), true); - for (Iterator i = writers.iterator(); i.hasNext(); ) { + ArrayList writers = findStorages(ClusterStorage.getClusterType(path), true); + for (Iterator i = writers.iterator(); i.hasNext(); ) { ClusterStorage thisWriter = (ClusterStorage)i.next(); try { Logger.msg(7, "ClusterStorageManager.put() - writing "+path+" to "+thisWriter.getName()); @@ -238,11 +234,11 @@ public class ClusterStorageManager { } } // put in mem cache if that worked - SoftCache sysKeyMemCache; + SoftCache sysKeyMemCache; if (memoryCache.containsKey(sysKeyIntObj)) - sysKeyMemCache = (SoftCache)memoryCache.get(sysKeyIntObj); + sysKeyMemCache = (SoftCache)memoryCache.get(sysKeyIntObj); else { - sysKeyMemCache = new SoftCache(); + sysKeyMemCache = new SoftCache(); synchronized (memoryCache) { memoryCache.put(sysKeyIntObj, sysKeyMemCache); } @@ -260,8 +256,8 @@ public class ClusterStorageManager { /** Deletes a cluster from all writers */ public void remove(Integer sysKeyIntObj, String path) throws ClusterStorageException { - ArrayList writers = findStorages(ClusterStorage.getClusterType(path), true); - for (Iterator i = writers.iterator(); i.hasNext(); ) { + ArrayList writers = findStorages(ClusterStorage.getClusterType(path), true); + for (Iterator i = writers.iterator(); i.hasNext(); ) { ClusterStorage thisWriter = (ClusterStorage)i.next(); try { Logger.msg(7, "ClusterStorageManager.delete() - removing "+path+" from "+thisWriter.getName()); @@ -274,7 +270,7 @@ public class ClusterStorageManager { } if (memoryCache.containsKey(sysKeyIntObj)) { - SoftCache sysKeyMemCache = (SoftCache)memoryCache.get(sysKeyIntObj); + SoftCache sysKeyMemCache = (SoftCache)memoryCache.get(sysKeyIntObj); synchronized (sysKeyMemCache) { sysKeyMemCache.remove(path); } @@ -289,9 +285,9 @@ public class ClusterStorageManager { Logger.msg(7, "CSM.clearCache() - removing "+sysKeyIntObj+"/"+path); if (memoryCache.containsKey(sysKeyIntObj)) { - SoftCache sysKeyMemCache = (SoftCache)memoryCache.get(sysKeyIntObj); + SoftCache sysKeyMemCache = (SoftCache)memoryCache.get(sysKeyIntObj); synchronized(sysKeyMemCache) { - for (Iterator iter = sysKeyMemCache.keySet().iterator(); iter.hasNext();) { + for (Iterator iter = sysKeyMemCache.keySet().iterator(); iter.hasNext();) { String thisPath = (String)iter.next(); if (thisPath.startsWith(path)) { Logger.msg(7, "CSM.clearCache() - removing "+sysKeyIntObj+"/"+thisPath); @@ -309,7 +305,7 @@ public class ClusterStorageManager { if (memoryCache.containsKey(sysKeyIntObj)) { synchronized (memoryCache) { if (Logger.doLog(6)) { - SoftCache sysKeyMemCache = (SoftCache)memoryCache.get(sysKeyIntObj); + SoftCache sysKeyMemCache = (SoftCache)memoryCache.get(sysKeyIntObj); int size = sysKeyMemCache.size(); Logger.msg(6, "CSM.clearCache() - "+size+" objects to remove."); } @@ -330,13 +326,13 @@ public class ClusterStorageManager { public void dumpCacheContents(int logLevel) { if (!Logger.doLog(logLevel)) return; synchronized(memoryCache) { - for (Iterator iter = memoryCache.keySet().iterator(); iter.hasNext();) { + for (Iterator iter = memoryCache.keySet().iterator(); iter.hasNext();) { Integer sysKey = (Integer) iter.next(); Logger.msg(logLevel, "Cached Objects of Entity "+sysKey); - SoftCache sysKeyMemCache = (SoftCache)memoryCache.get(sysKey); + SoftCache sysKeyMemCache = (SoftCache)memoryCache.get(sysKey); try { synchronized(sysKeyMemCache) { - for (Iterator iterator = sysKeyMemCache.keySet().iterator();iterator.hasNext();) { + for (Iterator iterator = sysKeyMemCache.keySet().iterator();iterator.hasNext();) { String path = (String) iterator.next(); try { Logger.msg(logLevel, " Path "+path+": "+sysKeyMemCache.get(path).getClass().getName()); diff --git a/source/com/c2kernel/persistency/LDAPClusterStorage.java b/source/com/c2kernel/persistency/LDAPClusterStorage.java old mode 100755 new mode 100644 index 8e159e0..fb36d9f --- a/source/com/c2kernel/persistency/LDAPClusterStorage.java +++ b/source/com/c2kernel/persistency/LDAPClusterStorage.java @@ -146,7 +146,7 @@ public class LDAPClusterStorage extends ClusterStorage { else if (type.equals("")) { // root query String[] allClusters = new String[0]; - ArrayList clusterList = new ArrayList(); + ArrayList clusterList = new ArrayList(); if (ldapStore.hasProperties(thisEntity)) clusterList.add(PROPERTY); allClusters = (String[])clusterList.toArray(allClusters); diff --git a/source/com/c2kernel/persistency/ProxyLoader.java b/source/com/c2kernel/persistency/ProxyLoader.java old mode 100755 new mode 100644 index d20fb2d..687141f --- a/source/com/c2kernel/persistency/ProxyLoader.java +++ b/source/com/c2kernel/persistency/ProxyLoader.java @@ -18,7 +18,7 @@ import com.c2kernel.utils.Logger; */ public class ProxyLoader extends ClusterStorage { - HashMap entities = new HashMap(); + HashMap entities = new HashMap(); LDAPLookup lookup; public void open() throws ClusterStorageException { diff --git a/source/com/c2kernel/persistency/TransactionManager.java b/source/com/c2kernel/persistency/TransactionManager.java old mode 100755 new mode 100644 index 252c758..0908051 --- a/source/com/c2kernel/persistency/TransactionManager.java +++ b/source/com/c2kernel/persistency/TransactionManager.java @@ -13,14 +13,14 @@ import com.c2kernel.utils.Logger; public class TransactionManager { - HashMap locks; - HashMap pendingTransactions; + HashMap locks; + HashMap> pendingTransactions; ClusterStorageManager storage; public TransactionManager() throws ClusterStorageException { storage = new ClusterStorageManager(); - locks = new HashMap(); - pendingTransactions = new HashMap(); + locks = new HashMap(); + pendingTransactions = new HashMap>(); } public boolean hasPendingTransactions() @@ -92,7 +92,7 @@ public class TransactionManager { */ public void put(int sysKey, C2KLocalObject obj, Object locker) throws ClusterStorageException { Integer sysKeyIntObj = new Integer(sysKey); - ArrayList lockerTransaction; + ArrayList lockerTransaction; String path = ClusterStorage.getPath(obj); synchronized(locks) { @@ -101,7 +101,7 @@ public class TransactionManager { // if it's this locker, get the transaction list Object thisLocker = locks.get(sysKeyIntObj); if (thisLocker.equals(locker)) // retrieve the transaction list - lockerTransaction = (ArrayList)pendingTransactions.get(locker); + lockerTransaction = pendingTransactions.get(locker); else // locked by someone else throw new ClusterStorageException("ClusterStorageManager.get() - Access denied: Object " + sysKeyIntObj + " has been locked for writing by " + thisLocker); @@ -113,7 +113,7 @@ public class TransactionManager { } else {// initialise the transaction locks.put(sysKeyIntObj, locker); - lockerTransaction = new ArrayList(); + lockerTransaction = new ArrayList(); pendingTransactions.put(locker, lockerTransaction); } } @@ -134,14 +134,14 @@ public class TransactionManager { */ public void remove(int sysKey, String path, Object locker) throws ClusterStorageException { Integer sysKeyIntObj = new Integer(sysKey); - ArrayList lockerTransaction; + ArrayList lockerTransaction; synchronized(locks) { // look to see if this object is already locked if (locks.containsKey(sysKeyIntObj)) { // if it's this locker, get the transaction list Object thisLocker = locks.get(sysKeyIntObj); if (thisLocker.equals(locker)) // retrieve the transaction list - lockerTransaction = (ArrayList)pendingTransactions.get(locker); + lockerTransaction = pendingTransactions.get(locker); else // locked by someone else throw new ClusterStorageException("ClusterStorageManager.get() - Access denied: Object " + sysKeyIntObj + " has been locked for writing by " + thisLocker); @@ -153,7 +153,7 @@ public class TransactionManager { } else {// initialise the transaction locks.put(sysKeyIntObj, locker); - lockerTransaction = new ArrayList(); + lockerTransaction = new ArrayList(); pendingTransactions.put(locker, lockerTransaction); } } @@ -194,7 +194,7 @@ public class TransactionManager { public void commit(Object locker) { synchronized(locks) { ArrayList lockerTransactions = (ArrayList)pendingTransactions.get(locker); - HashMap exceptions = new HashMap(); + HashMap exceptions = new HashMap(); // quit if no transactions are present; if (lockerTransactions == null) return; for (Iterator i = lockerTransactions.iterator();i.hasNext();) { diff --git a/source/com/c2kernel/persistency/XMLClusterStorage.java b/source/com/c2kernel/persistency/XMLClusterStorage.java old mode 100755 new mode 100644 index 6e3cd72..24697af --- a/source/com/c2kernel/persistency/XMLClusterStorage.java +++ b/source/com/c2kernel/persistency/XMLClusterStorage.java @@ -110,7 +110,7 @@ public class XMLClusterStorage extends ClusterStorage { String filePath = getFilePath(sysKey, path); ArrayList paths = FileStringUtility.listDir( filePath, true, false ); if (paths == null) return result; // dir doesn't exist yet - ArrayList contents = new ArrayList(); + ArrayList contents = new ArrayList(); String previous = null; for (int i=0; i bootstrapFactoryItems = new HashMap(); static DomainPath thisServerPath; /** diff --git a/source/com/c2kernel/process/Gateway.java b/source/com/c2kernel/process/Gateway.java old mode 100755 new mode 100644 index fcec1c4..276b7b4 --- a/source/com/c2kernel/process/Gateway.java +++ b/source/com/c2kernel/process/Gateway.java @@ -143,6 +143,7 @@ public class Gateway sysProps.put("ORBHost", serverName); String serverPort = getProperty("ItemServer.iiop", "1500"); sysProps.put("ORBPort", serverPort); + //TODO: externalize this (or replace corba completely) sysProps.put("com.sun.CORBA.POA.ORBServerId", "1"); sysProps.put("com.sun.CORBA.POA.ORBPersistentServerPort", serverPort); diff --git a/source/com/c2kernel/process/StandardClient.java b/source/com/c2kernel/process/StandardClient.java old mode 100755 new mode 100644 index 00cebe6..2b04613 --- a/source/com/c2kernel/process/StandardClient.java +++ b/source/com/c2kernel/process/StandardClient.java @@ -12,5 +12,7 @@ package com.c2kernel.process; abstract public class StandardClient extends AbstractMain { + + //TODO: Auto-update from server } diff --git a/source/com/c2kernel/process/UserCodeProcess.java b/source/com/c2kernel/process/UserCodeProcess.java old mode 100755 new mode 100644 index 7eff37b..18fed06 --- a/source/com/c2kernel/process/UserCodeProcess.java +++ b/source/com/c2kernel/process/UserCodeProcess.java @@ -28,8 +28,8 @@ import com.c2kernel.utils.Logger; public class UserCodeProcess extends StandardClient implements EntityProxyObserver, Runnable { protected AgentProxy agent; static boolean active = true; - ArrayList ignoredPaths = new ArrayList(); - HashMap jobs; + ArrayList ignoredPaths = new ArrayList(); + HashMap jobs; public UserCodeProcess(String agentName, String agentPass) { // login - try for a while in case server hasn't imported our user yet @@ -51,7 +51,7 @@ public class UserCodeProcess extends StandardClient implements EntityProxyObserv public void run() { Thread.currentThread().setName("Usercode Process"); - jobs = new HashMap(); + jobs = new HashMap(); // subscribe to job list agent.subscribe(this, ClusterStorage.JOB, true); while (active) { diff --git a/source/com/c2kernel/property/PropertyArrayList.java b/source/com/c2kernel/property/PropertyArrayList.java old mode 100755 new mode 100644 index 71fc9b7..dffbaf6 --- a/source/com/c2kernel/property/PropertyArrayList.java +++ b/source/com/c2kernel/property/PropertyArrayList.java @@ -13,14 +13,14 @@ import java.util.ArrayList; import com.c2kernel.utils.CastorArrayList; -public class PropertyArrayList extends CastorArrayList +public class PropertyArrayList extends CastorArrayList { public PropertyArrayList() { super(); } - public PropertyArrayList(ArrayList aList) + public PropertyArrayList(ArrayList aList) { super(aList); } diff --git a/source/com/c2kernel/property/PropertyDescriptionList.java b/source/com/c2kernel/property/PropertyDescriptionList.java old mode 100755 new mode 100644 index 596aa52..64754a7 --- a/source/com/c2kernel/property/PropertyDescriptionList.java +++ b/source/com/c2kernel/property/PropertyDescriptionList.java @@ -14,14 +14,14 @@ import java.util.Iterator; import com.c2kernel.utils.CastorArrayList; -public class PropertyDescriptionList extends CastorArrayList +public class PropertyDescriptionList extends CastorArrayList { public PropertyDescriptionList() { super(); } - public PropertyDescriptionList(ArrayList aList) + public PropertyDescriptionList(ArrayList aList) { super(aList); } diff --git a/source/com/c2kernel/scripting/ErrorInfo.java b/source/com/c2kernel/scripting/ErrorInfo.java old mode 100755 new mode 100644 index 2714b93..1e813ec --- a/source/com/c2kernel/scripting/ErrorInfo.java +++ b/source/com/c2kernel/scripting/ErrorInfo.java @@ -12,12 +12,12 @@ import java.util.Iterator; * All rights reserved. **************************************************************************/ public class ErrorInfo { - ArrayList msg; + ArrayList msg; boolean fatal = false; public ErrorInfo() { super(); - msg = new ArrayList(); + msg = new ArrayList(); } public void addError(String error) { diff --git a/source/com/c2kernel/scripting/Script.java b/source/com/c2kernel/scripting/Script.java old mode 100755 new mode 100644 index 7b1c6db..4abb5cf --- a/source/com/c2kernel/scripting/Script.java +++ b/source/com/c2kernel/scripting/Script.java @@ -39,9 +39,9 @@ public class Script String mName; String mVersion; String mLang; - HashMap mInputParams = new HashMap(); - HashMap mAllInputParams = new HashMap(); - ArrayList mIncludes = new ArrayList(); + HashMap mInputParams = new HashMap(); + HashMap mAllInputParams = new HashMap(); + ArrayList