Package org.ametys.web.skin.actions
Class UploadSkinAction
- java.lang.Object
 - 
- org.apache.avalon.framework.logger.AbstractLogEnabled
 - 
- org.apache.cocoon.acting.AbstractAction
 - 
- org.apache.cocoon.acting.ServiceableAction
 - 
- org.ametys.web.skin.actions.UploadSkinAction
 
 
 
 
 
- 
- All Implemented Interfaces:
 Component,Contextualizable,LogEnabled,Serviceable,Action
- Direct Known Subclasses:
 UploadArtisteerSkinAction,UploadModelAction
public class UploadSkinAction extends ServiceableAction implements Contextualizable
This action receive a form with the "importfile" zip file as an exported skin. Replace existing skin 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected Context_cocoonContextThe cocoon context- 
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager 
- 
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP 
 - 
 
- 
Constructor Summary
Constructors Constructor Description UploadSkinAction() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_filter(File skinDir, String absoluteSkinPath, boolean isModel)Filter skin directoryprotected File_unzip(File uploadedFile)Unzip file in temp directoryMapact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)voidcontextualize(Context context)- 
Methods inherited from class org.apache.cocoon.acting.ServiceableAction
service 
- 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger 
 - 
 
 - 
 
- 
- 
Field Detail
- 
_cocoonContext
protected Context _cocoonContext
The cocoon context 
 - 
 
- 
Constructor Detail
- 
UploadSkinAction
public UploadSkinAction()
 
 - 
 
- 
Method Detail
- 
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
 contextualizein interfaceContextualizable- Throws:
 ContextException
 
- 
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
 
- 
_unzip
protected File _unzip(File uploadedFile) throws IOException
Unzip file in temp directory- Parameters:
 uploadedFile- the uploaded file- Returns:
 - the unzipped file
 - Throws:
 IOException- if an I/O exception occurs
 
- 
_filter
protected void _filter(File skinDir, String absoluteSkinPath, boolean isModel) throws IOException
Filter skin directory- Parameters:
 skinDir- the skin directoryabsoluteSkinPath- the absolute path of tmp skin directoryisModel- true if the uploaded skin is the model of skin.- Throws:
 IOException- if an error occurred
 
 - 
 
 -