001: /*
002: * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a>
003: * @version $Id: PortletComponent.java 6385 2007-10-25 14:02:26Z wehrens $
004: */
005: package org.gridsphere.layout;
006:
007: import javax.portlet.PortletRequest;
008:
009: /**
010: * The <code>PortletComponent</code> defines the interfaces provided by a portlet component.
011: */
012: public interface PortletComponent extends ComponentLifecycle {
013:
014: /**
015: * Returns the portlet component label
016: *
017: * @return the portlet component label
018: */
019: public String getLabel();
020:
021: /**
022: * Sets the portlet component label
023: *
024: * @param label the portlet component label
025: */
026: public void setLabel(String label);
027:
028: /**
029: * Sets the portlet component width
030: *
031: * @param width the portlet component width
032: */
033: public void setWidth(String width);
034:
035: /**
036: * Returns the portlet component width
037: *
038: * @return the portlet component width
039: */
040: public String getWidth();
041:
042: /**
043: * Returns the default portlet component width
044: *
045: * @return the default portlet component width
046: */
047: public String getDefaultWidth();
048:
049: /**
050: * When set to true the portlet component is visible and will be rendered
051: *
052: * @param isVisible if <code>true</code> portlet component is rendered,
053: * <code>false</code> otherwise
054: */
055: public void setVisible(boolean isVisible);
056:
057: /**
058: * When isVisible is true the portlet component is visible and will be rendered
059: *
060: * @return the portlet component visibility
061: */
062: public boolean getVisible();
063:
064: /**
065: * Allows a required role to be associated with viewing this portlet
066: *
067: * @return the required portlet role expresses as a <code>PortletRole</code>
068: */
069: public String getRequiredRole();
070:
071: /**
072: * Allows a required role to be associated with viewing this portlet
073: *
074: * @param reqRole the required portlet role expresses as a <code>PortletRole</code>
075: */
076: public void setRequiredRole(String reqRole);
077:
078: public void setCanModify(boolean canModify);
079:
080: public boolean getCanModify();
081:
082: public void addComponentListener(PortletComponent component);
083:
084: public PortletComponent getParentComponent();
085:
086: public void setParentComponent(PortletComponent parent);
087:
088: public void remove(PortletComponent pc);
089:
090: public void remove();
091:
092: public void setBufferedOutput(PortletRequest req, StringBuffer sb);
093:
094: public StringBuffer getBufferedOutput(PortletRequest req);
095:
096: /**
097: * Returns the portlet component css.
098: *
099: * @return portlet component css
100: */
101: public String getStyle();
102:
103: /**
104: * Sets the portlet component css
105: *
106: * @param style style to be set
107: */
108: public void setStyle(String style);
109:
110: }
|