Quantcast
Channel: Alfresco Forums - Alfresco API
Viewing all 252 articles
Browse latest View live

Open Alfresco dashboard from .net code

$
0
0

I am new to alfresco i require to by pass the alfresco login page when user clicks button from my website and pass that user login credentials. i tried below code after reading from alfresco forum but all time i am getting a parsing exception any one can help me with this.
I just need that when a user clicks on button on a new tab alfresco dashboard of that user gets open and login page is bypassed.

Dictionary parameters = new Dictionary();

// define binding type, in our example we are using ATOMPUB as stated above
parameters[DotCMIS.SessionParameter.BindingType] = BindingType.AtomPub;
// define CMIS available path which is already available under alfresco
parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://127.0.0.1:8080/share/";
//parameters[DotCMIS.SessionParameter.AtomPubUrl] = "https://localhost:8080/alfresco/service/cmis";
// alfresco portal admin user name
parameters[DotCMIS.SessionParameter.User] = "admin";
// alfresco portal admin password
parameters[DotCMIS.SessionParameter.Password] = "ayush@123";
string url = string.Format("http://127.0.0.1:8080/share/?User={0}&Password={1}", "admin", "ayush@123");

string s = "window.open('" + url + "', 'popup_window', 'width=300,height=100,left=100,top=100,resizable=yes');";
ClientScript.RegisterStartupScript(this.GetType(), "script", s, true);

4.0.c

Groups API

$
0
0

Hi,

Just seeing some funny behaviour when calling the groups API. I'm just calling the webscript /api/groups but I'm seeing varying behaviour with the results being returned when limiting the number of results to show.

I've set up about 25 local groups for test purposes called G1, G2, G3... etc and if I call the api sorting by displayName, without limiting the number of results, it all works as expected, so calling

http://localhost:8080/alfresco/service/api/groups?sortBy=displayName

and I get back the standard Alfresco groups (ALFRESCO_ADMINISTRATORS, ALFRESCO_MODEL_ADMINISTRATORS, ....) followed by my test groups (G1, G10, G11...) in lexigraphical order, so all as expected.

However, if I add in a maxItems parameter, things stop behaving themselves. If I run

http://localhost:8080/alfresco/service/api/groups?sortBy=displayName&maxItems=1

I would expect to get ALFRESCO_ADMINISTRATORS back, but it appears that the API is limiting the results before applying the sort and what I get is the group G1. If I increase the number of items that can be returned, the behaviour continues the same way until I get beyond the number of groups that I've created e.g.

http://localhost:8080/alfresco/service/api/groups?sortBy=displayName&maxItems=26

Then the results I get look like (ALFRESCO_ADMINISTRATORS, G1, G10, G11, G12, G13...).

Can anyone comment if this is expected behaviour? And if it is then what it is the point of the sort feature of the API at all?

Thanks

Steven

5.1.x

Looking for sample JSON request to upload documents.

$
0
0

Hi,

I am looking for a sample json request to upload the documents into alfresco.

Could someone help me creating a JSON request to upload documents using SOAP UI or any REST Client.

I could upload the documents using html form. Request:<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/><title>File Upload</title></head><body><form method="POST" name="uploadForm" enctype='multipart/form-data' id="upload_form" action="https://alfresco-stage:8443/alfresco/service/api/upload"><input type="hidden" name="destination" id="destination" value="workspace://SpacesStore/cea187e1-b73d-43c7-a2d6-1ec7b1c37715"/><label>
            Name:</label><br/><input type="text" name="filename" id="filename"/><p/><label>
            Description:</label><br/><textarea name="description" id="description"></textarea><p/><label>
            File:</label><br/><input class="button" type="file" name="filedata" id="filedata"/><p/><input class="button" type="submit" name="submit" value="Upload"/></form></body></html>  
Response:{"nodeRef":"workspace://SpacesStore/f24e5dc3-f8c6-427b-8cee-bec0236543a2","fileName":"SrinivasDocument","status":{"code":200,"name":"OK","description":"File uploaded successfully"}}

