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

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

Introduction

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

Prototype

public static void write(String pathName, String fileName, String s) throws IOException 

Source Link

Usage

From source file:com.liferay.maven.plugins.compatibility.WSDDBuilder.java

License:Open Source License

private void _createServiceWSDD(String entityName) throws Exception {
    String className = _packagePath + ".service.http." + entityName + "ServiceSoap";

    String serviceName = StringUtil.replace(_portletShortName, " ", "_");

    if (!_portletShortName.equals("Portal")) {
        serviceName = _serviceNamespace + "_" + serviceName;
    }/*from ww  w. ja  v a2s.c om*/

    serviceName += ("_" + entityName + "Service");

    String[] wsdds = Java2WsddTask.generateWsdd(className, serviceName);

    FileUtil.write(new File(_outputPath + "/" + entityName + "Service_deploy.wsdd"), wsdds[0], true);

    FileUtil.write(new File(_outputPath + "/" + entityName + "Service_undeploy.wsdd"), wsdds[1], true);
}