1 23 24 package org.apache.slide.webdav.util.resourcekind; 25 26 import java.util.Set ; 27 28 29 public class VersionControlledImpl extends AbstractResourceKind implements VersionControlled { 30 31 protected static ResourceKind singleton = null; 32 33 36 static public ResourceKind getInstance() { 37 if( singleton == null ) 38 singleton = new VersionControlledImpl(); 39 return singleton; 40 } 41 42 45 protected VersionControlledImpl() { 46 } 47 48 57 public Set getSupportedLiveProperties( String [] excludedFeatures ) { 58 Set s = super.getSupportedLiveProperties( excludedFeatures ); 59 if( isSupportedFeature(F_VERSION_CONTROL, excludedFeatures) ) 60 s.add( P_AUTO_VERSION ); 61 if( isSupportedFeature(F_VERSION_HISTORY, excludedFeatures) ) 62 s.add( P_VERSION_HISTORY ); 63 return s; 64 } 65 66 69 public Set getSupportedMethods() { 70 Set s = super.getSupportedMethods(); 71 if( isSupportedFeature(F_VERSION_CONTROL) ) 72 s.add( M_VERSION_CONTROL ); 73 if( isSupportedFeature(F_MERGE) ) 74 s.add( M_MERGE ); 75 return s; 76 } 77 78 81 public Set getSupportedReports() { 82 Set s = super.getSupportedReports(); 83 if( isSupportedFeature(F_VERSION_CONTROL) ) 84 s.add( R_VERSION_TREE ); 85 return s; 86 } 87 } 88 89 | Popular Tags |