java类javax.xml.bind.annotation.adapters.NormalizedStringAdapter的实例源码

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

        if (StringUtils.isBlank(v.getName())) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with a blank name");
        } else if (StringUtils.isBlank(v.getNamespaceCode())) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with a blank namespace code");
        } if (CoreServiceApiServiceLocator.getNamespaceService().getNamespace(v.getNamespaceCode()) == null) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with invalid or unknown namespace \"" +
                    v.getNamespaceCode() + "\"");
        }

        v.setName(new NormalizedStringAdapter().unmarshal(v.getName()));
        v.setNamespaceCode(v.getNamespaceCode());
    }
    return v;
}
NameAndNamespacePairValidatingAdapter.java 文件源码 项目:kc-rice 阅读 22 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object)
 */
@Override
public NameAndNamespacePair marshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        if (StringUtils.isBlank(v.getName())) {
            throw new MarshalException("Cannot export a name-and-namespace pair with a blank name");
        } else if (StringUtils.isBlank(v.getNamespaceCode())) {
            throw new MarshalException("Cannot export a name-and-namespace pair with a blank namespace code");
        } else if (CoreServiceApiServiceLocator.getNamespaceService().getNamespace(v.getNamespaceCode()) == null) {
            throw new MarshalException("Cannot export a name-and-namespace pair with invalid or unknown namespace \"" + v.getNamespaceCode() + "\"");
        }

        v.setName(new NormalizedStringAdapter().marshal(v.getName()));
        v.setNamespaceCode(v.getNamespaceCode());
    }
    return v;
}
QualificationListAdapter.java 文件源码 项目:OLE-INST 阅读 23 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public Map<String, String> unmarshal(QualificationList v) throws Exception {
    if (v != null) {
        NormalizedStringAdapter normalizedStringAdapter = new NormalizedStringAdapter();
        Map<String, String> map = new HashMap<String, String>();
        for (MapStringStringAdapter.StringMapEntry stringMapEntry : v.getQualifications()) {
            String tempKey = normalizedStringAdapter.unmarshal(stringMapEntry.getKey());
            if (StringUtils.isBlank(tempKey)) {
                throw new UnmarshalException("Cannot create a qualification entry with a blank key");
            } else if (map.containsKey(tempKey)) {
                throw new UnmarshalException("Cannot create more than one qualification entry with a key of \"" + tempKey + "\"");
            }
            map.put(tempKey, normalizedStringAdapter.unmarshal(stringMapEntry.getValue()));
        }
    }
    return null;
}
PermissionDetailListAdapter.java 文件源码 项目:OLE-INST 阅读 25 收藏 0 点赞 0 评论 0
/**
 * @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;
}
NameAndNamespacePairValidatingAdapter.java 文件源码 项目:OLE-INST 阅读 19 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public NameAndNamespacePair unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {

        if (StringUtils.isBlank(v.getName())) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with a blank name");
        } else if (StringUtils.isBlank(v.getNamespaceCode())) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with a blank namespace code");
        } if (CoreServiceApiServiceLocator.getNamespaceService().getNamespace(v.getNamespaceCode()) == null) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with invalid or unknown namespace \"" +
                    v.getNamespaceCode() + "\"");
        }

        v.setName(new NormalizedStringAdapter().unmarshal(v.getName()));
        v.setNamespaceCode(v.getNamespaceCode());
    }
    return v;
}
NameAndNamespacePairValidatingAdapter.java 文件源码 项目:OLE-INST 阅读 26 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object)
 */
