Example #1
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;
 }
Example #2
0
 public FileTransferBase(FileTransferBase item)
 {
     CloneOf         = item.CloneOf;
     IdItem          = item.Id;
     UniqueIdItem    = item.UniqueIdItem;
     IdVersion       = item.IdVersion;
     UniqueIdVersion = item.UniqueIdVersion;
     Info            = item.Info;
     Path            = item.Path;
     Filename        = item.Filename;
     ModifiedOn      = item.ModifiedOn;
     Decompress      = item.Decompress;
     isCompleted     = item.isCompleted;
     Policy          = item.Policy;
     Repository      = item.Repository;
 }
Example #3
0
        private static RepositoryItem CreateBaseItem(long idFather, dtoUploadedItem dto, Boolean isDownloadable, DisplayMode mode, lm.Comol.Core.DomainModel.litePerson person, DateTime date, String ipAddress, String proxyIpAddress, RepositoryIdentifier identifier)
        {
            RepositoryItem item = RepositoryItem.CreateBaseItem(idFather, dto.Type, dto.Name, dto.Extension, "", isDownloadable, mode, dto.IsVisible, person, date, ipAddress, proxyIpAddress, identifier);

            item.UniqueId        = dto.UniqueId;
            item.UniqueIdVersion = dto.UniqueId;
            item.Size            = dto.Size;
            item.ContentType     = dto.ContentType;
            item.IsDownloadable  = isDownloadable;
            item.Type            = dto.Type;
            switch (dto.Type)
            {
            case ItemType.Multimedia:
            case ItemType.ScormPackage:
                item.Availability = ItemAvailability.transfer;
                item.Status       = ItemStatus.Active;
                break;

            default:
                item.Availability = ItemAvailability.available;
                item.Status       = ItemStatus.Active;
                break;
            }
            return(item);
        }
Example #4
0
 private static RepositoryItem CreateBaseItem(long idFather, dtoUploadedItem dto, Boolean isDownloadable, DisplayMode mode, lm.Comol.Core.DomainModel.litePerson person, DateTime date, String ipAddress, String proxyIpAddress, RepositoryType type, Int32 idCommunity)
 {
     return(CreateBaseItem(idFather, dto, isDownloadable, mode, person, date, ipAddress, proxyIpAddress, RepositoryIdentifier.Create(type, idCommunity)));
 }
Example #5
0
        public static RepositoryItem CreateFile(dtoUploadedItem dto, Boolean isDownloadable, DisplayMode mode, lm.Comol.Core.DomainModel.litePerson person, DateTime date, String ipAddress, String proxyIpAddress, RepositoryIdentifier identifier, Object obj, long idObject, Int32 idObjectType, Int32 idModule, String moduleCode, Int32 idModuleAjaxAction, Int32 idModuleAction = 0)
        {
            RepositoryItem item = RepositoryItem.CreateBaseItem(0, dto, isDownloadable, mode, person, date, ipAddress, proxyIpAddress, identifier.Type, identifier.IdCommunity);

            item.IsInternal                = true;
            item.Module                    = new ItemModuleSettings();
            item.Module.ModuleCode         = moduleCode;
            item.Module.IdObjectType       = idObjectType;
            item.Module.IdObject           = idObject;
            item.Module.IdModuleAction     = idModuleAction;
            item.Module.FullyQualifiedName = obj.GetType().FullName;
            item.Module.IdModuleAjaxAction = idModuleAjaxAction;
            return(item);
        }
Example #6
0
 public static RepositoryItem CreateFile(long idFather, dtoUploadedItem dto, Boolean isDownloadable, DisplayMode mode, lm.Comol.Core.DomainModel.litePerson person, DateTime date, String ipAddress, String proxyIpAddress, RepositoryIdentifier identifier)
 {
     return(RepositoryItem.CreateBaseItem(idFather, dto, isDownloadable, mode, person, date, ipAddress, proxyIpAddress, identifier));
 }
Example #7
0
 public RepositoryItem()
 {
     Versions   = new List <RepositoryItemVersion>();
     Module     = new ItemModuleSettings();
     Repository = new RepositoryIdentifier();
 }
Example #8
0
 public liteRepositoryItem()
 {
     Repository = new RepositoryIdentifier();
 }
Example #9
0
 public static String UserViewOfRepository(Int32 idCurrentUser, RepositoryType type, Int32 idCommunity, Boolean onlyFolder = false)
 {
     return(UserViewOfRepository(idCurrentUser, RepositoryIdentifier.Create(type, idCommunity), onlyFolder));
 }
