Package de.innovationgate.webgate.api

Examples of de.innovationgate.webgate.api.WGBackendException


      _parent.commitHibernateTransaction();
      _parent.getDb().getUserCache().clear();
    }
    catch (Exception e) {
      _parent.rollbackHibernateTransaction();
      throw new WGBackendException("Error saving ACL entry", e);
    }
 
  }
View Full Code Here


      else {
        return null;
      }
    }
    catch (HibernateException e) {
      throw new WGBackendException("Error retrieving ACL entry with name '" + name + "'.", e);     
    }

  }
View Full Code Here

        }
        catch (FileNotFoundException e) {
            throw new WGIllegalArgumentException("Error attaching file - not found.", e);
        }
        catch (IOException e) {
            throw new WGBackendException("Error attaching file.", e);
        }
  }
View Full Code Here

                }
                else if (fileEntity instanceof ContainerFile) {
                    return ((ContainerFile) fileEntity).getData().getBinaryStream();
                }
                else {
                    throw new WGBackendException("Unknown file entity type " + fileEntity.getClass().getName());
                }
            }
            else {
                return null;
            }
           
            /*strFile = _parent.convertFileNameForAttaching(strFile);

            if (_content != null) {
                ContentFile fileAtt = (ContentFile) _content.getFiles().get(strFile);
                if (fileAtt == null) {
                    return null;
                }
                return fileAtt.getData().getBinaryStream();
            }
            else if (_entity instanceof FileContainer) {
                FileContainer cont = (FileContainer) _entity;
                ContainerFile fileAtt = (ContainerFile) cont.getFiles().get(strFile);
                if (fileAtt == null) {
                    return null;
                }
                return fileAtt.getData().getBinaryStream();
            }
            else {
                return null;
            }*/
        }
        catch (SQLException e) {
            throw new WGBackendException("Error retrieving file data", e);
        }
  }
View Full Code Here

        String hqlQuery = "select cfp from ContainerFilePart as cfp where cfp.meta=:metaEntity order by cfp.partnr asc";
        Query query = _parent.getSession().createQuery(hqlQuery);                   
            query.setParameter("metaEntity", meta);             
            return createOptimizedInputStream(query);
      } else {
        throw new WGBackendException("Unknown file entity type "
            + fileEntity.getClass().getName());
      }
    } else {
      return null;
    }
View Full Code Here

        }
        else if (_entity instanceof FileContainer) {
             hqlQuery = "select cf.name from ContainerFile cf where cf.parentcontainer=:entity";
        }
        else {
            throw new WGBackendException("Unknown entity type " + _entity.getClass().getName());
        }
       
        Query query = _parent.getSession().createQuery(hqlQuery);
        query.setParameter("entity", _entity);
        return query.list();
View Full Code Here

        }
        else if (_entity instanceof FileContainer) {
          return new ArrayList(((FileContainer)_entity).getFiles().keySet());
        }
        else {
            throw new WGBackendException("Unknown entity type " + _entity.getClass().getName());
        }
  }
View Full Code Here

           return (int) meta.getSize();
         } else {
           return -1;
         }
         } else {
             throw new WGBackendException("Unknown entity type " + _entity.getClass().getName());
         }
  }
View Full Code Here

                }
                else if (fileEntity instanceof ContainerFile) {
                    return (int) ((ContainerFile) fileEntity).getData().length();
                }
                else {
                    throw new WGBackendException("Unknown file entity type " + fileEntity.getClass().getName());
                }
            }
            else {
                return -1;
            }

          /*  if (_content != null) {
                ContentFile fileAtt = (ContentFile) _content.getFiles().get(strFile);
                if (fileAtt == null) {
                    return -1;
                }
                return (int) fileAtt.getData().length();
            }
            else if (_entity instanceof FileContainer) {
                FileContainer cont = (FileContainer) _entity;
                ContainerFile fileAtt = (ContainerFile) cont.getFiles().get(strFile);
                if (fileAtt == null) {
                    return -1;
                }
                return (int) fileAtt.getData().length();
            }
            else {
                return -1;
            }*/
        }
        catch (HibernateException e) {
            throw new WGBackendException("Error retrieving blob size", e);
        }
        catch (SQLException e) {
            throw new WGBackendException("Error retrieving blob size", e);
        }
  }
View Full Code Here

        }
        else if (_entity instanceof FileContainer) {
            hqlQuery = "select cf from ContainerFile cf where cf.parentcontainer=:entity and cf.name=:name";
        }
        else {
            throw new WGBackendException("Unknown entity type " + _entity.getClass().getName());
        }
       
        Query query = _parent.getSession().createQuery(hqlQuery);
        query.setParameter("entity", _entity);
        query.setParameter("name", strFile);
View Full Code Here

TOP

Related Classes of de.innovationgate.webgate.api.WGBackendException

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.