⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isignatureproperties.java

📁 eclipseme的最新版本的source,欢迎j2me程序员使用
💻 JAVA
字号:
/*  
 ********************************************************************
 * 
 *	File    	:   ISignatureProperties.java
 *  Package     :   eclipseme.core.model.impl
 *	System      :   eclipseme.core
 *	Author      :   Kevin Hunter
 *	Description :   This interface models the container class designed
 *					to hold the various project-specific properties
 *					relating to potential signing operations. 
 *	                
 * Copyright (c) 2004 Kevin Hunter
 * All Rights Reserved.
 * Licensed under the Eclipse Public License - v 1.0
 * For more information see http://www.eclipse.org/legal/epl-v10.html
 *
 *  CVS
 *	$$Source: /cvsroot/eclipseme/eclipseme.core/src/eclipseme/core/model/ISignatureProperties.java,v $$
 *	$$Author: setera $$
 *	$$Date: 2006/11/12 01:11:01 $$
 *	$$Revision: 1.7 $$
 *
 ********************************************************************
 */

package eclipseme.core.model;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;

/**
 * Classes implementing this interface are designed
 * to hold the various project-specific properties
 * relating to potential signing operations.
 * It is used by the dialog class that allows the
 * user to manipulate the settings, as well as
 * the project properties persistance stuff.
 * <p>
 * <b>Note:</b> This class/interface is part of an interim API that is still 
 * under development and expected to change before reaching stability. It is 
 * being made available at this early stage to solicit feedback from pioneering 
 * adopters on the understanding that any code that uses this API will almost
 * certainly be broken as the API evolves.
 * </p>
 */
public interface ISignatureProperties
{
	/**
	 * Password storage method indicating passwords should be requested as required
	 * and not stored.
	 * 
	 * @see #getPasswordStorageMethod()
	 * @see #setPasswordStorageMethod(int)
	 */
	public static final int PASSMETHOD_PROMPT = 0;
	/**
	 * Password storage method indicating passwords should be stored in the user's
	 * Eclipse keyring
	 * 
	 * @see #getPasswordStorageMethod()
	 * @see #setPasswordStorageMethod(int)
	 */
	public static final int PASSMETHOD_IN_KEYRING = 1;
	/**
	 * Password storage method indicating passwords should be stored in the
	 * .eclipseme metadata file in the project.
	 * 
	 * @see #getPasswordStorageMethod()
	 * @see #setPasswordStorageMethod(int)
	 */
	public static final int PASSMETHOD_IN_PROJECT = 2;
	
	/**
	 * String used to prefix project-relative paths in display strings.
	 * A display string that starts with this prefix will be considered
	 * project-relative.  Display strings that do not start with this
	 * prefix will be considered absolute.
	 * 
	 * @see #setKeyStoreDisplayPath(String)
	 */
	public static final String PROJECT_RELATIVE_PREFIX = "$/";
	
	/**
	 * Copy the values from another instance.
	 * 
	 * @param other	<code>ISignatureProperties</code> object to be copied.
	 */
	public void copy(ISignatureProperties other);

	/**
	 * Resets the class to its default values
	 *
	 */
	public void clear();

	/**
	 * Indicates whether or not the project is to be signed.
	 * 
	 * @return	<code>true</code> if the project is to be signed, <code>false</code> otherwise
	 * 
	 * @see #setSignProject(boolean)
	 */
	public boolean getSignProject();

	/**
	 * Indicates whether or not the project is to be signed.
	 * 
	 * @param bValue	<code>true</code> if the project is to be signed, 
	 * 					<code>false</code> otherwise.
	 * @see #getSignProject()
	 */
	public void setSignProject(boolean bValue);

	/**
	 * Returns the password storage method.
	 * 
	 * @return	One of <code>PASSMETHOD_PROMPT</code>, <code>PASSMETHOD_IN_KEYRING</code> or
	 * 			<code>PASSMETHOD_IN_PROJECT</code>.
	 * 
	 * @see #setPasswordStorageMethod(int)
	 * @see #PASSMETHOD_IN_KEYRING
	 * @see #PASSMETHOD_IN_PROJECT
	 * @see #PASSMETHOD_PROMPT
	 */
	public int getPasswordStorageMethod();
	
	/**
	 * Sets the password storage method.
	 * 
	 * @param nMethod	One of <code>PASSMETHOD_PROMPT</code>, 
	 * 					<code>PASSMETHOD_IN_KEYRING</code> or
	 * 					<code>PASSMETHOD_IN_PROJECT</code>.
	 * 
	 * @see #getPasswordStorageMethod()
	 * @see #PASSMETHOD_IN_KEYRING
	 * @see #PASSMETHOD_IN_PROJECT
	 * @see #PASSMETHOD_PROMPT
	 */
	public void setPasswordStorageMethod(int nMethod);

	/**
	 * Type of the keystore file.  <code>null</code> indicates
	 * the system standard type.  This string is passed to
	 * <code>KeyStore.getInstance</code> as part of loading the
	 * keystore.
	 * 
	 * @return	<code>String</code> indicating keystore file type.
	 * 
	 * @see #setKeyStoreType(String)
	 * @see java.security.KeyStore#getInstance(java.lang.String)
	 * @see java.security.KeyStore#getInstance(java.lang.String, java.lang.String)
	 */
	public String getKeyStoreType();

	/**
	 * Type of the keystore file.  <code>null</code> indicates
	 * the system standard type.  This string is passed to
	 * <code>KeyStore.getInstance</code> as part of loading the
	 * keystore.
	 * 
	 * @param strValue	KeyStore type string, or <code>null</code> to
	 * 					use the system default type.
	 * 
	 * @see #getKeyStoreType()
	 * @see java.security.KeyStore#getInstance(java.lang.String)
	 * @see java.security.KeyStore#getInstance(java.lang.String, java.lang.String)
	 */
	public void setKeyStoreType(String strValue);