Example #10
0
 public static String UserViewOfPartialRepository(Int32 idCurrentUser, RepositoryIdentifier identifier, Boolean onlyFolder = false)
 {
     return(UsersViewOfRepository(identifier) + idCurrentUser.ToString() + "_partial" + (onlyFolder ? "_Folders" : ""));
 }
Example #11
0
 public static String UsersViewOfRepository(RepositoryType type, Int32 idCommunity)
 {
     return(Repository(RepositoryIdentifier.Create(type, idCommunity)) + "_UserView_");
 }
Example #12
0
 public static String Repository(RepositoryIdentifier identifier)
 {
     return(Repository(identifier.Type, identifier.IdCommunity));
 }
 public lm.Comol.Core.FileRepository.Domain.ModuleRepository GetRepositoryPermissions(Int32 idCommunity, Int32 idPerson)
 {
     lm.Comol.Core.FileRepository.Domain.RepositoryIdentifier identifier = lm.Comol.Core.FileRepository.Domain.RepositoryIdentifier.Create((idCommunity > 0 ? lm.Comol.Core.FileRepository.Domain.RepositoryType.Community : lm.Comol.Core.FileRepository.Domain.RepositoryType.Portal), idCommunity);
     return(ServiceRepository.GetPermissions(identifier, idPerson));
 }
Example #14
0
 private static RepositoryItem CreateBaseItem(long idFather, ItemType itemType, String name, String extension, String url, Boolean isDownloadable, DisplayMode mode, Boolean isVisible, lm.Comol.Core.DomainModel.litePerson person, DateTime date, String ipAddress, String proxyIpAddress, RepositoryType type, Int32 idCommunity)
 {
     return(CreateBaseItem(idFather, itemType, name, extension, url, isDownloadable, mode, isVisible, person, date, ipAddress, proxyIpAddress, RepositoryIdentifier.Create(type, idCommunity)));
 }
Example #15
0
 public static String UsersSizeViewOfRepository(RepositoryIdentifier identifier)
 {
     return(UsersSizeViewOfRepository(identifier.Type, identifier.IdCommunity));
 }
Example #16
0
        private static RepositoryItem CreateBaseItem(long idFather, ItemType itemType, String name, String extension, String url, Boolean isDownloadable, DisplayMode mode, Boolean isVisible, lm.Comol.Core.DomainModel.litePerson person, DateTime date, String ipAddress, String proxyIpAddress, RepositoryIdentifier identifier)
        {
            RepositoryItem item = new RepositoryItem();

            item.AllowUpload     = false;
            item.Availability    = ItemAvailability.available;
            item.CloneOf         = 0;
            item.CloneOfUniqueId = Guid.Empty;
            item.ContentType     = "";
            item.CreateMetaInfo(person.Id, ipAddress, proxyIpAddress, date);
            item.DeletedSize     = 0;
            item.Description     = "";
            item.DisplayMode     = mode;
            item.DisplayOrder    = 0;
            item.Downloaded      = 0;
            item.IdCommunity     = (identifier.Type == RepositoryType.Community) ? identifier.IdCommunity : 0;
            item.Repository      = identifier;
            item.IdFolder        = idFather;
            item.IsDownloadable  = isDownloadable;
            item.IsFile          = (itemType != ItemType.Folder);
            item.IsInternal      = false;
            item.UniqueId        = Guid.NewGuid();
            item.UniqueIdVersion = item.UniqueId;
            item.VersionsSize    = 0;
            item.Name            = name;
            item.Extension       = extension;
            item.Url             = url;
            item.IsVirtual       = false;
            item.IsVisible       = isVisible;
            item.Number          = 0;
            item.IdOwner         = person.Id;
            item.Size            = 0;
            item.Status          = ItemStatus.Active;
            item.Tags            = "";
            item.Thumbnail       = "";
            item.AutoThumbnail   = false;
            item.Type            = itemType;
            item.Module          = null;
            return(item);
        }
Example #17
0
 public RepositoryFullSize()
 {
     Repository = new RepositoryIdentifier();
 }
Example #18
0
 public liteBaseAssignments()
 {
     Repository = new RepositoryIdentifier();
 }
Example #19
0
 public FileTransferBase()
 {
     Policy     = TransferPolicy.none;
     Repository = new RepositoryIdentifier();
 }