差分発生行の前後
無視リスト:
更新日時:
2007/02/17 15:28:26 (5 年 前)
更新者:
kazu
ログメッセージ:
 
ファイル:
1 変更

凡例:

変更なし
追加
削除
  • tPod/trunk/src/jp/tyzoh/rinza/folksonomy/tpod/Engine.java

    r7 r8  
    461461        } 
    462462 
     463        public synchronized String registerURL(String title, String url, String uid, String time, String keyword, PrintWriter out) 
     464        { 
     465                long    no = System.currentTimeMillis(); 
     466                if (title.equals("")) { 
     467                        int     index = url.lastIndexOf("/"); 
     468                        if (index > -1) { 
     469                                title = url.substring(index); 
     470                        } 
     471                } 
     472                String  registeredURL = "URL:"+no+":"+title; 
     473                time = time.equals("")?Long.toString(new Date().getTime()):time; 
     474                String  category = "URL"; 
     475                User    user = searchUser(uid); 
     476                String  group = (String)user.getGroupList().get(0); 
     477 
     478                repository.registerFile(registeredURL, url, time, url, category, uid, user.getName(), group, "true", "true", "false", "false", cutSearchword(keyword)); 
     479 
     480                return registeredURL; 
     481        } 
     482 
    463483        public synchronized String registerFile(String uploadFileName, String uploadAbsolutePath, File uploadedFile, String uid, String time, String keyword, PrintWriter out) 
    464484        { 
     
    547567        { 
    548568                return repository.deleteKeyword(filename, cutSearchword(keyword)); 
     569        } 
     570 
     571        boolean changeTitle(String filename, String value) 
     572        { 
     573                return repository.changeTag(filename, "_name", value, null); 
     574        } 
     575 
     576        static boolean isURL(String filename) 
     577        { 
     578                return filename.startsWith("URL:"); 
     579        } 
     580 
     581        static String getURL(String filename) 
     582        { 
     583                if (isURL(filename)) { 
     584                        String  name = filename.substring("URL:".length()); 
     585                        int     index = name.indexOf(":"); 
     586                        if (index > -1) { 
     587                                name = name.substring(index + 1); 
     588                        } else { 
     589                                name = ""; // internal error 
     590                        } 
     591                        return name; 
     592                } else { 
     593                        return ""; 
     594                } 
    549595        } 
    550596