当前位置: 首页>>代码示例>>Java>>正文


Java ClassLoaderProxy类代码示例

本文整理汇总了Java中com.liferay.portal.kernel.util.ClassLoaderProxy的典型用法代码示例。如果您正苦于以下问题:Java ClassLoaderProxy类的具体用法?Java ClassLoaderProxy怎么用?Java ClassLoaderProxy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ClassLoaderProxy类属于com.liferay.portal.kernel.util包,在下文中一共展示了ClassLoaderProxy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MoveTopicoLocalServiceClp

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
public MoveTopicoLocalServiceClp(ClassLoaderProxy classLoaderProxy) {
    _classLoaderProxy = classLoaderProxy;

    _getBeanIdentifierMethodKey0 = new MethodKey(_classLoaderProxy.getClassName(),
            "getBeanIdentifier");

    _setBeanIdentifierMethodKey1 = new MethodKey(_classLoaderProxy.getClassName(),
            "setBeanIdentifier", java.lang.String.class);

    _getTopicosPorComunidadeEForumMethodKey2 = new MethodKey(_classLoaderProxy.getClassName(),
            "getTopicosPorComunidadeEForum", long.class, long.class);

    _getForunsComunidadeMethodKey3 = new MethodKey(_classLoaderProxy.getClassName(),
            "getForunsComunidade", long.class);

    _getComunidadesComPermissaoParaMoverMethodKey4 = new MethodKey(_classLoaderProxy.getClassName(),
            "getComunidadesComPermissaoParaMover", long.class, long.class);

    _moveTopicoMethodKey5 = new MethodKey(_classLoaderProxy.getClassName(),
            "moveTopico",
            br.gov.camara.edemocracia.movetopico.model.InfoMoverTopico.class);
}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:23,代码来源:MoveTopicoLocalServiceClp.java

示例2: getService

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
public static MoveTopicoLocalService getService() {
    if (_service == null) {
        Object object = PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(),
                MoveTopicoLocalService.class.getName());
        ClassLoader portletClassLoader = (ClassLoader) PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(),
                "portletClassLoader");

        ClassLoaderProxy classLoaderProxy = new ClassLoaderProxy(object,
                MoveTopicoLocalService.class.getName(), portletClassLoader);

        _service = new MoveTopicoLocalServiceClp(classLoaderProxy);

        ClpSerializer.setClassLoader(portletClassLoader);

        ReferenceRegistry.registerReference(MoveTopicoLocalServiceUtil.class,
            "_service");
        MethodCache.remove(MoveTopicoLocalService.class);
    }

    return _service;
}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:22,代码来源:MoveTopicoLocalServiceUtil.java

示例3: getService

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
public static InfrastructureService getService() {
	if (_service == null) {
		Object obj = PortletBeanLocatorUtil.locate(ClpSerializer.SERVLET_CONTEXT_NAME,
				InfrastructureService.class.getName());
		ClassLoader portletClassLoader = (ClassLoader)PortletBeanLocatorUtil.locate(ClpSerializer.SERVLET_CONTEXT_NAME,
				"portletClassLoader");

		ClassLoaderProxy classLoaderProxy = new ClassLoaderProxy(obj,
				portletClassLoader);

		_service = new InfrastructureServiceClp(classLoaderProxy);

		ClpSerializer.setClassLoader(portletClassLoader);
	}

	return _service;
}
 
开发者ID:SmartInfrastructures,项目名称:xipi,代码行数:18,代码来源:InfrastructureServiceUtil.java