@Override
public NameAndNamespacePair marshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        if (StringUtils.isBlank(v.getName())) {
            throw new MarshalException("Cannot export a name-and-namespace pair with a blank name");
        } else if (StringUtils.isBlank(v.getNamespaceCode())) {
            throw new MarshalException("Cannot export a name-and-namespace pair with a blank namespace code");
        } else if (CoreServiceApiServiceLocator.getNamespaceService().getNamespace(v.getNamespaceCode()) == null) {
            throw new MarshalException("Cannot export a name-and-namespace pair with invalid or unknown namespace \"" + v.getNamespaceCode() + "\"");
        }

        v.setName(new NormalizedStringAdapter().marshal(v.getName()));
        v.setNamespaceCode(v.getNamespaceCode());
    }
    return v;
}
QualificationListAdapter.java 文件源码 项目:kfs 阅读 24 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public Map<String, String> unmarshal(QualificationList v) throws Exception {
    if (v != null) {
        NormalizedStringAdapter normalizedStringAdapter = new NormalizedStringAdapter();
        Map<String, String> map = new HashMap<String, String>();
        for (MapStringStringAdapter.StringMapEntry stringMapEntry : v.getQualifications()) {
            String tempKey = normalizedStringAdapter.unmarshal(stringMapEntry.getKey());
            if (StringUtils.isBlank(tempKey)) {
                throw new UnmarshalException("Cannot create a qualification entry with a blank key");
            } else if (map.containsKey(tempKey)) {
                throw new UnmarshalException("Cannot create more than one qualification entry with a key of \"" + tempKey + "\"");
            }
            map.put(tempKey, normalizedStringAdapter.unmarshal(stringMapEntry.getValue()));
        }
    }
    return null;
}
PermissionDetailListAdapter.java 文件源码 项目:kfs 阅读 18 收藏 0 点赞 0 评论 0
/**
 * @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;
}
NameAndNamespacePairValidatingAdapter.java 文件源码 项目:kfs 阅读 30 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public NameAndNamespacePair unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {

        if (StringUtils.isBlank(v.getName())) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with a blank name");
        } else if (StringUtils.isBlank(v.getNamespaceCode())) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with a blank namespace code");
        } if (CoreServiceApiServiceLocator.getNamespaceService().getNamespace(v.getNamespaceCode()) == null) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with invalid or unknown namespace \"" +
                    v.getNamespaceCode() + "\"");
        }

        v.setName(new NormalizedStringAdapter().unmarshal(v.getName()));
        v.setNamespaceCode(v.getNamespaceCode());
    }
    return v;
}
NameAndNamespacePairValidatingAdapter.java 文件源码 项目:kfs 阅读 28 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object)
 */
@Override
public NameAndNamespacePair marshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        if (StringUtils.isBlank(v.getName())) {
            throw new MarshalException("Cannot export a name-and-namespace pair with a blank name");
        } else if (StringUtils.isBlank(v.getNamespaceCode())) {
            throw new MarshalException("Cannot export a name-and-namespace pair with a blank namespace code");
        } else if (CoreServiceApiServiceLocator.getNamespaceService().getNamespace(v.getNamespaceCode()) == null) {
            throw new MarshalException("Cannot export a name-and-namespace pair with invalid or unknown namespace \"" + v.getNamespaceCode() + "\"");
        }

        v.setName(new NormalizedStringAdapter().marshal(v.getName()));
        v.setNamespaceCode(v.getNamespaceCode());
    }
    return v;
}
QualificationListAdapter.java 文件源码 项目:rice 阅读 24 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public Map<String, String> unmarshal(QualificationList v) throws Exception {
    if (v != null) {
        NormalizedStringAdapter normalizedStringAdapter = new NormalizedStringAdapter();
        Map<String, String> map = new HashMap<String, String>();
        for (MapStringStringAdapter.StringMapEntry stringMapEntry : v.getQualifications()) {
            String tempKey = normalizedStringAdapter.unmarshal(stringMapEntry.getKey());
            if (StringUtils.isBlank(tempKey)) {
                throw new UnmarshalException("Cannot create a qualification entry with a blank key");
            } else if (map.containsKey(tempKey)) {
                throw new UnmarshalException("Cannot create more than one qualification entry with a key of \"" + tempKey + "\"");
            }
            map.put(tempKey, normalizedStringAdapter.unmarshal(stringMapEntry.getValue()));
        }
    }
    return null;
}
PermissionDetailListAdapter.java 文件源码 项目:rice 阅读 19 收藏 0 点赞 0 评论 0
/**
 * @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;
}
NameAndNamespacePairValidatingAdapter.java 文件源码 项目:rice 阅读 27 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public NameAndNamespacePair unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {

        if (StringUtils.isBlank(v.getName())) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with a blank name");
        } else if (StringUtils.isBlank(v.getNamespaceCode())) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with a blank namespace code");
        } if (CoreServiceApiServiceLocator.getNamespaceService().getNamespace(v.getNamespaceCode()) == null) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with invalid or unknown namespace \"" +
                    v.getNamespaceCode() + "\"");
        }

        v.setName(new NormalizedStringAdapter().unmarshal(v.getName()));
        v.setNamespaceCode(v.getNamespaceCode());
    }
    return v;
}
NameAndNamespacePairValidatingAdapter.java 文件源码 项目:rice 阅读 25 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object)
 */
