Iterator<ObjectType> iter = obList.iterator(); while (iter.hasNext()) { ObjectType ob = iter.next(); if(ob.getId() == id) { iter.remove(); break; } }
/** * Creates an aspectsToRemove extension element. */ public static CmisExtensionElement createAspectsToRemoveExtension(ObjectType aspectType) { return new CmisExtensionElementImpl(ALFRESCO_NAMESPACE, ASPECTS_TO_REMOVE, null, aspectType.getId()); }
/** * Creates an aspectsToAdd extension element. */ public static CmisExtensionElement createAspectsToAddExtension(ObjectType aspectType) { return new CmisExtensionElementImpl(ALFRESCO_NAMESPACE, ASPECTS_TO_ADD, null, aspectType.getId()); }
public List<Tree<ObjectType>> getDescendants(int depth) { return session.getTypeDescendants(objectType.getId(), depth, true); } }
public String getId() { return folder.getType().getId(); }
public List<Tree<ObjectType>> getDescendants(int depth) { return session.getTypeDescendants(objectType.getId(), depth, true); } }
public boolean hasAspect(ObjectType type) { return type == null ? false : hasAspect(type.getId()); }
public String getId() { return doc.getType().getId(); }
public ItemIterable<ObjectType> getChildren() { return session.getTypeChildren(objectType.getId(), true); }
public boolean hasAspect(ObjectType type) { return type == null ? false : hasAspect(type.getId()); }
protected boolean hasRelationships(Session session) { if (supportsRelationships == null) { supportsRelationships = Boolean.FALSE; for (ObjectType type : session.getTypeChildren(null, false)) { if (BaseTypeId.CMIS_RELATIONSHIP.value().equals(type.getId())) { supportsRelationships = Boolean.TRUE; break; } } } return supportsRelationships.booleanValue(); }
protected boolean hasItems(Session session) { if (supportsItems == null) { supportsItems = Boolean.FALSE; for (ObjectType type : session.getTypeChildren(null, false)) { if (BaseTypeId.CMIS_ITEM.value().equals(type.getId())) { supportsItems = Boolean.TRUE; break; } } } return supportsItems.booleanValue(); }
protected boolean hasSecondaries(Session session) { if (supportsSecondaries == null) { supportsSecondaries = Boolean.FALSE; for (ObjectType type : session.getTypeChildren(null, false)) { if (BaseTypeId.CMIS_SECONDARY.value().equals(type.getId())) { supportsSecondaries = Boolean.TRUE; break; } } } return supportsSecondaries.booleanValue(); }
protected boolean hasPolicies(Session session) { if (supportsPolicies == null) { supportsPolicies = Boolean.FALSE; for (ObjectType type : session.getTypeChildren(null, false)) { if (BaseTypeId.CMIS_POLICY.value().equals(type.getId())) { supportsPolicies = Boolean.TRUE; break; } } } return supportsPolicies.booleanValue(); }
@Override public String toString() { readLock(); try { if (objectType == null) { return "<unknown>"; } return objectType.getBaseTypeId() + " (" + objectType.getId() + "): " + getId(); } finally { readUnlock(); } } }
@Override public String toString() { readLock(); try { if (objectType == null) { return "<unknown>"; } return objectType.getBaseTypeId() + " (" + objectType.getId() + "): " + getId(); } finally { readUnlock(); } } }
private void createDocumentWithSecondaryType(Session session, Folder testFolder, ObjectType secondaryTestType) { Document doc = createDocument(session, testFolder, "createwithsecondarytype.txt", getDocumentTestTypeId(), new String[] { secondaryTestType.getId() }, "Secondary Type Test"); try { // check if the secondary type is there boolean found = checkSecondaryType(doc, secondaryTestType); // detach secondary type if (found && !needsCheckOut(doc)) { detachSecondaryType(session, doc, secondaryTestType); } } finally { deleteObject(doc); } }