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


Java AuthenticationFault类代码示例

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


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

示例1: startAlfrescoSession

import org.alfresco.webservice.authentication.AuthenticationFault; //导入依赖的package包/类
private String startAlfrescoSession() throws AuthenticationFault {
	configureAlfrescoRepository();
	String alfrescoUser = GlobalProperties.getInstance().getProperty("app.gesdoc.plugin.user");
	if (alfrescoUser == null || alfrescoUser.length() == 0)
		alfrescoUser = GlobalProperties.getInstance().getProperty("app.docstore.alfresco.user");
	String alfrescoPass = GlobalProperties.getInstance().getProperty("app.gesdoc.plugin.pass");
	if (alfrescoPass == null || alfrescoPass.length() == 0)
		alfrescoPass = GlobalProperties.getInstance().getProperty("app.docstore.alfresco.pass");
	AuthenticationUtils.startSession(alfrescoUser, alfrescoPass);
	return AuthenticationUtils.getAuthenticationDetails().getTicket();
}
 
开发者ID:GovernIB,项目名称:helium,代码行数:12,代码来源:GestioDocumentalPluginAlfrescoCaib.java

示例2: startSession

import org.alfresco.webservice.authentication.AuthenticationFault; //导入依赖的package包/类
/**
  * Start a session
  * 
  * @param username
  * @param password
  * @throws AuthenticationFault
  */
 public static void startSession(String username, String password, String endpointAddress)
     throws AuthenticationFault
 {
     try
     {
AuthenticationServiceSoapBindingStub authenticationService = endpointAddress == null ? WebServiceFactory
		.getAuthenticationService()
		: WebServiceFactory.getAuthenticationService(endpointAddress);
		
         // Start the session
         AuthenticationResult result = authenticationService.startSession(username, password);           
         
         // Store the ticket for use later
         authenticationDetails.set(new AuthenticationDetails(result.getUsername(), result.getTicket(), result.getSessionid(), endpointAddress));
     }
     catch (RemoteException exception)
     {
         if (exception instanceof AuthenticationFault)
         {
             // Rethrow the authentication exception
             throw (AuthenticationFault)exception;
         }
         else
         {
             // Throw the exception as a wrapped runtime exception
         	exception.printStackTrace();
             throw new WebServiceException("Error starting session.", exception);
         }
     }             
 }
 
开发者ID:xenit-eu,项目名称:move2alf,代码行数:38,代码来源:AuthenticationUtils.java

示例3: startAlfrescoSession

import org.alfresco.webservice.authentication.AuthenticationFault; //导入依赖的package包/类
public String startAlfrescoSession() throws AuthenticationFault {
	configureAlfrescoRepository();
	AuthenticationUtils.startSession(userName, password);
	return AuthenticationUtils.getAuthenticationDetails().getTicket();
}
 
开发者ID:GovernIB,项目名称:helium,代码行数:6,代码来源:AlfrescoUtils.java


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