@Override
public NameAndNamespacePair marshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        if (StringUtils.isBlank(v.getName())) {
            throw new MarshalException("Cannot export a name-and-namespace pair with a blank name");
        } else if (StringUtils.isBlank(v.getNamespaceCode())) {
            throw new MarshalException("Cannot export a name-and-namespace pair with a blank namespace code");
        } else if (CoreServiceApiServiceLocator.getNamespaceService().getNamespace(v.getNamespaceCode()) == null) {
            throw new MarshalException("Cannot export a name-and-namespace pair with invalid or unknown namespace \"" + v.getNamespaceCode() + "\"");
        }

        v.setName(new NormalizedStringAdapter().marshal(v.getName()));
        v.setNamespaceCode(v.getNamespaceCode());
    }
    return v;
}
QualificationListAdapter.java 文件源码 项目:kuali_rice 阅读 24 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public Map<String, String> unmarshal(QualificationList v) throws Exception {
    if (v != null) {
        NormalizedStringAdapter normalizedStringAdapter = new NormalizedStringAdapter();
        Map<String, String> map = new HashMap<String, String>();
        for (MapStringStringAdapter.StringMapEntry stringMapEntry : v.getQualifications()) {
            String tempKey = normalizedStringAdapter.unmarshal(stringMapEntry.getKey());
            if (StringUtils.isBlank(tempKey)) {
                throw new UnmarshalException("Cannot create a qualification entry with a blank key");
            } else if (map.containsKey(tempKey)) {
                throw new UnmarshalException("Cannot create more than one qualification entry with a key of \"" + tempKey + "\"");
            }
            map.put(tempKey, normalizedStringAdapter.unmarshal(stringMapEntry.getValue()));
        }
    }
    return null;
}
PermissionDetailListAdapter.java 文件源码 项目:kuali_rice 阅读 22 收藏 0 点赞 0 评论 0
/**
 * @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;
}
NameAndNamespacePairValidatingAdapter.java 文件源码 项目:kuali_rice 阅读 28 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public NameAndNamespacePair unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {

        if (StringUtils.isBlank(v.getName())) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with a blank name");
        } else if (StringUtils.isBlank(v.getNamespaceCode())) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with a blank namespace code");
        } if (CoreServiceApiServiceLocator.getNamespaceService().getNamespace(v.getNamespaceCode()) == null) {
            throw new UnmarshalException("Cannot import a name-and-namespace pair with invalid or unknown namespace \"" +
                    v.getNamespaceCode() + "\"");
        }

        v.setName(new NormalizedStringAdapter().unmarshal(v.getName()));
        v.setNamespaceCode(v.getNamespaceCode());
    }
    return v;
}
NameAndNamespacePairValidatingAdapter.java 文件源码 项目:kuali_rice 阅读 23 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object)
 */
