當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。