问题在Liferay论坛发帖here
我试图在文档库中实现最基本的覆盖。
当用户点击我的文档仓库时,我想添加一些逻辑来改变视图。我认为延长DLFileEntryLocalServiceWrapper
这可以完成,因为它有getDLFileEntries()
方法。
这是我的班级
public class DLFileEntryLocalServiceImpl extends DLFileEntryLocalServiceWrapper {
public DLFileEntryLocalServiceImpl(DLFileEntryLocalService dlFileEntryLocalService) {
super(dlFileEntryLocalService);
// TODO Auto-generated constructor stub
}
@Override
public List<DLFileEntry> getDLFileEntries(int start, int end)
throws com.liferay.portal.kernel.exception.SystemException {
System.out.println("GETTING DL FILE ENTRIES");
return super.getDLFileEntries(start, end);
}
}
在我的liferay-hook.xml中我有
<service>
<service-type>com.liferay.portlet.documentlibrary.service.DLAppLocalService</service-type>
<service-impl>com.liferay.custom.hook.DLAppLocalServiceImpl</service-impl>
</service>
<service>
<service-type>com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService</service-type>
<service-impl>com.liferay.custom.hook.DLFileEntryLocalServiceImpl</service-impl>
</service>
但是我的System.out从不打印 - 我也尝试过扩展DLAppLocalService和DLAppService,但没有运气。
我还想在添加&amp;时覆盖方法更新文件条目 - 我是否正在扩展正确的类?