org.alfresco.service.cmr.action.ParameterDefinition Java Examples

The following examples show how to use org.alfresco.service.cmr.action.ParameterDefinition. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ParameterizedItemDefinitionImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * Create a map of the definitions to use for subsequent calls
 */
private void createParamDefinitionsByName()
{
    this.paramDefinitionsByName = new HashMap<Locale, Map<String, ParameterDefinition>>();
    for (Locale locale : this.parameterDefinitions.keySet())
    {
        Map<String, ParameterDefinition> namedDefinitions = new HashMap<String, ParameterDefinition>();
        this.paramDefinitionsByName.put(locale, namedDefinitions);

        List<ParameterDefinition> localizedDefinitions = this.parameterDefinitions.get(locale);

        if (localizedDefinitions!= null && localizedDefinitions.size()>0)
        {
            for (ParameterDefinition definition : localizedDefinitions)
            {
                namedDefinitions.put(definition.getName(), definition);
            }
        }
    }
}
 
Example #2
Source File: BaseParameterizedItemDefinitionImplTest.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
public void testGetParameterDefintions()
{
    ParameterizedItemDefinitionImpl temp = create();
    List<ParameterDefinition> params = temp.getParameterDefinitions();
    assertNotNull(params);
    assertEquals(2, params.size());
    int i = 0;
    for (ParameterDefinition definition : params)
    {
        if (i == 0)
        {
            assertEquals(PARAM1_NAME, definition.getName());
            assertEquals(PARAM1_TYPE, definition.getType());
            assertEquals(PARAM1_DISPLAYNAME, definition.getDisplayLabel());
        }
        else
        {
            assertEquals(PARAM2_NAME, definition.getName());
            assertEquals(PARAM2_TYPE, definition.getType());
            assertEquals(PARAM2_DISPLAYNAME, definition.getDisplayLabel());
        }
        i++;
    }
}
 
Example #3
Source File: BaseTemplateRenderingEngine.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
protected Collection<ParameterDefinition> getParameterDefinitions()
{
    Collection<ParameterDefinition> paramList = super.getParameterDefinitions();
    ParameterDefinitionImpl modelParamDef = new ParameterDefinitionImpl(PARAM_MODEL, DataTypeDefinition.ANY, false,
            getParamDisplayLabel(PARAM_MODEL));
    ParameterDefinitionImpl templateParamDef = new ParameterDefinitionImpl(//
            PARAM_TEMPLATE, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_TEMPLATE));
    ParameterDefinitionImpl templateNodeParamDef = new ParameterDefinitionImpl(PARAM_TEMPLATE_NODE,
            DataTypeDefinition.NODE_REF, false, getParamDisplayLabel(PARAM_TEMPLATE_NODE));
    ParameterDefinitionImpl templatePathParamDef = new ParameterDefinitionImpl(PARAM_TEMPLATE_PATH,
            DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_TEMPLATE_PATH));
    paramList.add(new ParameterDefinitionImpl(PARAM_MIME_TYPE, DataTypeDefinition.TEXT, false,
            getParamDisplayLabel(PARAM_MIME_TYPE)));
    paramList.add(modelParamDef);
    paramList.add(templateParamDef);
    paramList.add(templateNodeParamDef);
    paramList.add(templatePathParamDef);
    return paramList;
}
 
Example #4
Source File: ActionFormProcessor.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
protected List<Field> generateDefaultFields(FormCreationData data, List<String> fieldsToIgnore)
{
    List<Field> fields = new ArrayList<Field>();
    
    ActionItemData itemData = (ActionItemData)data.getItemData();
    
    // generate a field for each action parameter
    for (ParameterDefinition paramDef : itemData.getActionDefinition().getParameterDefinitions())
    {
        if (!fieldsToIgnore.contains(paramDef.getName()))
        {
            ActionParameterField actionParameterField = new ActionParameterField(paramDef, actionService);
            fields.add(actionParameterField);
        }
    }
    
    // And also generate the special case of "execute asynchronously", which is not defined
    // as an ActionParameter within the ActionExecuter, but is instead available for all actions.
    fields.add(new ActionNonParameterField(EXECUTE_ASYNCHRONOUSLY, DataTypeDefinition.BOOLEAN));
    
    return fields;
}
 
Example #5
Source File: ParameterizedItemDefinitionImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * @see org.alfresco.service.cmr.action.ParameterizedItemDefinition#getParameterDefintion(java.lang.String)
 */