How to getProperties of a Document with OpenCmis

$
0
0

Hi

I have some problem to get all the properties of a Document with OpenCmis and Atom Binding

This is our environment

Alfresco Version: Community - 5.1.0

Pom:

org.apache.chemistry.opencmis
chemistry-opencmis-client-api
0.13.0

org.apache.chemistry.opencmis
chemistry-opencmis-client-impl
0.13.0

And this is the code:

Map properties = new HashMap();
properties.put(SessionParameter.USER, user);
properties.put(SessionParameter.PASSWORD, password);
properties.put(SessionParameter.ATOMPUB_URL, "http://{host}:{port}/alfresco/api/-default-/public/cmis/versions/1.1/atom");
properties.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
SessionFactory factory = SessionFactoryImpl.newInstance();
session = factory.getRepositories(properties).get(0).createSession();

String="ObjectId";
ObjectId id = session.createObjectId(idObject);
CmisObject object = session.getObject(id);
Document document = (Document) object;
List> properties = document.getProperties();

If I run the code I obtain this error:
java.lang.ClassCastException: org.apache.chemistry.opencmis.client.runtime.FolderImpl cannot be cast to org.apache.chemistry.opencmis.client.api.Document

After some Google search I have try to add this parameter to the SessionFactory and add alfresco-opencmis-extension dependency to pom:
properties.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");

org.alfresco.cmis.client
alfresco-opencmis-extension
0.3

The exception is changed and It becomes:
java.lang.NoClassDefFoundError: org/apache/chemistry/opencmis/client/api/TransientCmisObject

Do you have any idea Where is the problem?

Is there an how to that explains how to retrieve the Document properties?

Thank in advance

5.1.x

--- Article Removed ---

$
0
0
***
***
*** RSSing Note: Article removed by member request. ***
***

--- Article Removed ---

$
0
0
***
***
*** RSSing Note: Article removed by member request. ***
***

--- Article Removed ---

$
0
0
***
***
*** RSSing Note: Article removed by member request. ***
***

Bulk extraction

$
0
0

How can we configure bulk extraction from document repository? Is there any menu option or API available for that?


Delete Object in Alfresco 5.1

$
0
0

Hi All,

I need to delete a node object as well as a forum post in Alfresco 5.1 but I don't see more the repo webscript

In Alfresco 4.0.e I had the possibility to invoke the REST API:

DELETE /alfresco/service/api/node/{store_type}/{store_id}/{id} (see screenshot)

I try to create a new repo webscript using cmisServer root object but receive an error "cmisServer is not defined"

Is there an alternative way to do the same thing in Alfresco 5.1?

Regards
Vincenzo

--- Article Removed ---

$
0
0
***
***
*** RSSing Note: Article removed by member request. ***
***

--- Article Removed ---

$
0
0
***
***
*** RSSing Note: Article removed by member request. ***
***

API to embed Edit Online in external web page?

$
0
0

Hi Everyone

Is there an API to embed the edit online feature (like in share) in an external web page?

You know so that users can just click a link then a dialog pops up or a new tab that enables them to edit the file in the browser and update it?

Possible files are ms word docs and ms excel sheets.

We are using alfresco 4.2 btw.

Getting an error while deleting a version of a document

$
0
0

Environment details:
Alfresco 5.0.d Community (free) Edition - No configuration changes done after installation
API: OpenCMIS - CMIS 1.1
URL used to connect: http://dev-alfresco:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom
Libraries:

<dependency>
<groupId>org.apache.chemistry.opencmis</groupId>
<artifactId>chemistry-opencmis-client-api</artifactId>
<version>0.13.0</version>
</dependency>
<dependency>
<groupId>org.apache.chemistry.opencmis</groupId>
<artifactId>chemistry-opencmis-client-impl</artifactId>
<version>0.13.0</version>
</dependency>

The Error Message is
Unexpected: current version does not appear to be 1st version in the list

Stack trace

