code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public ObjectReferenceDescriptor getObjectReferenceDescriptorByName(String name)
{
ObjectReferenceDescriptor ord = (ObjectReferenceDescriptor)
getObjectReferenceDescriptorsNameMap().get(name);
//
// BRJ: if the ReferenceDescriptor is not found
// look in the Class... | java |
public CollectionDescriptor getCollectionDescriptorByName(String name)
{
if (name == null)
{
return null;
}
CollectionDescriptor cod = (CollectionDescriptor) getCollectionDescriptorNameMap().get(name);
//
// BRJ: if the CollectionDescriptor is... | java |
public ClassDescriptor getSuperClassDescriptor()
{
if (!m_superCldSet)
{
if(getBaseClass() != null)
{
m_superCld = getRepository().getDescriptorFor(getBaseClass());
if(m_superCld.isAbstract() || m_superCld.isInterface())
... | java |
public void addExtentClass(String newExtentClassName)
{
extentClassNames.add(newExtentClassName);
if(m_repository != null) m_repository.addExtent(newExtentClassName, this);
} | java |
public void setProxyClass(Class newProxyClass)
{
proxyClass = newProxyClass;
if (proxyClass == null)
{
setProxyClassName(null);
}
else
{
proxyClassName = proxyClass.getName();
}
} | java |
public FieldDescriptor getAutoIncrementField()
{
if (m_autoIncrementField == null)
{
FieldDescriptor[] fds = getPkFields();
for (int i = 0; i < fds.length; i++)
{
FieldDescriptor fd = fds[i];
if (fd.isAutoIncrement())
... | java |
public ValueContainer[] getCurrentLockingValues(Object o) throws PersistenceBrokerException
{
FieldDescriptor[] fields = getLockingFields();
ValueContainer[] result = new ValueContainer[fields.length];
for (int i = 0; i < result.length; i++)
{
result[i] = new ValueC... | java |
public void updateLockingValues(Object obj) throws PersistenceBrokerException
{
FieldDescriptor[] fields = getLockingFields();
for (int i = 0; i < fields.length; i++)
{
FieldDescriptor fmd = fields[i];
if (fmd.isUpdateLock())
{
Pers... | java |
public Constructor getZeroArgumentConstructor()
{
if (zeroArgumentConstructor == null && !alreadyLookedupZeroArguments)
{
try
{
zeroArgumentConstructor = getClassOfObject().getConstructor(NO_PARAMS);
}
catch (NoSuchMethodExcepti... | java |
private synchronized void setInitializationMethod(Method newMethod)
{
if (newMethod != null)
{
// make sure it's a no argument method
if (newMethod.getParameterTypes().length > 0)
{
throw new MetadataException(
"Initiali... | java |
private synchronized void setFactoryMethod(Method newMethod)
{
if (newMethod != null)
{
// make sure it's a no argument method
if (newMethod.getParameterTypes().length > 0)
{
throw new MetadataException(
"Factory methods... | java |
protected org.apache.log4j.helpers.PatternParser createPatternParser(final String pattern) {
return new FoundationLoggingPatternParser(pattern);
} | java |
public String format(final LoggingEvent event) {
final StringBuffer buf = new StringBuffer();
for (PatternConverter c = head; c != null; c = c.next) {
c.format(buf, event);
}
return buf.toString();
} | java |
protected String getUniqueString(FieldDescriptor field) throws SequenceManagerException
{
ResultSetAndStatement rsStmt = null;
String returnValue = null;
try
{
rsStmt = getBrokerForClass().serviceJdbcAccess().executeSQL(
"select newid()", field.... | java |
public static Object getObjectFromColumn(ResultSet rs, Integer jdbcType, int columnId)
throws SQLException
{
return getObjectFromColumn(rs, null, jdbcType, null, columnId);
} | java |
public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, java.io.IOException
{
if (flavor.isMimeTypeEqual(OJBMETADATA_FLAVOR))
return selectedDescriptors;
else
throw new UnsupportedFlavorException(flavor);
} | java |
protected void load()
{
// properties file may be set as a System property.
// if no property is set take default name.
String fn = System.getProperty(OJB_PROPERTIES_FILE, OJB_PROPERTIES_FILE);
setFilename(fn);
super.load();
// default repository & connection... | java |
public Collection getReaders(Object obj)
{
Collection result = null;
try
{
Identity oid = new Identity(obj, getBroker());
byte selector = (byte) 'r';
byte[] requestBarr = buildRequestArray(oid, selector);
HttpURLConnection conn = g... | java |
public void addColumnPair(String localColumn, String remoteColumn)
{
if (!_localColumns.contains(localColumn))
{
_localColumns.add(localColumn);
}
if (!_remoteColumns.contains(remoteColumn))
{
_remoteColumns.add(remoteColumn);
... | java |
public int compare(Object objA, Object objB)
{
String idAStr = _table.getColumn((String)objA).getProperty("id");
String idBStr = _table.getColumn((String)objB).getProperty("id");
int idA;
int idB;
try {
idA = Integer.parseInt(idAStr);
}
... | java |
public String getAlias(String path)
{
if (m_allPathsAliased && m_attributePath.lastIndexOf(path) != -1)
{
return m_name;
}
Object retObj = m_mapping.get(path);
if (retObj != null)
{
return (String) retObj;
}
return nu... | java |
public void addClass(ClassDescriptorDef classDef)
{
classDef.setOwner(this);
// Regardless of the format of the class name, we're using the fully qualified format
// This is safe because of the package & class naming constraints of the Java language
_classDefs.put(classDef.getQu... | java |
public void checkConstraints(String checkLevel) throws ConstraintException
{
// check constraints now after all classes have been processed
for (Iterator it = getClasses(); it.hasNext();)
{
((ClassDescriptorDef)it.next()).checkConstraints(checkLevel);
}
// ... | java |
public FinishRequest toFinishRequest(boolean includeHeaders) {
if (includeHeaders) {
return new FinishRequest(body, copyHeaders(headers), statusCode);
} else {
String mime = null;
if (body!=null) {
mime = "text/plain";
if (headers!=null... | java |
public void setAttributeEditable(Attribute attribute, boolean editable) {
attribute.setEditable(editable);
if (!(attribute instanceof LazyAttribute)) { // should not instantiate lazy attributes!
if (attribute instanceof ManyToOneAttribute) {
setAttributeEditable(((ManyToOneAttribute) attribute).getValue(), e... | java |
private void increaseBeliefCount(String bName) {
Object belief = this.getBelief(bName);
int count = 0;
if (belief!=null) {
count = (Integer) belief;
}
this.setBelief(bName, count + 1);
} | java |
private void setBelief(String bName, Object value) {
introspector.setBeliefValue(this.getLocalName(), bName, value, null);
} | java |
public static Organization createOrganization(final String name){
final Organization organization = new Organization();
organization.setName(name);
return organization;
} | java |
public static Module createModule(final String name,final String version){
final Module module = new Module();
module.setName(name);
module.setVersion(version);
module.setPromoted(false);
return module;
} | java |
public static Artifact createArtifact(final String groupId, final String artifactId, final String version, final String classifier, final String type, final String extension, final String origin){
final Artifact artifact = new Artifact();
artifact.setGroupId(groupId);
artifact.setArtifactId(artifactId);
artifa... | java |
public static License createLicense(final String name, final String longName, final String comments, final String regexp, final String url){
final License license = new License();
license.setName(name);
license.setLongName(longName);
license.setComments(comments);
license.setRegexp(regexp);
license.setUrl(... | java |
public static Comment createComment(final String entityId,
final String entityType,
final String action,
final String commentedText,
final String user,
final Date date) {
final Comment comment = new Comment();
comment.setEntityId(entityId);
comment.setEntityType(... | java |
private void writeAllEnvelopes(boolean reuse)
{
// perform remove of m:n indirection table entries first
performM2NUnlinkEntries();
Iterator iter;
// using clone to avoid ConcurentModificationException
iter = ((List) mvOrderOfIds.clone()).iterator();
while(it... | java |
private void checkAllEnvelopes(PersistenceBroker broker)
{
Iterator iter = ((List) mvOrderOfIds.clone()).iterator();
while(iter.hasNext())
{
ObjectEnvelope mod = (ObjectEnvelope) mhtObjectEnvelopes.get(iter.next());
// only non transient objects should be perfor... | java |
public void rollback()
{
try
{
Iterator iter = mvOrderOfIds.iterator();
while(iter.hasNext())
{
ObjectEnvelope mod = (ObjectEnvelope) mhtObjectEnvelopes.get(iter.next());
if(log.isDebugEnabled())
log.deb... | java |
public void remove(Object pKey)
{
Identity id;
if(pKey instanceof Identity)
{
id = (Identity) pKey;
}
else
{
id = transaction.getBroker().serviceIdentity().buildIdentity(pKey);
}
mhtObjectEnvelopes.remove(id);
... | java |
private void reorder()
{
if(getTransaction().isOrdering() && needsCommit && mhtObjectEnvelopes.size() > 1)
{
ObjectEnvelopeOrdering ordering = new ObjectEnvelopeOrdering(mvOrderOfIds, mhtObjectEnvelopes);
ordering.reorder();
Identity[] newOrder = ordering.ge... | java |
private void cascadeMarkedForInsert()
{
// This list was used to avoid endless recursion on circular references
List alreadyPrepared = new ArrayList();
for(int i = 0; i < markedForInsertList.size(); i++)
{
ObjectEnvelope mod = (ObjectEnvelope) markedForInsertList.ge... | java |
private void cascadeInsertFor(ObjectEnvelope mod, List alreadyPrepared)
{
// avoid endless recursion, so use List for registration
if(alreadyPrepared.contains(mod.getIdentity())) return;
alreadyPrepared.add(mod.getIdentity());
ClassDescriptor cld = getTransaction().getBroker()... | java |
private void cascadeMarkedForDeletion()
{
List alreadyPrepared = new ArrayList();
for(int i = 0; i < markedForDeletionList.size(); i++)
{
ObjectEnvelope mod = (ObjectEnvelope) markedForDeletionList.get(i);
// if the object wasn't associated with another object, ... | java |
private void cascadeDeleteFor(ObjectEnvelope mod, List alreadyPrepared)
{
// avoid endless recursion
if(alreadyPrepared.contains(mod.getIdentity())) return;
alreadyPrepared.add(mod.getIdentity());
ClassDescriptor cld = getTransaction().getBroker().getClassDescriptor(mod.getO... | java |
public ManageableCollection getCollectionByQuery(Class collectionClass, Query query, boolean lazy) throws PersistenceBrokerException
{
ManageableCollection result;
try
{
// BRJ: return empty Collection for null query
if (query == null)
{
... | java |
public void retrieveReferences(Object newObj, ClassDescriptor cld, boolean forced) throws PersistenceBrokerException
{
Iterator i = cld.getObjectReferenceDescriptors().iterator();
// turn off auto prefetching for related proxies
final Class saveClassToPrefetch = classToPrefetch;
... | java |
private boolean hasNullifiedFK(FieldDescriptor[] fkFieldDescriptors, Object[] fkValues)
{
boolean result = true;
for (int i = 0; i < fkValues.length; i++)
{
if (!pb.serviceBrokerHelper().representsNull(fkFieldDescriptors[i], fkValues[i]))
{
resu... | java |
private Query getFKQuery(Object obj, ClassDescriptor cld, CollectionDescriptor cds)
{
Query fkQuery;
QueryByCriteria fkQueryCrit;
if (cds.isMtoNRelation())
{
fkQueryCrit = getFKQueryMtoN(obj, cld, cds);
}
else
{
fkQueryCrit ... | java |
public Query getPKQuery(Identity oid)
{
Object[] values = oid.getPrimaryKeyValues();
ClassDescriptor cld = pb.getClassDescriptor(oid.getObjectsTopLevelClass());
FieldDescriptor[] fields = cld.getPkFields();
Criteria criteria = new Criteria();
for (int i = 0; i < field... | java |
public void retrieveCollections(Object newObj, ClassDescriptor cld, boolean forced) throws PersistenceBrokerException
{
doRetrieveCollections(newObj, cld, forced, false);
} | java |
public void retrieveProxyCollections(Object newObj, ClassDescriptor cld, boolean forced) throws PersistenceBrokerException
{
doRetrieveCollections(newObj, cld, forced, true);
} | java |
public void removePrefetchingListeners()
{
if (prefetchingListeners != null)
{
for (Iterator it = prefetchingListeners.iterator(); it.hasNext(); )
{
PBPrefetchingListener listener = (PBPrefetchingListener) it.next();
listener.removeThisL... | java |
@PostConstruct
protected void init() throws IOException {
// base configuration from XML file
if (null != configurationFile) {
log.debug("Get base configuration from {}", configurationFile);
manager = new DefaultCacheManager(configurationFile);
} else {
GlobalConfigurationBuilder builder = new GlobalCon... | java |
protected static String ConvertBinaryOperator(int oper)
{
// Convert the operator into the proper string
String oper_string;
switch (oper)
{
default:
case EQUAL:
oper_string = "=";
break;
case LIKE:
... | java |
public void writeObject(Object o, GraphicsDocument document, boolean asChild) throws RenderException {
document.writeElement("vml:shape", asChild);
Point p = (Point) o;
String adj = document.getFormatter().format(p.getX()) + ","
+ document.getFormatter().format(p.getY());
document.writeAttribute("adj", adj)... | java |
public void setStatusBarMessage(final String message)
{
// Guaranteed to return a non-null array
Object[] listeners = listenerList.getListenerList();
// Process the listeners last to first, notifying
// those that are interested in this event
for (int i = listeners.leng... | java |
public void reportSqlError(String message, java.sql.SQLException sqlEx)
{
StringBuffer strBufMessages = new StringBuffer();
java.sql.SQLException currentSqlEx = sqlEx;
do
{
strBufMessages.append("\n" + sqlEx.getErrorCode() + ":" + sqlEx.getMessage());
c... | java |
public Object copy(final Object obj, final PersistenceBroker broker)
{
return clone(obj, IdentityMapFactory.getIdentityMap(), broker);
} | java |
protected Object getObjectFromResultSet() throws PersistenceBrokerException
{
try
{
// if all primitive attributes of the object are contained in the ResultSet
// the fast direct mapping can be used
return super.getObjectFromResultSet();
}
... | java |
public void createInsertionSql(Database model, Platform platform, Writer writer) throws IOException
{
for (Iterator it = _beans.iterator(); it.hasNext();)
{
writer.write(platform.getInsertSql(model, (DynaBean)it.next()));
if (it.hasNext())
{
... | java |
public void insert(Platform platform, Database model, int batchSize) throws SQLException
{
if (batchSize <= 1)
{
for (Iterator it = _beans.iterator(); it.hasNext();)
{
platform.insert(model, (DynaBean)it.next());
}
}
else
... | java |
private InputStream connect(String url) throws IOException {
URLConnection conn = new URL(URL_BASE + url).openConnection();
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("User-Agent", USER_AGENT);
return conn.getInputStream();
} | java |
public synchronized void abortTransaction() throws TransactionNotInProgressException
{
if(isInTransaction())
{
fireBrokerEvent(BEFORE_ROLLBACK_EVENT);
setInTransaction(false);
clearRegistrationLists();
referencesBroker.removePrefetchingListeners();
... | java |
public void delete(Object obj, boolean ignoreReferences) throws PersistenceBrokerException
{
if(isTxCheck() && !isInTransaction())
{
if(logger.isEnabledFor(Logger.ERROR))
{
String msg = "No running PB-tx found. Please, only delete objects in context of a PB-tr... | java |
private void doDelete(Object obj, boolean ignoreReferences) throws PersistenceBrokerException
{
//logger.info("DELETING " + obj);
// object is not null
if (obj != null)
{
obj = getProxyFactory().getRealObject(obj);
/**
* Kuali Foundation modificat... | java |
private void deleteByQuery(Query query, ClassDescriptor cld) throws PersistenceBrokerException
{
if (logger.isDebugEnabled())
{
logger.debug("deleteByQuery " + cld.getClassNameOfObject() + ", " + query);
}
if (query instanceof QueryBySQL)
{
String sql... | java |
public void store(Object obj) throws PersistenceBrokerException
{
obj = extractObjectToStore(obj);
// only do something if obj != null
if(obj == null) return;
ClassDescriptor cld = getClassDescriptor(obj.getClass());
/*
if one of the PK fields was null, we assume the... | java |
protected void store(Object obj, Identity oid, ClassDescriptor cld, boolean insert)
{
store(obj, oid, cld, insert, false);
} | java |
public void link(Object targetObject, ClassDescriptor cld, ObjectReferenceDescriptor rds, Object referencedObject, boolean insert)
{
// MBAIRD: we have 'disassociated' this object from the referenced object,
// the object represented by the reference descriptor is now null, so set
// the fk ... | java |
public void unlinkFK(Object targetObject, ClassDescriptor cld, ObjectReferenceDescriptor rds)
{
setFKField(targetObject, cld, rds, null);
} | java |
public void linkOneToOne(Object obj, ClassDescriptor cld, ObjectReferenceDescriptor rds, boolean insert)
{
storeAndLinkOneToOne(true, obj, cld, rds, true);
} | java |
public void linkOneToMany(Object obj, CollectionDescriptor cod, boolean insert)
{
Object referencedObjects = cod.getPersistentField().get(obj);
storeAndLinkOneToMany(true, obj, cod,referencedObjects, insert);
} | java |
public void linkMtoN(Object obj, CollectionDescriptor cod, boolean insert)
{
Object referencedObjects = cod.getPersistentField().get(obj);
storeAndLinkMtoN(true, obj, cod, referencedObjects, insert);
} | java |
public void retrieveReference(Object pInstance, String pAttributeName) throws PersistenceBrokerException
{
if (logger.isDebugEnabled())
{
logger.debug("Retrieving reference named ["+pAttributeName+"] on object of type ["+
pInstance.getClass().getName()+"]");
}
... | java |
public ManageableCollection getCollectionByQuery(Class collectionClass, Query query)
throws PersistenceBrokerException
{
return referencesBroker.getCollectionByQuery(collectionClass, query, false);
} | java |
protected OJBIterator getIteratorFromQuery(Query query, ClassDescriptor cld) throws PersistenceBrokerException
{
RsIteratorFactory factory = RsIteratorFactoryImpl.getInstance();
OJBIterator result = getRsIteratorFromQuery(query, cld, factory);
if (query.usePaging())
{
re... | java |
public Object doGetObjectByIdentity(Identity id) throws PersistenceBrokerException
{
if (logger.isDebugEnabled()) logger.debug("getObjectByIdentity " + id);
// check if object is present in ObjectCache:
Object obj = objectCache.lookup(id);
// only perform a db lookup if necessary (o... | java |
private void refreshInstance(Object cachedInstance, Identity oid, ClassDescriptor cld)
{
// read in fresh copy from the db, but do not cache it
Object freshInstance = getPlainDBObject(cld, oid);
// update all primitive typed attributes
FieldDescriptor[] fields = cld.getFieldDescript... | java |
public Object getObjectByQuery(Query query) throws PersistenceBrokerException
{
Object result = null;
if (query instanceof QueryByIdentity)
{
// example obj may be an entity or an Identity
Object obj = query.getExampleObject();
if (obj instanceof Identity)... | java |
public Enumeration getPKEnumerationByQuery(Class primaryKeyClass, Query query) throws PersistenceBrokerException
{
if (logger.isDebugEnabled()) logger.debug("getPKEnumerationByQuery " + query);
query.setFetchSize(1);
ClassDescriptor cld = getClassDescriptor(query.getSearchClass());
... | java |
public void store(Object obj, ObjectModification mod) throws PersistenceBrokerException
{
obj = extractObjectToStore(obj);
// null for unmaterialized Proxy
if (obj == null)
{
return;
}
ClassDescriptor cld = getClassDescriptor(obj.getClass());
// t... | java |
private void storeToDb(Object obj, ClassDescriptor cld, Identity oid, boolean insert, boolean ignoreReferences)
{
// 1. link and store 1:1 references
storeReferences(obj, cld, insert, ignoreReferences);
Object[] pkValues = oid.getPrimaryKeyValues();
if (!serviceBrokerHelper().assert... | java |
public Iterator getReportQueryIteratorByQuery(Query query) throws PersistenceBrokerException
{
ClassDescriptor cld = getClassDescriptor(query.getSearchClass());
return getReportQueryIteratorFromQuery(query, cld);
} | java |
private OJBIterator getRsIteratorFromQuery(Query query, ClassDescriptor cld, RsIteratorFactory factory)
throws PersistenceBrokerException
{
query.setFetchSize(1);
if (query instanceof QueryBySQL)
{
if(logger.isDebugEnabled()) logger.debug("Creating SQL-RsIterator for clas... | java |
private OJBIterator getReportQueryIteratorFromQuery(Query query, ClassDescriptor cld) throws PersistenceBrokerException
{
RsIteratorFactory factory = ReportRsIteratorFactoryImpl.getInstance();
OJBIterator result = getRsIteratorFromQuery(query, cld, factory);
if (query.usePaging())
{... | java |
public static String getModuleName(final String moduleId) {
final int splitter = moduleId.indexOf(':');
if(splitter == -1){
return moduleId;
}
return moduleId.substring(0, splitter);
} | java |
public static String getModuleVersion(final String moduleId) {
final int splitter = moduleId.lastIndexOf(':');
if(splitter == -1){
return moduleId;
}
return moduleId.substring(splitter+1);
} | java |
public static String getGroupId(final String gavc) {
final int splitter = gavc.indexOf(':');
if(splitter == -1){
return gavc;
}
return gavc.substring(0, splitter);
} | java |
public static List<DbModule> getAllSubmodules(final DbModule module) {
final List<DbModule> submodules = new ArrayList<DbModule>();
submodules.addAll(module.getSubmodules());
for(final DbModule submodule: module.getSubmodules()){
submodules.addAll(getAllSubmodules(submodule));
... | java |
public void init(final MultivaluedMap<String, String> queryParameters) {
final String scopeCompileParam = queryParameters.getFirst(ServerAPI.SCOPE_COMPILE_PARAM);
if(scopeCompileParam != null){
this.scopeComp = Boolean.valueOf(scopeCompileParam);
}
final String scopeProvidedP... | java |
private PersistenceBroker obtainBroker()
{
PersistenceBroker _broker;
try
{
if (pbKey == null)
{
//throw new OJBRuntimeException("Not possible to do action, cause no tx runnning and no PBKey is set");
log.warn("No tx runnning an... | java |
private void addSequence(String sequenceName, HighLowSequence seq)
{
// lookup the sequence map for calling DB
String jcdAlias = getBrokerForClass()
.serviceConnectionManager().getConnectionDescriptor().getJcdAlias();
Map mapForDB = (Map) sequencesDBMap.get(jcdAlias);
... | java |
protected void removeSequence(String sequenceName)
{
// lookup the sequence map for calling DB
Map mapForDB = (Map) sequencesDBMap.get(getBrokerForClass()
.serviceConnectionManager().getConnectionDescriptor().getJcdAlias());
if(mapForDB != null)
{
s... | java |
public PBKey getPBKey()
{
if (pbKey == null)
{
this.pbKey = new PBKey(this.getJcdAlias(), this.getUserName(), this.getPassWord());
}
return pbKey;
} | java |
public void setJdbcLevel(String jdbcLevel)
{
if (jdbcLevel != null)
{
try
{
double intLevel = Double.parseDouble(jdbcLevel);
setJdbcLevel(intLevel);
}
catch(NumberFormatException nfe)
{
... | java |
public synchronized boolean checkWrite(TransactionImpl tx, Object obj)
{
if (log.isDebugEnabled()) log.debug("LM.checkWrite(tx-" + tx.getGUID() + ", " + new Identity(obj, tx.getBroker()).toString() + ")");
LockStrategy lockStrategy = LockStrategyFactory.getStrategyFor(obj);
return lockSt... | java |
public void checkpoint(ObjectEnvelope mod)
throws org.apache.ojb.broker.PersistenceBrokerException
{
mod.doDelete();
mod.setModificationState(StateTransient.getInstance());
} | java |
public void checkpoint(ObjectEnvelope mod) throws PersistenceBrokerException
{
mod.doInsert();
mod.setModificationState(StateOldClean.getInstance());
} | java |
public List<String> getModuleVersions(final String name, final FiltersHolder filters) {
final List<String> versions = repositoryHandler.getModuleVersions(name, filters);
if (versions.isEmpty()) {
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
... | java |
public DbModule getModule(final String moduleId) {
final DbModule dbModule = repositoryHandler.getModule(moduleId);
if (dbModule == null) {
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
.entity("Module " + moduleId + " does not exist.").bui... | java |
public void deleteModule(final String moduleId) {
final DbModule module = getModule(moduleId);
repositoryHandler.deleteModule(module.getId());
for (final String gavc : DataUtils.getAllArtifacts(module)) {
repositoryHandler.deleteArtifact(gavc);
}
} | java |
public List<DbLicense> getModuleLicenses(final String moduleId,
final LicenseMatcher licenseMatcher) {
final DbModule module = getModule(moduleId);
final List<DbLicense> licenses = new ArrayList<>();
final FiltersHolder filters = new FiltersHolder();... | java |
public void promoteModule(final String moduleId) {
final DbModule module = getModule(moduleId);
for (final String gavc : DataUtils.getAllArtifacts(module)) {
final DbArtifact artifact = repositoryHandler.getArtifact(gavc);
artifact.setPromoted(true);
repositoryHandle... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.