public ParameterDefinition getParameterDefintion(String name)
{
    ParameterDefinition result = null;

    if (null != paramDefinitionsByName)
    {
        Set<Locale> locales = paramDefinitionsByName.keySet();
        Locale match = I18NUtil.getNearestLocale(I18NUtil.getLocale(), locales);
        Map<String, ParameterDefinition> localizedDefinitionsByName = paramDefinitionsByName.get(match);

        if (null == localizedDefinitionsByName)
        {
            localizedDefinitionsByName = paramDefinitionsByName.get(Locale.ROOT);
        }

        result = (null == localizedDefinitionsByName) ? (null) : (localizedDefinitionsByName.get(name));
    }

    return result;
}
 
Example #6
Source File: ActionsImpl.java    From alfresco-remote-api with GNU Lesser General Public License v3.0 6 votes vote down vote up
private ActionDefinition getActionDefinition( 
        org.alfresco.service.cmr.action.ActionDefinition actionDefinitionId)
{        
    List<ActionDefinition.ParameterDefinition> paramDefs =
            actionDefinitionId.
                    getParameterDefinitions().
                    stream().
                    map(this::toModel).
                    collect(Collectors.toList());
    return new ActionDefinition(
            actionDefinitionId.getName(), // ID is a synonym for name.
            actionDefinitionId.getName(),
            actionDefinitionId.getTitle(),
            actionDefinitionId.getDescription(),
            toShortQNames(actionDefinitionId.getApplicableTypes()),
            actionDefinitionId.getAdhocPropertiesAllowed(),
            actionDefinitionId.getTrackStatus(),
            paramDefs);
}
 
Example #7
Source File: ParameterizedItemAbstractBase.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * Checked whether all the mandatory parameters for the rule item have been assigned.
 * 
 * @param ruleItem                the rule item
 * @param ruleItemDefinition    the rule item definition
 */
protected void checkMandatoryProperties(ParameterizedItem ruleItem, ParameterizedItemDefinition ruleItemDefinition)
{
    List<ParameterDefinition> definitions = ruleItemDefinition.getParameterDefinitions();
    if (definitions!= null && definitions.size()>0)
    {
        for (ParameterDefinition definition : definitions)
        {
            if (definition.isMandatory() == true)
            {
                // Check that a value has been set for the mandatory parameter
                if (ruleItem.getParameterValue(definition.getName()) == null)
                {
                    // Error since a mandatory parameter has a null value
                    throw new RuleServiceException(
                            MessageFormat.format(ERR_MAND_PROP, new Object[]{definition.getName(), ruleItemDefinition.getName()}));
                }
            }
        }
    }
}
 
Example #8
Source File: ImporterActionExecuter.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * @see org.alfresco.repo.action.ParameterizedItemAbstractBase#addParameterDefinitions(java.util.List)
 */
protected void addParameterDefinitions(List<ParameterDefinition> paramList) 
{
    paramList.add(new ParameterDefinitionImpl(PARAM_DESTINATION_FOLDER, DataTypeDefinition.NODE_REF, 
          true, getParamDisplayLabel(PARAM_DESTINATION_FOLDER)));
    paramList.add(new ParameterDefinitionImpl(PARAM_ENCODING, DataTypeDefinition.TEXT, 
          false, getParamDisplayLabel(PARAM_ENCODING)));
}
 
Example #9
Source File: ScriptActionExecuter.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * @see org.alfresco.repo.action.ParameterizedItemAbstractBase#addParameterDefinitions(java.util.List)
 */
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
{
    if (scriptLocation == null)
    {
        paramList.add(new ParameterDefinitionImpl(PARAM_SCRIPTREF, DataTypeDefinition.NODE_REF, true, getParamDisplayLabel(PARAM_SCRIPTREF), false, "ac-scripts"));
    }
}
 
Example #10
Source File: LinkCategoryActionExecuter.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Add the parameter definitions
 */
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList) 
{
    paramList.add(new ParameterDefinitionImpl(PARAM_CATEGORY_ASPECT, DataTypeDefinition.QNAME, false, getParamDisplayLabel(PARAM_CATEGORY_ASPECT)));
    paramList.add(new ParameterDefinitionImpl(PARAM_CATEGORY_VALUE, DataTypeDefinition.NODE_REF, true, getParamDisplayLabel(PARAM_CATEGORY_VALUE)));
}
 
Example #11
Source File: ExecuteAllRulesActionExecuter.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * @see org.alfresco.repo.action.ParameterizedItemAbstractBase#addParameterDefinitions(java.util.List)
 */
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
{
    paramList.add(new ParameterDefinitionImpl(PARAM_EXECUTE_INHERITED_RULES, DataTypeDefinition.BOOLEAN, false, getParamDisplayLabel(PARAM_EXECUTE_INHERITED_RULES)));
    paramList.add(new ParameterDefinitionImpl(PARAM_RUN_ALL_RULES_ON_CHILDREN, DataTypeDefinition.BOOLEAN, false, getParamDisplayLabel(PARAM_RUN_ALL_RULES_ON_CHILDREN)));
}
 
