本文整理汇总了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;
}
示例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));
}
示例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));
}
示例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);
}
示例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;
}
示例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;
}