English 中文(简体)
Alfresco:手工改变不动产价值
原标题:Alfresco: manually change the value of a node property
  • 时间:2011-11-24 08:38:07
  •  标签:
  • alfresco

我对alfresco来说是新鲜的,尽管进行了一些研究,但我并没有找到如何做这一基本事情:改变遗产的价值。

可以通过接口或通过网络文字进行。 为了测试目的(如果Y号财产价值为Z,我会展示X电文),以便测试我需要能够迅速手工修改财产价值。

你通常如何这样做?

感谢很多帮助!

EDIT :我参加了Sskuro所建议的开放式管理信息系统的工作。 然而,当我修改财产时,我有以下例外:

Exception thrown

org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Internal Server Error

    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:450)

    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:552)

    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getObjectInternal(AbstractAtomPubService.java:776)

at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.getObject(ObjectServiceImpl.java:471)

at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:393)

at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:371)

at org.apache.chemistry.opencmis.client.api.Session$getObject.call(Unknown Source)

at ConsoleScript0.run(ConsoleScript0:7)

Any idea what causes it?

EDIT 2: 服务器记录(显然,没有正确发送任何数据)

14:07:47,391  ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: NodeRef may not be null for calls to NodeService.  Check client code.
java.lang.IllegalArgumentException: NodeRef may not be null for calls to NodeService.  Check client code.
        at org.alfresco.repo.node.MLPropertyInterceptor.getPivotNodeRef(MLPropertyInterceptor.java:319)
        at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:161)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:198)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:198)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy7.getProperty(Unknown Source)
        at fr.jouve.alfresco.selex.service.cmr.impl.SelexServiceImpl.generatePlacard(SelexServiceImpl.java:514)
        at fr.jouve.alfresco.selex.repo.action.executer.selex.SelexArticleCreateUpdate.executeImpl(SelexArticleCreateUpdate.java:24)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:196)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:780)
        at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionExecuter.java:66)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:196)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:780)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:700)
        at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:538)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:146)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy34.executeAction(Unknown Source)
        at org.alfresco.repo.rule.RuleServiceImpl.executeRule(RuleServiceImpl.java:1208)
        at org.alfresco.repo.rule.RuleServiceImpl.executePendingRule(RuleServiceImpl.java:1176)
        at org.alfresco.repo.rule.RuleServiceImpl.executePendingRulesImpl(RuleServiceImpl.java:1127)
        at org.alfresco.repo.rule.RuleServiceImpl.executePendingRules(RuleServiceImpl.java:1100)
        at org.alfresco.repo.rule.RuleTransactionListener.beforeCommit(RuleTransactionListener.java:57)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:747)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:727)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:687)
        at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:927)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:737)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:394)
        at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:472)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:403)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)
        at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:351)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:188)
        at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
最佳回答

完成任务有若干办法。 我在这里向各位展示了我这样做的方式,这应当提供一定程度的灵活性。

<>strong>Javascript +

The following Javascript file in /Company Home/Data Dictionary/codes/testupdate.js:

document.properties["my:property"] = "qwerty";
document.save();

援引以下ur,要求书状指挥程序员:

http:// localhost:80/alfresco/command/script/execute?scriptPath=/Company%20Home/Data%20Dictionary/casts/testupdate.js&contextPath=/Company%20Home/path/to/file.txt> rel=“nofollow”http:// localhost:80/alfresco/command/script/execute?Path=/Company%20Home/Data%20Dicto/tests/stjpt/atht。

保证你们改变URL,并相应地改变环境路标。

<CMIS 页: 1

页: 1 OpenCMIS workbench,link to alfresco (e.g. )。 然后在Mendu上点击。 Console -> - Basic Template - items to open a groovy console. 在以下文字中点击“Execute Groovy” 字塔:

import org.apache.chemistry.opencmis.commons.*
import org.apache.chemistry.opencmis.commons.data.*
import org.apache.chemistry.opencmis.commons.enums.*
import org.apache.chemistry.opencmis.client.api.*

// def cmis = new scripts.CMIS(session)
// println session.repositoryInfo.name
// cmis.printObjectSummary "/"
def node = session.getObject("workspace://SpacesStore/38dee96f-e028-4bed-821f-0ed25cc2ba07");
def newProps = ["cmis:name" : "qwerty"]
def oldVal = node.getProperty("cmis:name").getValue();
node.updateProperties(newProps);
def newVal = node.getProperty("cmis:name").getValue();

println oldVal + " -> " + newVal;
问题回答

为了能够在Alfresco探测器上做到这一点,你需要添加包含这些特性的内容。 之后,你还在Alfresco股份上找到了财产文本箱。





相关问题
Help to choose Alfresco or Nuxeo for DMS

I have requirement to develop DMS(Document Managemen System) with some initial requirements: If possible DMS should be open source Initially DMS should support up to 500 users System should be ...

Integrating Alfresco Flexspaces with JBOSS portal

We re working on a development of a JBoss portal. As part of the functionality, we need to integrate it with Alfresco, using a portlet. Both (portal and Alfresco) will connect to the same LDAP ...

How to get Group node in Alfresco 3.1 s Java-Backed Webscript

With Javascript Webscript, I can get a group node with the following code: var group = People.getGroup(groupname); What would be the Java-backed equivalent of this code? So far I can only get a set ...

Which is easier to extend, Alfresco or Nuxeo? [closed]

I am considering doing a rewrite of an open source project from LAMP to J2EE and integrating it with an enterprise oriented CMS as the GUI. The two most viable OSS ECM J2EE CMS platforms that I have ...

Alfresco 3 Labs: Adding a thumbnail to a document

Hey guys! Any Alfresco experts out there? I have created a document type in Alfresco and am trying to associate it with an image -- Somehow. I don t really mind how it s done - an image uploader in ...