Class MemberHelper
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.workspaces.members.MemberHelper
-
- All Implemented Interfaces:
LogEnabled,Component,Serviceable
public class MemberHelper extends AbstractLogEnabled implements Serviceable, Component
Helper for members
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentHelper_contentHelperThe content helperprotected ContentSearcherFactory_contentSearcherFactoryThe content searcherprotected AmetysObjectResolver_resolverThe AMetys object resolverstatic StringROLEThe Avalon role
-
Constructor Summary
Constructors Constructor Description MemberHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getKeywords(Content content)Get the keywords' id of a memberList<Content>getRelatedMembers(Content content, int max)Get the related members based on common skills and keywordsList<String>getSkills(Content content)Get the skills' id of a membervoidservice(ServiceManager smanager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_contentSearcherFactory
protected ContentSearcherFactory _contentSearcherFactory
The content searcher
-
_resolver
protected AmetysObjectResolver _resolver
The AMetys object resolver
-
_contentHelper
protected ContentHelper _contentHelper
The content helper
-
-
Constructor Detail
-
MemberHelper
public MemberHelper()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getSkills
public List<String> getSkills(Content content)
Get the skills' id of a member- Parameters:
content- the content- Returns:
- the skills' id.
-
getKeywords
public List<String> getKeywords(Content content)
Get the keywords' id of a member- Parameters:
content- the content- Returns:
- the keywords' id.
-
getRelatedMembers
public List<Content> getRelatedMembers(Content content, int max) throws Exception
Get the related members based on common skills and keywords- Parameters:
content- the current member contentmax- the max number of related members- Returns:
- the related members
- Throws:
Exception- if search failed
-
-