package net.sourceforge.fenixedu.presentationTier.renderers; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import pt.ist.fenixWebFramework.renderers.OutputRenderer; import pt.ist.fenixWebFramework.renderers.components.HtmlComponent; import pt.ist.fenixWebFramework.renderers.components.HtmlInlineContainer; import pt.ist.fenixWebFramework.renderers.components.HtmlLink; import pt.ist.fenixWebFramework.renderers.components.HtmlLinkWithPreprendedComment; import pt.ist.fenixWebFramework.renderers.components.HtmlText; import pt.ist.fenixWebFramework.renderers.components.HtmlLink.Target; import pt.ist.fenixWebFramework.renderers.layouts.Layout; import pt.ist.fenixWebFramework.renderers.schemas.Schema; import pt.ist.fenixWebFramework.renderers.utils.RenderKit; import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; import net.sourceforge.fenixedu.domain.Person; import net.sourceforge.fenixedu.domain.research.activity.Participation; import net.sourceforge.fenixedu.domain.research.activity.ScientificJournalParticipation; import net.sourceforge.fenixedu.presentationTier.servlets.filters.ChecksumRewriter; /** * This renderer provides a way of presenting a list of * net.sourceforge.fenixedu.domain.research.activity.Participation objects. *
* Roles displayment is configurable
*
* @author pcma
*/
public class ParticipationsRenderer extends OutputRenderer {
private String linkFormat;
private String subSchema;
private String subLayout;
private boolean moduleRelative;
private boolean contextRelative;
private boolean showRoles;
private boolean showRoleMessage;
private boolean contextAvailable;
public boolean iscontextAvailable() {
return contextAvailable;
}
public void setContextAvailable(boolean hasContext) {
this.contextAvailable = hasContext;
}
public boolean isShowRoleMessage() {
return showRoleMessage;
}
public void setShowRoleMessage(boolean showRoleMessage) {
this.showRoleMessage = showRoleMessage;
}
public boolean isShowRoles() {
return showRoles;
}
/**
* If roles will or not be displayed
*
* @property
*/
public void setShowRoles(boolean showRoles) {
this.showRoles = showRoles;
}
public String getSubLayout() {
return subLayout;
}
/**
* Defines a sublayout for each participator
*
* @property
*/
public void setSubLayout(String layout) {
this.subLayout = layout;
}
public String getSubSchema() {
return subSchema;
}
/**
* Difines a subSchema for each participator
*
* @property
*/
public void setSubSchema(String schema) {
this.subSchema = schema;
}
public String getLinkFormat() {
return linkFormat;
}
/**
* Defines a link format, see layout link for more information about this
* property.
*
* @property
*/
public void setLinkFormat(String linkFormat) {
this.linkFormat = linkFormat;
}
@Override
protected Layout getLayout(Object object, Class type) {
return new ParticipationLayout();
}
public class ParticipationLayout extends Layout {
@Override
public HtmlComponent createComponent(Object object, Class type) {
List