List of usage examples for com.liferay.portal.kernel.webdav Resource setModel
public void setModel(Object model);
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();//w ww.ja 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; }
From source file:com.liferay.dynamic.data.mapping.webdav.DDMWebDav.java
License:Open Source License
public Resource toResource(WebDAVRequest webDAVRequest, String type, String rootPath, boolean appendPath) { String parentPath = rootPath + webDAVRequest.getPath(); String name = StringPool.BLANK; if (appendPath) { name = type;/*from w w w .j a v a2 s . co m*/ } Resource resource = new BaseResourceImpl(parentPath, name, type); resource.setModel(type); 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 w w w . j a va 2 s. c om*/ } 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.journal.webdav.JournalWebDAVStorageImpl.java
License:Open Source License
protected Resource toResource(WebDAVRequest webDavRequest, String type, boolean appendPath) { String parentPath = getRootPath() + webDavRequest.getPath(); String name = StringPool.BLANK; if (appendPath) { name = type;/* w w w .j a va 2 s . c o m*/ } Resource resource = new BaseResourceImpl(parentPath, name, type); resource.setModel(type); return resource; }