Changeset 11159


Ignore:
Timestamp:
06/06/08 22:49:09 (4 years ago)
Author:
sys
Message:

Mime-type d'un item multi-res : issu de l'extension si fichier interne à l'item.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Jav_BDP/com/scenari/m/bdp/itemcontent/IHResourceDef.java

    r10706 r11159  
    4747 */ 
    4848public interface IHResourceDef { 
     49         
     50        public static final String URIRES_NONE = "."; 
    4951 
    5052        /** 
     
    5557        /**  
    5658         * Uri de cette ressource dans l'item.  
     59         *  
     60         * @return {@link #URIRES_NONE} if none. 
    5761         */ 
    5862        public String hGetUriRes() throws Exception; 
  • trunk/Jav_BDP_FS/com/scenari/m/bdp/item/fs/HContentAccessFs.java

    r11149 r11159  
    6969import com.scenari.s.co.transform.IHTransformer; 
    7070import com.scenari.s.fw.log.HLogMgr; 
     71import com.scenari.s.fw.util.mime.HMimeMgr; 
    7172import com.scenari.s.fw.utils.stream.HStream; 
    7273 
     
    254255                                vSource = vItem.fSource; 
    255256                                vRes = new XResource(); 
    256                                 vRes.hSetUriRes("."); 
     257                                vRes.hSetUriRes(IHResourceDef.URIRES_NONE); 
    257258                        } 
    258259                        vRes.hSetIdItem(pId); 
     
    262263                                vRes.hSetLength(vSource.hGetSize()); 
    263264                                vRes.hSetInputStream(vSource.hGetInputStream()); 
    264                                 vRes.hSetContentType(vItem.hGetItemType().hGetContentFormat()); 
     265                                if(vRes.hGetUriRes()==IHResourceDef.URIRES_NONE) { 
     266                                        vRes.hSetContentType(vItem.hGetItemType().hGetContentFormat()); 
     267                                } else { 
     268                                        //On est dans un folder. 
     269                                        vRes.hSetContentType(HMimeMgr.hGetMimeMgr(null).hGetMimeFromUrl(vRes.hGetUriRes())); 
     270                                } 
    265271                        } else { 
    266272                                vRes.hSetLastModif(new Date(vSource.hGetLastModifWithChilds())); 
Note: See TracChangeset for help on using the changeset viewer.