Class ContentItemUtils

java.lang.Object
com.ptc.core.adapter.server.impl.ContentItemUtils

public class ContentItemUtils extends Object
Utility class holding methods useful to webjects that deal with ContentItems

Supported API: true
  • Method Details

    • getStagingAreaPath

      public static String getStagingAreaPath(String stagingArea) throws WTException
      If staging is configured, then this will return an absolute path of the form:
      STAGING_AREA_ROOT/stagingArea/username
      where STAGING_AREA_ROOT is defined by the property wt.adapter.stagingAreaRoot, stagingArea is the passed argument, and username is the username of the current user.

      Supported API: true
      Parameters:
      stagingArea -
      Returns:
      Throws:
      WTException - If the resulting path contains any references to the directory '..' or if staging is not configured
    • getStagingAreaFile

      public static File getStagingAreaFile(String stagingArea) throws WTException
      Wraps the return of getStagingAreaPath(java.lang.String) in a File object. <br /
      Supported API: true
      Parameters:
      stagingArea -
      Returns:
      Throws:
      WTException