org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Unexpected: current version does not appear to be 1st version in the list
[workspace://version2Store/dfcb5494-1267-4131-b015-279644ad3938, versionStore://version2Store/61e2a602-0ecf-49c6-8241-cb4c42efb854]
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:506)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.delete(AbstractAtomPubService.java:701)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.deleteObject(ObjectServiceImpl.java:461)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.delete(SessionImpl.java:1353)
at org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject.delete(AbstractCmisObject.java:331)

Code:

try{
Document cmisDocument =(Document) cmisSession.getObject(document.getObjectId());
if(cmisDocument !=null){
versionLabel = cmisDocument.getVersionLabel();
boolean deleted =false;
List<Document> versions = cmisDocument.getAllVersions();
for(int j=0; j<versions.size()&&!deleted; j++){
Document version = versions.get(j);
if(versionLabel.equals(version.getVersionLabel())){
version.delete(false);
deleted =true;
}
}
}
}
catch(Exception exc){
message ="Error while deleting the document - "+ exc.getMessage();
exc.printStackTrace();
}

Earlier I tried just like cmisDocument.delete(false), that did not work, even though the objectId of the object matches the objectId of the version I was trying to delete.
Then I thought may be we have to explicitly hold on to the version document. That is why I came up with this code. Still getting the same error.

Another note:
In the repository, I have three versions of the same document. Error happened when I am trying to delete the oldest, that is the first one.
For some reason, deleting from the latest to oldest, seems not getting this error.
Is there any restriction on deleting the versions of a document?

5.0.d

Retrieve documents from current folder

$
0
0

The following rest call retrieves the documents in foldername and the documents in the nested sub folders, I want to restrict the output to the documtns inside {folderName} folder , any ideas ??
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/root/{folderName}

--- Article Removed ---

$
0
0
***
***
*** RSSing Note: Article removed by member request. ***
***

How to get alfresco objest via CMIS

$
0
0

Hello all,
I have investigated CMIS/alfresco to write out a client app. I have investigated CMIS workbench, dotCmis and many threads/articles.
After several weeks i get stuck with many confusing. Here are some examples(on Alfresco 5.1 community & one):
- I can create several types via admin page site, when i upload a file then i change it types and i can select the created types (plus a system type called: Smart Folder Template). But if i used CMIS workbench and invoke Types button then it shows out many types that greater than admin page site. I code out a snip codes and the code also shows out many types, my code is: foreach (IObjectType oType in Session.GetTypeChildren("cmis:document", true)). My question is how can i get only types same to admin page site?
- I can not get out Category Root, Tags, aspects... several of them can work but its result puts out more than on admin page site.
- Generally, how to get all alfresco objects(types, aspect, category, tags)?

Please help me.
Thanks
Regards

Alfresco API to get custom metadata

$
0
0

We are moving to Alfresco Content Management system and there is no direct documentation for retrieving custom metadata.

Is there a way to get custom metadata/ custom properties that I have added to Record category in Alfresco Records Management File plan? Custom metadata is basically the data fields that are in scanned document like name, dob, form id, etc.

Eg: I have created RM site and added the following file plan.

 TestCategory|--TestFolder1|--Record1--Record2|--TestFolder2|--Record1--Record2

These records contains uploaded form(scanned document) along with metadata (custom).

To Retrieve metadata, am using

http://127.0.0.1:8090/alfresco/service/api/metadata/node/workspace/SpacesStore/ed6e2cc6-6dc5-4bfb-bf9d-b450f68863dd?alf_ticket=TICKET_06265902898618fe5a46e67992e07a9d4b72701a
It is returning 405-Method not allowed (GET not supported).

To Retrieve all the subfolders/documents in Folders, m using

http://127.0.0.1:8090/alfresco/service/slingshot/doclib/doclist/documents/site/rm/documentLibrary/TestCat1/TestFolder2
Above one returns

