mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
i18n support for data set labels
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@44362 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,90 +1,98 @@
|
||||
package org.alfresco.module.org_alfresco_module_rm.dataset;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
public class DataSetBase implements DataSet
|
||||
{
|
||||
|
||||
/** Data set service */
|
||||
private DataSetService dataSetService;
|
||||
/** Data set service */
|
||||
private DataSetService dataSetService;
|
||||
|
||||
/** Data set label */
|
||||
private String label;
|
||||
/** Data set label */
|
||||
private String label;
|
||||
|
||||
/** Data set id */
|
||||
private String id;
|
||||
/** Data set id */
|
||||
private String id;
|
||||
|
||||
/** Data set path */
|
||||
private String path;
|
||||
/** Data set path */
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* Sets the data set service
|
||||
*
|
||||
* @param dataSetService the data set service
|
||||
*/
|
||||
public void setDataSetService(DataSetService dataSetService)
|
||||
{
|
||||
this.dataSetService = dataSetService;
|
||||
}
|
||||
/**
|
||||
* Sets the data set service
|
||||
*
|
||||
* @param dataSetService the data set service
|
||||
*/
|
||||
public void setDataSetService(DataSetService dataSetService)
|
||||
{
|
||||
this.dataSetService = dataSetService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.dataset.DataSet#getLabel()
|
||||
*/
|
||||
public String getLabel()
|
||||
{
|
||||
return this.label;
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.dataset.DataSet#getLabel()
|
||||
*/
|
||||
public String getLabel()
|
||||
{
|
||||
String label = this.label;
|
||||
if (StringUtils.isBlank(label))
|
||||
{
|
||||
label = I18NUtil.getMessage("dataset." + getId() + ".label");
|
||||
}
|
||||
return label;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the label of the data set service
|
||||
*
|
||||
* @param label the label
|
||||
*/
|
||||
public void setLabel(String label)
|
||||
{
|
||||
this.label = label;
|
||||
}
|
||||
/**
|
||||
* Sets the label of the data set service
|
||||
*
|
||||
* @param label the label
|
||||
*/
|
||||
public void setLabel(String label)
|
||||
{
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.dataset.DataSet#getId()
|
||||
*/
|
||||
public String getId()
|
||||
{
|
||||
return this.id;
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.dataset.DataSet#getId()
|
||||
*/
|
||||
public String getId()
|
||||
{
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the id of the data set service
|
||||
*
|
||||
* @param id the id
|
||||
*/
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* Sets the id of the data set service
|
||||
*
|
||||
* @param id the id
|
||||
*/
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.dataset.DataSet#getPath()
|
||||
*/
|
||||
public String getPath()
|
||||
{
|
||||
return this.path;
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.dataset.DataSet#getPath()
|
||||
*/
|
||||
public String getPath()
|
||||
{
|
||||
return this.path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the path of the data set service
|
||||
*
|
||||
* @param path the path
|
||||
*/
|
||||
public void setPath(String path)
|
||||
{
|
||||
this.path = path;
|
||||
}
|
||||
/**
|
||||
* Sets the path of the data set service
|
||||
*
|
||||
* @param path the path
|
||||
*/
|
||||
public void setPath(String path)
|
||||
{
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the data set implementation with the data set service.
|
||||
*/
|
||||
public void register()
|
||||
{
|
||||
this.dataSetService.register(this);
|
||||
}
|
||||
/**
|
||||
* Registers the data set implementation with the data set service.
|
||||
*/
|
||||
public void register()
|
||||
{
|
||||
this.dataSetService.register(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user