Package com.stimulus.archiva.exception

Examples of com.stimulus.archiva.exception.ConfigurationException


     public void removeVolume(int id) throws ConfigurationException {

        Volume v = volumes.get(id);
        if (v.getStatus()==Volume.Status.ACTIVE)
            throw new ConfigurationException("failed to delete active volume. it must be closed first",logger);
       volumes.remove(v);
      Collections.sort(volumes);
     }
View Full Code Here


     
      public Volume getNewVolume(String id) throws ConfigurationException {
       for (Volume volume : volumes) {
              if (volume.getStatus()==Volume.Status.UNUSED)
                  throw new ConfigurationException("failed to lookup new volumes {id='"+id+"'}",logger);
              if (Compare.equalsIgnoreCase(volume.getID(), id))
                return volume;
        }
       throw new ConfigurationException("failed to lookup volumes {id='"+id+"'}",logger);
      }
View Full Code Here

       throw new ConfigurationException("failed to lookup volumes {id='"+id+"'}",logger);
      }
     
     public Volume getLegacyVolume(String uniqueId) throws ConfigurationException {
        if (uniqueId==null)
            throw new ConfigurationException("uniqueid cannot be null",logger);
       
          Date date = null;
        try {
              date = DateUtil.convertStringToDate(uniqueId);
          } catch (Exception e) {
              logger.warn("failed to parse uniqueid {id='"+uniqueId+"'}");
          }

          for (Volume volume : volumes) {
              if (volume.getStatus()==Volume.Status.UNUSED)
                  throw new ConfigurationException("failed to lookup legacy volumes {uniqueId='"+uniqueId+"'}",logger);
              if (volume != null && volume.getModified()!=null && volume.getModified().compareTo(date)>=0) {
                boolean isModified = volume.getModified().compareTo(date)>0;
                return volume;
               
              }
View Full Code Here

      }
   
      public void closeVolume(int index) throws ConfigurationException {
          Object o = volumes.get(index);
          if (o==null)
              throw new ConfigurationException("failed to close volume. no such volume exists",logger);
           Volume vs = (Volume)o;
           vs.setStatus(Volume.Status.CLOSED);
           saveVolumeInfo(vs,true);
           Collections.sort(volumes);
           logger.debug("volume is now closed {"+vs+"}");
View Full Code Here

      }
     
     public void unmountVolume(int index) throws ConfigurationException {
         Object o = volumes.get(index);
         if (o==null)
             throw new ConfigurationException("failed to unmount volume. no such volume exists",logger);
           Volume vs = (Volume)o;
           vs.setStatus(Volume.Status.UNMOUNTED);
           saveVolumeInfo(vs,true);
           Collections.sort(volumes);
           logger.debug("volume is now unmounted {"+vs+"}");
View Full Code Here

         return role;
       }
      
       public void setRole(String role) throws ConfigurationException {
          if (!ROLES.contains(role))
                throw new ConfigurationException("failed to set role in role mapping {role='"+role+"'}",logger);
         this.role = role;
       }
View Full Code Here

       }
      
     public void setRoleID(int roleId) throws ConfigurationException {
          String newrole = (String)ROLES.get(roleId);
          if (newrole==null)
              throw new ConfigurationException("failed to set role. invalid role id "+role,logger);
          this.role = newrole;
      }
View Full Code Here

TOP

Related Classes of com.stimulus.archiva.exception.ConfigurationException

Copyright © 2018 www.massapicom. 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.