当前位置: 首页>>代码示例>>Java>>正文


Java DavPropertyName.equals方法代码示例

本文整理汇总了Java中org.apache.jackrabbit.webdav.property.DavPropertyName.equals方法的典型用法代码示例。如果您正苦于以下问题:Java DavPropertyName.equals方法的具体用法?Java DavPropertyName.equals怎么用?Java DavPropertyName.equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.jackrabbit.webdav.property.DavPropertyName的用法示例。


在下文中一共展示了DavPropertyName.equals方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setLiveProperty

import org.apache.jackrabbit.webdav.property.DavPropertyName; //导入方法依赖的package包/类
/** */
protected void setLiveProperty(WebDavProperty property, boolean create)
    throws CosmoDavException {
    super.setLiveProperty(property, create);

    ContentItem content = (ContentItem) getItem();
    if (content == null) {
        return;
    }

    DavPropertyName name = property.getName();
    if (name.equals(DavPropertyName.GETCONTENTLENGTH)) {
        throw new ProtectedPropertyModificationException(name);
    }

    // content type is settable by subclasses
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:18,代码来源:DavContentBase.java

示例2: setLiveProperty

import org.apache.jackrabbit.webdav.property.DavPropertyName; //导入方法依赖的package包/类
/** */
protected void setLiveProperty(WebDavProperty property, boolean create)
        throws CosmoDavException {
    super.setLiveProperty(property, create);

    CollectionItem cc = (CollectionItem) getItem();
    if (cc == null) {
        return;
    }

    DavPropertyName name = property.getName();
    if (property.getValue() == null) {
        throw new UnprocessableEntityException("Property " + name
                + " requires a value");
    }

    if (name.equals(EXCLUDEFREEBUSYROLLUP)) {
        Boolean flag = Boolean.valueOf(property.getValueText());
        cc.setExcludeFreeBusyRollup(flag);
    }
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:22,代码来源:DavCollectionBase.java

示例3: setResourceProperty

import org.apache.jackrabbit.webdav.property.DavPropertyName; //导入方法依赖的package包/类
/**
 * Calls {@link #setLiveProperty(WebDavProperty)} or
 * {@link setDeadProperty(WebDavProperty)}.
 */
protected void setResourceProperty(WebDavProperty property, boolean create)
    throws CosmoDavException {
    DavPropertyName name = property.getName();
    if (name.equals(SUPPORTEDREPORTSET)) {
        throw new ProtectedPropertyModificationException(name);
    }

    if (isLiveProperty(property.getName())) {
        setLiveProperty(property, create);
    }
    else { 
        setDeadProperty(property);
    }
    
    properties.add(property);
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:21,代码来源:DavResourceBase.java

示例4: removeResourceProperty

import org.apache.jackrabbit.webdav.property.DavPropertyName; //导入方法依赖的package包/类
/**
 * Calls {@link #removeLiveProperty(DavPropertyName)} or
 * {@link removeDeadProperty(DavPropertyName)}.
 */
protected void removeResourceProperty(DavPropertyName name)
    throws CosmoDavException {
    if (name.equals(SUPPORTEDREPORTSET)) {
        throw new ProtectedPropertyModificationException(name);
    }

    if (isLiveProperty(name)) {
        removeLiveProperty(name);
    }
    else {         
        removeDeadProperty(name);
    }
    
    properties.remove(name);
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:20,代码来源:DavResourceBase.java

示例5: setLiveProperty

import org.apache.jackrabbit.webdav.property.DavPropertyName; //导入方法依赖的package包/类
protected void setLiveProperty(WebDavProperty property, boolean create)
        throws CosmoDavException {
    if (item == null) {
        return;
    }

    DavPropertyName name = property.getName();
    if (property.getValue() == null) {
        throw new UnprocessableEntityException("Property " + name
                + " requires a value");
    }

    if (name.equals(DavPropertyName.CREATIONDATE)
            || name.equals(DavPropertyName.GETLASTMODIFIED)
            || name.equals(DavPropertyName.GETETAG)
            || name.equals(DavPropertyName.RESOURCETYPE)
            || name.equals(DavPropertyName.ISCOLLECTION)
            || name.equals(OWNER) || name.equals(PRINCIPALCOLLECTIONSET)
            || name.equals(TICKETDISCOVERY) || name.equals(UUID)) {
        throw new ProtectedPropertyModificationException(name);
    }

    if (name.equals(DavPropertyName.DISPLAYNAME)) {
        item.setDisplayName(property.getValueText());
    }
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:27,代码来源:DavItemResourceBase.java

示例6: removeLiveProperty

import org.apache.jackrabbit.webdav.property.DavPropertyName; //导入方法依赖的package包/类
protected void removeLiveProperty(DavPropertyName name)
        throws CosmoDavException {
    if (item == null) {
        return;
    }

    if (name.equals(DavPropertyName.CREATIONDATE)
            || name.equals(DavPropertyName.GETLASTMODIFIED)
            || name.equals(DavPropertyName.GETETAG)
            || name.equals(DavPropertyName.DISPLAYNAME)
            || name.equals(DavPropertyName.RESOURCETYPE)
            || name.equals(DavPropertyName.ISCOLLECTION)
            || name.equals(OWNER) || name.equals(PRINCIPALCOLLECTIONSET)
            || name.equals(TICKETDISCOVERY) || name.equals(UUID)) {
        throw new ProtectedPropertyModificationException(name);
    }

    getProperties().remove(name);
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:20,代码来源:DavItemResourceBase.java

示例7: removeLiveProperty

import org.apache.jackrabbit.webdav.property.DavPropertyName; //导入方法依赖的package包/类
/** */
protected void removeLiveProperty(DavPropertyName name, boolean create)
    throws CosmoDavException {
    super.removeLiveProperty(name);

    ContentItem content = (ContentItem) getItem();
    if (content == null) {
        return;
    }

    if (name.equals(DavPropertyName.GETCONTENTLENGTH) ||
        name.equals(DavPropertyName.GETCONTENTTYPE)) {
        throw new ProtectedPropertyModificationException(name);
    }
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:16,代码来源:DavContentBase.java

示例8: setLiveProperty

import org.apache.jackrabbit.webdav.property.DavPropertyName; //导入方法依赖的package包/类
/** */
protected void setLiveProperty(WebDavProperty property, boolean create)
    throws CosmoDavException {
    super.setLiveProperty(property, create);

    FileItem content = (FileItem) getItem();
    if (content == null) {
        return;
    }

    DavPropertyName name = property.getName();
    String text = property.getValueText();

    if (name.equals(DavPropertyName.GETCONTENTLANGUAGE)) {
        content.setContentLanguage(text);
        return;
    }

    if (name.equals(DavPropertyName.GETCONTENTTYPE)) {
        String type = ContentTypeUtil.getMimeType(text);
        if (StringUtils.isBlank(type)) {
            throw new BadRequestException("Property " + name + " requires a valid media type");
        }
        content.setContentType(type);
        content.setContentEncoding(ContentTypeUtil.getEncoding(text));
    }
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:28,代码来源:DavFile.java

示例9: removeLiveProperty

import org.apache.jackrabbit.webdav.property.DavPropertyName; //导入方法依赖的package包/类
/** */
protected void removeLiveProperty(DavPropertyName name)
    throws CosmoDavException {
    super.removeLiveProperty(name);

    FileItem content = (FileItem) getItem();
    if (content == null) {
        return;
    }

    if (name.equals(DavPropertyName.GETCONTENTLANGUAGE)) {
        content.setContentLanguage(null);
        return;
    }
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:16,代码来源:DavFile.java

示例10: removeLiveProperty

import org.apache.jackrabbit.webdav.property.DavPropertyName; //导入方法依赖的package包/类
/** */
protected void removeLiveProperty(DavPropertyName name)
        throws CosmoDavException {
    super.removeLiveProperty(name);

    CollectionItem cc = (CollectionItem) getItem();
    if (cc == null) {
        return;
    }

    if (name.equals(EXCLUDEFREEBUSYROLLUP)) {
        cc.setExcludeFreeBusyRollup(false);
    }
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:15,代码来源:DavCollectionBase.java

示例11: setLiveProperty

import org.apache.jackrabbit.webdav.property.DavPropertyName; //导入方法依赖的package包/类
/** */
protected void setLiveProperty(WebDavProperty property, boolean create)
    throws CosmoDavException {
    super.setLiveProperty(property, create);

    DavPropertyName name = property.getName();
    if (name.equals(DavPropertyName.GETCONTENTTYPE)) {
        throw new ProtectedPropertyModificationException(name);
    }
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:11,代码来源:DavCalendarResource.java

示例12: setLiveProperty

import org.apache.jackrabbit.webdav.property.DavPropertyName; //导入方法依赖的package包/类
/**
 * The CALDAV:supported-calendar-component-set property is used to specify restrictions on the calendar component
 * types that calendar object resources may contain in a calendar collection. Any attempt by the client to store
 * calendar object resources with component types not listed in this property, if it exists, MUST result in an
 * error, with the CALDAV:supported-calendar-component precondition (Section 5.3.2.1) being violated. Since this
 * property is protected, it cannot be changed by clients using a PROPPATCH request.
 */
protected void setLiveProperty(WebDavProperty property, boolean create) throws CosmoDavException {
    super.setLiveProperty(property, create);

    CalendarCollectionStamp cc = getCalendarCollectionStamp();
    if (cc == null) {
        return;
    }

    DavPropertyName name = property.getName();
    if (property.getValue() == null) {
        throw new UnprocessableEntityException("Property " + name + " requires a value");
    }

    if (!(create && name.equals(SUPPORTEDCALENDARCOMPONENTSET)) && (name.equals(SUPPORTEDCALENDARCOMPONENTSET)
            || name.equals(SUPPORTEDCALENDARDATA) || name.equals(MAXRESOURCESIZE) || name.equals(GET_CTAG))) {
        throw new ProtectedPropertyModificationException(name);
    }

    if (name.equals(CALENDARDESCRIPTION)) {
        cc.setDescription(property.getValueText());
        cc.setLanguage(property.getLanguage());
        return;
    }

    if (name.equals(CALENDARTIMEZONE)) {
        cc.setTimezoneCalendar(TimeZoneExtractor.extract(property));
    }
    if (name.equals(XCaldavConstants.CALENDAR_COLOR)) {
        cc.setColor(property.getValueText());
    }
    if (name.equals(XCaldavConstants.CALENDAR_VISIBLE)) {
        cc.setVisibility(Boolean.parseBoolean(property.getValueText()));
    }
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:42,代码来源:DavCalendarCollection.java

示例13: removeLiveProperty

import org.apache.jackrabbit.webdav.property.DavPropertyName; //导入方法依赖的package包/类
/** */
protected void removeLiveProperty(DavPropertyName name) throws CosmoDavException {
    super.removeLiveProperty(name);

    CalendarCollectionStamp cc = getCalendarCollectionStamp();
    if (cc == null) {
        return;
    }

    if (name.equals(SUPPORTEDCALENDARCOMPONENTSET) || name.equals(SUPPORTEDCALENDARDATA)
            || name.equals(MAXRESOURCESIZE) || name.equals(GET_CTAG)) {
        throw new ProtectedPropertyModificationException(name);
    }

    if (name.equals(CALENDARDESCRIPTION)) {
        cc.setDescription(null);
        cc.setLanguage(null);
        return;
    }

    if (name.equals(CALENDARTIMEZONE)) {
        cc.setTimezoneCalendar(null);
        return;
    }
    if (name.equals(XCaldavConstants.CALENDAR_COLOR)) {
        cc.setColor(null);
    }
    if (name.equals(XCaldavConstants.CALENDAR_VISIBLE)) {
        cc.setVisibility(null);
    }
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:32,代码来源:DavCalendarCollection.java


注:本文中的org.apache.jackrabbit.webdav.property.DavPropertyName.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。