예제 #1
0
 public RepositoryItemObject(liteRepositoryItem item)
 {
     if (item != null)
     {
         IdItem          = item.Id;
         UniqueId        = item.UniqueId;
         IsFile          = item.IsFile;
         Type            = item.Type;
         Name            = item.Name;
         Extension       = item.Extension;
         Url             = item.Url;
         ContentType     = item.ContentType;
         Deleted         = item.Deleted;
         IsDownloadable  = item.IsDownloadable;
         IsInternal      = item.IsInternal;
         IdOwner         = item.IdOwner;
         IsVisible       = item.IsVisible;
         IdVersion       = item.IdVersion;
         UniqueIdVersion = item.UniqueIdVersion;
         Size            = item.Size;
         IsValid         = true;
     }
     else
     {
         Deleted = BaseStatusDeleted.Manual;
         IsValid = false;
     }
 }
 public dtoRepositoryItemToSelect(liteRepositoryItem item, String path, Boolean selectable, Boolean selected) : base(item, selectable, selected)
 {
     DisplayDate  = (item.ModifiedOn.HasValue ? item.ModifiedOn.Value : item.CreatedOn.Value);
     Availability = item.Availability;
     Downloads    = item.Downloaded;
     Path         = path;
 }
예제 #3
0
 public dtoBaseItem(liteRepositoryItem item)
 {
     Availability    = item.Availability;
     CloneOf         = item.CloneOf;
     CloneOfUniqueId = item.CloneOfUniqueId;
     ContentType     = item.ContentType;
     DeletedSize     = item.DeletedSize;
     DisplayOrder    = item.DisplayOrder;
     Extension       = item.Extension;
     Id              = item.Id;
     Deleted         = item.Deleted;
     IdCommunity     = item.IdCommunity;
     IdFolder        = item.IdFolder;
     IdVersion       = item.IdVersion;
     IsFile          = item.IsFile;
     IsInternal      = item.IsInternal;
     IsVirtual       = item.IsVirtual;
     IsVisible       = item.IsVisible;
     Module          = item.Module;
     Name            = item.Name;
     Size            = item.Size;
     Status          = item.Status;
     Type            = item.Type;
     UniqueId        = item.UniqueId;
     UniqueIdVersion = item.UniqueIdVersion;
     Url             = item.Url;
     VersionsSize    = item.VersionsSize;
     Repository      = item.Repository;
 }
 public dtoDisplayObjectRepositoryItem(liteModuleLink link, liteRepositoryItem item, liteRepositoryItemVersion version)
 {
     LinkedBy    = "";
     IdLinkedBy  = 0;
     Permissions = new ItemPermission();
     Link        = link;
     Item        = item;
     Version     = version;
     if (version != null)
     {
         Description     = version.Description;
         Name            = version.Name;
         DisplayName     = version.DisplayName;
         IdCreatedBy     = version.IdCreatedBy;
         CreatedOn       = version.CreatedOn;
         IdVersion       = version.Id;
         Type            = version.Type;
         IdItem          = item.Id;
         DisplayMode     = version.DisplayMode;
         Url             = version.Url;
         Extension       = version.Extension;
         AutoThumbnail   = version.AutoThumbnail;
         IdVersion       = version.Id;
         UniqueId        = item.UniqueId;
         UniqueIdVersion = version.UniqueIdVersion;
         IsDownlodable   = item.IsDownloadable;
     }
     else if (item != null)
     {
         Description     = item.Description;
         Name            = item.Name;
         DisplayName     = item.DisplayName;
         IdCreatedBy     = item.IdCreatedBy;
         CreatedOn       = item.CreatedOn;
         IdVersion       = 0;
         UniqueIdVersion = Guid.Empty;
         Type            = item.Type;
         IdItem          = item.Id;
         DisplayMode     = item.DisplayMode;
         Url             = item.Url;
         Extension       = item.Extension;
         AutoThumbnail   = item.AutoThumbnail;
         IsDownlodable   = item.IsDownloadable;
     }
     Availability = (Version != null ? Version.Availability : (Item != null ? Item.Availability : ItemAvailability.notavailable));
     Size         = FolderSizeItem.FormatBytes((Version != null ? Version.Size : (Item != null ? Item.Size :0)));
 }
예제 #5
0
 public dtoRepositoryItemToSelectBase(liteRepositoryItem item, Boolean selectable, Boolean selected)
 {
     Id              = item.Id;
     IdFolder        = item.IdFolder;
     UniqueId        = item.UniqueId;
     IdVersion       = item.IdVersion;
     UniqueIdVersion = item.UniqueIdVersion;
     IgnoreVersion   = true;
     Type            = item.Type;
     Name            = item.Name;
     Extension       = item.Extension;
     DisplayName     = item.DisplayName;
     Url             = item.Url;
     Size            = item.Size;
     Module          = item.Module;
     Url             = item.Url;
     Selectable      = selectable;
     Selected        = selected;
 }
