[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-mtj-commit] r1449 - in trunk/plugins: org.eclipse.mtj.tfm.sign.core/schema org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/internal/sign/core/extension org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/security org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/sign org.eclipse.mtj.tfm.sign.smgmt.ibm/bin org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/sign/smgmt/ibm org.eclipse.mtj.tfm.sign.smgmt.j9 org.eclipse.mtj.tfm.sign.smgmt.j9/bin org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9 org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/sign/smgmt/j9 org.eclipse.mtj.tfm.sign.smgmt.sun/bin org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/internal/sign/smgmt/sun org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/sign/smgmt/sun

Author: dmadruga
Date: 2009-08-25 21:36:23 -0400 (Tue, 25 Aug 2009)
New Revision: 1449

Added:
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ExtensionImpl.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/IExtension.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/IExtensionManager.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/security/
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/security/ISecurityManagement.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/security/X500DName.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/sign/
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/sign/ISigningProvider.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/IBMSmgmtConstants.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SmgmtConstants.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/PreferenceInitializer.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/sign/smgmt/j9/J9SecurityManagement.java
Removed:
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISecurityManagement.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISignExtension.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISignExtensionManager.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISigningProvider.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/SignExtensionImpl.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/bin/org/
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/SecurityManagementImplConstants.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/bin/org/
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SecurityManagerConstants.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SecurityManagerPrefInitilizer.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/sign/smgmt/j9/J9SecurityManager.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.sun/bin/org/
Modified:
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/schema/org_eclipse_mtj_tfm_sign_core_security_management.exsd
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/schema/org_eclipse_mtj_tfm_sign_core_signing_provider.exsd
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/internal/sign/core/extension/SignExtensionManager.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/SignCore.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/PreferenceInitializer.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/sign/smgmt/ibm/IBMSecurityManagement.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/plugin.xml
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/Messages.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/messages.properties
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/internal/sign/smgmt/sun/PreferenceInitializer.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/internal/sign/smgmt/sun/SunSmgmtConstants.java
   trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/sign/smgmt/sun/SunSecurityManagement.java
Log:
[286387][api, core, ui]  -  [fiximprove] [Sign][api]: Refactor MTJ in order to separate signing common features 

Modified: trunk/plugins/org.eclipse.mtj.tfm.sign.core/schema/org_eclipse_mtj_tfm_sign_core_security_management.exsd
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/schema/org_eclipse_mtj_tfm_sign_core_security_management.exsd	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/schema/org_eclipse_mtj_tfm_sign_core_security_management.exsd	2009-08-26 01:36:23 UTC (rev 1449)
@@ -69,7 +69,7 @@
                   
                </documentation>
                <appinfo>
-                  <meta.attribute kind="java" basedOn="org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement:"/>
+                  <meta.attribute kind="java" basedOn="org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement:"/>
                </appinfo>
             </annotation>
          </attribute>

Modified: trunk/plugins/org.eclipse.mtj.tfm.sign.core/schema/org_eclipse_mtj_tfm_sign_core_signing_provider.exsd
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/schema/org_eclipse_mtj_tfm_sign_core_signing_provider.exsd	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/schema/org_eclipse_mtj_tfm_sign_core_signing_provider.exsd	2009-08-26 01:36:23 UTC (rev 1449)
@@ -69,7 +69,7 @@
                   
                </documentation>
                <appinfo>
-                  <meta.attribute kind="java" basedOn="org.eclipse.mtj.tfm.sign.core.extension.ISigningProvider:"/>
+                  <meta.attribute kind="java" basedOn="org.eclipse.mtj.tfm.sign.core.extension.sign.ISigningProvider:"/>
                </appinfo>
             </annotation>
          </attribute>

Modified: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/internal/sign/core/extension/SignExtensionManager.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/internal/sign/core/extension/SignExtensionManager.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/internal/sign/core/extension/SignExtensionManager.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -34,24 +34,24 @@
 import org.eclipse.mtj.tfm.sign.core.SignCore;
 import org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType;
 import org.eclipse.mtj.tfm.sign.core.exception.SignException;
-import org.eclipse.mtj.tfm.sign.core.extension.ISignExtension;
-import org.eclipse.mtj.tfm.sign.core.extension.ISignExtensionManager;
+import org.eclipse.mtj.tfm.sign.core.extension.IExtension;
+import org.eclipse.mtj.tfm.sign.core.extension.IExtensionManager;
 
 /**
  * The extensibility functionalities are accessible by SignExtensionManager.
  * 
  * @since 1.0
  */