示例4: afterInsertOrUpdate

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
public void afterInsertOrUpdate(UploadRequest uploadRequest,PortletResponse portletResponse,LearningActivity learningActivity) 
		throws PortalException,SystemException {
	
	try {
		ClassLoader classLoader = clp.getClassLoader();
		Class learningActivityClass = Class.forName(LearningActivity.class.getName(),true, classLoader);
		
		MethodKey afterInsertOrUpdateMethod = new MethodKey(clp.getClassName(), "afterInsertOrUpdate", UploadRequest.class, PortletResponse.class, learningActivityClass);
		Object learningActivityObj = translateLearningActivity(learningActivity);
		clp.invoke(new MethodHandler(afterInsertOrUpdateMethod, uploadRequest, portletResponse, learningActivityObj));
		ClassLoaderProxy classLoaderProxy = new ClassLoaderProxy(learningActivityObj, clp.getClassLoader());
		learningActivity.setModelAttributes((Map<String, Object>) classLoaderProxy.invoke("getModelAttributes", new Object[]{}));
	}
	catch (Throwable t) {
		t = ClpSerializer.translateThrowable(t);
		
		if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
			throw (com.liferay.portal.kernel.exception.PortalException)t;
		}
					
		if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
			throw (com.liferay.portal.kernel.exception.SystemException)t;
		}

		if (t instanceof RuntimeException) {
			throw (RuntimeException)t;
		}
		else {
			throw new RuntimeException(t.getClass().getName() +
				" is not a valid exception");
		}
	}
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:34,代码来源:LearningActivityTypeClp.java

示例5: isDone

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
@Override
public boolean isDone(LearningActivity learningActivity, long userId)
		throws SystemException, PortalException {
	Object returnObj = null;
	try {
		ClassLoader classLoader = clp.getClassLoader();
		Class learningActivityClass = Class.forName(LearningActivity.class.getName(),true, classLoader);
		MethodKey isDoneMethod = new MethodKey(clp.getClassName(), "isDone", learningActivityClass,Long.class);    
		Object learningActivityObj = translateLearningActivity(learningActivity);
		returnObj = clp.invoke(new MethodHandler(isDoneMethod, learningActivityObj,userId));
		ClassLoaderProxy classLoaderProxy = new ClassLoaderProxy(learningActivityObj, clp.getClassLoader());
		learningActivity.setModelAttributes((Map<String, Object>) classLoaderProxy.invoke("getModelAttributes", new Object[]{}));
	}
	catch (Throwable t) {
		t = ClpSerializer.translateThrowable(t);
		
		if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
			throw (com.liferay.portal.kernel.exception.PortalException)t;
		}
		
		if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
			throw (com.liferay.portal.kernel.exception.SystemException)t;
		}

		if (t instanceof RuntimeException) {
			throw (RuntimeException)t;
		}
		else {
			throw new RuntimeException(t.getClass().getName() +
				" is not a valid exception");
		}
	}
	return ((Boolean)returnObj);
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:35,代码来源:LearningActivityTypeClp.java

示例6: updateCourse

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
@Override
@SuppressWarnings({ "rawtypes", "unchecked", "deprecation" })
public void updateCourse(Course course, ModuleResult moduleResult)
		throws SystemException {
	try {
		ClassLoader classLoader = clp.getClassLoader();

		Class courseClass = Class.forName(Course.class.getName(),true, classLoader);
		Class moduleResultClass = Class.forName(ModuleResult.class.getName(),true, classLoader);
		
		MethodKey updateCourseMethod = new MethodKey(clp.getClassName(), "updateCourse",courseClass,moduleResultClass);
		Object courseObj = translateCourse(course);
		Object moduleResultObj = translateModuleResult(moduleResult);
		clp.invoke(new MethodHandler(updateCourseMethod, courseObj, moduleResultObj));
		ClassLoaderProxy courseClassLoaderProxy = new ClassLoaderProxy(courseObj, clp.getClassLoader());
		course.setModelAttributes((Map<String, Object>) courseClassLoaderProxy.invoke("getModelAttributes", new Object[]{}));
		ClassLoaderProxy moduleResultClassLoaderProxy = new ClassLoaderProxy(moduleResultObj, clp.getClassLoader());
		moduleResult.setModelAttributes((Map<String, Object>) moduleResultClassLoaderProxy.invoke("getModelAttributes", new Object[]{}));
	}
	catch (Throwable t) {
		t = ClpSerializer.translateThrowable(t);
					
		if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
			throw (com.liferay.portal.kernel.exception.SystemException)t;
		}

		if (t instanceof RuntimeException) {
			throw (RuntimeException)t;
		}
		else {
			throw new RuntimeException(t.getClass().getName() +
				" is not a valid exception");
		}
	}
	
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:37,代码来源:CourseEvalClp.java

