Package com.centraview.common

Examples of com.centraview.common.AuthorizationFailedException


   */
  public int duplicateOpportunity(int userId, OpportunityVO oVO)
      throws AuthorizationFailedException
  {
    if (!CVUtility.isModuleVisible("Opportunities", userId, this.dataSource))
      throw new AuthorizationFailedException("Opportunities - duplicateOpportunity");
    return 0;
  } // end of duplicateOpportunity method
View Full Code Here


   */
  public int addFolder(int individualId, CvFolderVO fdvo) throws CvFileException, AuthorizationFailedException
  {

    if (!CVUtility.isModuleVisible("File", individualId, this.dataSource)) {
      throw new AuthorizationFailedException("File - addFolder");
    }
    int folderID = 0;
    try {
      if (fdvo == null) {
        throw new CvFileException(CvFileException.INVALID_DATA, "Cannot add folder. FolderVo is empty.");
View Full Code Here

    // Java applications to return -1 (for an int) if an error.
    if (individualId != -13)
    {
      if (!CVUtility.canPerformRecordOperation(individualId,"CVFolder",folderId,ModuleFieldRightMatrix.VIEW_RIGHT, this.dataSource))
      {
        throw new AuthorizationFailedException("File - getFolder");
      }
    }

    CvFolderVO fdvo;
View Full Code Here

   * @exception   CvFileException
   */
  public void updateFolder(int individualId, CvFolderVO fdvo) throws CvFileException, AuthorizationFailedException
  {
    if(!CVUtility.canPerformRecordOperation(individualId,"CVFolder",fdvo.getFolderId(),ModuleFieldRightMatrix.UPDATE_RIGHT, this.dataSource) ) {
      throw new AuthorizationFailedException("File - updateFolder");
    }
    CVDal cvdl = new CVDal(dataSource);
    try
    {
      if (fdvo == null) {
View Full Code Here

   * @exception   CvFileException
   */
  public int addFile(int individualId, int folderId, CvFileVO flvo) throws CvFileException, AuthorizationFailedException
  {
    if (!CVUtility.isModuleVisible("File", individualId, this.dataSource)) {
      throw new AuthorizationFailedException("File - addFile");
    }
    int fileId = 0;
    CVDal cvdl = new CVDal(dataSource);
    try {
      if (flvo == null) {
View Full Code Here

      String visibility = (String)hm.get("visibility");
      if (! userAuthorized && (visibility == null || !visibility.equals("PUBLIC"))) {
        // if the record is not public, AND the authorization check
        // failed at the top of this method, NOW throw an AuthFailed exception
        throw new AuthorizationFailedException("File - getFile");
      }
     
      flvo.setFileId(((Number)hm.get("FileID")).intValue());
      flvo.setTitle((String)hm.get("Title"));
      flvo.setName((String)hm.get("Name"));
View Full Code Here

   * @exception CvFileException
   */
  public CvFileVO getFileBasic(int individualId, int fileId) throws CvFileException, AuthorizationFailedException
  {
    if (! CVUtility.canPerformRecordOperation(individualId,"File", fileId, ModuleFieldRightMatrix.VIEW_RIGHT, this.dataSource)) {
      throw new AuthorizationFailedException("File - getFileBasic");
    }
   
    CvFileVO flvo;
    CVDal cvdl = new CVDal(dataSource);
   
View Full Code Here

   * @exception CvFileException
   */
  public void updateFile(int individualId, int[] virtualFolderId, CvFileVO flvo) throws CvFileException, AuthorizationFailedException
  {
    if (!CVUtility.canPerformRecordOperation(individualId, "File", flvo.getFileId(), ModuleFieldRightMatrix.UPDATE_RIGHT, this.dataSource))
      throw new AuthorizationFailedException("File - updateFile");

    CVDal cvdl = new CVDal(dataSource);
    try {

      if (flvo == null)
View Full Code Here

   * @param   folderId
   */
  public void deleteFolder(int individualId, int folderId) throws AuthorizationFailedException
  {
    if (!CVUtility.canPerformRecordOperation(individualId, "CVFolder", folderId, ModuleFieldRightMatrix.DELETE_RIGHT, this.dataSource)) {
      throw new AuthorizationFailedException("File - deleteFolder");
    }
    CVDal dl = new CVDal(dataSource);
    try {
      removeFolderFiles(individualId, folderId, dl);// removes all the files of
                                                    // that folder
View Full Code Here

  }

  public void deleteFile(int individualId, int fileId,int currFolderID) throws  AuthorizationFailedException
  {
    if(!CVUtility.canPerformRecordOperation(individualId,"File",fileId,ModuleFieldRightMatrix.DELETE_RIGHT, this.dataSource) )
      throw new AuthorizationFailedException("File - deleteFile");

    CVDal dl = new CVDal(dataSource);
    try {
      dl.setSql("file.getfile");
      dl.setInt(1,fileId);
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.