The following document contains the results of PMD's CPD 4.2.2.
| File | Line |
|---|---|
| com\ideo\sweetdevria\taglib\menu\MenubarTag.java | 61 |
| com\ideo\sweetdevria\taglib\menu\MenuTag.java | 59 |
public MenuTag() {
release();
}
public String getBuilderId() {
return BUILDER_ID;
}
public PageContext getPageContext() {
return pageContext;
}
public void release() {
id = null;
items = new ArrayList();
super.release();
}
public int doStartTag() throws JspException {
if(bean!=null){
if(scope==null){
switch(pageContext.getAttributesScope(bean)){
case PageContext.REQUEST_SCOPE :
items = (ArrayList) pageContext.getRequest().getAttribute(bean);
break;
case PageContext.SESSION_SCOPE :
items = (ArrayList) pageContext.getRequest().getAttribute(bean);
break;
case PageContext.APPLICATION_SCOPE :
items = (ArrayList) pageContext.getRequest().getAttribute(bean);
break;
default:
throw new JspException("Bean " + bean + " not found in any scope !");
}
}
else if(scope.equals("request")){
items = (ArrayList) pageContext.getRequest().getAttribute(bean);
}
else if(scope.equals("session")){
items = (ArrayList) pageContext.getSession().getAttribute(bean);
}
else if(scope.equals("application")){
items = (ArrayList) pageContext.getServletContext().getAttribute(bean);
}
for(int i=0;i<items.size();i++){
((MenuItemModel) items.get(i)).setParentId(getId());
}
return SKIP_BODY;
}
return super.doStartTag();
}
public int doEndTag() throws JspException {
return super.doEndTag();
}
public ArrayList getItems() {
return items;
}
public void addItem(MenuItemModel item) {
this.items.add(item);
}
public String getBean() {
return bean;
}
/**
* @jsp.attribute required="false" rtexprvalue="true"
* type="java.lang.String"
* description="Bean name which contains menu model"
*/
public void setBean(String bean) {
this.bean = bean;
}
public String getScope() {
return scope;
}
/**
* @jsp.attribute required="false" rtexprvalue="true"
* type="java.lang.String"
* description="Scope where is the bean which contains menu model (request,session or application)"
*/
public void setScope(String scope) {
this.scope = scope;
}
}
| |
| File | Line |
|---|---|
| com\ideo\sweetdevria\taglib\menu\ContextMenuTag.java | 62 |
| com\ideo\sweetdevria\taglib\menu\MenubarTag.java | 61 |
public MenubarTag() {
release();
}
public String getBuilderId() {
return BUILDER_ID;
}
public PageContext getPageContext() {
return pageContext;
}
public void release() {
id = null;
items = new ArrayList();
super.release();
}
public int doStartTag() throws JspException {
if(bean!=null){
if(scope==null){
switch(pageContext.getAttributesScope(bean)){
case PageContext.REQUEST_SCOPE :
items = (ArrayList) pageContext.getRequest().getAttribute(bean);
break;
case PageContext.SESSION_SCOPE :
items = (ArrayList) pageContext.getRequest().getAttribute(bean);
break;
case PageContext.APPLICATION_SCOPE :
items = (ArrayList) pageContext.getRequest().getAttribute(bean);
break;
default:
throw new JspException("Bean " + bean + " not found in any scope !");
}
}
else if(scope.equals("request")){
items = (ArrayList) pageContext.getRequest().getAttribute(bean);
}
else if(scope.equals("session")){
items = (ArrayList) pageContext.getSession().getAttribute(bean);
}
else if(scope.equals("application")){
items = (ArrayList) pageContext.getServletContext().getAttribute(bean);
}
for(int i=0;i<items.size();i++){
((MenuItemModel) items.get(i)).setParentId(getId());
}
return SKIP_BODY;
}
return super.doStartTag();
| |
| File | Line |
|---|---|
| com\ideo\sweetdevria\taglib\grid\common\BaseColumnHeaderTag.java | 110 |
| com\ideo\sweetdevria\taglib\grid\common\model\GridColumnModel.java | 300 |
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getMaskPattern() {
return maskPattern;
}
public void setMaskPattern(String maskPattern) {
this.maskPattern = maskPattern;
}
public String getCharPattern() {
return charPattern;
}
public void setCharPattern(String charPattern) {
this.charPattern = charPattern;
}
public String getMaskMessage() {
return maskMessage;
}
public void setMaskMessage(String maskMessage) {
this.maskMessage = maskMessage;
}
public String getCharMessage() {
return charMessage;
}
public void setCharMessage(String charMessage) {
this.charMessage = charMessage;
}
public String getMaskMessageType() {
return maskMessageType;
}
public void setMaskMessageType(String maskMessageType) {
this.maskMessageType = maskMessageType;
}
public String getCharMessageType() {
return charMessageType;
}
public void setCharMessageType(String charMessageType) {
this.charMessageType = charMessageType;
}
public String getFormatter() {
return formatter;
}
public void setFormatter(String formatter) {
this.formatter = formatter;
}
public List getListOptions() {
| |
| File | Line |
|---|---|
| com\ideo\sweetdevria\taglib\grid\grid\GridBodyIteratorTag.java | 193 |
| com\ideo\sweetdevria\taglib\grid\simplegrid\SimpleGridTag.java | 207 |
currentNode = (AbstractTreeGridNodeModel)treeGridModel.getRootNodeModel();
else
currentNode = currentNode.getNextNode(false);
currentRowId = currentNode.getId();
}
}
public void addCellModel(GridCellModel column){
this.currentRow.addCellModel(column);
}
public void addDetailData(String detail) {
this.currentRow.addDetail(detail);
}
public Collection getCollection() {
return collection;
}
/**
* Set the collection to iterate over
* @param collection The collection to iterate over
* @jsp.attribute required="false"
* rtexprvalue="true"
* type="java.util.Collection"
* description="The collection to iterate over. Use it with the var attribute to target the data. This attribute must not be filled if the dataProvider does not require a collection evaluation."
*/
public void setCollection(Collection collection) {
this.collection = collection;
}
public IGridDataProvider getDataProvider() {
return dataProvider;
}
/**
* Set a data provider to access to the data
* @param dataProvider The data provider to set to this grid
* @jsp.attribute required="false"
* rtexprvalue="true"
* type="com.ideo.sweetdevria.taglib.grid.data.IGridDataProvider"
* description="The data provider accessing to the data of this grid. If the dataProvider does not require a collection evaluation, either this attribute OR the collection attribute must be filled."
*/
public void setDataProvider(IGridDataProvider dataProvider) {
this.dataProvider = dataProvider;
}
public String getVar() {
return var;
}
/**
* Set a request session variable containing the data stored in the collection during the iteration
* @param var The variable which will contain the collection values
* @jsp.attribute required="false"
* rtexprvalue="true"
* type="java.lang.String"
* description="Set a request session variable containing the data stored in the collection during the iteration."
*/
public void setVar(String var) {
this.var = var;
}
public int getRowPerPage() {
return rowPerPage;
}
/**
* Set the minimum number of row to display per page
* @param rowPerPage The number of row to display
* @jsp.attribute required="false"
* rtexprvalue="true"
* type="int"
* description="Set the minimum number of row to display per page."
*/
public void setRowPerPage(int rowPerPage) {
this.rowPerPage = rowPerPage;
}
public String getRowCountVar() {
return rowCountVar;
}
/**
* Set the variable name where will be stored the current row count during the iteration over the rows.
* @param rowCountVar The name of the var
* @jsp.attribute required="false"
* rtexprvalue="true"
* type="java.lang.String"
* description="Set the variable name where will be stored the current row count during the iteration over the rows."
*/
public void setRowCountVar(String rowCountVar) {
this.rowCountVar = rowCountVar;
}
/**
* @return the minimal width for a column.
*/
public int getMinimalColumnWidth() {
| |
| File | Line |
|---|---|
| com\ideo\sweetdevria\taglib\control\ActionElseTag.java | 65 |
| com\ideo\sweetdevria\taglib\control\ActionTag.java | 66 |
action.addAction(type, targetIds, condition, param);
return super.doEndTag();
}
public void release() {
super.release();
type = -1;
targetIds = null;
condition = null;
param = null;
}
protected int type;
protected String targetIds;
protected String condition;
protected String param;
public int getType() {
return type;
}
/**
* @jsp.attribute required="true"
* rtexprvalue="true"
* type="int"
* description="Type of action. These types are described in the ActionInterface class (ex : ActionInterface.SHOW_ACTION)"
*/
public void setType(int type) {
this.type = type;
}
public String getTargetIds() {
return targetIds;
}
/**
* @jsp.attribute required="false"
* rtexprvalue="true"
* type="java.lang.String"
* description="Components targeted by the action's result. Required for all actions but HANDLER_ACTION. Ex : 'input1,inpu2'"
*/
public void setTargetIds(String targetIds) {
this.targetIds = targetIds;
}
public String getCondition() {
return condition;
}
/**
* @jsp.attribute required="false"
* rtexprvalue="true"
* type="java.lang.String"
* description="Optional condition value to execute this action. This action will be processed only if the control component's value validates this condition. Written as a regexp."
*/
public void setCondition(String condition) {
this.condition = condition;
}
public String getParam() {
return param;
}
/**
* @jsp.attribute required="false"
* rtexprvalue="true"
* type="java.lang.String"
* description="Optional parameter. Define a JavaScript method to execute for ActionInterface.HANDLER_ACTION, or a Java server class as data provider for ActionInterface.LOADDATA_ACTION and ActionInterface.SETVALUE_ACTION"
*/
public void setParam(String param) {
this.param = param;
}
}
| |
| File | Line |
|---|---|
| com\ideo\sweetdevria\taglib\reader\UpdateReader.java | 98 |
| com\ideo\sweetdevria\taglib\reader\UpdateReader.java | 107 |
{"t"+(i1), "Title "+(i1), new Object [][]{{"n"+(n1), "news "+(n1), "blblablabla "+(n1)}, {"n"+(n2), "news "+(n2), "blblablabla "+(n2)}, {"n"+(n3), "news "+(n3), "blblablabla "+(n3)}}},
{"t"+(i2), "Title "+(i2), new Object [][]{{"n"+(n4), "news "+(n4), "blblablabla "+(n4)}, {"n"+(n5), "news "+(n5), "blblablabla "+(n5)}, {"n"+(n6), "news "+(n6), "blblablabla "+(n6)}}},
{"t"+(i3), "Title "+(i3), new Object [][]{{"n"+(n7), "news "+(n7), "blblablabla "+(n7)}, {"n"+(n8), "news "+(n8), "blblablabla "+(n8)}, {"n"+(n9), "news "+(n9), "blblablabla "+(n9)}}}
| |
| File | Line |
|---|---|
| com\ideo\sweetdevria\taglib\grid\export\injector\GridInjector.java | 89 |
| com\ideo\sweetdevria\taglib\grid\export\injector\SingleInjector.java | 85 |
public void injectGridData(HSSFWorkbook workbook, HSSFSheet sheet, IGridDataProvider dataProvider, PageContext pageContext) throws JspException {
this.curY = this.y;
HSSFRow excelRow;
this.defaultFormatterManager = new DefaultFormatterManager(workbook, pageContext);
if(this.cellFormatter != null) {
try {
/* We should create a new Instance to FormatterManager to "clear" all reference to font to the last workbook, in case the user click again on the link */
this.defaultFormatterManager.setCellFormatter((CellFormatter) this.cellFormatter.getClass().newInstance());
} catch(InstantiationException e) {
LOG.error(e.getMessage(), e);
} catch(IllegalAccessException e) {
LOG.error(e.getMessage(), e);
}
} else {
this.defaultFormatterManager.setCellFormatter(new DefaultCellFormatter());
}
cleanSheet(sheet);
| |