示例7: setExtraContent

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
@Override
@SuppressWarnings({ "unchecked", "deprecation" })
public void setExtraContent(Course course,String actionId,ServiceContext serviceContext) 
		throws PortalException, SystemException {
	try {
		ClassLoader classLoader = clp.getClassLoader();
		Class<?> courseClass = Class.forName(Course.class.getName(),true, classLoader);
		MethodKey setExtraContentMethod = new MethodKey(clp.getClassName(), "setExtraContent", courseClass, String.class, ServiceContext.class);
		Object courseObj = translateCourse(course);
		clp.invoke(new MethodHandler(setExtraContentMethod, courseObj, actionId, serviceContext));
		ClassLoaderProxy classLoaderProxy = new ClassLoaderProxy(courseObj, clp.getClassLoader());
		course.setModelAttributes((Map<String, Object>) classLoaderProxy.invoke("getModelAttributes", new Object[]{}));
	}
	catch (Throwable t) {
		t = ClpSerializer.translateThrowable(t);
		
		if (t instanceof PortalException) {
			throw (PortalException)t;
		}

		if (t instanceof SystemException) {
			throw (SystemException)t;
		}

		if (t instanceof RuntimeException) {
			throw (RuntimeException)t;
		}
		else {
			throw new RuntimeException(t.getClass().getName() +
				" is not a valid exception");
		}
	}
	
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:35,代码来源:CourseEvalClp.java

示例8: onOpenCourse

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
@Override
@SuppressWarnings({ "rawtypes", "unchecked", "deprecation" })
public void onOpenCourse(Course course)
		throws SystemException {
	
	try {
		ClassLoader classLoader = clp.getClassLoader();
		Class courseClass = Class.forName(Course.class.getName(),true, classLoader);

		MethodKey updateCourseMethod = new MethodKey(clp.getClassName(), "onOpenCourse",courseClass);
		Object courseObj = translateCourse(course);
		clp.invoke(new MethodHandler(updateCourseMethod, courseObj));
		ClassLoaderProxy courseClassLoaderProxy = new ClassLoaderProxy(courseObj, clp.getClassLoader());
		course.setModelAttributes((Map<String, Object>) courseClassLoaderProxy.invoke("getModelAttributes", new Object[]{}));
	}
	catch (Throwable t) {
		t = ClpSerializer.translateThrowable(t);
					
		if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
			throw (com.liferay.portal.kernel.exception.SystemException)t;
		}

		if (t instanceof RuntimeException) {
			throw (RuntimeException)t;
		}
		else {
			throw new RuntimeException(t.getClass().getName() +
				" is not a valid exception");
		}
	}
	
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:33,代码来源:CourseEvalClp.java

示例9: onCloseCourse

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
@Override
@SuppressWarnings({ "rawtypes", "unchecked", "deprecation" })
public void onCloseCourse(Course course)
		throws SystemException {
	
	try {
		ClassLoader classLoader = clp.getClassLoader();
		Class courseClass = Class.forName(Course.class.getName(),true, classLoader);

		MethodKey updateCourseMethod = new MethodKey(clp.getClassName(), "onCloseCourse",courseClass);
		Object courseObj = translateCourse(course);
		clp.invoke(new MethodHandler(updateCourseMethod, courseObj));
		ClassLoaderProxy courseClassLoaderProxy = new ClassLoaderProxy(courseObj, clp.getClassLoader());
		course.setModelAttributes((Map<String, Object>) courseClassLoaderProxy.invoke("getModelAttributes", new Object[]{}));
	}
	catch (Throwable t) {
		t = ClpSerializer.translateThrowable(t);
					
		if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
			throw (com.liferay.portal.kernel.exception.SystemException)t;
		}

		if (t instanceof RuntimeException) {
			throw (RuntimeException)t;
		}
		else {
			throw new RuntimeException(t.getClass().getName() +
				" is not a valid exception");
		}
	}
	
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:33,代码来源:CourseEvalClp.java

示例10: CourseDiplomaClp

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
public CourseDiplomaClp(ClassLoaderProxy clp) {
	this.clp = clp;
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:4,代码来源:CourseDiplomaClp.java

示例11: LearningActivityTypeClp

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
public LearningActivityTypeClp(ClassLoaderProxy clp) {
	this.clp = clp;
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:4,代码来源:LearningActivityTypeClp.java

示例12: setExtraContent

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
public String setExtraContent(UploadRequest uploadRequest, 
		PortletResponse portletResponse,LearningActivity learningActivity) 
		throws PortalException,SystemException,DocumentException,IOException {
	try {
		
		log.info(":::::setExtraContent:::::");
		ClassLoader classLoader = clp.getClassLoader();
		Class learningActivityClass = Class.forName(LearningActivity.class.getName(),true, classLoader);
		MethodKey setExtraContentMethod = new MethodKey(clp.getClassName(), "setExtraContent", UploadRequest.class, PortletResponse.class, learningActivityClass);
		Object learningActivityObj = translateLearningActivity(learningActivity);
		log.info(":::::invoke:::::");
		clp.invoke(new MethodHandler(setExtraContentMethod, uploadRequest, portletResponse, learningActivityObj));
		log.info(":::::invoked:::::");
		ClassLoaderProxy classLoaderProxy = new ClassLoaderProxy(learningActivityObj, clp.getClassLoader());
		learningActivity.setModelAttributes((Map<String, Object>) classLoaderProxy.invoke("getModelAttributes", new Object[]{}));
	}
	catch (Throwable t) {
		t = ClpSerializer.translateThrowable(t);
		
		if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
			throw (com.liferay.portal.kernel.exception.PortalException)t;
		}
		
		if (t instanceof IOException) {
			throw (IOException)t;
		}
		
		if (t instanceof DocumentException) {
			throw (DocumentException)t;
		}
		
		if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
			throw (com.liferay.portal.kernel.exception.SystemException)t;
		}

		if (t instanceof RuntimeException) {
			throw (RuntimeException)t;
		}
		else {
			throw new RuntimeException(t.getClass().getName() +
				" is not a valid exception");
		}
	}
	return null;

}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:47,代码来源:LearningActivityTypeClp.java

示例13: deleteResources

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
public void deleteResources(ActionRequest actionRequest,ActionResponse actionResponse,LearningActivity learningActivity)
		throws PortalException,SystemException,DocumentException,IOException{
	try {
		ClassLoader classLoader = clp.getClassLoader();
		Class learningActivityClass = Class.forName(LearningActivity.class.getName(),true, classLoader);
		
		MethodKey deleteResourcesMethod = new MethodKey(clp.getClassName(), "deleteResources", ActionRequest.class, ActionResponse.class, learningActivityClass);    
		Object learningActivityObj = translateLearningActivity(learningActivity);
		clp.invoke(new MethodHandler(deleteResourcesMethod, actionRequest, actionResponse, learningActivityObj));
		ClassLoaderProxy classLoaderProxy = new ClassLoaderProxy(learningActivityObj, clp.getClassLoader());
		learningActivity.setModelAttributes((Map<String, Object>) classLoaderProxy.invoke("getModelAttributes", new Object[]{}));
	}
	catch (Throwable t) {
		t = ClpSerializer.translateThrowable(t);
		
		if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
			throw (com.liferay.portal.kernel.exception.PortalException)t;
		}
		
		if (t instanceof IOException) {
			throw (IOException)t;
		}
		
		if (t instanceof DocumentException) {
			throw (DocumentException)t;
		}
		
		if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
			throw (com.liferay.portal.kernel.exception.SystemException)t;
		}

		if (t instanceof RuntimeException) {
			throw (RuntimeException)t;
		}
		else {
			throw new RuntimeException(t.getClass().getName() +
				" is not a valid exception");
		}
	}

}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:42,代码来源:LearningActivityTypeClp.java

示例14: QuestionTypeClp

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
public QuestionTypeClp(ClassLoaderProxy clp) {
	this.clp = clp;
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:4,代码来源:QuestionTypeClp.java

示例15: CalificationTypeClp

import com.liferay.portal.kernel.util.ClassLoaderProxy; //导入依赖的package包/类
public CalificationTypeClp(ClassLoaderProxy clp) {
	this.clp = clp;
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:4,代码来源:CalificationTypeClp.java


注:本文中的com.liferay.portal.kernel.util.ClassLoaderProxy类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。