- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Delete a feature in Content Transport
Hello,
I am a new FirstSpirit user. I was playing around with Content Transport. I created a Feature in it. But now I do not find a way to delete it. Can someone please help me with this?
Thanks.
Ashish Jain
- Labels:
-
Q and A
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ashish,
itยดs not possible to do this by GUI. Therefor you need a litte script, like this:
/*
deleting old features from server
*/
import de.espirit.firstspirit.feature.FeatureAgent;
/* Array of feature names to be deleted */
String[] deleteFeatures = { "NAME_OF_FEATURE_TO_BE_DELETED" };
/* Do a test run without really deleting anything */
boolean testmode = false;
FeatureAgent agent = context.requireSpecialist(FeatureAgent.TYPE);
ArrayList featureDescriptors = agent.getFeatureDescriptors();
for ( fd : featureDescriptors ) {
if( Arrays.asList(deleteFeatures).contains(fd.getFeatureName()) ) {
if (!testmode) agent.deleteFeature(fd);
context.logInfo("deleted feature: " + fd.toString());
print("deleted feature: " + fd.toString());
} else {
context.logInfo("NOT deleted: " + fd.toString());
print("NOT deleted: " + fd.toString());
}
}
More Information you can find in die DEV-API:
https://yourhost.com/help/odfs/dev/index.html?de/espirit/firstspirit/feature/package-frame.html
regards
thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ashish,
itยดs not possible to do this by GUI. Therefor you need a litte script, like this:
/*
deleting old features from server
*/
import de.espirit.firstspirit.feature.FeatureAgent;
/* Array of feature names to be deleted */
String[] deleteFeatures = { "NAME_OF_FEATURE_TO_BE_DELETED" };
/* Do a test run without really deleting anything */
boolean testmode = false;
FeatureAgent agent = context.requireSpecialist(FeatureAgent.TYPE);
ArrayList featureDescriptors = agent.getFeatureDescriptors();
for ( fd : featureDescriptors ) {
if( Arrays.asList(deleteFeatures).contains(fd.getFeatureName()) ) {
if (!testmode) agent.deleteFeature(fd);
context.logInfo("deleted feature: " + fd.toString());
print("deleted feature: " + fd.toString());
} else {
context.logInfo("NOT deleted: " + fd.toString());
print("NOT deleted: " + fd.toString());
}
}
More Information you can find in die DEV-API:
https://yourhost.com/help/odfs/dev/index.html?de/espirit/firstspirit/feature/package-frame.html
regards
thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hallo Ashish Jain,
ist diese Frage noch offen? Benรถtigst du noch weitere Hilfe oder konnte Thomas dir bereits weiterhelfen? In diesem Fall wรคre es super, wenn du seine "richtige Antwort" entsprechend markierst.
Solltest du selbst eine Lรถsung gefunden haben, wรคre es toll, wenn du sie hier bereitstellst.
Viele Grรผรe,
Sebastian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vielleicht interessant:
Ab Version 5.2.717 kรถnnen Feature-Zusammenstellungen nun auch รผber die GUI gelรถscht werden.
Fรผr die Details siehe [RELEASE] FirstSpiritโข 5.2R7 Build 717 released

