cancel
Showing results for 
Search instead for 
Did you mean: 

Unique logical name for space

ruediger_e
Champ in-the-making
Champ in-the-making
Hi,

When instantiating template spaces we wanted to have something like a unique logical name. The idea is that
we could refer to a space template by this name.

Why do we want to have somthing like that:

- we need something to access the space template by a JSF managed bean (dialog or wizard)

- we don't want to use a folder (space) path, because we can't refactor folder structures any more

- we also don't want to use generated unique properties like node-uuid or node-dbid because they are different
  between separate Alfresco instances -> so we would have to write code instance specific (not possible when
  using development, test and production environments)

So my idea was to have a property with a kind of logical name of the space template. But this property needs to
have a unique value. I developed for Vignette Collaboration which had some similar concepts to Alfresco and I
remember that they had such logical name to refer to alle kind of types, templates etc.

We could add a logical name property to all content types and write a behaviour which checks the uniqueness of
the value. But this seems to be a bad workaround which could have negative performance implications and which
wouldn't be transacion save.

How are you refering to space templates when instantiating them?

Thanks a lot!

Rüdiger Engelberger
3 REPLIES 3

zaizi
Champ in-the-making
Champ in-the-making
We always use a bean configurable path value.

You can of course bootstrap in a template with a unique ID. Check out how they bootstrap categories in the records management module. Bundle it all up in an AMP module and it works fine.

ruediger_e
Champ in-the-making
Champ in-the-making
Hi,

Thanks for your answer … could you please explain what you mean with "bean configurable path value"?

Rüdiger

zaizi
Champ in-the-making
Champ in-the-making
In your bean definition, pass in the path to the template. This can be re-configured as required.

In the following bean definition the "path" to the home space is set in the xml.


    <bean name="guestHomeFolderProvider" class="org.alfresco.repo.security.person.ExistingPathBasedHomeFolderProvider">
        <property name="serviceRegistry">
           <ref bean="ServiceRegistry" />
   </property>
        <property name="path">
           <value>/${spaces.company_home.childname}/${spaces.guest_home.childname}</value>
        </property>
        <property name="storeUrl">
           <value>${spaces.store}</value>
        </property>
        <property name="homeFolderManager">
      <ref bean="homeFolderManager" />
   </property>
        <property name="userPemissions">
           <set>
              <value>Consumer</value>
           </set>
        </property>
    </bean>