Example usage for com.liferay.portal.kernel.util FileUtil FileUtil

List of usage examples for com.liferay.portal.kernel.util FileUtil FileUtil

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util FileUtil FileUtil.

Prototype

FileUtil

Source Link

Usage

From source file:com.liferay.alloy.tools.xmlbuilder.XMLBuilder.java

License:Open Source License

public XMLBuilder(String componentsJSON, String componentsXML, String componentExcluded) throws Exception {

    if (FileUtil.getFile() == null) {
        (new FileUtil()).setFile(new FileImpl());
    }/*  w  w w.  j  ava 2 s. c  o m*/

    if (SAXReaderUtil.getSAXReader() == null) {
        (new SAXReaderUtil()).setSAXReader(new SAXReaderImpl());
    }

    _componentJSON = componentsJSON;
    _componentXML = componentsXML;
    _componentExcluded = Arrays.asList(StringUtil.split(componentExcluded));

    _fileXML = new File(_componentXML);
    _fileJSON = new File(_componentJSON);

    _json = new JSONObject(FileUtil.read(_fileJSON));
    _classMapJSON = _json.getJSONObject("classmap");

    _create();
}

From source file:org.mimacom.commons.liferay.adapter512.LiferayToolsImpl.java

License:Apache License

public void initLiferay() {
    new FileUtil().setFile(new FileImpl());
    new SAXReaderUtil().setSAXReader(new SAXReaderImpl());
    new PortalUtil().setPortal(new PortalImpl());
    ModelHintsImpl modelHints = new ModelHintsImpl();
    modelHints.afterPropertiesSet();/*from ww w . ja v  a  2s .c o m*/
    new ModelHintsUtil().setModelHints(modelHints);
}

From source file:org.mimacom.commons.liferay.adapter523.LiferayToolsImpl.java

License:Apache License

public void initLiferay() {
    new FileUtil().setFile(new FileImpl());
    new SAXReaderUtil().setSAXReader(new SAXReaderImpl());
    new PortalUtil().setPortal(new PortalImpl());
    new HtmlUtil().setHtml(new HtmlImpl());
    ModelHintsImpl modelHints = new ModelHintsImpl();
    modelHints.afterPropertiesSet();//  w  w w.  j  a v  a 2s. com
    new ModelHintsUtil().setModelHints(modelHints);
}

From source file:org.mimacom.commons.liferay.adapter526.LiferayToolsImpl.java

License:Apache License

public void initLiferay() {
    new FileUtil().setFile(new FileImpl());
    new SAXReaderUtil().setSAXReader(new SAXReaderImpl());
    new PortalUtil().setPortal(new PortalImpl());
    new HtmlUtil().setHtml(new HtmlImpl());
    ModelHintsImpl modelHints = new ModelHintsImpl();
    modelHints.afterPropertiesSet();//from  ww w . ja  v  a2  s . com
    new ModelHintsUtil().setModelHints(modelHints);
    new FastDateFormatFactoryUtil().setFastDateFormatFactory(new FastDateFormatFactoryImpl());
}

From source file:org.mimacom.commons.liferay.adapter529.LiferayToolsImpl.java

License:Apache License

public void initLiferay() {
    new FileUtil().setFile(new FileImpl());
    new SAXReaderUtil().setSAXReader(new SAXReaderImpl());
    new PortalUtil().setPortal(new PortalImpl());
    new HtmlUtil().setHtml(new HtmlImpl());
}