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

Field Summary
protected  java.lang.String CMS_BIOBJECTS_PATH
           
 
Constructor Summary
BIObjectCMSDAOImpl()
           
 
Method Summary
private  void controlForSubObjectsNode(java.lang.String pathParent)
          Control if the PATH_PARENT/subobjects node of the biobjectt exists and if not it will create it
 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.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 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CMS_BIOBJECTS_PATH

protected java.lang.String CMS_BIOBJECTS_PATH
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 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:
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 EMFUserError
Delete a subObject

Specified by:
deleteSubObject in interface IBIObjectCMSDAO
Parameters:
pathParent - path of the parent object
name - name of the subObject
Throws:
EMFUserError

controlForSubObjectsNode

private void controlForSubObjectsNode(java.lang.String pathParent)
                               throws java.lang.Exception
Control if the PATH_PARENT/subobjects node of the biobjectt exists and if not it will create it

Parameters:
pathParent - cms path of the parent biobject
Throws:
java.lang.Exception

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