{"totalRecords":1,"startIndex":0,"metadata":{"repositoryId":"3b9d4f67-dc84-4531-b8b2-4dbcef15e25a","container":"workspace://SpacesStore/7d1349bb-5289-4709-9055-c75c03ab5481","parent":{"nodeRef":"workspace://SpacesStore/5d40660e-64d9-4bc4-a75e-ae4ae8b2201a","permissions":{"userAccess":{"create":true,"edit":true,"delete":true,"cancel-checkout":false,"permissions":true}}},"onlineEditing":true,"itemCounts":{"folders":0,"documents":1}},"items":[{"nodeRef":"workspace://SpacesStore/65b9b52b-3418-4a85-98b0-d4770cf9399d","nodeType":"cm:content","type":"document","mimetype":"application/pdf","isFolder":false,"isLink":false,"fileName":"BO (2016-1464237424392).pdf","displayName":"BO (2016-1464237424392).pdf","status":"","title":"þÿ","description":"test description","author":"","createdOn":"2016-05-26T00:37:04.350-04:00","createdBy":"Administrator","createdByUser":"admin","modifiedOn":"2016-05-31T15:50:21.269-04:00","modifiedBy":"Administrator","modifiedByUser":"admin","lastThumbnailModification":"doclib:1464237426243","lockedBy":"","lockedByUser":"","size":"156702","version":"1.0","contentUrl":"api/node/content/workspace/SpacesStore/65b9b52b-3418-4a85-98b0-d4770cf9399d/BO%20(2016-1464237424392).pdf","webdavUrl":"/webdav/Sites/rm/documentLibrary/TestCat1/TestFolder2/BO%20(2016-1464237424392).pdf","actionSet":"document","tags":[],"activeWorkflows":"","isFavourite":false,"likes":{"isLiked":false,"totalLikes":0},"location":{"repositoryId":"3b9d4f67-dc84-4531-b8b2-4dbcef15e25a","site":"rm","siteTitle":"Records Management","container":"documentLibrary","path":"/TestCat1/TestFolder2","file":"BO (2016-1464237424392).pdf","parent":{"nodeRef":"workspace://SpacesStore/5d40660e-64d9-4bc4-a75e-ae4ae8b2201a"}},"permissions":{"inherited":true,"roles":["ALLOWED;ROLE_EXTENDED_READER;ReadRecords;INHERITED","ALLOWED;GROUP_Administrator7d1349bb-5289-4709-9055-c75c03ab5481;Filing;INHERITED","ALLOWED;ROLE_EXTENDED_WRITER;Filing;INHERITED"],"userAccess":{"create":true,"edit":true,"delete":true,"cancel-checkout":false,"permissions":true}},"custom":{},"actionLabels":{}}]}

Using PostMan chrome app to test rest api. TIA.

5.0.d

Thanks,
RamyaPratyusha

AUTO SELL : DUMPS-STORE.COM - SELL DUMPS , SELL FULLZ , SELL CVV

$
0
0

hi customers

I think you need list price of me :

My price about CC :
FULLZ USA : 40$
FULLZ UK : 80$

CC list i have and price i have :

== PRICE LIST (U.S):

- Visa Card-----8$
- Master Card -------8$
- American Express-------8$
- Discover Card-------------------8$
- DOB----------------------------------------15$
- Visa Card With VBV---------------------------15$
- CC BIN---------------------------------------------------12$
- Fullz---------------------------------------------------------------25$
== PRICE LIST (UK):
- Visa Card----------15$
- Master Card------------15$
- American Express---------25$
- Maestro Card---------------------30$
- DOB----------------------------------------25$
- Visa Card With VBV------------------------25$
- CC BIN------------------------------------------------20$
- Fullz-----------------------------------------------------------40$
== PRICE LIST (CA):
- Visa Card--------15$
- Master Card -----------15$
- American Express-----------20$
- DOB----------------------------25$
- Visa Card With VBV-------------------------25$
- CC BIN---------------------------------------------------25$
- Fullz-------------------------------------------------------------30$
==PRICE LIST (AU):
- Visa Card----------15$
- Master Card-------------15$
- American Express--------------22$
- DOB--------------------------------22$
- Visa Card With VBV---------------------------25$
- CC BIN----------------------------------------------25$
- Fullz---------------------------------------------------------30$