예제 #6
0
 public dtoModuleUploadedItem(liteRepositoryItem item, liteRepositoryItemVersion version, ItemUploadError error)
 {
     Error        = error;
     ItemAdded    = item;
     VersionAdded = version;
 }
예제 #7
0
 public AttachmentFile(BaseForPaper callForPaper, lm.Comol.Core.FileRepository.Domain.liteRepositoryItem item)
     : this()
 {
     Call = callForPaper;
     Item = item;
 }
예제 #8
0
        public dtoBaseRepositoryItem(liteRepositoryItem item, lm.Comol.Core.DomainModel.litePerson owner = null, lm.Comol.Core.DomainModel.litePerson modifiedBy = null, String unknownUser = "")
        {
            Id              = item.Id;
            Deleted         = item.Deleted;
            IdFolder        = item.IdFolder;
            UniqueId        = item.UniqueId;
            IdVersion       = item.IdVersion;
            UniqueIdVersion = item.UniqueIdVersion;
            IdCommunity     = item.IdCommunity;
            Type            = item.Type;
            Name            = item.Name;
            Extension       = item.Extension;
            Url             = item.Url;
            ContentType     = item.ContentType;
            IsFile          = item.IsFile;
            IdOwner         = item.IdOwner;


            if (owner == null || owner.TypeID == (int)lm.Comol.Core.DomainModel.UserTypeStandard.Guest)
            {
                OwnerName = unknownUser;
            }
            else
            {
                OwnerName = owner.SurnameAndName;
            }

            CreatedOn    = (item.CreatedOn.HasValue ? item.CreatedOn.Value : (item.ModifiedOn.HasValue ? item.ModifiedOn.Value : DateTime.Now));
            IdModifiedBy = item.IdModifiedBy;
            if (owner == null || owner.TypeID == (int)lm.Comol.Core.DomainModel.UserTypeStandard.Guest)
            {
                OwnerName = unknownUser;
            }
            else
            {
                OwnerName = owner.SurnameAndName;
            }
            ModifiedOn = item.ModifiedOn;
            if (modifiedBy == null || modifiedBy.TypeID == (int)lm.Comol.Core.DomainModel.UserTypeStandard.Guest)
            {
                ModifiedBy = unknownUser;
            }
            else
            {
                ModifiedBy = modifiedBy.SurnameAndName;
            }

            Size            = item.Size;
            VersionsSize    = item.VersionsSize;
            DeletedSize     = item.DeletedSize;
            Description     = item.Description;
            Tags            = item.Tags;
            IsDownloadable  = item.IsDownloadable;
            CloneOf         = item.CloneOf;
            CloneOfUniqueId = item.CloneOfUniqueId;
            Repository      = item.Repository;
            #region "Folder"
            AllowUpload = item.AllowUpload;
            FolderType  = (item.IsFile ? lm.Comol.Core.FileRepository.Domain.FolderType.none : Domain.FolderType.standard);
            #endregion
            #region "Visibility"
            IsVisible    = item.IsVisible;
            DisplayOrder = item.DisplayOrder;
            Availability = item.Availability;
            Status       = item.Status;
            #endregion
            #region "Special data"
            HasVersions     = item.HasVersions;
            RevisionsNumber = item.RevisionsNumber;
            DisplayMode     = item.DisplayMode;
            AutoThumbnail   = item.AutoThumbnail;
            Thumbnail       = item.Thumbnail;
            PreviewTime     = item.PreviewTime;
            Time            = item.Time;
            Number          = item.Number;
            #endregion
            IdPlayer   = item.IdPlayer;
            Downloaded = item.Downloaded;
            IsInternal = item.IsInternal;
            Module     = item.Module;
            IsVirtual  = item.IsVirtual;
        }
예제 #9
0
 public dtoItemToDelete(liteRepositoryItem item) : base(item)
 {
     LinkedModules = new List <string>();
     IsDeleteAllowedFromCascade = true;
 }
예제 #10
0
 public dtoRepositoryItem(liteRepositoryItem item, dtoRepositoryItem father = null, lm.Comol.Core.DomainModel.litePerson owner = null, lm.Comol.Core.DomainModel.litePerson modifiedBy = null, String unknownUser = "")
     : base(item, owner, modifiedBy, unknownUser)
 {
     Children = new List <dtoRepositoryItem>();
     Father   = father;
 }