[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[tigerstripe-dev] (no subject)
|
Hi
Team,
Would
please help me with following question: I have a Tigerstripe model
project which depends on other models, now given an artifact (e.g. an Package
artifact, or a ManagedEntityArtifact), how can I know which Tigerstripe model
does the artifact belong to, at runtime?
Here let
me give more details. I have a model 'spm' tigerstripe project. It
depends on a model named 'spm_dependencies'. We
export 'spm_dependencies' as a tigerstripe model and add it in the list
of 'dependencies' of the 'spm' model project.
Now I
run an 'artifact rule' (as part of a generater) with 'spm'
model project. the configuration of the rule is given
here:
I
suppose I can know enclosing model in this way:
ITigerstripeModelProject
proj = packageArtifact.getTigerstripeProject();
String
enclosingModelProjName = null;
if (proj != null)
{
enclosingModelProjName =
proj.getName();
}
Given a
package or an entity defined in the current model ('spm' model), the
getTigerstripeProject() returns an object from which I can get model proj name.
but if the package or the entity is defined in dependency model
('spm_dependencies' model), the method returns
null.
Any
suggestion?
best
regards,
Jinzhai