Examples of ReferenceImpl


Examples of org.apache.tuscany.sdo.impl.ReferenceImpl

    }

    private boolean isTransient(Property property) {
        // HACK: We need some SDOUtil extension to understand a property is derived
        if (property instanceof ReferenceImpl) {
            ReferenceImpl r = (ReferenceImpl) property;
            if (r.isTransient())
                return true;
            EReference opposite = r.getEOpposite();
            if (opposite != null && opposite.isContainment()) {
                return true;
            }
        } else if (property instanceof AttributeImpl) {
            AttributeImpl a = (AttributeImpl) property;
View Full Code Here

Examples of org.apache.tuscany.sdo.impl.ReferenceImpl

            return false;
        feature = ExtendedMetaData.INSTANCE.getAffiliation((EClass) type, feature);
        if (feature != null && feature != property)
            return false;
        if (property instanceof ReferenceImpl) {
            ReferenceImpl r = (ReferenceImpl) property;
            if (r.isTransient())
                return true;
            EReference opposite = r.getEOpposite();
            if (opposite != null && opposite.isContainment()) {
                return true;
            }
        } else if (property instanceof AttributeImpl) {
            AttributeImpl a = (AttributeImpl) property;
View Full Code Here

Examples of org.apache.tuscany.sdo.impl.ReferenceImpl

        feature = ExtendedMetaData.INSTANCE.getAffiliation((EClass)type, feature);
        if (feature != null && feature != property) {
            return false;
        }
        if (property instanceof ReferenceImpl) {
            ReferenceImpl r = (ReferenceImpl)property;
            if (r.isTransient()) {
                return true;
            }
            EReference opposite = r.getEOpposite();
            if (opposite != null && opposite.isContainment()) {
                return true;
            }
        } else if (property instanceof AttributeImpl) {
            AttributeImpl a = (AttributeImpl)property;
View Full Code Here

Examples of org.apache.tuscany.sdo.impl.ReferenceImpl

        feature = ExtendedMetaData.INSTANCE.getAffiliation((EClass)type, feature);
        if (feature != null && feature != property) {
            return false;
        }
        if (property instanceof ReferenceImpl) {
            ReferenceImpl r = (ReferenceImpl)property;
            if (r.isTransient()) {
                return true;
            }
            EReference opposite = r.getEOpposite();
            if (opposite != null && opposite.isContainment()) {
                return true;
            }
        } else if (property instanceof AttributeImpl) {
            AttributeImpl a = (AttributeImpl)property;
View Full Code Here

Examples of org.apache.tuscany.sdo.impl.ReferenceImpl

            return false;
        feature = ExtendedMetaData.INSTANCE.getAffiliation((EClass) type, feature);
        if (feature != null && feature != property)
            return false;
        if (property instanceof ReferenceImpl) {
            ReferenceImpl r = (ReferenceImpl) property;
            if (r.isTransient())
                return true;
            EReference opposite = r.getEOpposite();
            if (opposite != null && opposite.isContainment()) {
                return true;
            }
        } else if (property instanceof AttributeImpl) {
            AttributeImpl a = (AttributeImpl) property;
View Full Code Here

Examples of org.apache.tuscany.sdo.impl.ReferenceImpl

            return false;
        feature = ExtendedMetaData.INSTANCE.getAffiliation((EClass) type, feature);
        if (feature != null && feature != property)
            return false;
        if (property instanceof ReferenceImpl) {
            ReferenceImpl r = (ReferenceImpl) property;
            if (r.isTransient())
                return true;
            EReference opposite = r.getEOpposite();
            if (opposite != null && opposite.isContainment()) {
                return true;
            }
        } else if (property instanceof AttributeImpl) {
            AttributeImpl a = (AttributeImpl) property;
View Full Code Here

Examples of org.apache.tuscany.sdo.impl.ReferenceImpl

            return false;
        feature = ExtendedMetaData.INSTANCE.getAffiliation((EClass) type, feature);
        if (feature != null && feature != property)
            return false;
        if (property instanceof ReferenceImpl) {
            ReferenceImpl r = (ReferenceImpl) property;
            if (r.isTransient())
                return true;
            EReference opposite = r.getEOpposite();
            if (opposite != null && opposite.isContainment()) {
                return true;
            }
        } else if (property instanceof AttributeImpl) {
            AttributeImpl a = (AttributeImpl) property;
View Full Code Here

Examples of org.olat.resource.references.ReferenceImpl

 
  public QTIEditorMainController(List referencees, UserRequest ureq, WindowControl wControl, FileResource fileResource) {
    super(ureq, wControl);

    for(Iterator iter = referencees.iterator(); iter.hasNext(); ) {
      ReferenceImpl ref = (ReferenceImpl)iter.next();
      if ("CourseModule".equals(ref.getSource().getResourceableTypeName())) {
        ICourse course = CourseFactory.loadCourse(ref.getSource().getResourceableId());
        CourseNode courseNode = course.getEditorTreeModel().getCourseNode(ref.getUserdata());
        String repositorySoftKey = (String) courseNode.getModuleConfiguration().get(IQEditController.CONFIG_KEY_REPOSITORY_SOFTKEY);
        Long repKey = RepositoryManager.getInstance().lookupRepositoryEntryBySoftkey(repositorySoftKey, true).getKey();
        List<QTIResult> results = QTIResultManager.getInstance().selectResults(course.getResourceableId(), courseNode.getIdent(), repKey, 1);
        this.restrictedEdit = ((CoordinatorManager.getCoordinator().getLocker().isLocked(course, null)) || (results != null && results.size() > 0)) ? true : false;
      }
View Full Code Here

Examples of org.olat.resource.references.ReferenceImpl

    changeEmail.addEmailTo(cl);

    StringBuilder result = new StringBuilder();
    result.append(translate("qti.restricted.leading"));
    for (Iterator iter = referencees.iterator(); iter.hasNext();) {
      ReferenceImpl element = (ReferenceImpl) iter.next();
      // FIXME:discuss:possible performance/cache problem
      if ("CourseModule".equals(element.getSource().getResourceableTypeName())) {
        ICourse course = CourseFactory.loadCourse(element.getSource().getResourceableId());

        // the course owners

        RepositoryEntry entry = rm.lookupRepositoryEntry(course, false);
        String courseTitle = course.getCourseTitle();
        SecurityGroup owners = entry.getOwnerGroup();
        List stakeHoldersIds = ManagerFactory.getManager().getIdentitiesOfSecurityGroup(owners);

        // add stakeholders as group
        cl = new ContactList(courseTitle);
        cl.addAllIdentites(stakeHoldersIds);
        changeEmail.addEmailTo(cl);

        StringBuilder stakeHolders = new StringBuilder();
        User user = ((Identity) stakeHoldersIds.get(0)).getUser();
        Locale loc = ureq.getLocale();
        stakeHolders.append(user.getProperty(UserConstants.FIRSTNAME, loc)).append(" ").append(user.getProperty(UserConstants.LASTNAME, loc));
        for (int i = 1; i < stakeHoldersIds.size(); i++) {
          user = ((Identity) stakeHoldersIds.get(i)).getUser();
          stakeHolders.append(", ").append(user.getProperty(UserConstants.FIRSTNAME, loc)).append(" ").append(user.getProperty(UserConstants.LASTNAME, loc));
        }

        CourseNode cn = course.getEditorTreeModel().getCourseNode(element.getUserdata());
        String courseNodeTitle = cn.getShortTitle();
        result.append(translate("qti.restricted.course", courseTitle));
        result.append(translate("qti.restricted.node", courseNodeTitle));
        result.append(translate("qti.restricted.owners", stakeHolders.toString()));
      }
View Full Code Here

Examples of org.olat.resource.references.ReferenceImpl

    // find all references to course
    ReferenceManager refM = ReferenceManager.getInstance();
    List refs = refM.getReferences(course);
    for (Iterator iter = refs.iterator(); iter.hasNext();) {
      ReferenceImpl ref = (ReferenceImpl) iter.next();
      refM.delete(ref);
    }
    // call cleanupOnDelet for nodes
    Visitor visitor = new NodeDeletionVisitor(course);
    TreeVisitor tv = new TreeVisitor(visitor, course.getRunStructure().getRootNode(), true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.