public final class GoalFacade
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static org.tencompetence.generated.model.Goal |
addGoal(org.tencompetence.generated.model.Goal goal,
com.liferay.portal.service.ServiceContext ctx)
Adds a new goal to the system.
|
static org.tencompetence.generated.model.Goal |
createGoal()
Creates the goal.
|
static org.tencompetence.generated.model.Goal |
getGoal(long goalId,
com.liferay.portal.service.ServiceContext ctx)
Gets the goal.
|
static org.tencompetence.generated.model.Goal |
getGoalByCompetenceProfileLevelId(long profileLevelId)
Gets a goal by profileLevelId.
|
static java.util.List<org.tencompetence.generated.model.Goal> |
getGoalsByIds(java.util.List<java.lang.Long> ids)
Gets the goals by ids.
|
static java.util.List<org.tencompetence.generated.model.Goal> |
getGoalsByTargetTypeAndTargetId(java.lang.String targetType,
long targetId)
Gets the goals by targetType and targetId.
|
static java.util.List<org.tencompetence.generated.model.Goal> |
getGoalsForUser(long userId,
com.liferay.portal.service.ServiceContext ctx)
Get all Goals which the user has created.
|
static java.util.List<org.tencompetence.generated.model.Goal> |
getGoalsForUserAndCurrentMap(long userId,
long mapId,
com.liferay.portal.service.ServiceContext ctx)
Get all Goals which the user has created and is coupled to the groupId.
|
static java.util.List<org.tencompetence.generated.model.Goal> |
getSubscribedGoalsForUser(long userId,
com.liferay.portal.service.ServiceContext ctx)
Get all Goals which the user is subscribed to.
|
static org.tencompetence.generated.model.Goal |
updateGoal(org.tencompetence.generated.model.Goal goal,
com.liferay.portal.service.ServiceContext ctx)
Updates a Goal.
|
public static org.tencompetence.generated.model.Goal createGoal() throws com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.SystemException
- the system exceptionpublic static org.tencompetence.generated.model.Goal updateGoal(org.tencompetence.generated.model.Goal goal, com.liferay.portal.service.ServiceContext ctx) throws com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.PortalException
goal
- the goal to updatectx
- the contextcom.liferay.portal.kernel.exception.SystemException
- thrown if a Validation error occurscom.liferay.portal.kernel.exception.PortalException
- the portal exceptionpublic static org.tencompetence.generated.model.Goal addGoal(org.tencompetence.generated.model.Goal goal, com.liferay.portal.service.ServiceContext ctx) throws com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.PortalException
goal
- the goal to addctx
- the ServiceContextcom.liferay.portal.kernel.exception.SystemException
- The SystemException thrown if a non valid goal is passedcom.liferay.portal.kernel.exception.PortalException
- portalExceptionpublic static java.util.List<org.tencompetence.generated.model.Goal> getGoalsForUser(long userId, com.liferay.portal.service.ServiceContext ctx) throws com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.PortalException
userId
- The userIdctx
- The ctxcom.liferay.portal.kernel.exception.SystemException
- SystemExceptioncom.liferay.portal.kernel.exception.PortalException
- PortalExceptionpublic static java.util.List<org.tencompetence.generated.model.Goal> getSubscribedGoalsForUser(long userId, com.liferay.portal.service.ServiceContext ctx) throws com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.PortalException
userId
- The userIdctx
- The ctxcom.liferay.portal.kernel.exception.SystemException
- SystemExceptioncom.liferay.portal.kernel.exception.PortalException
- PortalExceptionpublic static java.util.List<org.tencompetence.generated.model.Goal> getGoalsForUserAndCurrentMap(long userId, long mapId, com.liferay.portal.service.ServiceContext ctx) throws com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.PortalException
userId
- The userIdctx
- The ctxmapId
- the liferay groupIdcom.liferay.portal.kernel.exception.SystemException
- SystemExceptioncom.liferay.portal.kernel.exception.PortalException
- PortalExceptionpublic static org.tencompetence.generated.model.Goal getGoal(long goalId, com.liferay.portal.service.ServiceContext ctx) throws com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.PortalException
goalId
- the goal idctx
- the ctxcom.liferay.portal.kernel.exception.SystemException
- the system exceptioncom.liferay.portal.kernel.exception.PortalException
- the portal exceptionpublic static java.util.List<org.tencompetence.generated.model.Goal> getGoalsByIds(java.util.List<java.lang.Long> ids) throws com.liferay.portal.kernel.exception.SystemException
ids
- the idscom.liferay.portal.kernel.exception.SystemException
- the system exceptionpublic static java.util.List<org.tencompetence.generated.model.Goal> getGoalsByTargetTypeAndTargetId(java.lang.String targetType, long targetId) throws com.liferay.portal.kernel.exception.SystemException
targetType
- the target typetargetId
- the target idcom.liferay.portal.kernel.exception.SystemException
- the system exceptionpublic static org.tencompetence.generated.model.Goal getGoalByCompetenceProfileLevelId(long profileLevelId) throws com.liferay.portal.kernel.exception.SystemException
profileLevelId
- profileLevelIdcom.liferay.portal.kernel.exception.SystemException
- the system exception