Example #12
Source File: RepositoryExporterActionExecuter.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * @see org.alfresco.repo.action.ParameterizedItemAbstractBase#addParameterDefinitions(java.util.List)
 */
protected void addParameterDefinitions(List<ParameterDefinition> paramList) 
{
    paramList.add(new ParameterDefinitionImpl(PARAM_PACKAGE_NAME, DataTypeDefinition.TEXT, true, 
          getParamDisplayLabel(PARAM_PACKAGE_NAME)));
    paramList.add(new ParameterDefinitionImpl(PARAM_DESTINATION_FOLDER, DataTypeDefinition.NODE_REF, true, 
          getParamDisplayLabel(PARAM_DESTINATION_FOLDER)));
}
 
Example #13
Source File: ImageTransformActionExecuter.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Add parameter definitions
 */
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
{
    super.addParameterDefinitions(paramList);
    paramList.add(new ParameterDefinitionImpl(PARAM_CONVERT_COMMAND, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_CONVERT_COMMAND)));
}
 
Example #14
Source File: InCategoryEvaluator.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Add the parameter definitions
 */
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList) 
{
    paramList.add(new ParameterDefinitionImpl(PARAM_CATEGORY_ASPECT, DataTypeDefinition.QNAME, true, getParamDisplayLabel(PARAM_CATEGORY_ASPECT)));
    paramList.add(new ParameterDefinitionImpl(PARAM_CATEGORY_VALUE, DataTypeDefinition.NODE_REF, true, getParamDisplayLabel(PARAM_CATEGORY_VALUE)));
}
 
Example #15
Source File: TransformActionExecuter.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Add parameter definitions
 */
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList) 
{
    paramList.add(new ParameterDefinitionImpl(PARAM_MIME_TYPE, DataTypeDefinition.TEXT, true, getParamDisplayLabel(PARAM_MIME_TYPE), false, "ac-mimetypes"));
    paramList.add(new ParameterDefinitionImpl(PARAM_DESTINATION_FOLDER, DataTypeDefinition.NODE_REF, true, getParamDisplayLabel(PARAM_DESTINATION_FOLDER)));
    paramList.add(new ParameterDefinitionImpl(PARAM_ASSOC_TYPE_QNAME, DataTypeDefinition.QNAME, false, getParamDisplayLabel(PARAM_ASSOC_TYPE_QNAME)));
    paramList.add(new ParameterDefinitionImpl(PARAM_ASSOC_QNAME, DataTypeDefinition.QNAME, false, getParamDisplayLabel(PARAM_ASSOC_QNAME)));
    paramList.add(new ParameterDefinitionImpl(PARAM_OVERWRITE_COPY, DataTypeDefinition.BOOLEAN, false, getParamDisplayLabel(PARAM_OVERWRITE_COPY)));
}
 
Example #16
Source File: ActionDefinitionImplTest.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * REPO-2253: Community: ALF-21854 Action parameter lookup for "de_DE" falls back to "root" locale instead of "de"
 */
public void testParameterDefinitionLocaleFallback()
{
    Locale originalLocale = I18NUtil.getLocale();
    try
    {
        ActionDefinitionImpl actionDef = new ActionDefinitionImpl(NAME);
        Map<Locale, List<ParameterDefinition>> localizedParams = new HashMap<>();
        
        
        localizedParams.put(Locale.ROOT, exampleFieldList("English Label"));
        localizedParams.put(Locale.ENGLISH, exampleFieldList("English Label"));
        localizedParams.put(Locale.UK, exampleFieldList("UK-specific Label"));
        localizedParams.put(Locale.GERMAN, exampleFieldList("German Label"));
        actionDef.setLocalizedParameterDefinitions(localizedParams);

        I18NUtil.setLocale(null);
        assertEquals("English Label", actionDef.getParameterDefintion("example-field").getDisplayLabel());

        I18NUtil.setLocale(Locale.ENGLISH);
        assertEquals("English Label", actionDef.getParameterDefintion("example-field").getDisplayLabel());

        // en-GB does not need to fallback to en
        I18NUtil.setLocale(Locale.UK);
        assertEquals("UK-specific Label", actionDef.getParameterDefintion("example-field").getDisplayLabel());

        I18NUtil.setLocale(Locale.GERMAN);
        assertEquals("German Label", actionDef.getParameterDefintion("example-field").getDisplayLabel());
        
        I18NUtil.setLocale(Locale.GERMANY);
        // de-DE falls back to de
        assertEquals("German Label", actionDef.getParameterDefintion("example-field").getDisplayLabel());
    }
    finally
    {
        I18NUtil.setLocale(originalLocale);
    }
}
 
