*/
public KeyStoreActor(CompositeEntity container, String name)
throws IllegalActionException, NameDuplicationException {
super(container, name);
alias = new StringParameter(this, "alias");
alias.setExpression("claudius");
createFileOrURLIfNecessary = new Parameter(this,
"createFileOrURLIfNecessary");
createFileOrURLIfNecessary.setExpression("true");
createFileOrURLIfNecessary.setTypeEquals(BaseType.BOOLEAN);
fileOrURL = new FileParameter(this, "fileOrURL");
// To create the initial default KeyStore, do
// cd $PTII; make ptKeystore
// or set createFileOrURLIfNecessary to true.
fileOrURL.setExpression("$PTII/ptKeystore");
keyPassword = new PortParameter(this, "keyPassword");
keyPassword.setTypeEquals(BaseType.STRING);
keyPassword.setStringMode(true);
keyPassword.setExpression("this.is.the.keyPassword,change.it");
// Add the possible keystore types.
keyStoreType = new StringParameter(this, "keyStoreType");
keyStoreType.setExpression(KeyStore.getDefaultType());
Iterator keyStoreTypes = Security.getAlgorithms("KeyStore").iterator();
while (keyStoreTypes.hasNext()) {
String keyStoreName = (String) keyStoreTypes.next();
keyStoreType.addChoice(keyStoreName);
}
// Add the possible provider choices.
provider = new StringParameter(this, "provider");
provider.setExpression("SystemDefault");
provider.addChoice("SystemDefault");
Provider[] providers = Security.getProviders();