org.opencms.importexport
Class CmsCompatibleCheck

java.lang.Object
  extended byorg.opencms.importexport.CmsCompatibleCheck

public class CmsCompatibleCheck
extends java.lang.Object

Checks path information on vfs resources.

Since:
6.0.0
Version:
$Revision: 1.19 $
Author:
Alexander Kandzior, Thomas Weckert

Field Summary
static java.lang.String VFS_PATH_BODIES
          Parameter for content body folder.
static java.lang.String VFS_PATH_DEFAULT_TEMPLATES
          Path to content templates folder.
static java.lang.String VFS_PATH_DEFAULTMODULE
          Parameter for default module.
static java.lang.String XML_CONTROL_DEFAULT_CLASS
          Default class for templates.
 
Constructor Summary
CmsCompatibleCheck()
          Constructor, does nothing.
 
Method Summary
 boolean isTemplateCompatible(java.lang.String name, byte[] content, java.lang.String type)
          Checks if the resource path information fulfills the rules for template and body paths.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VFS_PATH_BODIES

public static final java.lang.String VFS_PATH_BODIES
Parameter for content body folder.

See Also:
Constant Field Values

VFS_PATH_DEFAULTMODULE

public static final java.lang.String VFS_PATH_DEFAULTMODULE
Parameter for default module.

See Also:
Constant Field Values

VFS_PATH_DEFAULT_TEMPLATES

public static final java.lang.String VFS_PATH_DEFAULT_TEMPLATES
Path to content templates folder.

See Also:
Constant Field Values

XML_CONTROL_DEFAULT_CLASS

public static final java.lang.String XML_CONTROL_DEFAULT_CLASS
Default class for templates.

See Also:
Constant Field Values
Constructor Detail

CmsCompatibleCheck

public CmsCompatibleCheck()
Constructor, does nothing.

Method Detail

isTemplateCompatible

public boolean isTemplateCompatible(java.lang.String name,
                                    byte[] content,
                                    java.lang.String type)
Checks if the resource path information fulfills the rules for template and body paths.

Parameters:
name - the absolute path of the resource in the VFS
content - the content of the resource.
type - the resource type
Returns:
true if the resource is ok