Example #17
Source File: ParameterizedItemDefinitionImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * @see org.alfresco.service.cmr.action.ParameterizedItemDefinition#hasParameterDefinitions()
 */
public boolean hasParameterDefinitions()
{
    List<ParameterDefinition> localizedDefinitions = getParameterDefinitions();

    return (null != localizedDefinitions) && !localizedDefinitions.isEmpty();
}
 
Example #18
Source File: ParameterizedItemDefinitionImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * @see org.alfresco.service.cmr.action.ParameterizedItemDefinition#getParameterDefinitions()
 */
public List<ParameterDefinition> getParameterDefinitions()
{
    Set<Locale> locales = parameterDefinitions.keySet();
    Locale match = I18NUtil.getNearestLocale(I18NUtil.getLocale(), locales);
    List<ParameterDefinition> result = parameterDefinitions.get(match);

    if (null == result)
    {
        result = parameterDefinitions.get(Locale.ROOT);
    }

    return result;
}
 
Example #19
Source File: ActionFormProcessorTest.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override protected void addParameterDefinitions(List<ParameterDefinition> paramList)
{
    paramList.add(new ParameterDefinitionImpl("check", DataTypeDefinition.BOOLEAN, false, "Check"));
    paramList.add(new ParameterDefinitionImpl("date", DataTypeDefinition.DATE, false, "Date"));
    paramList.add(new ParameterDefinitionImpl("qname", DataTypeDefinition.QNAME, false, "QName", true));
    paramList.add(new ParameterDefinitionImpl("nodeRefs", DataTypeDefinition.NODE_REF, false, "NodeRefs", true));
}
 
Example #20
Source File: ParameterizedItemDefinitionImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Set the parameter definitions for the rule item with the locale specified
 *
 * @param parameterDefinitions  the parameter definitions
 */
public void setLocalizedParameterDefinitions(Map<Locale, List<ParameterDefinition>> parameterDefinitions)
{
    if (hasDuplicateNames(parameterDefinitions) == true)
    {
        throw new RuleServiceException(ERR_NAME_DUPLICATION);
    }
    this.parameterDefinitions = parameterDefinitions;
    createParamDefinitionsByName();
}
 
Example #21
Source File: HasChildEvaluator.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * @see org.alfresco.repo.action.ParameterizedItemAbstractBase#addParameterDefinitions(java.util.List)
 */
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList) 
{
    paramList.add(new ParameterDefinitionImpl(PARAM_ASSOC_TYPE, DataTypeDefinition.QNAME, false, getParamDisplayLabel(PARAM_ASSOC_TYPE), false));
    paramList.add(new ParameterDefinitionImpl(PARAM_ASSOC_NAME, DataTypeDefinition.QNAME, false, getParamDisplayLabel(PARAM_ASSOC_NAME), false));
}
 
Example #22
Source File: ParameterizedItemDefinitionImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Determines whether the list of parameter defintions contains duplicate
 * names of not.
 * 
 * @param parameterDefinitions  a list of parmeter definitions
 * @return                      true if there are name duplications, false
 *                              otherwise
 */
private boolean hasDuplicateNames(List<ParameterDefinition> parameterDefinitions)
{
    boolean result = false;
    if (parameterDefinitions != null)
    {
        HashSet<String> temp = new HashSet<String>(parameterDefinitions.size());
        for (ParameterDefinition definition : parameterDefinitions)
        {
            temp.add(definition.getName());
        }
        result = (parameterDefinitions.size() != temp.size());
    }
    return result;
}
 
Example #23
Source File: ComparePropertyValueEvaluatorTest.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Test
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());
}
 
Example #24
Source File: ComparePropertyValueEvaluator.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Add parameter definitions
 */
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList) 
{
    paramList.add(new ParameterDefinitionImpl(PARAM_PROPERTY, DataTypeDefinition.QNAME, false, getParamDisplayLabel(PARAM_PROPERTY)));
    paramList.add(new ParameterDefinitionImpl(PARAM_CONTENT_PROPERTY, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_CONTENT_PROPERTY), false, "ac-content-properties"));
    paramList.add(new ParameterDefinitionImpl(PARAM_VALUE, DataTypeDefinition.ANY, true, getParamDisplayLabel(PARAM_VALUE)));
    paramList.add(new ParameterDefinitionImpl(PARAM_OPERATION, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_OPERATION), false, "ac-compare-operations"));
}
 
