Package com.centraview.common

Examples of com.centraview.common.AuthorizationFailedException


    try
    {
      if (!CVUtility.isModuleVisible("Projects", userId, this.dataSource))
      {
        throw new AuthorizationFailedException("Projects - addProject");
      }

      dl.setSql("project.addproject");
      dl.setString(1, pvo.getTitle());
      dl.setString(2, pvo.getDescription());
View Full Code Here


  {
    try
    {
      if (!CVUtility.canPerformRecordOperation(userId, "Projects", pvo.getProjectID(), ModuleFieldRightMatrix.UPDATE_RIGHT, this.dataSource))
      {
        throw new AuthorizationFailedException("Projects - updateProject");
      }

      int projectId = pvo.getProjectID();

      CVDal dl = new CVDal(dataSource);
View Full Code Here

   */
  public ProjectDBVO getDBVO(int projectId, int userId)throws AuthorizationFailedException
  {
    if (!CVUtility.canPerformRecordOperation(userId, "Projects", projectId, ModuleFieldRightMatrix.VIEW_RIGHT, this.dataSource))
    {
      throw new AuthorizationFailedException("Projects - getProject");
    }

    CVDal cvdl = new CVDal(dataSource);
    cvdl.setSql("project.getproject");
    cvdl.setInt(1, projectId);
View Full Code Here

   */
  public ProjectVO getProject(int projectId, int userId)throws AuthorizationFailedException
  {
    if (!CVUtility.canPerformRecordOperation(userId, "Projects", projectId, ModuleFieldRightMatrix.VIEW_RIGHT, this.dataSource))
    {
      throw new AuthorizationFailedException("Projects - getProject");
    }

    CVDal cvdl = new CVDal(dataSource);
    cvdl.setSql("project.getproject");
    cvdl.setInt(1, projectId);
View Full Code Here

  public void deleteProject(int userID, int projectId) throws AuthorizationFailedException
  {

    if (!CVUtility.canPerformRecordOperation(userID, "Projects", projectId, ModuleFieldRightMatrix.DELETE_RIGHT, this.dataSource))
    {
      throw new AuthorizationFailedException("Projects - Delete Project");
    }

    try
    {
      CVDal cvdl = new CVDal(dataSource);
View Full Code Here

    try
    {
      if (! CVUtility.isModuleVisible("Tasks", userId, this.dataSource))
      {
        throw new AuthorizationFailedException("User does not have access to Tasks");
      }

      InitialContext ic = CVUtility.getInitialContext();
      ActivityHelperLocalHome home = (ActivityHelperLocalHome)ic.lookup("local/ActivityHelper");
      ActivityHelperLocal remote = (ActivityHelperLocal) home.create();
View Full Code Here

  public TaskVO getTask(int taskId, int userId)throws AuthorizationFailedException
  {
    if (!CVUtility.isModuleVisible("Tasks", userId, this.dataSource))
    {
      throw new AuthorizationFailedException("User does not have access to Tasks");
    }

    TaskVO tvo = new TaskVO();
    tvo.setTaskid("" + taskId);
    tvo.setActivityID(taskId);
View Full Code Here

  {
    try
    {
      if (! CVUtility.isModuleVisible("Tasks", userId, this.dataSource))
      {
        throw new AuthorizationFailedException("User does not have access to Tasks");
      }

      TaskDBVO tdbvo = new TaskDBVO();
      tdbvo = getDBVO(tvo.getActivityID());
      tvo = (TaskVO)CVUtility.replaceVO(tdbvo, tvo, "Tasks", userId, this.dataSource);
View Full Code Here

   */
  public void updateProjectTask(int userId, TaskVO tvo) throws AuthorizationFailedException
  {
    if (!CVUtility.canPerformRecordOperation(userId, "Tasks", tvo.getActivityID(),
        ModuleFieldRightMatrix.DELETE_RIGHT, this.dataSource)) {
      throw new AuthorizationFailedException(
          "<error> You don't have privilege to update some Records. </error>");
    }

    try {
      InitialContext ic = CVUtility.getInitialContext();
View Full Code Here

  public void deleteTask(int taskID, int individualID) throws AuthorizationFailedException
  {
    if (!CVUtility.canPerformRecordOperation(individualID, "Tasks", taskID,
        ModuleFieldRightMatrix.DELETE_RIGHT, this.dataSource)) {
      throw new AuthorizationFailedException(
          "<error> You don't have privilege to Delete some Records. </error>");
    }

    try {
      InitialContext ic = CVUtility.getInitialContext();
View Full Code Here

TOP

Related Classes of com.centraview.common.AuthorizationFailedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.