public class CheckPathAccessAction extends ServiceableAction
Modifier and Type | Field and Description |
---|---|
private CurrentUserProvider |
_currentUserProvider |
private AmetysObjectResolver |
_resolver |
private RightManager |
_rightManager |
private SourceResolver |
_srcResolver |
manager
EMPTY_MAP
Constructor and Description |
---|
CheckPathAccessAction() |
Modifier and Type | Method and Description |
---|---|
private void |
_checkPageAccess(ZoneItem zoneItem) |
protected String |
_decodePath(String path)
Decode the resource path
|
protected void |
_setHeader(String name,
Response response)
Set Content-Disposition header at attachement, with the file name
|
Map |
act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String source,
Parameters parameters) |
void |
service(ServiceManager smanager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private SourceResolver _srcResolver
private AmetysObjectResolver _resolver
private CurrentUserProvider _currentUserProvider
private RightManager _rightManager
public CheckPathAccessAction()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableAction
ServiceException
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
Exception
private void _checkPageAccess(ZoneItem zoneItem) throws AuthorizationRequiredException, AmetysRepositoryException, AccessDeniedException
protected String _decodePath(String path) throws UnsupportedEncodingException, URISyntaxException
path
- the resource pathUnsupportedEncodingException
- if UTF-8 encoding is not supportedURISyntaxException
- if an error occurredprotected void _setHeader(String name, Response response)
name
- file name to encoderesponse
- request response where the header will be set