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
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Filter skin directoryprotected File
Unzip file in temp directoryact
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) void
contextualize
(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 Details
-
_cocoonContext
The cocoon context
-
-
Constructor Details
-
UploadSkinAction
public UploadSkinAction()
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in 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
-