Codota Logo
DefaultOverdueStateSet.getStates
Code IndexAdd Codota to your IDE (free)

How to use
getStates
method
in
com.ning.billing.overdue.config.DefaultOverdueStateSet

Best Java code snippets using com.ning.billing.overdue.config.DefaultOverdueStateSet.getStates (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: com.ning.billing/killbill-overdue

@Override
public int size() {
  return getStates().length;
}
origin: com.ning.billing/killbill-overdue

  @Override
  public OverdueState getFirstState() {
    return getStates()[0];
  }
}
origin: com.ning.billing/killbill-overdue

@Override
public OverdueState findState(final String stateName) throws OverdueApiException {
  if (stateName.equals(DefaultBlockingState.CLEAR_STATE_NAME)) {
    return clearState;
  }
  for (final DefaultOverdueState state : getStates()) {
    if (state.getName().equals(stateName)) {
      return state;
    }
  }
  throw new OverdueApiException(ErrorCode.CAT_NO_SUCH_OVEDUE_STATE, stateName);
}
origin: com.ning.billing/killbill-overdue

@Override
public DefaultOverdueState calculateOverdueState(final BillingState billingState, final LocalDate now) throws OverdueApiException {
  for (final DefaultOverdueState overdueState : getStates()) {
    if (overdueState.getCondition() != null && overdueState.getCondition().evaluate(billingState, now)) {
      return overdueState;
    }
  }
  return getClearState();
}
origin: com.ning.billing/killbill-overdue

@Override
public ValidationErrors validate(final OverdueConfig root,
                 final ValidationErrors errors) {
  for (final DefaultOverdueState state : getStates()) {
    state.validate(root, errors);
  }
  try {
    getClearState();
  } catch (OverdueApiException e) {
    if (e.getCode() == ErrorCode.CAT_MISSING_CLEAR_STATE.getCode()) {
      errors.add("Overdue state set is missing a clear state.",
            root.getURI(), this.getClass(), "");
    }
  }
  return errors;
}
origin: com.ning.billing/killbill-overdue

Assert.assertEquals(c.getStateSet().size(), 2);
Assert.assertNull(c.getStateSet().getStates()[0].getEnterStateEmailNotification());
final EmailNotification secondNotification = c.getStateSet().getStates()[1].getEnterStateEmailNotification();
Assert.assertEquals(secondNotification.getSubject(), "ToTo");
Assert.assertEquals(secondNotification.getTemplateName(), "Titi");
com.ning.billing.overdue.configDefaultOverdueStateSetgetStates

Popular methods of DefaultOverdueStateSet

  • findState
  • getClearState
  • getInitialReevaluationInterval
  • size

Popular in Java

  • Start an intent from android
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now