Examples of Aspect


Examples of com.massivecraft.mcore.Aspect

  }
 
  public List<C> getColls()
  {
    List<C> ret = new ArrayList<C>();
    Aspect a = this.getAspect();
    Multiverse m = a.getMultiverse();
    for (String universe : m.getUniverses())
    {
      ret.add(this.getForUniverse(universe));
    }
    return ret;
View Full Code Here

Examples of nexj.core.meta.Aspect

               addAspects();
            }

            for (int i = 0, n = pointcut.getAspectCount(); i < n; ++i)
            {
               Aspect aspect = pointcut.getAspect(i);

               if (m_aspectNameSet.contains(aspect.getName()))
               {
                  aspect.applyTo(pointcut, nPass);
               }
            }
         }

         protected Iterator getAspectIterator()
View Full Code Here

Examples of nexj.core.meta.Aspect

   /**
    * @see nexj.core.meta.Aspect#applyTo(nexj.core.meta.Pointcut, int)
    */
   public void applyTo(Pointcut pointcut, int nPass) throws MetadataException
   {
      Aspect aspect = getAspect();

      if (m_bOverride && nPass == 0)
      {
         int i = pointcut.findAspectOverride(aspect);

         if (i >= 0 && !pointcut.isAspectOverrideInclusive(i))
         {
            pointcut.removeAspectOverride(aspect);
         }
      }

      aspect.applyTo(pointcut, nPass);
   }
View Full Code Here

