Search in sources :

Example 1 with ListDataModel

use of javax.faces.model.ListDataModel in project acs-community-packaging by Alfresco.

the class AdminNodeBrowseBean method getStores.

/**
 * Gets the list of repository stores
 *
 * @return stores
 */
public DataModel getStores() {
    if (stores == null) {
        List<StoreRef> storeRefs = getNodeService().getStores();
        stores = new ListDataModel(storeRefs);
    }
    return stores;
}
Also used : StoreRef(org.alfresco.service.cmr.repository.StoreRef) ListDataModel(javax.faces.model.ListDataModel)

Example 2 with ListDataModel

use of javax.faces.model.ListDataModel in project acs-community-packaging by Alfresco.

the class AdminNodeBrowseBean method getSourceAssocs.

/**
 * Gets the current source associations
 *
 * @return associations
 */
public DataModel getSourceAssocs() {
    if (sourceAssocs == null) {
        try {
            List<AssociationRef> assocRefs = getNodeService().getSourceAssocs(getNodeRef(), RegexQNamePattern.MATCH_ALL);
            sourceAssocs = new ListDataModel(assocRefs);
        } catch (UnsupportedOperationException err) {
        // some stores do not support associations
        }
    }
    return sourceAssocs;
}
Also used : AssociationRef(org.alfresco.service.cmr.repository.AssociationRef) ChildAssociationRef(org.alfresco.service.cmr.repository.ChildAssociationRef) ListDataModel(javax.faces.model.ListDataModel)

Example 3 with ListDataModel

use of javax.faces.model.ListDataModel in project acs-community-packaging by Alfresco.

the class AdminNodeBrowseBean method getChildren.

/**
 * Gets the current node children
 *
 * @return node children
 */
public DataModel getChildren() {
    if (children == null) {
        List<ChildAssociationRef> assocRefs = getNodeService().getChildAssocs(getNodeRef());
        children = new ListDataModel(assocRefs);
    }
    return children;
}
Also used : ChildAssociationRef(org.alfresco.service.cmr.repository.ChildAssociationRef) ListDataModel(javax.faces.model.ListDataModel)

Example 4 with ListDataModel

use of javax.faces.model.ListDataModel in project acs-community-packaging by Alfresco.

the class AdminNodeBrowseBean method getAssocs.

/**
 * Gets the current node associations
 *
 * @return associations
 */
public DataModel getAssocs() {
    if (assocs == null) {
        try {
            List<AssociationRef> assocRefs = getNodeService().getTargetAssocs(getNodeRef(), RegexQNamePattern.MATCH_ALL);
            assocs = new ListDataModel(assocRefs);
        } catch (UnsupportedOperationException err) {
        // some stores do not support associations
        }
    }
    return assocs;
}
Also used : AssociationRef(org.alfresco.service.cmr.repository.AssociationRef) ChildAssociationRef(org.alfresco.service.cmr.repository.ChildAssociationRef) ListDataModel(javax.faces.model.ListDataModel)

Example 5 with ListDataModel

use of javax.faces.model.ListDataModel in project acs-community-packaging by Alfresco.

the class SearchProperties method readObject.

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    categoriesDataModel = new ListDataModel();
}
Also used : ListDataModel(javax.faces.model.ListDataModel)

Aggregations

ListDataModel (javax.faces.model.ListDataModel)14 ArrayList (java.util.ArrayList)4 ChildAssociationRef (org.alfresco.service.cmr.repository.ChildAssociationRef)4 Map (java.util.Map)2 AssociationRef (org.alfresco.service.cmr.repository.AssociationRef)2 QName (org.alfresco.service.namespace.QName)2 Serializable (java.io.Serializable)1 HashMap (java.util.HashMap)1 DataModel (javax.faces.model.DataModel)1 StoreRef (org.alfresco.service.cmr.repository.StoreRef)1 AccessPermission (org.alfresco.service.cmr.security.AccessPermission)1 AccessStatus (org.alfresco.service.cmr.security.AccessStatus)1