Package net.sourceforge.syncyoursecrets.util

Examples of net.sourceforge.syncyoursecrets.util.SysInvalidArgumentException


      }
    } else {
      String msg = "Cannot merge " + this + " with " + other;
      logger.error(msg);
      throw new SysInvalidArgumentException(msg);
    }

    logger.debug("exiting merge, resulted in " + mergeInto);
    return mergeInto;
  }
View Full Code Here


  protected void addStringProperty(String property)
      throws SysInvalidArgumentException {
    if (property == null) {
      String msg = "Cannot add String property for null";
      logger.fatal(msg);
      throw new SysInvalidArgumentException(msg);
    }

    if (logger.isTraceEnabled()) {
      logger.trace("Adding String property " + property);
    }
View Full Code Here

      }

      logger.debug("Exiting merge, resulting in " + merged);
      return merged;
    } else {
      throw new SysInvalidArgumentException("Cannot merge "
          + this.getClass() + " with " + element.getClass());
    }

  }
View Full Code Here

    logger.debug("entering copy constructor");

    if (element == null) {
      String msg = "Attempting to construct from other object, but it was null";
      logger.fatal(msg);
      throw new SysInvalidArgumentException(msg);
    }
    this.setCreated(new DateTime(element.getCreated()));
    this.setLastModified(new DateTime(element.getLastModified()));
    this.setId(element.getId());
    this.setLastAction(element.getLastAction());
View Full Code Here

      throws SysInvalidArgumentException {
    logger.trace("entering getNewest");
    if (other == null) {
      String msg = ("Cannot compare timesamps with null object");
      logger.fatal(msg);
      throw new SysInvalidArgumentException(msg);
    }

    if (this.getLastModified().compareTo(other.getLastModified()) >= 1) {
      logger.trace("exiting getNewest");
      return this;
View Full Code Here

   */
  public void setCreated(DateTime created) throws SysInvalidArgumentException {
    if (created == null) {
      String msg = ("Cannot set creation time to null");
      logger.error(msg);
      throw new SysInvalidArgumentException(msg);
    }
    this.created = created;
  }
View Full Code Here

  public void setLastAction(ACTIONS lastAction)
      throws SysInvalidArgumentException {
    if (lastAction == null) {
      String msg = ("Cannot set lastAction to null");
      logger.error(msg);
      throw new SysInvalidArgumentException(msg);
    }
    this.lastAction = lastAction;
  }
View Full Code Here

  public void setLastModified(DateTime lastModified)
      throws SysInvalidArgumentException {
    if (lastModified == null) {
      String msg = ("Cannot set last modification timestamp to null");
      logger.error(msg);
      throw new SysInvalidArgumentException(msg);
    }
    this.lastModified = lastModified;
  }
View Full Code Here

   */
  public void setElementName(String name) throws SysInvalidArgumentException {
    if (StringUtil.isEmpty(name)) {
      String msg = ("Cannot set XML element name to empty or null");
      logger.error(msg);
      throw new SysInvalidArgumentException(msg);
    }

    this.elementName = name;
  }
View Full Code Here

  public Element toXml(Document doc) throws SysInvalidArgumentException {
    logger.debug("entering toXml at " + this.toString());
    if (doc == null) {
      String msg = ("Cannot serialize to XML, document was null");
      logger.error(msg);
      throw new SysInvalidArgumentException(msg);
    }
    Element node = doc.createElement(this.getElementName());

    String created = DateTimeUtil.dateTime2String(this.getCreated());
    property2Attribute(CREATED, created, node);
View Full Code Here

TOP

Related Classes of net.sourceforge.syncyoursecrets.util.SysInvalidArgumentException

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.