Example usage for com.liferay.portal.kernel.webdav BaseResourceImpl BaseResourceImpl

List of usage examples for com.liferay.portal.kernel.webdav BaseResourceImpl BaseResourceImpl

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.webdav BaseResourceImpl BaseResourceImpl.

Prototype

public BaseResourceImpl(String parentPath, String name, String displayName, Date createDate,
            Date modifiedDate) 

Source Link

Usage

From source file:com.liferay.document.library.web.internal.webdav.DLWebDAVStorageImpl.java

License:Open Source License

protected Resource toResource(WebDAVRequest webDAVRequest, Folder folder, boolean appendPath) {

    String parentPath = getRootPath() + webDAVRequest.getPath();

    String name = StringPool.BLANK;

    if (appendPath) {
        name = folder.getName();/*from w ww. j  a v  a  2s.  c  o m*/
    }

    Resource resource = new BaseResourceImpl(parentPath, name, folder.getName(), folder.getCreateDate(),
            folder.getModifiedDate());

    resource.setModel(folder);
    resource.setClassName(Folder.class.getName());
    resource.setPrimaryKey(folder.getPrimaryKey());

    return resource;
}

From source file:com.liferay.portlet.documentlibrary.webdav.DLWebDAVStorageImpl.java

License:Open Source License

protected Resource toResource(WebDAVRequest webDavRequest, Folder folder, boolean appendPath) {

    String parentPath = getRootPath() + webDavRequest.getPath();
    String name = StringPool.BLANK;

    if (appendPath) {
        name = folder.getName();/*from  ww w  .  j  a v  a  2 s.co  m*/
    }

    Resource resource = new BaseResourceImpl(parentPath, name, folder.getName(), folder.getCreateDate(),
            folder.getModifiedDate());

    resource.setModel(folder);
    resource.setClassName(Folder.class.getName());
    resource.setPrimaryKey(folder.getPrimaryKey());

    return resource;
}