|
Mobile Tools for Java Release 1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.mtj.core.signing.SignatureProperties
public class SignatureProperties
This is a simple container class (bean) 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 persistence stuff.
Note: 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.
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.mtj.core.model.sign.ISignatureProperties |
|---|
PASSMETHOD_IN_KEYRING, PASSMETHOD_IN_PROJECT, PASSMETHOD_PROMPT, PROJECT_RELATIVE_PREFIX |
| Constructor Summary | |
|---|---|
SignatureProperties()
Standard constructor |
|
| Method Summary | |
|---|---|
void |
clear()
Resets the class to its default values |
void |
copy(ISignatureProperties other)
Indicates whether or not the project is to be signed. |
String |
getAbsoluteKeyStorePath(IProject project)
Returns the absolute file system path to the keystore file. |
String |
getKeyAlias()
Returns the "alias" string identifying the key and certificate that will be used to sign the project. |
String |
getKeyPassword()
Returns the key password, if passwords are being saved. |
String |
getKeyStoreDisplayPath()
Returns the display string representing the keystore path. |
String |
getKeyStorePassword()
Returns the password for the keystore file, if passwords are being saved. |
String |
getKeyStoreProvider()
Returns the crypto provider string. |
String |
getKeyStoreType()
Type of the keystore file. |
int |
getPasswordStorageMethod()
Returns the password storage method. |
boolean |
getSignProject()
Indicates whether or not the project is to be signed. |
boolean |
isKeyStorePathExternal()
Indicates whether the keystore path is external to the project or project-relative. |
void |
setKeyAlias(String strValue)
Sets the "alias" string identifying the key and certificate that will be used to sign the project. |
void |
setKeyPassword(String strValue)
Sets the key password, if passwords are being saved. |
void |
setKeyStoreDisplayPath(String path)
Sets the display string representing the keystore path. |
void |
setKeyStorePassword(String strValue)
Sets the password for the keystore file. |
void |
setKeyStoreProvider(String strValue)
Sets the crypto provider string. |
void |
setKeyStoreType(String strValue)
Type of the keystore file. |
void |
setPasswordStorageMethod(int nMethod)
Sets the password storage method. |
void |
setSignProject(boolean bValue)
Indicates whether or not the project is to be signed. |
static String |
toAbsolute(String path,
IProject project)
Converts a project-relative path into an absolute one, based on the location of the project containing the file. |
static String |
toRelative(String path)
Converts a basic project-relative path into the format that we recognize internally. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SignatureProperties()
| Method Detail |
|---|
public void copy(ISignatureProperties other)
copy in interface ISignaturePropertiesother - ISignatureProperties object to be copied.public void clear()
clear in interface ISignaturePropertiespublic boolean getSignProject()
getSignProject in interface ISignaturePropertiestrue if the project is to be signed,
false otherwiseISignatureProperties.setSignProject(boolean)public void setSignProject(boolean bValue)
setSignProject in interface ISignaturePropertiesbValue - true if the project is to be signed,
false otherwise.ISignatureProperties.getSignProject()public int getPasswordStorageMethod()
getPasswordStorageMethod in interface ISignaturePropertiesPASSMETHOD_PROMPT,
PASSMETHOD_IN_KEYRING or
PASSMETHOD_IN_PROJECT.ISignatureProperties.setPasswordStorageMethod(int),
ISignatureProperties.PASSMETHOD_IN_KEYRING,
ISignatureProperties.PASSMETHOD_IN_PROJECT,
ISignatureProperties.PASSMETHOD_PROMPTpublic void setPasswordStorageMethod(int nMethod)
setPasswordStorageMethod in interface ISignaturePropertiesnMethod - One of PASSMETHOD_PROMPT,
PASSMETHOD_IN_KEYRING orISignatureProperties.getPasswordStorageMethod(),
ISignatureProperties.PASSMETHOD_IN_KEYRING,
ISignatureProperties.PASSMETHOD_IN_PROJECT,
ISignatureProperties.PASSMETHOD_PROMPTpublic String getKeyStoreType()
null indicates the system
standard type. This string is passed to KeyStore.getInstance
as part of loading the keystore.
getKeyStoreType in interface ISignaturePropertiesString indicating keystore file type.KeyStore.getInstance(java.lang.String),
KeyStore.getInstance(java.lang.String,
java.lang.String)public void setKeyStoreType(String strValue)
null indicates the system
standard type. This string is passed to KeyStore.getInstance
as part of loading the keystore.
setKeyStoreType in interface ISignaturePropertiesstrValue - KeyStore type string, or null to use the
system default type.KeyStore.getInstance(java.lang.String),
KeyStore.getInstance(java.lang.String,
java.lang.String)public String getKeyStoreProvider()
null indicates the
system standard type. This string is passed to
KeyStore.getInstance as part of loading the keystore.
getKeyStoreProvider in interface ISignaturePropertiesnull to use the
system default provider.KeyStore.getInstance(java.lang.String,
java.lang.String)public void setKeyStoreProvider(String strValue)
null indicates the system
standard type.
setKeyStoreProvider in interface ISignaturePropertiesstrValue - KeyStore provider string, or null to use
the system default provider.KeyStore.getInstance(java.lang.String,
java.lang.String)public String getKeyStorePassword()
getKeyStorePassword in interface ISignaturePropertiesString containing keystore password.ISignatureProperties.setKeyStorePassword(String)public void setKeyStorePassword(String strValue)
setKeyStorePassword in interface ISignaturePropertiesstrValue - String containing keystore password.ISignatureProperties.getKeyStorePassword()public String getKeyAlias()
getKeyAlias in interface ISignaturePropertiesString containing the alias identifying the key
and certificate.ISignatureProperties.setKeyAlias(String)public void setKeyAlias(String strValue)
setKeyAlias in interface ISignaturePropertiesstrValue - String containing the alias identifying
the key and certificate.ISignatureProperties.getKeyAlias()public String getKeyPassword()
null if passwords are not being saved.
getKeyPassword in interface ISignaturePropertiesString containing the key password.ISignatureProperties.setKeyPassword(String)public void setKeyPassword(String strValue)
setKeyPassword in interface ISignaturePropertiesstrValue - String containing the key password.ISignatureProperties.getKeyPassword()public String getKeyStoreDisplayPath()
$/[Folder[/Folder...]]filename". Absolute
paths have OS-dependent form.
getKeyStoreDisplayPath in interface ISignaturePropertiesString containing displayed path.isKeyStorePathExternal()public void setKeyStoreDisplayPath(String path)
setKeyStoreDisplayPath in interface ISignaturePropertiespath - String containing displayed path.getKeyStoreDisplayPath()
public String getAbsoluteKeyStorePath(IProject project)
throws CoreException
project instance is used to convert a project-relative
path to an absolute path.
getAbsoluteKeyStorePath in interface ISignaturePropertiesproject - IProject to which this
ISignatureProperties belongs.
String containing absolute path to keystore file.
CoreExceptionISignatureProperties.setKeyStoreDisplayPath(String)public boolean isKeyStorePathExternal()
isKeyStorePathExternal in interface ISignaturePropertiestrue if the keystore path is external to the
project, false if it's relative to the current
project.ISignatureProperties.setKeyStoreDisplayPath(String)
public static String toAbsolute(String path,
IProject project)
throws CoreException
path - Relative path to be converted.project - IProject instance containing the relative
path.
String containing the absolute path to the file.
CoreExceptionpublic static String toRelative(String path)
path - String containing the path to be converted.
String with the converted value.
|
Mobile Tools for Java Release 1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||