*/
@SuppressWarnings("unchecked")
private void augmentConfiguration(int requiredState, boolean modifyReceiverSettings, CallbackHandler handler, boolean debugON,
String signAlias, String encryptAlias) throws PolicyGenerationException {
MessagePolicy mPolicy = null;
DeclarativeSecurityConfiguration dConfiguration = (DeclarativeSecurityConfiguration) _policy;
boolean senderConfiguration = false;
if (requiredState == EMPTY_POLICY_STATE) {
if (modifyReceiverSettings) {
mPolicy = dConfiguration.receiverSettings();
mPolicy.removeAll();
} else {
mPolicy = dConfiguration.senderSettings();
mPolicy.removeAll();
}
if (debugON) {
mPolicy.dumpMessages(true);
}
return;
}
if (modifyReceiverSettings) {
mPolicy = dConfiguration.receiverSettings();
} else {
mPolicy = dConfiguration.senderSettings();
senderConfiguration = !senderConfiguration;
}
Collection newMPolicy = null;
WSSPolicy ts = getTimestampPolicy(mPolicy, handler, senderConfiguration);
boolean requireTimestampPolicy = false;