Examples of DuplicateNameException


Examples of com.zycus.pm.excpection.DuplicateNameException

    BaseRight baseRight = dbHandler.getBaseRight(baseRightID);
    if (baseRight.getRightDescription().equals(baseRightName)) {
      return baseRight;
    }
    if (baseRight.getGroup().getBaseRight(baseRightName) != null) {
      throw new DuplicateNameException("Right name can't be duplicate", DuplicateNameType.DuplicateRightName);
    }
    baseRight.setRightDescription(baseRightName);
    dbHandler.upsertBaseRight(baseRight);
    return baseRight;
  }
View Full Code Here

Examples of com.zycus.pm.excpection.DuplicateNameException

    BaseRight baseRight = dbHandler.getBaseRight(baseRightID);
    if (baseRight.getRightDescription().equals(baseRightName)) {
      return baseRight;
    }
    if (baseRight.getGroup().getBaseRight(baseRightName) != null) {
      throw new DuplicateNameException("Right name can't be duplicate", DuplicateNameType.DuplicateRightName);
    }
    baseRight.setRightDescription(baseRightName);
    baseRight.setDefaultIsAllowed(defaultIsAllowed);
    dbHandler.upsertBaseRight(baseRight);
    return baseRight;
View Full Code Here

Examples of com.zycus.pm.excpection.DuplicateNameException

    BaseRight baseRight = dbHandler.getBaseRight(baseRightID);
    if (baseRight.getRightDescription().equals(baseRightName)) {
      return baseRight;
    }
    if (baseRight.getGroup().getBaseRight(baseRightName) != null) {
      throw new DuplicateNameException("Right name can't be duplicate", DuplicateNameType.DuplicateRightName);
    }
    baseRight.setRightDescription(baseRightName);
    baseRight.setPriority(priority);
    dbHandler.upsertBaseRight(baseRight);
    return baseRight;
View Full Code Here

Examples of com.zycus.pm.excpection.DuplicateNameException

    BaseRight baseRight = dbHandler.getBaseRight(baseRightID);
    if (baseRight.getRightDescription().equals(baseRightName)) {
      return baseRight;
    }
    if (baseRight.getGroup().getBaseRight(baseRightName) != null) {
      throw new DuplicateNameException("Right name can't be duplicate", DuplicateNameType.DuplicateRightName);
    }
    baseRight.setRightDescription(baseRightName);
    baseRight.setPriority(priority);
    baseRight.setDefaultIsAllowed(defaultIsAllowed);
    dbHandler.upsertBaseRight(baseRight);
View Full Code Here

Examples of com.zycus.pm.excpection.DuplicateNameException

  public RightsGroup updateRightsGroupName(long groupID, String a_groupName) throws DuplicateNameException {
    RightsGroup group = dbHandler.getRightGroup(groupID);
    RightsGroup groupName = dbHandler.getRightGroup(a_groupName);
    if (groupName != null && groupName.equals(group) == false) {
      throw new DuplicateNameException("Group name can't be duplicate", DuplicateNameType.DuplicateRightName);
    }
    group.setGroupName(a_groupName);
    dbHandler.upsertRightsGroup(group);
    return group;
  }
View Full Code Here

Examples of org.apache.tuscany.core.context.DuplicateNameException

    protected void registerConfiguration(ContextFactory<Context> factory) throws ConfigurationException {
        factory.prepare(this);
        if (lifecycleState == RUNNING) {
            if (scopeIndex.get(factory.getName()) != null) {
                throw new DuplicateNameException(factory.getName());
            }
            try {
                ScopeContext scope = scopeContexts.get(factory.getScope());
                if (scope == null) {
                    ConfigurationException e = new MissingScopeException("Component has an unknown scope");
                    e.addContextName(factory.getName());
                    e.addContextName(getName());
                    throw e;
                }
                scope.registerFactory(factory);
                scopeIndex.put(factory.getName(), scope);
            } catch (TuscanyRuntimeException e) {
                e.addContextName(getName());
                throw e;
            }
            configurations.put(factory.getName(), factory); // xcv
        } else {
            if (configurations.get(factory.getName()) != null) {
                throw new DuplicateNameException(factory.getName());
            }
            configurations.put(factory.getName(), factory);
        }

    }
View Full Code Here

Examples of org.apache.tuscany.spi.component.DuplicateNameException

    }

    public void register(SCAObject child) {
        if (child.isSystem()) {
            if (systemChildren.get(child.getName()) != null) {
                DuplicateNameException e =
                    new DuplicateNameException("A system child is already registered with the name");
                e.setIdentifier(child.getName());
                e.addContextName(getName());
                throw e;
            }
            systemChildren.put(child.getName(), child);
        } else {
            if (children.get(child.getName()) != null) {
                DuplicateNameException e = new DuplicateNameException("A child is already registered with the name");
                e.setIdentifier(child.getName());
                e.addContextName(getName());
                throw e;
            }
            children.put(child.getName(), child);
        }
        if (child instanceof Service) {
View Full Code Here

Examples of org.chromattic.api.DuplicateNameException

    // Check insertion capability
    if (parentNode.hasNode(relPath)) {
      String msg = "Attempt to insert context " + childCtx + " as an existing child with name " + relPath + " child of context " + parentCtx;
      log.error(msg);
      throw new DuplicateNameException(msg);
    }

    //
    NodeDef nodeDef = childCtx.mapper.getNodeDef();
    log.trace("Setting context {} for insertion", childCtx);
View Full Code Here

Examples of org.jreform.DuplicateNameException

    <T> void add(InputControl<T> input)
    {
        String name = input.getInputName();
       
        if(inputs.containsKey(name))
            throw new DuplicateNameException(
                "Duplicate input name within the same form: " + name);
       
        inputs.put(name, input);
    }
View Full Code Here

Examples of org.jreform.DuplicateNameException

    final void addGroup(Group group)
    {
        String name = group.getName();
       
        if(groups.containsKey(name))
            throw new DuplicateNameException(
                "Duplicate group name within the same form: " + name);
       
        groups.put(name, group);
    }
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.