it.eng.spagobi.bo.dao.cms
Class BIObjectCMSDAOImpl

java.lang.Object
  extended by it.eng.spagobi.bo.dao.cms.BIObjectCMSDAOImpl
All Implemented Interfaces:
IBIObjectCMSDAO

public class BIObjectCMSDAOImpl
extends java.lang.Object
implements IBIObjectCMSDAO

Implements all the methods for access the biobject cms contents

Author:
fiscato

Constructor Summary
BIObjectCMSDAOImpl()
           
 
Method Summary
 void deleteSubObject(java.lang.String pathParent, java.lang.String name)
          Delete a subObject
 void fillBIObjectTemplate(BIObject obj)
          Given a BIObject at input, fills it with template information.
 java.util.List getAccessibleSubObjects(java.lang.String pathParent, it.eng.spago.security.IEngUserProfile profile)
          Gets the list of all the current user accessible subObject.
 java.lang.String getExecutionNotes(java.lang.String biobjPath, java.lang.String execIdentif)
          Get Notes for a specific execution of the biobject
 java.io.InputStream getSubObject(java.lang.String pathParent, java.lang.String name)
          Gets the inputStream of the subObject content
 java.util.List getSubObjects(java.lang.String pathParent)
          Gets the list of all the subObjects which belongs to a biobject.
 java.io.InputStream getTemplate(java.lang.String path)
          Get the template of the object
 void saveExecutionNotes(java.lang.String biobjPath, java.lang.String execIdentif, java.lang.String notes)
          Save Notes for a specific execution of the biobject
 void saveSubObject(byte[] content, java.lang.String pathParent, java.lang.String name, java.lang.String description, boolean publicVisibility, it.eng.spago.security.IEngUserProfile profile)
          Save a subObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BIObjectCMSDAOImpl

public BIObjectCMSDAOImpl()
Method Detail

getTemplate

public java.io.InputStream getTemplate(java.lang.String path)
Get the template of the object

Specified by:
getTemplate in interface IBIObjectCMSDAO
Parameters:
Path - cms path of the object
profile - Profile of the current user
Returns:
InputStream of the template contents

saveSubObject

public void saveSubObject(byte[] content,
                          java.lang.String pathParent,
                          java.lang.String name,
                          java.lang.String description,
                          boolean publicVisibility,
                          it.eng.spago.security.IEngUserProfile profile)
                   throws it.eng.spago.error.EMFUserError
Save a subObject

Specified by:
saveSubObject in interface IBIObjectCMSDAO
Parameters:
content - the byte content of the subobject
pathParent - the cms path of the object father
name - name of the suboject
description - Description of the subobject
publicVisibility - Visibility of the subObject, if true the object is public if false the object is visibile only to the owner
profile - Profile of the current user useful to get the owner use rof the subobject
Throws:
it.eng.spago.error.EMFUserError

getAccessibleSubObjects

public java.util.List getAccessibleSubObjects(java.lang.String pathParent,
                                              it.eng.spago.security.IEngUserProfile profile)
Gets the list of all the current user accessible subObject. The list contains BIObject.SubObjectDetail objects

Specified by:
getAccessibleSubObjects in interface IBIObjectCMSDAO
Parameters:
profile - Profile of the current user
pathParent - cms path of the father biobject
Returns:
List of BIObject.SubObjectDetail objects each one containing the information about a subObject of the biObject

getSubObject

public java.io.InputStream getSubObject(java.lang.String pathParent,
                                        java.lang.String name)
Gets the inputStream of the subObject content

Specified by:
getSubObject in interface IBIObjectCMSDAO
Parameters:
pathParent - cms path of the parent object
name - name of the subObject
Returns:
InputStream of the subObject content

deleteSubObject

public void deleteSubObject(java.lang.String pathParent,
                            java.lang.String name)
                     throws it.eng.spago.error.EMFUserError
Delete a subObject

Specified by:
deleteSubObject in interface IBIObjectCMSDAO
Parameters:
pathParent - path of the parent object
name - name of the subObject
Throws:
it.eng.spago.error.EMFUserError

fillBIObjectTemplate

public void fillBIObjectTemplate(BIObject obj)
Description copied from interface: IBIObjectCMSDAO
Given a BIObject at input, fills it with template information.

Specified by:
fillBIObjectTemplate in interface IBIObjectCMSDAO
Parameters:
obj - The object to fill template information in.
See Also:
it.eng.spagobi.bo.dao.IBIObjectDAO#fillBIObjectTemplate(it.eng.spagobi.bo.BIObject)

getSubObjects

public java.util.List getSubObjects(java.lang.String pathParent)
Gets the list of all the subObjects which belongs to a biobject. The list contains BIObject.SubObjectDetail objects

Specified by:
getSubObjects in interface IBIObjectCMSDAO
Parameters:
pathParent - cms path of the father biobject
Returns:
List of BIObject.SubObjectDetail objects each one containing the information about a subObject of the biObject

saveExecutionNotes

public void saveExecutionNotes(java.lang.String biobjPath,
                               java.lang.String execIdentif,
                               java.lang.String notes)
                        throws java.lang.Exception
Save Notes for a specific execution of the biobject

Specified by:
saveExecutionNotes in interface IBIObjectCMSDAO
Parameters:
biobjPath - path of the biobject executed
execIdentif - identifier of the execution
notes - notes to save
Throws:
java.lang.Exception

getExecutionNotes

public java.lang.String getExecutionNotes(java.lang.String biobjPath,
                                          java.lang.String execIdentif)
                                   throws java.lang.Exception
Get Notes for a specific execution of the biobject

Specified by:
getExecutionNotes in interface IBIObjectCMSDAO
Parameters:
biobjPath - path of the biobject executed
execIdentif - identifier of the execution
Returns:
String notes saved
Throws:
java.lang.Exception