Class AddUserLinkAction
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.acting.AbstractAction
-
- org.apache.cocoon.acting.ServiceableAction
-
- org.ametys.plugins.linkdirectory.link.AddUserLinkAction
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
public class AddUserLinkAction extends ServiceableAction
Adds a new user link in Ametys.
-
-
Field Summary
Fields Modifier and Type Field Description protected CurrentUserProvider
_currentUserProvider
The current user providerprotected DirectoryHelper
_directoryHelper
The directory helperprivate static int
_ICO_REQUEST_TIMEOUT
protected JSONUtils
_jsonUtils
The JSON utilsprotected LinkDAO
_linkDAO
The DAO forLink
sprotected SiteManager
_siteManager
The site managerprotected UploadManager
_uploadManager
The upload managerprotected UrlPreviewComponent
_urlPreviewComponent
The url preview component-
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 AddUserLinkAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Map<String,Object>
_createUserLink(Request request, Map<String,Object> parameters)
protected Upload
_getLinkFavicon(String url, UserIdentity user, String userAgent)
Set the favicon of the link urlprivate void
_handleTheme(Request request, Map<String,Object> createParameters, String siteName, String lang)
Map
act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)
void
service(ServiceManager smanager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_ICO_REQUEST_TIMEOUT
private static int _ICO_REQUEST_TIMEOUT
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider
-
_directoryHelper
protected DirectoryHelper _directoryHelper
The directory helper
-
_siteManager
protected SiteManager _siteManager
The site manager
-
_urlPreviewComponent
protected UrlPreviewComponent _urlPreviewComponent
The url preview component
-
_uploadManager
protected UploadManager _uploadManager
The upload manager
-
_jsonUtils
protected JSONUtils _jsonUtils
The JSON utils
-
-
Constructor Detail
-
AddUserLinkAction
public AddUserLinkAction()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
- Throws:
Exception
-
_handleTheme
private void _handleTheme(Request request, Map<String,Object> createParameters, String siteName, String lang)
-
_createUserLink
private Map<String,Object> _createUserLink(Request request, Map<String,Object> parameters)
-
_getLinkFavicon
protected Upload _getLinkFavicon(String url, UserIdentity user, String userAgent)
Set the favicon of the link url- Parameters:
url
- the url of the faviconuser
- the useruserAgent
- The user agent- Returns:
- the favicon upload map
-
-