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
This action receive a form with the "importfile" zip file as an exported skin.
Replace existing skin
-
Field Summary
FieldsFields inherited from class org.apache.cocoon.acting.ServiceableAction
managerFields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidFilter skin directoryprotected FileUnzip file in temp directoryact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) voidcontextualize(Context context) Methods inherited from class org.apache.cocoon.acting.ServiceableAction
serviceMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_cocoonContext
The cocoon context
-
-
Constructor Details
-
UploadSkinAction
public UploadSkinAction()
-
-
Method Details
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception -
_unzip
Unzip file in temp directory- Parameters:
uploadedFile- the uploaded file- Returns:
- the unzipped file
- Throws:
IOException- if an I/O exception occurs
-
_filter
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
-