public class ProfileEntry extends java.lang.Object implements java.lang.Comparable<ProfileEntry>
ProfileLevelEntry
encapsulates a CompetenceProfileLevel
for usage in the paths list.Constructor and Description |
---|
ProfileEntry(org.tencompetence.generated.model.CompetenceProfile profile,
com.liferay.portal.service.ServiceContext ctx)
Instantiates a new path data.
|
Modifier and Type | Method and Description |
---|---|
org.tencompetence.generated.model.Goal |
activate(com.liferay.portal.service.ServiceContext ctx)
Makes this profile the active goal.
|
boolean |
associateGoal(java.util.List<org.tencompetence.generated.model.Goal> goals,
org.tencompetence.generated.model.Goal activeGoal)
Finds the associated goal from the passed list of goals.
|
int |
compareTo(ProfileEntry that) |
void |
deactivate()
Mark this profile as not being the active one.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDescription()
Gets the description.
|
org.tencompetence.generated.model.Goal |
getGoal()
Gets the goal.
|
long |
getId()
Gets the id.
|
java.util.List<org.tencompetence.generated.model.CompetenceProfileLevel> |
getLevels()
Gets the levels.
|
java.lang.String |
getMotivation()
Gets the motivation.
|
boolean |
getSelected()
Gets the selected indicator.
|
java.lang.Long |
getSelectedLevel()
Gets the selected level.
|
java.lang.String |
getTitle()
Gets the title.
|
int |
hashCode() |
boolean |
hasLevels()
Checks for levels.
|
boolean |
hasMultipleLevels()
Checks if the profile has multiple profile levels.
|
boolean |
isActive()
Checks if this profile is selected as the active goal.
|
boolean |
isSubscribed()
Checks if the user is subscribed to the path.
|
void |
save(com.liferay.portal.service.ServiceContext ctx)
Saves the associated goal.
|
void |
setMotivation(java.lang.String value)
Sets the motivation.
|
void |
setSelected(boolean value)
Marks entry as selected in list.
|
void |
setSelectedLevel(java.lang.Long level)
Sets the selected level.
|
public ProfileEntry(org.tencompetence.generated.model.CompetenceProfile profile, com.liferay.portal.service.ServiceContext ctx) throws com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.PortalException
profile
- the profilectx
- the ctxcom.liferay.portal.kernel.exception.PortalException
- the portal exceptioncom.liferay.portal.kernel.exception.SystemException
- the system exceptionpublic long getId()
public java.lang.String getTitle()
public java.lang.String getDescription()
public boolean getSelected()
public java.util.List<org.tencompetence.generated.model.CompetenceProfileLevel> getLevels()
public java.lang.Long getSelectedLevel()
public java.lang.String getMotivation()
public org.tencompetence.generated.model.Goal getGoal()
public void setSelected(boolean value)
value
- true if this entry is selectedpublic void setSelectedLevel(java.lang.Long level)
level
- the new selected levelpublic void setMotivation(java.lang.String value)
value
- the new motivationpublic boolean isSubscribed()
public boolean isActive()
public boolean hasLevels()
public boolean hasMultipleLevels()
public boolean associateGoal(java.util.List<org.tencompetence.generated.model.Goal> goals, org.tencompetence.generated.model.Goal activeGoal)
goals
- the list of goals of the useractiveGoal
- the active goalpublic org.tencompetence.generated.model.Goal activate(com.liferay.portal.service.ServiceContext ctx) throws com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.PortalException
ctx
- the service contextcom.liferay.portal.kernel.exception.SystemException
- the system exceptioncom.liferay.portal.kernel.exception.PortalException
- the portal exceptionpublic void deactivate()
public void save(com.liferay.portal.service.ServiceContext ctx) throws com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.PortalException
ctx
- the service contextcom.liferay.portal.kernel.exception.SystemException
- the system exceptioncom.liferay.portal.kernel.exception.PortalException
- the portal exceptionpublic int compareTo(ProfileEntry that)
compareTo
in interface java.lang.Comparable<ProfileEntry>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object