Examples of nexj.core.meta.Aspect

   /**
    * @see nexj.core.meta.Aspect#removeFrom(nexj.core.meta.Pointcut)
    */
   public boolean removeFrom(Pointcut pointcut)
   {
      Aspect aspect = getAspect();

      if (aspect.removeFrom(pointcut))
      {
         if (m_bOverride)
         {
            int i = pointcut.findAspectOverride(aspect);

View Full Code Here

Examples of nexj.core.meta.Aspect

                     tableFinal.getName(), m_final.getDataSource().getName()}));
            }

            for (int i = 0, n = table.getAspectCount(); i < n; ++i)
            {
               Aspect aspect = m_final.findTable(table.getAspect(i).getName());

               if (aspect != null && !tableFinal.hasAspect(aspect))
               {
                  eh = addException(eh, new MetadataException("err.meta.upgrade.sql.extraTableAspect",
                     new Object[]{aspect.getName(), tableFinal.getName(), m_final.getDataSource().getName()}));
               }
            }

            for (int i = 0, n = tableFinal.getAspectCount(); i < n; ++i)
            {
               Aspect aspect = m_schema.findTable(tableFinal.getAspect(i).getName());

               if (aspect != null && !table.hasAspect(aspect))
               {
                  eh = addException(eh, new MetadataException("err.meta.upgrade.sql.missingTableAspect",
                     new Object[]{aspect.getName(), tableFinal.getName(), m_final.getDataSource().getName()}));
               }
            }

            for (int i = 0, n = table.getColumnCount(); i < n; ++i)
            {
               Column column = table.getColumn(i);

               if (tableFinal.findColumn(column.getName()) == null)
               {
                  eh = addException(eh, new MetadataException("err.meta.upgrade.sql.extraColumn",
                     new Object[]{column.getName(), tableFinal.getName(), m_final.getDataSource().getName()}));
               }
            }

            for (int i = 0, n = tableFinal.getColumnCount(); i < n; ++i)
            {
               Column columnFinal = tableFinal.getColumn(i);
               Column column = table.findColumn(columnFinal.getName());

               if (column == null)
               {
                  eh = addException(eh, new MetadataException("err.meta.upgrade.sql.missingColumn",
                     new Object[]{columnFinal.getName(), tableFinal.getName(), m_final.getDataSource().getName()}));
               }
               else
               {
                  if (columnFinal.getType() != column.getType())
                  {
                     eh = addException(eh, new MetadataException("err.meta.upgrade.sql.columnTypeMismatch",
                        new Object[]{columnFinal.getType().getName(), column.getType().getName(),
                           columnFinal.getName(), tableFinal.getName(), m_final.getDataSource().getName()}));
                  }

                  if (columnFinal.getPrecision() != column.getPrecision())
                  {
                     eh = addException(eh, new MetadataException("err.meta.upgrade.sql.columnPrecisionMismatch",
                        new Object[]{Primitive.createInteger(columnFinal.getPrecision()),
                           Primitive.createInteger(column.getPrecision()), columnFinal.getName(),
                           tableFinal.getName(), m_final.getDataSource().getName()}));
                  }

                  if (columnFinal.getScale() != column.getScale())
                  {
                     eh = addException(eh, new MetadataException("err.meta.upgrade.sql.columnScaleMismatch",
                        new Object[]{Primitive.createInteger(columnFinal.getScale()),
                           Primitive.createInteger(column.getScale()), columnFinal.getName(),
                           tableFinal.getName(), m_final.getDataSource().getName()}));
                  }

                  if (columnFinal.getAllocation() != column.getAllocation())
                  {
                     eh = addException(eh, new MetadataException("err.meta.upgrade.sql.columnAllocationMismatch",
                        new Object[]{columnFinal.getAllocationString(), column.getAllocationString(),
                           columnFinal.getName(), tableFinal.getName(), m_final.getDataSource().getName()}));
                  }

                  if (columnFinal.isNullable() != column.isNullable())
                  {
                     eh = addException(eh, new MetadataException("err.meta.upgrade.sql.columnNullabilityMismatch",
                        new Object[]{Boolean.valueOf(columnFinal.isNullable()),
                           Boolean.valueOf(column.isNullable()), columnFinal.getName(),
                           tableFinal.getName(), m_final.getDataSource().getName()}));
                  }

                  if (columnFinal.isCaseInsensitive() != column.isCaseInsensitive())
                  {
                     eh = addException(eh, new MetadataException("err.meta.upgrade.sql.columnCaseInsensitivityMismatch",
                        new Object[]{Boolean.valueOf(columnFinal.isCaseInsensitive()),
                           Boolean.valueOf(column.isCaseInsensitive()), columnFinal.getName(),
                           tableFinal.getName(), m_final.getDataSource().getName()}));
                  }

                  String sConverterFinal = "";
                  String sConverter = "";

                  if (columnFinal.getConverter() != null)
                  {
                     sConverterFinal = columnFinal.getConverter().getName();
                  }

                  if (column.getConverter() != null)
                  {
                     sConverter = column.getConverter().getName();
                  }

                  if (!sConverterFinal.equals(sConverter))
                  {
                     eh = addException(eh, new MetadataException("err.meta.upgrade.sql.columnConverterMismatch",
                        new Object[]{sConverterFinal, sConverter, columnFinal.getName(),
                           tableFinal.getName(), m_final.getDataSource().getName()}));
                  }
               }
            }
         }
      }

      for (Iterator indexItr = m_schema.getIndexIterator(); indexItr.hasNext();)
      {
         Index index = (Index)indexItr.next();

         if (m_final.findIndex(index.getName()) == null)
         {
            eh = addException(eh, new MetadataException("err.meta.upgrade.sql.extraIndex",
               new Object[]{index.getName(), index.getTable().getName(), m_final.getDataSource().getName()}));
         }
      }

      for (Iterator indexItrFinal = m_final.getIndexIterator(); indexItrFinal.hasNext();)
      {
         Index indexFinal = (Index)indexItrFinal.next();
         Index index = m_schema.findIndex(indexFinal.getName());

         if (index == null)
         {
            if (indexFinal.getType() >= Index.BTREE)
            {
               eh = addException(eh, new MetadataException("err.meta.upgrade.sql.missingIndex",
                  new Object[]{indexFinal.getName(), indexFinal.getTable().getName(), m_final.getDataSource().getName()}));
            }
         }
         else
         {
            if (!indexFinal.getTable().getName().equals(index.getTable().getName()))
            {
               eh = addException(eh, new MetadataException("err.meta.upgrade.sql.indexTableMismatch",
                  new Object[]{indexFinal.getTable().getName(), index.getTable().getName(),
                     indexFinal.getName(), m_final.getDataSource().getName()}));
            }

            if (indexFinal.getType() != index.getType())
            {
               eh = addException(eh, new MetadataException("err.meta.upgrade.sql.indexTypeMismatch",
                  new Object[]{indexFinal.getTypeString(), index.getTypeString(), indexFinal.getName(),
                     indexFinal.getTable().getName(), m_final.getDataSource().getName()}));
            }

            if (indexFinal.isUnique() != index.isUnique())
            {
               eh = addException(eh, new MetadataException("err.meta.upgrade.sql.indexUniquenessMismatch",
                  new Object[]{Boolean.valueOf(indexFinal.isUnique()), Boolean.valueOf(index.isUnique()),
                     indexFinal.getName(), indexFinal.getTable().getName(), m_final.getDataSource().getName()}));
            }

            if (indexFinal.getFill() != index.getFill())
            {
               eh = addException(eh, new MetadataException("err.meta.upgrade.sql.indexFillMismatch",
                  new Object[]{Primitive.createInteger(indexFinal.getFill()), Primitive.createInteger(index.getFill()),
                     indexFinal.getName(), indexFinal.getTable().getName(), m_final.getDataSource().getName()}));
            }

            String sRelatedTableFinal = (indexFinal.getRelatedTable() == null) ? "" : indexFinal.getRelatedTable().getName();
            String sRelatedTable = (index.getRelatedTable() == null) ? "" : index.getRelatedTable().getName();

            if (!sRelatedTableFinal.equals(sRelatedTable))
            {
               eh = addException(eh, new MetadataException("err.meta.upgrade.sql.indexRelatedTableMismatch",
                  new Object[]{sRelatedTableFinal, sRelatedTable, indexFinal.getName(),
                     indexFinal.getTable().getName(), m_final.getDataSource().getName()}));
            }

            for (int i = 0, n = index.getAspectCount(); i < n; ++i)
            {
               Aspect aspect = m_final.findIndex(index.getAspect(i).getName());

               if (aspect != null && !indexFinal.hasAspect(aspect))
               {
                  eh = addException(eh, new MetadataException("err.meta.upgrade.sql.extraIndexAspect",
                     new Object[]{aspect.getName(), indexFinal.getName(), indexFinal.getTable().getName(),
                        m_final.getDataSource().getName()}));
               }
            }

            for (int i = 0, n = indexFinal.getAspectCount(); i < n; ++i)
            {
               Aspect aspect = m_schema.findIndex(indexFinal.getAspect(i).getName());

               if (aspect != null && !index.hasAspect(aspect))
               {
                  eh = addException(eh, new MetadataException("err.meta.upgrade.sql.missingIndexAspect",
                     new Object[]{aspect.getName(), indexFinal.getName(), indexFinal.getTable().getName(),
                        m_final.getDataSource().getName()}));
               }
            }

            if (index.getType() != Index.VIRTUAL && index.getType() != Index.QUERY)
View Full Code Here

Examples of org.aspectj.lang.annotation.Aspect

    return dec != null ? new AjTypeImpl(dec) : null;
  }
 
  public PerClause getPerClause() {
    if (isAspect()) {
      Aspect aspectAnn = clazz.getAnnotation(Aspect.class);
      String perClause = aspectAnn.value();
      if (perClause.equals("")) {
        if (getSupertype().isAspect()) {
          return getSupertype().getPerClause();
        }
        return new PerClauseImpl(PerClauseKind.SINGLETON);
View Full Code Here

Examples of org.bladerunnerjs.model.Aspect

    File resourceFile = null;
   
    if (contentPath.formName.equals(ASPECT_THEME_REQUEST))
    {
      String aspectName = contentPath.properties.get("aspect");
      Aspect aspect =  bundlableNode.app().aspect(aspectName);
      List<ResourcesAssetLocation> resourceAssetLocations = getResourceAssetLocations(aspect);
      for (ResourcesAssetLocation location : resourceAssetLocations) {
        if (location.getThemeName().equals(theme)){
          resourceFile = location.file(resourcePath);
        }
      }
    }
    else if (contentPath.formName.equals(ASPECT_RESOURCE_REQUEST))
    {
      String aspectName = contentPath.properties.get("aspect");
      Aspect aspect =  bundlableNode.app().aspect(aspectName);
      resourceFile = aspect.file(resourcePath);
    }
    else if (contentPath.formName.equals(BLADESET_THEME_REQUEST))
    {
      Bladeset bladeset = bundlableNode.app().bladeset(contentPath.properties.get("bladeset"));
      ThemedAssetLocation location = getThemedResourceLocation(bladeset, theme);
View Full Code Here

Examples of org.bladerunnerjs.model.Aspect

    String[] requestArgs = new String[0];
   
   
    if (assetContainer instanceof Aspect)
    {
      Aspect aspect = (Aspect) assetContainer;
      themeRequestName = ASPECT_THEME_REQUEST;
      resourcesRequestName = ASPECT_RESOURCE_REQUEST;
      requestArgs = new String[] { aspect.getName() };
    }
    else if (assetContainer instanceof Bladeset)
    {
      Bladeset bladeset = (Bladeset) assetContainer;
      themeRequestName = BLADESET_THEME_REQUEST;
View Full Code Here

Examples of org.bladerunnerjs.model.Aspect

    String appName = parsedArgs.getString("app-name");
    String aspectName = parsedArgs.getString("aspect-name");
    boolean showAllDependencies = parsedArgs.getBoolean("all");
   
    App app = brjs.app(appName);
    Aspect aspect = app.aspect(aspectName);
   
    if(!app.dirExists()) throw new NodeDoesNotExistException(app, this);
    if(!aspect.dirExists()) throw new NodeDoesNotExistException(aspect, this);
   
    try {
      logger.println(DependencyGraphReportBuilder.createReport(aspect, showAllDependencies)+"\n");
    }
    catch (ModelOperationException e) {
View Full Code Here

Examples of org.bladerunnerjs.model.Aspect

   
    File assetLocationParentDir = assetLocation.dir().getParentFile();
    BRJS root = assetContainer.root();
    try {
      if(assetContainer instanceof Aspect) {
        Aspect aspect = (Aspect) assetContainer;
        if (assetLocation instanceof ThemedAssetLocation && assetLocationParentDir.getName().equals("themes")) {
          ThemedAssetLocation theme = (ThemedAssetLocation) assetLocation;
          String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), theme.dir(), imageFile);
          targetPath = cssResourceContentPathParser.createRequest(CssResourceContentPlugin.ASPECT_THEME_REQUEST, ((Aspect) assetContainer).getName(), theme.dir().getName(), resourcePath);
        } else {
          String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), assetContainer.dir(), imageFile);
          targetPath = cssResourceContentPathParser.createRequest(CssResourceContentPlugin.ASPECT_RESOURCE_REQUEST, aspect.getName(), resourcePath);
        }
      }
      else if(assetContainer instanceof Bladeset) {
        Bladeset bladeset = (Bladeset) assetContainer;
        if (assetLocation instanceof ThemedAssetLocation && assetLocationParentDir.getName().equals("themes")) {
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.