本文整理汇总了Java中org.alfresco.service.cmr.action.ActionConditionDefinition类的典型用法代码示例。如果您正苦于以下问题:Java ActionConditionDefinition类的具体用法?Java ActionConditionDefinition怎么用?Java ActionConditionDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActionConditionDefinition类属于org.alfresco.service.cmr.action包,在下文中一共展示了ActionConditionDefinition类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: populateProperties
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
protected void populateProperties(FacesContext context, ActionCondition condition,
Map<String, Serializable> uiConditionProperties)
{
uiConditionProperties.put(PROP_CONDITION_NAME, this.selectedCondition);
uiConditionProperties.put(BaseConditionHandler.PROP_CONDITION_NOT, Boolean.valueOf(condition.getInvertCondition()));
IHandler handler = this.conditionHandlers.get(this.selectedCondition);
if (handler != null)
{
// use the handler to populate the properties and summary
handler.prepareForEdit(uiConditionProperties, condition.getParameterValues());
uiConditionProperties.put(PROP_CONDITION_SUMMARY, handler
.generateSummary(context, this, uiConditionProperties));
} else
{
// there's no handler, so we presume it is a no-parameter
// condition, use the condition title as the summary
ActionConditionDefinition conditionDef = this.getActionService().getActionConditionDefinition(this.selectedCondition);
uiConditionProperties.put(PROP_CONDITION_SUMMARY, conditionDef.getTitle());
// add the no params marker so we can disable the edit action
uiConditionProperties.put(NO_PARAMS_MARKER, "no-params");
}
}
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:24,代码来源:EditRuleWizard.java
示例2: getConditions
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* @return Returns the list of selectable conditions
*/
public List<SelectItem> getConditions()
{
if (this.conditions == null)
{
List<ActionConditionDefinition> ruleConditions = this.getActionService().getActionConditionDefinitions();
this.conditions = new ArrayList<SelectItem>(ruleConditions.size());
for (ActionConditionDefinition ruleConditionDef : ruleConditions)
{
// add to SelectItem list
this.conditions.add(new SelectItem(ruleConditionDef.getName(), ruleConditionDef.getTitle()));
}
// make sure the list is sorted by the label
QuickSort sorter = new QuickSort(this.conditions, "label", true, IDataContainer.SORT_CASEINSENSITIVE);
sorter.sort();
// add the "Select a condition" entry at the beginning of the list
this.conditions.add(0, new SelectItem("null", Application.getMessage(FacesContext.getCurrentInstance(),
"select_a_condition")));
}
return this.conditions;
}
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:27,代码来源:CreateRuleWizard.java
示例3: executeImpl
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* @see org.springframework.extensions.webscripts.DeclarativeWebScript#executeImpl(org.springframework.extensions.webscripts.WebScriptRequest, org.springframework.extensions.webscripts.Status, org.springframework.extensions.webscripts.Cache)
*/
@Override
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
{
List<ActionConditionDefinition> dmDefs = actionService.getActionConditionDefinitions();
List<RecordsManagementActionCondition> conditions = recordsManagementActionService.getRecordsManagementActionConditions();
List<ActionConditionDefinition> defs = new ArrayList<ActionConditionDefinition>(dmDefs.size()+conditions.size());
defs.addAll(dmDefs);
for (RecordsManagementActionCondition condition: conditions)
{
if (condition.isPublicCondition())
{
defs.add(condition.getRecordsManagementActionConditionDefinition());
}
}
Map<String, Object> model = new HashMap<String, Object>();
model.put("actionconditiondefinitions", defs);
return model;
}
开发者ID:Alfresco,项目名称:records-management-old,代码行数:25,代码来源:RmActionConditionDefinitionsGet.java
示例4: getActionConditionDefintion
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* Get the action condition definition.
*
* @return the action condition definition
*/
public ActionConditionDefinition getActionConditionDefintion()
{
if (this.actionConditionDefinition == null)
{
this.actionConditionDefinition = new ActionConditionDefinitionImpl(this.name);
((ActionConditionDefinitionImpl)this.actionConditionDefinition).setTitleKey(getTitleKey());
((ActionConditionDefinitionImpl)this.actionConditionDefinition).setDescriptionKey(getDescriptionKey());
((ActionConditionDefinitionImpl)this.actionConditionDefinition).setAdhocPropertiesAllowed(getAdhocPropertiesAllowed());
((ActionConditionDefinitionImpl)this.actionConditionDefinition).setConditionEvaluator(this.name);
((ActionConditionDefinitionImpl)this.actionConditionDefinition).setLocalizedParameterDefinitions(getLocalizedParameterDefinitions());
}
return this.actionConditionDefinition;
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:19,代码来源:ActionConditionEvaluatorAbstractBase.java
示例5: testCheckParamDefintionWithConstraint
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
public void testCheckParamDefintionWithConstraint()
{
ActionConditionDefinition def = evaluator.getActionConditionDefintion();
assertEquals(ComparePropertyValueEvaluator.NAME, def.getName());
ParameterDefinition paramDef = def.getParameterDefintion(ComparePropertyValueEvaluator.PARAM_OPERATION);
assertNotNull(paramDef);
assertEquals(ComparePropertyValueEvaluator.PARAM_OPERATION, paramDef.getName());
String constraintName = paramDef.getParameterConstraintName();
assertNotNull(constraintName);
ParameterConstraint paramConstraint = actionService.getParameterConstraint(constraintName);
assertNotNull(paramConstraint);
assertEquals("ac-compare-operations", paramConstraint.getName());
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:14,代码来源:ComparePropertyValueEvaluatorTest.java
示例6: testGetActionDefinition
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* Test getActionDefinition
*/
public void testGetActionDefinition()
{
ActionDefinition action = actionService.getActionDefinition(AddFeaturesActionExecuter.NAME);
assertNotNull(action);
assertEquals(AddFeaturesActionExecuter.NAME, action.getName());
ActionConditionDefinition nullCondition = this.actionService.getActionConditionDefinition(BAD_NAME);
assertNull(nullCondition);
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:ActionServiceImplTest.java
示例7: testGetActionConditionDefinition
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* Test getActionConditionDefinition
*/
public void testGetActionConditionDefinition()
{
ActionConditionDefinition condition = this.actionService.getActionConditionDefinition(NoConditionEvaluator.NAME);
assertNotNull(condition);
assertEquals(NoConditionEvaluator.NAME, condition.getName());
ActionConditionDefinition nullCondition = this.actionService.getActionConditionDefinition(BAD_NAME);
assertNull(nullCondition);
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:ActionServiceImplTest.java
示例8: testGetActionConditionDefinitions
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* Test getActionConditionDefinitions
*
*/
public void testGetActionConditionDefinitions()
{
List<ActionConditionDefinition> defintions = this.actionService.getActionConditionDefinitions();
assertNotNull(defintions);
assertFalse(defintions.isEmpty());
for (ActionConditionDefinition definition : defintions)
{
System.out.println(definition.getTitle());
}
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:16,代码来源:ActionServiceImplTest.java
示例9: executeImpl
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
@Override
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
{
Map<String, Object> model = new HashMap<String, Object>();
// get all action condition definitions
List<ActionConditionDefinition> actionconditiondefinitions = actionService.getActionConditionDefinitions();
model.put("actionconditiondefinitions", actionconditiondefinitions);
return model;
}
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:13,代码来源:ActionConditionDefinitionsGet.java
示例10: getActionConditionDefintion
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* Get the action condition definition.
*
* @return the action condition definition
*/
public ActionConditionDefinition getActionConditionDefintion()
{
if (this.actionConditionDefinition == null)
{
this.actionConditionDefinition = new ActionConditionDefinitionImpl(this.name);
((ActionConditionDefinitionImpl)this.actionConditionDefinition).setTitleKey(getTitleKey());
((ActionConditionDefinitionImpl)this.actionConditionDefinition).setDescriptionKey(getDescriptionKey());
((ActionConditionDefinitionImpl)this.actionConditionDefinition).setAdhocPropertiesAllowed(getAdhocPropertiesAllowed());
((ActionConditionDefinitionImpl)this.actionConditionDefinition).setConditionEvaluator(this.name);
((ActionConditionDefinitionImpl)this.actionConditionDefinition).setLocalizedParameterDefinitions(getLocalizedParameterDefinitions());
}
return this.actionConditionDefinition;
}
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:19,代码来源:ActionConditionEvaluatorAbstractBase.java
示例11: getActionConditionDefintion
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* @see org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase#getActionConditionDefintion()
*
* TODO base class should provide "createActionDefinition" method that can be over-ridden like the ActionExecuter
* base class to prevent duplication of code and a cleaner extension.
*/
@Override
public ActionConditionDefinition getActionConditionDefintion()
{
if (this.actionConditionDefinition == null)
{
this.actionConditionDefinition = new RecordsManagementActionConditionDefinitionImpl(name);
((RecordsManagementActionConditionDefinitionImpl)actionConditionDefinition).setTitleKey(getTitleKey());
((RecordsManagementActionConditionDefinitionImpl)actionConditionDefinition).setDescriptionKey(getDescriptionKey());
((RecordsManagementActionConditionDefinitionImpl)actionConditionDefinition).setAdhocPropertiesAllowed(getAdhocPropertiesAllowed());
((RecordsManagementActionConditionDefinitionImpl)actionConditionDefinition).setConditionEvaluator(name);
((RecordsManagementActionConditionDefinitionImpl)actionConditionDefinition).setParameterDefinitions(getParameterDefintions());
}
return this.actionConditionDefinition;
}
开发者ID:Alfresco,项目名称:records-management-old,代码行数:21,代码来源:RecordsManagementActionConditionEvaluatorAbstractBase.java
示例12: getActionConditionDefinition
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* @see org.alfresco.repo.action.ActionServiceImpl#getActionConditionDefinition(java.lang.String)
*/
public ActionConditionDefinition getActionConditionDefinition(String name)
{
// get direct access to action condition definition (i.e. ignoring public flag of executer)
ActionConditionDefinition definition = null;
Object bean = extendedApplicationContext.getBean(name);
if (bean instanceof ActionConditionEvaluator)
{
ActionConditionEvaluator evaluator = (ActionConditionEvaluator) bean;
definition = evaluator.getActionConditionDefintion();
}
return definition;
}
开发者ID:Alfresco,项目名称:records-management-old,代码行数:16,代码来源:ExtendedActionServiceImpl.java
示例13: getActionConditionDefinition
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* @see org.alfresco.service.cmr.action.ActionService#getActionConditionDefinition(java.lang.String)
*/
public ActionConditionDefinition getActionConditionDefinition(String name)
{
return this.conditionDefinitions.get(name);
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:ActionServiceImpl.java
示例14: getActionConditionDefinitions
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* @see org.alfresco.service.cmr.action.ActionService#getActionConditionDefinitions()
*/
public List<ActionConditionDefinition> getActionConditionDefinitions()
{
return new ArrayList<ActionConditionDefinition>(this.conditionDefinitions.values());
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:ActionServiceImpl.java
示例15: registerActionConditionEvaluator
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* @see org.alfresco.repo.action.RuntimeActionService#registerActionConditionEvaluator(org.alfresco.repo.action.evaluator.ActionConditionEvaluator)
*/
public void registerActionConditionEvaluator(ActionConditionEvaluator actionConditionEvaluator)
{
ActionConditionDefinition cond = actionConditionEvaluator.getActionConditionDefintion();
this.conditionDefinitions.put(cond.getName(), cond);
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:9,代码来源:ActionServiceImpl.java
示例16: promptForConditionValues
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* Displays the settings page for the current condition being added (if required)
*/
public void promptForConditionValues()
{
// set the flag to show we are creating a new condition
this.editingCondition = false;
FacesContext context = FacesContext.getCurrentInstance();
this.returnViewId = context.getViewRoot().getViewId();
String viewId = null;
this.currentConditionProperties = new HashMap<String, Serializable>(3);
this.currentConditionProperties.put(PROP_CONDITION_NAME, this.selectedCondition);
this.currentConditionProperties.put(BaseConditionHandler.PROP_CONDITION_NOT, Boolean.FALSE);
// get the handler for the condition, if there isn't one we presume it
// is a no-parameter condition
IHandler handler = this.conditionHandlers.get(this.selectedCondition);
if (handler != null)
{
if (logger.isDebugEnabled())
logger.debug("Found Handler for selected condition - '" + this.selectedCondition + "'");
// setup any UI defaults the condition may have and get the location of
// the JSP used to collect the parameters
handler.setupUIDefaults(this.currentConditionProperties);
viewId = handler.getJSPPath();
if (logger.isDebugEnabled())
logger.debug("Handler returned JSP page- '" + viewId + "' Handler Type " + handler.getClass().toString());
}
else
{
if (logger.isDebugEnabled())
logger.debug("Did Not Find a handler for selected condition - '" + this.selectedCondition + "'");
// just add the action to the list and use the title as the summary
ActionConditionDefinition conditionDef = this.getActionService()
.getActionConditionDefinition(this.selectedCondition);
this.currentConditionProperties.put(PROP_CONDITION_SUMMARY, conditionDef.getTitle());
this.currentConditionProperties.put(BaseConditionHandler.PROP_CONDITION_NOT, Boolean.FALSE);
// add the no params marker so we can disable the edit action
this.currentConditionProperties.put(NO_PARAMS_MARKER, "no-params");
this.allConditionsPropertiesList.add(this.currentConditionProperties);
// come back to the same page we're on now as there are no params to collect
viewId = this.returnViewId;
}
if (logger.isDebugEnabled())
logger.debug("Currently creating '" + this.selectedCondition + "' condition");
// go to the page to collect the settings
goToPage(context, viewId);
}
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:56,代码来源:CreateRuleWizard.java
示例17: getActionConditionDefintion
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* Get the action condition deinfinition
*
* @return the action condition definition
*/
public ActionConditionDefinition getActionConditionDefintion();
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:7,代码来源:ActionConditionEvaluator.java
示例18: getActionConditionDefintion
import org.alfresco.service.cmr.action.ActionConditionDefinition; //导入依赖的package包/类
/**
* Get the action condition deinfinition
*
* @return the action condition definition
*/
public ActionConditionDefinition getActionConditionDefintion();
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:7,代码来源:ActionConditionEvaluator.java
注:本文中的org.alfresco.service.cmr.action.ActionConditionDefinition类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论