예제 #1
0
 public override void CheckoutResource(EngineRequest request, ResourceId resource)
 {
     CheckInitialization();
     Logger.Storage.Debug("Checking out the resource '" + resource.ToString() + "'");
     EngineMethods.CheckoutResource act = new EngineMethods.CheckoutResource(request, resource);
     act.Execute();
 }
예제 #2
0
 public Resource(ResourceId resourceId, string revision, string checkedOutTo, DateTime? checkedOutAt, 
     List<VersionId> versionIds, VersionId currentVersionId, Metadata metadata, 
     List<Security.UsageRight> usageRights)
     : this(resourceId, revision, versionIds, currentVersionId, metadata, usageRights)
 {
     CheckedOutTo = checkedOutTo;
     CheckedOutAt = checkedOutAt;
 }
예제 #3
0
 public Resource(ResourceId resourceId, string revision, List<VersionId> versionIds, 
     VersionId currentVersionId, Metadata metadata, List<Security.UsageRight> usageRights)
 {
     ResourceId = resourceId;
     Revision = revision;
     VersionIds = versionIds;
     CurrentVersionId = currentVersionId;
     Metadata = metadata;
     UsageRights = usageRights;
 }
예제 #4
0
        public VersionId(string resourceAndVersion)
        {
            long vnum;
            string[] str = resourceAndVersion.Split('-');

            if (str.Length != 2)
                throw new ArgumentException("Invalid argument.");

            ResourceId = new ResourceId(str[0]);

            if(!long.TryParse(str[1], out vnum))
                throw new ArgumentException("Version number could not be parsed.");

            VersionNumber = vnum;
        }
예제 #5
0
 public VersionId(ResourceId resourceId)
     : this(resourceId, 0)
 {
 }
예제 #6
0
 public VersionId(string resourceId, long versionNumber)
 {
     ResourceId = new ResourceId(resourceId);
     VersionNumber = versionNumber;
 }
예제 #7
0
 public VersionId(ResourceId resourceId, long versionNumber)
 {
     ResourceId = resourceId;
     VersionNumber = versionNumber;
 }
예제 #8
0
 public ResourceResult(ResourceId resourceId, string revision, List<VersionId> versionIds,
     VersionId currentVersionId, Metadata metadata, List<Security.UsageRight> usageRights)
     : base(resourceId, revision, versionIds, currentVersionId, metadata, usageRights)
 {
 }
예제 #9
0
 public override void RollbackResource(EngineRequest request, ResourceId resource, int rollbackDepth)
 {
     CheckInitialization();
     Logger.Storage.Debug("Rolling back resource '" + resource.Id.ToString("N") + "' a depth of " + rollbackDepth.ToString() + "...");
     EngineMethods.RollbackResource act = new EngineMethods.RollbackResource(request, resource, rollbackDepth);
     act.Execute();
 }
예제 #10
0
 public override void GetResourceReadOnly(EngineRequest request, ResourceId resource)
 {
     CheckInitialization();
     Logger.Storage.Debug("Getting a read-only version of the resource '" + resource.ToString() + "'...");
     EngineMethods.GetResourceReadOnly act = new EngineMethods.GetResourceReadOnly(request, resource);
     act.Execute();
 }