本文整理匯總了Java中org.alfresco.repo.rule.LinkRules類的典型用法代碼示例。如果您正苦於以下問題:Java LinkRules類的具體用法?Java LinkRules怎麽用?Java LinkRules使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
LinkRules類屬於org.alfresco.repo.rule包,在下文中一共展示了LinkRules類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testGetRuleset
import org.alfresco.repo.rule.LinkRules; //導入依賴的package包/類
public void testGetRuleset() throws Exception
{
JSONObject parentRule = createRule(testWorkNodeRef);
String[] parentRuleIds = new String[] { parentRule.getJSONObject("data").getString("id") };
JSONObject jsonRule = createRule(testNodeRef);
String[] ruleIds = new String[] { jsonRule.getJSONObject("data").getString("id") };
Action linkRulesAction = actionService.createAction(LinkRules.NAME);
linkRulesAction.setParameterValue(LinkRules.PARAM_LINK_FROM_NODE, testNodeRef);
actionService.executeAction(linkRulesAction, testNodeRef2);
Response linkedFromResponse = sendRequest(new GetRequest(formatRulesetUrl(testNodeRef)), 200);
JSONObject linkedFromResult = new JSONObject(linkedFromResponse.getContentAsString());
checkRuleset(linkedFromResult, 1, ruleIds, 1, parentRuleIds, true, false);
Response linkedToResponse = sendRequest(new GetRequest(formatRulesetUrl(testNodeRef2)), 200);
JSONObject linkedToResult = new JSONObject(linkedToResponse.getContentAsString());
checkRuleset(linkedToResult, 1, ruleIds, 1, parentRuleIds, false, true);
}