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.
- Alphabetic
- By Inheritance
- helpers
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
AbstractRegistry
[K, V <: AnyRef] extends LoggingHelper with ThrowingHelper
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
-
trait
FutureHelper
extends LoggingHelper with ThrowingHelper
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.
-
trait
HelperComponent
extends LoggingHelper with FutureHelper with ThrowingHelper
A Software Component This just bundles together various helpers that are commonly used within a software component
- trait Identifiable extends AnyRef
- trait IdentifiedWithRegistry extends Identifiable
- trait LoggingHelper extends AnyRef
-
class
MemoryCache
[K, V] extends AnyRef
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
- class NotImplementedException extends TossedException
-
case class
OSSLicense
(name: String, description: String, uri: URI) extends Registrable[OSSLicense] with Product with Serializable
A Registration of the Open Source Software Licenses
-
abstract
class
Pluralizer
extends AnyRef
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
-
trait
Registrable
[T <: Registrable[T]] extends IdentifiedWithRegistry with LoggingHelper
Mix this in to anything you want to register and define the "id"; then pass that object to the Registrar you want
-
trait
Registry
[T <: Registrable[T]] extends AbstractRegistry[Symbol, T]
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.
-
case class
RegistryReference
[T <: Registrable[T]] extends () ⇒ Option[T] with Product with Serializable
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.
- implicit class ThrowableHacks extends AnyRef
- trait ThrowableWithComponent extends Throwable
-
trait
ThrowingHelper
extends LoggingHelper
Assistance With Throwing Exceptions Uses LoggingHelper base class to throw an error message that identifies the thrower.
- class TossedException extends Exception with ThrowableWithComponent
Value Members
-
object
ComReactificHelpersInfo
extends Product with Serializable
This object was generated by sbt-buildinfo.
-
object
DateTimeHelpers
A Suite of utilities for manipulating Java 8 time classes Provides mostly standard ways of converting times and durations into strings.
-
object
LoggingHelper
extends LoggingHelper
Log File Related Helpers
Log File Related Helpers
This object just provides a variety of utilities for manipulating LogBack programatically.
-
object
MathHelpers
One line sentence description here.
One line sentence description here. Further description here.
- object MemoryCache
- object OSSLicense extends Registry[OSSLicense] with Serializable
-
object
Patterns
One line sentence description here.
One line sentence description here. Further description here.
-
object
Pluralizer
extends Pluralizer
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",countif 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 }}} the value of count. This class also calls all the base class methods to install the rules.
Pluralizer("word") }}} plural form or
Pluralizer("word",countif 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 }}} the value of count. This class also calls all the base class methods to install the rules.
- object RegistryReference extends Serializable
- object TossedException extends Serializable
-
object
TryWith
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