Examples of MissingParameterEx


Examples of org.fao.geonet.exceptions.MissingParameterEx

        for (Object o : privil.getChildren("group")) {
            Element group = (Element) o;
            String groupID = group.getAttributeValue("id");

            if (groupID == null) {
                throw new MissingParameterEx("attribute:id", group);
            }

            Privileges p = new Privileges(groupID);

            for (Object o1 : group.getChildren("operation")) {
View Full Code Here

Examples of org.fao.geonet.exceptions.MissingParameterEx

     */
  private int getOperationId(Element oper) throws BadInputEx {
    String operName = oper.getAttributeValue("name");

        if(operName == null) {
      throw new MissingParameterEx("attribute:name", oper);
        }

    int operID = dm.getAccessManager().getPrivilegeId(operName);

        if(operID == - 1) {
View Full Code Here

Examples of org.fao.geonet.exceptions.MissingParameterEx

            Log.debug(Geonet.HARVEST_MAN, "Updating harvesting node : \n"+ Xml.getString(node));
        }
    String id = node.getAttributeValue("id");

    if (id == null) {
      throw new MissingParameterEx("attribute:id", node);
        }
    AbstractHarvester ah = hmHarvesters.get(id);

    if (ah == null) {
      return false;
View Full Code Here

Examples of org.fao.geonet.exceptions.MissingParameterEx

        List<Element> repoList = repos.getChildren("repository");
        for (Element repoElem : repoList) {
            String repoId = repoElem.getAttributeValue("id");

            if (repoId == null)
                throw new MissingParameterEx("attribute:id", repoElem);

            alRepositories.add(repoId);
        }
  }
View Full Code Here

Examples of org.fao.geonet.exceptions.MissingParameterEx

  public Group(Element group) throws BadInputEx
  {
    name = group.getAttributeValue("name");

    if (name == null)
      throw new MissingParameterEx("attribute:name", group);

    String t = group.getAttributeValue("policy");

    if (t == null)
      throw new MissingParameterEx("attribute:policy", group);

    policy = CopyPolicy.parse(t);

    if (policy == null)
      throw new BadParameterEx("attribute:policy", policy);
View Full Code Here

Examples of org.fao.geonet.exceptions.MissingParameterEx

    public CategoryUpdateResponse exec(
            @RequestParam final Integer id,
            @RequestParam final String name
    ) throws Exception {
        if (name == null) {
            throw new MissingParameterEx("name");
        }

        CategoryUpdateResponse response = new CategoryUpdateResponse();

        MetadataCategory category;
View Full Code Here

Examples of org.fao.geonet.exceptions.MissingParameterEx

    @SuppressWarnings("unchecked")
        List<Element> list = par.getChildren();

    if (list.size() == 0)
      throw new MissingParameterEx("<request>", par);

    XmlRequest req = context.getBean(GeonetHttpRequestFactory.class).createXmlRequest(new URL(url));

    //--- do we need to authenticate?
View Full Code Here

Examples of org.fao.geonet.exceptions.MissingParameterEx

  public static Element getChild(Element el, String name) throws MissingParameterEx
  {
    Element param = el.getChild(name);

    if (param == null)
      throw new MissingParameterEx(name, el);

    return param;
  }
View Full Code Here

Examples of org.fao.geonet.exceptions.MissingParameterEx

  //--------------------------------------------------------------------------

  public static String getParam(Element el, String name) throws BadInputEx
  {
    if (el == null)
      throw new MissingParameterEx(name);

    Element param = el.getChild(name);

    if (param == null)
      throw new MissingParameterEx(name, el);

    String value = param.getTextTrim();

    if (value.length() == 0)
      throw new BadParameterEx(name, value);
View Full Code Here

Examples of org.fao.geonet.exceptions.MissingParameterEx

  public static String getAttrib(Element el, String name) throws BadInputEx
  {
    String value = el.getAttributeValue(name);

    if (value == null)
      throw new MissingParameterEx("attribute:"+ name, el);

    value = value.trim();

    if (value.length() == 0)
      throw new BadParameterEx("attribute:"+name, value);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.