org.apertereports.model
Class ReportTemplate

java.lang.Object
  extended by org.apertereports.model.ReportTemplate
All Implemented Interfaces:
Serializable

@Entity
public class ReportTemplate
extends Object
implements Serializable

Holds all the Jasper report template data and specific report configuration.

See Also:
Serialized Form

Field Summary
static long ACCESS_ALL_ROLES_ID
          Id indicating access for all roles to the report
 
Constructor Summary
ReportTemplate()
           
 
Method Summary
 boolean equals(Object obj)
           
 boolean getActive()
           
 Boolean getAllowBackgroundOrder()
           
 Boolean getAllowOnlineDisplay()
           
 String getContent()
           
 Date getCreated()
           
 String getDescription()
           
 String getFilename()
           
 Integer getId()
           
 String getReportname()
           
 Set<Long> getRolesWithAccess()
          Returns the set of role ids with access to the report.
 int hashCode()
           
 boolean hasRoleAccess(Long roleId)
          Determines if the role with given id has the access to the report
 boolean isAccessibleForAllRoles()
          Determines if the report is accessible for all roles
 void setAccessibleForAllRoles()
          Sets the report accessible for all roles in the application
 void setActive(boolean active)
           
 void setAllowBackgroundOrder(Boolean allowBackgroundOrder)
           
 void setAllowOnlineDisplay(Boolean allowOnlineDisplay)
           
 void setContent(String content)
           
 void setCreated(Date created)
           
 void setDescription(String description)
           
 void setFilename(String filename)
           
 void setId(Integer id)
           
 void setReportname(String reportname)
           
 void setRolesWithAccess(Set<Long> rolesWithAccess)
          Sets the access to the report for roles with given ids.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ACCESS_ALL_ROLES_ID

public static final long ACCESS_ALL_ROLES_ID
Id indicating access for all roles to the report

See Also:
Constant Field Values
Constructor Detail

ReportTemplate

public ReportTemplate()
Method Detail

getActive

public boolean getActive()

getContent

public String getContent()

getCreated

public Date getCreated()

getDescription

public String getDescription()

getFilename

public String getFilename()

getId

public Integer getId()

getReportname

public String getReportname()

getAllowBackgroundOrder

public Boolean getAllowBackgroundOrder()

getAllowOnlineDisplay

public Boolean getAllowOnlineDisplay()

setActive

public void setActive(boolean active)

setAllowBackgroundOrder

public void setAllowBackgroundOrder(Boolean allowBackgroundOrder)

setAllowOnlineDisplay

public void setAllowOnlineDisplay(Boolean allowOnlineDisplay)

setContent

public void setContent(String content)

setCreated

public void setCreated(Date created)

setDescription

public void setDescription(String description)

setFilename

public void setFilename(String filename)

setId

public void setId(Integer id)

setReportname

public void setReportname(String reportname)

isAccessibleForAllRoles

public boolean isAccessibleForAllRoles()
Determines if the report is accessible for all roles

Returns:
true if the report is accessible for all roles, false otherwise

getRolesWithAccess

public Set<Long> getRolesWithAccess()
Returns the set of role ids with access to the report. The set can be ampty when none role has access or all roles have access. First, the method isAccessibleForAllRoles() should be used.

Returns:
List of role ids
See Also:
isAccessibleForAllRoles()

setAccessibleForAllRoles

public void setAccessibleForAllRoles()
Sets the report accessible for all roles in the application


setRolesWithAccess

public void setRolesWithAccess(Set<Long> rolesWithAccess)
Sets the access to the report for roles with given ids. If none role has to have the access, null value should be passed or empty set. To set the access for all roles use setAccessibleForAllRoles()

Parameters:
ids - List of roles ids. If the list is empty or null value is passed, none role will have the access
See Also:
setAccessibleForAllRoles()

hasRoleAccess

public boolean hasRoleAccess(Long roleId)
Determines if the role with given id has the access to the report

Parameters:
roleId - Role id
Returns:
true if the role has access, false otherwise

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011-2013. All Rights Reserved.