08-01-2007 03:15 AM
Reference reference = new Reference(STORE, uuid, null);
Rule[] rules = actionService.getRules(reference, null);
if (rules != null) {
for (Rule rule : rules) {
ActionExecutionResult[] resultado = actionService.executeActions( new Predicate(new Reference[]{reference}, STORE, null), rule.getAction().getActions());
}
}
08-06-2007 07:09 AM
08-28-2007 04:55 AM
10-04-2007 06:43 AM
05-26-2008 06:06 PM
liferay/webapps/alfresco/WEB-INF/classes/alfresco/templates/client/myspaces_preview_panel.ftl
by adding <tr>
<td class="spaceAction docActionUpdate" onclick="event.cancelBubble=true;MySpaces.updateItem(this, '${node.nodeRef}');">Approva</td>
<td class="spaceAction docActionUpdate" onclick="event.cancelBubble=true;MySpaces.updateItem(this, '${node.nodeRef}');">Rifiuta</td>
</tr>
digital2b:/srv/digital_disk/liferay/webapps# grep -R 'updateItem' *
alfresco/scripts/ajax/myspaces.js: updateItem: function(actionEl, nodeRef)
05-27-2008 06:37 AM
private void readWorkflow(){ // it reads the approve_folder and reject_folder from that space
relogin(); // this is a function witch checkes if the ticket is still valid. if not it relogins :)…. many problems may occur without it
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
try{
String username = AuthenticationUtils.getAuthenticationDetails().getUserName();
String userhome = username + "_home";
String referinta = "/app:company_home/app:user_homes/sys:" + userhome; // the reference to the space…. in this case i read the workflow from the user_home of the current user
Store store= new Store(Constants.WORKSPACE_STORE,"SpacesStore");
Reference ref=new Reference(store,null,referinta);
ActionServiceSoapBindingStub actionService=WebServiceFactory.getActionService();
Rule[] reguli = actionService.getRules(ref,new RuleFilter()); // reads the rules
Rule reg_workflow = null;
approve_folder = ""; //
reject_folder = ""; // these fields are private in this class…
int nr = 0;
if (reguli!=null)
{
nr=reguli.length;
}
for (int i=0;i<nr;i++)
{
if (reguli[i].getTitle().equalsIgnoreCase("workflow_simplu")) // if the rule is named "workflow_simplu" then it store-s it
{
reg_workflow=reguli[i];
}
}
if (reg_workflow!=null)
{
NamedValue[] nm=reg_workflow.getAction().getActions(0).getParameters();
for (int i=0;i<nm.length;i++)
{
if (nm[i].getName().equalsIgnoreCase("approve-folder")) // and then is reads the parameters "approve-folder" and "reject-folder" …. witch contains values with the id's for the approve folder and reject folder
approve_folder=nm[i].getValue().substring(24);
if (nm[i].getName().equalsIgnoreCase("reject-folder"))
reject_folder=nm[i].getValue().substring(24);
}
}
}catch(Exception ex){
ex.printStackTrace();
}
}
public void move_file(String unde, String nume, String id){ // unde = where…. nume = name
relogin();
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
try {
Store store= new Store(Constants.WORKSPACE_STORE,"SpacesStore");
ParentReference dossierDestinationParentRef = new ParentReference();
dossierDestinationParentRef.setStore(store);
String IDElemDestination = unde; // spatiul INDEXATE
dossierDestinationParentRef.setUuid(IDElemDestination);
dossierDestinationParentRef.setAssociationType(Constants.ASSOC_CONTAINS);
String nomElementADeplacer = nume; // numele fisierului
dossierDestinationParentRef.setChildName(nomElementADeplacer);
/** Create the ref of the element to move */
Reference sourceRef = new Reference();
sourceRef.setStore(store);
String iDElementADeplacer = id;
sourceRef.setUuid(iDElementADeplacer);
/** Move */
CMLMove deplacer = new CMLMove();
/** destination folder : */
deplacer.setTo(dossierDestinationParentRef);
/** element to move */
deplacer.setWhere(new Predicate(new Reference[]{sourceRef}, null, null));
/** Execute command */
CML cmlDeplacer = new CML();
cmlDeplacer.setMove(new CMLMove[]{deplacer});
UpdateResult[] results;
results = repositoryService.update(cmlDeplacer);
} catch (Exception ex) {
ex.printStackTrace();
}
}
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.