use of com.sun.identity.liberty.ws.disco.jaxb11.SendSingleLogOutElement in project OpenAM by OpenRock.
the class SMDiscoveryServiceData method getDirectiveEntry.
/**
* Returns map of directive entries.
*
* @return map of directive entries.
*/
public static Map getDirectiveEntry(DiscoEntryElement entry) {
Map map = Collections.EMPTY_MAP;
List directiveList = entry.getAny();
if ((directiveList != null) && !directiveList.isEmpty()) {
map = new HashMap(directiveList.size() * 2);
for (Iterator iter = directiveList.iterator(); iter.hasNext(); ) {
Object obj = iter.next();
;
if (obj instanceof AuthenticateRequesterElement) {
AuthenticateRequesterElement dType = (AuthenticateRequesterElement) obj;
setDirectiveData(dType, map, DiscoConstants.AUTHN_DIRECTIVE);
} else if (obj instanceof EncryptResourceIDElement) {
EncryptResourceIDElement dType = (EncryptResourceIDElement) obj;
setDirectiveData(dType, map, DiscoConstants.ENCRYPT_DIRECTIVE);
} else if (obj instanceof AuthenticateSessionContextElement) {
AuthenticateSessionContextElement dType = (AuthenticateSessionContextElement) obj;
setDirectiveData(dType, map, DiscoConstants.SESSION_DIRECTIVE);
} else if (obj instanceof AuthorizeRequesterElement) {
AuthorizeRequesterElement dType = (AuthorizeRequesterElement) obj;
setDirectiveData(dType, map, DiscoConstants.AUTHZ_DIRECTIVE);
} else if (obj instanceof GenerateBearerTokenElement) {
GenerateBearerTokenElement dType = (GenerateBearerTokenElement) obj;
setDirectiveData(dType, map, DiscoConstants.BEARER_DIRECTIVE);
} else if (obj instanceof SendSingleLogOutElement) {
SendSingleLogOutElement dType = (SendSingleLogOutElement) obj;
setDirectiveData(dType, map, DiscoConstants.LOGOUT_DIRECTIVE);
} else {
debug.error("unsupported directive type");
}
}
}
return map;
}
use of com.sun.identity.liberty.ws.disco.jaxb11.SendSingleLogOutElement in project OpenAM by OpenRock.
the class SMDiscoEntryData method createDirectivesEntry.
private void createDirectivesEntry(DiscoEntryElement de, List descriptionTypeList) throws JAXBException, AMConsoleException {
if ((directives != null) && !directives.isEmpty()) {
Set set = directives.keySet();
for (Iterator iter = set.iterator(); iter.hasNext(); ) {
String dName = (String) iter.next();
List idRefs = (List) directives.get(dName);
if (dName.equals(DiscoConstants.AUTHN_DIRECTIVE)) {
AuthenticateRequesterElement authenticateRequester = discoFac.createAuthenticateRequesterElement();
createDirectiveEntry(de, authenticateRequester, idRefs, descriptionTypeList);
} else if (dName.equals(DiscoConstants.ENCRYPT_DIRECTIVE)) {
EncryptResourceIDElement encryptResourceId = discoFac.createEncryptResourceIDElement();
createDirectiveEntry(de, encryptResourceId, idRefs, descriptionTypeList);
} else if (dName.equals(DiscoConstants.SESSION_DIRECTIVE)) {
AuthenticateSessionContextElement authSessionCntx = discoFac.createAuthenticateSessionContextElement();
createDirectiveEntry(de, authSessionCntx, idRefs, descriptionTypeList);
} else if (dName.equals(DiscoConstants.AUTHZ_DIRECTIVE)) {
AuthorizeRequesterElement authorizeRequester = discoFac.createAuthorizeRequesterElement();
createDirectiveEntry(de, authorizeRequester, idRefs, descriptionTypeList);
} else if (dName.equals(DiscoConstants.BEARER_DIRECTIVE)) {
GenerateBearerTokenElement bearer = disco11Fac.createGenerateBearerTokenElement();
createDirectiveEntry(de, bearer, idRefs, descriptionTypeList);
} else if (dName.equals(DiscoConstants.LOGOUT_DIRECTIVE)) {
SendSingleLogOutElement logout = disco11Fac.createSendSingleLogOutElement();
createDirectiveEntry(de, logout, idRefs, descriptionTypeList);
}
}
}
}
Aggregations