Package org.efs.openreports.objects

Examples of org.efs.openreports.objects.ReportUser


 
  public String execute()
  {
    try
    {
      ReportUser reportUser = null;
     
      if (userId >= 0)
      {
        reportUser = userProvider.getUser(new Integer(userId));
      }
View Full Code Here


  public String execute()
  {
    try
    {
      ReportUser reportUser = null;
     
      if (userId >= 0)
      {
        reportUser = userProvider.getUser(new Integer(userId));
      }
View Full Code Here

  @Override
  public String execute()
  {
    try
    {
      ReportUser reportUser =
        (ReportUser) ActionContext.getContext().getSession().get(
          ORStatics.REPORT_USER);

      scheduledReports = schedulerProvider.getScheduledReports(reportUser);           
            deliveredReports = fileSystemDeliveryMethod.getDeliveredReports(reportUser);   
View Full Code Here

public class AdminUserCreator
{
  public static void main(String[] args)
  {
    ReportUser user = new ReportUser();
    user.setName(args[0]);
    user.setPassword(args[1]);
    user.setEmail(args[2]);
    user.setRootAdmin(true);
   
    try
    {
      FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext(
          "database/spring/applicationContext.xml");
View Full Code Here

           
            // save tags
            tagProvider.setTags(reportGroup.getId(), ReportGroup.class, tags, ORTag.TAG_TYPE_UI);
     
      // refresh current user
      ReportUser user = (ReportUser) ActionContext.getContext().getSession().get(ORStatics.REPORT_USER);   
      if (user != null)
      {
        user = userProvider.getUser(user.getId());
        session.put(ORStatics.REPORT_USER, user);
      }

      return SUCCESS;
    }
View Full Code Here

            ReportGroup reportGroup = (ReportGroup)object;
            return "<a href=\"editGroup.action?command=edit&amp;id=" + reportGroup.getId() + "\">Edit Group</a>";
        }
        else if (object instanceof ReportUser)
        {
            ReportUser reportUser = (ReportUser)object;
            return "<a href=\"editUser.action?command=edit&amp;id=" + reportUser.getId() + "\">Edit User</a>";
        }

        return "";
    }  
View Full Code Here

    {
        userService.authenticate(user);
       
        try
        {
            ReportUser reportUser = userProvider.getUser(user.getUserName(), user.getPassword());
       
            DeliveryMethod method = getDeliveryMethod(deliveryMethod);
           
            DeliveredReport[] reports = method.getDeliveredReports(reportUser);
            DeliveredReportInfo[] info = new DeliveredReportInfo[reports.length];          
View Full Code Here

 
  public AlertInfo[] getAlerts(UserInput userInput) throws ServiceException
  {
        userService.authenticate(userInput);       
       
    ReportUser user = null;
   
    try
    {
      user = userProvider.getUser(userInput.getUserName(), userInput.getPassword());
    }
    catch(ProviderException pe)
    {
      throw new ServiceException(pe);
    }   
   
    ArrayList<AlertInfo> alerts = new ArrayList<AlertInfo>();
   
    Iterator<ReportUserAlert> iterator = user.getAlerts().iterator()
    while(iterator.hasNext())
    {     
      ReportUserAlert userAlert = iterator.next();       
      userAlert.setUser(user);
     
View Full Code Here

  private AlertProvider alertProvider;
  private UserProvider userProvider;

  public String execute()
  {
    ReportUser user = null;
   
    if (userId >= 0)
    {
      try
      {
        user = userProvider.getUser(new Integer(userId));
      }
      catch (Exception e)
      {
        addActionError(e.getMessage());
        return INPUT;
      }
    }
    else
    {
      user = (ReportUser) ActionContext.getContext().getSession().get(
        ORStatics.REPORT_USER);
    }
   
    if (user.getEmail() == null || user.getEmail().length() < 1)
    {
      addActionError(LocalStrings.ERROR_EMAILADDRESS_REQUIRED);
      return INPUT;
    }

    if (recipients == null || recipients.length() < 1)
    {
      recipients = user.getEmail();
    }
   
    if (!submitScheduledReport)
    {
      if (scheduleName != null && scheduleName.length() > 0)
View Full Code Here

    private DirectoryProvider directoryProvider;
   
    public void deliverReport(ReportSchedule reportSchedule, ReportEngineOutput reportOutput) throws DeliveryException
    {
        Report report = reportSchedule.getReport();
        ReportUser user = reportSchedule.getUser();
       
        Date runDate = new Date();
       
        String fileName = runDate.getTime() + "-"
                + StringUtils.deleteWhitespace(user.getName()) + "-"
                + StringUtils.deleteWhitespace(report.getName());                      
       
        try
        {
            FileOutputStream file = new FileOutputStream(directoryProvider
                .getReportGenerationDirectory()
                + fileName + reportOutput.getContentExtension());
           
            file.write(reportOutput.getContent())
            file.flush();
            file.close();
        }
        catch(IOException ioe)
        {
            throw new DeliveryException(ioe);
        }       
       
        DeliveredReport info = new DeliveredReport();            
        info.setParameters(reportSchedule.getReportParameters());
        info.setReportDescription(reportSchedule.getScheduleDescription());
        info.setReportName(report.getName());
        info.setReportFileName(fileName + reportOutput.getContentExtension());
        info.setRunDate(runDate);
        info.setUserName(user.getName());
        info.setDeliveryMethod("fileSystemDeliveryMethod");
       
        try
        {
            FileOutputStream file = new FileOutputStream(directoryProvider.getReportGenerationDirectory() + fileName + ".xml");

            XStream xStream = new XStream();
            xStream.alias("reportGenerationInfo", DeliveredReport.class);
            xStream.toXML(info, file);
       
            file.flush();
            file.close();
        }
        catch(IOException ioe)
        {
            throw new DeliveryException(ioe);
        }  
       
        MailMessage mail = new MailMessage();              
        mail.setSender(user.getEmail());
        mail.parseRecipients(reportSchedule.getRecipients());
        mail.setText(report.getName() + ": Generated on " + new Date());
        mail.setBounceAddress(reportSchedule.getDeliveryReturnAddress());
       
        if (reportSchedule.getScheduleDescription() != null && reportSchedule.getScheduleDescription().trim().length() > 0)
View Full Code Here

TOP

Related Classes of org.efs.openreports.objects.ReportUser

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.