Package rife.cmf.dam

Interface ContentDataUser<ResultType>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ContentDataUser<ResultType>
By implementing this interface it's possible to provide the logic that should be executed by methods that allow interaction with content data.
Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Calling this method makes it possible to throw a checked exception from within this class.
    useContentData(Object contentData)
    Should be implemented by all implementations.
  • Method Details

    • useContentData

      ResultType useContentData(Object contentData) throws InnerClassException
      Should be implemented by all implementations.
      Throws:
      InnerClassException
      Since:
      1.0
    • throwException

      default void throwException(Exception exception) throws InnerClassException
      Calling this method makes it possible to throw a checked exception from within this class.

      To catch it you should surround the using method with a try-catch block that catching InnerClassException. The original exception is then available through getCause() and can for example be rethrown.

      Throws:
      InnerClassException - when a checked exception needs to be thrown from within this class and caught outside the caller.
      Since:
      1.0