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


Java InvitationType类代码示例

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


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

示例1: listInvitations

import org.alfresco.service.cmr.invitation.InvitationSearchCriteria.InvitationType; //导入依赖的package包/类
/**
   * List the open invitations for this web site.
   * props specifies optional properties to be searched.
   * 
   * @param props inviteeUserName
   *
   * @return the invitations
   */
  public ScriptInvitation<?>[] listInvitations(Scriptable props)
  {
  	InvitationSearchCriteriaImpl crit = new InvitationSearchCriteriaImpl();
  	crit.setResourceName(getShortName());
  	crit.setResourceType(Invitation.ResourceType.WEB_SITE);
  	
  	if (props.has("inviteeUserName", props))
  	{
  		crit.setInvitee((String)props.get("inviteeUserName", props));
    	}
  	if (props.has("invitationType", props))
  	{
  		String invitationType = (String)props.get("invitationType", props);
  		crit.setInvitationType(InvitationType.valueOf(invitationType));
      }

  	List<Invitation> invitations = invitationService.searchInvitation(crit);
  	ScriptInvitation<?>[] ret = new ScriptInvitation[invitations.size()];
      int i = 0;
for(Invitation item : invitations)
{
	ret[i++] = scriptInvitationFactory.toScriptInvitation(item);
}
  	return ret;
  }
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:34,代码来源:Site.java

示例2: getModeratedInvitationReviewTask

import org.alfresco.service.cmr.invitation.InvitationSearchCriteria.InvitationType; //导入依赖的package包/类
private WorkflowTask getModeratedInvitationReviewTask(String inviteeId, String siteShortName)
    {
		WorkflowTask reviewTask = null;

		// Is there an outstanding site invite request for the invitee?
		InvitationSearchCriteriaImpl criteria = new InvitationSearchCriteriaImpl();
		criteria.setInvitationType(InvitationType.MODERATED);
		criteria.setInvitee(inviteeId);
		criteria.setResourceName(siteShortName);
		criteria.setResourceType(ResourceType.WEB_SITE);
		
		// should be at most 1 invite
		List<String> invitationIds = searchInvitationsForIds(criteria, 1);
		if(invitationIds.size() == 1)
		{
			reviewTask = getModeratedInvitationReviewTask(invitationIds.get(0));
		}

		return reviewTask;
//		List<Invitation> invitations = searchInvitation(criteria);
//		if(invitations.size() > 1)
//		{
//			throw new AlfrescoRuntimeException("There should be only one outstanding site invitation");
//		}
//		return (invitations.size() == 0 ? null : (ModeratedInvitation)invitations.get(0));
    }
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:27,代码来源:InvitationServiceImpl.java

示例3: getSiteInvitation

import org.alfresco.service.cmr.invitation.InvitationSearchCriteria.InvitationType; //导入依赖的package包/类
private Invitation getSiteInvitation(String inviteeId, String siteId)
  {
// Is there an outstanding site invite request for the invitee?
InvitationSearchCriteriaImpl criteria = new InvitationSearchCriteriaImpl();
criteria.setInvitationType(InvitationType.MODERATED);
criteria.setInvitee(inviteeId);
criteria.setResourceName(siteId);
criteria.setResourceType(ResourceType.WEB_SITE);
List<Invitation> invitations = invitationService.searchInvitation(criteria);
if(invitations.size() > 1)
{
	// TODO exception
	throw new AlfrescoRuntimeException("There should be only one outstanding site invitation");
}
return (invitations.size() == 0 ? null : invitations.get(0));
  }
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:17,代码来源:SiteMembershipRequestsImpl.java

示例4: listPendingInvitationsForInvitee

import org.alfresco.service.cmr.invitation.InvitationSearchCriteria.InvitationType; //导入依赖的package包/类
/**
 * list Invitations for a specific person/invitee
 * 
 * @param invitee alfresco user id of person being invited
 */
public List<Invitation> listPendingInvitationsForInvitee(String invitee)
{
    InvitationSearchCriteriaImpl crit = new InvitationSearchCriteriaImpl();
    crit.setInvitationType(InvitationSearchCriteria.InvitationType.ALL);
    crit.setInvitee(invitee);
    return searchInvitation(crit);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:InvitationServiceImpl.java

示例5: getPendingInvitationCriteriaForResource

import org.alfresco.service.cmr.invitation.InvitationSearchCriteria.InvitationType; //导入依赖的package包/类
/**
 * Returns search criteria to find pending invitations
 * @param resourceType Invitation.ResourceType
 * @param resourceName String
 * @return search criteria
 */
private InvitationSearchCriteriaImpl getPendingInvitationCriteriaForResource(
        Invitation.ResourceType resourceType, String resourceName)
{
    InvitationSearchCriteriaImpl criteria = new InvitationSearchCriteriaImpl();
    criteria.setInvitationType(InvitationSearchCriteria.InvitationType.ALL);
    criteria.setResourceType(resourceType);
    criteria.setResourceName(resourceName);
    return criteria;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:16,代码来源:InvitationServiceImpl.java

示例6: getSiteInvitations

import org.alfresco.service.cmr.invitation.InvitationSearchCriteria.InvitationType; //导入依赖的package包/类
private List<Invitation> getSiteInvitations(String inviteeId)
  {
InvitationSearchCriteriaImpl criteria = new InvitationSearchCriteriaImpl();
criteria.setInvitationType(InvitationType.MODERATED);
criteria.setInvitee(inviteeId);
criteria.setResourceType(ResourceType.WEB_SITE);
List<Invitation> invitations = invitationService.searchInvitation(criteria);
return invitations;
  }
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:10,代码来源:SiteMembershipRequestsImpl.java


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