Examples of DuplicateItemException


Examples of com.kurento.kmf.repository.DuplicateItemException

  public RepositoryItem createRepositoryItem(String id) {

    // TODO The file is not written until outputstream is closed. There is a
    // potentially data race with this unique test
    if (!gridFS.find(idQuery(id)).isEmpty()) {
      throw new DuplicateItemException(id);
    }

    GridFSInputFile dbFile = gridFS.createFile(id);
    dbFile.setId(id);
    return createRepositoryItem(dbFile);
View Full Code Here

Examples of com.kurento.kmf.repository.DuplicateItemException

  public RepositoryItem createRepositoryItem(String id) {

    File file = getFileForId(id);

    if (file.exists()) {
      throw new DuplicateItemException(id);
    }

    return new FileRepositoryItem(this, file, id, metadata.loadMetadata(id));
  }
View Full Code Here

Examples of nexj.core.util.DuplicateItemException

            }
         }

         m_instanceMap.put(m_instanceArray[((Integer)oldOrdinal).intValue()], oldOrdinal);

         throw new DuplicateItemException("err.persistence.duplicateInstance",
            new Object[]{instance.getLazyMetaclass().getName(), instance.getOID()});
      }

      if (m_nIteratorCount != 0 || m_nCount == m_instanceArray.length)
      {
View Full Code Here

Examples of nexj.core.util.DuplicateItemException

               }
               else
               {
                  m_instanceRefMap.put(ref.m_oid, ref.m_metaclass, oldRef);

                  throw new DuplicateItemException("err.persistence.duplicateInstance",
                     new Object[]{ref.m_metaclass.getName(), ref.m_oid});
               }
            }
            else
            {
View Full Code Here

Examples of org.apache.rave.exception.DuplicateItemException

    @Override
    @Transactional
    public Widget registerNewWidget(Widget widget) {
        if (getWidgetByUrl(widget.getUrl()) != null) {
            throw new DuplicateItemException("Trying to add an existing widget for url " + widget.getUrl());
        }
        return widgetRepository.save(widget);
    }
View Full Code Here

Examples of org.apache.rave.exception.DuplicateItemException

                       
            // now translate the H2 specific error codes into Rave's common application Exceptions
            // add more error codes to the switch statement that should be specifically trapped                        
            switch(rootException.getErrorCode()) {
                case ErrorCode.DUPLICATE_KEY_1: {
                    e = new DuplicateItemException("DUPLICATE_ITEM", rootException);
                    break;
                }

                default: {
                    e = new TranslatedH2Exception(rootException.getErrorCode(), "ERROR", "Unknown Database Error");
View Full Code Here

Examples of org.apache.rave.exception.DuplicateItemException

    @Override
    @Transactional
    public Widget registerNewWidget(Widget widget) {
        if (getWidgetByUrl(widget.getUrl()) != null) {
            throw new DuplicateItemException("Trying to add an existing widget for url " + widget.getUrl());
        }
        return widgetRepository.save(widget);
    }
View Full Code Here

Examples of org.apache.rave.exception.DuplicateItemException

    @Override
    @Transactional
    public Widget registerNewWidget(Widget widget) {
        if (getWidgetByUrl(widget.getUrl()) != null) {
            throw new DuplicateItemException("Trying to add an existing widget for url " + widget.getUrl());
        }
        return widgetRepository.save(widget);
    }
View Full Code Here

Examples of org.apache.rave.exception.DuplicateItemException

    @Override
    @Transactional
    public Widget registerNewWidget(Widget widget) {
        if (getWidgetByUrl(widget.getUrl()) != null) {
            throw new DuplicateItemException("Trying to add an existing widget for url " + widget.getUrl());
        }
        return widgetRepository.save(widget);
    }
View Full Code Here

Examples of org.apache.rave.exception.DuplicateItemException

                       
            // now translate the H2 specific error codes into Rave's common application Exceptions
            // add more error codes to the switch statement that should be specifically trapped                        
            switch(rootException.getErrorCode()) {
                case ErrorCode.DUPLICATE_KEY_1: {
                    e = new DuplicateItemException("DUPLICATE_ITEM", rootException);
                    break;
                }

                default: {
                    e = new TranslatedH2Exception(rootException.getErrorCode(), "ERROR", "Unknown Database Error");
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.