Example #1
0
        public IEnumerable<Tag> GetTags(object entryID, FileEntryType entryType, TagType tagType)
        {
            var q = Query("files_tag t")
                .InnerJoin("files_tag_link l", Exp.EqColumns("l.tag_id", "t.id"))
                .Select("t.name", "t.flag", "t.owner", "entry_id", "entry_type", "tag_count", "t.id")
                .Where("l.tenant_id", TenantID)
                .Where("l.entry_type", (int) entryType)
                .Where(Exp.Eq("l.entry_id", MappingID(entryID)))
                .Where("t.flag", (int) tagType);

            return SelectTagByQuery(q);
        }
Example #2
0
 public IEnumerable<Tag> GetTags(object entryID, FileEntryType entryType, TagType tagType)
 {
     return null;
 }
Example #3
0
 public IEnumerable<Tag> GetTags(object entryID, FileEntryType entryType, TagType tagType)
 {
     return TryGetTagDao().GetTags(entryID, entryType, tagType);
 }
Example #4
0
 public bool IsShared(object entryId, FileEntryType type)
 {
     throw new NotImplementedException();
 }
Example #5
0
 public IEnumerable <Tag> GetTags(string entryID, FileEntryType entryType, TagType tagType)
 {
     return(null);
 }
Example #6
0
 public IEnumerable <Tag> GetTags(string entryID, FileEntryType entryType, TagType tagType)
 {
     return(TagDao.GetTags(entryID, entryType, tagType));
 }
Example #7
0
 public bool IsShared(object entryId, FileEntryType type)
 {
     return(SecurityDao.IsShared(entryId, type));
 }
 public IEnumerable <Tag> GetTags(object entryID, FileEntryType entryType, TagType tagType)
 {
     return(new List <Tag>());
 }
Example #9
0
 public IEnumerable <Tag> GetTags(object entryID, FileEntryType entryType, TagType tagType)
 {
     return(TryGetTagDao().GetTags(entryID, entryType, tagType));
 }
Example #10
0
 public bool IsShared(object entryId, FileEntryType type)
 {
     return(Query(FilesDbContext.Security)
            .Any(r => r.EntryId == MappingID(entryId).ToString() &&
                 r.EntryType == type));
 }
Example #11
0
 public void Share(object entryId, FileEntryType entryType, Guid @for, FileShare share)
 {
     using (var dao = daoFactory.GetSecurityDao())
     {
         var r = new FileShareRecord
                     {
                         Tenant = CoreContext.TenantManager.GetCurrentTenant().TenantId,
                         EntryId = entryId,
                         EntryType = entryType,
                         Subject = @for,
                         Owner = SecurityContext.CurrentAccount.ID,
                         Share = share,
                     };
         dao.SetShare(r);
     }
 }
 public FileEntryInformation(FileEntryType fileType, string fullPath)
 {
     this.FileType = fileType;
     this.FullPath = fullPath;
 }