Example usage for com.liferay.portal.kernel.webdav Resource getClassName

List of usage examples for com.liferay.portal.kernel.webdav Resource getClassName

Introduction

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

Prototype

public String getClassName();

Source Link

Usage

From source file:it.smc.calendar.sync.caldav.methods.ProppatchMethodImpl.java

License:Open Source License

protected WebDAVProps getStoredProperties(WebDAVRequest webDAVRequest) throws PortalException, SystemException {

    WebDAVStorage storage = webDAVRequest.getWebDAVStorage();

    Resource resource = storage.getResource(webDAVRequest);

    WebDAVProps webDavProps = null;//from  ww w  . java2 s.  c o m

    if (resource.getPrimaryKey() <= 0) {
        if (_log.isWarnEnabled()) {
            _log.warn("There is no primary key set for resource");
        }

        throw new InvalidRequestException();
    } else if (resource.isLocked()) {
        Lock lock = resource.getLock();

        if ((lock == null) || !lock.getUuid().equals(webDAVRequest.getLockUuid())) {

            throw new LockException();
        }
    }

    webDavProps = WebDAVPropsLocalServiceUtil.getWebDAVProps(webDAVRequest.getCompanyId(),
            resource.getClassName(), resource.getPrimaryKey());

    return webDavProps;
}