本文整理汇总了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
}
示例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);
}
}
示例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);
}
示例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);
}
示例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());
}
}
示例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);
}
示例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);
}
}
示例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));
}
}
示例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;
}
}
示例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);
}
}
示例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);
}
}
示例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()));
}
}
示例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);
}
}