/**
* @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
*/
@Override
public Map<String, String> unmarshal(PermissionDetailList v) throws Exception {
if (v != null) {
NormalizedStringAdapter normalizedStringAdapter = new NormalizedStringAdapter();
Map<String, String> map = new HashMap<String, String>();
for (MapStringStringAdapter.StringMapEntry stringMapEntry : v.getPermissionDetails()) {
String tempKey = normalizedStringAdapter.unmarshal(stringMapEntry.getKey());
if (StringUtils.isBlank(tempKey)) {
throw new UnmarshalException("Cannot create a permission detail entry with a blank key");
} else if (map.containsKey(tempKey)) {
throw new UnmarshalException("Cannot create more than one permission detail entry with a key of \"" + tempKey + "\"");
}
map.put(tempKey, normalizedStringAdapter.unmarshal(stringMapEntry.getValue()));
}
}
return null;
}
PermissionDetailListAdapter.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:kc-rice
作者:
评论列表
文章目录