org.nuiton.wikitty.publication
Class CodeDecorator

java.lang.Object
  extended by org.nuiton.wikitty.publication.CodeDecorator

public class CodeDecorator
extends Object

This class is used to decorate wikitty pub text content. Used before compile wikittyPubText to encapsulated content inside java method. Used to apply filter over wikittyPubText content when containing ui directive of others directive that need to be filtered before rendering. Directive that have to be encapsulate inside script vars

Author:
mfortun

Field Summary
protected static FilterOption defaultFilterOption
          Mime type helper used to transform mime
protected static String FILTERS_FILE_NAME_REGEX
           
protected static String filtersOptionDefault
           
protected static String filtersOptionDirName
           
protected  Map<String,FilterOption> filtersOptions
           
protected static String MIME_SEP
           
 
Constructor Summary
CodeDecorator()
           
 
Method Summary
 String getCode(Wikitty wikitty)
          Use to transform wikittyPubText.content into compilable Java
 Map<String,FilterOption> getFiltersOptions()
           
 boolean isDecorated(String string)
           
 boolean isMimeTypeUi(String mime)
           
 boolean isTransformationNeeded(Wikitty wikitty)
           
 boolean isTransformationNeeded(WikittyPubText wikitty)
           
 void setFiltersOptions(Map<String,FilterOption> filtersOptions)
           
 Wikitty transformPubUIToPubText(Wikitty wikitty)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILTERS_FILE_NAME_REGEX

protected static final String FILTERS_FILE_NAME_REGEX
See Also:
Constant Field Values

MIME_SEP

protected static String MIME_SEP

filtersOptionDirName

protected static String filtersOptionDirName

filtersOptionDefault

protected static String filtersOptionDefault

filtersOptions

protected Map<String,FilterOption> filtersOptions

defaultFilterOption

protected static FilterOption defaultFilterOption
Mime type helper used to transform mime

Constructor Detail

CodeDecorator

public CodeDecorator()
Method Detail

transformPubUIToPubText

public Wikitty transformPubUIToPubText(Wikitty wikitty)
                                throws IOException
Throws:
IOException

isTransformationNeeded

public boolean isTransformationNeeded(Wikitty wikitty)

isTransformationNeeded

public boolean isTransformationNeeded(WikittyPubText wikitty)

isMimeTypeUi

public boolean isMimeTypeUi(String mime)

isDecorated

public boolean isDecorated(String string)

getCode

public String getCode(Wikitty wikitty)
Use to transform wikittyPubText.content into compilable Java

Parameters:
wikitty - the wikitty pub text
Returns:
the java code

getFiltersOptions

public Map<String,FilterOption> getFiltersOptions()

setFiltersOptions

public void setFiltersOptions(Map<String,FilterOption> filtersOptions)


Copyright © 2010-2011 CodeLutin. All Rights Reserved.