Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.webapp.action
Class TypesTool

java.lang.Object
  extended by org.nuxeo.ecm.webapp.action.TypesTool
All Implemented Interfaces:
java.io.Serializable

@Name(value="typesTool")
@Scope(value=CONVERSATION)
@Install(precedence=10)
public class TypesTool
extends java.lang.Object
implements java.io.Serializable

Document type service for document type creation.

Author:
eionica@nuxeo.com, Anahide Tchertchian
See Also:
Serialized Form

Constructor Summary
TypesTool()
           
 
Method Summary
 java.util.List<java.lang.String> getAllowedSubTypesFor(java.lang.String docType)
          Retrieves the list of allowed sub types given a current type.
 java.util.Map<java.lang.String,java.util.List<java.util.List<Type>>> getOrganizedTypeMapForDocumentType(java.lang.String type)
           
 Type getSelectedType()
           
 Type getType(java.lang.String typeName)
           
 java.util.Map<java.lang.String,java.util.List<java.util.List<Type>>> getTypesList()
           
 boolean hasType(java.lang.String typeName)
           
 void populateTypesList()
          Retrieves the list of allowed sub types given a current type.
 void resetTypesList()
           
 void setSelectedType(Type type)
          If the selected type is supposed to be automatically injected by Seam through @DataModelSelection callback (i.e. the user will select the type from a list), this method should be called with null parameter before.
 void setTypesList(java.util.Map<java.lang.String,java.util.List<java.util.List<Type>>> typesList)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypesTool

public TypesTool()
Method Detail

resetTypesList

@Observer(value={"contentRootSelectionChanged","documentSelectionChanged","domainSelectionChanged"},
          create=false)
@BypassInterceptors
public void resetTypesList()

populateTypesList

public void populateTypesList()
Retrieves the list of allowed sub types given a current type.

This is used at creation time. Current type is retrieved thanks to the document model hold and passed by the event.


getOrganizedTypeMapForDocumentType

public java.util.Map<java.lang.String,java.util.List<java.util.List<Type>>> getOrganizedTypeMapForDocumentType(java.lang.String type)

getAllowedSubTypesFor

public java.util.List<java.lang.String> getAllowedSubTypesFor(java.lang.String docType)
Retrieves the list of allowed sub types given a current type.


getSelectedType

public Type getSelectedType()

setSelectedType

public void setSelectedType(Type type)
If the selected type is supposed to be automatically injected by Seam through @DataModelSelection callback (i.e. the user will select the type from a list), this method should be called with null parameter before.

Parameters:
type -

getTypesList

@Factory(value="typesMap",
         scope=EVENT)
public java.util.Map<java.lang.String,java.util.List<java.util.List<Type>>> getTypesList()

setTypesList

public void setTypesList(java.util.Map<java.lang.String,java.util.List<java.util.List<Type>>> typesList)

getType

public Type getType(java.lang.String typeName)

hasType

public boolean hasType(java.lang.String typeName)

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.