cancel
Showing results for 
Search instead for 
Did you mean: 

Node property without document.

nikes
Champ on-the-rise
Champ on-the-rise
Hi folks,

Can any one guide me how to implement propertysheet feature (Properties without document) in Alfresco?

Thanks,
Nikesh
8 REPLIES 8

pjcaracuel
Champ in-the-making
Champ in-the-making
Hi,

I think thas isn't not posible in Alfresco currently.
   
On the other hand, say that would be a "useful" feature

Regards

nikes
Champ on-the-rise
Champ on-the-rise
Well, as per my knowledge there are three root types PERSON, FOLDER and CONTENT.

Is it possible to create our own root type other than above three types?

If it is possible then, is it possible to refer  new root type in my propertysheet?

Our requirement is as follows:

We want to maintain our employee information in a alfresco….like…
1. Employee id, first name, last name, address etc…..
2. Edit employee info of selected employee.
3. Search employee info based on his ID
4. Delete selected employee info
5. Maintain audit trail of changes to any property of any employee.

If any one has done this type of implementation earlier or any boby has any inputs then please guide.

Thanks,
Nikesh

mrogers
Star Contributor
Star Contributor
Jeff Pott's Alfresco Developer Guide, Chapter 3, Working With Content Models, will help you.

Auditing is built into Alfresco already,  however by default its turned off.    http://wiki.alfresco.com/wiki/Audit_Configuration

nikes
Champ on-the-rise
Champ on-the-rise
I read the chapters from  Jeff Pott's Alfresco Developer Guide.

Well, book talks about custom types, aspects, asoosciations etc…. with respect to document.

My requirement is to have properties without document as I wrote in my earlier post.

Can anyone tell what is Node in alfresco? If I define my custom set of property as TYPE can I say it is a Node?
(As per my knowledge any document, folder, user are treated as node, but not sure about TYPES, ASPECTS and ASSOCIATIONS)

If so, then I can write Java class which accesses that TYPE using Node API, which returns available property in that TYPE and values associated with that TYPE which is having auditable information.

I hope Alfresco guys understands my requirement now?

Thanks,
Nikesh

mrogers
Star Contributor
Star Contributor
A Node is one of the fundamental units in Alfresco, the other being an association.

Take a look at the type definitions in contentModel.xml

You can have Nodes of type "sys:base" and "cmSmiley Surprisedbject" which do not have content.

"cm:content" is where a content property comes in, so as long as your employee type is a "cmSmiley Surprisedbject" and not a "cm:content" then there's no content.

For a real example, "cmSmiley Tongueerson" has no content property,  you could use this as a model for your employee type.

nikes
Champ on-the-rise
Champ on-the-rise
Thanks mrogers,

This is what I have done….
1. Created custom type emplyee custom:employee which extends cm:cmobject.
2.Created a link on Alfreco Explorer which open a JSF page containing employee related fields emp name, emp code, addrss etcc….
3. When user submits this form, we hae wrtten a java program which creates a node of type custom:employee.
4. I used Node Browser to search nodes of employee type.


Where I have stucked…….
When I configure above custom type in Advanced search I dont get the search result.

Is there any XML configuration that we can do to display Nodes of custom type?

As per my knowledge, Advanced search displays folders and content. How can I display Nodes having only property but no document?

Thanks,
Nikesh

jayjayecl
Confirmed Champ
Confirmed Champ
I gues you will have to customize BrowseBean,method getContent :


public List<Node> getContent()
   {
      // see comment in getNodes() above for reasoning here
      if (this.contentNodes == null)
      {
         if (this.navigator.getSearchContext() == null)
         {
            queryBrowseNodes(this.navigator.getCurrentNodeId());
         }
         else
         {
            searchBrowseNodes(this.navigator.getSearchContext());
         }
      }
      List<Node> result = this.contentNodes;

      // we clear the member variable during invalidateComponents()

      return result;
   }

If you want your type to be displayed on navigation AND search, you will have to customize both "queryBrowseNodes" and "searchBrowseNodes" methods.
If you just want it to be displayed when searching, just customize "searchBrowseNodes" method

srinivaslekkala
Champ in-the-making
Champ in-the-making
Dear Nike,

I am new to Alfresco. I am unable to get how to code the java file for actions.
Can you post the source code for below step.
3. When user submits this form, we hae wrtten a java program which creates a node of type custom:employee.
I am very thankful if you help me to write the source code.

Thanks
Srinivas.