(Eu, Mx, Nz, Fr, Ger, Itali, Spain, Sweden, Denmark, ASIA...)

- Visa Card-------------25$
- Master Card ----------------25$
- American Express-----------------30$
- Discover Card---------------------------30$
- DOB------------------------------------------35$
- Visa Card With VBV-----------------------------------35$
- CC BIN---------------------------------------------------------25$
- Fullz-------------------------------------------------------------------40$

- Price for dumps and track 1 & 2
- Tracks 1&2 US = 80$ per 1
- Tracks 1&2 UK = 100$ per 1
- Tracks 1&2 CA AU = 120$ per 1
- Tracks 1&2 EU = 120$ per 1

- I Will check with high balance

- sample track 1&2 with pin

- Track1=5232556061018719WYATT/ROBERTSON1007101171410000271 000000
- Track2=5232556061018719=10071011000042400000
- pin: 5678,5432,5187,5505,and much pin other

=== My ID G-mail any1dumps
=== My Yhoo : any1dumps
=== My ID ICQ : 694997844
=== My Skype : any1dumps

Please contact me soon !

Your satisfaction is my happiness !

Respectfully thank you !

Looking for sample JSON request to upload documents.

$
0
0

Hi,

I am looking for a sample json request to upload the documents into alfresco.

Could someone help me creating a JSON request to upload documents using SOAP UI or any REST Client.

I could upload the documents using html form. Request:<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/><title>File Upload</title></head><body><form method="POST" name="uploadForm" enctype='multipart/form-data' id="upload_form" action="https://alfresco-stage:8443/alfresco/service/api/upload"><input type="hidden" name="destination" id="destination" value="workspace://SpacesStore/cea187e1-b73d-43c7-a2d6-1ec7b1c37715"/><label>
            Name:</label><br/><input type="text" name="filename" id="filename"/><p/><label>
            Description:</label><br/><textarea name="description" id="description"></textarea><p/><label>
            File:</label><br/><input class="button" type="file" name="filedata" id="filedata"/><p/><input class="button" type="submit" name="submit" value="Upload"/></form></body></html>  
Response:{"nodeRef":"workspace://SpacesStore/f24e5dc3-f8c6-427b-8cee-bec0236543a2","fileName":"SrinivasDocument","status":{"code":200,"name":"OK","description":"File uploaded successfully"}}

How to getProperties of a Document with OpenCmis

$
0
0

Hi

I have some problem to get all the properties of a Document with OpenCmis and Atom Binding

This is our environment

Alfresco Version: Community - 5.1.0

Pom:

org.apache.chemistry.opencmis
chemistry-opencmis-client-api
0.13.0

org.apache.chemistry.opencmis
chemistry-opencmis-client-impl
0.13.0

And this is the code:

Map properties = new HashMap();
properties.put(SessionParameter.USER, user);
properties.put(SessionParameter.PASSWORD, password);
properties.put(SessionParameter.ATOMPUB_URL, "http://{host}:{port}/alfresco/api/-default-/public/cmis/versions/1.1/atom");
properties.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
SessionFactory factory = SessionFactoryImpl.newInstance();
session = factory.getRepositories(properties).get(0).createSession();

String="ObjectId";
ObjectId id = session.createObjectId(idObject);
CmisObject object = session.getObject(id);
Document document = (Document) object;
List> properties = document.getProperties();

If I run the code I obtain this error:
java.lang.ClassCastException: org.apache.chemistry.opencmis.client.runtime.FolderImpl cannot be cast to org.apache.chemistry.opencmis.client.api.Document

After some Google search I have try to add this parameter to the SessionFactory and add alfresco-opencmis-extension dependency to pom:
properties.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");

org.alfresco.cmis.client
alfresco-opencmis-extension
0.3

The exception is changed and It becomes:
java.lang.NoClassDefFoundError: org/apache/chemistry/opencmis/client/api/TransientCmisObject

Do you have any idea Where is the problem?

Is there an how to that explains how to retrieve the Document properties?

Thank in advance

5.1.x
Viewing all 252 articles
Browse latest View live