Example usage for com.liferay.portal.kernel.util Validator isFilePath

List of usage examples for com.liferay.portal.kernel.util Validator isFilePath

Introduction

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

Prototype

public static boolean isFilePath(String path, boolean parentDirAllowed) 

Source Link

Usage

From source file:com.liferay.exportimport.lar.PortletDataContextImpl.java

License:Open Source License

@Override
public byte[] getZipEntryAsByteArray(String path) {
    if (!Validator.isFilePath(path, false)) {
        return null;
    }/*from   w w  w .jav  a  2 s . co  m*/

    return getZipReader().getEntryAsByteArray(path);
}

From source file:com.liferay.exportimport.lar.PortletDataContextImpl.java

License:Open Source License

@Override
public InputStream getZipEntryAsInputStream(String path) {
    if (!Validator.isFilePath(path, false)) {
        return null;
    }//from   w w w.ja  va2 s.  co  m

    return getZipReader().getEntryAsInputStream(path);
}

From source file:com.liferay.exportimport.lar.PortletDataContextImpl.java

License:Open Source License

@Override
public String getZipEntryAsString(String path) {
    if (!Validator.isFilePath(path, false)) {
        return null;
    }/*  w w w  .  j a  va  2  s.co  m*/

    return getZipReader().getEntryAsString(path);
}

From source file:com.liferay.exportimport.lar.PortletDataContextImpl.java

License:Open Source License

@Override
public List<String> getZipFolderEntries(String path) {
    if (!Validator.isFilePath(path, false)) {
        return null;
    }//from   www. ja v  a2 s .c o  m

    return getZipReader().getFolderEntries(path);
}