Package

com.reactific

helpers

Permalink

package helpers

Reactific Helpers Package. This package contains an assortment of utility classes that defy other categorization. Helpers are typically standalone (they depend on nothing) and are utilized in more than one other package.

Linear Supertypes
AnyRef, Any
Content Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. helpers
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. trait AbstractRegistry[K, V <: AnyRef] extends LoggingHelper with ThrowingHelper

    Permalink

    Abstract Registry Of Key-Value Pairs This trait implements a key-value map using ConcurrentHashMap to minimize lock contention for multiple threads accessing the registry.

    Abstract Registry Of Key-Value Pairs This trait implements a key-value map using ConcurrentHashMap to minimize lock contention for multiple threads accessing the registry. It is intended to identify race conditions upon insertion and deletion of entries.

    K

    The type of Key

    V

    The type of Value

  2. trait FutureHelper extends LoggingHelper with ThrowingHelper

    Permalink

    Utilities used throughout Scrupla.

    Utilities used throughout Scrupla. Should probably be an aspect, but we just mix this in as needed. Helps with logging, throwing exceptions and dealing with futures.

  3. trait HelperComponent extends LoggingHelper with FutureHelper with ThrowingHelper

    Permalink

    A Software Component This just bundles together various helpers that are commonly used within a software component

  4. trait Identifiable extends AnyRef

    Permalink
  5. trait IdentifiedWithRegistry extends Identifiable

    Permalink
  6. trait LoggingHelper extends AnyRef

    Permalink
  7. class MemoryCache[K, V] extends AnyRef

    Permalink

    This trait makes a simple cache from a ConcurrentHashMap accompanied by a getOrElse function to obtain or create values

    This trait makes a simple cache from a ConcurrentHashMap accompanied by a getOrElse function to obtain or create values

    K

    type of the keys

    V

    type of the values

  8. class NotImplementedException extends TossedException

    Permalink
  9. case class OSSLicense(name: String, description: String, uri: URI) extends Registrable[OSSLicense] with Product with Serializable

    Permalink

    A Registration of the Open Source Software Licenses

  10. abstract class Pluralizer extends AnyRef

    Permalink

    Competently find the plural of most common English words.

    Competently find the plural of most common English words.

    In dealing with logged messages, error messages, and other output that people see, it is always nice to have the correct plural form of nouns be used. This class attempts to get pretty good coverage for the english language based on a variety of pluralization rules. This is also used in URL path matching to distinguish between operations that act on an instance (singular) or a collection of instances (plural)

    Inspired by: https://github.com/atteo/evo-inflector/blob/master/src/main/java/org/atteo/evo/inflector/TwoFormInflector.java Rules from: http://www.barstow.edu/lrc/tutorserv/handouts/015%20Irregular%20Plural%20Nouns.pd Oxford Rules: http://oxforddictionaries.com/words/plurals-of-nouns

  11. trait Registrable[T <: Registrable[T]] extends IdentifiedWithRegistry with LoggingHelper

    Permalink

    Mix this in to anything you want to register and define the "id"; then pass that object to the Registrar you want

  12. trait Registry[T <: Registrable[T]] extends AbstractRegistry[Symbol, T]

    Permalink

    A trait for specifying the registration of some type of object (T) which must have at least Registrable mixed in.

    A trait for specifying the registration of some type of object (T) which must have at least Registrable mixed in. This abstracts the notion of a registry of objects that conform to an interface.

  13. case class RegistryReference[T <: Registrable[T]] extends () ⇒ Option[T] with Product with Serializable

    Permalink

    Reference A Memory Object From The Database

    Reference A Memory Object From The Database

    Many of the objects used in Scrupal are not stored in the database. Essentially those things coming from a Module are just retained in memory: Module, Feature, Entity, Type, Handler, etc. However, we need to reference these things from objects that are stored in the database. We do not want to be loading the low level memory objects all the time but would just like to "find" them. That's what the RegistryReference is for. We can register long-lived immutable objects in a registry and find them later, by name. But, there is a registry per object type, by design. So, we need a way to capture a reference to a named object in one of the registries. We do that by simply caching the registry object and the registrable object's id. This information is then stored in the database and reconstructed into the referenced object with the apply method.

  14. trait ThrowableWithComponent extends Throwable

    Permalink
  15. trait ThrowingHelper extends LoggingHelper

    Permalink

    Assistance With Throwing Exceptions Uses LoggingHelper base class to throw an error message that identifies the thrower.

  16. class TossedException extends Exception with ThrowableWithComponent

    Permalink

Value Members

  1. object DateTimeHelpers

    Permalink

    A Suite of utilities for manipulating Java 8 time classes Provides mostly standard ways of converting times and durations into strings.

  2. object LoggingHelper extends LoggingHelper

    Permalink

    Log File Related Helpers

    Log File Related Helpers

    This object just provides a variety of utilities for manipulating LogBack programatically.

  3. object MathHelpers

    Permalink

    One line sentence description here.

    One line sentence description here. Further description here.

  4. object MemoryCache

    Permalink
  5. object OSSLicense extends Registry[OSSLicense] with Serializable

    Permalink
  6. object Patterns

    Permalink

    One line sentence description here.

    One line sentence description here. Further description here.

  7. object Pluralizer extends Pluralizer

    Permalink

    Interface to Pluralizer This object allows us to write

    Interface to Pluralizer This object allows us to write

    Pluralizer("word")

    to obtain the plural form or

    Pluralizer("word",count

    if we want it to be based on the value of count. This class also calls all the base class methods to install the rules.

    Pluralizer("word",count }}} This class also calls all the base class methods to install the rules.

    Pluralizer("word") }}}

    Pluralizer("word",count

    if we want it to be based on the value of count. This class also calls all the base class methods to install the rules.

    Pluralizer("word",count }}} This class also calls all the base class methods to install the rules.

  8. object RegistryReference extends Serializable

    Permalink
  9. object TossedException extends Serializable

    Permalink
  10. object TryWith

    Permalink

    Try With Resources

    Try With Resources

    This works just like Try[T] with the following exceptions: - Instead of catching only NonFatal exceptions, catches all Throwables so resources are sure to be released - Accepts a Seq[AutoCloseable] list of resources to close on exit from the Try

Inherited from AnyRef

Inherited from Any

Ungrouped