-public class SignExtensionManager implements ISignExtensionManager {
+public class SignExtensionManager implements IExtensionManager {
 
-    private static ISignExtensionManager instance;
+    private static IExtensionManager instance;
 
     /**
      * Method is used to get reference to the SignExtensionManager -object.
      * 
      * @return
      */
-    public static ISignExtensionManager getInstance() {
+    public static IExtensionManager getInstance() {
         if (instance == null) {
             instance = new SignExtensionManager();
         }
@@ -93,18 +93,18 @@
     /* (non-Javadoc)
      * @see org.eclipse.mtj.tfm.sign.core.ISignExtensionService#getAllImplementations()
      */
-    public ISignExtension[] getAllImplementations() {
+    public IExtension[] getAllImplementations() {
         return getAllImplementations(null);
     }
 
     /* (non-Javadoc)
      * @see org.eclipse.mtj.tfm.sign.core.ISignExtensionService#getAllImplementations(java.lang.String)
      */
-    public ISignExtension[] getAllImplementations(String project) {
-        ArrayList<ISignExtension> l = loadExtensions(SignCore.PLUGIN_ID, null);
-        ISignExtension[] ret = new ISignExtension[l.size()];
+    public IExtension[] getAllImplementations(String project) {
+        ArrayList<IExtension> l = loadExtensions(SignCore.PLUGIN_ID, null);
+        IExtension[] ret = new IExtension[l.size()];
         for (int i = 0; i < l.size(); i++) {
-            ret[i] = (ISignExtension) l.get(i);
+            ret[i] = (IExtension) l.get(i);
             ret[i]
                     .setActive(isActive(ret[i].getId(), ret[i].getType(),
                             project));
@@ -116,7 +116,7 @@
     /* (non-Javadoc)
      * @see org.eclipse.mtj.tfm.sign.core.ISignExtensionService#getImplementations(org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType, java.lang.String, java.lang.String)
      */
-    public List<ISignExtension> getImplementations(ExtensionType extensionType,
+    public List<IExtension> getImplementations(ExtensionType extensionType,
             String version, String vendor) {
         return getImplementations(extensionType, version, vendor, true);
     }
@@ -124,7 +124,7 @@
     /* (non-Javadoc)
      * @see org.eclipse.mtj.tfm.sign.core.ISignExtensionService#getImplementations(org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType, java.lang.String, java.lang.String, boolean)
      */
-    public List<ISignExtension> getImplementations(ExtensionType extensionType,
+    public List<IExtension> getImplementations(ExtensionType extensionType,
             String version, String vendor, boolean onlyActive) {
         return getImplementations(extensionType, version, vendor, null,
                 onlyActive);
@@ -133,7 +133,7 @@
     /* (non-Javadoc)
      * @see org.eclipse.mtj.tfm.sign.core.ISignExtensionService#getImplementations(org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType, java.lang.String, java.lang.String, java.lang.String)
      */
-    public List<ISignExtension> getImplementations(ExtensionType extensionType,
+    public List<IExtension> getImplementations(ExtensionType extensionType,
             String version, String vendor, String project) {
         return getImplementations(extensionType, version, vendor, project, true);
     }
@@ -141,15 +141,15 @@
     /* (non-Javadoc)
      * @see org.eclipse.mtj.tfm.sign.core.ISignExtensionService#getImplementations(org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType, java.lang.String, java.lang.String, java.lang.String, boolean)
      */
-    public List<ISignExtension> getImplementations(ExtensionType extensionType,
+    public List<IExtension> getImplementations(ExtensionType extensionType,
             String version, String vendor, String project, boolean onlyActive) {
 
-        ArrayList<ISignExtension> l = loadExtensions(SignCore.PLUGIN_ID,
+        ArrayList<IExtension> l = loadExtensions(SignCore.PLUGIN_ID,
                 extensionType);
 
-        ArrayList<ISignExtension> r = new ArrayList<ISignExtension>();
+        ArrayList<IExtension> r = new ArrayList<IExtension>();
         for (int i = 0; i < l.size(); i++) {
-            ISignExtension ex = (ISignExtension) l.get(i);
+            IExtension ex = (IExtension) l.get(i);
 
             boolean active = isActive(ex.getId(), extensionType, project);
 
@@ -176,10 +176,10 @@
             }
         }
 
-        // Create an ISignExtension array from the ArrayList
-        List<ISignExtension> ret = new ArrayList<ISignExtension>(r.size());
+        // Create an IExtension array from the ArrayList
+        List<IExtension> ret = new ArrayList<IExtension>(r.size());
         for (int i = 0; i < r.size(); i++) {
-            ret.add((ISignExtension) r.get(i));
+            ret.add((IExtension) r.get(i));
         }
 
         return ret;
@@ -216,11 +216,11 @@
     /* (non-Javadoc)
      * @see org.eclipse.mtj.tfm.sign.core.ISignExtensionService#loadExtensions(java.lang.String)
      */
-    public ArrayList<ISignExtension> loadExtensions(String extensionName) {
+    public ArrayList<IExtension> loadExtensions(String extensionName) {
         IExtensionRegistry r = Platform.getExtensionRegistry();
 
         IExtensionPoint[] ps = r.getExtensionPoints(SignCore.PLUGIN_ID);
-        ArrayList<ISignExtension> l = new ArrayList<ISignExtension>();
+        ArrayList<IExtension> l = new ArrayList<IExtension>();
         for (IExtensionPoint p : ps) {
             if ((p.getSimpleIdentifier() != null)
                     && (p.getSimpleIdentifier().equalsIgnoreCase(extensionName))) {
@@ -228,7 +228,7 @@
                 if (c != null) {
                     for (IConfigurationElement element : c) {
                         try {
-                            ISignExtension o = (ISignExtension) element
+                            IExtension o = (IExtension) element
                                     .createExecutableExtension("class"); //$NON-NLS-1$
                             if (o != null) {
                                 l.add(o);
@@ -246,13 +246,13 @@
     /* (non-Javadoc)
      * @see org.eclipse.mtj.tfm.sign.core.ISignExtensionService#loadExtensions(java.lang.String, org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType)
      */
-    public ArrayList<ISignExtension> loadExtensions(String plugin_id,
+    public ArrayList<IExtension> loadExtensions(String plugin_id,
             ExtensionType extensionType) {
         IExtensionRegistry r = Platform.getExtensionRegistry();
         // Testing
 
         IExtensionPoint[] ps = r.getExtensionPoints(plugin_id);
-        ArrayList<ISignExtension> l = new ArrayList<ISignExtension>();
+        ArrayList<IExtension> l = new ArrayList<IExtension>();
         for (IExtensionPoint p : ps) {
             if ((p.getSimpleIdentifier() != null)
                     && ((extensionType == null) || p.getSimpleIdentifier()
@@ -263,11 +263,11 @@
                 if (c != null) {
                     for (IConfigurationElement element : c) {
                         try {
-                            ISignExtension o = (ISignExtension) element
+                            IExtension o = (IExtension) element
                                     .createExecutableExtension("class"); //$NON-NLS-1$
                             if (o != null) {
                                 // Testing
-                                if (o instanceof ISignExtension) {
+                                if (o instanceof IExtension) {
                                     // System.out.println(o.toString());
                                     l.add(o);
                                 }

Modified: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/SignCore.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/SignCore.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/SignCore.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -13,7 +13,7 @@
 
 import org.eclipse.core.runtime.Plugin;
 import org.eclipse.mtj.tfm.internal.sign.core.extension.SignExtensionManager;
-import org.eclipse.mtj.tfm.sign.core.extension.ISignExtensionManager;
+import org.eclipse.mtj.tfm.sign.core.extension.IExtensionManager;
 import org.osgi.framework.BundleContext;
 
 /**
@@ -39,7 +39,7 @@
 	/**
 	 * @return
 	 */
-	public static ISignExtensionManager getSignExtensionManager(){
+	public static IExtensionManager getSignExtensionManager(){
 	    return new SignExtensionManager();
 	}
 	

Copied: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ExtensionImpl.java (from rev 1439, trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/SignExtensionImpl.java)
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ExtensionImpl.java	                        (rev 0)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ExtensionImpl.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -0,0 +1,121 @@
+/**
+ * Copyright (c) 2009 Motorola.
+ * 
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Diego Sandin (Motorola) - Initial Version
+ */
+package org.eclipse.mtj.tfm.sign.core.extension;
+
+import org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType;
+import org.osgi.framework.Version;
+
+/**
+ * @author Diego Sandin
+ * @since 1.0
+ */
+public class ExtensionImpl implements IExtension {
+
+    protected String id = "DefaulSignExtensionId";
+    protected String vendor = "DSDP - Eclipse.org";
+    protected Version version = Version.emptyVersion;
+    protected String description = "Defaul Sign Extension Description";
+    protected ExtensionType type = ExtensionType.SECURITY_MANAGEMENT;
+    protected boolean active = false;
+
+    /**
+     * Creates a new instance of ExtensionImpl.
+     */
+    public ExtensionImpl() {
+
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.IExtension#getDescription()
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.IExtension#getId()
+     */
+    public String getId() {
+        return id;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.IExtension#getType()
+     */
+    public ExtensionType getType() {
+        return type;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.IExtension#getVendor()
+     */
+    public String getVendor() {
+        return vendor;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.IExtension#getVersion()
+     */
+    public Version getVersion() {
+        return version;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.IExtension#isActive()
+     */
+    public boolean isActive() {
+        return active;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.IExtension#setActive(boolean)
+     */
+    public void setActive(boolean value) {
+        active = value;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.IExtension#setDescription(java.lang.String)
+     */
+    public void setDescription(String value) {
+        description = value;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.IExtension#setId(java.lang.String)
+     */
+    public void setId(String value) {
+        id = value;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.IExtension#setType(org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType)
+     */
+    public void setType(ExtensionType value) {
+        type = value;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.IExtension#setVendor(java.lang.String)
+     */
+    public void setVendor(String value) {
+        vendor = value;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.IExtension#setVersion(org.osgi.framework.Version)
+     */
+    public void setVersion(Version value) {
+        version = value;
+    }
+
+}


Property changes on: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ExtensionImpl.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/IExtension.java (from rev 1439, trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISignExtension.java)
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/IExtension.java	                        (rev 0)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/IExtension.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -0,0 +1,83 @@
+/**
+ * Copyright (c) 2005,2009 Nokia Corporation and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Nokia Corporation         - Initial Version
+ *     Diego Sandin (Motorola)   - Porting code to TFM Sign Framework [Bug 286387]
+ */
+package org.eclipse.mtj.tfm.sign.core.extension;
+
+import org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType;
+import org.osgi.framework.Version;
+
+/**
+ * 
+ */
+public interface IExtension {
+
+    /**
+     * @return
+     */
+    String getId();
+
+    /**
+     * @param value
+     */
+    void setId(String value);
+
+    /**
+     * @return
+     */
+    String getVendor();
+
+    /**
+     * @param value
+     */
+    void setVendor(String value);
+
+    /**
+     * @return
+     */
+    Version getVersion();
+
+    /**
+     * @param value
+     */
+    void setVersion(Version value);
+
+    /**
+     * @return
+     */
+    String getDescription();
+
+    /**
+     * @param value
+     */
+    void setDescription(String value);
+
+    /**
+     * @return
+     */
+    ExtensionType getType();
+
+    /**
+     * @param value
+     */
+    void setType(ExtensionType value);
+
+    /**
+     * @return
+     */
+    boolean isActive();
+
+    /**
+     * @param value
+     */
+    void setActive(boolean value);
+
+}


Property changes on: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/IExtension.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/IExtensionManager.java (from rev 1439, trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISignExtensionManager.java)
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/IExtensionManager.java	                        (rev 0)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/IExtensionManager.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -0,0 +1,156 @@
+/**
+ * Copyright (c) 2005,2009 Nokia Corporation and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Nokia Corporation         - Initial Version
+ *     Diego Sandin (Motorola)   - Porting code to TFM Sign Framework [Bug 286387]
+ */
+package org.eclipse.mtj.tfm.sign.core.extension;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType;
+import org.eclipse.mtj.tfm.sign.core.exception.SignException;
+
+/**
+ * @since 1.0
+ */
+public interface IExtensionManager {
+
+    /**
+     * CamelCase identifiers! Capitalize an identifier - i.e. Convert something
+     * like "Device_Management" to "deviceManagement" or "DEVICE_MANAGEMENT" to
+     * "deviceManagement"
+     * 
+     * @param value The identifier to capitalize - e.g. "DEVICE_MANAGEMENT".
+     * @return The capitalized identifier - e.g. "deviceManagement".
+     */
+    public abstract String capitalizeIdentifier(String _value);
+
+    /**
+     * Method returns all existing Sign Extensions.
+     * 
+     * @return
+     */
+    public abstract IExtension[] getAllImplementations();
+
+    /**
+     * @param project
+     * @return
+     */
+    public abstract IExtension[] getAllImplementations(String project);
+
+    /**
+     * Method returns all active Mtj Extensions that are the defined extension
+     * type and is implemented by the vendor. Also vendor's specific version can
+     * be defined. Vendor and version attributes could have also null values.
+     * 
+     * @param type
+     * @param version
+     * @param vendor
+     * @return
+     */
+    public abstract List<IExtension> getImplementations(
+            ExtensionType extensionType, String version, String vendor);
+
+    /**
+     * @param extensionType
+     * @param version
+     * @param vendor
+     * @param onlyActive
+     * @return
+     */
+    public abstract List<IExtension> getImplementations(
+            ExtensionType extensionType, String version, String vendor,
+            boolean onlyActive);
+
+    /**
+     * @param extensionType
+     * @param version
+     * @param vendor
+     * @param project
+     * @return
+     */
+    public abstract List<IExtension> getImplementations(
+            ExtensionType extensionType, String version, String vendor,
+            String project);
+
+    /**
+     * @param extensionType
+     * @param version
+     * @param vendor
+     * @param project
+     * @param onlyActive
+     * @return
+     */
+    public abstract List<IExtension> getImplementations(
+            ExtensionType extensionType, String version, String vendor,
+            String project, boolean onlyActive);
+
+    /**
+     * Method is used to verify if the extension is active.
+     * 
+     * @param vendor
+     * @param version
+     * @param type
+     * @return
+     */
+    public abstract boolean isActive(String id, ExtensionType type);
+
+    /**
+     * Method is used to verify if the extension is active.
+     * 
+     * @param vendor
+     * @param version
+     * @param type
+     * @param project
+     * @return
+     */
+    public abstract boolean isActive(String id, ExtensionType type,
+            String project);
+
+    /**
+     * @param extensionName
+     * @return
+     */
+    public abstract ArrayList<IExtension> loadExtensions(
+            String extensionName);
+
+    /**
+     * @param plugin_id
+     * @param extensionType
+     * @return
+     */
+    public abstract ArrayList<IExtension> loadExtensions(String plugin_id,
+            ExtensionType extensionType);
+
+    /**
+     * Method is used to set the extension's activity.
+     * 
+     * @param vendor
+     * @param version
+     * @param type
+     * @param isActive
+     */
+    public abstract void setActive(String id, ExtensionType type,
+            boolean isActive) throws SignException;
+
+    /**
+     * Method is used to set the extension's activity.
+     * 
+     * @param vendor
+     * @param version
+     * @param type
+     * @param project
+     * @param isActive
+     */
+    public abstract void setActive(String id, ExtensionType type,
+            String project, boolean isActive) throws SignException;
+
+}
\ No newline at end of file

Deleted: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISecurityManagement.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISecurityManagement.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISecurityManagement.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -1,245 +0,0 @@
-/**
- * Copyright (c) 2005,2009 Nokia Corporation and others.
-
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Nokia Corporation         - Initial Version
- *     Kevin Horowitz (IBM Corp) - Update javadoc
- *     Diego Sandin (Motorola)   - Porting code to TFM Sign Framework [Bug 286387]
- */
-package org.eclipse.mtj.tfm.sign.core.extension;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mtj.tfm.sign.core.exception.SignException;
-
-/**
- * The Security Management Provider provides the interface to interact with Key
- * Stores.
- * 
- * @since 1.0
- */
-public interface ISecurityManagement extends ISignExtension {
-
-    /**
-     * Accesses an existing keystore, opens the keystore and returns a string
-     * array containing the key aliases within the keystore.
-     * 
-     * @param keyStore
-     * @param storePass
-     * @param monitor
-     * @return String[]
-     * @throws SignException
-     */
-    public String[] openKeyStore(String keyStore, String storePass,
-            IProgressMonitor monitor) throws SignException;
-
-    /**
-     * Returns the keystore type used by keystore.
-     * 
-     * @return String
-     * @throws SignException
-     */
-    public String getStoreType() throws SignException;
-
-    /**
-     * Returns the current key alias. Calling classes will set this value based
-     * on user selection from the keystore.
-     * 
-     * @return key alias that is currently being used.
-     * @throws SignException
-     */
-    public String getAliaskey() throws SignException;
-
-    /**
-     * Returns the current keystore password.
-     * 
-     * @return
-     * @throws SignException
-     */
-    public String getPassWrd() throws SignException;
-
-    /**
-     * Returns the location of the current keystore.
-     * 
-     * @return
-     * @throws SignException
-     */
-    public String getKeyStoreNameLoc() throws SignException;
-
-    /**
-     * Returns the validity of the current key pair.
-     * 
-     * @return
-     * @throws SignException
-     */
-    public String getValidity() throws SignException;
-
-    /**
-     * Sets the type of keystore to generate.
-     * 
-     * @param storeType
-     * @throws SignException
-     */
-    public void setStoreType(String storeType) throws SignException;
-
-    /**
-     * Sets the alias for the current key pair.
-     * 
-     * @param aliasKey
-     * @throws SignException
-     */
-    public void setAliaskey(String aliasKey) throws SignException;
-
-    /**
-     * Sets the password for the current keystore.
-     * 
-     * @param passWrd
-     * @throws SignException
-     */
-    public void setPassWrd(String passWrd) throws SignException;
-
-    /**
-     * Sets the Key Store name location.
-     * 
-     * @param keyStoreNameLoc
-     * @throws SignException
-     */
-    public void setKeyStoreNameLoc(String keyStoreNameLoc) throws SignException;
-
-    /**
-     * Sets the validity period for the certificate.
-     * 
-     * @param validity
-     * @throws SignException
-     */
-    public void setValidity(String validity) throws SignException;
-
-    /**
-     * Allows users of this class to set the keystore values.
-     * 
-     * @param loc
-     * @param alias
-     * @param psswd
-     * @param strtype
-     * @throws SignException
-     */
-    public void setValues(String loc, String alias, String psswd, String strtype)
-            throws SignException;
-
-    /**
-     * Resets all values including keystore, password, alias key, etc
-     * 
-     * @throws SignException
-     */
-    public void resetValues() throws SignException;
-
-    /**
-     * Return true if the keystore name and location were set during this
-     * session.
-     * 
-     * @return true if a keystore name and location were set during this
-     *         session, false otherwise.
-     */
-    public boolean isKeyStoreSelected() throws SignException;
-
-    /**
-     * Generates a new CSR.
-     * 
-     * @param certFile - location and name of file to generate
-     * @param monitor
-     * @return - True if success, otherwise false.
-     * @throws SignException
-     */
-    public boolean generateCSR(String certFile, IProgressMonitor monitor)
-            throws SignException;
-
-    /**
-     * Imports signed certificate to current keystore.
-     * 
-     * @param certFile - location of signed certificate to import
-     * @param monitor
-     * @return - True if success, otherwise false.
-     * @throws SignException
-     */
-    public boolean importSignedCert(String certFile, IProgressMonitor monitor)
-            throws SignException;
-
-    /**
-     * Deletes the current key pair, from the current keystore
-     * 
-     * @param monitor
-     * @return - True if success, otherwise false.
-     * @throws SignException
-     */
-    public boolean deleteKey(IProgressMonitor monitor) throws SignException;
-
-    /**
-     * Changes the password of the current keystore.
-     * 
-     * @param newStorePass - Changes the keystore password to newStorePass.
-     * @param storePass - Previous keystore password.
-     * @param monitor
-     * @return - True if success, otherwise false.
-     * @throws SignException
-     */
-    public boolean changeStorePassword(String newStorePass, String storePass,
-            IProgressMonitor monitor) throws SignException;
-
-    /**
-     * Creates a new key pair with the information passed in. Attaches the new
-     * key pair to the current keystore.
-     * 
-     * @param alias - New key pair alias.
-     * @param commonName - New key pair common name.
-     * @param orgUnit - New key pair organization unit name.
-     * @param orgName - New key pair organization name.
-     * @param localityName - New key pair locality name.
-     * @param stateName - New key pair state name.
-     * @param country - New key pair country name.
-     * @param monitor - Progress monitor.
-     * @return - true is success, otherwise false.
-     * @throws SignException
-     */
-    public boolean createNewKey(String alias, String commonName,
-            String orgUnit, String orgName, String localityName,
-            String stateName, String country, IProgressMonitor monitor)
-            throws SignException;
-
-    /**
-     * Get the certificates associated with the alias key/keystore.
-     * 
-     * @param monitor
-     * @return
-     * @throws SignException
-     */
-    public String getCertificateInfo(IProgressMonitor monitor)
-            throws SignException;
-
-    /**
-     * Implementations that rely on an external security tool, are responsible
-     * for persistent storage of the tool location value. This method should
-     * return the location of the tool. Should never return null.
-     * 
-     * @param monitor
-     * @return - Tool location.
-     * @throws SignException
-     */
-    public String getToolLocation(IProgressMonitor monitor)
-            throws SignException;
-
-    /**
-     * Implementations that rely on an external security tool, are responsible
-     * for persistent storage of the tool location value. This method should
-     * contain the code to store the location.
-     * 
-     * @param loc - Directory where tool resides.
-     * @param monitor
-     * @throws SignException
-     */
-    public void storeToolLocation(String loc, IProgressMonitor monitor)
-            throws SignException;
-}

Deleted: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISignExtension.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISignExtension.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISignExtension.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -1,83 +0,0 @@
-/**
- * Copyright (c) 2005,2009 Nokia Corporation and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Nokia Corporation         - Initial Version
- *     Diego Sandin (Motorola)   - Porting code to TFM Sign Framework [Bug 286387]
- */
-package org.eclipse.mtj.tfm.sign.core.extension;
-
-import org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType;
-import org.osgi.framework.Version;
-
-/**
- * 
- */
-public interface ISignExtension {
-
-    /**
-     * @return
-     */
-    String getId();
-
-    /**
-     * @param value
-     */
-    void setId(String value);
-
-    /**
-     * @return
-     */
-    String getVendor();
-
-    /**
-     * @param value
-     */
-    void setVendor(String value);
-
-    /**
-     * @return
-     */
-    Version getVersion();
-
-    /**
-     * @param value
-     */
-    void setVersion(Version value);
-
-    /**
-     * @return
-     */
-    String getDescription();
-
-    /**
-     * @param value
-     */
-    void setDescription(String value);
-
-    /**
-     * @return
-     */
-    ExtensionType getType();
-
-    /**
-     * @param value
-     */
-    void setType(ExtensionType value);
-
-    /**
-     * @return
-     */
-    boolean isActive();
-
-    /**
-     * @param value
-     */
-    void setActive(boolean value);
-
-}

Deleted: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISignExtensionManager.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISignExtensionManager.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISignExtensionManager.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -1,156 +0,0 @@
-/**
- * Copyright (c) 2005,2009 Nokia Corporation and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Nokia Corporation         - Initial Version
- *     Diego Sandin (Motorola)   - Porting code to TFM Sign Framework [Bug 286387]
- */
-package org.eclipse.mtj.tfm.sign.core.extension;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType;
-import org.eclipse.mtj.tfm.sign.core.exception.SignException;
-
-/**
- * @since 1.0
- */
-public interface ISignExtensionManager {
-
-    /**
-     * CamelCase identifiers! Capitalize an identifier - i.e. Convert something
-     * like "Device_Management" to "deviceManagement" or "DEVICE_MANAGEMENT" to
-     * "deviceManagement"
-     * 
-     * @param value The identifier to capitalize - e.g. "DEVICE_MANAGEMENT".
-     * @return The capitalized identifier - e.g. "deviceManagement".
-     */
-    public abstract String capitalizeIdentifier(String _value);
-
-    /**
-     * Method returns all existing Sign Extensions.
-     * 
-     * @return
-     */
-    public abstract ISignExtension[] getAllImplementations();
-
-    /**
-     * @param project
-     * @return
-     */
-    public abstract ISignExtension[] getAllImplementations(String project);
-
-    /**
-     * Method returns all active Mtj Extensions that are the defined extension
-     * type and is implemented by the vendor. Also vendor's specific version can
-     * be defined. Vendor and version attributes could have also null values.
-     * 
-     * @param type
-     * @param version
-     * @param vendor
-     * @return
-     */
-    public abstract List<ISignExtension> getImplementations(
-            ExtensionType extensionType, String version, String vendor);
-
-    /**
-     * @param extensionType
-     * @param version
-     * @param vendor
-     * @param onlyActive
-     * @return
-     */
-    public abstract List<ISignExtension> getImplementations(
-            ExtensionType extensionType, String version, String vendor,
-            boolean onlyActive);
-
-    /**
-     * @param extensionType
-     * @param version
-     * @param vendor
-     * @param project
-     * @return
-     */
-    public abstract List<ISignExtension> getImplementations(
-            ExtensionType extensionType, String version, String vendor,
-            String project);
-
-    /**
-     * @param extensionType
-     * @param version
-     * @param vendor
-     * @param project
-     * @param onlyActive
-     * @return
-     */
-    public abstract List<ISignExtension> getImplementations(
-            ExtensionType extensionType, String version, String vendor,
-            String project, boolean onlyActive);
-
-    /**
-     * Method is used to verify if the extension is active.
-     * 
-     * @param vendor
-     * @param version
-     * @param type
-     * @return
-     */
-    public abstract boolean isActive(String id, ExtensionType type);
-
-    /**
-     * Method is used to verify if the extension is active.
-     * 
-     * @param vendor
-     * @param version
-     * @param type
-     * @param project
-     * @return
-     */
-    public abstract boolean isActive(String id, ExtensionType type,
-            String project);
-
-    /**
-     * @param extensionName
-     * @return
-     */
-    public abstract ArrayList<ISignExtension> loadExtensions(
-            String extensionName);
-
-    /**
-     * @param plugin_id
-     * @param extensionType
-     * @return
-     */
-    public abstract ArrayList<ISignExtension> loadExtensions(String plugin_id,
-            ExtensionType extensionType);
-
-    /**
-     * Method is used to set the extension's activity.
-     * 
-     * @param vendor
-     * @param version
-     * @param type
-     * @param isActive
-     */
-    public abstract void setActive(String id, ExtensionType type,
-            boolean isActive) throws SignException;
-
-    /**
-     * Method is used to set the extension's activity.
-     * 
-     * @param vendor
-     * @param version
-     * @param type
-     * @param project
-     * @param isActive
-     */
-    public abstract void setActive(String id, ExtensionType type,
-            String project, boolean isActive) throws SignException;
-
-}
\ No newline at end of file

Deleted: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISigningProvider.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISigningProvider.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISigningProvider.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -1,134 +0,0 @@
-/**
- * Copyright (c) 2005,2009 Nokia Corporation and others.
-
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Nokia Corporation         - Initial Version
- *     Kevin Horowitz (IBM Corp) - Update javadoc
- *     Diego Sandin (Motorola)   - Porting code to TFM Sign Framework [Bug 286387]
- */
-package org.eclipse.mtj.tfm.sign.core.extension;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mtj.tfm.sign.core.exception.SignException;
-import org.eclipse.mtj.tfm.sign.core.signing.ISigningCertificate;
-
-/**
- * The Signing Provider provides the interface to sign a project's deployment
- * package. <br>
- * 
- */
-public interface ISigningProvider extends ISignExtension {
-
-    /**
-     * Returns whether the SingingProvider plug-in can provide root certificate
-     * management features.
-     * 
-     * @return true if root certificate management features are available, false
-     *         otherwise
-     * @throws SignException
-     */
-    public boolean isRootCertToolAvailable() throws SignException;
-
-    /**
-     * Attempt to import keystore element (alias) into rootcert. Uses password
-     * to access keystore
-     * 
-     * @param rootcert
-     * @param keystore
-     * @param alias
-     * @param password
-     * @throws SignException
-     */
-    public void importToRootCert(String rootcert, String keystore,
-            String alias, String password) throws SignException;
-
-    /**
-     * Returns string array populated with the contents of the rootcert.
-     * 
-     * @param rootcert
-     * @return
-     * @throws SignException
-     */
-    public String[] listrootcert(String rootcert) throws SignException;
-
-    /**
-     * Attempts to remove an entry from rootcert. References target entry by
-     * index (removeindex).
-     * 
-     * @param rootcert
-     * @param removeindex
-     * @throws SignException
-     */
-    public void removeCertFromRoot(String rootcert, int removeindex)
-            throws SignException;
-
-    /**
-     * Method signs the project with the certificates.
-     * 
-     * @param project
-     * @param targetFolder
-     * @param certificates
-     * @param monitor
-     * @return
-     * @throws SignException
-     */
-    public boolean sign(IProject project, IFolder targetFolder,
-            ISigningCertificate certificates, IProgressMonitor monitor)
-            throws SignException;
-
-    /**
-     * Method unsigns the project.
-     * 
-     * @param mtjProject
-     * @param targetFolder
-     * @param monitor
-     * @return
-     * @throws SignException
-     */
-    public boolean unsign(IProject mtjProject, IFolder targetFolder,
-            IProgressMonitor monitor) throws SignException;
-
-    /**
-     * Method determines and reports if deployment is signed.
-     * 
-     * @param mtjProject
-     * @param targetFolder
-     * @param monitor
-     * @return
-     * @throws SignException
-     */
-    public boolean isSigned(IProject mtjProject, IFolder targetFolder,
-            IProgressMonitor monitor) throws SignException;
-
-    /**
-     * Implementations that rely on an external security tool, are responsible
-     * for persistant storage of the tool location value. </br> This method
-     * should return the location of the tool. Should never return null.
-     * 
-     * @param monitor
-     * @return
-     * @throws SignException
-     */
-    public String getToolLocation(IProgressMonitor monitor)
-            throws SignException;
-
-    /**
-     * Implementations that rely on an external security tool, are responsible
-     * for persistant storage of the tool location value. This method should
-     * contain the code to store the location.
-     * 
-     * @param loc
-     * @param monitor
-     * @throws SignException
-     */
-    public void storeToolLocation(String loc, IProgressMonitor monitor)
-            throws SignException;
-
-}

Deleted: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/SignExtensionImpl.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/SignExtensionImpl.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/SignExtensionImpl.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -1,121 +0,0 @@
-/**
- * Copyright (c) 2009 Motorola.
- * 
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     Diego Sandin (Motorola) - Initial Version
- */
-package org.eclipse.mtj.tfm.sign.core.extension;
-
-import org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType;
-import org.osgi.framework.Version;
-
-/**
- * @author Diego Sandin
- * @since 1.0
- */
-public class SignExtensionImpl implements ISignExtension {
-
-    protected String id = "DefaulSignExtensionId";
-    protected String vendor = "DSDP - Eclipse.org";
-    protected Version version = Version.emptyVersion;
-    protected String description = "Defaul Sign Extension Description";
-    protected ExtensionType type = ExtensionType.SECURITY_MANAGEMENT;
-    protected boolean active = false;
-
-    /**
-     * Creates a new instance of SignExtensionImpl.
-     */
-    public SignExtensionImpl() {
-
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISignExtension#getDescription()
-     */
-    public String getDescription() {
-        return description;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISignExtension#getId()
-     */
-    public String getId() {
-        return id;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISignExtension#getType()
-     */
-    public ExtensionType getType() {
-        return type;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISignExtension#getVendor()
-     */
-    public String getVendor() {
-        return vendor;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISignExtension#getVersion()
-     */
-    public Version getVersion() {
-        return version;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISignExtension#isActive()
-     */
-    public boolean isActive() {
-        return active;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISignExtension#setActive(boolean)
-     */
-    public void setActive(boolean value) {
-        active = value;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISignExtension#setDescription(java.lang.String)
-     */
-    public void setDescription(String value) {
-        description = value;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISignExtension#setId(java.lang.String)
-     */
-    public void setId(String value) {
-        id = value;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISignExtension#setType(org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType)
-     */
-    public void setType(ExtensionType value) {
-        type = value;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISignExtension#setVendor(java.lang.String)
-     */
-    public void setVendor(String value) {
-        vendor = value;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISignExtension#setVersion(org.osgi.framework.Version)
-     */
-    public void setVersion(Version value) {
-        version = value;
-    }
-
-}

Copied: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/security/ISecurityManagement.java (from rev 1439, trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISecurityManagement.java)
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/security/ISecurityManagement.java	                        (rev 0)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/security/ISecurityManagement.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -0,0 +1,246 @@
+/**
+ * Copyright (c) 2005,2009 Nokia Corporation and others.
+
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Nokia Corporation         - Initial Version
+ *     Kevin Horowitz (IBM Corp) - Update javadoc
+ *     Diego Sandin (Motorola)   - Porting code to TFM Sign Framework [Bug 286387]
+ */
+package org.eclipse.mtj.tfm.sign.core.extension.security;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.mtj.tfm.sign.core.exception.SignException;
+import org.eclipse.mtj.tfm.sign.core.extension.IExtension;
+
+/**
+ * The Security Management Provider provides the interface to interact with Key
+ * Stores.
+ * 
+ * @since 1.0
+ */
+public interface ISecurityManagement extends IExtension {
+
+    /**
+     * Accesses an existing keystore, opens the keystore and returns a string
+     * array containing the key aliases within the keystore.
+     * 
+     * @param keyStore
+     * @param storePass
+     * @param monitor
+     * @return String[]
+     * @throws SignException
+     */
+    public String[] openKeyStore(String keyStore, String storePass,
+            IProgressMonitor monitor) throws SignException;
+
+    /**
+     * Returns the keystore type used by keystore.
+     * 
+     * @return String
+     * @throws SignException
+     */
+    public String getStoreType() throws SignException;
+
+    /**
+     * Returns the current key alias. Calling classes will set this value based
+     * on user selection from the keystore.
+     * 
+     * @return key alias that is currently being used.
+     * @throws SignException
+     */
+    public String getAliaskey() throws SignException;
+
+    /**
+     * Returns the current keystore password.
+     * 
+     * @return
+     * @throws SignException
+     */
+    public String getPassWrd() throws SignException;
+
+    /**
+     * Returns the location of the current keystore.
+     * 
+     * @return
+     * @throws SignException
+     */
+    public String getKeyStoreNameLoc() throws SignException;
+
+    /**
+     * Returns the validity of the current key pair.
+     * 
+     * @return
+     * @throws SignException
+     */
+    public String getValidity() throws SignException;
+
+    /**
+     * Sets the type of keystore to generate.
+     * 
+     * @param storeType
+     * @throws SignException
+     */
+    public void setStoreType(String storeType) throws SignException;
+
+    /**
+     * Sets the alias for the current key pair.
+     * 
+     * @param aliasKey
+     * @throws SignException
+     */
+    public void setAliaskey(String aliasKey) throws SignException;
+
+    /**
+     * Sets the password for the current keystore.
+     * 
+     * @param passWrd
+     * @throws SignException
+     */
+    public void setPassWrd(String passWrd) throws SignException;
+
+    /**
+     * Sets the Key Store name location.
+     * 
+     * @param keyStoreNameLoc
+     * @throws SignException
+     */
+    public void setKeyStoreNameLoc(String keyStoreNameLoc) throws SignException;
+
+    /**
+     * Sets the validity period for the certificate.
+     * 
+     * @param validity
+     * @throws SignException
+     */
+    public void setValidity(String validity) throws SignException;
+
+    /**
+     * Allows users of this class to set the keystore values.
+     * 
+     * @param loc
+     * @param alias
+     * @param psswd
+     * @param strtype
+     * @throws SignException
+     */
+    public void setValues(String loc, String alias, String psswd, String strtype)
+            throws SignException;
+
+    /**
+     * Resets all values including keystore, password, alias key, etc
+     * 
+     * @throws SignException
+     */
+    public void resetValues() throws SignException;
+
+    /**
+     * Return true if the keystore name and location were set during this
+     * session.
+     * 
+     * @return true if a keystore name and location were set during this
+     *         session, false otherwise.
+     */
+    public boolean isKeyStoreSelected() throws SignException;
+
+    /**
+     * Generates a new CSR.
+     * 
+     * @param certFile - location and name of file to generate
+     * @param monitor
+     * @return - True if success, otherwise false.
+     * @throws SignException
+     */
+    public boolean generateCSR(String certFile, IProgressMonitor monitor)
+            throws SignException;
+
+    /**
+     * Imports signed certificate to current keystore.
+     * 
+     * @param certFile - location of signed certificate to import
+     * @param monitor
+     * @return - True if success, otherwise false.
+     * @throws SignException
+     */
+    public boolean importSignedCert(String certFile, IProgressMonitor monitor)
+            throws SignException;
+
+    /**
+     * Deletes the current key pair, from the current keystore
+     * 
+     * @param monitor
+     * @return - True if success, otherwise false.
+     * @throws SignException
+     */
+    public boolean deleteKey(IProgressMonitor monitor) throws SignException;
+
+    /**
+     * Changes the password of the current keystore.
+     * 
+     * @param newStorePass - Changes the keystore password to newStorePass.
+     * @param storePass - Previous keystore password.
+     * @param monitor
+     * @return - True if success, otherwise false.
+     * @throws SignException
+     */
+    public boolean changeStorePassword(String newStorePass, String storePass,
+            IProgressMonitor monitor) throws SignException;
+
+    /**
+     * Creates a new key pair with the information passed in. Attaches the new
+     * key pair to the current keystore.
+     * 
+     * @param alias - New key pair alias.
+     * @param commonName - New key pair common name.
+     * @param orgUnit - New key pair organization unit name.
+     * @param orgName - New key pair organization name.
+     * @param localityName - New key pair locality name.
+     * @param stateName - New key pair state name.
+     * @param country - New key pair country name.
+     * @param monitor - Progress monitor.
+     * @return - true is success, otherwise false.
+     * @throws SignException
+     */
+    public boolean createNewKey(String alias, String commonName,
+            String orgUnit, String orgName, String localityName,
+            String stateName, String country, IProgressMonitor monitor)
+            throws SignException;
+
+    /**
+     * Get the certificates associated with the alias key/keystore.
+     * 
+     * @param monitor
+     * @return
+     * @throws SignException
+     */
+    public String getCertificateInfo(IProgressMonitor monitor)
+            throws SignException;
+
+    /**
+     * Implementations that rely on an external security tool, are responsible
+     * for persistent storage of the tool location value. This method should
+     * return the location of the tool. Should never return null.
+     * 
+     * @param monitor
+     * @return - Tool location.
+     * @throws SignException
+     */
+    public String getToolLocation(IProgressMonitor monitor)
+            throws SignException;
+
+    /**
+     * Implementations that rely on an external security tool, are responsible
+     * for persistent storage of the tool location value. This method should
+     * contain the code to store the location.
+     * 
+     * @param loc - Directory where tool resides.
+     * @param monitor
+     * @throws SignException
+     */
+    public void storeToolLocation(String loc, IProgressMonitor monitor)
+            throws SignException;
+}


Property changes on: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/security/ISecurityManagement.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/security/X500DName.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/security/X500DName.java	                        (rev 0)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/security/X500DName.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -0,0 +1,272 @@
+/**
+ * Copyright (c) 2009 Motorola.
+ * 
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Diego Sandin (Motorola) - Initial Version
+ */
+package org.eclipse.mtj.tfm.sign.core.extension.security;
+
+/**
+ * X.500 Distinguished Names are used to identify entities, such as those which
+ * are named by the subject and issuer (signer) fields of X.509 certificates.
+ * 
+ * @author Diego Sandin
+ * @since 1.0
+ */
+public class X500DName {
+
+    public static final String COMMON_NAME_PREFIX = "CN="; //$NON-NLS-1$
+    public static final String COUNTRY_PREFIX = "C="; //$NON-NLS-1$
+    public static final String LOCALITY_NAME_PREFIX = "L="; //$NON-NLS-1$
+    public static final String ORGANIZATION_NAME_PREFIX = "O="; //$NON-NLS-1$
+    public static final String ORGANIZATION_UNIT_PREFIX = "OU="; //$NON-NLS-1$
+    public static final String STATE_NAME_PREFIX = "S="; //$NON-NLS-1$
+
+    // constants
+    private static final String COMMA = ","; //$NON-NLS-1$
+    private static final String COMMA_AND_SPACE = ", "; //$NON-NLS-1$
+    private static final String ESCAPED_COMMA = "\\,"; //$NON-NLS-1$
+    private static final String QUOTE = "\""; //$NON-NLS-1$
+
+    /**
+     * Common name of a person, e.g., "Susan Jones"
+     */
+    private String commonName;
+
+    /**
+     * Two-letter country code, e.g., "CH"
+     */
+    private String country;
+
+    /**
+     * Locality (city) name, e.g., "Palo Alto"
+     */
+    private String localityName;
+
+    /**
+     * large organization name, e.g., "ABCSystems, Inc."
+     */
+    private String organizationName;
+
+    /**
+     * Small organization (e.g, department or division) name, e.g., "Purchasing"
+     */
+    private String organizationUnit;
+
+    /**
+     * State or province name, e.g., "California"
+     */
+    private String stateName;
+
+    /**
+     * Creates a new instance of X500DName.
+     * 
+     * @param commonName common name of a person, e.g., "Susan Jones"
+     * @param organizationUnit small organization (e.g, department or division)
+     *            name, e.g., "Purchasing"
+     * @param organizationName large organization name, e.g., "ABCSystems, Inc."
+     * @param localityName locality (city) name, e.g., "Palo Alto"
+     * @param stateName state or province name, e.g., "California"
+     * @param country Two-letter country code, e.g., "CH"
+     */
+    public X500DName(String commonName, String organizationUnit,
+            String organizationName, String localityName, String stateName,
+            String country) {
+        this.commonName = commonName;
+        this.organizationUnit = organizationUnit;
+        this.organizationName = organizationName;
+        this.localityName = localityName;
+        this.stateName = stateName;
+        this.country = country;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (!(obj instanceof X500DName))
+            return false;
+        X500DName other = (X500DName) obj;
+        if (commonName == null) {
+            if (other.commonName != null)
+                return false;
+        } else if (!commonName.equals(other.commonName))
+            return false;
+        if (country == null) {
+            if (other.country != null)
+                return false;
+        } else if (!country.equals(other.country))
+            return false;
+        if (localityName == null) {
+            if (other.localityName != null)
+                return false;
+        } else if (!localityName.equals(other.localityName))
+            return false;
+        if (organizationName == null) {
+            if (other.organizationName != null)
+                return false;
+        } else if (!organizationName.equals(other.organizationName))
+            return false;
+        if (organizationUnit == null) {
+            if (other.organizationUnit != null)
+                return false;
+        } else if (!organizationUnit.equals(other.organizationUnit))
+            return false;
+        if (stateName == null) {
+            if (other.stateName != null)
+                return false;
+        } else if (!stateName.equals(other.stateName))
+            return false;
+        return true;
+    }
+
+    /**
+     * @return the commonName
+     */
+    public synchronized String getCommonName() {
+        return commonName;
+    }
+
+    /**
+     * @return the country
+     */
+    public synchronized String getCountry() {
+        return country;
+    }
+
+    /**
+     * @return the localityName
+     */
+    public synchronized String getLocalityName() {
+        return localityName;
+    }
+
+    /**
+     * @return the organizationName
+     */
+    public synchronized String getOrganizationName() {
+        return organizationName;
+    }
+
+    /**
+     * @return the organizationUnit
+     */
+    public synchronized String getOrganizationUnit() {
+        return organizationUnit;
+    }
+
+    /**
+     * @return the stateName
+     */
+    public synchronized String getStateName() {
+        return stateName;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result
+                + ((commonName == null) ? 0 : commonName.hashCode());
+        result = prime * result + ((country == null) ? 0 : country.hashCode());
+        result = prime * result
+                + ((localityName == null) ? 0 : localityName.hashCode());
+        result = prime
+                * result
+                + ((organizationName == null) ? 0 : organizationName.hashCode());
+        result = prime
+                * result
+                + ((organizationUnit == null) ? 0 : organizationUnit.hashCode());
+        result = prime * result
+                + ((stateName == null) ? 0 : stateName.hashCode());
+        return result;
+    }
+
+    /**
+     * @param commonName the commonName to set
+     */
+    public synchronized void setCommonName(String commonName) {
+        this.commonName = commonName;
+    }
+
+    /**
+     * @param country the country to set
+     */
+    public synchronized void setCountry(String country) {
+        this.country = country;
+    }
+
+    /**
+     * @param localityName the localityName to set
+     */
+    public synchronized void setLocalityName(String localityName) {
+        this.localityName = localityName;
+    }
+
+    /**
+     * @param organizationName the organizationName to set
+     */
+    public synchronized void setOrganizationName(String organizationName) {
+        this.organizationName = organizationName;
+    }
+
+    /**
+     * @param organizationUnit the organizationUnit to set
+     */
+    public synchronized void setOrganizationUnit(String organizationUnit) {
+        this.organizationUnit = organizationUnit;
+    }
+
+    /**
+     * @param stateName the stateName to set
+     */
+    public synchronized void setStateName(String stateName) {
+        this.stateName = stateName;
+    }
+
+    /**
+     * Returns a string representation of the <b>X.500 Distinguished Name</b>.<br>
+     * <b>Note:</b> If a distinguished name string value contains a comma, the
+     * comma will be escaped by a "\" character.
+     * 
+     * @return the generated string in the following format:
+     * 
+     * <pre>
+     * "CN=<b><i>commonName</i></b>, OU=<b><i>organizationUnit</i></b>, O=<b><i>organizationName</i></b>, L=<b><i>localityName</i></b>, S=<b><i>stateName</i></b>, C=<b><i>country</i></b>" 
+     * </pre>
+     */
+    @Override
+    public String toString() {
+        String tempCommonName = commonName.replace(COMMA, ESCAPED_COMMA);
+        String tempOrganizationUnit = organizationUnit.replace(COMMA, ESCAPED_COMMA);
+        String tempOrganizationName = organizationName.replace(COMMA, ESCAPED_COMMA);
+        String tempLocalityName = localityName.replace(COMMA, ESCAPED_COMMA);
+        String tempStateName = stateName.replace(COMMA, ESCAPED_COMMA);
+        String tempCountry = country.replace(COMMA, ESCAPED_COMMA);
+
+        StringBuilder dname = new StringBuilder();
+        dname.append(QUOTE).append(COMMON_NAME_PREFIX).append(tempCommonName)
+                .append(COMMA_AND_SPACE).append(ORGANIZATION_UNIT_PREFIX)
+                .append(tempOrganizationUnit).append(COMMA_AND_SPACE).append(
+                        ORGANIZATION_NAME_PREFIX).append(tempOrganizationName)
+                .append(COMMA_AND_SPACE).append(LOCALITY_NAME_PREFIX).append(
+                        tempLocalityName).append(COMMA_AND_SPACE).append(
+                        STATE_NAME_PREFIX).append(tempStateName).append(
+                        COMMA_AND_SPACE).append(COUNTRY_PREFIX).append(
+                        tempCountry).append(QUOTE);
+        return dname.toString();
+    }
+}


Property changes on: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/security/X500DName.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/sign/ISigningProvider.java (from rev 1439, trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/ISigningProvider.java)
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/sign/ISigningProvider.java	                        (rev 0)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/sign/ISigningProvider.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -0,0 +1,135 @@
+/**
+ * Copyright (c) 2005,2009 Nokia Corporation and others.
+
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Nokia Corporation         - Initial Version
+ *     Kevin Horowitz (IBM Corp) - Update javadoc
+ *     Diego Sandin (Motorola)   - Porting code to TFM Sign Framework [Bug 286387]
+ */
+package org.eclipse.mtj.tfm.sign.core.extension.sign;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.mtj.tfm.sign.core.exception.SignException;
+import org.eclipse.mtj.tfm.sign.core.extension.IExtension;
+import org.eclipse.mtj.tfm.sign.core.signing.ISigningCertificate;
+
+/**
+ * The Signing Provider provides the interface to sign a project's deployment
+ * package. <br>
+ * 
+ */
+public interface ISigningProvider extends IExtension {
+
+    /**
+     * Returns whether the SingingProvider plug-in can provide root certificate
+     * management features.
+     * 
+     * @return true if root certificate management features are available, false
+     *         otherwise
+     * @throws SignException
+     */
+    public boolean isRootCertToolAvailable() throws SignException;
+
+    /**
+     * Attempt to import keystore element (alias) into rootcert. Uses password
+     * to access keystore
+     * 
+     * @param rootcert
+     * @param keystore
+     * @param alias
+     * @param password
+     * @throws SignException
+     */
+    public void importToRootCert(String rootcert, String keystore,
+            String alias, String password) throws SignException;
+
+    /**
+     * Returns string array populated with the contents of the rootcert.
+     * 
+     * @param rootcert
+     * @return
+     * @throws SignException
+     */
+    public String[] listrootcert(String rootcert) throws SignException;
+
+    /**
+     * Attempts to remove an entry from rootcert. References target entry by
+     * index (removeindex).
+     * 
+     * @param rootcert
+     * @param removeindex
+     * @throws SignException
+     */
+    public void removeCertFromRoot(String rootcert, int removeindex)
+            throws SignException;
+
+    /**
+     * Method signs the project with the certificates.
+     * 
+     * @param project
+     * @param targetFolder
+     * @param certificates
+     * @param monitor
+     * @return
+     * @throws SignException
+     */
+    public boolean sign(IProject project, IFolder targetFolder,
+            ISigningCertificate certificates, IProgressMonitor monitor)
+            throws SignException;
+
+    /**
+     * Method unsigns the project.
+     * 
+     * @param mtjProject
+     * @param targetFolder
+     * @param monitor
+     * @return
+     * @throws SignException
+     */
+    public boolean unsign(IProject mtjProject, IFolder targetFolder,
+            IProgressMonitor monitor) throws SignException;
+
+    /**
+     * Method determines and reports if deployment is signed.
+     * 
+     * @param mtjProject
+     * @param targetFolder
+     * @param monitor
+     * @return
+     * @throws SignException
+     */
+    public boolean isSigned(IProject mtjProject, IFolder targetFolder,
+            IProgressMonitor monitor) throws SignException;
+
+    /**
+     * Implementations that rely on an external security tool, are responsible
+     * for persistant storage of the tool location value. </br> This method
+     * should return the location of the tool. Should never return null.
+     * 
+     * @param monitor
+     * @return
+     * @throws SignException
+     */
+    public String getToolLocation(IProgressMonitor monitor)
+            throws SignException;
+
+    /**
+     * Implementations that rely on an external security tool, are responsible
+     * for persistant storage of the tool location value. This method should
+     * contain the code to store the location.
+     * 
+     * @param loc
+     * @param monitor
+     * @throws SignException
+     */
+    public void storeToolLocation(String loc, IProgressMonitor monitor)
+            throws SignException;
+
+}


Property changes on: trunk/plugins/org.eclipse.mtj.tfm.sign.core/src/org/eclipse/mtj/tfm/sign/core/extension/sign/ISigningProvider.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/IBMSmgmtConstants.java (from rev 1439, trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/SecurityManagementImplConstants.java)
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/IBMSmgmtConstants.java	                        (rev 0)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/IBMSmgmtConstants.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) 2006,2009 IBM Corporation and others.
+ * 
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation         - initial API and implementation
+ *     Diego Sandin (Motorola) - Porting code to TFM Sign Framework [Bug 286387]
+ */
+package org.eclipse.mtj.tfm.internal.sign.smgmt.ibm;
+
+public interface IBMSmgmtConstants {
+
+	public static String SECURITY_TOOL_LOCATION = "SecurityToolLocationPreference"; //$NON-NLS-1$
+
+	// keytool primary command options
+	public static final String GENERATE_KEY        = "-genkey"; //$NON-NLS-1$
+	public static final String DELETE_KEY          = "-delete"; //$NON-NLS-1$
+	public static final String IMPORT_CERT         = "-import"; //$NON-NLS-1$
+	public static final String GENERATE_CSR        = "-export"; //$NON-NLS-1$
+	public static final String LIST                = "-list"; //$NON-NLS-1$
+	public static final String CHANGE_STORE_PASSWD = "-storepasswd"; //$NON-NLS-1$
+	
+	// keytool secondary command options
+	public static final String ALIAS           = "-alias"; //$NON-NLS-1$
+	public static final String DNAME           = "-dname"; //$NON-NLS-1$
+	public static final String KEYPASS         = "-keypass"; //$NON-NLS-1$
+	public static final String VALIDITY        = "-validity"; //$NON-NLS-1$
+	public static final String STORETYPE       = "-storetype"; //$NON-NLS-1$
+	public static final String KEYSTORE        = "-keystore"; //$NON-NLS-1$
+	public static final String STOREPASS       = "-storepass"; //$NON-NLS-1$
+	public static final String PROVIDER        = "-provider"; //$NON-NLS-1$
+	public static final String FILE            = "-file"; //$NON-NLS-1$
+	public static final String NEWSTOREPASS    = "-new"; //$NON-NLS-1$
+	public static final String KEYALG          = "-keyalg"; //$NON-NLS-1$
+	public static final String SIGALG          = "-sigalg"; //$NON-NLS-1$
+	public static final String KEYSIZE         = "-keysize"; //$NON-NLS-1$
+	public static final String NOPROMPT        = "-noprompt"; //$NON-NLS-1$
+
+}


Property changes on: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/IBMSmgmtConstants.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/PreferenceInitializer.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/PreferenceInitializer.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/PreferenceInitializer.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -27,7 +27,7 @@
     public void initializeDefaultPreferences() {
         IPreferenceStore store = IBMSmgmtCore.getDefault().getPreferenceStore();
         store.setDefault(
-                SecurityManagementImplConstants.SECURITY_TOOL_LOCATION,
+                IBMSmgmtConstants.SECURITY_TOOL_LOCATION,
                 Messages.PreferenceInitializer_0);
     }
 

Deleted: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/SecurityManagementImplConstants.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/SecurityManagementImplConstants.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/internal/sign/smgmt/ibm/SecurityManagementImplConstants.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2006,2009 IBM Corporation and others.
- * 
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation         - initial API and implementation
- *     Diego Sandin (Motorola) - Porting code to TFM Sign Framework [Bug 286387]
- */
-package org.eclipse.mtj.tfm.internal.sign.smgmt.ibm;
-
-public interface SecurityManagementImplConstants {
-
-	public static String SECURITY_TOOL_LOCATION = "SecurityToolLocationPreference"; //$NON-NLS-1$
-//	 constants
-	public static final String COMMA_AND_SPACE = ", "; //$NON-NLS-1$
-	public static final String QUOTE = "\""; //$NON-NLS-1$
-
-	// keytool primary command options
-	public static final String GENERATE_KEY = "-genkey"; //$NON-NLS-1$
-	public static final String DELETE_KEY = "-delete"; //$NON-NLS-1$
-	public static final String IMPORT_CERT = "-import"; //$NON-NLS-1$
-	public static final String GENERATE_CSR = "-export"; //$NON-NLS-1$
-	public static final String LIST = "-list"; //$NON-NLS-1$
-	public static final String CHANGE_STORE_PASSWD = "-storepasswd"; //$NON-NLS-1$
-//	public static final String CHANGE_KEY_PASSWD = "-keypasswd"; //$NON-NLS-1$
-	
-	// keytool secondary command options
-	public static final String ALIAS = "-alias"; //$NON-NLS-1$
-	public static final String DNAME = "-dname"; //$NON-NLS-1$
-	public static final String KEYPASS = "-keypass"; //$NON-NLS-1$
-	public static final String VALIDITY = "-validity"; //$NON-NLS-1$
-	public static final String STORETYPE = "-storetype"; //$NON-NLS-1$
-	public static final String KEYSTORE = "-keystore"; //$NON-NLS-1$
-	public static final String STOREPASS = "-storepass"; //$NON-NLS-1$
-	public static final String PROVIDER = "-provider"; //$NON-NLS-1$
-	public static final String FILE = "-file"; //$NON-NLS-1$
-	public static final String NEWSTOREPASS = "-new"; //$NON-NLS-1$
-	public static final String KEYALG = "-keyalg"; //$NON-NLS-1$
-	public static final String SIGALG = "-sigalg"; //$NON-NLS-1$
-	public static final String KEYSIZE = "-keysize"; //$NON-NLS-1$
-	public static final String NOPROMPT = "-noprompt"; //$NON-NLS-1$
-
-//	 Dname prefix options
-	public static final String COMMON_NAME_PREFIX = "CN="; //$NON-NLS-1$
-	public static final String ORGANIZATION_UNIT_PREFIX = "OU="; //$NON-NLS-1$
-	public static final String ORGANIZATION_NAME_PREFIX = "O="; //$NON-NLS-1$
-	public static final String LOCALITY_NAME_PREFIX = "L="; //$NON-NLS-1$
-	public static final String STATE_NAME_PREFIX = "S="; //$NON-NLS-1$
-	public static final String COUNTRY_PREFIX = "C="; //$NON-NLS-1$
-}

Modified: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/sign/smgmt/ibm/IBMSecurityManagement.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/sign/smgmt/ibm/IBMSecurityManagement.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.ibm/src/org/eclipse/mtj/tfm/sign/smgmt/ibm/IBMSecurityManagement.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -24,35 +24,60 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.mtj.tfm.internal.sign.smgmt.ibm.Messages;
-import org.eclipse.mtj.tfm.internal.sign.smgmt.ibm.SecurityManagementImplConstants;
+import org.eclipse.mtj.tfm.internal.sign.smgmt.ibm.IBMSmgmtConstants;
 import org.eclipse.mtj.tfm.sign.core.SignErrors;
 import org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType;
 import org.eclipse.mtj.tfm.sign.core.exception.SignException;
-import org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement;
-import org.eclipse.mtj.tfm.sign.core.extension.SignExtensionImpl;
+import org.eclipse.mtj.tfm.sign.core.extension.ExtensionImpl;
+import org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement;
+import org.eclipse.mtj.tfm.sign.core.extension.security.X500DName;
 import org.osgi.framework.Version;
 
-public class IBMSecurityManagement extends SignExtensionImpl implements
+/**
+ * @since 1.0
+ */
+public class IBMSecurityManagement extends ExtensionImpl implements
         ISecurityManagement {
 
     /**
-     * @return
+     * Return the line to be used to configure Console Encoding.
+     * 
+     * @return The character encoding for the console.
      */
     private static String getConsoleEncoding() {
         return "-J-Dconsole.encoding=" + System.getProperty("file.encoding"); //$NON-NLS-1$ //$NON-NLS-2$
     }
 
     private String aliaskey = null;
-    private String keyStoreNameLoc = ""; //$NON-NLS-1$
-    private String passwrd = null;
+    
+    /** The certificate will be valid for 365 days. */
+    private String ksCertfValidity = "365"; //$NON-NLS-1$
+    
+    /** The keystore location in the file system. */
+    private String ksLocation = ""; //$NON-NLS-1$
+    
+    /** Keystore Password */
+    private String ksPasswrd = null;
+
+    /** Java KeyStore (JKS) */
+    private String ksType = "JKS"; //$NON-NLS-1$
+    
+    /**
+     * Preference store for this SecurityManagement plug-in. This preference
+     * store is used to hold persistent settings for this plug-in in the context
+     * of a workbench.
+     */
     private IPreferenceStore securityProviderPrefStore;
 
-    // private variables
-    private String storeType = "JKS"; //$NON-NLS-1$
-    private String validity = "365"; //$NON-NLS-1$
-
     /**
-     * Creates a new instance of IBMSecurityManagement.
+     * Creates a new instance of IBMSecurityManagement.<br>
+     * <br>
+     * <b>ID</b>: <i>org.eclipse.mtj.tfm.sign.smgmt.ibm</i><br>
+     * <b>Vendor</b>: <i>Eclipse.org - DSDP</i><br>
+     * <b>Version</b>: <i>1.0.0</i><br>
+     * <b>Description</b>: <i>Security Manager for IBM's JRE (v.5.0.0) Keytool.</i><br>
+     * <b>Type</b>: <i>{@link ExtensionType#SECURITY_MANAGEMENT
+     * SECURITY_MANAGEMENT}</i><br>
      */
     public IBMSecurityManagement() {
         super();
@@ -66,7 +91,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#changeStorePassword(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#changeStorePassword(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
      */
     public boolean changeStorePassword(String newStorePass, String storePass,
             IProgressMonitor monitor) throws SignException {
@@ -98,9 +123,6 @@
         return cmdSuccessful;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#createNewKey(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
-     */
     public boolean createNewKey(String alias, String commonName,
             String orgUnit, String orgName, String localityName,
             String stateName, String country, IProgressMonitor monitor)
@@ -109,8 +131,8 @@
                 100);
 
         boolean cmdSuccessful = true;
-        String Dname = generateDname(commonName, orgUnit, orgName,
-                localityName, stateName, country);
+        String Dname = new X500DName(commonName, orgUnit, orgName,
+                localityName, stateName, country).toString();
         String[] cmdArgs = generateNewKeyCmd(alias, Dname, "RSA", "SHA1withRSA"); //$NON-NLS-1$ //$NON-NLS-2$
         Process p = runSecurityCmd(cmdArgs);
         monitor.worked(30);
@@ -151,7 +173,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#deleteKey(org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#deleteKey(org.eclipse.core.runtime.IProgressMonitor)
      */
     public boolean deleteKey(IProgressMonitor monitor) throws SignException {
 
@@ -184,7 +206,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#generateCSR(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#generateCSR(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
      */
     public boolean generateCSR(String certFile, IProgressMonitor monitor)
             throws SignException {
@@ -216,47 +238,15 @@
 
     }
 
-    /**
-     * Generating the Distinguished Name (dname) string using the given user
-     * input.
-     * 
-     * @param commonName
-     * @param orgUnit
-     * @param orgName
-     * @param localityName
-     * @param stateName
-     * @param country
-     * @return
-     */
-    public String generateDname(String commonName, String orgUnit,
-            String orgName, String localityName, String stateName,
-            String country) {
-        String Dname = SecurityManagementImplConstants.QUOTE
-                + SecurityManagementImplConstants.COMMON_NAME_PREFIX
-                + commonName + SecurityManagementImplConstants.COMMA_AND_SPACE
-                + SecurityManagementImplConstants.ORGANIZATION_UNIT_PREFIX
-                + orgUnit + SecurityManagementImplConstants.COMMA_AND_SPACE
-                + SecurityManagementImplConstants.ORGANIZATION_NAME_PREFIX
-                + orgName + SecurityManagementImplConstants.COMMA_AND_SPACE
-                + SecurityManagementImplConstants.LOCALITY_NAME_PREFIX
-                + localityName
-                + SecurityManagementImplConstants.COMMA_AND_SPACE
-                + SecurityManagementImplConstants.STATE_NAME_PREFIX + stateName
-                + SecurityManagementImplConstants.COMMA_AND_SPACE
-                + SecurityManagementImplConstants.COUNTRY_PREFIX + country
-                + SecurityManagementImplConstants.QUOTE;
-        return Dname;
-    }
-
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getAliaskey()
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getAliaskey()
      */
     public String getAliaskey() throws SignException {
         return aliaskey;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getCertificateInfo(org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getCertificateInfo(org.eclipse.core.runtime.IProgressMonitor)
      */
     public String getCertificateInfo(IProgressMonitor monitor)
             throws SignException {
@@ -303,44 +293,44 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getKeyStoreNameLoc()
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getKeyStoreNameLoc()
      */
     public String getKeyStoreNameLoc() throws SignException {
-        return keyStoreNameLoc;
+        return ksLocation;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getPassWrd()
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getPassWrd()
      */
     public String getPassWrd() throws SignException {
-        return passwrd;
+        return ksPasswrd;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getStoreType()
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getStoreType()
      */
     public String getStoreType() throws SignException {
-        return storeType;
+        return ksType;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getToolLocation(org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getToolLocation(org.eclipse.core.runtime.IProgressMonitor)
      */
     public String getToolLocation(IProgressMonitor monitor)
             throws SignException {
         return securityProviderPrefStore
-                .getString(SecurityManagementImplConstants.SECURITY_TOOL_LOCATION);
+                .getString(IBMSmgmtConstants.SECURITY_TOOL_LOCATION);
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getValidity()
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getValidity()
      */
     public String getValidity() throws SignException {
-        return validity;
+        return ksCertfValidity;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#importSignedCert(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#importSignedCert(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
      */
     public boolean importSignedCert(String certFile, IProgressMonitor monitor)
             throws SignException {
@@ -379,7 +369,7 @@
      */
     public boolean isKeyStoreSelected() throws SignException {
 
-        if ((keyStoreNameLoc == null) || (keyStoreNameLoc.length() <= 0)) {
+        if ((ksLocation == null) || (ksLocation.length() <= 0)) {
             return false;
         }
 
@@ -387,7 +377,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#openKeyStore(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#openKeyStore(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
      */
     public String[] openKeyStore(String keyStore, String storePass,
             IProgressMonitor monitor) throws SignException {
@@ -458,67 +448,67 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#resetValues()
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#resetValues()
      */
     public void resetValues() {
 
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#setAliaskey(java.lang.String)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setAliaskey(java.lang.String)
      */
     public void setAliaskey(String aliasKey) throws SignException {
         aliaskey = aliasKey;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#setKeyStoreNameLoc(java.lang.String)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setKeyStoreNameLoc(java.lang.String)
      */
     public void setKeyStoreNameLoc(String keyStoreNameLoc) throws SignException {
-        this.keyStoreNameLoc = keyStoreNameLoc;
+        this.ksLocation = keyStoreNameLoc;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#setPassWrd(java.lang.String)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setPassWrd(java.lang.String)
      */
     public void setPassWrd(String passWrd) throws SignException {
-        passwrd = passWrd;
+        ksPasswrd = passWrd;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#setStoreType(java.lang.String)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setStoreType(java.lang.String)
      */
     public void setStoreType(String storeType) throws SignException {
-        this.storeType = storeType;
+        this.ksType = storeType;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#setValidity(java.lang.String)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setValidity(java.lang.String)
      */
     public void setValidity(String validity) throws SignException {
-        this.validity = validity;
+        this.ksCertfValidity = validity;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#setValues(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setValues(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
      */
     public void setValues(String loc, String alias, String psswd, String strtype)
             throws SignException {
 
-        storeType = strtype;
+        ksType = strtype;
         aliaskey = alias;
-        passwrd = psswd;
-        keyStoreNameLoc = loc;
+        ksPasswrd = psswd;
+        ksLocation = loc;
 
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#storeToolLocation(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#storeToolLocation(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
      */
     public void storeToolLocation(String loc, IProgressMonitor monitor)
             throws SignException {
         securityProviderPrefStore.setValue(
-                SecurityManagementImplConstants.SECURITY_TOOL_LOCATION, loc);
+                IBMSmgmtConstants.SECURITY_TOOL_LOCATION, loc);
 
     }
 
@@ -534,12 +524,11 @@
             String storePasswd) throws SignException {
 
         String[] changeStorePasswordCmdArgs = { getSecurityManagementTool(),
-                getConsoleEncoding(),
-                SecurityManagementImplConstants.CHANGE_STORE_PASSWD,
-                SecurityManagementImplConstants.NEWSTOREPASS, newStorePass,
-                SecurityManagementImplConstants.STORETYPE, storeType,
-                SecurityManagementImplConstants.KEYSTORE, keyStoreNameLoc,
-                SecurityManagementImplConstants.STOREPASS, storePasswd };
+                getConsoleEncoding(), IBMSmgmtConstants.CHANGE_STORE_PASSWD,
+                IBMSmgmtConstants.NEWSTOREPASS, newStorePass,
+                IBMSmgmtConstants.STORETYPE, ksType,
+                IBMSmgmtConstants.KEYSTORE, ksLocation,
+                IBMSmgmtConstants.STOREPASS, storePasswd };
 
         return changeStorePasswordCmdArgs;
     }
@@ -551,12 +540,10 @@
     private String[] generateDeleteKeyCmd() throws SignException {
 
         String[] deleteKeyCmdArgs = { getSecurityManagementTool(),
-                getConsoleEncoding(),
-                SecurityManagementImplConstants.DELETE_KEY,
-                SecurityManagementImplConstants.ALIAS, aliaskey,
-                SecurityManagementImplConstants.STORETYPE, storeType,
-                SecurityManagementImplConstants.KEYSTORE, keyStoreNameLoc,
-                SecurityManagementImplConstants.STOREPASS, passwrd };
+                getConsoleEncoding(), IBMSmgmtConstants.DELETE_KEY,
+                IBMSmgmtConstants.ALIAS, aliaskey, IBMSmgmtConstants.STORETYPE,
+                ksType, IBMSmgmtConstants.KEYSTORE, ksLocation,
+                IBMSmgmtConstants.STOREPASS, ksPasswrd };
 
         return deleteKeyCmdArgs;
     }
@@ -574,11 +561,10 @@
     private String[] generateDisplayCertifcates() throws SignException {
 
         String[] listCertificateCmdArgs = { getSecurityManagementTool(),
-                getConsoleEncoding(), SecurityManagementImplConstants.LIST,
-                SecurityManagementImplConstants.ALIAS, aliaskey,
-                SecurityManagementImplConstants.STORETYPE, storeType,
-                SecurityManagementImplConstants.KEYSTORE, keyStoreNameLoc,
-                SecurityManagementImplConstants.STOREPASS, passwrd };
+                getConsoleEncoding(), IBMSmgmtConstants.LIST,
+                IBMSmgmtConstants.ALIAS, aliaskey, IBMSmgmtConstants.STORETYPE,
+                ksType, IBMSmgmtConstants.KEYSTORE, ksLocation,
+                IBMSmgmtConstants.STOREPASS, ksPasswrd };
 
         return listCertificateCmdArgs;
     }
@@ -592,13 +578,11 @@
             throws SignException {
 
         String[] generateCSRCmdArgs = { getSecurityManagementTool(),
-                getConsoleEncoding(),
-                SecurityManagementImplConstants.GENERATE_CSR,
-                SecurityManagementImplConstants.ALIAS, aliaskey,
-                SecurityManagementImplConstants.FILE, certFile,
-                SecurityManagementImplConstants.STORETYPE, storeType,
-                SecurityManagementImplConstants.KEYSTORE, keyStoreNameLoc,
-                SecurityManagementImplConstants.STOREPASS, passwrd };
+                getConsoleEncoding(), IBMSmgmtConstants.GENERATE_CSR,
+                IBMSmgmtConstants.ALIAS, aliaskey, IBMSmgmtConstants.FILE,
+                certFile, IBMSmgmtConstants.STORETYPE, ksType,
+                IBMSmgmtConstants.KEYSTORE, ksLocation,
+                IBMSmgmtConstants.STOREPASS, ksPasswrd };
 
         return generateCSRCmdArgs;
     }
@@ -612,15 +596,12 @@
             throws SignException {
 
         String[] importSignedCertCmdArgs = { getSecurityManagementTool(),
-                getConsoleEncoding(),
-                SecurityManagementImplConstants.IMPORT_CERT,
-                SecurityManagementImplConstants.NOPROMPT,
-                SecurityManagementImplConstants.ALIAS, aliaskey,
-                SecurityManagementImplConstants.KEYPASS, passwrd,
-                SecurityManagementImplConstants.FILE, certFile,
-                SecurityManagementImplConstants.STORETYPE, storeType,
-                SecurityManagementImplConstants.KEYSTORE, keyStoreNameLoc,
-                SecurityManagementImplConstants.STOREPASS, passwrd };
+                getConsoleEncoding(), IBMSmgmtConstants.IMPORT_CERT,
+                IBMSmgmtConstants.NOPROMPT, IBMSmgmtConstants.ALIAS, aliaskey,
+                IBMSmgmtConstants.KEYPASS, ksPasswrd, IBMSmgmtConstants.FILE,
+                certFile, IBMSmgmtConstants.STORETYPE, ksType,
+                IBMSmgmtConstants.KEYSTORE, ksLocation,
+                IBMSmgmtConstants.STOREPASS, ksPasswrd };
 
         return importSignedCertCmdArgs;
     }
@@ -637,17 +618,14 @@
             String keyAlg, String sigAlg) throws SignException {
 
         String[] newKeyCmdArgs = { getSecurityManagementTool(),
-                getConsoleEncoding(),
-                SecurityManagementImplConstants.GENERATE_KEY,
-                SecurityManagementImplConstants.ALIAS, alias,
-                SecurityManagementImplConstants.DNAME, dname,
-                SecurityManagementImplConstants.KEYPASS, passwrd,
-                SecurityManagementImplConstants.STORETYPE, storeType,
-                SecurityManagementImplConstants.KEYALG, keyAlg,
-                SecurityManagementImplConstants.SIGALG, sigAlg,
-                SecurityManagementImplConstants.KEYSTORE, keyStoreNameLoc,
-                SecurityManagementImplConstants.STOREPASS, passwrd,
-                SecurityManagementImplConstants.VALIDITY, validity };
+                getConsoleEncoding(), IBMSmgmtConstants.GENERATE_KEY,
+                IBMSmgmtConstants.ALIAS, alias, IBMSmgmtConstants.DNAME, dname,
+                IBMSmgmtConstants.KEYPASS, ksPasswrd,
+                IBMSmgmtConstants.STORETYPE, ksType,
+                IBMSmgmtConstants.KEYALG, keyAlg, IBMSmgmtConstants.SIGALG,
+                sigAlg, IBMSmgmtConstants.KEYSTORE, ksLocation,
+                IBMSmgmtConstants.STOREPASS, ksPasswrd,
+                IBMSmgmtConstants.VALIDITY, ksCertfValidity };
 
         return newKeyCmdArgs;
     }
@@ -664,10 +642,10 @@
             throws SignException {
 
         String[] openKeyStoreCmdArgs = { getSecurityManagementTool(),
-                getConsoleEncoding(), SecurityManagementImplConstants.LIST,
-                SecurityManagementImplConstants.STORETYPE, storeType,
-                SecurityManagementImplConstants.KEYSTORE, keyStore,
-                SecurityManagementImplConstants.STOREPASS, storePasswd };
+                getConsoleEncoding(), IBMSmgmtConstants.LIST,
+                IBMSmgmtConstants.STORETYPE, ksType,
+                IBMSmgmtConstants.KEYSTORE, keyStore,
+                IBMSmgmtConstants.STOREPASS, storePasswd };
         return openKeyStoreCmdArgs;
     }
 

Modified: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/plugin.xml
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/plugin.xml	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/plugin.xml	2009-08-26 01:36:23 UTC (rev 1449)
@@ -4,13 +4,13 @@
    <extension
          point="org.eclipse.mtj.tfm.sign.core.securityManagement">
       <security_Management
-            class="org.eclipse.mtj.tfm.sign.smgmt.j9.J9SecurityManager"
+            class="org.eclipse.mtj.tfm.sign.smgmt.j9.J9SecurityManagement"
             id="org.eclipse.mtj.tfm.sign.smgmt.j9.impl.J9SecurityManager"
             name="org.eclipse.mtj.tfm.sign.smgmt.j9.impl.J9SecurityManager"/>
    </extension>
       <extension
          point="org.eclipse.core.runtime.preferences">
-      <initializer class="org.eclipse.mtj.tfm.internal.sign.smgmt.j9.J9SecurityManagerPrefInitilizer"/>
+      <initializer class="org.eclipse.mtj.tfm.internal.sign.smgmt.j9.PreferenceInitializer"/>
    </extension>
 
 </plugin>

Deleted: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SecurityManagerConstants.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SecurityManagerConstants.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SecurityManagerConstants.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2006,2009 IBM Corporation and others.
- * 
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation         - initial API and implementation
- *     Rodrigo Pastrana        - Replace State name with ST to match spec. 
- *     Diego Sandin (Motorola) - Porting code to TFM Sign Framework [Bug 286387]
- */
-package org.eclipse.mtj.tfm.internal.sign.smgmt.j9;
-
-public abstract class J9SecurityManagerConstants {
-
-	public static String SECURITY_TOOL_LOCATION = "J9SecurityToolLocationPreference"; //$NON-NLS-1$
-//	 constants
-	public static final String COMMA_AND_SPACE = ", "; //$NON-NLS-1$
-	public static final String QUOTE = "\""; //$NON-NLS-1$
-
-	// keytool primary command options
-	public static final String GENERATE_KEY = "-genkey"; //$NON-NLS-1$
-	public static final String DELETE_KEY = "-delete"; //$NON-NLS-1$
-	public static final String IMPORT_CERT = "-import"; //$NON-NLS-1$
-	public static final String GENERATE_CSR = "-export"; //$NON-NLS-1$
-	public static final String LIST = "-list"; //$NON-NLS-1$
-	public static final String CHANGE_STORE_PASSWD = "-storepasswd"; //$NON-NLS-1$
-//	public static final String CHANGE_KEY_PASSWD = "-keypasswd"; //$NON-NLS-1$
-	
-	// keytool secondary command options
-	public static final String ALIAS = "-alias"; //$NON-NLS-1$
-	public static final String DNAME = "-dname"; //$NON-NLS-1$
-	public static final String KEYPASS = "-keypass"; //$NON-NLS-1$
-	public static final String VALIDITY = "-validity"; //$NON-NLS-1$
-	public static final String STORETYPE = "-storetype"; //$NON-NLS-1$
-	public static final String KEYSTORE = "-keystore"; //$NON-NLS-1$
-	public static final String STOREPASS = "-storepass"; //$NON-NLS-1$
-	public static final String PROVIDER = "-provider"; //$NON-NLS-1$
-	public static final String FILE = "-file"; //$NON-NLS-1$
-	public static final String NEWSTOREPASS = "-new"; //$NON-NLS-1$
-	public static final String KEYALG = "-keyalg"; //$NON-NLS-1$
-	public static final String SIGALG = "-sigalg"; //$NON-NLS-1$
-	public static final String KEYSIZE = "-keysize"; //$NON-NLS-1$
-	public static final String NOPROMPT = "-noprompt"; //$NON-NLS-1$
-
-//	 Dname prefix options
-	public static final String COMMON_NAME_PREFIX = "CN="; //$NON-NLS-1$
-	public static final String ORGANIZATION_UNIT_PREFIX = "OU="; //$NON-NLS-1$
-	public static final String ORGANIZATION_NAME_PREFIX = "O="; //$NON-NLS-1$
-	public static final String LOCALITY_NAME_PREFIX = "L="; //$NON-NLS-1$
-	public static final String STATE_NAME_PREFIX = "ST="; //$NON-NLS-1$
-	public static final String COUNTRY_PREFIX = "C="; //$NON-NLS-1$
-
-}

Deleted: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SecurityManagerPrefInitilizer.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SecurityManagerPrefInitilizer.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SecurityManagerPrefInitilizer.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -1,34 +0,0 @@
-/**
- * Copyright (c) 2006,2009 IBM Corporation and others.
- * 
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation         - initial API and implementation
- *     Diego Sandin (Motorola) - Porting code to TFM Sign Framework [Bug 286387]
- */
-package org.eclipse.mtj.tfm.internal.sign.smgmt.j9;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.mtj.tfm.sign.smgmt.j9.J9SmgmtCore;
-
-public class J9SecurityManagerPrefInitilizer extends
-        AbstractPreferenceInitializer {
-
-    @Override
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
-     */
-    public void initializeDefaultPreferences() {
-        IPreferenceStore store = J9SmgmtCore.getDefault().getPreferenceStore();
-        store.setDefault(J9SecurityManagerConstants.SECURITY_TOOL_LOCATION,
-                Messages.J9SecurityManagerPrefInitilizer_0);
-    }
-
-}

Copied: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SmgmtConstants.java (from rev 1439, trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SecurityManagerConstants.java)
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SmgmtConstants.java	                        (rev 0)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SmgmtConstants.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) 2006,2009 IBM Corporation and others.
+ * 
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation         - initial API and implementation
+ *     Rodrigo Pastrana        - Replace State name with ST to match spec. 
+ *     Diego Sandin (Motorola) - Porting code to TFM Sign Framework [Bug 286387]
+ */
+package org.eclipse.mtj.tfm.internal.sign.smgmt.j9;
+
+public abstract class J9SmgmtConstants {
+
+	public static String SECURITY_TOOL_LOCATION = "J9SecurityToolLocationPreference"; //$NON-NLS-1$
+    
+	// keytool primary command options
+	public static final String GENERATE_KEY            = "-genkey"; //$NON-NLS-1$
+	public static final String DELETE_KEY              = "-delete"; //$NON-NLS-1$
+	public static final String IMPORT_CERT             = "-import"; //$NON-NLS-1$
+	public static final String GENERATE_CSR            = "-export"; //$NON-NLS-1$
+	public static final String LIST                    = "-list"; //$NON-NLS-1$
+	public static final String CHANGE_STORE_PASSWD     = "-storepasswd"; //$NON-NLS-1$
+
+	
+	// keytool secondary command options
+	public static final String ALIAS           = "-alias"; //$NON-NLS-1$
+	public static final String DNAME           = "-dname"; //$NON-NLS-1$
+	public static final String KEYPASS         = "-keypass"; //$NON-NLS-1$
+	public static final String VALIDITY        = "-validity"; //$NON-NLS-1$
+	public static final String STORETYPE       = "-storetype"; //$NON-NLS-1$
+	public static final String KEYSTORE        = "-keystore"; //$NON-NLS-1$
+	public static final String STOREPASS       = "-storepass"; //$NON-NLS-1$
+	public static final String PROVIDER        = "-provider"; //$NON-NLS-1$
+	public static final String FILE            = "-file"; //$NON-NLS-1$
+	public static final String NEWSTOREPASS    = "-new"; //$NON-NLS-1$
+	public static final String KEYALG          = "-keyalg"; //$NON-NLS-1$
+	public static final String SIGALG          = "-sigalg"; //$NON-NLS-1$
+	public static final String KEYSIZE         = "-keysize"; //$NON-NLS-1$
+	public static final String NOPROMPT        = "-noprompt"; //$NON-NLS-1$
+
+}


Property changes on: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SmgmtConstants.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/Messages.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/Messages.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/Messages.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -16,24 +16,29 @@
 
 public final class Messages extends NLS {
 
-	private static final String BUNDLE_NAME = "org.eclipse.mtj.tfm.internal.sign.smgmt.j9.messages";//$NON-NLS-1$
+    private static final String BUNDLE_NAME = "org.eclipse.mtj.tfm.internal.sign.smgmt.j9.messages";//$NON-NLS-1$
 
-	private Messages() {
-		// Do not instantiate
-	}
+    public static String J9SecurityManager_Could_not_execute;
+    public static String J9SecurityManager_Creating_key_alias;
+    public static String J9SecurityManager_Description;
+    public static String J9SecurityManager_getSecurityManagerException;
+    public static String J9SecurityManager_Opening_keystore;
+    public static String J9SecurityManager_PluginVendor;
+    public static String J9SecurityManager_PluginVersion;
+    public static String J9SecurityManager_Specify_directory_here;
+    public static String J9SecurityManager_Tool_not_configured_correctly;
+    public static String J9SecurityManager_Using_Security_management_features;
+    
+    public static String PreferenceInitializer_set_location_message;
 
-	public static String J9SecurityManager_Could_not_execute;
-	public static String J9SecurityManager_Creating_key_alias;
-	public static String J9SecurityManager_Description;
-	public static String J9SecurityManager_getSecurityManagerException;
-	public static String J9SecurityManager_Opening_keystore;
-	public static String J9SecurityManager_PluginVendor;
-	public static String J9SecurityManager_PluginVersion;
-	public static String J9SecurityManager_Specify_directory_here;
-	public static String J9SecurityManager_Tool_not_configured_correctly;
-	public static String J9SecurityManager_Using_Security_management_features;
-	public static String J9SecurityManagerPrefInitilizer_0;
-	static {
-		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-	}
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+    
+    /**
+     * Creates a new instance of Messages.
+     */
+    private Messages() {
+        // Do not instantiate
+    }
 }
\ No newline at end of file

Copied: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/PreferenceInitializer.java (from rev 1439, trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/J9SecurityManagerPrefInitilizer.java)
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/PreferenceInitializer.java	                        (rev 0)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/PreferenceInitializer.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) 2006,2009 IBM Corporation and others.
+ * 
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation         - initial API and implementation
+ *     Diego Sandin (Motorola) - Porting code to TFM Sign Framework [Bug 286387]
+ */
+package org.eclipse.mtj.tfm.internal.sign.smgmt.j9;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.mtj.tfm.sign.smgmt.j9.J9SmgmtCore;
+
+public class PreferenceInitializer extends AbstractPreferenceInitializer {
+
+    /* (non-Javadoc)
+     * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+     */
+    public void initializeDefaultPreferences() {
+        IPreferenceStore store = J9SmgmtCore.getDefault().getPreferenceStore();
+        store.setDefault(J9SmgmtConstants.SECURITY_TOOL_LOCATION,
+                Messages.PreferenceInitializer_set_location_message);
+    }
+
+}


Property changes on: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/PreferenceInitializer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/messages.properties
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/messages.properties	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/internal/sign/smgmt/j9/messages.properties	2009-08-26 01:36:23 UTC (rev 1449)
@@ -24,4 +24,4 @@
 # {2}=Messages.J9SecurityManager_Using_Security_management_features
 J9SecurityManager_getSecurityManagerException={0} {1} {2}
 J9SecurityManager_Using_Security_management_features=security tool before using the Security Management features
-J9SecurityManagerPrefInitilizer_0=Specify the IBM WEME home directory here
+PreferenceInitializer_set_location_message=Specify the IBM WEME home directory here

Copied: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/sign/smgmt/j9/J9SecurityManagement.java (from rev 1439, trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/sign/smgmt/j9/J9SecurityManager.java)
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/sign/smgmt/j9/J9SecurityManagement.java	                        (rev 0)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/sign/smgmt/j9/J9SecurityManagement.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -0,0 +1,735 @@
+/**
+ * Copyright (c) 2006,2009 IBM Corporation and others.
+ * 
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation         - initial API and implementation
+ *     Rodrigo Pastrana        - Updates to parameters for command line execution
+ *     Diego Sandin (Motorola) - Porting code to TFM Sign Framework [Bug 286387]
+ */
+package org.eclipse.mtj.tfm.sign.smgmt.j9;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.mtj.tfm.internal.sign.smgmt.j9.J9SmgmtConstants;
+import org.eclipse.mtj.tfm.internal.sign.smgmt.j9.Messages;
+import org.eclipse.mtj.tfm.sign.core.SignErrors;
+import org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType;
+import org.eclipse.mtj.tfm.sign.core.exception.SignException;
+import org.eclipse.mtj.tfm.sign.core.extension.ExtensionImpl;
+import org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement;
+import org.eclipse.mtj.tfm.sign.core.extension.security.X500DName;
+import org.osgi.framework.Version;
+
+/**
+ * @author Rodrigo Pastrana
+ * @since 1.0
+ */
+public class J9SecurityManagement extends ExtensionImpl implements
+        ISecurityManagement {
+
+    private String aliaskey = null;
+
+    /** The certificate will be valid for 365 days. */
+    private String ksCertfValidity = "365"; //$NON-NLS-1$
+
+    /** The keystore location in the file system. */
+    private String ksLocation = ""; //$NON-NLS-1$
+
+    /** Keystore Password */
+    private String ksPasswrd = null;
+
+    /** Java KeyStore (JKS) */
+    private String ksType = "JKS"; //$NON-NLS-1$
+
+    /**
+     * Preference store for this SecurityManagement plug-in. This preference
+     * store is used to hold persistent settings for this plug-in in the context
+     * of a workbench.
+     */
+    private IPreferenceStore securityProviderPrefStore;
+
+    /**
+     * Creates a new instance of J9SecurityManagement.<br>
+     * <br>
+     * <b>ID</b>: <i>org.eclipse.mtj.tfm.sign.smgmt.j9</i><br>
+     * <b>Vendor</b>: <i>DSDP - Eclipse.org</i><br>
+     * <b>Version</b>: <i>1.0.0</i><br>
+     * <b>Description</b>: <i>Security Manager for IBM's WebSphere Everyplace
+     * Micro Environment keytool.</i><br>
+     * <b>Type</b>: <i>{@link ExtensionType#SECURITY_MANAGEMENT
+     * SECURITY_MANAGEMENT}</i><br>
+     */
+    public J9SecurityManagement() {
+        super();
+
+        setId(J9SmgmtCore.getDefault().getBundle().getSymbolicName());
+        setVendor(Messages.J9SecurityManager_PluginVendor);
+        setVersion(new Version(Messages.J9SecurityManager_PluginVersion));
+        setDescription(Messages.J9SecurityManager_Description);
+        setType(ExtensionType.SECURITY_MANAGEMENT);
+        securityProviderPrefStore = J9SmgmtCore.getDefault()
+                .getPreferenceStore();
+
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#changeStorePassword(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     */
+    public boolean changeStorePassword(String newStorePass, String storePass,
+            IProgressMonitor monitor) throws SignException {
+
+        boolean cmdSuccessful = true;
+        String[] cmdArgs = generateChangeStorePasswordCmd(newStorePass,
+                storePass);
+        Process p = runSecurityCmd(cmdArgs);
+        BufferedReader cmdOutputStream = new BufferedReader(
+                new InputStreamReader(p.getInputStream()));
+
+        String cmdOutput;
+        try {
+            while ((cmdOutput = cmdOutputStream.readLine()) != null) {
+
+                if (cmdOutput.toLowerCase().indexOf("error") >= 0) { //$NON-NLS-1$
+                    throw new SignException(SignErrors
+                            .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
+                            + " " + cmdOutput); //$NON-NLS-1$
+                }
+            }
+        } catch (IOException ee) {
+            throw new SignException(SignErrors
+                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
+        }
+        return cmdSuccessful;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#createNewKey(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     */
+    public boolean createNewKey(String alias, String commonName,
+            String orgUnit, String orgName, String localityName,
+            String stateName, String country, IProgressMonitor monitor)
+            throws SignException {
+
+        monitor.beginTask(Messages.J9SecurityManager_Creating_key_alias, 100);
+
+        boolean cmdSuccessful = true;
+        String Dname = new X500DName(commonName, orgUnit, orgName,
+                localityName, stateName, country).toString();
+
+        String[] cmdArgs = generateNewKeyCmd(alias, Dname, "RSA", "SHA1withRSA"); //$NON-NLS-1$ //$NON-NLS-2$
+        Process p = runSecurityCmd(cmdArgs);
+
+        monitor.worked(10);
+
+        BufferedReader cmdOutputStream = new BufferedReader(
+                new InputStreamReader(p.getInputStream()));
+
+        String cmdOutput;
+        try {
+            if ((cmdOutput = cmdOutputStream.readLine()) != null) {
+                monitor.worked(40);
+                if (cmdOutput.toLowerCase().indexOf("error") >= 0) { //$NON-NLS-1$
+                    monitor.done();
+                    if (cmdOutput.toLowerCase().indexOf(
+                            "keystore contains the given alias") >= 0) { //$NON-NLS-1$
+                        throw new SignException(cmdOutput);
+                    }
+                    throw new SignException(cmdOutput);
+                }
+            }
+        } catch (IOException ee) {
+            throw new SignException(SignErrors
+                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
+        }
+
+        monitor.worked(100);
+        monitor.done();
+        return cmdSuccessful;
+
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#deleteKey(org.eclipse.core.runtime.IProgressMonitor)
+     */
+    public boolean deleteKey(IProgressMonitor monitor) throws SignException {
+
+        boolean cmdSuccessful = true;
+        String[] cmdArgs = generateDeleteKeyCmd();
+        Process p = runSecurityCmd(cmdArgs);
+
+        BufferedReader cmdOutputStream = new BufferedReader(
+                new InputStreamReader(p.getInputStream()));
+
+        String cmdOutput;
+        try {
+            while ((cmdOutput = cmdOutputStream.readLine()) != null) {
+
+                if (cmdOutput.toLowerCase().indexOf("error") >= 0) { //$NON-NLS-1$
+                    throw new SignException(SignErrors
+                            .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
+                            + " " + cmdOutput); //$NON-NLS-1$
+                }
+            }
+        } catch (IOException ee) {
+            throw new SignException(SignErrors
+                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
+        }
+        return cmdSuccessful;
+
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#generateCSR(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     */
+    public boolean generateCSR(String certFile, IProgressMonitor monitor)
+            throws SignException {
+        boolean cmdSuccessful = true;
+        String[] cmdArgs = generateGenerateCSRCmd(certFile);
+        Process p = runSecurityCmd(cmdArgs);
+
+        BufferedReader cmdOutputStream = new BufferedReader(
+                new InputStreamReader(p.getInputStream()));
+
+        String cmdOutput;
+        try {
+            while ((cmdOutput = cmdOutputStream.readLine()) != null) {
+
+                if (cmdOutput.toLowerCase().indexOf("error") >= 0) { //$NON-NLS-1$
+
+                    throw new SignException(SignErrors
+                            .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
+                            + " " + cmdOutput); //$NON-NLS-1$
+                }
+            }
+        } catch (IOException ee) {
+            throw new SignException(SignErrors
+                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
+        }
+        return cmdSuccessful;
+
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getAliaskey()
+     */
+    public String getAliaskey() throws SignException {
+        return aliaskey;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getCertificateInfo(org.eclipse.core.runtime.IProgressMonitor)
+     */
+    public String getCertificateInfo(IProgressMonitor monitor)
+            throws SignException {
+
+        String certInfo = ""; //$NON-NLS-1$
+
+        if ((aliaskey != null) && (aliaskey.length() > 0)) {
+
+            try {
+                String[] cmdArgs = generateDisplayCertifcates();
+                Process p = runSecurityCmd(cmdArgs);
+                BufferedReader cmdOutputStream = new BufferedReader(
+                        new InputStreamReader(p.getInputStream()));
+
+                String cmdOutput;
+
+                while ((cmdOutput = cmdOutputStream.readLine()) != null) {
+
+                    if (cmdOutput.toLowerCase().indexOf("error") >= 0) { //$NON-NLS-1$
+                        throw new SignException(
+                                SignErrors
+                                        .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
+                                        + " " + cmdOutput); //$NON-NLS-1$
+                    } else if (cmdOutput.length() >= 0) {
+                        certInfo = certInfo + cmdOutput;
+                    }
+                }
+
+            } catch (IOException ee) {
+                certInfo = ""; //$NON-NLS-1$
+                throw new SignException(SignErrors
+                        .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
+            } catch (Exception e) {
+                certInfo = ""; //$NON-NLS-1$
+                throw new SignException(SignErrors
+                        .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), e);
+            }
+        }// if aliaskey
+
+        return certInfo;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getKeyStoreNameLoc()
+     */
+    public String getKeyStoreNameLoc() throws SignException {
+        return ksLocation;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getPassWrd()
+     */
+    public String getPassWrd() throws SignException {
+        return ksPasswrd;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getStoreType()
+     */
+    public String getStoreType() throws SignException {
+        return ksType;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getToolLocation(org.eclipse.core.runtime.IProgressMonitor)
+     */
+    public String getToolLocation(IProgressMonitor monitor)
+            throws SignException {
+        return securityProviderPrefStore
+                .getString(J9SmgmtConstants.SECURITY_TOOL_LOCATION);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getValidity()
+     */
+    public String getValidity() throws SignException {
+        return ksCertfValidity;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#importSignedCert(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     */
+    public boolean importSignedCert(String certFile, IProgressMonitor monitor)
+            throws SignException {
+        boolean cmdSuccessful = true;
+        String[] cmdArgs = generateImportSignedCertCmd(certFile);
+        Process p = runSecurityCmd(cmdArgs);
+
+        BufferedReader cmdOutputStream = new BufferedReader(
+                new InputStreamReader(p.getInputStream()));
+
+        String cmdOutput;
+        try {
+            while ((cmdOutput = cmdOutputStream.readLine()) != null) {
+
+                if (cmdOutput.indexOf("error") >= 0) { //$NON-NLS-1$
+                    throw new SignException(SignErrors
+                            .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
+                            + cmdOutput);
+                }
+            }
+        } catch (IOException ee) {
+            throw new SignException(SignErrors
+                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
+        }
+        return cmdSuccessful;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#isKeyStoreSelected()
+     */
+    public boolean isKeyStoreSelected() throws SignException {
+
+        if ((ksLocation == null) || (ksLocation.length() <= 0))
+            return false;
+
+        return true;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#openKeyStore(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     */
+    public String[] openKeyStore(String keyStore, String storePass,
+            IProgressMonitor monitor) throws SignException {
+        monitor.beginTask(Messages.J9SecurityManager_Opening_keystore, 100);
+
+        String[] cmdArgs = generateOpenKeyStoreCmd(keyStore, storePass);
+        Process p = runSecurityCmd(cmdArgs);
+
+        BufferedReader cmdOutputStream = new BufferedReader(
+                new InputStreamReader(p.getInputStream()));
+
+        String cmdOutput;
+        List<String> aliases = new ArrayList<String>();
+
+        monitor.worked(50);
+        try {
+            while ((cmdOutput = cmdOutputStream.readLine()) != null) {
+
+                if (cmdOutput.toLowerCase().indexOf("error") >= 0) { //$NON-NLS-1$
+                    monitor.done();
+                    if (cmdOutput
+                            .toLowerCase()
+                            .indexOf(
+                                    "Keystore password should have at least 6 characters") >= 0) { //$NON-NLS-1$
+                        throw new SignException(
+                                SignErrors
+                                        .getErrorMessage(SignErrors.SECURITY_MALFORMED_PASSWORD)
+                                        + cmdOutput);
+                    } else if (cmdOutput.toLowerCase().indexOf(
+                            "Check the file path and password.") >= 0) { //$NON-NLS-1$
+                        throw new SignException(
+                                SignErrors
+                                        .getErrorMessage(SignErrors.SECURITY_BAD_KEYSTORE_OR_PASSWORD)
+                                        + cmdOutput);
+                    } else {
+                        throw new SignException(
+                                SignErrors
+                                        .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
+                                        + " " + cmdOutput); //$NON-NLS-1$
+                    }
+
+                } else if (cmdOutput.indexOf(",") >= 0) { //$NON-NLS-1$
+                    StringTokenizer strtok = new StringTokenizer(cmdOutput,
+                            ".,"); //$NON-NLS-1$
+                    aliases.add(strtok.nextToken());
+                }
+            }
+        } catch (IOException ee) {
+            throw new SignException(SignErrors
+                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
+        }
+        monitor.worked(100);
+        monitor.done();
+        return (String[]) aliases.toArray(new String[aliases.size()]);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#resetValues()
+     */
+    public void resetValues() throws SignException {
+        // TODO Reset the values to default
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setAliaskey(java.lang.String)
+     */
+    public void setAliaskey(String aliasKey) throws SignException {
+        this.aliaskey = aliasKey;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setKeyStoreNameLoc(java.lang.String)
+     */
+    public void setKeyStoreNameLoc(String keyStoreNameLoc) throws SignException {
+        this.ksLocation = keyStoreNameLoc;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setPassWrd(java.lang.String)
+     */
+    public void setPassWrd(String passWrd) throws SignException {
+        this.ksPasswrd = passWrd;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setStoreType(java.lang.String)
+     */
+    public void setStoreType(String storeType) throws SignException {
+        this.ksType = storeType;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setValidity(java.lang.String)
+     */
+    public void setValidity(String validity) throws SignException {
+        this.ksCertfValidity = validity;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setValues(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void setValues(String loc, String alias, String psswd, String strtype)
+            throws SignException {
+
+        ksType = strtype;
+        aliaskey = alias;
+        ksPasswrd = psswd;
+        ksLocation = loc;
+
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#storeToolLocation(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     */
+    public void storeToolLocation(String loc, IProgressMonitor monitor)
+            throws SignException {
+        securityProviderPrefStore.setValue(
+                J9SmgmtConstants.SECURITY_TOOL_LOCATION, loc);
+    }
+
+    /**
+     * Create the command line to change the password used to protect the
+     * integrity of the keystore contents.
+     * 
+     * @param newStorePass the new keystore password. <b>Restriction:</b>The
+     *            password must be at least 6 characters long.
+     * @param storePasswd the current keystore password
+     * @return the generated command line string in the following format: <br>
+     *         <code>
+     *         &lt;keytool Path&gt; 
+     *         -storepasswd -new <b>newStorePass</b> -storetype {@link #ksType} -keystore {@link #ksLocation} -storepass
+     *        <b>storePasswd</b></code>
+     * @throws SignException in case fails to get the Security Management tool
+     *             location in the file system.
+     */
+    private String[] generateChangeStorePasswordCmd(String newStorePass,
+            String storePasswd) throws SignException {
+
+        String[] changeStorePasswordCmdArgs = { getSecurityManagementTool(),
+                J9SmgmtConstants.CHANGE_STORE_PASSWD,
+                J9SmgmtConstants.NEWSTOREPASS, newStorePass,
+                J9SmgmtConstants.STORETYPE, ksType, J9SmgmtConstants.KEYSTORE,
+                ksLocation, J9SmgmtConstants.STOREPASS, storePasswd };
+
+        return changeStorePasswordCmdArgs;
+    }
+
+    /**
+     * Create the command line to delete from the keystore the entry identified
+     * by {@link #aliaskey}.
+     * 
+     * @return the generated command line string in the following format: <br>
+     *         <code>
+     *         &lt;keytool Path&gt;  
+     *         -delete -alias {@link #aliaskey} -storetype {@link #ksType} -keystore {@link #ksLocation} -storepass
+     *        {@link #ksPasswrd}</code>
+     * @throws SignException in case fails to get the Security Management tool
+     *             location in the file system.
+     */
+    private String[] generateDeleteKeyCmd() throws SignException {
+
+        String[] deleteKeyCmdArgs = { getSecurityManagementTool(),
+                J9SmgmtConstants.DELETE_KEY, J9SmgmtConstants.ALIAS, aliaskey,
+                J9SmgmtConstants.STORETYPE, ksType, J9SmgmtConstants.KEYSTORE,
+                ksLocation, J9SmgmtConstants.STOREPASS, ksPasswrd };
+
+        return deleteKeyCmdArgs;
+    }
+
+    /**
+     * Create the command line to display the contents of the keystore entry
+     * identified by {@link #aliaskey}.
+     * 
+     * @return the generated command line string in the following format: <br>
+     *         <code>
+     *         &lt;keytool Path&gt;
+     *         -list -alias {@link #aliaskey} -storetype {@link #ksType} 
+     *         -keystore {@link #ksLocation} -storepass
+     *        {@link #ksPasswrd}</code>
+     * @throws SignException in case fails to get the Security Management tool
+     *             location in the file system.
+     */
+    private String[] generateDisplayCertifcates() throws SignException {
+
+        String[] listCertificateCmdArgs = { getSecurityManagementTool(),
+                J9SmgmtConstants.LIST, J9SmgmtConstants.ALIAS, aliaskey,
+                J9SmgmtConstants.STORETYPE, ksType, J9SmgmtConstants.KEYSTORE,
+                ksLocation, J9SmgmtConstants.STOREPASS, ksPasswrd };
+
+        return listCertificateCmdArgs;
+    }
+
+    /**
+     * Create the command line to read from the keystore the certificate
+     * associated with {@link #aliaskey}, and stores it in the file certFile.
+     * 
+     * @param certFile where to store the certificate associated with
+     *            {@link #aliaskey}.
+     * @return the generated command line string in the following format: <br>
+     *         <code>
+     *         &lt;keytool Path&gt;
+     *         -export -alias {@link #aliaskey} -file <b>certFile</b> 
+     *         -storetype {@link #ksType} -keystore {@link #ksLocation} -storepass
+     *         {@link #ksPasswrd}</code>
+     * @throws SignException in case fails to get the Security Management tool
+     *             location in the file system.
+     */
+    private String[] generateGenerateCSRCmd(String certFile)
+            throws SignException {
+
+        String[] generateCSRCmdArgs = { getSecurityManagementTool(),
+                J9SmgmtConstants.GENERATE_CSR, J9SmgmtConstants.ALIAS,
+                aliaskey, J9SmgmtConstants.FILE, certFile,
+                J9SmgmtConstants.STORETYPE, ksType, J9SmgmtConstants.KEYSTORE,
+                ksLocation, J9SmgmtConstants.STOREPASS, ksPasswrd };
+
+        return generateCSRCmdArgs;
+    }
+
+    /**
+     * Create the command line to read the certificate from the file certFile,
+     * and stores it in the keystore entry identified by {@link #aliaskey}.
+     * 
+     * @param certFile the file where the certificate is stored.
+     * @return the generated command line string in the following format: <br>
+     *         <code>
+     *         &lt;keytool Path&gt; 
+     *         -import -noprompt -alias {@link #aliaskey} -keypass {@link #ksPasswrd} 
+     *         -file <b>certFile</b> -storetype {@link #ksType} -keystore {@link #ksLocation} 
+     *         -storepass {@link #ksPasswrd}</code>
+     * @throws SignException in case fails to get the Security Management tool
+     *             location in the file system.
+     */
+    private String[] generateImportSignedCertCmd(String certFile)
+            throws SignException {
+
+        String[] importSignedCertCmdArgs = { getSecurityManagementTool(),
+                J9SmgmtConstants.IMPORT_CERT, J9SmgmtConstants.NOPROMPT,
+                J9SmgmtConstants.ALIAS, aliaskey, J9SmgmtConstants.KEYPASS,
+                ksPasswrd, J9SmgmtConstants.FILE, certFile,
+                J9SmgmtConstants.STORETYPE, ksType, J9SmgmtConstants.KEYSTORE,
+                ksLocation, J9SmgmtConstants.STOREPASS, ksPasswrd };
+
+        return importSignedCertCmdArgs;
+    }
+
+    /**
+     * Create the command line to generate a key pair (a public key and
+     * associated private key).
+     * 
+     * @param alias keypair alias
+     * @param dname specifies the X.500 Distinguished Name to be associated with
+     *            alias, and is used as the issuer and subject fields in the
+     *            self-signed certificate.
+     * @param keyAlg specifies the algorithm to be used to generate the key
+     *            pair.
+     * @param sigAlg specifies the algorithm that should be used to sign the
+     *            self-signed certificate; this algorithm must be compatible
+     *            with keyalg.
+     * @return the generated command line string in the following format: <br>
+     *         <code>
+     *         &lt;keytool Path&gt; -genkey -alias <b>alias</b> -dname <b>dname</b>
+     *         -keypass {@link #ksPasswrd} -storetype {@link #ksType} -keyalg
+     *         <b>keyAlg</b> -keystore {@link #ksLocation} -storepass
+     *         {@link #ksPasswrd} -validity {@link #ksCertfValidity}</code>
+     * @throws SignException in case fails to get the Security Management tool
+     *             location in the file system.
+     */
+    private String[] generateNewKeyCmd(String alias, String dname,
+            String keyAlg, String sigAlg) throws SignException {
+
+        String[] newKeyCmdArgs = { getSecurityManagementTool(),
+                J9SmgmtConstants.GENERATE_KEY, J9SmgmtConstants.ALIAS, alias,
+                J9SmgmtConstants.DNAME, dname, J9SmgmtConstants.KEYPASS,
+                ksPasswrd, J9SmgmtConstants.STORETYPE, ksType,
+                J9SmgmtConstants.KEYALG, keyAlg, J9SmgmtConstants.SIGALG,
+                sigAlg, J9SmgmtConstants.KEYSTORE, ksLocation,
+                J9SmgmtConstants.STOREPASS, ksPasswrd,
+                J9SmgmtConstants.VALIDITY, ksCertfValidity };
+
+        return newKeyCmdArgs;
+    }
+
+    /**
+     * Create the command line to open a Key Store and display its contents.
+     * 
+     * @param keyStore the keystore location.
+     * @param storePasswd the password which is used to protect the integrity of
+     *            the keystore.
+     * @return the generated command line string in the following format: <br>
+     *         <code>
+     *         &lt;keytool Path&gt;
+     *         -list -storetype {@link #ksType} -keystore <b>keyStore</b> -storepass
+     *        <b>storePasswd</b></code>
+     * @throws SignException in case fails to get the Security Management tool
+     *             location in the file system.
+     */
+    private String[] generateOpenKeyStoreCmd(String keyStore, String storePasswd)
+            throws SignException {
+
+        String[] openKeyStoreCmdArgs = { getSecurityManagementTool(),
+                J9SmgmtConstants.LIST, J9SmgmtConstants.STORETYPE, ksType,
+                J9SmgmtConstants.KEYSTORE, keyStore,
+                J9SmgmtConstants.STOREPASS, storePasswd };
+        return openKeyStoreCmdArgs;
+    }
+
+    /**
+     * Get the Security Management tool from preference store location (@link
+     * #securityProviderPrefStore}).
+     * 
+     * @return the path to the keystore tool.
+     * @throws SignException when the JRE home directory is not configured
+     *             correctly.
+     */
+    private final String getSecurityManagementTool() throws SignException {
+        String securityToolLocation = getToolLocation(null);
+
+        if (securityToolLocation == null
+                || securityToolLocation.length() <= 0
+                || securityToolLocation
+                        .equals(Messages.J9SecurityManager_Specify_directory_here)) {
+            String message = MessageFormat
+                    .format(
+                            Messages.J9SecurityManager_getSecurityManagerException,
+                            new Object[] {
+                                    getId(),
+                                    Messages.J9SecurityManager_Tool_not_configured_correctly,
+                                    Messages.J9SecurityManager_Using_Security_management_features });
+            throw new SignException(
+                    SignErrors
+                            .getErrorMessage(SignErrors.SECURITY_MANAGER_NOT_CONFIGURED)
+                            + "\n" + //$NON-NLS-1$
+                            message);
+        }
+
+        StringBuffer buffer = new StringBuffer("\"");
+        buffer.append(securityToolLocation).append(File.separator)
+                .append("bin") //$NON-NLS-1$						
+                .append(File.separator).append("keytool") //$NON-NLS-1$
+                .append("\"");
+
+        return buffer.toString();
+    }
+
+    /**
+     * Executes the specified command and arguments in a separate process.
+     * 
+     * @param cmd array containing the command to call and its arguments.
+     * @return A new Process object for managing the subprocess
+     * @throws SignException if fails to create the new process.
+     */
+    private Process runSecurityCmd(String[] cmd) throws SignException {
+
+        Process p = null;
+
+        try {
+            p = Runtime.getRuntime().exec(cmd);
+        } catch (Exception e) {
+            throw new SignException(SignErrors
+                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR));
+        }
+
+        if (p == null) {
+            StringBuffer str = new StringBuffer(""); //$NON-NLS-1$
+
+            for (int i = 0; i < cmd.length; i++) {
+                str.append(" " + cmd[i]); //$NON-NLS-1$
+            }
+
+            throw new SignException(SignErrors
+                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
+                    + Messages.J9SecurityManager_Could_not_execute
+                    + " [" + str + "]"); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+
+        return p;
+    }
+
+}


Property changes on: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/sign/smgmt/j9/J9SecurityManagement.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Deleted: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/sign/smgmt/j9/J9SecurityManager.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/sign/smgmt/j9/J9SecurityManager.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.j9/src/org/eclipse/mtj/tfm/sign/smgmt/j9/J9SecurityManager.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -1,626 +0,0 @@
-/**
- * Copyright (c) 2006,2009 IBM Corporation and others.
- * 
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation         - initial API and implementation
- *     Rodrigo Pastrana        - Updates to parameters for command line execution
- *     Diego Sandin (Motorola) - Porting code to TFM Sign Framework [Bug 286387]
- */
-package org.eclipse.mtj.tfm.sign.smgmt.j9;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.mtj.tfm.internal.sign.smgmt.j9.J9SecurityManagerConstants;
-import org.eclipse.mtj.tfm.internal.sign.smgmt.j9.Messages;
-import org.eclipse.mtj.tfm.sign.core.SignErrors;
-import org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType;
-import org.eclipse.mtj.tfm.sign.core.exception.SignException;
-import org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement;
-import org.eclipse.mtj.tfm.sign.core.extension.SignExtensionImpl;
-import org.osgi.framework.Version;
-
-/**
- * @author Rodrigo Pastrana
- * @since 1.0
- */
-public class J9SecurityManager extends SignExtensionImpl implements
-        ISecurityManagement {
-
-    private String aliaskey = null;
-    private String keyStoreNameLoc = ""; //$NON-NLS-1$
-    private String passwrd = null;
-    private IPreferenceStore securityProviderPrefStore;
-    // private variables
-    private String storeType = "JKS"; //$NON-NLS-1$
-
-    private String validity = "365"; //$NON-NLS-1$
-
-    /**
-	 * 
-	 */
-    public J9SecurityManager() {
-        super();
-
-        setId(J9SmgmtCore.getDefault().getBundle().getSymbolicName());
-        setVendor(Messages.J9SecurityManager_PluginVendor);
-        setVersion(new Version(Messages.J9SecurityManager_PluginVersion));
-        setDescription(Messages.J9SecurityManager_Description);
-        setType(ExtensionType.SECURITY_MANAGEMENT);
-        securityProviderPrefStore = J9SmgmtCore.getDefault()
-                .getPreferenceStore();
-
-    }
-
-    public boolean changeStorePassword(String newStorePass, String storePass,
-            IProgressMonitor monitor) throws SignException {
-
-        boolean cmdSuccessful = true;
-        String[] cmdArgs = generateChangeStorePasswordCmd(newStorePass,
-                storePass);
-        Process p = runSecurityCmd(cmdArgs);
-        BufferedReader cmdOutputStream = new BufferedReader(
-                new InputStreamReader(p.getInputStream()));
-
-        String cmdOutput;
-        try {
-            while ((cmdOutput = cmdOutputStream.readLine()) != null) {
-
-                if (cmdOutput.toLowerCase().indexOf("error") >= 0) { //$NON-NLS-1$
-                    throw new SignException(SignErrors
-                            .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
-                            + " " + cmdOutput); //$NON-NLS-1$
-                }
-            }
-        } catch (IOException ee) {
-            throw new SignException(SignErrors
-                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
-        }
-        return cmdSuccessful;
-    }
-
-    public boolean createNewKey(String alias, String commonName,
-            String orgUnit, String orgName, String localityName,
-            String stateName, String country, IProgressMonitor monitor)
-            throws SignException {
-
-        monitor.beginTask(Messages.J9SecurityManager_Creating_key_alias, 100);
-
-        boolean cmdSuccessful = true;
-        String Dname = generateDname(commonName, orgUnit, orgName,
-                localityName, stateName, country);
-        String[] cmdArgs = generateNewKeyCmd(alias, Dname, "RSA", "SHA1withRSA"); //$NON-NLS-1$ //$NON-NLS-2$
-        Process p = runSecurityCmd(cmdArgs);
-
-        monitor.worked(10);
-
-        BufferedReader cmdOutputStream = new BufferedReader(
-                new InputStreamReader(p.getInputStream()));
-
-        String cmdOutput;
-        try {
-            if ((cmdOutput = cmdOutputStream.readLine()) != null) {
-                monitor.worked(40);
-                if (cmdOutput.toLowerCase().indexOf("error") >= 0) { //$NON-NLS-1$
-                    monitor.done();
-                    if (cmdOutput.toLowerCase().indexOf(
-                            "keystore contains the given alias") >= 0) { //$NON-NLS-1$
-                        throw new SignException(cmdOutput);
-                    }
-                    throw new SignException(cmdOutput);
-                }
-            }
-        } catch (IOException ee) {
-            throw new SignException(SignErrors
-                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
-        }
-
-        monitor.worked(100);
-        monitor.done();
-        return cmdSuccessful;
-
-    }
-
-    /*
-     * 
-     * 
-     */
-    public boolean deleteKey(IProgressMonitor monitor) throws SignException {
-
-        boolean cmdSuccessful = true;
-        String[] cmdArgs = generateDeleteKeyCmd();
-        Process p = runSecurityCmd(cmdArgs);
-
-        BufferedReader cmdOutputStream = new BufferedReader(
-                new InputStreamReader(p.getInputStream()));
-
-        String cmdOutput;
-        try {
-            while ((cmdOutput = cmdOutputStream.readLine()) != null) {
-
-                if (cmdOutput.toLowerCase().indexOf("error") >= 0) { //$NON-NLS-1$
-                    throw new SignException(SignErrors
-                            .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
-                            + " " + cmdOutput); //$NON-NLS-1$
-                }
-            }
-        } catch (IOException ee) {
-            throw new SignException(SignErrors
-                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
-        }
-        return cmdSuccessful;
-
-    }
-
-    public boolean generateCSR(String certFile, IProgressMonitor monitor)
-            throws SignException {
-        boolean cmdSuccessful = true;
-        String[] cmdArgs = generateGenerateCSRCmd(certFile);
-        Process p = runSecurityCmd(cmdArgs);
-
-        BufferedReader cmdOutputStream = new BufferedReader(
-                new InputStreamReader(p.getInputStream()));
-
-        String cmdOutput;
-        try {
-            while ((cmdOutput = cmdOutputStream.readLine()) != null) {
-
-                if (cmdOutput.toLowerCase().indexOf("error") >= 0) { //$NON-NLS-1$
-
-                    throw new SignException(SignErrors
-                            .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
-                            + " " + cmdOutput); //$NON-NLS-1$
-                }
-            }
-        } catch (IOException ee) {
-            throw new SignException(SignErrors
-                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
-        }
-        return cmdSuccessful;
-
-    }
-
-    /*
-     * Generating the Distinguished Name (dname) string using the given user input. 
-     * 
-     */
-    public String generateDname(String commonName, String orgUnit,
-            String orgName, String localityName, String stateName,
-            String country) {
-        String Dname = J9SecurityManagerConstants.QUOTE
-                + J9SecurityManagerConstants.COMMON_NAME_PREFIX + commonName
-                + J9SecurityManagerConstants.COMMA_AND_SPACE
-                + J9SecurityManagerConstants.ORGANIZATION_UNIT_PREFIX + orgUnit
-                + J9SecurityManagerConstants.COMMA_AND_SPACE
-                + J9SecurityManagerConstants.ORGANIZATION_NAME_PREFIX + orgName
-                + J9SecurityManagerConstants.COMMA_AND_SPACE
-                + J9SecurityManagerConstants.LOCALITY_NAME_PREFIX
-                + localityName + J9SecurityManagerConstants.COMMA_AND_SPACE
-                + J9SecurityManagerConstants.STATE_NAME_PREFIX + stateName
-                + J9SecurityManagerConstants.COMMA_AND_SPACE
-                + J9SecurityManagerConstants.COUNTRY_PREFIX + country
-                + J9SecurityManagerConstants.QUOTE;
-        return Dname;
-    }
-
-    public String getAliaskey() throws SignException {
-        return aliaskey;
-    }
-
-    /**
-     * getCertificateInfo - Get the certificates associated with the alias
-     * key/keystore
-     * 
-     * @param alias - alias key
-     * @param storePass
-     * @return
-     */
-    public String getCertificateInfo(IProgressMonitor monitor)
-            throws SignException {
-
-        String certInfo = ""; //$NON-NLS-1$
-
-        if ((aliaskey != null) && (aliaskey.length() > 0)) {
-
-            try {
-                String[] cmdArgs = generateDisplayCertifcates();
-                Process p = runSecurityCmd(cmdArgs);
-                BufferedReader cmdOutputStream = new BufferedReader(
-                        new InputStreamReader(p.getInputStream()));
-
-                String cmdOutput;
-
-                while ((cmdOutput = cmdOutputStream.readLine()) != null) {
-
-                    if (cmdOutput.toLowerCase().indexOf("error") >= 0) { //$NON-NLS-1$
-                        throw new SignException(
-                                SignErrors
-                                        .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
-                                        + " " + cmdOutput); //$NON-NLS-1$
-                    } else if (cmdOutput.length() >= 0) {
-                        certInfo = certInfo + cmdOutput;
-                    }
-                }
-
-            } catch (IOException ee) {
-                certInfo = ""; //$NON-NLS-1$
-                throw new SignException(SignErrors
-                        .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
-            } catch (Exception e) {
-                certInfo = ""; //$NON-NLS-1$
-                throw new SignException(SignErrors
-                        .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), e);
-            }
-        }// if aliaskey
-
-        return certInfo;
-    }
-
-    public String getKeyStoreNameLoc() throws SignException {
-        return keyStoreNameLoc;
-    }
-
-    public String getPassWrd() throws SignException {
-        return passwrd;
-    }
-
-    public String getStoreType() throws SignException {
-        return storeType;
-    }
-
-    public String getToolLocation(IProgressMonitor monitor)
-            throws SignException {
-        return securityProviderPrefStore
-                .getString(J9SecurityManagerConstants.SECURITY_TOOL_LOCATION);
-    }
-
-    public String getValidity() throws SignException {
-        return validity;
-    }
-
-    /*
-     * 
-     * 
-     */
-    public boolean importSignedCert(String certFile, IProgressMonitor monitor)
-            throws SignException {
-        boolean cmdSuccessful = true;
-        String[] cmdArgs = generateImportSignedCertCmd(certFile);
-        Process p = runSecurityCmd(cmdArgs);
-
-        BufferedReader cmdOutputStream = new BufferedReader(
-                new InputStreamReader(p.getInputStream()));
-
-        String cmdOutput;
-        try {
-            while ((cmdOutput = cmdOutputStream.readLine()) != null) {
-
-                if (cmdOutput.indexOf("error") >= 0) { //$NON-NLS-1$
-                    //MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Error", cmdOutput);  //$NON-NLS-1$
-                    // cmdSuccessful = false;
-                    throw new SignException(SignErrors
-                            .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
-                            + cmdOutput);
-                }
-            }
-        } catch (IOException ee) {
-            throw new SignException(SignErrors
-                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
-        }
-        return cmdSuccessful;
-    }
-
-    /**
-     * isKeyStoreSelected - user of this class will specify the keystore
-     * name/location to manage.
-     * 
-     * @return true if a keystore name and location was set during this session.
-     */
-    public boolean isKeyStoreSelected() throws SignException {
-
-        if ((keyStoreNameLoc == null) || (keyStoreNameLoc.length() <= 0))
-            return false;
-
-        return true;
-    }
-
-    public String[] openKeyStore(String keyStore, String storePass,
-            IProgressMonitor monitor) throws SignException {
-        monitor.beginTask(Messages.J9SecurityManager_Opening_keystore, 100);
-
-        String[] cmdArgs = generateOpenKeyStoreCmd(keyStore, storePass);
-        Process p = runSecurityCmd(cmdArgs);
-
-        BufferedReader cmdOutputStream = new BufferedReader(
-                new InputStreamReader(p.getInputStream()));
-
-        String cmdOutput;
-        List<String> aliases = new ArrayList<String>();
-
-        monitor.worked(50);
-        try {
-            while ((cmdOutput = cmdOutputStream.readLine()) != null) {
-
-                if (cmdOutput.toLowerCase().indexOf("error") >= 0) { //$NON-NLS-1$
-                    monitor.done();
-                    if (cmdOutput
-                            .toLowerCase()
-                            .indexOf(
-                                    "Keystore password should have at least 6 characters") >= 0) { //$NON-NLS-1$
-                        throw new SignException(
-                                SignErrors
-                                        .getErrorMessage(SignErrors.SECURITY_MALFORMED_PASSWORD)
-                                        + cmdOutput);
-                    } else if (cmdOutput.toLowerCase().indexOf(
-                            "Check the file path and password.") >= 0) { //$NON-NLS-1$
-                        throw new SignException(
-                                SignErrors
-                                        .getErrorMessage(SignErrors.SECURITY_BAD_KEYSTORE_OR_PASSWORD)
-                                        + cmdOutput);
-                    } else {
-                        throw new SignException(
-                                SignErrors
-                                        .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
-                                        + " " + cmdOutput); //$NON-NLS-1$
-                    }
-
-                } else if (cmdOutput.indexOf(",") >= 0) { //$NON-NLS-1$
-                    StringTokenizer strtok = new StringTokenizer(cmdOutput,
-                            ".,"); //$NON-NLS-1$
-                    aliases.add(strtok.nextToken());
-                }
-            }
-        } catch (IOException ee) {
-            throw new SignException(SignErrors
-                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR), ee);
-        }
-        monitor.worked(100);
-        monitor.done();
-        return (String[]) aliases.toArray(new String[aliases.size()]);
-    }
-
-    public void resetValues() throws SignException {
-        // TODO Auto-generated method stub
-    }
-
-    public void setAliaskey(String aliasKey) throws SignException {
-        this.aliaskey = aliasKey;
-    }
-
-    public void setKeyStoreNameLoc(String keyStoreNameLoc) throws SignException {
-        this.keyStoreNameLoc = keyStoreNameLoc;
-    }
-
-    public void setPassWrd(String passWrd) throws SignException {
-        this.passwrd = passWrd;
-    }
-
-    public void setStoreType(String storeType) throws SignException {
-        this.storeType = storeType;
-    }
-
-    public void setValidity(String validity) throws SignException {
-        this.validity = validity;
-    }
-
-    public void setValues(String loc, String alias, String psswd, String strtype)
-            throws SignException {
-
-        storeType = strtype;
-        aliaskey = alias;
-        passwrd = psswd;
-        keyStoreNameLoc = loc;
-
-    }
-
-    public void storeToolLocation(String loc, IProgressMonitor monitor)
-            throws SignException {
-        securityProviderPrefStore.setValue(
-                J9SecurityManagerConstants.SECURITY_TOOL_LOCATION, loc);
-    }
-
-    /*
-     * Generating the command to change the key store password.
-     * 
-     */
-    private String[] generateChangeStorePasswordCmd(String newStorePass,
-            String storePasswd) throws SignException {
-
-        String[] changeStorePasswordCmdArgs = { getSecurityManagementTool(),
-                J9SecurityManagerConstants.CHANGE_STORE_PASSWD,
-                J9SecurityManagerConstants.NEWSTOREPASS, newStorePass,
-                J9SecurityManagerConstants.STORETYPE, storeType,
-                J9SecurityManagerConstants.KEYSTORE, keyStoreNameLoc,
-                J9SecurityManagerConstants.STOREPASS, storePasswd };
-
-        return changeStorePasswordCmdArgs;
-    }
-
-    /*
-     * 
-     * 
-     */
-    private String[] generateDeleteKeyCmd() throws SignException {
-
-        String[] deleteKeyCmdArgs = { getSecurityManagementTool(),
-                J9SecurityManagerConstants.DELETE_KEY,
-                J9SecurityManagerConstants.ALIAS, aliaskey,
-                J9SecurityManagerConstants.STORETYPE, storeType,
-                J9SecurityManagerConstants.KEYSTORE, keyStoreNameLoc,
-                J9SecurityManagerConstants.STOREPASS, passwrd };
-
-        return deleteKeyCmdArgs;
-    }
-
-    /**
-     * generateDisplayCertifcates - Command to display all certificates for a
-     * given key (alias)
-     * 
-     * @param alias - alias key for which the certificate info is being
-     *            requested.
-     * @param storePasswd - password used to open keystore
-     * @return
-     * @throws SignException
-     */
-    private String[] generateDisplayCertifcates() throws SignException {
-
-        String[] listCertificateCmdArgs = { getSecurityManagementTool(),
-                J9SecurityManagerConstants.LIST,
-                J9SecurityManagerConstants.ALIAS, aliaskey,
-                J9SecurityManagerConstants.STORETYPE, storeType,
-                J9SecurityManagerConstants.KEYSTORE, keyStoreNameLoc,
-                J9SecurityManagerConstants.STOREPASS, passwrd };
-
-        return listCertificateCmdArgs;
-    }
-
-    /*
-     * 
-     * 
-     */
-    private String[] generateGenerateCSRCmd(String certFile)
-            throws SignException {
-
-        String[] generateCSRCmdArgs = { getSecurityManagementTool(),
-                J9SecurityManagerConstants.GENERATE_CSR,
-                J9SecurityManagerConstants.ALIAS, aliaskey,
-                J9SecurityManagerConstants.FILE, certFile,
-                J9SecurityManagerConstants.STORETYPE, storeType,
-                J9SecurityManagerConstants.KEYSTORE, keyStoreNameLoc,
-                J9SecurityManagerConstants.STOREPASS, passwrd };
-
-        return generateCSRCmdArgs;
-    }
-
-    /*
-     * 
-     * 
-     */
-    private String[] generateImportSignedCertCmd(String certFile)
-            throws SignException {
-
-        String[] importSignedCertCmdArgs = { getSecurityManagementTool(),
-                J9SecurityManagerConstants.IMPORT_CERT,
-                J9SecurityManagerConstants.NOPROMPT,
-                J9SecurityManagerConstants.ALIAS, aliaskey,
-                J9SecurityManagerConstants.KEYPASS, passwrd,
-                J9SecurityManagerConstants.FILE, certFile,
-                J9SecurityManagerConstants.STORETYPE, storeType,
-                J9SecurityManagerConstants.KEYSTORE, keyStoreNameLoc,
-                J9SecurityManagerConstants.STOREPASS, passwrd };
-
-        return importSignedCertCmdArgs;
-    }
-
-    /*
-     * 
-     * 
-     */
-    private String[] generateNewKeyCmd(String alias, String dname,
-            String keyAlg, String sigAlg) throws SignException {
-
-        String[] newKeyCmdArgs = { getSecurityManagementTool(),
-                J9SecurityManagerConstants.GENERATE_KEY,
-                J9SecurityManagerConstants.ALIAS, alias,
-                J9SecurityManagerConstants.DNAME, dname,
-                J9SecurityManagerConstants.KEYPASS, passwrd,
-                J9SecurityManagerConstants.STORETYPE, storeType,
-                J9SecurityManagerConstants.KEYALG, keyAlg,
-                J9SecurityManagerConstants.SIGALG, sigAlg,
-                J9SecurityManagerConstants.KEYSTORE, keyStoreNameLoc,
-                J9SecurityManagerConstants.STOREPASS, passwrd,
-                J9SecurityManagerConstants.VALIDITY, validity };
-
-        return newKeyCmdArgs;
-    }
-
-    /*
-     * Generating the command to Open a Key Store and display its contents.
-     * 
-     */
-    private String[] generateOpenKeyStoreCmd(String keyStore, String storePasswd)
-            throws SignException {
-
-        String[] openKeyStoreCmdArgs = { getSecurityManagementTool(),
-                J9SecurityManagerConstants.LIST,
-                J9SecurityManagerConstants.STORETYPE, storeType,
-                J9SecurityManagerConstants.KEYSTORE, keyStore,
-                J9SecurityManagerConstants.STOREPASS, storePasswd };
-        return openKeyStoreCmdArgs;
-    }
-
-    /*
-     * Get the Security Management tool from pref store location.
-     * 
-     */
-    private final String getSecurityManagementTool() throws SignException {
-        String securityToolLocation = getToolLocation(null);
-
-        if (securityToolLocation == null
-                || securityToolLocation.length() <= 0
-                || securityToolLocation
-                        .equals(Messages.J9SecurityManager_Specify_directory_here)) {
-            String message = MessageFormat
-                    .format(
-                            Messages.J9SecurityManager_getSecurityManagerException,
-                            new Object[] {
-                                    getId(),
-                                    Messages.J9SecurityManager_Tool_not_configured_correctly,
-                                    Messages.J9SecurityManager_Using_Security_management_features });
-            throw new SignException(
-                    SignErrors
-                            .getErrorMessage(SignErrors.SECURITY_MANAGER_NOT_CONFIGURED)
-                            + "\n" + //$NON-NLS-1$
-                            message);
-        }
-
-        StringBuffer buffer = new StringBuffer("\"");
-        buffer.append(securityToolLocation).append(File.separator)
-                .append("bin") //$NON-NLS-1$						
-                .append(File.separator).append("keytool.exe") //$NON-NLS-1$
-                .append("\"");
-
-        return buffer.toString();
-    }
-
-    private Process runSecurityCmd(String[] cmd) throws SignException {
-
-        Process p = null;
-
-        try {
-            p = Runtime.getRuntime().exec(cmd);
-        } catch (Exception e) {
-            throw new SignException(SignErrors
-                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR));
-        }
-
-        if (p == null) {
-            StringBuffer str = new StringBuffer(""); //$NON-NLS-1$
-
-            for (int i = 0; i < cmd.length; i++) {
-                str.append(" " + cmd[i]); //$NON-NLS-1$
-            }
-
-            throw new SignException(SignErrors
-                    .getErrorMessage(SignErrors.GENERIC_SECURITY_ERROR)
-                    + Messages.J9SecurityManager_Could_not_execute
-                    + " [" + str + "]"); //$NON-NLS-1$ //$NON-NLS-2$
-        }
-
-        return p;
-    }
-
-}

Modified: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/internal/sign/smgmt/sun/PreferenceInitializer.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/internal/sign/smgmt/sun/PreferenceInitializer.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/internal/sign/smgmt/sun/PreferenceInitializer.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -29,5 +29,6 @@
         store.setDefault(SunSmgmtConstants.SECURITY_TOOL_LOCATION,
                 Messages.PreferenceInitializer_set_location_message);
     }
+    
 
 }

Modified: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/internal/sign/smgmt/sun/SunSmgmtConstants.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/internal/sign/smgmt/sun/SunSmgmtConstants.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/internal/sign/smgmt/sun/SunSmgmtConstants.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -18,17 +18,13 @@
 public interface SunSmgmtConstants {
 
 	public static String SECURITY_TOOL_LOCATION = "SecurityToolLocationPreference"; //$NON-NLS-1$
-    
-	// constants
-	public static final String COMMA_AND_SPACE	= ", "; //$NON-NLS-1$
-	public static final String QUOTE 			= "\""; //$NON-NLS-1$
 
 	// keytool primary command options
-	public static final String GENERATE_KEY 	= "-genkey"; //$NON-NLS-1$
-	public static final String DELETE_KEY 		= "-delete"; //$NON-NLS-1$
-	public static final String IMPORT_CERT 		= "-import"; //$NON-NLS-1$
-	public static final String GENERATE_CSR 	= "-export"; //$NON-NLS-1$
-	public static final String LIST 			= "-list"; //$NON-NLS-1$
+	public static final String GENERATE_KEY 	   = "-genkey"; //$NON-NLS-1$
+	public static final String DELETE_KEY 		   = "-delete"; //$NON-NLS-1$
+	public static final String IMPORT_CERT 		   = "-import"; //$NON-NLS-1$
+	public static final String GENERATE_CSR 	   = "-export"; //$NON-NLS-1$
+	public static final String LIST 			   = "-list"; //$NON-NLS-1$
 	public static final String CHANGE_STORE_PASSWD = "-storepasswd"; //$NON-NLS-1$
 	
 	// keytool secondary command options
@@ -48,10 +44,5 @@
 	public static final String NOPROMPT 		= "-noprompt"; //$NON-NLS-1$
 
     // Dname prefix options
-	public static final String COMMON_NAME_PREFIX 		= "CN="; //$NON-NLS-1$
-	public static final String ORGANIZATION_UNIT_PREFIX = "OU="; //$NON-NLS-1$
-	public static final String ORGANIZATION_NAME_PREFIX = "O="; //$NON-NLS-1$
-	public static final String LOCALITY_NAME_PREFIX 	= "L="; //$NON-NLS-1$
-	public static final String STATE_NAME_PREFIX 		= "S="; //$NON-NLS-1$
-	public static final String COUNTRY_PREFIX 			= "C="; //$NON-NLS-1$
+
 }

Modified: trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/sign/smgmt/sun/SunSecurityManagement.java
===================================================================
--- trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/sign/smgmt/sun/SunSecurityManagement.java	2009-08-25 17:50:20 UTC (rev 1448)
+++ trunk/plugins/org.eclipse.mtj.tfm.sign.smgmt.sun/src/org/eclipse/mtj/tfm/sign/smgmt/sun/SunSecurityManagement.java	2009-08-26 01:36:23 UTC (rev 1449)
@@ -28,15 +28,16 @@
 import org.eclipse.mtj.tfm.sign.core.SignErrors;
 import org.eclipse.mtj.tfm.sign.core.enumerations.ExtensionType;
 import org.eclipse.mtj.tfm.sign.core.exception.SignException;
-import org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement;
-import org.eclipse.mtj.tfm.sign.core.extension.SignExtensionImpl;
+import org.eclipse.mtj.tfm.sign.core.extension.ExtensionImpl;
+import org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement;
+import org.eclipse.mtj.tfm.sign.core.extension.security.X500DName;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.Version;
 
 /**
  * @since 1.0
  */
-public class SunSecurityManagement extends SignExtensionImpl implements
+public class SunSecurityManagement extends ExtensionImpl implements
         ISecurityManagement {
 
     /**
@@ -51,7 +52,7 @@
     private String aliaskey = null;
 
     /** The certificate will be valid for 365 days. */
-    private String ksCertfvalidity = "365"; //$NON-NLS-1$
+    private String ksCertfValidity = "365"; //$NON-NLS-1$
 
     /** The keystore location in the file system. */
     private String ksLocation = ""; //$NON-NLS-1$
@@ -91,7 +92,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#changeStorePassword(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#changeStorePassword(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
      */
     public boolean changeStorePassword(String newStorePass, String storePass,
             IProgressMonitor monitor) throws SignException {
@@ -128,8 +129,11 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#createNewKey(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#createNewKey(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
      */
+    /* (non-Javadoc)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#createNewKey(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     */
     public boolean createNewKey(String alias, String commonName,
             String orgUnit, String orgName, String localityName,
             String stateName, String country, IProgressMonitor monitor)
@@ -140,8 +144,8 @@
 
         boolean cmdSuccessful = true;
 
-        String Dname = generateDname(commonName, orgUnit, orgName,
-                localityName, stateName, country);
+        String Dname = new X500DName(commonName, orgUnit, orgName,
+                localityName, stateName, country).toString();
 
         String[] cmdArgs = generateNewKeyCmd(alias, Dname, "RSA", "SHA1withRSA"); //$NON-NLS-1$ //$NON-NLS-2$
 
@@ -193,7 +197,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#deleteKey(org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#deleteKey(org.eclipse.core.runtime.IProgressMonitor)
      */
     public boolean deleteKey(IProgressMonitor monitor) throws SignException {
 
@@ -229,7 +233,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#generateCSR(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#generateCSR(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
      */
     public boolean generateCSR(String certFile, IProgressMonitor monitor)
             throws SignException {
@@ -264,54 +268,15 @@
 
     }
 
-    /**
-     * Generating the <b>X.500 Distinguished Name</b> string using the given
-     * user input.<br>
-     * <b>Note:</b> If a distinguished name string value contains a comma, the
-     * comma must be escaped by a "\" character.
-     * 
-     * @param commonName common name of a person, e.g., "Susan Jones"
-     * @param organizationUnit small organization (e.g, department or division)
-     *            name, e.g., "Purchasing"
-     * @param orgName large organization name, e.g., "ABCSystems, Inc."
-     * @param localityName locality (city) name, e.g., "Palo Alto"
-     * @param stateName state or province name, e.g., "California"
-     * @param country state or province name, e.g., "California"
-     * @return the generated string in the following format:
-     * 
-     * <pre>
-     * "CN=<b><i>commonName</i></b>, OU=<b><i>organizationUnit</i></b>, O=<b><i>orgName</i></b>, L=<b><i>localityName</i></b>, S=<b><i>stateName</i></b>, C=<b><i>country</i></b>" 
-     * </pre>
-     * 
-     */
-    public String generateDname(String commonName, String organizationUnit,
-            String orgName, String localityName, String stateName,
-            String country) {
-        String Dname = SunSmgmtConstants.QUOTE
-                + SunSmgmtConstants.COMMON_NAME_PREFIX + commonName
-                + SunSmgmtConstants.COMMA_AND_SPACE
-                + SunSmgmtConstants.ORGANIZATION_UNIT_PREFIX + organizationUnit
-                + SunSmgmtConstants.COMMA_AND_SPACE
-                + SunSmgmtConstants.ORGANIZATION_NAME_PREFIX + orgName
-                + SunSmgmtConstants.COMMA_AND_SPACE
-                + SunSmgmtConstants.LOCALITY_NAME_PREFIX + localityName
-                + SunSmgmtConstants.COMMA_AND_SPACE
-                + SunSmgmtConstants.STATE_NAME_PREFIX + stateName
-                + SunSmgmtConstants.COMMA_AND_SPACE
-                + SunSmgmtConstants.COUNTRY_PREFIX + country
-                + SunSmgmtConstants.QUOTE;
-        return Dname;
-    }
-
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getAliaskey()
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getAliaskey()
      */
     public String getAliaskey() throws SignException {
         return aliaskey;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getCertificateInfo(org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getCertificateInfo(org.eclipse.core.runtime.IProgressMonitor)
      */
     public String getCertificateInfo(IProgressMonitor monitor)
             throws SignException {
@@ -357,28 +322,28 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getKeyStoreNameLoc()
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getKeyStoreNameLoc()
      */
     public String getKeyStoreNameLoc() throws SignException {
         return ksLocation;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getPassWrd()
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getPassWrd()
      */
     public String getPassWrd() throws SignException {
         return ksPasswrd;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getStoreType()
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getStoreType()
      */
     public String getStoreType() throws SignException {
         return ksType;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getToolLocation(org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getToolLocation(org.eclipse.core.runtime.IProgressMonitor)
      */
     public String getToolLocation(IProgressMonitor monitor)
             throws SignException {
@@ -387,14 +352,14 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#getValidity()
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#getValidity()
      */
     public String getValidity() throws SignException {
-        return ksCertfvalidity;
+        return ksCertfValidity;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#importSignedCert(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#importSignedCert(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
      */
     public boolean importSignedCert(String certFile, IProgressMonitor monitor)
             throws SignException {
@@ -430,7 +395,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#isKeyStoreSelected()
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#isKeyStoreSelected()
      */
     public boolean isKeyStoreSelected() throws SignException {
 
@@ -442,7 +407,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#openKeyStore(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#openKeyStore(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
      */
     public String[] openKeyStore(String keyStore, String storePass,
             IProgressMonitor monitor) throws SignException {
@@ -512,48 +477,48 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#resetValues()
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#resetValues()
      */
     public void resetValues() {
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#setAliaskey(java.lang.String)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setAliaskey(java.lang.String)
      */
     public void setAliaskey(String aliasKey) throws SignException {
         aliaskey = aliasKey;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#setKeyStoreNameLoc(java.lang.String)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setKeyStoreNameLoc(java.lang.String)
      */
     public void setKeyStoreNameLoc(String keyStoreNameLoc) throws SignException {
         this.ksLocation = keyStoreNameLoc;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#setPassWrd(java.lang.String)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setPassWrd(java.lang.String)
      */
     public void setPassWrd(String passWrd) throws SignException {
         ksPasswrd = passWrd;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#setStoreType(java.lang.String)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setStoreType(java.lang.String)
      */
     public void setStoreType(String storeType) throws SignException {
         this.ksType = storeType;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#setValidity(java.lang.String)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setValidity(java.lang.String)
      */
     public void setValidity(String validity) throws SignException {
-        this.ksCertfvalidity = validity;
+        this.ksCertfValidity = validity;
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#setValues(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#setValues(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
      */
     public void setValues(String loc, String alias, String psswd, String strtype)
             throws SignException {
@@ -566,7 +531,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.eclipse.mtj.tfm.sign.core.extension.ISecurityManagement#storeToolLocation(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     * @see org.eclipse.mtj.tfm.sign.core.extension.security.ISecurityManagement#storeToolLocation(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
      */
     public void storeToolLocation(String loc, IProgressMonitor monitor)
             throws SignException {
@@ -611,7 +576,7 @@
      *         <code>
      *         &lt;keytool Path&gt; -J-Dconsole.encoding=&lt;console character encoding&gt; 
      *         -delete -alias {@link #aliaskey} -storetype {@link #ksType} -keystore {@link #ksLocation} -storepass
-     *        <b>storePasswd</b></code>
+     *        {@link #ksPasswrd}</code>
      * @throws SignException in case fails to get the Security Management tool
      *             location in the file system.
      */
@@ -633,8 +598,9 @@
      * @return the generated command line string in the following format: <br>
      *         <code>
      *         &lt;keytool Path&gt; -J-Dconsole.encoding=&lt;console character encoding&gt; 
-     *         -list -alias {@link #aliaskey} -storetype {@link #ksType} -keystore {@link #ksLocation} -storepass
-     *        <b>storePasswd</b></code>
+     *         -list -alias {@link #aliaskey} -storetype {@link #ksType} 
+     *         -keystore {@link #ksLocation} -storepass
+     *        {@link #ksPasswrd}</code>
      * @throws SignException in case fails to get the Security Management tool
      *             location in the file system.
      */
@@ -658,8 +624,9 @@
      * @return the generated command line string in the following format: <br>
      *         <code>
      *         &lt;keytool Path&gt; -J-Dconsole.encoding=&lt;console character encoding&gt; 
-     *         -export -alias {@link #aliaskey} -file <b>certFile</b> -storetype {@link #ksType} -keystore {@link #ksLocation} -storepass
-     *        <b>storePasswd</b></code>
+     *         -export -alias {@link #aliaskey} -file <b>certFile</b> 
+     *         -storetype {@link #ksType} -keystore {@link #ksLocation} -storepass
+     *         {@link #ksPasswrd}</code>
      * @throws SignException in case fails to get the Security Management tool
      *             location in the file system.
      */
@@ -684,8 +651,9 @@
      * @return the generated command line string in the following format: <br>
      *         <code>
      *         &lt;keytool Path&gt; -J-Dconsole.encoding=&lt;console character encoding&gt; 
-     *         -import -noprompt -alias {@link #aliaskey} -keypass {@link #ksPasswrd} -file <b>certFile</b> -storetype {@link #ksType} -keystore {@link #ksLocation} -storepass
-     *        <b>storePasswd</b></code>
+     *         -import -noprompt -alias {@link #aliaskey} -keypass {@link #ksPasswrd} 
+     *         -file <b>certFile</b> -storetype {@link #ksType} -keystore {@link #ksLocation} 
+     *         -storepass {@link #ksPasswrd}</code>
      * @throws SignException in case fails to get the Security Management tool
      *             location in the file system.
      */
@@ -718,10 +686,11 @@
      *            with keyalg.
      * @return the generated command line string in the following format: <br>
      *         <code>
-     *         &lt;keytool Path&gt; -genkey -alias <b>alias</b> -dname <b>dname</b>
+     *         &lt;keytool Path&gt; -J-Dconsole.encoding=&lt;console character encoding&gt; 
+     *         -genkey -alias <b>alias</b> -dname <b>dname</b>
      *         -keypass {@link #ksPasswrd} -storetype {@link #ksType} -keyalg
      *         <b>keyAlg</b> -keystore {@link #ksLocation} -storepass
-     *         {@link #ksPasswrd} -validity {@link #ksCertfvalidity}</code>
+     *         {@link #ksPasswrd} -validity {@link #ksCertfValidity}</code>
      * @throws SignException in case fails to get the Security Management tool
      *             location in the file system.
      */
@@ -736,7 +705,7 @@
                 keyAlg, SunSmgmtConstants.SIGALG, sigAlg,
                 SunSmgmtConstants.KEYSTORE, ksLocation,
                 SunSmgmtConstants.STOREPASS, ksPasswrd,
-                SunSmgmtConstants.VALIDITY, ksCertfvalidity };
+                SunSmgmtConstants.VALIDITY, ksCertfValidity };
 
         return newKeyCmdArgs;
     }