Hi,
us would fit xml /json if a separate xml/json file was created for each word document, not one xml file for all word documents. Would it be possible?
Thanks in advance
Alexey
Thanks for answer,
i have a problem with the class “AnnotationHandler”. The class has the method “addCollaborator(String userName, String fileGuid, Integer accessRights, int color)”. The metod are used in method “publicAnnotationView getAnnotation(…)” in class “AnnotationResource” in line:
final String userGuid = annotationHandler.addCollaborator(usrName, initialPath, AccessRights.from(AccessRights.All), Utils.colorToInt(Color.black));
the method “addCollaborator” is final, but i must it overload for insert in my user.xml.
also there is not a parameter documentId in parameter list in method “selectBy(List var1, Object… var2)” for IUser. So can I not find out the document and its user.xml
The current implementation out of the box will allow to store all annotations into single file. In addition, provided interfaces will allow you to override the default functionality and develop the one that fits your use-case perfectly.
Hello Alexey,
If you want to save user meta-data you need to implement the IUserDao interface and return it in the getUserDao() method of the AbstractDataConnector implementation. You don’t need to override any AnnotationHandler methods.
Alexey:
also there is not a parameter documentId in parameter list in method "selectBy(...
selectBy uses key-value approach. The first argument is a list of the keys, other arguments – are values for the provided keys. Depending on the context (in what IDao implementation the request occurs) different keys are passed in the first argument. You can check it by yourself in the debug mode. All possible keys you can find in the entity interfaces (in the com.groupdocs.annotation.data.tables.interfaces package).
when will appear the new version with this functionality?
best regards
Alexey
I did it.
In selectBy( …) for IUser there is only one parameter “guid”, the parameter “documentGuid” there is NOT! How can I find out wich document is it?
in line
final String userGuid = annotationHandler.addCollaborator(usrName, initialPath, AccessRights.from(AccessRights.All), Utils.colorToInt(Color.black));
i must find the correct user.xml. The file dont exist at time point, because is it first method call.
can we do skype conference?
Do I correctly understand that a document can have only one Session in one time point? It means that a document can annotate only one user at one moment?
It means for example a document cannot annotate two users at the same time?
The new version is planned to be released on October 31.
Hello Alexey,
We had a long conversation with developers about possible solutions in this case. Unfortunately, currently inside the IUserDao.selectBy request there is no way to find out from what document or collaborator was this request. Under these circumstances you can try to gather created users using the collaborator Guid obtained from the AnnotationHandler.addCollaborator method. To make things clear, the Collaborator entity represents the-User-opened-the-Document connection. With collaborator Guid you can use DaoFactory.createCollaboratorDao(); and further calls to obtain necessary Collaborator and User info, or even you can start this chain from the document guid.
But I think it will be better to find a way to store Collaborators and Users integrally in one place (at least Users, because Collaborators can be created again with no data loss, only performance loss). Probably, there may be id collisions. Please, see the entities picture:
http://screencast.com. We did not test such cases and can’t say for sure.
Actually there could be unlimited number of sessions per the
particular document. Session is binding the user with the document it opened.
As the environment is multithreaded (many users can open a single document in
their browsers and server can process multiple requests simultaneously) many
users can annotate documents at one time.
I mean others. When two users annotate the same document, they both see all annotations of other users. Is it possible that the annotations of one user are “private” and unvisible for all other users?
Hello, Alexey.
Thank you for this suggestion and code example. Our developers already got a note about it. We will inform you soon more details about this functionality implementation. Please, stay tuned.
Hello Alexey,
Unfortunately right now there is no functionality to store annotations separately or provide them privately out-of-the-box.
You can try to use the AnnotationHandler.listAnnotations(String fileGuid) and in the listAnnotationsHandler request return annotations filtered for each user. To do this – examine the AJAX request from the front-end in your browser developer tools. There you will see what data is sent to the server and what if the response format. Document guid (as fileId) and user guid (as userId) are both in that request. You can use these values to pick up only necessary annotations and form a response using them.
If you want some independent storage functionality or extended user access rights we can put it into our roadmap, but priorities of all requested features we develop depend on the license type that the customer bought.
hi,
we have the following scenario, In database there is a docx document . We create a folder in the file system and copy the document in this folder. Now you can annotiren the document. Once with annotation is completed, all xml’s with annotation’ info be stored in database, the folder is deleted. Now we have a problem with the fact that, in your xml’s (for example in AnnDocs.xml as documentGuid) is hard-coded the name of the folder. of course you have to consider the case that the annotated document could be annotated later again. We would have liked the option of defining the name of the folder itself
Hallo Ihor, Thaks for your answer,
your solution does not suit to me. I have follow idea: I am going to start for each annotation process a separatly groupdocs server. But I have a problem: it does not work. When I start a new instance on other port I see the Exception:
WARN [2014-11-25 08:43:17,833] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED SocketConnector@0.0.0.0:8081: java.net.BindException: Address already in use: JVM_Bind! java.net.BindException: Address already in use: JVM_Bind
i write in configuration for first server :
applicationPath: http://127.0.0.1:8080/
and a new line:
serverPort: 8080
and in MainApplication in "run" method:
applicationConfig.getHttpConfiguration().setPort(applicationConfig.getServerPort());
and for second server:
applicationPath: http://127.0.0.1:8090/
and a new line:
serverPort: 8090
Theoretical it must work because the ports are different. But i see in Exception the port 8081. Have you hardcoded the port nummer ?
How can I resolve the problem ?
Thanks im advance
Alexey
Hello Alexey.
The functionality of manual GUID/Name manipulation you request is dependent on the underling GroupDocs.Viewer library and has to be implemented there first.
Unfortunately, at the moment GroupDocs.Viewer developers are very busy. They are going to release a new version this week with a bunch of tweaks and have a lot of work to do. We will review the ability to manually manage IDs/names from the next week. We’ve already put your feature-request on our roadmap. We could already implement it but feature priorities in our roadmap queue depend on the demand and the customer’s license type who requests them.
At the moment we suggest you next.
alexeyschroeder:but i can't load replays because the method List loadData() doesn't have the information about the document,it means i dont know where is the document?
For now you can try to obtain the AnnDoc object. It contains the document id.
DaoFactory.createAnnDocDao().selectBy(asList(IAnnDoc.ANNOTATION), annotation.getId()).getDocumentId()
Also, I see you are storing the annotation metadata in the database. You can look how the GroupDocs.Annotation stores it. If you are interested, here are DB configuration settings: from
line 31 to
line 54.
What about the GroupDocs.Annotation progress. On your request we implemented very flexible meta-data storage API in the version that is going to be released on October 31. It provides several options to store annotations, replies, users, etc.:
- ONE – all data is stored in a single file
- FEW – all data is stored by categories in 7 files (annotations, users, replies, etc.)
- MANY – same as FEW, but annotations are stored per document within the document temporary (cache) folder, together with generated page images
- LOT – same as MANY, but annotations additionally are stored in separate files per user who created them (file name is equal to the user ID)
Furthermore, you have a complete ability to override this functionality and implement your own one.
Hello Alexey,
Ports configuration has nothing to do with the GroupDocs.Annotation for Java library.
In the Dropwizard sample you can configure server and admin ports using next configuration settings:
#Server configuration
#Set available ports for application to use
http:
port: 8090
adminPort: 8091
It should resolve the “address already in use” error.
Hi,
I don’t understand the code:
DaoFactory.createAnnDocDao().selectBy(asList(IAnnDoc.ANNOTATION), annotation.getId()).getDocumentId()
I don’t have the link to object “annotation”. I have nothing in this moment(when i am in method " loadData()"). Or I missed something?