Class ContentBeanFactory

java.lang.Object
com.appiancorp.suiteapi.content.ContentBeanFactory

public class ContentBeanFactory extends Object
Provides utility methods for creating content objects based on the type identifiers.
  • Constructor Details

    • ContentBeanFactory

      public ContentBeanFactory()
  • Method Details

    • setCustomContentSubtypeClass

      public static void setCustomContentSubtypeClass(int subtype_, Class customClass_)
      Registers the java class to be instantiated when retrieving custom content objects of a given subtype. The class should extend CustomContent.
      Parameters:
      subtype_ - The subtype of the custom content.
      customClass_ - The class to use for custom content of this subtype.
    • setApplicationContentSubtypeClass

      public static void setApplicationContentSubtypeClass(int subtype_, Class customClass_)
      Registers the java class to be instantiated when retrieving application content objects of a given subtype.
      Parameters:
      subtype_ - The subtype of the custom content.
      customClass_ - The class to use for custom content of this subtype.
    • setCustomContentSubtypeClassesMap

      public static void setCustomContentSubtypeClassesMap(Map subtypeToClass_)
      Sets all the custom content subtype class mappings.
      Parameters:
      subtypeToClass_ - A map of <Long, Class> entries, where the key is a custom content subtype, and the value is the java class to be instantiated when retrieving custom content of that subtype. The classes should extend CustomContent.
    • newContent

      public static Content newContent(Long type_)
      Creates a new Content object of the type specified. Uses null as the sub-type.
      Parameters:
      type_ - the type of content to create
      Returns:
      the Content object
      See Also:
    • newContent

      public static Content newContent(Long type_, Long subtype_)
      Creates a new Content object of the type and sub-type specified.
      Parameters:
      type_ - the type of content to create
      subtype_ - the subtype of content to create (may be null)
      Returns:
      the Content object
      See Also:
    • getContentClass

      public static Class getContentClass(Long type_)
      Gets the class of the content object associated with the type passed in. Each of the classes returned extends Content.
      Parameters:
      type_ - the content type
      Returns:
      the associated class
      See Also:
    • getContentClass

      public static Class getContentClass(Long type_, Long subtype_)
      Gets the class of the content object associated with the type and sub-type passed in. Each of the classes returned extends Content.
      Parameters:
      type_ - the content type
      subtype_ - the content sub-type
      Returns:
      the associated class
      See Also: