/**
* Fill the set of default properties
*/
protected void initProperties() {
if (getDisplayName() != null) {
properties.add(new DefaultDavProperty(DavPropertyName.DISPLAYNAME, getDisplayName()));
}
if (isCollection()) {
properties.add(new ResourceType(ResourceType.COLLECTION));
// Windows XP support
properties.add(new DefaultDavProperty(DavPropertyName.ISCOLLECTION, "1"));
} else {
properties.add(new ResourceType(ResourceType.DEFAULT_RESOURCE));
// Windows XP support
properties.add(new DefaultDavProperty(DavPropertyName.ISCOLLECTION, "0"));
}
// todo: add etag
// default last modified
setModificationTime(new Date().getTime());
// default creation time
properties.add(new DefaultDavProperty(DavPropertyName.CREATIONDATE, DavConstants.creationDateFormat.format(new Date(0))));
// supported lock property
properties.add(supportedLock);
// set current lock information. If no lock is applied to this resource,
// an empty lockdiscovery will be returned in the response.
properties.add(new LockDiscovery(getLocks()));
// observation resource
SubscriptionDiscovery subsDiscovery = subsMgr.getSubscriptionDiscovery(this);
properties.add(subsDiscovery);
properties.add(new SupportedMethodSetProperty(getSupportedMethods().split(",\\s")));
// DeltaV properties
properties.add(supportedReports);
// creator-displayname, comment: not value available from jcr
properties.add(new DefaultDavProperty(DeltaVConstants.CREATOR_DISPLAYNAME, null, true));
properties.add(new DefaultDavProperty(DeltaVConstants.COMMENT, null, true));
// 'workspace' property as defined by RFC 3253
String workspaceHref = getWorkspaceHref();
if (workspaceHref != null) {
properties.add(new HrefProperty(DeltaVConstants.WORKSPACE, workspaceHref, true));