Class TypeAdapterHelper

java.lang.Object
org.nuxeo.ecm.automation.core.impl.adapters.helper.TypeAdapterHelper

public class TypeAdapterHelper extends Object
Helper for type adapters
Since:
9.1
  • Constructor Details

    • TypeAdapterHelper

      public TypeAdapterHelper()
  • Method Details

    • createDocumentRef

      public static DocumentRef createDocumentRef(String value)
      Create document reference from an id or a path.
      Returns:
      the document reference
    • createDocumentRefOrExpression

      public static Object createDocumentRefOrExpression(String value)
      Create a document reference from an expression, an id or a path.
      Returns:
      the document reference
    • createDocumentRef

      public static DocumentRef createDocumentRef(OperationContext ctx, String value) throws TypeAdaptException
      Create a document reference from its path
      Parameters:
      ctx - the operation context
      value - the document path
      Returns:
      the document reference
      Throws:
      TypeAdaptException
    • createDocumentModel

      public static DocumentModel createDocumentModel(OperationContext ctx, String value) throws TypeAdaptException
      Create a document model from its path
      Parameters:
      ctx - the operation context
      value - the document path
      Returns:
      the document model
      Throws:
      TypeAdaptException
    • createDocumentModel

      public static DocumentModel createDocumentModel(OperationContext ctx, DocumentRef docRef) throws TypeAdaptException
      Create a document model from its reference
      Parameters:
      ctx - the operation context
      docRef - the document reference
      Returns:
      the document model
      Throws:
      TypeAdaptException
    • createDocumentModel

      public static DocumentModel createDocumentModel(AbsoluteDocumentRef docRef)
      Creates a document model from its absolute reference.
      Since:
      2023.5