@Override
public NameAndNamespacePair marshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        if (StringUtils.isBlank(v.getName())) {
            throw new MarshalException("Cannot export a name-and-namespace pair with a blank name");
        } else if (StringUtils.isBlank(v.getNamespaceCode())) {
            throw new MarshalException("Cannot export a name-and-namespace pair with a blank namespace code");
        } else if (CoreServiceApiServiceLocator.getNamespaceService().getNamespace(v.getNamespaceCode()) == null) {
            throw new MarshalException("Cannot export a name-and-namespace pair with invalid or unknown namespace \"" + v.getNamespaceCode() + "\"");
        }

        v.setName(new NormalizedStringAdapter().marshal(v.getName()));
        v.setNamespaceCode(v.getNamespaceCode());
    }
    return v;
}
NameAndNamespacePairToPermTemplateIdAdapter.java 文件源码 项目:kc-rice 阅读 24 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public String unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        Template permissionTemplate = KimApiServiceLocator.getPermissionService().findPermTemplateByNamespaceCodeAndName(
                v.getNamespaceCode(), new NormalizedStringAdapter().unmarshal(v.getName()));
        if (permissionTemplate == null) {
            throw new UnmarshalException("Cannot find permission template with namespace \"" + v.getNamespaceCode() + "\" and name \"" + v.getName() + "\"");
        }
        return permissionTemplate.getId();
    }
    return null;
}
NameAndNamespacePairToKimTypeIdAdapter.java 文件源码 项目:kc-rice 阅读 28 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public String unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        KimTypeContract kimType = KimApiServiceLocator.getKimTypeInfoService().findKimTypeByNameAndNamespace(
                v.getNamespaceCode(), new NormalizedStringAdapter().unmarshal(v.getName()));
        if (kimType == null) {
            throw new UnmarshalException("Cannot find KIM Type with namespace \"" + v.getNamespaceCode() + "\" and name \"" + v.getName() + "\"");
        }
        return kimType.getId();
    }
    return null;
}
NameAndNamespacePairToPermTemplateIdAdapter.java 文件源码 项目:OLE-INST 阅读 28 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public String unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        Template permissionTemplate = KimApiServiceLocator.getPermissionService().findPermTemplateByNamespaceCodeAndName(
                v.getNamespaceCode(), new NormalizedStringAdapter().unmarshal(v.getName()));
        if (permissionTemplate == null) {
            throw new UnmarshalException("Cannot find permission template with namespace \"" + v.getNamespaceCode() + "\" and name \"" + v.getName() + "\"");
        }
        return permissionTemplate.getId();
    }
    return null;
}
NameAndNamespacePairToKimTypeIdAdapter.java 文件源码 项目:OLE-INST 阅读 21 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public String unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        KimTypeContract kimType = KimApiServiceLocator.getKimTypeInfoService().findKimTypeByNameAndNamespace(
                v.getNamespaceCode(), new NormalizedStringAdapter().unmarshal(v.getName()));
        if (kimType == null) {
            throw new UnmarshalException("Cannot find KIM Type with namespace \"" + v.getNamespaceCode() + "\" and name \"" + v.getName() + "\"");
        }
        return kimType.getId();
    }
    return null;
}
NameAndNamespacePairToPermTemplateIdAdapter.java 文件源码 项目:kfs 阅读 23 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public String unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        Template permissionTemplate = KimApiServiceLocator.getPermissionService().findPermTemplateByNamespaceCodeAndName(
                v.getNamespaceCode(), new NormalizedStringAdapter().unmarshal(v.getName()));
        if (permissionTemplate == null) {
            throw new UnmarshalException("Cannot find permission template with namespace \"" + v.getNamespaceCode() + "\" and name \"" + v.getName() + "\"");
        }
        return permissionTemplate.getId();
    }
    return null;
}
NameAndNamespacePairToKimTypeIdAdapter.java 文件源码 项目:kfs 阅读 24 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public String unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        KimTypeContract kimType = KimApiServiceLocator.getKimTypeInfoService().findKimTypeByNameAndNamespace(
                v.getNamespaceCode(), new NormalizedStringAdapter().unmarshal(v.getName()));
        if (kimType == null) {
            throw new UnmarshalException("Cannot find KIM Type with namespace \"" + v.getNamespaceCode() + "\" and name \"" + v.getName() + "\"");
        }
        return kimType.getId();
    }
    return null;
}
NameAndNamespacePairToPermTemplateIdAdapter.java 文件源码 项目:rice 阅读 26 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public String unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        Template permissionTemplate = KimApiServiceLocator.getPermissionService().findPermTemplateByNamespaceCodeAndName(
                v.getNamespaceCode(), new NormalizedStringAdapter().unmarshal(v.getName()));
        if (permissionTemplate == null) {
            throw new UnmarshalException("Cannot find permission template with namespace \"" + v.getNamespaceCode() + "\" and name \"" + v.getName() + "\"");
        }
        return permissionTemplate.getId();
    }
    return null;
}
NameAndNamespacePairToKimTypeIdAdapter.java 文件源码 项目:rice 阅读 26 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public String unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        KimTypeContract kimType = KimApiServiceLocator.getKimTypeInfoService().findKimTypeByNameAndNamespace(
                v.getNamespaceCode(), new NormalizedStringAdapter().unmarshal(v.getName()));
        if (kimType == null) {
            throw new UnmarshalException("Cannot find KIM Type with namespace \"" + v.getNamespaceCode() + "\" and name \"" + v.getName() + "\"");
        }
        return kimType.getId();
    }
    return null;
}
NameAndNamespacePairToPermTemplateIdAdapter.java 文件源码 项目:kuali_rice 阅读 22 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public String unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        Template permissionTemplate = KimApiServiceLocator.getPermissionService().findPermTemplateByNamespaceCodeAndName(
                v.getNamespaceCode(), new NormalizedStringAdapter().unmarshal(v.getName()));
        if (permissionTemplate == null) {
            throw new UnmarshalException("Cannot find permission template with namespace \"" + v.getNamespaceCode() + "\" and name \"" + v.getName() + "\"");
        }
        return permissionTemplate.getId();
    }
    return null;
}
NameAndNamespacePairToKimTypeIdAdapter.java 文件源码 项目:kuali_rice 阅读 22 收藏 0 点赞 0 评论 0
/**
 * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
 */
@Override
public String unmarshal(NameAndNamespacePair v) throws Exception {
    if (v != null) {
        KimTypeContract kimType = KimApiServiceLocator.getKimTypeInfoService().findKimTypeByNameAndNamespace(
                v.getNamespaceCode(), new NormalizedStringAdapter().unmarshal(v.getName()));
        if (kimType == null) {
            throw new UnmarshalException("Cannot find KIM Type with namespace \"" + v.getNamespaceCode() + "\" and name \"" + v.getName() + "\"");
        }
        return kimType.getId();
    }
    return null;
}


问题


面经


文章

微信
公众号

扫码关注公众号