Example #25
Source File: ScriptAction.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Convert Action Parameter for Java usage
 * 
 * @param paramName
 *            parameter name
 * @param value
 *            value to convert
 * @return converted value
 */
@SuppressWarnings("synthetic-access")
public Serializable convertActionParamForRepo(String paramName, Serializable value)
{
    ParameterDefinition paramDef = actionDef.getParameterDefintion(paramName);

    if (paramDef != null && paramDef.getType().equals(DataTypeDefinition.QNAME))
    {
        if (value instanceof Wrapper)
        {
            // unwrap a Java object from a JavaScript wrapper
            // recursively call this method to convert the unwrapped value
            return convertActionParamForRepo(paramName, (Serializable) ((Wrapper) value).unwrap());
        }
        else
        {
            if (value instanceof String)
            {
                String stringQName = (String) value;
                if (stringQName.startsWith("{"))
                {
                    return QName.createQName(stringQName);
                   
                }
                else
                {
                    return QName.createQName(stringQName, namespaceService);
                }
            }
            else
            {
                return value;
            }
        }
    }
    else
    {
        return convertValueForRepo(value);
    }
}
 
Example #26
Source File: ActionsImpl.java    From alfresco-remote-api with GNU Lesser General Public License v3.0 5 votes vote down vote up
private Map<String, Serializable> extractActionParams(org.alfresco.service.cmr.action.ActionDefinition actionDefinition, Map<String, String> params)
{
    Map<String, Serializable> parameterValues = new HashMap<>();

    try
    {
        for (Map.Entry<String, String> entry : params.entrySet())
        {
            String propertyName = entry.getKey();
            Object propertyValue = entry.getValue();

            // Get the parameter definition we care about
            ParameterDefinition paramDef = actionDefinition.getParameterDefintion(propertyName);
            if (paramDef == null && !actionDefinition.getAdhocPropertiesAllowed())
            {
                throw new AlfrescoRuntimeException("Invalid parameter " + propertyName + " for action/condition " + actionDefinition.getName());
            }
            if (paramDef != null)
            {
                QName typeQName = paramDef.getType();

                // Convert the property value
                Serializable value = convertValue(typeQName, propertyValue);
                parameterValues.put(propertyName, value);
            }
            else
            {
                // If there is no parameter definition we can only rely on the .toString()
                // representation of the ad-hoc property
                parameterValues.put(propertyName, propertyValue.toString());
            }
        }
    }
    catch (JSONException je)
    {
        throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Could not parse JSON from req.", je);
    }

    return parameterValues;
}
 
Example #27
Source File: CreateVersionActionExecuter.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * @see org.alfresco.repo.action.ParameterizedItemAbstractBase#addParameterDefinitions(java.util.List)
 */
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList) 
{
    paramList.add(new ParameterDefinitionImpl(PARAM_MINOR_CHANGE, DataTypeDefinition.BOOLEAN, false, getParamDisplayLabel(PARAM_MINOR_CHANGE)));
    paramList.add(new ParameterDefinitionImpl(PARAM_DESCRIPTION, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_DESCRIPTION)));
}
 
Example #28
Source File: LinkRules.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * @see org.alfresco.repo.action.ParameterizedItemAbstractBase#addParameterDefinitions(java.util.List)
 */
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
{
    paramList.add(
            new ParameterDefinitionImpl(PARAM_LINK_FROM_NODE,
            DataTypeDefinition.NODE_REF, 
            true,
            getParamDisplayLabel(PARAM_LINK_FROM_NODE)));
}
 
Example #29
Source File: StartWorkflowActionExecuter.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList) 
{
    paramList.add(new ParameterDefinitionImpl(PARAM_WORKFLOW_NAME, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_WORKFLOW_NAME)));
    paramList.add(new ParameterDefinitionImpl(PARAM_END_START_TASK, DataTypeDefinition.BOOLEAN, false, getParamDisplayLabel(PARAM_END_START_TASK)));
    paramList.add(new ParameterDefinitionImpl(PARAM_START_TASK_TRANSITION, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_START_TASK_TRANSITION)));
    // TODO: start task node parameter
}
 
Example #30
Source File: CancelWorkflowActionExecuter.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
{
    paramList.add(
            new ParameterDefinitionImpl(PARAM_WORKFLOW_ID_LIST,
                                        DataTypeDefinition.ANY,
                                        false,
                                        getParamDisplayLabel(PARAM_WORKFLOW_ID_LIST)));
}