pattern.setGroupId("security-credentialstoreref-groupid");
pattern.setModule("security-credentialstoreref-module");
pattern.setType("security-credentialstoreref-type");
pattern.setVersion("security-credentialstoreref-version");
security.setCredentialStoreRef(pattern);
SubjectInfo subject = securityFactory.createSubjectInfo();
subject.setId("security-subjectinfo-id");
subject.setRealm("security-subjectinfo-realm");
Description description = securityFactory.createDescription();
description.setValue("security-subjectinfo-description");
subject.getDescription().add(description);
security.setDefaultSubject(subject);
RoleMappings roleMappings = securityFactory.createRoleMappings();
Role role = securityFactory.createRole();
role.setRoleName("security-role");
SubjectInfo subjectInfo = securityFactory.createSubjectInfo();
subjectInfo.setId("security-role-subjectinfo-id");
subjectInfo.setRealm("security-role-subjectinfo-realm");
description = securityFactory.createDescription();
description.setValue("security-role-subjectinfo-description");
subjectInfo.getDescription().add(description);
role.setRunAsSubject(subjectInfo);
description = securityFactory.createDescription();
description.setValue("security-role-description");
role.getDescription().add(description);
DistinguishedName distinguishedName = securityFactory.createDistinguishedName();