Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
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));
 }
Ejemplo n.º 3
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));
 }