}
protected Set<Subject> wrapSubjects(String subjectLoginId) {
logger.debug("wrapSubjectIdAsSubjects(): " + subjectLoginId);
StringAttribute stringAttribute = new StringAttribute("");
Attribute subjectAttribute =
new Attribute(Constants.XACML1_SUBJECT.ID.getURI(), null, null, stringAttribute);
logger.debug("wrapSubjectIdAsSubjects(): subjectAttribute, id="
+ subjectAttribute.getId() + ", type="
+ subjectAttribute.getType() + ", value="
+ subjectAttribute.getValue());
Set<Attribute> subjectAttributes = new HashSet<Attribute>();
subjectAttributes.add(subjectAttribute);
if (subjectLoginId != null && !"".equals(subjectLoginId)) {
stringAttribute = new StringAttribute(subjectLoginId);
subjectAttribute =
new Attribute(SUBJECT_ID_URI, null, null, stringAttribute);
logger.debug("wrapSubjectIdAsSubjects(): subjectAttribute, id="
+ subjectAttribute.getId() + ", type="
+ subjectAttribute.getType() + ", value="
+ subjectAttribute.getValue());
}
subjectAttributes.add(subjectAttribute);
Subject singleSubject = new Subject(subjectAttributes);
Set<Subject> subjects = new HashSet<Subject>();
subjects.add(singleSubject);