12-04-2008 02:39 PM
12-05-2008 05:37 AM
<bean id="MscAbstractEvaluator"
class="org.alfresco.module.msc.action.evaluator.MscAbstractEvaluator"
abstract="true">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="authorityService">
<ref bean="AuthorityService" />
</property>
<property name="authenticationService">
<ref bean="AuthenticationService" />
</property>
<property name="transactionService">
<ref bean="transactionService"/>
</property>
</bean>
<bean id="MscAbstractEvaluator"
class="org.alfresco.module.msc.action.evaluator.MscAbstractEvaluator"
abstract="true">
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="authorityService">
<ref bean="AuthorityService" />
</property>
<property name="authenticationService">
<ref bean="AuthenticationService" />
</property>
</bean>
private boolean evaluateGeneric(final Node pNode) throws Exception {
RetryingTransactionHelper txnHelper = transactionService
.getRetryingTransactionHelper();
RetryingTransactionCallback<String> callback = new RetryingTransactionCallback<String>() {
public String execute() throws Throwable {
// on récupère l'état en cours
return (String) nodeService.getProperty( pNode.getNodeRef(),
MscPropertyEnum.PROPERTY_ETAT.getPropertyName() );
}
};
try
{
String lEtat = txnHelper.doInTransaction( callback, false, true );
if (log.isDebugEnabled())
{
log.debug( "lEtat" + lEtat );
}
MscStateEnum lEtatEnum = MscStateEnum.valueOf( lEtat );
if (log.isDebugEnabled())
{
log.debug( "Current state: " + lEtatEnum );
}
// on récupère les actions autorisées associées
List<MscActionEnum> lActionList = lEtatEnum.getActionList();
if (log.isDebugEnabled())
{
log.debug( "Available actions: " + lActionList );
}
return lActionList.contains( getAction() );
}
catch (Exception e)
{
if (log.isDebugEnabled())
{
log.debug( e );
}
}
return false;
}
12-06-2008 01:19 PM
U have changed the bean but how do you integrate it with Alfresco working module.
Is that possible to customize the code and add it to the working module?
06-24-2013 04:53 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.