use of com.netsteadfast.greenstep.compoments.CompomentsModel in project bamboobsc by billchen198318.
the class BaseWorkspaceCompoment method loadFromId.
@Override
public CompomentsModel loadFromId(String compomentId) throws ServiceException, Exception {
if (StringUtils.isBlank(compomentId)) {
throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_BLANK));
}
WorkspaceCompomentVO compoment = new WorkspaceCompomentVO();
compoment.setCompId(compomentId);
DefaultResult<WorkspaceCompomentVO> result = workspaceCompomentService.findByUK(compoment);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
compoment = result.getValue();
CompomentsModel model = new CompomentsModel();
this.setModel(model);
model.setId(compoment.getCompId());
model.setName(compoment.getName());
model.setResource(this.getResource());
model.setParameters(this.getParameters());
model.setContent("");
return model;
}
Aggregations