Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        public static RepositoryItem CreateFolder(long idFather, dtoFolderName dto, lm.Comol.Core.DomainModel.litePerson person, DateTime date, String ipAddress, String proxyIpAddress, RepositoryType type, Int32 idCommunity)
        {
            RepositoryItem folder = RepositoryItem.CreateBaseItem(idFather, ItemType.Folder, dto.Name, "", "", true, DisplayMode.downloadOrPlay, dto.IsVisible, person, date, ipAddress, proxyIpAddress, type, idCommunity);

            folder.AllowUpload = dto.AllowUpload;
            return(folder);
        }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
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));
 }
Exemplo n.º 5
0
 public static RepositoryItem CreateLink(long idFather, dtoUrlItem dto, lm.Comol.Core.DomainModel.litePerson person, DateTime date, String ipAddress, String proxyIpAddress, RepositoryType type, Int32 idCommunity)
 {
     return(RepositoryItem.CreateBaseItem(idFather, ItemType.Link, dto.Name, "", dto.Address, true, DisplayMode.downloadOrPlay, dto.IsVisible, person, date, ipAddress, proxyIpAddress, type, idCommunity));
 }