use of com.iplanet.services.cdm.clientschema.AMClientCapData in project OpenAM by OpenRock.
the class MAPCreateDeviceModelImpl method getReqAttributeSchemas.
private Set getReqAttributeSchemas() {
Set required = null;
AMClientCapData ccd = getClientCapDataExtInstance();
if (ccd != null) {
Set names = AMClientCapData.getSchemaElements();
if ((names != null) && !names.isEmpty()) {
required = getAttributeSchemas(names);
for (Iterator iter = required.iterator(); iter.hasNext(); ) {
AttributeSchema as = (AttributeSchema) iter.next();
String any = as.getAny();
if ((any == null) || (any.indexOf(AMAdminConstants.REQUIRED_ATTRIBUTE) == -1)) {
iter.remove();
}
}
}
}
return (required == null) ? Collections.EMPTY_SET : required;
}
use of com.iplanet.services.cdm.clientschema.AMClientCapData in project OpenAM by OpenRock.
the class MAPCreateDeviceModelImpl method getCloningProperties.
private Map getCloningProperties(String clientType) {
AMClientCapData ccd = getClientCapDataIntInstance();
Map iMap = ccd.getProperties(clientType);
AMClientCapData eCD = getClientCapDataExtInstance();
Map eMap = eCD.getProperties(clientType);
Map merged = null;
if (iMap != null) {
merged = iMap;
if (eMap != null) {
merged.putAll(eMap);
}
} else if (eMap != null) {
merged = eMap;
}
return merged;
}
use of com.iplanet.services.cdm.clientschema.AMClientCapData in project OpenAM by OpenRock.
the class MAPDeviceProfileModelImpl method getAttributeNames.
private Set getAttributeNames(String clientType, String classification) {
Set names = null;
AMClientCapData ccd = getClientCapDataInstance(clientType);
if (ccd != null) {
names = ccd.getPropertyNames(classification);
}
return (names == null) ? Collections.EMPTY_SET : names;
}
use of com.iplanet.services.cdm.clientschema.AMClientCapData in project OpenAM by OpenRock.
the class MAPModelBase method getDeviceUserAgent.
/**
* Returns device user agent of a client.
*
* @param clientType Client Type.
* @return device user agent of a client.
*/
public String getDeviceUserAgent(String clientType) {
String value = null;
AMClientCapData ccd = getClientCapDataInstance(clientType);
Map map = ccd.getProperties(clientType);
if (map != null) {
value = (String) AMAdminUtils.getValue((Set) map.get(ATTRIBUTE_NAME_USER_AGENT));
}
return value;
}
use of com.iplanet.services.cdm.clientschema.AMClientCapData in project OpenAM by OpenRock.
the class MAPCreateDeviceModelImpl method getAttributeSchema.
private AttributeSchema getAttributeSchema(String name) {
AttributeSchema as = null;
AMClientCapData internalInstance = getClientCapDataIntInstance();
AMClientCapData externalInstance = getClientCapDataExtInstance();
if ((internalInstance != null) && (externalInstance != null)) {
as = internalInstance.getAttributeSchema(name);
if (as == null) {
as = externalInstance.getAttributeSchema(name);
}
if (as != null) {
String i18nKey = as.getI18NKey();
if ((i18nKey == null) || (i18nKey.length() == 0)) {
as = null;
}
}
}
return as;
}
Aggregations