Search in sources :

Example 6 with ListDataModel

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

the class CreateCompositeRuleWizard method setupCompositeConditionsMode.

public void setupCompositeConditionsMode() {
    this.setAddingCompositeCondition(true);
    this.currentCompositeConditionsDataModel = new ListDataModel();
    this.currentCompositeConditionPropertiesList = new ArrayList<Map<String, Serializable>>();
}
Also used : HashMap(java.util.HashMap) Map(java.util.Map) ListDataModel(javax.faces.model.ListDataModel)

Example 7 with ListDataModel

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

the class CreateRuleWizard method readObject.

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

Example 8 with ListDataModel

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

the class AdminNodeBrowseBean method getAspects.

/**
 * Gets the current node aspects
 *
 * @return node aspects
 */
public DataModel getAspects() {
    if (aspects == null) {
        List<QName> aspectNames = new ArrayList<QName>(getNodeService().getAspects(getNodeRef()));
        aspects = new ListDataModel(aspectNames);
    }
    return aspects;
}
Also used : QName(org.alfresco.service.namespace.QName) ArrayList(java.util.ArrayList) ListDataModel(javax.faces.model.ListDataModel)

Example 9 with ListDataModel

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

the class AdminNodeBrowseBean method getPermissions.

/**
 * Gets the current node permissions
 *
 * @return the permissions
 */
public DataModel getPermissions() {
    if (permissions == null) {
        AccessStatus readPermissions = this.getPermissionService().hasPermission(nodeRef, PermissionService.READ_PERMISSIONS);
        if (readPermissions.equals(AccessStatus.ALLOWED)) {
            List<AccessPermission> nodePermissions = new ArrayList<AccessPermission>(getPermissionService().getAllSetPermissions(nodeRef));
            permissions = new ListDataModel(nodePermissions);
        } else {
            List<NoReadPermissionGranted> noReadPermissions = new ArrayList<NoReadPermissionGranted>(1);
            noReadPermissions.add(new NoReadPermissionGranted());
            permissions = new ListDataModel(noReadPermissions);
        }
    }
    return permissions;
}
Also used : AccessPermission(org.alfresco.service.cmr.security.AccessPermission) ArrayList(java.util.ArrayList) ListDataModel(javax.faces.model.ListDataModel) AccessStatus(org.alfresco.service.cmr.security.AccessStatus)

Example 10 with ListDataModel

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

the class AdminNodeBrowseBean method getParents.

/**
 * Gets the current node parents
 *
 * @return node parents
 */
public DataModel getParents() {
    if (parents == null) {
        List<ChildAssociationRef> parentRefs = getNodeService().getParentAssocs(getNodeRef());
        parents = new ListDataModel(parentRefs);
    }
    return parents;
}
Also used : ChildAssociationRef(org.alfresco.service.cmr.repository.ChildAssociationRef) 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