1 23 24 package org.apache.slide.webdav.util.resourcekind; 25 26 import java.util.Set ; 27 28 29 public class CheckedOutImpl extends AbstractResourceKind implements CheckedOut { 30 31 protected static ResourceKind singleton = null; 32 33 36 static public ResourceKind getInstance() { 37 if( singleton == null ) 38 singleton = new CheckedOutImpl(); 39 return singleton; 40 } 41 42 45 protected CheckedOutImpl() { 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_CHECKED_OUT ); 61 s.add( P_PREDECESSOR_SET ); 62 } 63 if( isSupportedFeature(F_CHECKOUT_IN_PLACE, excludedFeatures) 64 || isSupportedFeature(F_WORKING_RESOURCE, excludedFeatures) ) { 65 s.add( P_CHECKOUT_FORK ); 66 s.add( P_CHECKIN_FORK ); 67 } 68 if( isSupportedFeature(F_MERGE, excludedFeatures) ) { 69 s.add( P_MERGE_SET ); 70 s.add( P_AUTO_MERGE_SET ); 71 } 72 if( isSupportedFeature(F_ACTIVITY, excludedFeatures) ) { 73 s.add( P_UNRESERVED ); 74 s.add( P_ACTIVITY_SET ); 75 } 76 return s; 77 } 78 79 82 public Set getSupportedMethods() { 83 Set s = super.getSupportedMethods(); 84 if( isSupportedFeature(F_CHECKOUT_IN_PLACE) || isSupportedFeature(F_WORKING_RESOURCE) ) 85 s.add( M_CHECKIN ); 86 return s; 87 } 88 89 92 public Set getSupportedReports() { 93 Set s = super.getSupportedReports(); 94 return s; 95 } 96 } 97 98 | Popular Tags |