コード例 #1
0
 @Override
 public StoredObject createItem(
     String name,
     Map<String, PropertyData<?>> propMap,
     String user,
     Folder folder,
     List<String> policies,
     Acl addACEs,
     Acl removeACEs) {
   ItemImpl item = new ItemImpl();
   item.createSystemBasePropertiesWhenCreated(propMap, user);
   item.setCustomProperties(propMap);
   item.setRepositoryId(fRepositoryId);
   item.setName(name);
   if (null != folder) {
     if (hasChild(folder, name)) {
       throw new CmisNameConstraintViolationException(
           "Cannot create document an object with name "
               + name
               + " already exists in folder "
               + getFolderPath(folder.getId()));
     }
     item.addParentId(folder.getId());
   }
   if (null != policies) {
     item.setAppliedPolicies(policies);
   }
   int aclId = getAclId(((FolderImpl) folder), addACEs, removeACEs);
   item.setAclId(aclId);
   String id = storeObject(item);
   item.setId(id);
   applyAcl(item, addACEs, removeACEs);
   return item;
 }
コード例 #2
0
ファイル: InventoryImpl.java プロジェクト: nansta/logistics
  public static ArrayList<String> searchFacilityInventory(
      HashMap<String, InventoryImpl> inventories, String id) {
    ArrayList<String> sourceFacilities = new ArrayList<String>();
    Iterator entries = inventories.entrySet().iterator();
    while (entries.hasNext()) {
      Map.Entry thisEntry = (Map.Entry) entries.next();
      String key = (String) thisEntry.getKey();
      InventoryImpl value = (InventoryImpl) thisEntry.getValue();

      for (ItemImpl item : value.getItems()) {
        if (id.equals(item.getId())) {
          sourceFacilities.add(key);
        }
      }
    }
    return sourceFacilities;
  }
コード例 #3
0
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 @Override
 public void eUnset(int featureID) {
   switch (featureID) {
     case ExtLibraryProfilePackage.PERIODICAL__ISSUES_PER_YEAR:
       setIssuesPerYear(ISSUES_PER_YEAR_EDEFAULT);
       return;
   }
   super.eUnset(featureID);
 }
コード例 #4
0
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 @SuppressWarnings("unchecked")
 @Override
 public void eSet(int featureID, Object newValue) {
   switch (featureID) {
     case ExtLibraryProfilePackage.PERIODICAL__ISSUES_PER_YEAR:
       setIssuesPerYear((Integer) newValue);
       return;
   }
   super.eSet(featureID, newValue);
 }
コード例 #5
0
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 @Override
 public void eUnset(int featureID) {
   switch (featureID) {
     case EXTLibraryPackage.CIRCULATING_ITEM__COPIES:
       setCopies(COPIES_EDEFAULT);
       return;
     case EXTLibraryPackage.CIRCULATING_ITEM__BORROWERS:
       getBorrowers().clear();
       return;
   }
   super.eUnset(featureID);
 }
コード例 #6
0
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 @SuppressWarnings("unchecked")
 @Override
 public void eSet(int featureID, Object newValue) {
   switch (featureID) {
     case EXTLibraryPackage.CIRCULATING_ITEM__COPIES:
       setCopies((Integer) newValue);
       return;
     case EXTLibraryPackage.CIRCULATING_ITEM__BORROWERS:
       getBorrowers().clear();
       getBorrowers().addAll((Collection<? extends Borrower>) newValue);
       return;
   }
   super.eSet(featureID, newValue);
 }