	/**
	 * Returns the crypto provider string.  <code>null</code> indicates the system
	 * standard type.  This string is passed to
	 * <code>KeyStore.getInstance</code> as part of loading the
	 * keystore.
	 * 
	 * @return	KeyStore provider string, or <code>null</code> to use
	 * 			the system default provider.
	 * 
	 * @see #setKeyStoreProvider(String)
	 * @see java.security.KeyStore#getInstance(java.lang.String, java.lang.String)
	 */
	public String getKeyStoreProvider();

	/**
	 * Sets the crypto provider string.  <code>null</code> indicates the system
	 * standard type.
	 * 
	 * @param strValue	KeyStore provider string, or <code>null</code> to use
	 * 					the system default provider.
	 * 
	 * @see #getKeyStoreProvider()
	 * @see java.security.KeyStore#getInstance(java.lang.String, java.lang.String)
	 */
	public void setKeyStoreProvider(String strValue);

	/**
	 * Returns the password for the keystore file, if passwords are being saved.
	 * 
	 * @return	<code>String</code> containing keystore password.
	 * @see #setKeyStorePassword(String)
	 */
	public String getKeyStorePassword();

	/**
	 * Sets the password for the keystore file.
	 * 
	 * @param strValue	<code>String</code> containing keystore password.
	 * @see #getKeyStorePassword()
	 */
	public void setKeyStorePassword(String strValue);

	/**
	 * Returns the "alias" string identifying the key and certificate that will be used
	 * to sign the project.
	 * 
	 * @return	<code>String</code> containing the alias identifying the key
	 * 			and certificate.
	 * @see #setKeyAlias(String)
	 */
	public String getKeyAlias();

	/**
	 * Sets the "alias" string identifying the key and certificate that will be used
	 * to sign the project.
	 * 
	 * @param strValue	<code>String</code> containing the alias identifying the key
	 * 					and certificate.
	 * @see #getKeyAlias()
	 */
	public void setKeyAlias(String strValue);

	/**
	 * Returns the key password, if passwords are being saved.  
	 * Will return <code>null</code>
	 * if passwords are not being saved.
	 * 
	 * @return	<code>String</code> containing the key password.
	 * @see #setKeyPassword(String)
	 */
	public String getKeyPassword();

	/**
	 * Sets the key password, if passwords are being saved.  Ignored if passwords
	 * are not being saved.
	 * 
	 * @param strValue	<code>String</code> containing the key password.
	 * @see #getKeyPassword()
	 */
	public void setKeyPassword(String strValue);
	
	/**
	 * Returns the display string representing the
	 * keystore path.  This may be an absolute path, or it may
	 * be a project-relative path.  Relative paths are of the
	 * form "<code>$/[Folder[/Folder...]]filename</code>".
	 * Absolute paths have OS-dependent form.
	 * 
	 * @return	<code>String</code> containing displayed path.
	 * 
	 * @see #setKeyStoreDisplayPath(String)
	 * @see #isKeyStorePathExternal()
	 */
	public String getKeyStoreDisplayPath();

	/**
	 * Sets the display string representing the
	 * keystore path.  This may be an absolute path, or it may
	 * be a project-relative path.
	 * 
	 * @param path 	<code>String</code> containing displayed path.
	 * 
	 * @see #getKeyStoreDisplayPath()
	 */
	public void setKeyStoreDisplayPath(String path);

	/**
	 * Returns the absolute file system path to the
	 * keystore file.  The specified <code>project</code> instance
	 * is used to convert a project-relative path to an absolute
	 * path. 
	 * 
	 * @param project	<code>IProject</code> to which this 
	 * 					<code>ISignatureProperties</code> belongs.
	 * @return	<code>String</code> containing absolute path to
	 * 			keystore file.
	 * 
	 * @see #setKeyStoreDisplayPath(String)
	 */
	public String getAbsoluteKeyStorePath(IProject project) throws CoreException;
	
	/**
	 * Indicates whether the keystore path is external to the project
	 * or project-relative.
	 * 
	 * @return <code>true</code> if the keystore path is external
	 * 			to the project, <code>false</code> if it's relative
	 * 			to the current project.
	 * @see #setKeyStoreDisplayPath(String)
	 */
	public boolean isKeyStorePathExternal();
}

/*
 ********************************************************************
 *	CVS History:
 *	$$Log: ISignatureProperties.java,v $
 *	$Revision 1.7  2006/11/12 01:11:01  setera
 *	$Merging the preprocessor functionality back to the mainline
 *	$
 *	$Revision 1.6.4.1  2006/09/14 00:49:10  setera
 *	$More preprocessing work via file system
 *	$
 *	$Revision 1.6  2004/12/17 01:33:35  setera
 *	$Documentation updates for the 0.7.0
 *	$
 *	$Revision 1.5  2004/12/16 13:12:05  kdhunter
 *	$Removed two unnecessary routines
 *	$JavaDoc updates
 *	$
 *	$Revision 1.4  2004/12/12 20:21:30  kdhunter
 *	$Support for storing passwords in keyring
 *	$
 *	$Revision 1.3  2004/12/09 01:21:29  kdhunter
 *	$Mods to support two different buttons for "external"
 *	$or "internal" keystore files
 *	$
 *	$Revision 1.2  2004/12/07 01:11:03  kdhunter
 *	$Changes to allow project-relative or absolute
 *	$keystore paths
 *	$
 *	$Revision 1.1  2004/11/26 21:35:55  kdhunter
 *	$Extracted from SignatureProperties class
 *	$$
 *
 ********************************************************************
 */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -